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

📄 search2.php

📁 通达网络办公 - Office Anywhere 2008 增强版100%源码(3.4.081216) 内含 通达OA2008增強版接近完美破解补丁20081216集 及 最新通达OA2008ADV(
💻 PHP
字号:
<?php

include_once( "inc/auth.php" );
include_once( "inc/utility_all.php" );
include_once( "inc/check_type.php" );
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<script>\r\nfunction delete_apply(apply_id)\r\n{\r\n  msg='确认要删除该报名么?';\r\n  if(window.confirm(msg))\r\n  {\r\n     URL=\"delete.php?APPLY_ID=\" + apply_id;\r\n     window.location=URL;\r\n  }\r\n}\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n";
$CUR_DATE = date( "Y-m-d", time( ) );
if ( $APPLY_TIME_B != "" )
{
	$TIME_OK = is_date( $APPLY_TIME_B );
	if ( !$TIME_OK )
	{
		message( "错误", "\"开始时间\"的格式不对,应形如 ".$CUR_DATE );
		button_back( );
		exit( );
	}
}
if ( $APPLY_TIME_E != "" )
{
	$TIME_OK = is_date( $APPLY_TIME_E );
	if ( !$TIME_OK )
	{
		message( "错误", "\"开始时间\"的格式不对,应形如 ".$CUR_DATE );
		button_back( );
		exit( );
	}
}
if ( $APPLY_TIME_B != "" )
{
	$APPLY_TIME_B .= " 00:00:00";
}
else
{
	$APPLY_TIME_B = "";
}
if ( $APPLY_TIME_E != "" )
{
	$APPLY_TIME_E .= " 23:59:59";
}
else
{
	$APPLY_TIME_E = "";
}
$CONDITION_STR = "";
if ( $TRAIN_ID != "" )
{
	$query = "SELECT * from TRAIN_NEWCOURSE where TRAIN_ID like '%".$TRAIN_ID."%'";
	$cursor = exequery( $connection, $query );
	$NUMROWS = mysql_num_rows( $cursor );
	$COUNT1 = "";
	while ( $ROW = mysql_fetch_array( $cursor ) )
	{
		++$COUNT1;
		$TRAINING_ID = $ROW['TRAINING_ID'];
		if ( $NUMROWS != $COUNT1 )
		{
			$CONDITION_STR .= "(APPLY_TID='".$TRAINING_ID."') or ";
		}
		else
		{
			$CONDITION_STR .= "(APPLY_TID='".$TRAINING_ID."')";
		}
	}
	if ( $CONDITION_STR != "" )
	{
		$CONDITION_STR = " and (".$CONDITION_STR.")";
	}
	else
	{
		$CONDITION_STR = "and APPLY_TID='hhhggghhhggg'";
	}
}
if ( $COURSE_NAME != "" )
{
	$CONDITION_STR .= " and APPLY_COURSE_NAEM like '%".$COURSE_NAME."%'";
}
if ( $APPLY_STATUS != "" )
{
	$CONDITION_STR .= " and APPLY_STATUS='".$APPLY_STATUS."'";
}
if ( $APPLY_TIME_B != "" )
{
	$CONDITION_STR .= " and APPLY_TIME>='".$APPLY_TIME_B."'";
}
if ( $APPLY_TIME_E != "" )
{
	$CONDITION_STR .= " and APPLY_TIME<='".$APPLY_TIME_E."'";
}
echo "\r\n<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"3\" class=\"small\">\r\n <tr>\r\n  <td class=\"Big\"><img src=\"/images/menu/infofind.gif\" align=\"absMiddle\"><span class=\"big3\"> 查询结果</span><br>\r\n  </td>\r\n </tr>\r\n</table>\r\n<br>\r\n";
$query = "SELECT * from TRAIN_APPLY where APPLYER='".$LOGIN_USER_ID."'";
$query .= $CONDITION_STR." order by APPLY_ID desc";
$cursor = exequery( $connection, $query );
$APPLY_COUNT = 0;
while ( $ROW = mysql_fetch_array( $cursor ) )
{
	++$APPLY_COUNT;
	if ( $APPLY_COUNT == 1 )
	{
		echo "<table class=\"TableList\" width=\"95%\" align=\"center\">\r\n  <tr class=\"TableHeader\">\r\n    <td nowrap align=\"center\">培训课程编号</td>\r\n    <td nowrap align=\"center\">培训课程名称</td>\r\n    <td nowrap align=\"center\">审批人</td>\r\n    <td nowrap align=\"center\">状态</td>\r\n    <td nowrap align=\"center\">报名/限额</td>\r\n    <td nowrap align=\"center\">报名时间</td>\r\n    <td nowrap align=\"center\">操作</td>\r\n  </tr>\r\n";
	}
	$APPLY_ID = $ROW['APPLY_ID'];
	$APPLY_TID = $ROW['APPLY_TID'];
	$APPLY_MANAGER = $ROW['APPLY_MANAGER'];
	$APPLY_TIME = $ROW['APPLY_TIME'];
	$EXEMPT_FLAG = $ROW['EXEMPT_FLAG'];
	$COURSE_NAME = $ROW['APPLY_COURSE_NAEM'];
	$APPLY_STATUS = $ROW['APPLY_STATUS'];
	if ( $APPLY_STATUS == 0 )
	{
		$APPLY_STATUS_DESC = "待批";
	}
	else if ( $APPLY_STATUS == 1 )
	{
		$APPLY_STATUS_DESC = "已准";
	}
	else if ( $APPLY_STATUS == 2 )
	{
		$APPLY_STATUS_DESC = "进行中";
	}
	else if ( $APPLY_STATUS == 3 )
	{
		$APPLY_STATUS_DESC = "未批准";
	}
	else if ( $APPLY_STATUS == 4 )
	{
		$APPLY_STATUS_DESC = "结束";
	}
	else if ( $APPLY_STATUS == 5 )
	{
		$APPLY_STATUS_DESC = "非审批课程";
	}
	$query1 = "SELECT * from TRAIN_NEWCOURSE where TRAINING_ID='".$APPLY_TID."'";
	$cursor1 = exequery( $connection, $query1 );
	if ( $ROW1 = mysql_fetch_array( $cursor1 ) )
	{
		$TRAIN_ID = $ROW1['TRAIN_ID'];
		$TCOURSE_ID = $ROW1['TCOURSE_ID'];
		$YORN = $ROW1['YORN'];
		$NUMBER = $ROW1['NUMBER'];
	}
	$query1 = "SELECT count(*) from TRAIN_APPLY where APPLY_TID='".$APPLY_TID."' and APPLY_STATUS!='3' and (APPLY_STATUS!='0'or APPLY_MANAGER='') and (EXEMPT_FLAG='0' or EXEMPT_FLAG='2')";
	$cursor1 = exequery( $connection, $query1 );
	$COUNT = 0;
	if ( $ROW1 = mysql_fetch_array( $cursor1 ) )
	{
		$COUNT = $ROW1[0];
	}
	$query1 = "SELECT USER_NAME from USER where USER_ID='".$APPLY_MANAGER."'";
	$cursor1 = exequery( $connection, $query1 );
	$USER_NAME1 = "";
	if ( $ROW1 = mysql_fetch_array( $cursor1 ) )
	{
		$USER_NAME1 = $ROW1['USER_NAME'];
	}
	if ( $APPLY_COUNT % 2 == 1 )
	{
		$TableLine = "TableLine1";
	}
	else
	{
		$TableLine = "TableLine2";
	}
	if ( $YORN == 1 )
	{
		$FONT_COLOR = "red";
	}
	else
	{
		$FONT_COLOR = "green";
	}
	echo "\r\n  <tr class=\"";
	echo $TableLine;
	echo "\">\r\n   <td nowrap align=\"center\"><a href=\"javascript:;\" onClick=\"window.open('../../manage/show/train_detail.php?TRAINING_ID=";
	echo $APPLY_TID;
	echo "','','height=500,width=700,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=150,top=60,resizable=yes');\">";
	echo $TRAIN_ID;
	echo "</a>&nbsp;\r\n   <td nowrap align=\"center\"><a href=\"javascript:;\" onClick=\"window.open('../../manage/show/course_detail.php?TCOURSE_ID=";
	echo $TCOURSE_ID;
	echo "','','height=500,width=600,status=1,toolbar=no,menubar=no,location=no,scrollbars=yes,left=190,top=60,resizable=yes');\"><font color=";
	echo $FONT_COLOR;
	echo ">";
	echo $COURSE_NAME;
	echo "</font></a>&nbsp;\r\n    <td nowrap align=\"center\">";
	echo $USER_NAME1;
	echo "</td>\r\n    <td nowrap align=\"center\">";
	echo $APPLY_STATUS_DESC;
	echo "</td>\r\n    <td nowrap align=\"center\">";
	if ( $EXEMPT_FLAG == 0 || $EXEMPT_FLAG == 2 )
	{
		echo $COUNT."/".$NUMBER;
	}
	else
	{
		echo "免修申请";
	}
	echo "</td>    \r\n    <td nowrap align=\"center\">";
	echo $APPLY_TIME;
	echo "</td>\r\n";
	if ( $APPLY_STATUS == 0 || $APPLY_STATUS == 3 || $APPLY_STATUS == 5 )
	{
		echo "    <td align=\"center\"><a href=\"javascript:delete_apply('";
		echo $APPLY_ID;
		echo "');\">删除</a></td>\r\n";
	}
	else
	{
		echo "    <td align=\"center\"> - </td>\r\n";
	}
	echo "  </tr>\r\n";
}
if ( $APPLY_COUNT == 0 )
{
	message( "", "无符合条件的课程" );
	button_back( );
	exit( );
}
echo "</table>\r\n";
button_back( );
echo "</body>\r\n</html>";
?>

⌨️ 快捷键说明

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