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

📄 turn_next.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
📖 第 1 页 / 共 2 页
字号:
<?
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>工作办结</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"> 转交下一步骤</span><br>
    </td>
  </tr>
</table>


<?
//------------------------------------------- 转出条件检查 ----------------------------------
$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("转出条件检查",$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>&nbsp;&nbsp;
      </td>
    </tr>

<?
//-------------------------------------------- 流程简图 ----------------------------------------------------
$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"]."(已办结)</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%">&nbsp;第<b><span class=big4><?=$PRCS_ID_I?></span></b>步:<?=$PRCS_NAME?>
     <?if($PRCS_ID_I==$PRCS_ID)echo "(当前步骤)";?>
     </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") //结束流程
    {
    	  $PRCS_NAME="结束流程";
    	  $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 //非结束流程
    {
       $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>
<?

⌨️ 快捷键说明

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