📄 index.php
字号:
<?
include_once("inc/auth.php");
?>
<html>
<head>
<title>新建出差登记</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function CheckForm()
{
if(document.form1.EVECTION_DEST.value=="")
{ alert("出差地区不能为空!");
return (false);
}
if(document.form1.EVECTION_DATE1.value=="")
{ alert("出差开始日期不能为空!");
return (false);
}
if(document.form1.EVECTION_DATE2.value=="")
{ alert("出差结束日期不能为空!");
return (false);
}
return (true);
}
function td_calendar(fieldname)
{
myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;
mytop=document.body.scrollTop+event.clientY-event.offsetY+140;
window.showModalDialog("/inc/calendar.php?FIELDNAME="+fieldname,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:215px;dialogTop:"+mytop+"px;dialogLeft:"+myleft+"px");
}
</script>
</head>
<body class="bodycolor" topmargin="5" onload="document.form1.EVECTION_DEST.focus();">
<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>
<br>
<?
$CUR_DATE=date("Y-m-d",time());
?>
<table border="0" width="500" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
<form action="submit.php" method="post" name="form1" onsubmit="return CheckForm();">
<tr>
<td nowrap class="TableData">出差地点:</td>
<td class="TableData">
<input type="text" name="EVECTION_DEST" size="10" maxlength="25" class="BigInput" value="">
</td>
</tr>
<tr>
<td nowrap class="TableData">出差时间:</td>
<td class="TableData">
<input type="text" name="EVECTION_DATE1" size="10" maxlength="10" class="BigInput" value="<?=$CUR_DATE?>">
<img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar('form1.EVECTION_DATE1');">
至 <input type="text" name="EVECTION_DATE2" size="10" maxlength="10" class="BigInput" value="<?=$CUR_DATE?>">
<img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar('form1.EVECTION_DATE2');">
</td>
</tr>
<tr>
<td nowrap class="TableData">事由:</td>
<td class="TableData">
<textarea name="REASON" cols="50" rows="4" class="BigInput"></textarea>
</td>
</tr>
<tr>
<td nowrap class="TableData">审批人员:</td>
<td class="TableData">
<select name="LEADER_ID" class="BigSelect">
<?
$COUNT=0;
$query = "select * from ATTEND_MANAGER where MANAGER_ID=1";
$cursor=exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
{
$MANAGER_ID=$ROW["MANAGER_ID"];
$MANAGERS=$ROW["MANAGERS"];
}
$query = "SELECT * from USER,USER_PRIV where DEPT_ID=$LOGIN_DEPT_ID and find_in_set(USER.USER_ID,'$MANAGERS') and USER.USER_PRIV=USER_PRIV.USER_PRIV order by PRIV_NO,USER_NO,USER_NAME";
$cursor=exequery($connection,$query);
while($ROW=mysql_fetch_array($cursor))
{
$COUNT++;
$USER_ID=$ROW["USER_ID"];
$USER_NAME=$ROW["USER_NAME"];
?>
<option value="<?=$USER_ID?>"><?=$USER_NAME?></option>
<?
}
$query = "SELECT * from USER,USER_PRIV where DEPT_ID!=$LOGIN_DEPT_ID and find_in_set(USER.USER_ID,'$MANAGERS') and USER.USER_PRIV=USER_PRIV.USER_PRIV order by PRIV_NO,USER_NO,USER_NAME";
$cursor=exequery($connection,$query);
while($ROW=mysql_fetch_array($cursor))
{
$COUNT++;
$USER_ID=$ROW["USER_ID"];
$USER_NAME=$ROW["USER_NAME"];
?>
<option value="<?=$USER_ID?>"><?=$USER_NAME?></option>
<?
}
if($COUNT==0)
{
$query = "SELECT * from USER_PRIV where USER_PRIV=$LOGIN_USER_PRIV";
$cursor= exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
$PRIV_NO=$ROW["PRIV_NO"];
$query = "SELECT * from USER,USER_PRIV where USER.USER_PRIV=USER_PRIV.USER_PRIV and PRIV_NO<=$PRIV_NO order by PRIV_NO,USER_NO,USER_NAME";
$cursor= exequery($connection,$query);
while($ROW=mysql_fetch_array($cursor))
{
$USER_ID=$ROW["USER_ID"];
$USER_NAME=$ROW["USER_NAME"];
?>
<option value="<?=$USER_ID?>"><?=$USER_NAME?></option>
<?
}
}
?>
</select>
</td>
</tr>
<tr>
<td nowrap class="TableData">提醒:</td>
<td class="TableData">
<?
$query = "select * from SMS2_PRIV";
$cursor=exequery($connection,$query);
if($ROW=mysql_fetch_array($cursor))
$TYPE_PRIV=$ROW["TYPE_PRIV"];
if(find_id($TYPE_PRIV,6)) //检查该模块是否允许手机提醒
{
?>
<input type="checkbox" name="SMS2_REMIND" id="SMS2_REMIND" <?if($SMS2_REMIND=="1") echo "checked";?>><label for="SMS2_REMIND">使用手机短信提醒</label>
<?
}
?>
</td>
</tr>
<tr >
<td nowrap class="TableControl" colspan="2" align="center">
<input type="submit" value="确定" class="BigButton" title="申请出差">
<input type="button" value="返回" class="BigButton" onclick="location='../'">
</td>
</tr>
</form>
</table>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -