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

📄 index.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 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.LEAVE_TYPE.value=="")
   { alert("请假原因不能为空!");
     return (false);
   }

   if(document.form1.LEAVE_DATE1.value=="")
   { alert("请假开始日期不能为空!");
     return (false);
   }

   if(document.form1.LEAVE_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");
}
function td_clock(fieldname)
{
  myleft=document.body.scrollLeft+event.clientX-event.offsetX-80;
  mytop=document.body.scrollTop+event.clientY-event.offsetY+140;

  window.showModalDialog("/inc/clock.php?FIELDNAME="+fieldname,self,"edge:raised;scroll:0;status:0;help:0;resizable:1;dialogWidth:280px;dialogHeight:120px;dialogTop:"+mytop+"px;dialogLeft:"+myleft+"px");
}
</script>
</head>

<body class="bodycolor" topmargin="5" onload="document.form1.LEAVE_TYPE.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 H:i:s",time());
?>

<table align="center">
<tr>
<td>
  <form action="submit.php"  method="post" name="form1" class="big1" onsubmit="return CheckForm();">
  <b>
    因 <input type="text" name="LEAVE_TYPE" size="30" maxlength="50" class="BigInput">
    <br>
    由 <input type="text" name="LEAVE_DATE1" size="20" maxlength="22" class="BigInput" value="<?=$CUR_DATE?>">
    <img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar('form1.LEAVE_DATE1');">
    <img src="/images/menu/clock.gif" border="0" style="cursor:hand" onclick="td_clock('form1.LEAVE_DATE1');">
    至 <input type="text" name="LEAVE_DATE2" size="20" maxlength="22" class="BigInput" value="<?=$CUR_DATE?>">
    <img src="/images/menu/calendar.gif" border="0" style="cursor:hand" onclick="td_calendar('form1.LEAVE_DATE2');">
    <img src="/images/menu/clock.gif" border="0" style="cursor:hand" onclick="td_clock('form1.LEAVE_DATE2');">
    <br>
    向 <select name="LEADER_ID" class="BigSelect">
<?
      $connection=OpenConnection();
      $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);echo $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>
<?
$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>
<?
}
?>        
        
    <input type="submit" value="请假" class="BigButton" title="请假登记"><br><br>
    <center>
    <input type="button" value="返回上页" class="BigButton" onclick="location='../'">
    </center>
  </b>
  </form>
  </td>
  </tr>
</table>

</body>
</html>

⌨️ 快捷键说明

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