Add php files
This commit is contained in:
26
modules/EcmProductB2Bs/checkcode.php
Executable file
26
modules/EcmProductB2Bs/checkcode.php
Executable file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
if($_REQUEST['code']!='' ){
|
||||
|
||||
$w = $GLOBALS['db']->query("select count(code) as c from ecmproducts where code='".$_REQUEST['code']."'");
|
||||
$r = $GLOBALS['db']->fetchByAssoc($w);
|
||||
|
||||
if($r['c']>0){
|
||||
if($_REQUEST['record']!=''){
|
||||
$w2 = $GLOBALS['db']->query("select code as c from ecmproducts where id='".$_REQUEST['record']."'");
|
||||
$r2 = $GLOBALS['db']->fetchByAssoc($w2);
|
||||
|
||||
if($_REQUEST['code']==$r2['c']){
|
||||
|
||||
} else {
|
||||
echo 'Istnieje już produkt o podanym kodzie!';
|
||||
}
|
||||
} else {
|
||||
echo 'Istnieje już produkt o podanym kodzie!';
|
||||
}
|
||||
}else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user