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

📄 search.php

📁 泛微协同办公系统标准版E-office V5.5的源代码内含泛微办公系统V5.5自动注册文件。
💻 PHP
📖 第 1 页 / 共 2 页
字号:
	$query .= $where_str;
	$query .= "order by OUT_TIME1 desc";
	echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\" class=\"small\">\r\n  <tr class=\"TableHeader\">\r\n    <td width=\"10%\">员工</td>\r\n    <td width=\"15%\">外出事由</td>\r\n    <td width=\"15%\">外出时间</td>\r\n    <td>归来时间</td>\r\n    <td>审批人</td>\r\n    <td width=\"5%\">操作</td>\r\n";
	$sql = page( $query, 10 );
	$cursor = exequery( $connection, $sql );
	$number_count = 0;
	$taf = exequery( $connection, $sql );
	if ( !( $row = mysql_fetch_array( $taf ) ) )
	{
		echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr>\r\n    <td align=\"center\">";
		message( "提示", "没有符合条件的记录!" );
		exit( );
		echo "</td>\r\n  </tr>\r\n</table>\r\n";
	}
	while ( $row = mysql_fetch_array( $cursor ) )
	{
		++$number_count;
		$user_id = $row['USER_ID'];
		$out_type = $row['OUT_TYPE'];
		$submit_time = $row['SUBMIT_TIME'];
		$start_time = $row['OUT_TIME1'];
		$end_time = $row['OUT_TIME2'];
		$leader_id = $row['LEADER_ID'];
		$sql2 = "select USER_NAME from user where USER_ID='".$user_id."'";
		$cursor2 = exequery( $connection, $sql2 );
		if ( $row2 = mysql_fetch_array( $cursor2 ) )
		{
			$user_name = $row2['USER_NAME'];
		}
		if ( $number_count % 2 == 1 )
		{
			$TableLine = "TableLine1";
		}
		else
		{
			$TableLine = "TableLine2";
		}
		echo "  </tr>\r\n  <tr class=\"";
		echo $TableLine;
		echo "\">\r\n    <td>";
		echo $user_name;
		echo "</td>\r\n    <td>";
		echo substrgb( $out_type, 14, "..." );
		echo "</td>\r\n    <td>";
		echo $start_time;
		echo "</td>\r\n    <td>";
		echo $end_time;
		echo "</td>\r\n    <td>";
		echo $row2[0];
		echo "</td>\r\n    <td><a href=\"#\" onClick=\"javascript:delete_out('";
		echo $user_id;
		echo "','";
		echo $out_type;
		echo "','";
		echo $start_time;
		echo "','";
		echo $end_time;
		echo "','";
		echo $submit_time;
		echo "');\">删除</a></td>\r\n  </tr>\r\n";
	}
	echo "</table>\r\n\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n  <tr>\r\n    <td class=\"TableLine2\"><input type=\"button\" class=\"BigButton\" name=\"delete_all\" value=\"全部删除\" title=\"删除所有搜索结果\" onClick=\"delete_all(";
	echo $id;
	echo ");\"></td>\r\n  </tr>\r\n  <tr>\r\n    <td align=\"right\" class=\"TableLine1\">";
	disp( "id=2&time_start=".$_REQUEST['time_start']."&time_end=".$_REQUEST['time_end']."&number_type=".$_REQUEST['number_type']."" );
	echo "</td>\r\n  </tr>\r\n</table>\r\n";
}
if ( $_REQUEST['id'] == 3 )
{
	$query = "select * from attend_leave ";
	if ( $_REQUEST['keywords'] != "" && $where_str == "" )
	{
		$where_str .= "where LEAVE_TYPE like '%".$_REQUEST['keywords']."%' ";
	}
	if ( $_REQUEST['date_start'] != NULL )
	{
		if ( $where_str != "" )
		{
			$where_str .= "and to_days(date_format(LEAVE_DATE1,'%Y-%m-%d')) >= to_days('".$_REQUEST['date_start']."') ";
		}
		else
		{
			$where_str .= "where to_days(date_format(LEAVE_DATE1,'%Y-%m-%d')) >= to_days('".$_REQUEST['date_start']."') ";
		}
	}
	if ( $_REQUEST['date_end'] != NULL )
	{
		if ( $where_str != "" )
		{
			$where_str .= "and to_days(date_format(LEAVE_DATE2,'%Y-%m-%d')) <= to_days('".$_REQUEST['date_end']."') ";
		}
		else
		{
			$where_str .= "where to_days(date_format(LEAVE_DATE2,'%Y-%m-%d')) <= to_days('".$_REQUEST['date_end']."') ";
		}
	}
	if ( $_REQUEST['TO_ID'] != "" )
	{
		$to_id = ",".$_REQUEST['TO_ID'];
		$to_id_str = str_replace( ",", "','", $to_id );
		$to_id_str = substr( $to_id_str, 2 );
		$to_id_str = substr( $to_id_str, 0, strlen( $to_id_str ) - 2 );
		if ( $where_str != "" )
		{
			$where_str .= "and USER_ID IN (".$to_id_str.")";
		}
		else
		{
			$where_str .= "where USER_ID IN (".$to_id_str.")";
		}
	}
	$query .= $where_str;
	$query .= "order by LEAVE_DATE1 desc";
	echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\" class=\"small\">\r\n  <tr class=\"TableHeader\">\r\n    <td width=\"5%\">&nbsp;</td>\r\n    <td width=\"10%\">员工</td>\r\n    <td width=\"14%\">请假事由</td>\r\n    <td width=\"23%\">请假日期</td>\r\n    <td width=\"23%\">归来日期</td>\r\n    <td width=\"13%\">审批人</td>\r\n\r\n    <td width=\"5%\">操作</td>\r\n  </tr>\r\n";
	$sql = page( $query, 10 );
	$cursor = exequery( $connection, $sql );
	$number_count = 0;
	$taf = exequery( $connection, $sql );
	if ( !( $row = mysql_fetch_array( $taf ) ) )
	{
		echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr>\r\n    <td align=\"center\">";
		message( "提示", "没有符合条件的记录!" );
		exit( );
		echo "</td>\r\n  </tr>\r\n</table>\r\n";
	}
	while ( $row = mysql_fetch_array( $cursor ) )
	{
		++$number_count;
		$leave_id = $row['LEAVE_ID'];
		$leave_type = $row['LEAVE_TYPE'];
		$leave_date1 = $row['LEAVE_DATE1'];
		$leave_date2 = $row['LEAVE_DATE2'];
		$user_id = $row['USER_ID'];
		$sql2 = "select USER_NAME from user where USER_ID='".$user_id."'";
		$cursor2 = exequery( $connection, $sql2 );
		if ( $row2 = mysql_fetch_array( $cursor2 ) )
		{
			$user_name = $row2['USER_NAME'];
		}
		if ( $number_count % 2 == 1 )
		{
			$TableLine = "TableLine1";
		}
		else
		{
			$TableLine = "TableLine2";
		}
		echo "  <tr class=\"";
		echo $TableLine;
		echo "\">\r\n    <td><input type=\"checkbox\" name=\"box\" value=\"";
		echo $leave_id;
		echo "\"></td>\r\n    <td>";
		echo $user_name;
		echo "</td>\r\n    <td>";
		echo substrgb( $leave_type, 15, "..." );
		echo "</td>\r\n    <td>";
		echo $leave_date1;
		echo "</td>\r\n    <td>";
		echo $leave_date2;
		echo "</td>\r\n    <td>";
		echo $row2[0];
		echo "</td>\r\n    <td><a href=\"#\" onClick=\"javascript:deletes('";
		echo $leave_id;
		echo "');\">删除</a></td>\r\n  </tr>\r\n";
	}
	echo "</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n  <tr>\r\n    <td class=\"TableLine2\">";
	edit( $_REQUEST['id'] );
	echo "</td>\r\n  </tr>\r\n  <tr>\r\n    <td align=\"right\" class=\"TableLine1\">";
	disp( "id=3&date_start=".$_REQUEST['date_start']."&date_end=".$_REQUEST['date_end']."&number_type=".$_REQUEST['number_type']."" );
	echo "</td>\r\n  </tr>\r\n</table>\r\n";
}
if ( $_REQUEST['id'] == 4 )
{
	$query = "select * from attend_evection ";
	if ( $_REQUEST['city'] != "" && $where_str == "" )
	{
		$where_str .= "where EVECTION_DEST like '%".$_REQUEST['city']."%' ";
	}
	if ( $_REQUEST['date_start'] != NULL )
	{
		if ( $where_str != "" )
		{
			$where_str .= "and to_days(date_format(EVECTION_DATE1,'%Y-%m-%d')) >= to_days('".$_REQUEST['date_start']."') ";
		}
		else
		{
			$where_str .= "where to_days(date_format(EVECTION_DATE1,'%Y-%m-%d')) >= to_days('".$_REQUEST['date_start']."') ";
		}
	}
	if ( $_REQUEST['date_end'] != NULL )
	{
		if ( $where_str != "" )
		{
			$where_str .= "and to_days(date_format(EVECTION_DATE2,'%Y-%m-%d')) <= to_days('".$_REQUEST['date_end']."') ";
		}
		else
		{
			$where_str .= "where to_days(date_format(EVECTION_DATE2,'%Y-%m-%d')) <= to_days('".$_REQUEST['date_end']."') ";
		}
	}
	if ( $_REQUEST['TO_ID'] != "" )
	{
		$to_id = ",".$_REQUEST['TO_ID'];
		$to_id_str = str_replace( ",", "','", $to_id );
		$to_id_str = substr( $to_id_str, 2 );
		$to_id_str = substr( $to_id_str, 0, strlen( $to_id_str ) - 2 );
		if ( $where_str != "" )
		{
			$where_str .= "and USER_ID IN (".$to_id_str.")";
		}
		else
		{
			$where_str .= "where USER_ID IN (".$to_id_str.")";
		}
	}
	$query .= $where_str;
	$query .= "order by EVECTION_DATE1 desc";
	echo "<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\" class=\"small\">\r\n  <tr class=\"TableHeader\">\r\n    <td width=\"5%\">&nbsp;</td>\r\n    <td width=\"10%\">员工</td>\r\n    <td width=\"14%\">出差地点</td>\r\n    <td width=\"25%\">出差日期</td>\r\n    <td width=\"25%\">归来日期</td>\r\n    <td>审批人</td>\r\n    <td width=\"5%\">操作</td>\r\n  </tr>\r\n";
	$sql = page( $query, 10 );
	$cursor = exequery( $connection, $sql );
	$number_count = 0;
	$taf = exequery( $connection, $sql );
	if ( !( $row = mysql_fetch_array( $taf ) ) )
	{
		echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\r\n  <tr>\r\n    <td align=\"center\">";
		message( "提示", "没有符合条件的记录!" );
		exit( );
		echo "</td>\r\n  </tr>\r\n</table>\r\n";
	}
	while ( $row = mysql_fetch_array( $cursor ) )
	{
		++$number_count;
		$evection_id = $row['EVECTION_ID'];
		$evection_dest = $row['EVECTION_DEST'];
		$evection_date1 = $row['EVECTION_DATE1'];
		$evection_date2 = $row['EVECTION_DATE2'];
		$user_id = $row['USER_ID'];
		$sql2 = "select USER_NAME from user where USER_ID='".$user_id."'";
		$cursor2 = exequery( $connection, $sql2 );
		if ( $row2 = mysql_fetch_array( $cursor2 ) )
		{
			$user_name = $row2['USER_NAME'];
		}
		if ( $number_count % 2 == 1 )
		{
			$TableLine = "TableLine1";
		}
		else
		{
			$TableLine = "TableLine2";
		}
		echo "  <tr class=\"";
		echo $TableLine;
		echo "\">\r\n    <td><input type=\"checkbox\" name=\"box\" value=\"";
		echo $evection_id;
		echo "\"></td>\r\n    <td>";
		echo $user_name;
		echo "</td>\r\n    <td>";
		echo $evection_dest;
		echo "</td>\r\n    <td>";
		echo $evection_date1;
		echo "</td>\r\n    <td>";
		echo $evection_date2;
		echo "</td>\r\n    <td>";
		echo $row2[0];
		echo "</td>\r\n    <td><a href=\"#\" onClick=\"javascript:deletes('";
		echo $evection_id;
		echo "');\">删除</a></td>\r\n  </tr>\r\n";
	}
	echo "</table>\r\n<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"5\">\r\n  <tr>\r\n    <td class=\"TableLine2\">";
	edit( $_REQUEST['id'] );
	echo "</td>\r\n  </tr>\r\n  <tr>\r\n    <td align=\"right\" class=\"TableLine1\">";
	disp( "id=4&date_start=".$_REQUEST['date_start']."&date_end=".$_REQUEST['date_end']."&number_type=".$_REQUEST['number_type']."" );
	echo "</td>\r\n  </tr>\r\n</table>\r\n";
}
if ( 0 < ( $n = $_REQUEST['cur_page'] - $total_page_nums ) )
{
	$cur_page = $_REQUEST['cur_page'] - $n;
	header( "location:".$_SERVER['PHP_SELF']."?id=".$_REQUEST['id']."&date_start=".$_REQUEST['date_start']."&date_end=".$_REQUEST['date_end']."&number_type=".$_REQUEST['number_type']."&time_start=".$_REQUEST['time_start']."&time_end=".$_REQUEST['time_end']."&cur_page=".$cur_page );
}
echo "<s";
echo "cript language=\"javascript\">\r\n\tfunction delete_all(id)\r\n\t{\r\n\t\tmsg\t= '确认要删除所有记录么?';\r\n\t\t\r\n\t\tif(window.confirm(msg))\r\n\t\t{\r\n\t\t\turl\t= \"delete_all.php?id=\"+id+\"&keywords=";
echo $_REQUEST['keywords'];
echo "&query=";
echo $query;
echo "&cur_page=";
echo $cur_page;
echo "&number_type=";
echo $_REQUEST['number_type'];
echo "&id=";
echo $_REQUEST['id'];
echo "&date_start=";
echo $_REQUEST['date_start'];
echo "&date_end=";
echo $_REQUEST['date_end'];
echo "&time_start=";
echo $_REQUEST['time_start'];
echo "&time_end=";
echo $_REQUEST['time_end'];
echo "&city=";
echo $_REQUEST['city'];
echo "\";\r\n\t\t\twindow.location\t= url;\r\n\t\t}\r\n\t}\r\n</script>\r\n</body>\r\n</html>";
?>

⌨️ 快捷键说明

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