include_once("inc/auth.php");
include_once("inc/check_type.php");
include_once("inc/utility_org.php");
include_once("check_priv.php");
?>
人事合同到期
function operate(USER_ID)
{
window.opener.location="hrms.php?USER_ID="+USER_ID+"&SOURCE=remind";
window.close();
}
$query=" and b.DEPT_ID!='0' and CONTRACT_DATE2!='0000-00-00'";
if($QUERY_DATE1!="")
$query.=" and (CONTRACT_DATE2>='$QUERY_DATE1')";
if($QUERY_DATE2!="")
$query.=" and (CONTRACT_DATE2 $query1="select * from HRMS a
LEFT OUTER JOIN USER b ON a.USER_ID = b.USER_ID
LEFT OUTER JOIN DEPARTMENT f ON b.DEPT_ID=f.DEPT_ID
LEFT OUTER JOIN USER_PRIV g ON b.USER_PRIV=g.USER_PRIV";
$query1.=" where 1=1";
$query1.=$query.$WHERE_STR;
$cursor= exequery($connection,$query1);//echo $query1;
$HRMS_COUNT=0;
while($ROW=mysql_fetch_array($cursor))
{
$DEPT_ID=$ROW["DEPT_ID"];
$USER_ID=$ROW["USER_ID"];
$HRMS_COUNT++;
}
if($HRMS_COUNT!=0)
{
?>
合同到期人员
共 条信息
$HRMS_COUNT=0;
$query1="select * from HRMS a
LEFT OUTER JOIN USER b ON a.USER_ID = b.USER_ID
LEFT OUTER JOIN DEPARTMENT f ON b.DEPT_ID=f.DEPT_ID
LEFT OUTER JOIN USER_PRIV g ON b.USER_PRIV=g.USER_PRIV";
$query1.=" where 1=1";
$query1.=$query.$WHERE_STR;
$cursor= exequery($connection,$query1);//echo $query1;
while($ROW=mysql_fetch_array($cursor))
{
$NATIVE_PLACENAME="";
$USER_ID=$ROW["USER_ID"];
$USER_NAME=$ROW["USER_NAME"];
$DEPT_NAME=$ROW["DEPT_NAME"];
$DEPT_ID=$ROW["DEPT_ID"];
$SEX=$ROW["SEX"];
$HR_BIRTHDAY=$ROW["HR_BIRTHDAY"];
$CONTRACT_DATE1=$ROW["CONTRACT_DATE1"];
$CONTRACT_DATE2=$ROW["CONTRACT_DATE2"];
$query1 = "SELECT CODE_NAME from SYS_CODE where PARENT_NO='AREA' and CODE_NO='$NATIVE_PLACE'";
$cursor1= exequery($connection,$query1);
if($ROW=mysql_fetch_array($cursor1))$NATIVE_PLACENAME=$ROW["CODE_NAME"];
$HRMS_COUNT++;
if($SEX=="0")
$SEX_DESC="男";
else if($SEX=="1")
$SEX_DESC="女";
else
$SEX_DESC="";
if($HR_BIRTHDAY=="0000-00-00"||$HR_BIRTHDAY=="1900-01-01")
$HR_BIRTHDAY="";
if($HRMS_COUNT==1)
{
?>
部门
姓名
性别
合同期
操作
}
?>
至
}
?>
}
else
{
Message("","无符合条件的记录!");
}
?>