Changeset 11771 for trunk/www/db_po/insert_po.php
- Timestamp:
- 08/04/11 11:20:53 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/db_po/insert_po.php
r11599 r11771 4 4 ini_set("mysql.trace_mode", "On"); 5 5 6 // init 7 // 8 // values which cannot be empty 6 9 if (empty($_GET["fUpdCase"])) 7 10 { … … 24 27 return; 25 28 } 29 if (empty($_GET["fValue"])) 30 { 31 echo "Please insert a value.<br>"; 32 return; 33 } 34 if (empty($_GET["fDescription"])) 35 { 36 echo "Please insert a description.<br>"; 37 return; 38 } 39 if (empty($_GET["fType"])) 40 { 41 echo "Please select a type.<br>"; 42 return; 43 } 44 // values which may be empty 26 45 if (empty($_GET["fKey2"])) 27 { 28 echo "Please select a key2.<br>"; 29 return; 30 } 31 if (empty($_GET["fValue"])) 32 { 33 echo "Please insert a value.<br>"; 34 return; 35 } 36 if (empty($_GET["fDescription"])) 37 { 38 echo "Please insert a description.<br>"; 39 return; 40 } 41 if (empty($_GET["fType"])) 42 { 43 echo "Please select a type.<br>"; 44 return; 45 } 46 $_GET["fKey2"]=""; 46 47 if (empty($_GET["fOriginalIndex"])) 47 48 $_GET["fOriginalIndex"]=""; … … 97 98 98 99 //check if key alread exists 99 $query2="SELECT Count(*) from ProgramOption WHERE fKey1='".$_GET["fKey1"]."' AND fKey2='.".$_GET["fKey2"]."'"; 100 if (empty($_GET["fKey2"])) 101 $query2="SELECT Count(*) from ProgramOption WHERE fKey1='".$_GET["fKey1"]."' AND ISNULL(fKey2)"; 102 else 103 $query2="SELECT Count(*) from ProgramOption WHERE fKey1='".$_GET["fKey1"]."' AND fKey2='.".$_GET["fKey2"]."'"; 100 104 $query2.=" AND fCounter=(Select Max(fCounter) from History)"; 101 105 if (!$result2=mysqli_query($db_id, $query2)) … … 158 162 $query0.=", fUser='".$_SERVER['PHP_AUTH_USER']."'"; 159 163 $query0.=", fKey1='".$_GET["fKey1"]."'"; 160 $query0.=", fKey2='.".$_GET["fKey2"]."'"; 164 if (!empty($_GET["fKey2"])) 165 $query0.=", fKey2='.".$_GET["fKey2"]."'"; 161 166 $query0.=", fDescription='".$_GET["fDescription"]."'"; 162 167 $query0.=", fType='".$_GET["fType"]."'";
Note:
See TracChangeset
for help on using the changeset viewer.