?? turn_next.php
字號(hào):
<?
include_once("inc/auth.php");
include_once("../../prcs_role.php");
include_once("inc/utility_all.php");
include_once("condition.php");
if(!run_role($RUN_ID,$PRCS_ID))
exit;
?>
<html>
<head>
<title>工作辦結(jié)</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body class="bodycolor" topmargin="5">
<?
$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"];
}
?>
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/green_arrow.gif" align="absmiddle"><span class="big3"> 轉(zhuǎn)交下一步驟</span><br>
</td>
</tr>
</table>
<?
//------------------------------------------- 轉(zhuǎn)出條件檢查 ----------------------------------
$FORM_DATA=get_form($FORM_ID,$RUN_ID);
$query = "SELECT * from FLOW_RUN_PRCS where RUN_ID=$RUN_ID and PRCS_ID=$PRCS_ID";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
$FLOW_PRCS=$ROW["FLOW_PRCS"];
$query = "SELECT * from FLOW_PROCESS WHERE FLOW_ID=$FLOW_ID and PRCS_ID=$FLOW_PRCS";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
$PRCS_OUT=$ROW["PRCS_OUT"];
$NOT_PASS=check_condition($FORM_DATA,$PRCS_OUT,$RUN_ID,$PRCS_ID);
if($NOT_PASS!="")
{
$NOT_PASS=str_replace("\n","<br>",$NOT_PASS);
Message("轉(zhuǎn)出條件檢查",$NOT_PASS);
Button_Back();
exit;
}
?>
<br>
<form action="turn_submit.php" method="post" name="form1">
<table border="0" cellspacing="1" class="small" bgcolor="#000000" cellpadding="3" align="center" width="95%">
<tr class="TableHeader" height=30>
<td nowrap class="Big" colspan="2" align=center>
<img src="/images/menu/workflow.gif" align="absmiddle"> <b><?=$FLOW_NAME?></b>
</td>
</tr>
<?
//-------------------------------------------- 流程簡(jiǎ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];
for($PRCS_ID_I=1;$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"];
$FLOW_PRCS_UP.=$FLOW_PRCS.",";
$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.="<font color=red title=未接收辦理>".$ROW["USER_NAME"]."(未接收)</font>,";
elseif($PRCS_FLAG==2)
$USER_NAME_STR.="<font color=red title=正在辦理>".$ROW["USER_NAME"]."(辦理中)</font>,";
elseif($PRCS_FLAG==4)
$USER_NAME_STR.="<font color=green title=已辦理完畢>".$ROW["USER_NAME"]."(已辦結(jié))</font>,";
else
$USER_NAME_STR.=$ROW["USER_NAME"].",";
}
if($PRCS_ID_I==$PRCS_ID && $PRCS_FLAG!=4 && $USER_ID!=$LOGIN_USER_ID)
$NOT_ALL_FINISH.=$ROW["USER_NAME"].",";
}//while
$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);
?>
<tr class="TableData" height="25">
<td nowrap width="10%"> 第<b><span class=big4><?=$PRCS_ID_I?></span></b>步:<?=$PRCS_NAME?>
<?if($PRCS_ID_I==$PRCS_ID)echo "(當(dāng)前步驟)";?>
</td>
<td><?=$USER_NAME_STR?></td>
</tr>
<?
}//for
//-------------------------------------------- 選擇步驟 ----------------------------------------------------
$PRCS_NEXT=$PRCS_ID+1;
?>
<tr class="TableHeader">
<td colspan=2><img src="/images/menu/workflow.gif" align="absmiddle"> <b>選擇步驟</b></td>
</tr>
<tr class="TableData" height=35>
<td colspan=2>
<?
$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($PRCS_TO=="") //未定義下一步驟
{
if($FLOW_PRCS!=$PRCS_MAX)
$PRCS_TO=$FLOW_PRCS+1;
else
$PRCS_TO="0";
}
$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;
$FLOW_STOP=0;
$PRCS_ENABLE_COUNT=0;
for($I=0;$I<$ARRAY_COUNT;$I++)
{
$NOT_PASS="";
if($MY_ARRAY[$I]=="0") //結(jié)束流程
{
$PRCS_NAME="結(jié)束流程";
$PRCS_ID_TO="";
if($PRCS_TO_CHOOSE==$I)
$FLOW_STOP=1;
$PRCS_ENABLE_COUNT++;
?>
<span style="cursor:hand;" onclick="location='turn_next.php?MENU_FLAG=<?=$MENU_FLAG?>&RUN_ID=<?=$RUN_ID?>&FLOW_ID=<?=$FLOW_ID?>&PRCS_ID=<?=$PRCS_ID?>&PRCS_TO_CHOOSE=<?=$I?>&OP=<?=$OP?>'"><input type="radio" name="FLOW_PRCS" value="<?=$PRCS_ID_TO?>" <?if($PRCS_TO_CHOOSE==$I)echo "checked";?>><img src="/images/arrow_down.gif" align="absmiddle">
<u><b><?=$PRCS_NAME?></b></u></span>
<?
}
else //非結(jié)束流程
{
$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"];
$PRCS_IN=$ROW["PRCS_IN"];
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"];
}
$PRCS_IN_DESC=str_replace("'include'","'包含'",$PRCS_IN);
$PRCS_IN_DESC=str_replace("'exclude'","'不包含'",$PRCS_IN_DESC);
$PRCS_IN_DESC=str_replace("''","'空'",$PRCS_IN_DESC);
$PRCS_IN_DESC=str_replace("'"," ",$PRCS_IN_DESC);
$NOT_PASS=check_condition($FORM_DATA,$PRCS_IN,$RUN_ID,$PRCS_ID);
if($MY_ARRAY[$I]==$FLOW_PRCS)
$IMAGE_NAME="arrow_right";
elseif(find_id($FLOW_PRCS_UP,$MY_ARRAY[$I]))
$IMAGE_NAME="arrow_up";
else
$IMAGE_NAME="arrow_down";
if($NOT_PASS=="")//符合條件的
{
$PRCS_ENABLE_COUNT++;
?>
<span style="cursor:hand;" onclick="location='turn_next.php?MENU_FLAG=<?=$MENU_FLAG?>&RUN_ID=<?=$RUN_ID?>&FLOW_ID=<?=$FLOW_ID?>&PRCS_ID=<?=$PRCS_ID?>&PRCS_TO_CHOOSE=<?=$I?>&OP=<?=$OP?>'">
<input type="radio" name="FLOW_PRCS" value="<?=$PRCS_ID_TO?>" <?if($PRCS_TO_CHOOSE==$I)echo "checked";?>><img src="/images/<?=$IMAGE_NAME?>.gif" align="absmiddle">
<u><b><?=$PRCS_NAME?></b></u></span>
<?
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -