mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
fix " Invalid argument supplied for foreach() ", " Undefined variable:" , " Use of undefined constant "
This commit is contained in:
@@ -288,17 +288,17 @@ if (isset($_GET['edit']) )
|
||||
$sql = "SELECT * FROM sample_import WHERE sample_import_id = $sample_import_id";
|
||||
$sd = $db->GetRow($sql);
|
||||
|
||||
if($sd['enabled'] == 1) $dis = disabled; // -> disable edit and delete if sample is enabled
|
||||
if($sd['enabled'] == 1) $dis = "disabled"; else $dis = false;// -> disable edit and delete if sample is enabled
|
||||
|
||||
$sql = "SELECT type, description
|
||||
FROM sample_var_type";
|
||||
$rd = $db->GetAll($sql);
|
||||
|
||||
$selected = "selected=\"selected\"";
|
||||
$sql = "SELECT sir.var_id,
|
||||
CONCAT('<input type=\"text\" onInput=\"$(this).attr(\'name\',\'var[',sir.var_id,']\');\" value=\"' ,sir.var, '\" required class=\"form-control\" style=\"min-width: 300px;\" $dis />') as var,
|
||||
CONCAT ('<select name=\"type[',sir.var_id,']\" class=\"form-control\" $dis >
|
||||
<option value=\"' ,svt.type, '\" $selected>' ,svt.description, '</option>";
|
||||
$selected = "selected=\"selected\"";
|
||||
|
||||
foreach($rd as $r)
|
||||
{
|
||||
$sql .= "<option value=\"{$r['type']}\">" . T_($r['description']) . "</option>";
|
||||
|
||||
Reference in New Issue
Block a user