Incorporate changes made for old version 5.2.4.2
This commit is contained in:
@@ -146,10 +146,8 @@ if ($mfadd) {
|
||||
}
|
||||
// remove cruft from malfunction text
|
||||
$mfmalfunction=htmlentities($mfmalfunction);
|
||||
if (!get_magic_quotes_gpc()) {
|
||||
$mfmalfunction=addslashes($mfmalfunction);
|
||||
}
|
||||
|
||||
$mfmalfunction=addslashes($mfmalfunction);
|
||||
|
||||
if ($mfauthorized) {
|
||||
$partdatainput=array();
|
||||
if ($uid) $partdatainput['uid']=$uid;
|
||||
@@ -170,6 +168,8 @@ if ($mfadd) {
|
||||
if ($uid =="" || $partnum == "" || $sernum == "") {
|
||||
// have the maintenance form stay pending due to incomplete part data
|
||||
$pending=1;
|
||||
} else {
|
||||
$pending=0;
|
||||
}
|
||||
|
||||
// add the record to maintforms
|
||||
@@ -195,13 +195,14 @@ if ($mfedit) {
|
||||
if ($mfmalfunction && ($uid || ($partnum && $sernum))) {
|
||||
// remove cruft from malfunction text
|
||||
$mfmalfunction=htmlentities($mfmalfunction);
|
||||
if (!get_magic_quotes_gpc()) {
|
||||
$mfmalfunction=addslashes($mfmalfunction);
|
||||
}
|
||||
$mfmalfunction=addslashes($mfmalfunction);
|
||||
|
||||
// update parts table
|
||||
if ($uid =="" || $partnum == "" || $sernum == "") {
|
||||
// have the maintenance form stay pending due to incomplete part data
|
||||
$pending=1;
|
||||
} else {
|
||||
$pending=0;
|
||||
}
|
||||
if (! $pdatamismatch) {
|
||||
mysqli_query($db,"update parts set uid=\"$uid\", partnum=\"$partnum\", sernum=\"$sernum\", partname=\"$partname\" where partid=\"$mfpart\"");
|
||||
@@ -215,6 +216,7 @@ if ($mfedit) {
|
||||
$flagids=mysqli_query($db,"select flagid from flags");
|
||||
while ($thisflagid=mysqli_fetch_row($flagids)) {
|
||||
$thisflag_tbl="flag_".$thisflagid[0];
|
||||
if ($flags[0]=="") $flags=[];
|
||||
if (in_array($thisflagid[0],$flags)) {
|
||||
if(!mysqli_num_rows(mysqli_query($db,"select id from $thisflag_tbl where target=\"maintforms\" and id=\"$maintformid\""))) {
|
||||
mysqli_query($db,"insert into $thisflag_tbl(target,id) values(\"maintforms\",\"$maintformid\")");
|
||||
@@ -256,10 +258,8 @@ if ($actionadd) {
|
||||
}
|
||||
// remove cruft from action text
|
||||
$action=htmlentities($action);
|
||||
if (!get_magic_quotes_gpc()) {
|
||||
$action=addslashes($action);
|
||||
}
|
||||
|
||||
$action=addslashes($action);
|
||||
|
||||
// add to maintactions table
|
||||
mysqli_query($db,"insert into maintactions (actiondate,actiontime,maintformnum,actiontech,action)
|
||||
values (\"$actiondate\",\"$actiontime\",\"$maintformid\",\"$loggedinas\",\"$action\")");
|
||||
@@ -273,9 +273,8 @@ if ($actionedit) {
|
||||
// update the action
|
||||
// remove cruft from action text
|
||||
$action=htmlentities($action);
|
||||
if (!get_magic_quotes_gpc()) {
|
||||
$action=addslashes($action);
|
||||
}
|
||||
$action=addslashes($action);
|
||||
|
||||
// update maintactions table
|
||||
mysqli_query($db,"update maintactions set actiondate=\"$actiondate\", actiontime=\"$actiontime\", action=\"$action\" where maintactionid=\"$maintactionid\"");
|
||||
}
|
||||
@@ -399,6 +398,7 @@ if ($printfmt) {
|
||||
}
|
||||
$flagslist=mysqli_query($db,"select * from flags");
|
||||
while ($flagsymbol=mysqli_fetch_assoc($flagslist)) {
|
||||
if ($theseflags[0]=="") $theseflags=[];
|
||||
if (in_array($flagsymbol["flagid"],$theseflags)) {
|
||||
echo $flagsymbol['flagsym']." ";
|
||||
}
|
||||
@@ -491,6 +491,7 @@ if ($printfmt) {
|
||||
$flagsperline=8;
|
||||
$flagcount=1;
|
||||
while ($flagcheckbox=mysqli_fetch_assoc($flagslist)) {
|
||||
if ($theseflags[0]=="") $theseflags=[];
|
||||
if (in_array($flagcheckbox["flagid"],$theseflags)) {
|
||||
printf("<input type=\"checkbox\" name=\"flags[]\" value=\"%s\" checked><font color=\"%s\" title=\"%s\">%s</font>",
|
||||
$flagcheckbox["flagid"],$flagcheckbox["flagcolor"],$flagcheckbox["flagname"],$flagcheckbox["flagsym"]);
|
||||
|
||||
Reference in New Issue
Block a user