📄 job_userinfo_select.php
字号:
<?php
session_start();
include "middle.php";
require_once "../MessageBox.php";
$Message = new MessageBox;
$page = $_REQUEST['page'];
$date = Date("Y-m-j");
if ( !empty($_SESSION["userid"]) ) {
include "../datasource.inc.php";
?>
<link href="../css/a1.css" rel="stylesheet" type="text/css">
<body leftmargin="0" topmargin="0">
<table width="789" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2"><img src="../images/home_12.jpg" width="789" height="12"></td>
</tr>
<tr>
<td width="776" valign="top">
<table width="776" border="0" cellspacing="0" cellpadding="0">
<tr>
<TD vAlign=top><FONT color=#565656> <IMG height=14
src="../images/closedfold.gif" width=14> 您当前的位置<BR> <IMG
height=15 src="../images/bar.gif" width=15> <IMG height=14
src="../images/openfold.gif" width=14> 管理客户资料</FONT></TD>
</tr>
</table>
<table width=766 border=0 cellspacing=0 cellpadding=0 align=right>
<tr><td width=766 height=1 bgcolor=#3494d4></td></tr>
</table><br>
<?php
//}else{
// include 'header1.htm$
if ( $_REQUEST['action'] == "delete") {
$query="delete from kfzl where id='$_REQUEST[id]'";
$result=mysql_query($query);
$Message->setMessage("删除成功!","job_userinfo_select.php");
$Message->showMessage();
}
echo "<table border=0 cellpadding=0 cellspacing=0 width=776>";
echo "<tr><td width=10 bgcolor=#ffffff></td>";
echo "<form action=\"job_userinfo_select.php\" method=post name=form onsubmit=\"return check_input()\">";
echo "<td><table width=766 border=0 cellpadding=0 cellspacing=0>";
echo "<tr>";
echo "<td align=left>公司名称(或联系人)</td>";
echo "<td align=left width=650>";
echo "<input type=text size=30 name=company maxlength=12 ><font color=red>为空查询全部 </font>";
//echo "</td>";
//echo "<td align=left width=300>";
echo "<input type=submit value=\"查询\" name=\"submit\">";
//echo "<input type=\"image\" src=\"../images/images/5.gif\" > <a href=\"job_userinfo_select.php\"><img src=\"../images/images/6.gif\" border=\"0\"></a>";
echo "</td>";
echo "</tr>";
echo "</table></td></table>";
echo "</form>";
if ( $_REQUEST['company']) {
if ($_SESSION['userjs'] == "2"){
$sql= "select * from kfzl where company like '%$_REQUEST[company]%' and 'department=$_SESSION[department]' order by id desc;";
} elseif ($_SESSION['userjs'] == "0") {
$sql= "select * from kfzl where company like '%$_REQUEST[company]%' order by id desc;";
} else {
$sql= "select * from kfzl where company like '%$_REQUEST[company]%' and 'userid=$_SESSION[userid]' order by id desc;";
}
} else {
if ($_SESSION['userjs'] == "2") {
$sql= "select * from kfzl where department='$_SESSION[department]' order by id desc;";
} elseif ($_SESSION['userjs'] == "0") {
$sql= "select * from kfzl order by id desc;";
} else {
$sql= "select * from kfzl where userid='$_SESSION[userid]' order by id desc;";
}
}
$result = mysql_query($sql);
$num = mysql_num_rows($result);
if ( $num > 0 ) {
$last = intval(($num-1)/20)+1; //A
if ( $page < 1 ) $page=1;
if ( $page > $last ) $page=$last;
mysql_data_seek($result,($page-1)*20); //A
echo "<center>";
echo "<table boder=0 cellpadding=0 cespacing=0 width=776>";
echo "<tr><td width=10 bgcolor=#ffffff></td>";
echo "<td><table border=0 cellpadding=0 cellspacing=1 bgcolor=#3494d4 width=766>";
echo "<tr height=24 bgColor=#3494d4>";
echo "<td width=246 align=center><font color=#ffffff><b>公司名称(联系人)</b></font></td>";
echo "<td width=200 align=center><font color=#ffffff><b>联系电话</b></font></td>";
echo "<td width=200 align=center><font color=#ffffff><b>填表时间</b></font></td>";
echo "<td width=60 align=center><font color=#ffffff><b>修改</b></font></td>";
echo "<td width=60 align=center><font color=#ffffff><b>删除</b></font></td>";
echo "</tr>";
for ($i=1;$i<=20;$i++) {
$row=mysql_fetch_array($result);
if ($row['id']) {
echo "<tr height=22 bgColor=#ffffff>";
echo "<td width=246><center><a href=# title=点击查看详细信息 onClick=\"window.open('user_text.php?id=$row[id]',$row[id],'top=50,left=50,height=450,width=450,scrollbars=yes')\">$row[company]</a></center></td>";
echo "<td width=200><center>$row[phone]</center></td>";
echo "<td width=200><center>$row[date]</center></td>";
echo "<td width=60 align=center><a href=job_userinfo_update.php?id=$row[id]&&action=update><img src=../images/editicon.gif border=0></a></td>";
echo "<td width=60 align=center><a href=job_userinfo_select.php?id=$row[id]&&action=delete onclick=\"return confirm('确定删除这笔记录吗')\"><img src=../images/clearicon.gif border=0></a></td>";
echo "</tr>";
}
}
echo "</table></td></table><br>";
echo "总共找到<font color=red>$num</font>条记录共,第<font color=red>$page</font>页,共<font color=red>$last</font>页。";
echo "<table width=600 border=0 cellspacing=0 cellpadding=0 height=24 bgcolor=#ebf5ff>";
echo "<tbody>";
echo "<tr>";
if ( $page <> 1 ) {
echo "<td align=center> <a href=select4_form.php?page=1>第一页</a></td>";
echo "<td align=center><a href=select4_form.php?page=".($page-1).">上一页</a></td>";
}
if ( $page <> $last ) {
echo "<td align=center><a href=select4_form.php?page=".($page+1).">下一页</a></td>";
echo "<td align=center><a href=select4_form.php?page=$last>最后一页</a></td>";
}
echo "</tbody>";
echo "</tr>";
echo "</table><br>";
echo "</center>";
} else {
echo "<br><center>对不起,没有找到符合条件的记录,请<a href=job_userinfo_select.php>重新录入</a>!</center>";
}
} else {
$Message->setMessage("对不起,您没有权限进入后台管理!","index.php");
$Message->showMessage();
}
?>
</td>
<td width="13" align="right" background="../images/home_16.jpg" height="457"> </td>
</tr>
<tr>
<td height="8" colspan="2" valign="top"><img src="../images/home_24.jpg" width="789"></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -