2
0
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:
Alex
2015-08-13 03:27:02 +03:00
parent 090cb8d534
commit 233823797b
3 changed files with 6 additions and 6 deletions

View File

@@ -159,7 +159,7 @@ xhtml_head(T_("Assign operators to questionnaires"),true,array("../include/boots
print "questionnaire_id = new Array(";
$s = "";
$q = array();
foreach($questionnaires as $q)
{
$s .= "'{$q['questionnaire_id']}',";
@@ -246,7 +246,7 @@ foreach($questionnaires as $q)
}
print "</tr></thead>";
$v = array();
foreach($operators as $v)
{

View File

@@ -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>";

View File

@@ -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)
{
$tot = array();
$tot = array(); $row = array();
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\" >";
if ($head)