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

📄 search.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
📖 第 1 页 / 共 2 页
字号:
		if ($STATUS == '0')
		{
			$STATUS_DESC = '外出';
		}
		else
		{
			if ($STATUS == '1')
			{
				$STATUS_DESC = '已归来';
			}
		}
		if ($ALLOW == '0')
		{
			$STATUS_DESC = '待批';
		}
		if ($ALLOW == '2')
		{
			$STATUS_DESC = '不批准';
		}
		$query1 = 'select * from DEPARTMENT where DEPT_ID=' . $DEPT_ID;
		$cursor1 = exequery ($connection, $query1);
		if ($ROW = mysql_fetch_array ($cursor1))
		{
			$USER_DEPT_NAME = $ROW['DEPT_NAME'];
		}
		if ($OUT_COUNT == 1)
		{
			echo '
	<table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">
';
		}
		echo '    <tr class="TableData">
		<td nowrap align="center">';
		echo $USER_DEPT_NAME;
		echo '</td>
		<td nowrap align="center">';
		echo $USER_NAME;
		echo '</td>
		<td nowrap align="center">';
		echo $OUT_TYPE;
		echo '</td>
		<td nowrap align="center">';
		echo $SUBMIT_TIME;
		echo '</td>
		<td nowrap align="center">';
		echo $OUT_TIME1;
		echo '</td>
		<td nowrap align="center">';
		echo $OUT_TIME2;
		echo '</td>
		<td nowrap align="center">';
		echo $LEADER_NAME;
		echo '</td>
		<td nowrap align="center">';
		echo $STATUS_DESC;
		echo '</td>
		<td nowrap align="center"><a href=delete_out.php?DATE1=';
		echo $DATE1;
		echo '&DATE2=';
		echo $DATE2;
		echo '&USER_ID=';
		echo $USER_ID;
		echo '&SUBMIT_TIME=';
		echo urlencode ($SUBMIT_TIME);
		echo '>删除</a></td>
	</tr>
';
		continue;
	}
}
if (0 < $OUT_COUNT)
{
	echo '    <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>
		<td nowrap align="center">批示领导</td>
		<td nowrap align="center">状态</td>
		<td nowrap align="center">操作</td>
	</thead>
	</table>
';
}
else
{
	message ('', '无外出记录');
}
echo '
<br>
<table width="95%" 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,USER,DEPARTMENT where DEPARTMENT.DEPT_ID=USER.DEPT_ID and ATTEND_LEAVE.USER_ID=USER.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\') order by DEPT_NO,USER_NO,USER_NAME';
$cursor = exequery ($connection, $query);
$LEAVE_COUNT = 0;
while ($ROW = mysql_fetch_array ($cursor))
{
	$USER_ID = $ROW['USER_ID'];
	$DEPT_ID = $ROW['DEPT_ID'];
	$USER_NAME = $ROW['USER_NAME'];
	$LEAVE_ID = $ROW['LEAVE_ID'];
	$LEAVE_DATE1 = $ROW['LEAVE_DATE1'];
	$LEAVE_DATE2 = $ROW['LEAVE_DATE2'];
	$LEAVE_TYPE = $ROW['LEAVE_TYPE'];
	$LEADER_ID = $ROW['LEADER_ID'];
	$STATUS = $ROW['STATUS'];
	$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 (is_dept_priv ($DEPT_ID))
	{
		++$LEAVE_COUNT;
		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 = '其它';
			}
		}
		if ($STATUS == 1)
		{
			$STATUS = '现行';
		}
		else
		{
			$STATUS = '已销假';
		}
		$query1 = 'select * from DEPARTMENT where DEPT_ID=' . $DEPT_ID;
		$cursor1 = exequery ($connection, $query1);
		if ($ROW = mysql_fetch_array ($cursor1))
		{
			$USER_DEPT_NAME = $ROW['DEPT_NAME'];
		}
		if ($LEAVE_COUNT == 1)
		{
			echo '
	<table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">
';
		}
		echo '    <tr class="TableData">
		<td nowrap align="center">';
		echo $USER_DEPT_NAME;
		echo '</td>
		<td nowrap align="center">';
		echo $USER_NAME;
		echo '</td>
		<td nowrap align="center">';
		echo $LEAVE_TYPE;
		echo '</td>
		<td nowrap align="center">';
		echo $LEAVE_DATE1;
		echo '</td>
		<td nowrap align="center">';
		echo $LEAVE_DATE2;
		echo '</td>
		<td nowrap align="center">';
		echo $LEADER_NAME;
		echo '</td>
		<td nowrap align="center">';
		echo $STATUS;
		echo '</td>
		<td nowrap align="center"><a href=delete_leave.php?LEAVE_ID=';
		echo $LEAVE_ID;
		echo '>删除</a></td>
	</tr>
';
		continue;
	}
}
if (0 < $LEAVE_COUNT)
{
	echo '    <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>
		<td nowrap align="center">状态</td>
		<td nowrap align="center">操作</td>
	</thead>
	</table>
';
}
else
{
	message ('', '无请假记录');
}
echo '
<br>
<table width="95%" 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,USER,DEPARTMENT where DEPARTMENT.DEPT_ID=USER.DEPT_ID and ATTEND_EVECTION.USER_ID=USER.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 . '\'))) order by DEPT_NO,USER_NO,USER_NAME';
$cursor = exequery ($connection, $query);
$EVECTION_COUNT = 0;
while ($ROW = mysql_fetch_array ($cursor))
{
	$USER_ID = $ROW['USER_ID'];
	$DEPT_ID = $ROW['DEPT_ID'];
	$USER_NAME = $ROW['USER_NAME'];
	$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'];
	$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 (is_dept_priv ($DEPT_ID))
	{
		++$EVECTION_COUNT;
		if ($STATUS == '1')
		{
			$STATUS = '在外';
		}
		else
		{
			$STATUS = '归来';
		}
		$query1 = 'select * from DEPARTMENT where DEPT_ID=' . $DEPT_ID;
		$cursor1 = exequery ($connection, $query1);
		if ($ROW = mysql_fetch_array ($cursor1))
		{
			$USER_DEPT_NAME = $ROW['DEPT_NAME'];
		}
		if ($EVECTION_COUNT == 1)
		{
			echo '
	<table border="0" cellspacing="1" width="95%" class="small" bgcolor="#000000" cellpadding="3">
';
		}
		echo '    <tr class="TableData">
		<td nowrap align="center">';
		echo $USER_DEPT_NAME;
		echo '</td>
		<td nowrap align="center">';
		echo $USER_NAME;
		echo '</td>
		<td nowrap align="center">';
		echo $EVECTION_DEST;
		echo '</td>
		<td nowrap align="center">';
		echo $EVECTION_DATE1;
		echo '</td>
		<td nowrap align="center">';
		echo $EVECTION_DATE2;
		echo '</td>
		<td nowrap align="center">';
		echo $LEADER_NAME;
		echo '</td>
		<td nowrap align="center">';
		echo $STATUS;
		echo '</td>
		<td nowrap align="center"><a href=delete_evection.php?EVECTION_ID=';
		echo $EVECTION_ID;
		echo '>删除</a></td>
	</tr>
';
		continue;
	}
}
if (0 < $EVECTION_COUNT)
{
	echo '    <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>
		<td nowrap align="center">状态</td>
		<td nowrap align="center">操作</td>
	</thead>
	</table>
';
}
else
{
	message ('', '无出差记录');
}
echo '
<br>
<div align="center">
<input type="button"  value="返回" class="BigButton" onClick="location=\'index.php\';">
</div>
</body>
</html>';
?>

⌨️ 快捷键说明

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