⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 turn_next.php

📁 极限网络智能办公系统 - Office Automation 2.8 100% 源码
💻 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</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\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'];
}
$query = "SELECT * from FLOW_RUN WHERE RUN_ID={$RUN_ID}";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
	$RUN_NAME = $ROW['RUN_NAME'];
}
echo "\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n  <tr>\r\n    <td class=\"Big\"><img src=\"/images/green_arrow.gif\" align=\"absmiddle\">";
echo "<s";
echo "pan class=\"big3\"> 转交下一步骤</span><br>\r\n    </td>\r\n  </tr>\r\n</table>\r\n\r\n<br>\r\n\r\n<form action=\"turn_submit.php\" method=\"post\" name=\"form1\">\r\n<table border=\"0\" cellspacing=\"1\" class=\"small\" bgcolor=\"#000000\" cellpadding=\"3\" align=\"center\" width=\"95%\">\r\n    <tr class=\"TableHeader\">\r\n      <td nowrap  align=\"center\" class=\"Big\" colspan=\"2\"><b>";
echo $FLOW_NAME;
echo "</b></td>\r\n    </tr>\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'];
		$PRCS_FLAG = $ROW['PRCS_FLAG'];
		$query1 = "SELECT * from USER where USER_ID='{$USER_ID}'";
		$cursor1 = exequery( $connection, $query1 );
		if ( $ROW = mysql_fetch_array( $cursor1 ) )
		{
			if ( !find_id( $HISTORY_USER_ID, $USER_ID ) )
			{
				$HISTORY_USER_ID .= $USER_ID.",";
			}
			if ( $PRCS_FLAG != 1 )
			{
				$USER_NAME_STR .= $ROW['USER_NAME'].",";
			}
			else
			{
				$USER_NAME_STR .= "<font color=red title=未接收办理>".$ROW['USER_NAME']."(未接收)</font>,";
			}
		}
	}
	$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=\"TableData\">\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=\"TableHeader\">\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'];
}
$PRCS_TO = str_replace( ",,", ",", $PRCS_TO );
if ( find_id( $PRCS_TO, "0" ) )
{
	if ( $PRCS_TO_CHOOSE == "" )
	{
		$PRCS_TO_CHOOSE = -1;
	}
	echo "       ";
	echo "<s";
	echo "pan style=\"cursor:hand;\" 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 "'\"><input type=\"radio\" name=\"FLOW_PRCS\" value=\"\" ";
	if ( $PRCS_TO_CHOOSE == -1 )
	{
		echo "checked";
	}
	echo "><u>结束流程</u></span>\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_ID_NEXT = $PRCS_ID_TO;
				$PRCS_USER = $ROW['PRCS_USER'];
				$PRCS_DEPT = $ROW['PRCS_DEPT'];
				$PRCS_PRIV = $ROW['PRCS_PRIV'];
			}
			echo "         ";
			echo "<s";
			echo "pan style=\"cursor:hand;\" 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 "'\"><input type=\"radio\" name=\"FLOW_PRCS\" value=\"";
			echo $PRCS_ID_TO;
			echo "\" ";
			if ( $PRCS_TO_CHOOSE == $I )
			{
				echo "checked";
			}
			echo "><u>";
			echo $PRCS_NAME;
			echo "</u></span>\r\n";
		}
	}
}
echo "     </td>\r\n    </tr>\r\n";
if ( $PRCS_TO_CHOOSE != -1 )
{
	echo "    <tr class=\"TableHeader\">\r\n      <td colspan=\"2\"><b>指定经办人,主办人:</b>\r\n      <input type=\"text\" name=\"PRCS_OP_USER_NAME\" value=\"";
	echo $PRCS_OP_USER_NAME;
	echo "\" size=\"10\" class=\"SmallStatic\" readonly>&nbsp;\r\n      <input type=\"hidden\" name=\"PRCS_OP_USER\" value=\"";
	echo $PRCS_OP_USER;
	echo "\">\r\n      </td>\r\n    </tr>\r\n    <tr class=\"TableData\">\r\n      <td colspan=\"2\">\r\n";
	if ( $PRCS_USER == "" && $PRCS_DEPT == "" && $PRCS_PRIV == "" )
	{
		message( "提示", "管理员尚未指定下一步骤的经办权限,请与管理员联系!" );
	}
	else
	{
		echo "        <input type=\"hidden\" name=\"PRCS_USER\" value=\"\">\r\n        <textarea cols=60 name=\"PRCS_USER_NAME\" rows=\"3\" class=\"BigStatic\" wrap=\"yes\" readonly>";
		echo $PRCS_USER_NAME;
		echo "</textarea>\r\n        &nbsp;<input type=\"button\" value=\"选 择\" class=\"SmallButton\" onClick=\"LoadWindow()\" title=\"选择经办人和主办人\" name=\"button\">\r\n        &nbsp;<input type=\"button\" value=\"清 空\" class=\"SmallButton\" onClick=\"clear_user()\" title=\"清空经办人和主办人\" name=\"button\">\r\n        <br>\r\n        <input type=\"checkbox\" name=\"TOP_FLAG\" id=\"TOP_FLAG\"><label for=\"TOP_FLAG\">仅由首先接收办理的经办人办";
		echo "理,可以不指定主办人</label>\r\n        <br><br><font color=red>注意:仅允许主办人编辑表单正文、公共附件和转交流程,主办人是指某一步骤的负责人</font>\r\n";
	}
	echo "     </td>\r\n    </tr>\r\n    <tr class=\"TableHeader\">\r\n      <td colspan=\"2\"><b>短信提醒</b></td>\r\n    </tr>\r\n    <tr class=\"TableData\">\r\n      <td colspan=\"2\">\r\n        <input type=\"checkbox\" name=\"SMS_REMIND\" id=\"SMS_REMIND\" ";
	if ( $SMS_REMIND == "1" || $SMS_REMIND == "" )
	{
		echo "checked";
	}
	echo "><label for=\"SMS_REMIND\">使用内部短信提醒经办人</label>\r\n";
	$query = "select * from SMS2_PRIV";
	$cursor = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$TYPE_PRIV = $ROW['TYPE_PRIV'];
	}
	if ( find_id( $TYPE_PRIV, 7 ) )
	{
		echo "        <input type=\"checkbox\" name=\"SMS2_REMIND\" id=\"SMS2_REMIND\"><label for=\"SMS2_REMIND\">使用手机短信提醒经办人</label>\r\n";
	}
	$SMS_CONTENT = "工作流提醒:".$RUN_NAME;
	echo "<br>\r\n短信内容:<input type=\"text\" name=\"SMS_CONTENT\" value=\"";
	echo $SMS_CONTENT;
	echo "\" size=\"62\" maxlength=\"100\" class=\"SmallInput\">\r\n     </td>\r\n    </tr>\r\n";
}
echo "    <tr class=\"TableControl\">\r\n      <td nowrap align=\"center\" colspan=\"2\">\r\n        <input type=\"hidden\" name=\"RUN_ID\" value=\"";
echo $RUN_ID;
echo "\">\r\n        <input type=\"hidden\" name=\"FLOW_ID\" value=\"";
echo $FLOW_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=\"button\" name=\"mybutton\" value=\"";
if ( $PRCS_TO_CHOOSE == -1 )
{
	echo "结束流程";
}
else
{
	echo "转交下一步骤";
}
echo "\" class=\"BigButton\" onClick=\"CheckForm();\">&nbsp;&nbsp;\r\n        <input type=\"button\" value=\"返回\" class=\"BigButton\" name=\"back\" onClick=\"location='";
if ( $OP == "MANAGE" )
{
	echo "../manage.php";
}
else
{
	echo "../work_list.php";
}
echo "'\">\r\n      </td>\r\n    </tr>\r\n</table>\r\n</form>\r\n\r\n";
echo "<s";
echo "cript>\r\nfunction LoadWindow()\r\n{\r\n  URL=\"user_select?FLOW_ID=";
echo $FLOW_ID;
echo "&RUN_ID=";
echo $RUN_ID;
echo "&PRCS_ID=";
echo $PRCS_ID;
echo "&PRCS_ID_NEXT=";
echo $PRCS_ID_NEXT;
echo "\";\r\n  loc_x=document.body.scrollLeft+event.clientX-event.offsetX-100;\r\n  loc_y=document.body.scrollTop+event.clientY-event.offsetY+100;\r\n  window.showModalDialog(URL,self,\"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:350px;dialogHeight:300px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\");\r\n}\r\n\r\nfunction clear_user()\r\n{\r\n  document.form1.PRCS_USER_NAME.value=\"\";\r\n  document.form1.PR";
echo "CS_USER.value=\"\";\r\n  document.form1.PRCS_OP_USER.value=\"\";\r\n  document.form1.PRCS_OP_USER_NAME.value=\"\";\r\n}\r\n\r\nfunction CheckForm()\r\n{\r\n";
if ( $PRCS_TO_CHOOSE == -1 )
{
	echo "    msg='确认要结束流程么?';\r\n    if(window.confirm(msg))\r\n    {\r\n      document.form1.mybutton.disabled=true;\r\n      document.form1.submit();\r\n      return (true);\r\n    }\r\n";
}
else
{
	echo "    if(document.form1.SMS_CONTENT.value==\"\" && (document.form1.SMS_REMIND.checked || document.form1.SMS2_REMIND.checked))\r\n    {\r\n       alert(\"短信内容不能为空!\");\r\n       return(false);\r\n    }\r\n    if(document.form1.PRCS_USER.value==\"\")\r\n    {\r\n       alert(\"请至少选择一个经办人!\");\r\n       return(false);\r\n    }\r\n    else if(document.form1.PRCS_OP_USER.value==\"\" && !document.form1.TOP_FLAG.che";
	echo "cked)\r\n    {\r\n       alert(\"请指定主办人!\");\r\n       return(false);\r\n    }\r\n    else\r\n    {\r\n      document.form1.mybutton.disabled=true;\r\n      document.form1.submit();\r\n      return (true);\r\n    }\r\n";
}
echo "}\r\n</script>\r\n</body>\r\n</html>\r\n";
?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -