📄 edit.php
字号:
<?
include_once 'inc/auth.php';
if (($ID != ''))
{
$TITLE = '编辑流程步骤 - 基本属性';
}
else
{
$TITLE = '新建流程步骤';
}
echo '
<html>
<head>
<title>';
echo $TITLE;
echo '</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
echo '<S';
echo 'CRIPT language=javascript>
function func_insert()
{
for (i=0; i<form1.select2.options.length; i++)
{
if(form1.select2.options(i).selected)
{
option_text=form1.select2.options(i).text;
option_value=form1.select2.options(i).value;
option_style_color=form1.select2.options(i).style.color;
var my_option = document.createElement("OPTION");
my_option.text=opti';
echo 'on_text;
my_option.value=option_value;
my_option.style.color=option_style_color;
pos=form1.select2.options.length;
form1.select1.add(my_option,pos);
form1.select2.remove(i);
i--;
}
}//for
}
function func_delete()
{
for (i=0;i<form1.select1.options.length;i++)
{
if(form1.select1.options(i).selected)
{
option_text=form1.select1.options';
echo '(i).text;
option_value=form1.select1.options(i).value;
var my_option = document.createElement("OPTION");
my_option.text=option_text;
my_option.value=option_value;
pos=form1.select2.options.length;
form1.select2.add(my_option,pos);
form1.select1.remove(i);
i--;
}
}//for
}
function func_select_all1()
{
for (i=form1.select1.options.lengt';
echo 'h-1; i>=0; i--)
form1.select1.options(i).selected=true;
}
function func_select_all2()
{
for (i=form1.select2.options.length-1; i>=0; i--)
form1.select2.options(i).selected=true;
}
function func_up()
{
sel_count=0;
for (i=form1.select1.options.length-1; i>=0; i--)
{
if(form1.select1.options(i).selected)
sel_count++;
}
if(sel_count==0)
{
ale';
echo 'rt("调整步骤的顺序时,请选择其中一项!");
return;
}
else if(sel_count>1)
{
alert("调整步骤的顺序时,只能选择其中一项!");
return;
}
i=form1.select1.selectedIndex;
if(i!=0)
{
var my_option = document.createElement("OPTION");
my_option.text=form1.select1.options(i).text;
my_option.value=form1.select1.options(i).value;
form1.select1.add';
echo '(my_option,i-1);
form1.select1.remove(i+1);
form1.select1.options(i-1).selected=true;
}
}
function func_down()
{
sel_count=0;
for (i=form1.select1.options.length-1; i>=0; i--)
{
if(form1.select1.options(i).selected)
sel_count++;
}
if(sel_count==0)
{
alert("调整步骤的顺序时,请选择其中一项!");
return;
}
else if(sel_count>1)
{
';
echo '
alert("调整步骤的顺序时,只能选择其中一项!");
return;
}
i=form1.select1.selectedIndex;
if(i!=form1.select1.options.length-1)
{
var my_option = document.createElement("OPTION");
my_option.text=form1.select1.options(i).text;
my_option.value=form1.select1.options(i).value;
form1.select1.add(my_option,i+2);
form1.select1.remove(i);
form1.sel';
echo 'ect1.options(i+1).selected=true;
}
}
function check_form()
{
if(document.form1.PRCS_NAME.value == "")
{
alert("步骤名称不能为空!");
return false;
}
fld_str="";
for (i=0; i< form1.select1.options.length; i++)
{
options_value=form1.select1.options(i).value;
fld_str+=options_value+",";
}
document.form1.PRCS_TO.value=fld_str;
return true;
';
echo '}
function LoadWindow()
{
URL="user_select?ID=';
echo $ID;
echo '";
loc_x=document.body.scrollLeft+event.clientX-event.offsetX;
loc_y=document.body.scrollTop+event.clientY-event.offsetY;
window.showModalDialog(URL,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:380px;dialogHeight:350px;dialogTop:"+loc_y+"px;dialogLeft:"+loc_x+"px");
}
function ViewWindow(URL)
{
loc_x=(screen.availWidth-700)/2+20;
loc_y=(screen.availHeight-';
echo '550)/2+30;
URL+="&GRAPH=1";
window.open(URL,"","height=550,width=700,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,top="+loc_y+",left="+loc_x+",resizable=yes");
}
function clear_user()
{
document.form1.AUTO_USER.value="";
document.form1.AUTO_USER_NAME.value="";
document.form1.AUTO_USER_OP.value="";
document.form1.AUTO_USER_OP_NAME.value="";
}
function auto_se';
echo 't()
{
if(document.form1.AUTO_TYPE.value=="3")
auto_user_set.style.display="";
else
auto_user_set.style.display="none";
}
function myload()
{
auto_set();
document.form1.PRCS_NAME.focus();
}
function plugin_view()
{
if(plugin_text.style.display==\'\')
plugin_text.style.display=\'none\';
else
plugin_text.style.display=\'\';
}
</SCRIPT>
</head>
<bod';
echo 'y class="bodycolor" topmargin="5" onload="myload();">
<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">';
echo '<s';
echo 'pan class="big3"> ';
echo $TITLE;
echo '</span><br>
</td>
</tr>
</table>
';
if (($ID != ''))
{
$query = ((''.'SELECT * from FLOW_PROCESS where ID=').$ID);
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$PRCS_ID = $ROW['PRCS_ID'];
$PRCS_NAME = $ROW['PRCS_NAME'];
$PRCS_TO = $ROW['PRCS_TO'];
$PLUGIN = $ROW['PLUGIN'];
$FEEDBACK = $ROW['FEEDBACK'];
$AUTO_TYPE = $ROW['AUTO_TYPE'];
$AUTO_USER_OP = $ROW['AUTO_USER_OP'];
$AUTO_USER = $ROW['AUTO_USER'];
$USER_FILTER = $ROW['USER_FILTER'];
$TIME_OUT = $ROW['TIME_OUT'];
}
}
else
{
$query = ((''.'SELECT max(PRCS_ID) from FLOW_PROCESS WHERE FLOW_ID=').$FLOW_ID);
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$PRCS_ID = ($ROW[0] + 1);
}
}
if (($AUTO_USER_OP != ''))
{
$query = (((''.'SELECT * from USER where USER_ID=\'').$AUTO_USER_OP).'\'');
$cursor = exequery ($connection, $query);
if ($ROW = mysql_fetch_array ($cursor))
{
$AUTO_USER_OP_NAME = $ROW['USER_NAME'];
}
}
if (($AUTO_USER != ''))
{
$query = (((''.'SELECT * from USER where find_in_set(USER_ID,\'').$AUTO_USER).'\')');
$cursor = exequery ($connection, $query);
while ($ROW = mysql_fetch_array ($cursor))
{
$USER_NAME = $ROW['USER_NAME'];
($AUTO_USER_NAME .= ($ROW['USER_NAME'].','));
}
}
echo '
<table border="0" width="90%" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
<form action="';
if (($ID != ''))
{
echo 'update';
}
else
{
echo 'insert';
}
echo '.php" method="post" name="form1" onSubmit="return check_form();">
<tr>
<td nowrap class="TableContent">序号:</td>
<td class="TableData">
<input type="text" name="PRCS_ID" size="2" maxlength="10" class="BigInput" value="';
echo $PRCS_ID;
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableContent">步骤名称:</td>
<td class="TableData">
<input type="text" name="PRCS_NAME" size="30" maxlength="100" class="BigInput" value="';
echo $PRCS_NAME;
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableContent">下一步骤:</td>
<td class="TableData">
可以选择多个分支步骤,如不选择,则系统自动按顺序寻找下一步骤<br>
<table width="500" border="1" cellspacing="0" cellpadding="3" bordercolorlight="#000000" bordercolordark="#FFFFFF" class="big">
<tr bgcolor="#CCCCCC">
<td align="center">排序</td>
<td align="center"><b>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -