This commit is contained in:
2024-04-27 09:23:34 +02:00
commit 11e713ca6f
11884 changed files with 3263371 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?php
$type = substr($_REQUEST['code'], 0,2);
$type = strtoupper($type);
echo $type."<br><br>";
$db = $GLOBALS['db'];
for ($i=0; $i<10000; $i++) {
$s = (string) $i;
while (strlen($s) < 5)
$s = '0'.$s;
$res = $db->query("SELECT id FROM ecmproducts WHERE code='".$type.$s."'");
$e = '';
if ($res->num_rows==0) {
$ress = $db->query("SELECT code FROM ecmproducts WHERE code LIKE '".$type.$s."%'");
while ($rr = $db->fetchByAssoc($ress))
$e.=$rr['code'].'&nbsp;&nbsp;&nbsp;';
if ($ress->num_rows>0)
$e = '&nbsp;&nbsp;&nbsp;('.$e.')';
echo $type.$s.$e.'<br>';
}
}
?>