📄 item_do.php
字号:
<?php
include_once( "inc/auth.php" );
include_once( "inc/utility_html.php" );
$connection = openconnection( );
$query = "select * from FLOW_TYPE where FLOW_ID={$FLOW_ID}";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$FORM_ID = $ROW['FORM_ID'];
$FLOW_DOC = $ROW['FLOW_DOC'];
}
$query = "select * from FLOW_PROCESS where FLOW_ID={$FLOW_ID} and ID={$ID}";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$PRCS_ITEM = $ROW['PRCS_ITEM'];
$PRCS_ITEM = str_replace( "+", "+", $PRCS_ITEM );
$PRCS_ITEM = str_replace( "#", "#", $PRCS_ITEM );
$PRCS_ITEM_VIEW = $ROW['PRCS_ITEM_VIEW'];
$PRCS_ITEM_VIEW = str_replace( "+", "+", $PRCS_ITEM_VIEW );
$PRCS_ITEM_VIEW = str_replace( "#", "#", $PRCS_ITEM_VIEW );
$PRCS_ITEM_CAPACITY = $ROW['PRCS_ITEM_CAPACITY'];
$PRCS_ITEM_CAPACITY = str_replace( "+", "+", $PRCS_ITEM_CAPACITY );
$PRCS_ITEM_CAPACITY = str_replace( "#", "#", $PRCS_ITEM_CAPACITY );
$PRCS_ITEM_AUTO = $ROW['PRCS_ITEM_AUTO'];
$PRCS_ITEM_AUTO = str_replace( "+", "+", $PRCS_ITEM_AUTO );
$PRCS_ITEM_AUTO = str_replace( "#", "#", $PRCS_ITEM_AUTO );
}
$query = "select * from FLOW_FORM_TYPE where FORM_ID={$FORM_ID}";
$cursor = exequery( $connection, $query );
if ( $ROW = mysql_fetch_array( $cursor ) )
{
$PRINT_MODEL = $ROW['PRINT_MODEL'];
}
$ELEMENT_ARRAY = html_element( $PRINT_MODEL );
$ARRAY_COUNT = sizeof( $ELEMENT_ARRAY );
$I = 0;
for ( ; $I < $ARRAY_COUNT; ++$I )
{
$E_TITLE = get_attr( $ELEMENT_ARRAY[$I], "TITLE" );
$E_VALUE = get_attr( $ELEMENT_ARRAY[$I], "VALUE" );
$ITEM_NAME_ALL .= $E_TITLE.",";
$ITEM_VALUE_ALL .= $E_VALUE.",";
}
if ( $FLOW_DOC == "1" )
{
$ITEM_NAME_ALL .= "[A@],";
$ITEM_VALUE_ALL .= "{ATTACH},";
}
$ITEM_NAME_ALL = str_replace( "+", "+", $ITEM_NAME_ALL );
$ITEM_NAME_ALL = str_replace( "#", "#", $ITEM_NAME_ALL );
$valueArray = explode( ",", $ITEM_VALUE_ALL );
$itemArray = explode( ",", $ITEM_NAME_ALL );
$iacount = 0;
$i = 0;
for ( ; $i < count( $itemArray ) - 1; ++$i )
{
++$iacount;
$itemname = $itemArray[$i];
if ( $iacount % 2 == 1 )
{
$TableLine = "TableLine1";
}
else
{
$TableLine = "TableLine2";
}
$itemname_v = $itemname;
if ( $itemname == "[A@]" )
{
$itemname = "流程公共附件";
$itemname_v = "[A@]";
}
$str_item_view = ",".$PRCS_ITEM_VIEW;
$str_item_edit = ",".$PRCS_ITEM;
$str_item_capacity = ",".$PRCS_ITEM_CAPACITY;
$str_item_auto = ",".$PRCS_ITEM_AUTO;
$isview = strpos( $str_item_view, ",".$itemname."," ) === false ? false : true;
$isedit = strpos( $str_item_edit, ",".$itemname."," ) === false ? false : true;
$iscapacity = strpos( $str_item_capacity, ",".$itemname."," ) === false ? false : true;
$isauto = strpos( $str_item_auto, ",".$itemname."," ) === false ? false : true;
if ( $_REQUEST[$itemname."_view"] == 1 )
{
$PRCS_ITEM_VIEW_V .= $itemname_v.",";
}
if ( $_REQUEST[$itemname."_edit"] == 1 )
{
$PRCS_ITEM_V .= $itemname_v.",";
}
if ( $_REQUEST[$itemname."_capacity"] == 1 )
{
$PRCS_ITEM_CAPACITY_V .= $itemname_v.",";
}
if ( $_REQUEST[$itemname."_auto"] == 1 )
{
$PRCS_ITEM_AUTO_V .= $itemname_v.",";
}
}
$f = $_REQUEST['f'];
switch ( $f )
{
case "update" :
$sql = "\r\n\t\t\t\tUPDATE flow_process \r\n\t\t\t\t\tSET PRCS_ITEM_VIEW='".$PRCS_ITEM_VIEW_V."',\r\n\t\t\t\t\t\tPRCS_ITEM='".$PRCS_ITEM_V."',\r\n\t\t\t\t\t\tPRCS_ITEM_CAPACITY='".$PRCS_ITEM_CAPACITY_V."',\r\n\t\t\t\t\t\tPRCS_ITEM_AUTO='".$PRCS_ITEM_AUTO_V."'\r\n\t\t\t\t\tWHERE ID='".$_REQUEST['ID']."' \r\n\t\t\t\t\t\tAND FLOW_ID='".$_REQUEST['FLOW_ID']."' \r\n\t\t\t\t";
exequery( $connection, $sql );
header( "location:set_item.php?ID=".$_REQUEST['ID']."&FLOW_ID=".$_REQUEST['FLOW_ID']."&o=1" );
exit( );
}
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -