control.php

来自「极限网络智能办公系统 - Office Automation 2008 官方10」· PHP 代码 · 共 154 行

PHP
154
字号
<?php
 

include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
if ( !$EDIT_MODE )
{
	if ( $OP == "MANAGE" )
	{
		$query = "SELECT OP_FLAG,FLOW_PRCS from FLOW_RUN_PRCS WHERE RUN_ID=".$RUN_ID." AND PRCS_ID='{$PRCS_ID}' AND USER_ID='{$USER_ID}'";
	}
	else
	{
		$query = "SELECT OP_FLAG,FLOW_PRCS from FLOW_RUN_PRCS WHERE RUN_ID=".$RUN_ID." AND PRCS_ID='{$PRCS_ID}' AND USER_ID='{$LOGIN_USER_ID}'";
	}
	$cursor = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$OP_FLAG = $ROW['OP_FLAG'];
		$FLOW_PRCS = $ROW['FLOW_PRCS'];
	}
	$query = "SELECT FLOW_TYPE from FLOW_TYPE WHERE FLOW_ID='".$FLOW_ID."'";
	$cursor1 = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor1 ) )
	{
		$FLOW_TYPE = $ROW['FLOW_TYPE'];
	}
	if ( $FLOW_TYPE == 1 )
	{
		$query = "SELECT PRCS_NAME,FEEDBACK,ATTACHMENT_ID,ATTACHMENT_NAME from FLOW_PROCESS WHERE FLOW_ID=".$FLOW_ID." AND PRCS_ID='{$FLOW_PRCS}'";
		$cursor1 = exequery( $connection, $query );
		if ( $ROW = mysql_fetch_array( $cursor1 ) )
		{
			$PRCS_NAME = $ROW['PRCS_NAME'];
			$FEEDBACK = $ROW['FEEDBACK'];
			$ATTACHMENT_ID = $ROW['ATTACHMENT_ID'];
			$ATTACHMENT_NAME = $ROW['ATTACHMENT_NAME'];
		}
	}
	else
	{
		$PRCS_NAME = "第".$PRCS_ID."步";
	}
}
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<script>\r\nfunction view_flow()\r\n{\r\n  myleft=(screen.availWidth-600)/2;\r\n  window.open(\"../flow_view.php?RUN_ID=";
echo $RUN_ID;
echo "&FLOW_ID=";
echo $FLOW_ID;
echo "\",\"flow_view\",\"status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=600,height=400,left=\"+myleft+\",top=200\");\r\n}\r\n\r\nfunction view_form()\r\n{\r\n  myleft=(screen.availWidth-800)/2;\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=800,height=600,location=no,scrollbars=yes,resizable=yes,left=\"+myleft+\",top=100\");\r\n}\r\n\r\nfunction view_attach(TYPE)\r\n{\r\n  myleft=(screen.availWidth-800)/2;\r\n  if(TYPE==1)\r\n\twindow.open('/module/OC?ATTACHMENT_ID=";
echo $ATTACHMENT_ID * 3 + 2;
echo "&ATTACHMENT_NAME=";
echo urlencode( $ATTACHMENT_NAME );
echo "&OP=5','";
echo $ATTACHMENT_ID;
echo "','menubar=0,toolbar=0,status=1,scrollbars=1,resizable=1');\r\n  else if(TYPE==2)\r\n\twindow.open('/module/mediaplayer/index.php?MEDIA_NAME=";
echo urlencode( $ATTACHMENT_NAME );
echo "&MEDIA_URL=";
echo urlencode( ( "/inc/attach.php?ATTACHMENT_ID=".( $ATTACHMENT_ID * 3 + 2 ) )."&ATTACHMENT_NAME=".urlencode( $ATTACHMENT_NAME ) );
echo "','media";
echo $ATTACHMENT_ID;
echo "','menubar=0,toolbar=0,status=1,scrollbars=1,resizable=1');\r\n  else\r\n\twindow.open(\"/inc/attach.php?ATTACHMENT_ID=";
echo $ATTACHMENT_ID * 3 + 2;
echo "&ATTACHMENT_NAME=";
echo urlencode( $ATTACHMENT_NAME );
echo "\",\"FLOW_ATTACH\",\"status=0,toolbar=no,menubar=no,width=800,height=600,location=no,scrollbars=yes,resizable=yes,left=\"+myleft+\",top=100\");\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" leftmargin=\"0\" topmargin=\"0\">\r\n<center>\r\n";
if ( $EDIT_MODE )
{
	$query = "SELECT RUN_NAME from FLOW_RUN WHERE RUN_ID=".$RUN_ID;
	$cursor = exequery( $connection, $query );
	if ( $ROW = mysql_fetch_array( $cursor ) )
	{
		$RUN_NAME = $ROW['RUN_NAME'];
	}
	echo "  \t<form action=\"edit_run_name.php\" method=\"post\" target=\"form_view\">\r\n  \t<span class=big1><b>名称/文号:</b></span>\r\n  \t<input type=\"text\" name=\"RUN_NAME\" class=BigInput\" value=\"";
	echo $RUN_NAME;
	echo "\" size=40>\r\n  \t<input type=\"hidden\" name=\"RUN_ID\" value=\"";
	echo $RUN_ID;
	echo "\">\r\n  \t<input type=\"submit\"  value=\"修改文号\" class=\"BigButton\" name=\"submit\">&nbsp;&nbsp;\r\n  \t<input type=\"button\" value=\"保存表单\" class=\"BigButton\" onclick=\"parent.form_view.CheckForm(1);\" title=\"保存表单\">&nbsp;&nbsp;\r\n  \t<input type=\"button\" value=\"关闭\" class=\"BigButton\" onclick=\"parent.close();\" title=\"关闭\">\r\n  \t</form>\r\n";
	exit( );
}
echo "\r\n\r\n<table class=small width=100% height=100% border=0 cellpadding=\"4\" cellspacing=\"0\" >\r\n<tr valign=top>\r\n<td class=timebar valign=center align=center width=100 nowrap>\r\n\t<b>";
echo $PRCS_NAME;
echo "</b>\r\n</td>\r\n<td align=left  nowrap class=small1>\r\n\t&nbsp;<b>\r\n\t<u style=\"cursor:hand\" onclick=\"view_flow();\" title=\"查看流程图\"><img border=0 src=\"/images/arrow_down.gif\">流程图</u>&nbsp;&nbsp;\r\n\t<u style=\"cursor:hand\" onclick=\"view_form();\" title=\"查看打印表单\"><img border=0 src=\"/images/form/listview.gif\" width=21 align=absmiddle>表单</u>&nbsp;&nbsp;\r\n";
if ( $ATTACHMENT_NAME != "" )
{
	echo "<u class=\"small1\" style=\"cursor:hand\" onclick=\"view_attach(";
	if ( stristr( $ATTACHMENT_NAME, ".doc" ) || stristr( $ATTACHMENT_NAME, ".ppt" ) || stristr( $ATTACHMENT_NAME, ".xls" ) )
	{
		echo "1";
	}
	else if ( is_media( $ATTACHMENT_NAME ) )
	{
		echo "2";
	}
	else
	{
		echo "0";
	}
	echo ");\" title=\"查看样例\">\r\n       <img src=\"/images/email_atta.gif\" align=\"absmiddle\">样例</u>&nbsp;&nbsp;\r\n";
}
if ( $FEEDBACK != 1 && $FEEDBACK != 3 )
{
	echo "\t<u style=\"cursor:hand\" onclick=\"parent.form_view.go_sign();\" title=\"填写会签意见\"><img border=0 src=\"/images/edit.gif\" align=absmiddle>签署意见</u>\r\n";
}
echo "</td>\r\n<td align=right nowrap>\r\n";
if ( $OP_FLAG )
{
	echo "   <input type=\"button\" value=\"转交下一步\" class=\"BigButton\" onclick=\"parent.form_view.CheckForm(3);\" title=\"保存表单并转交下一步\">&nbsp;\r\n";
}
else
{
	echo "   <input type=\"button\" value=\"办理完毕\" class=\"BigButton\" onclick=\"parent.form_view.finish_run(";
	echo $RUN_ID;
	echo ",";
	echo $PRCS_ID;
	echo ");\" title=\"办理完毕\">&nbsp;\r\n";
}
if ( $FLOW_TYPE == "2" )
{
	echo "   <input type=\"button\" value=\"结束流程\" class=\"BigButton\" onclick=\"parent.form_view.stop_run(";
	echo $RUN_ID;
	echo ",";
	echo $PRCS_ID;
	echo ");\" title=\"结束流程\">&nbsp;\r\n";
}
if ( $OP_FLAG && $OP_FLAG )
{
	echo "   <input type=\"button\" value=\"保存\" class=\"SmallButton\" onclick=\"parent.form_view.CheckForm(1);\" title=\"保存表单\">&nbsp;\r\n   <input type=\"button\" value=\"保存返回\" class=\"SmallButton\" onclick=\"parent.form_view.CheckForm(2);\" title=\"保存表单并返回待办工作列表\">&nbsp;\r\n";
}
if ( $OP == "MANAGE" )
{
	echo "   <input type=\"button\" value=\"返回\" class=\"BigButton\" onClick=\"parent.location='../../manage/index.php";
	if ( $MENU_FLAG == "1" )
	{
		echo "?FLOW_ID=".$FLOW_ID;
	}
	echo "';\" title=\"返回待办工作列表\">&nbsp;\r\n";
}
else
{
	echo "   <input type=\"button\" value=\"返回\" class=\"BigButton\" onClick=\"parent.location='../";
	if ( $MENU_FLAG == "1" )
	{
		echo "?FLOW_ID=".$FLOW_ID;
	}
	echo "';\" title=\"返回待办工作列表\">&nbsp;\r\n";
}
echo "  </b>\r\n</td>\r\n</tr>\r\n</table>\r\n\r\n</center>\r\n</body>\r\n</html>";
?>

⌨️ 快捷键说明

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