📄 set_condition.php
字号:
<?
/* King DeZender(http://www.dezend.org) 2006-03-01 */
include_once 'inc/auth.php';
include_once 'inc/utility_html.php';
echo '
<html>
<head>
<title>条件设置</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function add_condition(flag)
{
var str;
if(document.form1.ITEM_VALUE.value.indexOf("\'")>=0)
{
alert("值中不能含有\'号");
return;
}
str="\'"+document.form1.ITEM_NAME.value+"\'";
str+=document.form1.CONDITION.value;
str+="\'"+document.form1.ITEM_VALUE.value+"\'";
if(flag=="1")
{
if(document.form1.PRCS_IN.value.indexOf(str)<0)
document.form1.PRCS_IN.value+=str+"\\n";
else
alert("条件重复!");
}
else
{
if(document.form1.PRCS_OUT.value.indexOf(str)<0)
document.form1.PRCS_OUT.value+=str+"\\n";
else
alert("条件重复!");
}
}
</script>
</head>
<body class="bodycolor" topmargin="5">
';
$query = 'select * from FLOW_TYPE where FLOW_ID=' . $FLOW_ID;
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$FORM_ID = $ROW['FORM_ID'];
$FLOW_DOC = $ROW['FLOW_DOC'];
}
$query = 'select * from FLOW_PROCESS where FLOW_ID=' . $FLOW_ID . ' and ID=' . $ID;
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$PRCS_IN = $ROW['PRCS_IN'];
$PRCS_OUT = $ROW['PRCS_OUT'];
}
$query = 'select * from FLOW_FORM_TYPE where FORM_ID=' . $FORM_ID;
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$PRINT_MODEL = $ROW['PRINT_MODEL'];
}
$ELEMENT_ARRAY = html_element ($PRINT_MODEL);
$ARRAY_COUNT = sizeof ($ELEMENT_ARRAY);
for ($I = 0; $I < $ARRAY_COUNT; ++$I)
{
$ETITLE = get_attr ($ELEMENT_ARRAY[$I], 'TITLE');
$ECLASS = get_attr ($ELEMENT_ARRAY[$I], 'CLASS');
if ($ECLASS != 'DATE')
{
$ITEM_NAME_ALL .= $ETITLE . ',';
continue;
}
}
$ITEM_NAME_ALL .= '[主办人会签意见],[从办人会签意见],';
$MY_ARRAY = explode (',', $ITEM_NAME_ALL);
$ARRAY_COUNT = sizeof ($MY_ARRAY);
if ($MY_ARRAY[$ARRAY_COUNT - 1] == '')
{
--$ARRAY_COUNT;
}
echo '
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/edit.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3"> 条件设置</span><br>
</td>
</tr>
</table>
<br>
<table border="0" width="600" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
<form action="submit5.php" method="post" name="form1">
<tr>
<td height=30 class="TableHeader"><img src="/images/green_arrow.gif" align="absmiddle"> 条件生成器</td>
</tr>
<tr>
<td class="TableData" align=center><b>
字段 <select name="ITEM_NAME" class="SmallSelect">
';
for ($I = 0; $I < $ARRAY_COUNT; ++$I)
{
echo ' <option value="';
echo $MY_ARRAY[$I];
echo '">';
echo $MY_ARRAY[$I];
echo '</option>
';
}
echo ' </select>
条件 <select name="CONDITION" class="SmallSelect">
<option value="=">等于</option>
<option value=">">大于</option>
<option value="<">小于</option>
<option value=">=">大于等于</option>
<option value="<=">小于等于</option>
<option value="<>">不等于</option>
<option value="include">包含</option>
<option value="exclude">不包含</option>
</select>
值 <input type="text" class="SmallInput" name="ITEM_VALUE" size=20><br><br>
<input type="button" class="BigButton" value="添加到转入条件" onclick="add_condition(1)">
<input type="button" class="BigButton" value="添加到转出条件" onclick="add_condition(2)"><br><br>
</b>
</td>
</tr>
<tr>
<td height=30 class="TableHeader"><img src="/images/green_arrow.gif" align="absmiddle"> 转入条件</td>
</tr>
<tr>
<td class="TableData">
<b>合理设定转入条件,可形成流程的条件分支,但数据满足转入条件,才可转入本步骤</b>
<textarea cols=80 name="PRCS_IN" rows="6" class="BigInput" wrap="yes">';
echo $PRCS_IN;
echo '</textarea><br>
</td>
</tr>
<tr>
<td height=30 class="TableHeader"><img src="/images/green_arrow.gif" align="absmiddle"> 转出条件</td>
</tr>
<tr>
<td class="TableData">
<b>合理设定转出条件,可对表单数据进行校验</b>
<textarea cols=80 name="PRCS_OUT" rows="6" class="BigInput" wrap="yes">';
echo $PRCS_OUT;
echo '</textarea><br>
</td>
</tr>
<tr align="center" class="TableControl">
<td colspan="2" nowrap>
<input type=\'hidden\' value="';
echo $FLOW_ID;
echo '" name="FLOW_ID">
<input type="hidden" value="';
echo $ID;
echo '" name="ID">
<input type=\'hidden\' value="';
echo $GRAPH;
echo '" name="GRAPH">
<input type="submit" value="保 存" class="BigButton" name="submit">
';
if ($GRAPH == 1)
{
echo ' <input type="button" value="关 闭" class="BigButton" name="back" onClick="window.close();">
';
}
else
{
echo ' <input type="button" class="BigButton" value="返 回" onclick="location=\'index.php?FLOW_ID=';
echo $FLOW_ID;
echo '\'">
';
}
echo ' </td>
</tr>
</form>
</table>
</body>
</html>
';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -