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:
@@ -159,7 +159,7 @@ xhtml_head(T_("Assign operators to questionnaires"),true,array("../include/boots
|
|||||||
print "questionnaire_id = new Array(";
|
print "questionnaire_id = new Array(";
|
||||||
|
|
||||||
$s = "";
|
$s = "";
|
||||||
|
$q = array();
|
||||||
foreach($questionnaires as $q)
|
foreach($questionnaires as $q)
|
||||||
{
|
{
|
||||||
$s .= "'{$q['questionnaire_id']}',";
|
$s .= "'{$q['questionnaire_id']}',";
|
||||||
@@ -246,7 +246,7 @@ foreach($questionnaires as $q)
|
|||||||
}
|
}
|
||||||
print "</tr></thead>";
|
print "</tr></thead>";
|
||||||
|
|
||||||
|
$v = array();
|
||||||
foreach($operators as $v)
|
foreach($operators as $v)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -288,17 +288,17 @@ if (isset($_GET['edit']) )
|
|||||||
$sql = "SELECT * FROM sample_import WHERE sample_import_id = $sample_import_id";
|
$sql = "SELECT * FROM sample_import WHERE sample_import_id = $sample_import_id";
|
||||||
$sd = $db->GetRow($sql);
|
$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
|
$sql = "SELECT type, description
|
||||||
FROM sample_var_type";
|
FROM sample_var_type";
|
||||||
$rd = $db->GetAll($sql);
|
$rd = $db->GetAll($sql);
|
||||||
|
$selected = "selected=\"selected\"";
|
||||||
$sql = "SELECT sir.var_id,
|
$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('<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 >
|
CONCAT ('<select name=\"type[',sir.var_id,']\" class=\"form-control\" $dis >
|
||||||
<option value=\"' ,svt.type, '\" $selected>' ,svt.description, '</option>";
|
<option value=\"' ,svt.type, '\" $selected>' ,svt.description, '</option>";
|
||||||
$selected = "selected=\"selected\"";
|
|
||||||
foreach($rd as $r)
|
foreach($rd as $r)
|
||||||
{
|
{
|
||||||
$sql .= "<option value=\"{$r['type']}\">" . T_($r['description']) . "</option>";
|
$sql .= "<option value=\"{$r['type']}\">" . T_($r['description']) . "</option>";
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ function xhtml_foot($javascript = false){ //added javascript files array to the
|
|||||||
*/
|
*/
|
||||||
function xhtml_table($content,$fields,$head = false,$class = "tclass",$highlight=false,$total=false,$id=false,$name=false)
|
function xhtml_table($content,$fields,$head = false,$class = "tclass",$highlight=false,$total=false,$id=false,$name=false)
|
||||||
{
|
{
|
||||||
$tot = array();
|
$tot = array(); $row = array();
|
||||||
if ($class == "tclass") $class = "table-hover table-bordered table-condensed tclass";
|
if ($class == "tclass") $class = "table-hover table-bordered table-condensed tclass";
|
||||||
print "<table class=\"$class\" id=\"$id\" name=\"$name\" data-toggle=\"table\" data-toolbar=\"filter-bar\" data-show-filter=\"true\" >";
|
print "<table class=\"$class\" id=\"$id\" name=\"$name\" data-toggle=\"table\" data-toolbar=\"filter-bar\" data-show-filter=\"true\" >";
|
||||||
if ($head)
|
if ($head)
|
||||||
|
|||||||
Reference in New Issue
Block a user