search.php
来自「极限网络智能办公系统 Office Automation V3.0官方100%源」· PHP 代码 · 共 574 行 · 第 1/2 页
PHP
574 行
<td nowrap align="center"><?=$EARLY_COUNT?></td>
<td nowrap align="center"><?=$DUTY_OFF_TOTAL-$DUTY_OFF_COUNT?></td>
<td nowrap align="center"><?=$OVER_ON_COUNT?></td>
<td nowrap align="center"><?=$OVER_OFF_COUNT?></td>
<td nowrap align="center"><a href="user_duty.php?USER_ID=<?=$USER_ID?>&DATE1=<?=$DATE1?>&DATE2=<?=$DATE2?>">详细记录</a></td>
</tr>
</table>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="3">
<tr>
<td background="/images/dian1.gif" width="100%"></td>
</tr>
</table>
<!------------------------------------- 外出记录 ------------------------------->
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/attendance.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3"> 外出记录</span><br>
</td>
</tr>
</table>
<?
$query = "SELECT * from ATTEND_OUT where USER_ID='$USER_ID' and to_days(SUBMIT_TIME)>=to_days('$$DATE1') and to_days(SUBMIT_TIME)<=to_days('$$DATE2') order by SUBMIT_TIME";
$cursor= exequery($connection,$query);
$OUT_COUNT=0;
while($ROW=mysql_fetch_array($cursor))
{
$OUT_COUNT++;
$OUT_TYPE=$ROW["OUT_TYPE"];
$SUBMIT_TIME=$ROW["SUBMIT_TIME"];
$OUT_TIME1=$ROW["OUT_TIME1"];
$OUT_TIME2=$ROW["OUT_TIME2"];
$ALLOW=$ROW["ALLOW"];
$STATUS=$ROW["STATUS"];
$LEADER_ID=$ROW["LEADER_ID"];
$LEADER_NAME="";
$query = "SELECT * from USER where USER_ID='$LEADER_ID'";
$cursor1= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor1))
$LEADER_NAME=$ROW["USER_NAME"];
if($STATUS=="0")
$STATUS_DESC="外出";
else if($STATUS=="1")
$STATUS_DESC="已归来";
if($ALLOW=='0')
$STATUS_DESC="待批";
if($ALLOW=='2')
$STATUS_DESC="不批准";
if($OUT_COUNT==1)
{
?>
<table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3">
<?
}
?>
<tr class="TableData">
<td nowrap align="center"><?=$OUT_TYPE?></td>
<td nowrap align="center"><?=$SUBMIT_TIME?></td>
<td nowrap align="center"><?=$OUT_TIME1?></td>
<td nowrap align="center"><?=$OUT_TIME2?></td>
<td nowrap align="center"><?=$LEADER_NAME?></td>
<td nowrap align="center"><?=$STATUS_DESC?></td>
</tr>
<?
}
if($OUT_COUNT>0)
{
?>
<thead class="TableHeader">
<td nowrap align="center">外出原因</td>
<td nowrap align="center">申请时间</td>
<td nowrap align="center">外出时间</td>
<td nowrap align="center">归来时间</td>
<td nowrap align="center">审批人员</td>
<td nowrap align="center">状态</td>
</thead>
</table>
<?
}
else
message("","无外出记录");
?>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="3">
<tr>
<td background="/images/dian1.gif" width="100%"></td>
</tr>
</table>
<!------------------------------------- 请假记录 ------------------------------->
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/attendance.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3"> 请假记录</span><br>
</td>
</tr>
</table>
<?
$query = "SELECT * from ATTEND_LEAVE where USER_ID='$USER_ID' and ((to_days(LEAVE_DATE1)>=to_days('$DATE1') and to_days(LEAVE_DATE1)<=to_days('$DATE2')) or (to_days(LEAVE_DATE2)>=to_days('$DATE1') and to_days(LEAVE_DATE2)<=to_days('$DATE2')) or (to_days(LEAVE_DATE1)<=to_days('$DATE1') and to_days(LEAVE_DATE2)>=to_days('$DATE2'))) and allow in('1','3')";
$cursor= exequery($connection,$query);
$LEAVE_COUNT=0;
while($ROW=mysql_fetch_array($cursor))
{
$LEAVE_COUNT++;
$LEAVE_ID=$ROW["LEAVE_ID"];
$LEAVE_DATE1=$ROW["LEAVE_DATE1"];
$LEAVE_DATE2=$ROW["LEAVE_DATE2"];
$LEAVE_TYPE=$ROW["LEAVE_TYPE"];
$STATUS=$ROW["STATUS"];
switch($LEAVE_TYPE)
{
case 1:
$LEAVE_TYPE="事假";
break;
case 2:
$LEAVE_TYPE="病假";
break;
case 3:
$LEAVE_TYPE="婚假";
break;
case 4:
$LEAVE_TYPE="产假";
break;
case 5:
$LEAVE_TYPE="其它";
break;
}
$LEADER_ID=$ROW["LEADER_ID"];
$LEADER_NAME="";
$query = "SELECT * from USER where USER_ID='$LEADER_ID'";
$cursor1= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor1))
$LEADER_NAME=$ROW["USER_NAME"];
if($STATUS==1)
$STATUS="现行";
else
$STATUS="已销假";
if($LEAVE_COUNT==1)
{
?>
<table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3">
<?
}
?>
<tr class="TableData">
<td nowrap align="center"><?=$LEAVE_TYPE?></td>
<td nowrap align="center"><?=$LEAVE_DATE1?></td>
<td nowrap align="center"><?=$LEAVE_DATE2?></td>
<td nowrap align="center"><?=$LEADER_NAME?></td>
<td nowrap align="center"><?=$STATUS?></td>
</tr>
<?
}
if($LEAVE_COUNT>0)
{
?>
<thead class="TableHeader">
<td nowrap align="center">请假原因</td>
<td nowrap align="center">开始日期</td>
<td nowrap align="center">结束日期</td>
<td nowrap align="center">审批人员</td>
<td nowrap align="center">状态</td>
</thead>
</table>
<?
}
else
message("","无请假记录");
?>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="3">
<tr>
<td background="/images/dian1.gif" width="100%"></td>
</tr>
</table>
<!------------------------------------- 出差记录 ------------------------------->
<table border="0" width="100%" cellspacing="0" cellpadding="3" class="small">
<tr>
<td class="Big"><img src="/images/menu/attendance.gif" WIDTH="22" HEIGHT="20" align="absmiddle"><span class="big3"> 出差记录</span><br>
</td>
</tr>
</table>
<?
$query = "SELECT * from ATTEND_EVECTION where USER_ID='$USER_ID' and ((to_days(EVECTION_DATE1)>=to_days('$DATE1') and to_days(EVECTION_DATE1)<=to_days('$DATE2')) or (to_days(EVECTION_DATE2)>=to_days('$DATE1') and to_days(EVECTION_DATE2)<=to_days('$DATE2')) or (to_days(EVECTION_DATE1)<=to_days('$DATE1') and to_days(EVECTION_DATE2)>=to_days('$DATE2')))";
$cursor= exequery($connection,$query);
$EVECTION_COUNT=0;
while($ROW=mysql_fetch_array($cursor))
{
$EVECTION_COUNT++;
$EVECTION_ID=$ROW["EVECTION_ID"];
$EVECTION_DATE1=$ROW["EVECTION_DATE1"];
$EVECTION_DATE1=strtok($EVECTION_DATE1," ");
$EVECTION_DATE2=$ROW["EVECTION_DATE2"];
$EVECTION_DATE2=strtok($EVECTION_DATE2," ");
$EVECTION_DEST=$ROW["EVECTION_DEST"];
$LEADER_ID=$ROW["LEADER_ID"];
$LEADER_NAME="";
$query = "SELECT * from USER where USER_ID='$LEADER_ID'";
$cursor1= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor1))
$LEADER_NAME=$ROW["USER_NAME"];
$STATUS=$ROW["STATUS"];
if($STATUS=="1")
$STATUS="在外";
else
$STATUS="归来";
if($EVECTION_COUNT==1)
{
?>
<table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3">
<?
}
?>
<tr class="TableData">
<td nowrap align="center"><?=$EVECTION_DEST?></td>
<td nowrap align="center"><?=$EVECTION_DATE1?></td>
<td nowrap align="center"><?=$EVECTION_DATE2?></td>
<td nowrap align="center"><?=$LEADER_NAME?></td>
<td nowrap align="center"><?=$STATUS?></td>
</tr>
<?
}
if($EVECTION_COUNT>0)
{
?>
<thead class="TableHeader">
<td nowrap align="center">出差地点</td>
<td nowrap align="center">开始日期</td>
<td nowrap align="center">结束日期</td>
<td nowrap align="center">审批人员</td>
<td nowrap align="center">状态</td>
</thead>
</table>
<?
}
else
message("","无出差记录");
?>
<br>
<div align="center">
<input type="button" value="返回" class="BigButton" onClick="location='user.php?USER_ID=<?=$USER_ID?>';">
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?