?? job_userinfo_select1.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_select1.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_select1.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_select1.php\"><img src=\"../images/images/6.gif\" border=\"0\"></a>";
echo "</td>";
echo "</tr>";
echo "</table></td></table>";
echo "</form>";
if ( $_REQUEST['company']) {
$sql= "select * from kfzl where company like '%$_REQUEST[company]%' and 'userid=$_SESSION[userid]' 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_select1.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>對不起,沒有找到符合條件的記錄!</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 + -