Files
web.ems/wxc2_omc/element/sub_inc/saveParameters.php
agtuser 16a3fd1e1b init
2024-11-11 17:56:00 +08:00

58 lines
2.0 KiB
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**************************************************************************************
程序说明:
功能说明判断参数是否保存如果是保存参数并把needSetFlag置1返回到指定的页面;
如果否,直接返回到指定的页面
调用关系:调用: header.inc
被调用:../../element/sub_inc/lib.inc :function checkSaveFunction($saveHref)
变量说明:$saveHref=$backHref+"OBJ:"+"$sysTypeNo&$oidStr&$instanceNo&$newValue"+
"OBJ:"+"$sysTypeNo&$oidStr&$instanceNo&$newValue"+
"OBJ:"+"$sysTypeNo&$oidStr&$instanceNo&$newValue"+
..................................................
"OBJ:"+"$sysTypeNo&$oidStr&$instanceNo&$newValue"+
"OBJ:"+"needSave=";
作者Cui Ticun 2005-12-19
修改注释:
NO.1
姓名:
时间:
修改说明:
****************************************************************************************/
require("../../inc/header.inc");
//echo "saveHref=$saveHref";
//exit();
$varAttributeArr=explode("OBJ:",$saveHref);
if(strstr($varAttributeArr[sizeof($varAttributeArr)-1],"needSave=y")){
$tmpBackHref=$varAttributeArr[0].'&needSetFlag=1';
for($i=1;$i<sizeof($varAttributeArr)-1;$i++){
//echo "<br>var=$varAttributeArr[$i]";
$unitVarAttributeArr=explode("&",($varAttributeArr[$i]));
$tmpSysIdArr = explode("_",$unitVarAttributeArr[0]);
$tmpSysTypeNo = $tmpSysIdArr[0];
$tmpSysNo = $tmpSysIdArr[1];
$tmpSubSysNo = $tmpSysIdArr[2];
$tmpObjDb = 'OBJ_'.$tmpSysTypeNo;
//echo "<br>tmpObjDb=$tmpObjDb";
$tmpParamTable = 'param_'.$tmpSysNo;
$tmpObjWhereStr = getLevelWhere($unitVarAttributeArr[1]);
$tmpUpdatesql = "UPDATE $tmpParamTable SET initValue='$unitVarAttributeArr[3]'
where $tmpObjWhereStr AND instanceNo='$unitVarAttributeArr[2]'";
//echo "<br>$tmpUpdatesql<br>";
//echo "tmpObjDb=$tmpObjDb";
mysqli_query($pubConn,$tmpUpdatesql);
}
}else
$tmpBackHref=$varAttributeArr[0];
?>
<script language='javascript'>;
window.location.href='<?php echo $tmpBackHref; ?>';
</script>;
<?php
exit();
?>