📄 index.php
字号:
<?php
include_once( "inc/global.inc" );
include_once( $GLOBALEL['root_lib']."Template.inc" );
include_once( $GLOBALEL['root_lib']."SymsDb.inc" );
include_once( "inc/common.inc" );
include_once( "inc/auth.php" );
require_once( "include/index.inc" );
$term = true;
$msg = "";
while ( $term )
{
if ( !isset( $edb ) || !is_object( $edb ) )
{
$edb = "";
if ( !com_opendb( $edb, $GLOBALEL['db_debug'] ) )
{
$term = false;
$error = "8600900000000001";
break;
}
}
if ( !isset( $_REQUEST['step'] ) )
{
$step = 1;
}
else
{
$step = $_REQUEST['step'];
}
if ( $step == 1 )
{
$reslut = array( );
if ( !( $result = dml_flowsortinfo( $edb, $nd, $einfo, $parr ) ) && $nd === false )
{
$msg = $einfo;
$term = false;
break;
}
}
if ( $step == 2 )
{
}
if ( $step == 3 )
{
$parr['noorder'] = com_str4db( $_REQUEST['noorder'] );
$parr['title'] = com_str4db( $_REQUEST['title'] );
$parr['creator'] = $_SESSION['LOGIN_USER_ID'];
if ( !dml_addflowsort( &$edb, &$nd, &$einfo, $parr ) )
{
$term = false;
$msg = $einfo;
break;
}
}
if ( $step == 4 )
{
$parr['id'] = $_REQUEST['id'];
$result = array( );
if ( !( $result = dml_searchsort( $edb, $nd, $einfo, $parr ) ) )
{
$msg = $einfo;
$term = false;
break;
}
}
if ( $step == 5 )
{
$parr['id'] = $_REQUEST['id'];
$parr['title'] = $_REQUEST['title'];
$parr['noorder'] = $_REQUEST['noorder'];
if ( !dml_modifysort( &$edb, &$nd, &$einfo, $parr ) )
{
$msg = $einfo;
$term = false;
break;
}
}
if ( !( $step == 6 ) )
{
break;
}
$parr['id'] = $_REQUEST['id'];
if ( !( $row = dml_delsort( $edb, $nd, $einfo, $parr ) ) )
{
$msg = $einfo;
$term = false;
}
else
{
if ( !( trim( $row['0']['cnt'] ) != 0 ) )
{
break;
}
echo "\r\n\t\t <script>\r\n\t\t\t alert('流程类别有工作流,不能删除!'); \r\n\t\t location.replace('index.php');\r\n\t\t </script>\r\n\t\t\t\t \r\n\t\t ";
exit( );
break;
}
}
if ( isset( $edb ) && is_object( $edb ) )
{
@com_closedb( $edb, $term );
}
$fa = array( );
$fa['fh'] = "base.html";
$t = new template( $GLOBALEL['root_tpl'] );
while ( $term )
{
if ( $step == 1 )
{
$fa['fh_main'] = "workflow/flow_sort/index.htm";
$fa['fh_table'] = "workflow/flow_sort/table/sortlist_table.htm";
$t->set_file( $fa );
$t->set_var( "VAR_BUTTON", "<a href='index.php?step=2'><img src='/images/button/add_flowsort.gif' border='0'></a><a href='javascript:history.back()'><img src='/images/button/return.gif' border='0'></a>" );
$t->set_block( "fh_table", "sortlist_block", "sortlist_blk" );
$i = 0;
for ( ; $i < count( $result ); ++$i )
{
if ( $i % 2 == 1 )
{
$t->set_var( "VAR_TableLine", "TableLine1" );
}
else
{
$t->set_var( "VAR_TableLine", "TableLine2" );
}
$t->set_var( "VAR_ID", $result[$i]['ID'] );
$t->set_var( "VAR_SEQUENCE", $result[$i]['NOORDER'] );
$t->set_var( "VAR_TITLE", $result[$i]['TITLE'] );
$t->parse( "sortlist_blk", "sortlist_block", true );
}
$t->parse( "sortlist", "fh_table", true );
}
if ( $step == 2 )
{
$fa['fh_main'] = "workflow/flow_sort/index.htm";
$fa['fh_table'] = "workflow/flow_sort/table/addsort_table.htm";
$t->set_file( $fa );
$t->set_var( "VAR_BUTTON", "<a href='#' onclick='check()'><img src='/images/button/submit.gif' border='0'></a><a href='javascript:history.back()'><img src='/images/button/return.gif' border='0'></a>" );
$t->parse( "addsort", "fh_table", true );
}
if ( $step == 3 )
{
$fa['fh_main'] = "workflow/flow_sort/index.htm";
$fa['fh_table'] = "workflow/flow_sort/table/end.htm";
$t->set_file( $fa );
$t->set_var( "VAR_BUTTON", "<a href='javascript:history.back()'><img src='/images/button/return.gif' border='0'></a>" );
$t->parse( "addend", "fh_table", true );
}
if ( $step == 4 )
{
$fa['fh_main'] = "workflow/flow_sort/index.htm";
$fa['fh_table'] = "workflow/flow_sort/table/flow_sort_info.htm";
$t->set_file( $fa );
$t->set_var( "VAR_BUTTON", "<a href='#' onclick='check()'><img src='/images/button/submit.gif' border='0'></a><a href='javascript:history.back()'><img src='/images/button/return.gif' border='0'></a>" );
$t->set_var( "VAR_ID", $result[0]['ID'] );
$t->set_var( "VAR_NOORDER", $result[0]['NOORDER'] );
$t->set_var( "VAR_TITLE", $result[0]['TITLE'] );
$t->parse( "modifysort", "fh_table", true );
}
if ( $step == 5 )
{
$fa['fh_main'] = "workflow/flow_sort/index.htm";
$fa['fh_table'] = "workflow/flow_sort/table/end.htm";
$t->set_file( $fa );
$t->set_var( "VAR_BUTTON", "<a href='javascript:history.back()'><img src='/images/button/return.gif' border='0'></a>" );
$t->parse( "addend", "fh_table", true );
}
if ( !( $step == 6 ) )
{
break;
}
$fa['fh_main'] = "workflow/flow_sort/index.htm";
$fa['fh_table'] = "workflow/flow_sort/table/end.htm";
$t->set_file( $fa );
$t->set_var( "VAR_BUTTON", "<a href='javascript:history.back()'><img src='/images/button/return.gif' border='0'></a>" );
$t->parse( "addend", "fh_table", true );
break;
}
if ( !$term )
{
$fa['fh_error'] = "error.html";
$t->set_file( $fa );
$t->set_var( "BODY_MAIN", "" );
$t->set_var( "VAR_ERROR_MSG", com_addappendixhref( $msg ) );
$t->parse( "BODY_ERROR", "fh_error" );
}
else
{
$t->set_var( "BODY_ERROR", "" );
$t->parse( "BODY_MAIN", "fh_main" );
}
$t->parse( "final_output", "fh" );
$t->p( "final_output" );
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -