📄 index.php
字号:
<?php
include_once( "inc/auth.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";
echo "<s";
echo "cript Language=JavaScript>\r\nwindow.setTimeout('this.location.reload();',30000);\r\n</script>\r\n</head>\r\n\r\n<body class=\"bodycolor\" topmargin=\"5\">\r\n\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/attendance.gif\" WIDTH=\"22\" HEIGHT=\"20\" align=\"absmiddle\">";
echo "<s";
echo "pan class=\"big3\"> 请假登记</span><br>\r\n </td>\r\n </tr>\r\n</table>\r\n\r\n<br>\r\n\r\n<div align=\"center\">\r\n<input type=\"button\" value=\"新建请假登记\" class=\"BigButton\" onClick=\"location='new';\" title=\"新建请假登记\"> \r\n<input type=\"button\" value=\"请假历史记录\" class=\"BigButton\" onClick=\"location='history.php';\" title=\"查看过往的请假记录\">\r\n<br>\r\n<br>\r\n<table border=\"0\" cellspacing=\"1\" width=\"95%\" class=\"";
echo "small\" bgcolor=\"#000000\" cellpadding=\"3\">\r\n";
$connection = openconnection( );
$LEAVE_COUNT = 0;
$query = "SELECT * from ATTEND_LEAVE where USER_ID='{$LOGIN_USER_ID}' and STATUS='1'";
$cursor = exequery( $connection, $query );
while ( $ROW = mysql_fetch_array( $cursor ) )
{
++$LEAVE_COUNT;
$LEAVE_ID = $ROW['LEAVE_ID'];
$LEADER_ID = $ROW['LEADER_ID'];
$LEAVE_DATE1 = $ROW['LEAVE_DATE1'];
$LEAVE_DATE2 = $ROW['LEAVE_DATE2'];
$LEAVE_TYPE = $ROW['LEAVE_TYPE'];
$LEAVE_TYPE = str_replace( "<", "<", $LEAVE_TYPE );
$LEAVE_TYPE = str_replace( ">", ">", $LEAVE_TYPE );
$LEAVE_TYPE = stripslashes( $LEAVE_TYPE );
$ALLOW = $ROW['ALLOW'];
if ( $ALLOW == "0" )
{
$ALLOW_DESC = "领导尚未批示";
}
else if ( $ALLOW == "1" )
{
$ALLOW_DESC = "领导已批准";
}
else if ( $ALLOW == "2" )
{
$ALLOW_DESC = "领导不批准";
}
else if ( $ALLOW == "3" )
{
$ALLOW_DESC = "申请销假";
}
$query1 = "SELECT * from USER where USER_ID='{$LEADER_ID}'";
$cursor1 = exequery( $connection, $query1 );
if ( $ROW = mysql_fetch_array( $cursor1 ) )
{
$LEADER_NAME = $ROW['USER_NAME'];
}
echo " <tr class=\"TableData\">\r\n <td nowrap align=\"center\">";
echo $LEAVE_TYPE;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $LEADER_NAME;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $LEAVE_DATE1;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $LEAVE_DATE2;
echo "</td>\r\n <td nowrap align=\"center\">";
echo $ALLOW_DESC;
echo "</td>\r\n";
if ( $ALLOW == "0" || $ALLOW == "2" )
{
echo " <td nowrap align=\"center\"><a href=\"delete.php?LEAVE_ID=";
echo $LEAVE_ID;
echo "\">删除</a></td>\r\n";
}
else if ( $ALLOW == "1" )
{
echo " <td nowrap align=\"center\"><a href=\"cancel.php?LEAVE_ID=";
echo $LEAVE_ID;
echo "\">申请销假</a></td>\r\n";
}
else if ( $ALLOW == "3" )
{
echo " <td nowrap align=\"center\">无</td>\r\n";
}
echo " </tr>\r\n";
}
if ( 0 < $LEAVE_COUNT )
{
echo " <thead 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 </thead>\r\n";
}
echo "</table>\r\n</div>\r\n\r\n</body>\r\n</html>";
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -