<? session_start();
if ($_SESSION['Company']==''){
//exit;
}
$path = dirname(__FILE__);
require_once($path.'/../../Module/Factory.php');
try {
$Factory = new Factory();
$BLL_Personel = $Factory->FactoryPersonnel();
$Personnel =new Personnel();
$Page=new Page();
if ($_GET['Page']=='')
{
$Page->Page=0;
}
else
{
$Page->Page=$_GET['Page'];
}
$Page->Pager=15;
$PersonnelList = $BLL_Personel->ScanPersonnel($Personnel,$Page);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title></title>
<link href="../Goods/goods.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="W500">
<div class="Title">员工列表</div>
<div class="ListTitle">
<div class="Items1" style="width:100px">员工帐户</div>
<div class="Items1" style="width:80px">员工姓名</div>
<div class="Items1" style="width:50px">性别</div>
<div class="Items1" style="width:120px">身份证号</div>
<div class="Items1" style="width:100px">电话</div>
<div class="Items1" style="width:50px">操作</div>
</div>
<?
if (count($PersonnelList)!=0) {
foreach ($PersonnelList as $Personnel){
?>
<div title="职位:<?echo $Personnel->Job->Title?><?echo chr(13)?>推荐人:<?if ($Personnel->Recommand->WebID!=''){echo $Personnel->Recommand->TrueName;}else{echo '无推荐人';}?><?echo chr(13)?>联系地址:<?echo $Personnel->Address?><?echo chr(13)?>Email:<?echo $Personnel->Email?><?echo chr(13)?>入职时间:<?echo date('Y年m月d日',$Personnel->JoinTime)?>" class="List" onmouseover="this.className='ListB'" onmouseout="this.className='List'">
<div class="Items1" style="width:80px">【<?echo $Personnel->WebID?>】</div>
<div class="Items1" style="width:100px; color:#FF0000"><?echo $Personnel->TrueName?></div>
<div class="Items1" style="width:50px"><?if ($Personnel->Sex) {echo '女';}else{echo '男';}?></div>
<div class="Items1" style="width:120px"><?echo $Personnel->Identity?></div>
<div class="Items1" style="width:100px"><?echo $Personnel->Tel?></div>
<div class="Items1" style="width:50px"><a href="../Personnel/EditPersonnel.php?WebID=<?echo $Personnel->WebID?>"><img alt="修改" src="../img/Edit.png" border="0" /></a> <a onclick="return Del()" href="../Personnel/DelPersonnel.php?WebID=<?echo $Personnel->WebID?>"><img alt="删除" src="../img/Del.png" border="0" /></a></div>
</div>
<?
}
}
?>
<div class="Page">
<?echo $Page->Page+1?>页/<?echo $Page->MaxPage+1?>页
<?
if ($Page->Page==0)
{
echo '首页';
}
else
{
echo ' <a href="listPersonel.php?Page=0">首页</a>';
}
?>
<?if ($Page->Page>0) {?>
<a href="listPersonel.php?Page=<?echo $Page->Page-1?>">上一页</a>
<?
}
else {
echo '上一页';
}
?>
<?if ($Page->Page<$Page->MaxPage) {?>
<a href="listPersonel.php?Page=<?echo $Page->Page+1?>">下一页</a>
<?
}
else {
echo '下一页';
}
?>
<?
if ($Page->Page==$Page->MaxPage)
{
echo '尾页';
}
else
{
echo '<a href="listPersonel.php?Page='.$Page->MaxPage.'">尾页</a>';
}
?>
共<?echo $Page->Sum?>条记录
</div>
</div>
</body>
</html>
<script language="javascript">
function Del()
{
if(!confirm('真的要删除这个员工吗?')) {
return false;
}
}
</script>
<?
}
catch (Exception $Err)
{
echo $Err->getMessage();
}
?>