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

📄 turn_next.php

📁 通达网络办公 - Office Anywhere 2008 增强版100%源码(3.4.081216) 内含 通达OA2008增強版接近完美破解补丁20081216集 及 最新通达OA2008ADV(
💻 PHP
📖 第 1 页 / 共 3 页
字号:
<?php

include_once( "inc/auth.php" );
include_once( "../../prcs_role.php" );
include_once( "inc/utility.php" );
include_once( "inc/utility_all.php" );
include_once( "condition.php" );
$RUN_ROLE = run_role( $RUN_ID, $PRCS_ID );
if ( $TOP_FLAG != 2 )
{
	do
	{
		if ( !find_id( $RUN_ROLE, 1 ) || !find_id( $RUN_ROLE, 2 ) )
		{
			if ( !find_id( $RUN_ROLE, 3 ) )
			{
				break;
				exit( );
			}
		}
		else
		{
		}
	} while ( 0 );
}
else if ( !find_id( $RUN_ROLE, 4 ) )
{
	exit( );
}
echo "<html>\r\n<head>\r\n<title>工作办结</title>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\">\r\n<link rel=\"stylesheet\" type=\"text/css\" href=\"turn_style.css\">\r\n<script language=\"javascript\" src=\"/inc/js/jquery/jquery.js\"></script>\r\n<script language=\"javascript\" src=\"/inc/js/jquery/utility.js\"></script>\r\n<script language=\"javascript\" src=\"/inc/js/utility.js\"></script>\r\n<script language=\"javascript\" src=\"/inc/js/attach.js\"></script>\r\n<script>\r\njQuery(document).ready(tooltip);\r\nfunction set_view(flag)\r\n{\r\n   if(flag==\"0\")\r\n      form_view(";
echo $RUN_ID;
echo ",";
echo $FLOW_ID;
echo ");\r\n   else if(flag==\"1\")\r\n      flow_view(";
echo $RUN_ID;
echo ",";
echo $FLOW_ID;
echo ");\r\n   else\r\n      view_graph(";
echo $FLOW_ID;
echo ");\r\n   hideMenu();\r\n}\r\nvar is_ie = (userAgent.indexOf('msie') != -1 && !is_opera) && userAgent.substr(userAgent.indexOf('msie') + 5, 3);\r\nfunction LoadDialogWindow(URL, parent, loc_x, loc_y, width, height)\r\n{\r\n  if(is_ie)//window.open(URL);\r\n     window.showModalDialog(URL,parent,\"edge:raised;scroll:1;status:0;help:0;resizable:1;dialogWidth:\"+width+\"px;dialogHeight:\"+height+\"px;dialogTop:\"+loc_y+\"px;dialogLeft:\"+loc_x+\"px\",true);\r\n  else\r\n     window.open(URL,parent,\"height=\"+height+\",width=\"+width+\",status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=\"+loc_y+\",left=\"+loc_x+\",resizable=yes,modal=yes,dependent=yes,dialog=yes,minimizable=no\",true);\r\n}\r\nfunction LoadWindow(line_count,PRCS_ID_NEXT)\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=\"+PRCS_ID_NEXT+\"&LINE_COUNT=\"+line_count;\r\n  loc_x=400;\r\n  loc_y=200;\r\n  if(is_ie)\r\n  {\r\n    loc_x=document.body.scrollLeft+event.clientX-event.offsetX+400;\r\n    loc_y=document.body.scrollTop+event.clientY-event.offsetY;\r\n  }\r\n  LoadDialogWindow(URL,self,loc_x, loc_y, 380, 350);\r\n}\r\n\r\nfunction LoadWindow_Child(flow_id,line_count,PRCS_ID_NEXT)\r\n{\r\n  URL=\"user_select?FLOW_ID=\"+flow_id+\"&RUN_ID=";
echo $RUN_ID;
echo "&PRCS_ID=";
echo $PRCS_ID;
echo "&PRCS_ID_NEXT=\"+PRCS_ID_NEXT+\"&LINE_COUNT=\"+line_count;\r\n  loc_x=400;\r\n  loc_y=200;\r\n  if(is_ie)\r\n  {\r\n    loc_x=document.body.scrollLeft+event.clientX-event.offsetX+400;\r\n    loc_y=document.body.scrollTop+event.clientY-event.offsetY;\r\n  }\r\n  LoadDialogWindow(URL,self,loc_x, loc_y, 380, 350);\r\n}\r\n\r\nfunction LoadWindow_Parent(flow_id,run_id,prcs_id,prcs_id_next,line_count)\r\n{\r\n  URL=\"user_select?FLOW_ID=\"+flow_id+\"&RUN_ID=\"+run_id+\"&PRCS_ID=\"+prcs_id+\"&PRCS_ID_NEXT=\"+prcs_id_next+\"&LINE_COUNT=\"+line_count;\r\n  loc_x=400;\r\n  loc_y=200;\r\n  if(is_ie)\r\n  {\r\n    loc_x=document.body.scrollLeft+event.clientX-event.offsetX+400;\r\n    loc_y=document.body.scrollTop+event.clientY-event.offsetY;\r\n  }\r\n  LoadDialogWindow(URL,self,loc_x, loc_y, 380, 350);\r\n}\r\nfunction form_view()\r\n{\r\n  window.open(\"../print?RUN_ID=";
echo $RUN_ID;
echo "&FLOW_ID=";
echo $FLOW_ID;
echo "\",\"FLOW_PRINT\",\"status=0,toolbar=no,menubar=no,width=\"+(screen.availWidth-15)+\",height=\"+(screen.availHeight-30)+\",location=no,scrollbars=yes,resizable=yes,left=0,top=0\");\r\n}\r\n\r\nfunction view_graph(FLOW_ID)\r\n{\r\n  myleft=(screen.availWidth-800)/2;\r\n  window.open(\"../view_graph?FLOW_ID=\"+FLOW_ID,\"flow_view\",\"status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=800,height=500,left=\"+myleft+\",top=50\");\r\n}\r\n\r\nfunction flow_view(RUN_ID,FLOW_ID)\r\n{\r\n  myleft=(screen.availWidth-800)/2;\r\n  window.open(\"../flow_view?RUN_ID=\"+RUN_ID+\"&FLOW_ID=\"+FLOW_ID,RUN_ID,\"status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=800,height=400,left=\"+myleft+\",top=50\");\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n";
$query = "SELECT FLOW_NAME,FORM_ID 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 RUN_NAME,USER_NAME,PARENT_RUN from FLOW_RUN LEFT JOIN USER ON(FLOW_RUN.BEGIN_USER=USER.USER_ID) WHERE RUN_ID=".$RUN_ID;
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
	$RUN_NAME = $ROW['RUN_NAME'];
	$BEGIN_USER_NAME = $ROW['USER_NAME'];
	$PARENT_RUN = $ROW['PARENT_RUN'];
}
$RUN_NAME = addslashes( $RUN_NAME );
$query = "SELECT PRCS_NAME,PRCS_OUT,PRCS_OUT_SET,SYNC_DEAL,TURN_PRIV,PRCS_TO,USER_LOCK,TOP_DEFAULT,GATHER_NODE,CONDITION_DESC from FLOW_PROCESS WHERE FLOW_ID='".$FLOW_ID."' and PRCS_ID='{$FLOW_PRCS}'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
	$PRCS_NAME = $ROW['PRCS_NAME'];
	$PRCS_OUT = $ROW['PRCS_OUT'];
	$PRCS_OUT_SET = $ROW['PRCS_OUT_SET'];
	$SYNC_DEAL = $ROW['SYNC_DEAL'];
	$TURN_PRIV = $ROW['TURN_PRIV'];
	$GATHER_NODE = $ROW['GATHER_NODE'];
	$PRCS_TO = $ROW['PRCS_TO'];
	$PRCS_TO = str_replace( ",,", ",", $PRCS_TO );
	$CONDITION_DESC = $ROW['CONDITION_DESC'];
	$CONDITION_ARR = explode( "\n", $CONDITION_DESC );
	$CONDITION_DESC = $CONDITION_ARR[1];
}
$FORM_DATA = get_form( $FORM_ID, $RUN_ID );
$NOT_PASS = check_condition( $FORM_DATA, $PRCS_OUT, $PRCS_OUT_SET, $RUN_ID, $PRCS_ID );
if ( substr( $NOT_PASS, 0, 5 ) == "SETOK" )
{
	$NOT_PASS = "";
}
if ( $NOT_PASS != "" )
{
	$NOT_PASS = str_replace( "\n", "<br>", $NOT_PASS );
	message( "转出条件检查", $NOT_PASS );
	button_back( );
	exit( );
}
$query = "SELECT USER_NAME from FLOW_RUN_PRCS LEFT JOIN USER ON(FLOW_RUN_PRCS.USER_ID=USER.USER_ID) WHERE RUN_ID=".$RUN_ID;
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	$ALL_USER_NAME .= $ROW['USER_NAME'].",";
}
$ALL_USER_NAME = substr( $ALL_USER_NAME, 0, -1 );
echo "<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\"><span class=\"big3\"> ";
echo $FLOW_NAME;
echo " - 转交下一步骤</span>\r\n    </td>\r\n  </tr>\r\n</table>\r\n<br>\r\n<form action=\"turn_submit.php\" method=\"post\" name=\"form1\">\r\n<table class=\"TableList\" width=\"100%\" border=0>\r\n    <tr class=\"TableHeader\">\r\n      <td nowrap colspan=\"2\" height=25>\r\n      \t<div style=\"float:left;\"><img src=\"/images/menu/workflow.gif\" align=\"absmiddle\"> 流水号";
echo $RUN_ID;
echo " - ";
echo $RUN_NAME;
echo "      \t&nbsp;&nbsp;<a href=\"#\" id=\"view_select\" onmouseover=\"showMenu(this.id,1)\">查看相关图表";
echo menu_arrow( "DOWN" );
echo "</a>\r\n      \t<div id=\"view_select_menu\" class=\"attach_div small\" align=\"left\">\r\n      \t\t <a href=\"#\" onclick=\"set_view('0');\"><img src=\"/images/sys_config.gif\" align=\"absmiddle\" width=16 height=16>表单</a>\r\n           <a href=\"#\" onclick=\"set_view('1');\"><img src=\"/images/menu/workflow.gif\" align=\"absmiddle\" width=16 height=16>流程图</a>\r\n           <a href=\"#\" onclick=\"set_view('2');\"><img src=\"/images/menu/@asset.gif\" align=\"absmiddle\" width=16 height=16>流程设计图</a>\r\n        </div>\r\n       </div>\r\n      </td>\r\n    </tr>\r\n\r\n";
$query = "SELECT * from FLOW_RUN_PRCS where RUN_ID=".$RUN_ID." and PRCS_ID={$PRCS_ID}";
$cursor = exequery( $connection, $query );
$USER_NAME_STR = "";
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	if ( $ROW['FLOW_PRCS'] == $FLOW_PRCS )
	{
		$USER_ID = $ROW['USER_ID'];
		$PRCS_FLAG = $ROW['PRCS_FLAG'];
		$PARENT = $ROW['PARENT'];
		$PARENT_STR .= $PARENT.",";
		$query1 = "SELECT * from USER where USER_ID='".$USER_ID."'";
		$cursor1 = exequery( $connection, $query1 );
		if ( $ROW = mysql_fetch_array( $cursor1 ) )
		{
			if ( $PRCS_FLAG == 1 )
			{
				$USER_NAME_STR .= "<font color=red title=未接收办理>".$ROW['USER_NAME']."(未接收)</font>,";
			}
			else if ( $PRCS_FLAG == 2 )
			{
				$USER_NAME_STR .= "<font color=red title=正在办理>".$ROW['USER_NAME']."(办理中)</font>,";
			}
			else if ( $PRCS_FLAG == 4 )
			{
				$USER_NAME_STR .= "<font color=green title=已办理完毕>".$ROW['USER_NAME']."(已办结)</font>,";
			}
			else
			{
				$USER_NAME_STR .= $ROW['USER_NAME'].",";
			}
		}
		if ( $PRCS_FLAG != 4 && $USER_ID != $LOGIN_USER_ID )
		{
			$NOT_ALL_FINISH .= $ROW['USER_NAME'].",";
		}
		if ( ( $PRCS_FLAG == 3 || $PRCS_FLAG == 4 ) && $USER_ID == $LOGIN_USER_ID && $OP != "MANAGE" )
		{
			$TURN_FORBIDDEN = 1;
		}
		else
		{
			$TURN_FORBIDDEN = 0;
		}
	}
	else
	{
		$FLOW_PRCS_UP .= $ROW['FLOW_PRCS'];
	}
}
if ( $NOT_ALL_FINISH != "" )
{
	$NOT_ALL_FINISH = substr( $NOT_ALL_FINISH, 0, -1 );
}
$USER_NAME_STR = substr( $USER_NAME_STR, 0, strlen( $USER_NAME_STR ) - 1 );
echo "<tr height=\"25\">\r\n  <td class=\"TableContent\" nowrap width=\"10%\">&nbsp;当前步骤为第<b><span class=big4>";
echo $PRCS_ID;
echo "</span></b>步:";
echo $PRCS_NAME;
if ( $PRCS_ID_I == $PRCS_ID )
{
	echo "(当前步骤)";
}
echo "  </td>\r\n  <td class=\"TableContent\">";
echo $USER_NAME_STR;
echo "</td>\r\n</tr>\r\n";
if ( $TURN_FORBIDDEN )
{
	message( "提示", "已经转交,不能重复转交" );
	button_back( );
	exit( );
}
if ( $GATHER_NODE == 1 )
{
	$PRE_PRCS_ID = $PRCS_ID - 1;
	$query = "select PRCS_ID FROM FLOW_PROCESS WHERE FLOW_ID='".$FLOW_ID."' AND FIND_IN_SET('{$FLOW_PRCS}',PRCS_TO)";
	$cursor = exequery( $connection, $query );
	do
	{
		while ( $ROW = mysql_fetch_array( $cursor ) )
		{
			$query1 = "select 1 from FLOW_RUN_PRCS WHERE RUN_ID='".$RUN_ID."' AND FLOW_PRCS='{$ROW['PRCS_ID']}' AND PRCS_FLAG<=2 AND PRCS_ID='{$PRE_PRCS_ID}'";
			$cursor1 = exequery( $connection, $query1 );
			if ( mysql_fetch_array( $cursor1 ) )
			{
				break;
			}
		}
	} while ( find_id( $PARENT_STR, $ROW['PRCS_ID'] ) );
	message( "提示", "此步骤为强制合并步骤,尚有步骤未转交至此步骤,您不能继续转交下一步!" );
	button_back( );
	exit( );
}
$PRCS_NEXT = $PRCS_ID + 1;
echo "   <tr class=\"TableData\">\r\n     <td colspan=2>\r\n      <div style=\"margin:3px 0 3px 3px;font-weight:bold\">\r\n     \t<img src=\"/images/menu/workflow.gif\" align=\"absmiddle\"> 选择下一步骤\r\n     \t";
if ( $SYNC_DEAL == 1 )
{
	echo "(允许并发)";
}
else if ( $SYNC_DEAL == 2 )
{
	echo "(强制并发)";
}
echo "     \t<a href=\"#\" title=\"说明:主办人是某步骤的负责人,可以编辑表单、公共附件和转交流程\">说明</a>\r\n     </div>\r\n";
if ( $PRCS_TO == "" )
{
	$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];
	}
	if ( $FLOW_PRCS != $PRCS_MAX )
	{
		$PRCS_TO = $FLOW_PRCS + 1;
	}
	else
	{
		$PRCS_TO = "0";
	}
}
$MY_ARRAY = explode( ",", $PRCS_TO );
$PRCS_ARRAY_COUNT = sizeof( $MY_ARRAY );
if ( $MY_ARRAY[$PRCS_ARRAY_COUNT - 1] == "" )
{
	--$PRCS_ARRAY_COUNT;
}
$PRCS_ENABLE_COUNT = 0;
$PRCS_STOP = "S";
$I = 0;

⌨️ 快捷键说明

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