📄 turn_next.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "../prcs_role.php" );
include_once( "inc/utility_all.php" );
if ( !run_role( $RUN_ID, $PRCS_ID ) )
{
exit( );
}
echo "\r\n<html>\r\n<head>\r\n<title>工作办结</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n";
echo "<s";
echo "cript>\r\nfunction func_find(select_obj,option_value)\r\n{\r\n for (j=0; j";
echo "<s";
echo "elect_obj.options.length; j++)\r\n {\r\n if(select_obj.options(j).value==option_value)\r\n return j;\r\n }\r\n\r\n return -1;\r\n}\r\n\r\nfunction ref_op_user(el,user_name)\r\n{\r\n if(el.checked)\r\n {\r\n pos=func_find(document.form1.PRCS_OP_USER,el.value);\r\n if(pos<0)\r\n {\r\n var my_option = document.createElement(\"OPTION\");\r\n my_option.text=user_name;\r\n my_option.value=e";
echo "l.value;\r\n document.form1.PRCS_OP_USER.add(my_option,document.form1.PRCS_OP_USER.length);\r\n }\r\n else\r\n el.checked=false;\r\n }\r\n else\r\n {\r\n pos=func_find(document.form1.PRCS_OP_USER,el.value);\r\n if(pos>=0)\r\n {\r\n document.form1.PRCS_OP_USER.remove(pos);\r\n document.form1.PRCS_OP_USER.seletedIndex=0;\r\n }\r\n }\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bod";
echo "ycolor\" topmargin=\"5\">\r\n";
$query = "SELECT * from FLOW_TYPE WHERE FLOW_ID={$FLOW_ID}";
$cursor1 = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$FLOW_NAME = $ROW['FLOW_NAME'];
$FORM_ID = $ROW['FORM_ID'];
}
echo "<form action=\"turn_submit.php\" method=\"post\" name=\"form1\" onSubmit=\"return CheckForm()\">\r\n<table border=\"0\" width=\"100%\" cellspacing=\"1\" class=\"small\" cellpadding=\"5\">\r\n <tr class=\"tablehead1\">\r\n <td >";
echo $FLOW_NAME;
echo " </td>\r\n </tr>\r\n <tr class=\"tablehead2\"><td><input type=\"image\" src=\"/images/button/";
if ( $PRCS_TO_CHOOSE == -1 )
{
echo "workflowover.gif";
}
else
{
echo "turnnext.gif";
}
echo "\" border=\"0\" title=\"转交下一步骤\"> \r\n <a href=\"#\" onClick=\"location='";
if ( $OP == "MANAGE" )
{
echo "../manage.php";
}
else
{
echo "../work_list.php";
}
echo "'\" title=\"返回\"><img src=\"/images/button/return.gif\" border=\"0\"></a></td></tr>\r\n</table>\r\n<table border=\"0\" width=\"100%\">\r\n<tr height=\"5\"><td></td></tr>\r\n</table>\r\n\r\n\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n <td ><img src=\"/images/green_arrow.gif\" align=\"absmiddle\"> 转交下一步骤(";
echo $FLOW_NAME;
echo ")\r\n </td>\r\n </tr>\r\n</table>\r\n<table border=\"0\" cellspacing=\"1\" class=\"small\" cellpadding=\"5\" align=\"center\" width=\"100%\">\r\n\r\n";
$query = "SELECT MAX(PRCS_ID) from FLOW_PROCESS WHERE FLOW_ID={$FLOW_ID}";
$PRCS_MAX = 0;
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$PRCS_MAX = $ROW[0];
}
$PRCS_ID_I = 1;
for ( ; $PRCS_ID_I <= $PRCS_ID; ++$PRCS_ID_I )
{
$query = "SELECT * from FLOW_RUN_PRCS where RUN_ID={$RUN_ID} and PRCS_ID={$PRCS_ID_I}";
$cursor = exequery( $connection, $query );
$USER_NAME_STR = "";
while ( $ROW = mysql_fetch_array( $cursor ) )
{
$USER_ID = $ROW['USER_ID'];
$FLOW_PRCS = $ROW['FLOW_PRCS'];
$query1 = "SELECT * from USER where USER_ID='{$USER_ID}'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$USER_NAME_STR .= $ROW['USER_NAME'].",";
}
}
$query1 = "SELECT * from FLOW_PROCESS WHERE FLOW_ID={$FLOW_ID} and PRCS_ID={$FLOW_PRCS}";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$PRCS_NAME = $ROW['PRCS_NAME'];
}
$USER_NAME_STR = substr( $USER_NAME_STR, 0, strlen( $USER_NAME_STR ) - 1 );
echo " <tr class=\"TableLine1\">\r\n <td nowrap width=\"10%\">第<b>";
echo "<s";
echo "pan class=big4>";
echo $PRCS_ID_I;
echo "</span></b>步:";
echo $PRCS_NAME;
echo " ";
if ( $PRCS_ID_I == $PRCS_ID )
{
echo "(当前步骤)";
}
echo " </td>\r\n <td>";
echo $USER_NAME_STR;
echo "</td>\r\n </tr>\r\n";
}
$PRCS_NEXT = $PRCS_ID + 1;
echo " <tr class=\"TableLine2\">\r\n <td colspan=2><b>请选择下一步骤</b></td>\r\n </tr>\r\n <tr class=\"TableData\">\r\n <td colspan=2>\r\n";
$query1 = "SELECT * from FLOW_PROCESS where FLOW_ID={$FLOW_ID} and PRCS_ID={$FLOW_PRCS}";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$PRCS_TO = $ROW['PRCS_TO'];
}
if ( $FLOW_PRCS == $PRCS_MAX )
{
if ( $PRCS_TO_CHOOSE == "" )
{
$PRCS_TO_CHOOSE = -1;
}
echo " <input type=\"radio\" name=\"FLOW_PRCS\" value=\"\" ";
if ( $PRCS_TO_CHOOSE == -1 )
{
echo "checked";
}
echo " onClick=\"location='turn_next.php?RUN_ID=";
echo $RUN_ID;
echo "&FLOW_ID=";
echo $FLOW_ID;
echo "&PRCS_ID=";
echo $PRCS_ID;
echo "&OP=";
echo $OP;
echo "'\">结束流程\r\n";
}
if ( $PRCS_TO == "" && $FLOW_PRCS != $PRCS_MAX )
{
$PRCS_TO = $FLOW_PRCS + 1;
}
if ( $PRCS_TO != "" )
{
$MY_ARRAY = explode( ",", $PRCS_TO );
$ARRAY_COUNT = sizeof( $MY_ARRAY );
if ( $MY_ARRAY[$ARRAY_COUNT - 1] == "" )
{
--$ARRAY_COUNT;
}
if ( $PRCS_TO_CHOOSE == "" )
{
$PRCS_TO_CHOOSE = 0;
}
$I = 0;
for ( ; $I < $ARRAY_COUNT; ++$I )
{
$query1 = "SELECT * from FLOW_PROCESS where FLOW_ID={$FLOW_ID} and PRCS_ID={$MY_ARRAY[$I]}";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$PRCS_ID_TO = $ROW['PRCS_ID'];
$PRCS_NAME = $ROW['PRCS_NAME'];
if ( $PRCS_TO_CHOOSE == $I )
{
$PRCS_USER = $ROW['PRCS_USER'];
$PRCS_DEPT = $ROW['PRCS_DEPT'];
$PRCS_PRIV = $ROW['PRCS_PRIV'];
}
}
echo " <input type=\"radio\" name=\"FLOW_PRCS\" value=\"";
echo $PRCS_ID_TO;
echo "\" ";
if ( $PRCS_TO_CHOOSE == $I )
{
echo "checked";
}
echo " onClick=\"location='turn_next.php?RUN_ID=";
echo $RUN_ID;
echo "&FLOW_ID=";
echo $FLOW_ID;
echo "&PRCS_ID=";
echo $PRCS_ID;
echo "&PRCS_TO_CHOOSE=";
echo $I;
echo "&OP=";
echo $OP;
echo "'\">";
echo $PRCS_NAME;
}
}
echo " </td>\r\n </tr>\r\n";
if ( $PRCS_TO_CHOOSE != -1 )
{
echo " <tr class=\"TableLine1\">\r\n <td colspan=\"2\"><b>请指定下一步骤的经办人 - 按经办权限来源分类</b></td>\r\n </tr>\r\n <tr class=\"TableData\">\r\n <td colspan=\"2\">\r\n";
if ( $PRCS_USER != "" )
{
echo "经办人员:";
$MY_ARRAY = explode( ",", $PRCS_USER );
$ARRAY_COUNT = sizeof( $MY_ARRAY );
if ( $MY_ARRAY[$ARRAY_COUNT - 1] == "" )
{
--$ARRAY_COUNT;
}
$I = 0;
for ( ; $I < $ARRAY_COUNT; ++$I )
{
$query1 = "SELECT * from USER where USER_ID='{$MY_ARRAY[$I]}'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$USER_NAME = $ROW['USER_NAME'];
$DEPT_ID = $ROW['DEPT_ID'];
$DEPT_NAME = dept_long_name( $DEPT_ID );
}
echo " <input type=\"checkbox\" name=\"USER_ID\" value=\"";
echo $MY_ARRAY[$I];
echo "\" onClick=\"ref_op_user(this,'";
echo $USER_NAME;
echo "')\"><u title=\"部门:";
echo $DEPT_NAME;
echo "\" style=\"cursor:hand\">";
echo $USER_NAME;
echo "</u>\r\n";
}
echo "<br>";
}
if ( $PRCS_DEPT != "" )
{
echo "经办部门:";
$PRCS_DEPT = substr( $PRCS_DEPT, 0, strlen( $PRCS_DEPT ) - 1 );
$query1 = "SELECT * from USER,USER_PRIV WHERE USER.USER_PRIV=USER_PRIV.USER_PRIV and DEPT_ID in({$PRCS_DEPT}) order by PRIV_NO,USER_NAME";
$cursor1 = exequery( $connection, $query1 );
while ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$USER_ID = $ROW['USER_ID'];
$USER_NAME = $ROW['USER_NAME'];
$DEPT_ID = $ROW['DEPT_ID'];
$DEPT_NAME = dept_long_name( $DEPT_ID );
echo " <input type=\"checkbox\" name=\"USER_ID\" value=\"";
echo $USER_ID;
echo "\" onClick=\"ref_op_user(this,'";
echo $USER_NAME;
echo "')\"><u title=\"部门:";
echo $DEPT_NAME;
echo "\" style=\"cursor:hand\">";
echo $USER_NAME;
echo "</u>\r\n";
}
echo "<br>";
}
if ( $PRCS_PRIV != "" )
{
echo "经办角色:";
$PRCS_PRIV = substr( $PRCS_PRIV, 0, strlen( $PRCS_PRIV ) - 1 );
$query1 = "SELECT * from USER,USER_PRIV WHERE USER.USER_PRIV=USER_PRIV.USER_PRIV and USER.USER_PRIV in({$PRCS_PRIV}) order by PRIV_NO,USER_NAME";
$cursor1 = exequery( $connection, $query1 );
while ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$USER_ID = $ROW['USER_ID'];
$USER_NAME = $ROW['USER_NAME'];
$DEPT_ID = $ROW['DEPT_ID'];
$DEPT_NAME = dept_long_name( $DEPT_ID );
echo " <input type=\"checkbox\" name=\"USER_ID\" value=\"";
echo $USER_ID;
echo "\" onClick=\"ref_op_user(this,'";
echo $USER_NAME;
echo "')\"><u title=\"部门:";
echo $DEPT_NAME;
echo "\" style=\"cursor:hand\">";
echo $USER_NAME;
echo "</u>\r\n";
}
echo "<br>";
}
if ( $PRCS_USER == "" && $PRCS_DEPT == "" && $PRCS_PRIV == "" )
{
message( "提示", "管理员尚未指定下一步骤的经办权限,请与管理员联系!" );
}
echo " </td>\r\n </tr>\r\n <tr class=\"TableLine2\">\r\n <td colspan=\"2\"><b>指定主办人:</b>\r\n ";
echo "<s";
echo "elect name=\"PRCS_OP_USER\" style=\"width:80pt\"></select> \r\n 只有主办人可以编辑表单的正文信息和公共附件,以及进行流程转交\r\n </td>\r\n </tr>\r\n";
}
echo " \r\n <input type=\"hidden\" name=\"RUN_ID\" value=\"";
echo $RUN_ID;
echo "\">\r\n <input type=\"hidden\" name=\"OP\" value=\"";
echo $OP;
echo "\">\r\n <input type=\"hidden\" name=\"PRCS_ID\" value=\"";
echo $PRCS_ID;
echo "\">\r\n <input type=\"hidden\" name=\"PRCS_USER\" value=\"";
echo $PRCS_USER;
echo "\">\r\n \r\n\t\r\n</table>\r\n";
if ( !( $FLOW_PRCS == $PRCS_MAX ) )
{
echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n ";
if ( ifsendmbsms( ) )
{
echo " <tr class=\"small\" id=\"mbremind\">\r\n <td width=\"20%\" nowrap class=\"TableLine1\">手机短信提醒:</td>\r\n <td class=\"TableLine1\"><input type=\"checkbox\" name=\"MOBILE_SMS_REMIND\" onClick=\"ShowMbSmsContent();\" value=\"1\"></td>\r\n </tr>\r\n <tr class=\"small\" id=\"mbcontent\">\r\n <td nowrap class=\"TableLine1\">手机短信内容:</td>\r\n <td class=\"TableLine1\"><textarea cols=30 name=\"mobilect\" rows=3 class=\"BigInput\" wra";
echo "p=\"on\" onpaste=\"return checkStrLength();\" onKeyUp=\"return checkStrLength();\">\r\n </textarea>\r\n <input type=\"button\" name=\"签名\" value=\"签名\" class=\"SmallButton\" onClick=\"getUserName();\"></td>\r\n </tr>\r\n ";
}
echo "</table>\r\n";
}
echo "</form>\r\n\r\n";
echo "<s";
echo "cript>\r\nfunction CheckForm()\r\n{\r\n";
if ( $PRCS_TO_CHOOSE == -1 )
{
echo " return (true);\r\n";
}
else
{
echo " PRCS_USER_STR=\"\";\r\n for (i=0; i< document.form1.PRCS_OP_USER.options.length; i++)\r\n {\r\n options_value=document.form1.PRCS_OP_USER.options(i).value;\r\n PRCS_USER_STR+=options_value+\",\";\r\n }\r\n \r\n if(PRCS_USER_STR==\"\")\r\n {\r\n alert(\"请至少选择一个经办人!\");\r\n return(false);\r\n }\r\n else\r\n {\r\n document.form1.PRCS_USER.value=PRCS_USER_STR;\r\n re";
echo "turn (true);\r\n }\r\n";
}
echo "}\r\n</script>\r\n</body>\r\n</html>\r\n";
echo "<s";
echo "cript>\r\nvar strmax=60;\r\nvar smstype = \"待办流程\";\r\nfunction ShowMbSmsContent(){\r\n cc = document.getElementById('MOBILE_SMS_REMIND');\r\n ck = document.getElementById('mbcontent');\r\n if (cc.checked == true){\r\n ck.style.display = '';\r\n\t\tgetMbc();\r\n\t}\r\n\telse{\r\n\t ck.style.display = 'none';\r\n\t}\r\n}\r\n";
if ( ifsendmbsms( ) && !( $FLOW_PRCS == $PRCS_MAX ) )
{
echo "document.getElementById('mbcontent').style.display = 'none';\r\n";
}
echo "\r\n\r\nfunction checkStrLength()\r\n{ \r\n mbc = document.getElementById('mobilect');\r\n\tif (mbc.value.length > strmax){\r\n\t mbc.value = mbc.value.substr(0,strmax);\r\n\t}\r\n \r\n}\r\n\r\nfunction getMbc(){\r\n suj = \"";
echo $FLOW_NAME;
echo "\";\r\n\tmbc = document.getElementById('mobilect');\r\n mbc.value = smstype+\"-\"+suj;\r\n\tif (mbc.value.length > strmax){\r\n\t mbc.value = mbc.value.substr(0,strmax);\r\n\t}\r\n}\r\n\r\nfunction getUserName()\r\n{\r\n mbc = document.getElementById('mobilect');\r\n mbc.value+=\"--";
echo $_SESSION['LOGIN_USER_NAME'];
echo "\";\r\n checkStrLength();\r\n mbc.focus();\r\n}\r\n\r\n</script>\r\n";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -