📄 others_submit_free.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility_sms1.php" );
include_once( "../../prcs_role.php" );
if ( !run_role( $RUN_ID, $PRCS_ID ) )
{
exit( );
}
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</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\r\n";
$query = "select FREE_OTHER FROM FLOW_TYPE where FLOW_ID='".$FLOW_ID."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$FREE_OTHER = $ROW['FREE_OTHER'];
}
$CUR_TIME = date( "Y-m-d H:i:s", time( ) );
if ( $FREE_OTHER == 0 )
{
message( "错误", "此流程禁止委托!" );
exit( );
}
$query = "select OP_FLAG from FLOW_RUN_PRCS where RUN_ID='".$RUN_ID."' and PRCS_ID='{$PRCS_ID}' and USER_ID='{$TO_ID}'";
$cursor = exequery( $connection, $query );
if ( !( $ROW = mysql_fetch_array( $cursor ) ) )
{
if ( $PRCS_ID == 1 )
{
$FLOW_PRCS1 = 1;
}
$query = "insert into FLOW_RUN_PRCS(RUN_ID,PRCS_ID,FLOW_PRCS,USER_ID,PRCS_FLAG,OP_FLAG,TOP_FLAG) values ('".$RUN_ID."','{$PRCS_ID}','{$FLOW_PRCS1}','{$TO_ID}',1,'{$OP_FLAG}','{$TOP_FLAG}')";
exequery( $connection, $query );
}
else if ( $ROW['OP_FLAG'] == 0 && $OP_FLAG == 1 )
{
$query = "update FLOW_RUN_PRCS set OP_FLAG=1,PRCS_FLAG=2 where RUN_ID='".$RUN_ID."' and PRCS_ID='{$PRCS_ID}' AND USER_ID='{$TO_ID}'";
exequery( $connection, $query );
}
else
{
$query = "select USER_NAME from USER where USER_ID='".$TO_ID."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$TO_NAME = $ROW['USER_NAME'];
}
message( "", "[".$TO_NAME."] 已经是本步骤主办人或经办人!您不必委托。" );
echo "<br><div align=center><input type=\"button\" class=\"BigButton\" value=\"关闭\" onclick=\"window.close();\"></div>";
exit( );
}
$query = "update FLOW_RUN_PRCS set PRCS_TIME='".$CUR_TIME."' where RUN_ID='{$RUN_ID}' and PRCS_ID='{$PRCS_ID}' AND USER_ID='{$USER_ID_OLD}' AND PRCS_FLAG=1 AND PRCS_TIME is null";
exequery( $connection, $query );
$query = "update FLOW_RUN_PRCS set PRCS_FLAG=4,OP_FLAG=0,DELIVER_TIME='".$CUR_TIME."' where RUN_ID='{$RUN_ID}' and PRCS_ID='{$PRCS_ID}' AND USER_ID='{$USER_ID_OLD}'";
exequery( $connection, $query );
$query = "select USER_NAME from USER where USER_ID='".$TO_ID."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$TO_NAME = $ROW['USER_NAME'];
}
$query = "select USER_NAME from USER where USER_ID='".$USER_ID_OLD."'";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$USER_NAME = $ROW['USER_NAME'];
}
$CONTENT = "[".$USER_NAME."]的工作委托给[".$TO_NAME."]";
run_log( $RUN_ID, $PRCS_ID, $FLOW_PRCS, $LOGIN_USER_ID, 2, $CONTENT );
if ( $SMS_REMIND == "on" )
{
send_sms( "", $LOGIN_USER_ID, $TO_ID, 7, $SMS_CONTENT, "workflow/list" );
}
if ( $SMS2_REMIND == "on" )
{
send_mobile_sms_user( "", $LOGIN_USER_ID, $TO_ID, $SMS_CONTENT, 7 );
}
message( "成功", "委托操作已成功!" );
echo "<div align=\"center\"><input type=\"button\" class=\"BigButton\" onclick=\"window.close();\" value=\"关闭\"></div>\r\n\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -