📄 go_back.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility.php" );
include_once( "../prcs_role.php" );
$RUN_ROLE = run_role( $RUN_ID, $PRCS_ID );
if ( !find_id( $RUN_ROLE, 1 ) || !find_id( $RUN_ROLE, 2 ) || !find_id( $RUN_ROLE, 3 ) )
{
exit( );
}
$query = "SELECT ALLOW_BACK from FLOW_PROCESS WHERE FLOW_ID=".$FLOW_ID." AND PRCS_ID='{$FLOW_PRCS}'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$ALLOW_BACK = $ROW['ALLOW_BACK'];
}
if ( $ALLOW_BACK && $PRCS_ID != 1 )
{
$CUR_TIME = date( "Y-m-d H:i:s", time( ) );
$PRCS_ID_NEW = $PRCS_ID + 1;
$PRCS_ID_LAST = $PRCS_ID - 1;
$query = "select USER_ID,FLOW_PRCS from FLOW_RUN_PRCS WHERE RUN_ID='".$RUN_ID."' AND PRCS_ID='{$PRCS_ID_LAST}' AND OP_FLAG=1";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$FLOW_PRCS_NEW = $ROW['FLOW_PRCS'];
$USER_ID_LAST = $ROW['USER_ID'];
}
$query = "insert into FLOW_RUN_PRCS(RUN_ID,PRCS_ID,USER_ID,PRCS_FLAG,FLOW_PRCS,OP_FLAG,TOP_FLAG,PARENT) values (".$RUN_ID.",{$PRCS_ID_NEW},'{$USER_ID_LAST}','1',{$FLOW_PRCS_NEW},'1','0','{$FLOW_PRCS}')";
exequery( $connection, $query );
$query = "update FLOW_RUN_PRCS set DELIVER_TIME='".$CUR_TIME."',PRCS_FLAG='3' WHERE RUN_ID={$RUN_ID} and PRCS_ID={$PRCS_ID} and FLOW_PRCS='{$FLOW_PRCS}' and PRCS_FLAG in ('1','2')";
exequery( $connection, $query );
$REMIND_URL = "workflow/list/input_form?RUN_ID=".$RUN_ID."&FLOW_ID={$FLOW_ID}&PRCS_ID={$PRCS_ID_NEW}&FLOW_PRCS={$FLOW_PRCS_NEW}";
$SMS_CONTENT = "工作流回退提醒:流水号".$RUN_ID."的工作回退给您处理!";
send_sms( "", $LOGIN_USER_ID, $USER_ID_LAST, 7, $SMS_CONTENT, $REMIND_URL );
run_log( $RUN_ID, $PRCS_ID, $FLOW_PRCS, $LOGIN_USER_ID, 1, "回退至上一步骤" );
header( "location: index.php?TYPE=2" );
}
else
{
message( "", "抱歉,不能退回此工作!" );
buttonback( );
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -