📄 job_message.php
字号:
<td bgColor=#ffffff> <?php echo "<input type=text size=25 name=email maxlength=40 value=\"$row[email]\">";?></td>
<td bgColor=#ffffff align="center">网 址:</td>
<td bgColor=#ffffff> <?php echo "<input type=text size=25 name=http maxlength=40 value=\"$row[http]\">";?></td>
</tr>
<tr>
<td align="center" bgColor=#ffffff>备 注:</td>
<td colspan="3" bgColor=#ffffff> <textarea name="body" cols="65" rows="6"><?php echo "$body";?></textarea></td>
</tr>
</table></td></table>
<br>
<?php echo "<input type=hidden value=$row[id] name=id>";?>
<input type="hidden" value="update" name="action">
<? echo "<input type=hidden value=$_SESSION[department] name=department>" ?>
<input type="submit" name="submit" value=" 确 定 "> <input type="reset" name="submit1" value=" 重 置 ">
</form>
<?php
break;
default:
echo "<center>";
echo "<form action=job_message.php method=post>";
echo "<table border=0 width=776 cellpadding=0 cellspacing=0>";
echo "<tr>";
echo "<td width=10 bgcolor=#ffffff> </td>";
echo "<td bgColor=#ffffff align=left>";
echo "按姓名:<input type=text size=10 name=name maxlength=20>";
echo "公司:<input type=text size=10 name=company maxlength=20>";
echo "地址:<input type=text size=10 name=address maxlength=20>";
echo "公司电话:<input type=text size=10 name=phone1 maxlength=20>";
echo " <input type=submit value=搜索> 注:<font color=red>支持模糊查询</font>";
echo "</td>";
echo "</tr>";
echo "</table>";
echo "</form>";
if ($_SESSION['userjs']=="1") {
if ( !empty($_REQUEST['name']) and empty($_REQUEST['company']) and empty($_REQUEST['address']) and empty($_REQUEST['phone']) ){
$sql = "select * from job_message where name like '%$_REQUEST[name]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( empty($_REQUEST['name']) and !empty($_REQUEST['company']) and empty($_REQUEST['address']) and empty($_REQUEST['phone']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( empty($_REQUEST['name']) and empty($_REQUEST['company']) and !empty($_REQUEST['address']) and empty($_REQUEST['phone']) ){
$sql = "select * from job_message where address like '%$_REQUEST[address]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( empty($_REQUEST['name']) and empty($_REQUEST['company']) and empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where phone1 like '%$_REQUEST[phone1]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( !empty($_REQUEST['name']) and !empty($_REQUEST['company']) and empty($_REQUEST['address']) and empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where name like '%$_REQUEST[name]%' and company like '%$_REQUEST[company]%' and userid='$_SESSION[userid]' order by id asc;";
echo "aa";
}
if ( !empty($_REQUEST['name']) and empty($_REQUEST['company']) and !empty($_REQUEST['address']) and empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where name like '%$_REQUEST[name]%' and address like '%$_REQUEST[address]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( !empty($_REQUEST['name']) and empty($_REQUEST['company']) and empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where name like '%$_REQUEST[name]%' and phone1 like '%$_REQUEST[phone1]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( empty($_REQUEST['name']) and !empty($_REQUEST['company']) and !empty($_REQUEST['address']) and empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and address like '%$_REQUEST[address]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( empty($_REQUEST['name']) and !empty($_REQUEST['company']) and empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and phone1 like '%$_REQUEST[phone1]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( empty($_REQUEST['name']) and empty($_REQUEST['company']) and !empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where address like '%$_REQUEST[address]%' and phone1 like '%$_REQUEST[phone1]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( empty($_REQUEST['name']) and !empty($_REQUEST['company']) and !empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and address like '%$_REQUEST[address]%' and phone1 like '%$_REQUEST[phone1]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( !empty($_REQUEST['name']) and !empty($_REQUEST['company']) and empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and name like '%$_REQUEST[name]%' and phone1 like '%$_REQUEST[phone1]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( !empty($_REQUEST['name']) and !empty($_REQUEST['company']) and !empty($_REQUEST['address']) and empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and name like '%$_REQUEST[name]%' and address like '%$_REQUEST[address]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( !empty($_REQUEST['name']) and !empty($_REQUEST['company']) and !empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and name like '%$_REQUEST[name]%' and address like '%$_REQUEST[address]%' and phone1 like '%$_REQUEST[phone1]%' and userid='$_SESSION[userid]' order by id asc;";
}
if ( empty($_REQUEST['name']) and empty($_REQUEST['company']) and empty($_REQUEST['address']) and empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where userid='$_SESSION[userid]' order by id desc;";
}
} else if ($_SESSION['userjs']=="2") {
if ( !empty($_REQUEST['name']) and empty($_REQUEST['company']) and empty($_REQUEST['address']) and empty($_REQUEST['phone']) ){
$sql = "select * from job_message where name like '%$_REQUEST[name]%' and department='$_SESSION[department]' order by id asc;";
}
if ( empty($_REQUEST['name']) and !empty($_REQUEST['company']) and empty($_REQUEST['address']) and empty($_REQUEST['phone']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and department='$_SESSION[department]' order by id asc;";
}
if ( empty($_REQUEST['name']) and empty($_REQUEST['company']) and !empty($_REQUEST['address']) and empty($_REQUEST['phone']) ){
$sql = "select * from job_message where address like '%$_REQUEST[address]%' and department='$_SESSION[department]' order by id asc;";
}
if ( empty($_REQUEST['name']) and empty($_REQUEST['company']) and empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where phone1 like '%$_REQUEST[phone1]%' and department='$_SESSION[department]' order by id asc;";
}
if ( !empty($_REQUEST['name']) and !empty($_REQUEST['company']) and empty($_REQUEST['address']) and empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where name like '%$_REQUEST[name]%' and company like '%$_REQUEST[company]%' and department='$_SESSION[department]' order by id asc;";
echo "aa";
}
if ( !empty($_REQUEST['name']) and empty($_REQUEST['company']) and !empty($_REQUEST['address']) and empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where name like '%$_REQUEST[name]%' and address like '%$_REQUEST[address]%' and department='$_SESSION[department]' order by id asc;";
}
if ( !empty($_REQUEST['name']) and empty($_REQUEST['company']) and empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where name like '%$_REQUEST[name]%' and phone1 like '%$_REQUEST[phone1]%' and department='$_SESSION[department]' order by id asc;";
}
if ( empty($_REQUEST['name']) and !empty($_REQUEST['company']) and !empty($_REQUEST['address']) and empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and address like '%$_REQUEST[address]%' and department='$_SESSION[department]' order by id asc;";
}
if ( empty($_REQUEST['name']) and !empty($_REQUEST['company']) and empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and phone1 like '%$_REQUEST[phone1]%' and department='$_SESSION[department]' order by id asc;";
}
if ( empty($_REQUEST['name']) and empty($_REQUEST['company']) and !empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where address like '%$_REQUEST[address]%' and phone1 like '%$_REQUEST[phone1]%' and department='$_SESSION[department]' order by id asc;";
}
if ( empty($_REQUEST['name']) and !empty($_REQUEST['company']) and !empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and address like '%$_REQUEST[address]%' and phone1 like '%$_REQUEST[phone1]%' and department='$_SESSION[department]' order by id asc;";
}
if ( !empty($_REQUEST['name']) and !empty($_REQUEST['company']) and empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and name like '%$_REQUEST[name]%' and phone1 like '%$_REQUEST[phone1]%' and department='$_SESSION[department]' order by id asc;";
}
if ( !empty($_REQUEST['name']) and !empty($_REQUEST['company']) and !empty($_REQUEST['address']) and empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and name like '%$_REQUEST[name]%' and address like '%$_REQUEST[address]%' and department='$_SESSION[department]' order by id asc;";
}
if ( !empty($_REQUEST['name']) and !empty($_REQUEST['company']) and !empty($_REQUEST['address']) and !empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where company like '%$_REQUEST[company]%' and name like '%$_REQUEST[name]%' and address like '%$_REQUEST[address]%' and phone1 like '%$_REQUEST[phone1]%' and department='$_SESSION[department]' order by id asc;";
}
if ( empty($_REQUEST['name']) and empty($_REQUEST['company']) and empty($_REQUEST['address']) and empty($_REQUEST['phone1']) ){
$sql = "select * from job_message where department='$_SESSION[department]' order by id desc;";
}
}
$result = mysql_query($sql);
$num = mysql_num_rows($result);
if ( $num>0 ){
$last = intval(($num-1)/40)+1;
if ( $page < 1 ) $page=1;
if ( $page > $last ) $page=$last;
mysql_data_seek($result,($page-1)*40);
echo "<table border=0 cellpadding=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>";
echo "<td width=120 bgColor=#3494d4><div align=center><font color=#ffffff><b>姓名</b></font></div></td>";
echo "<td width=220 bgColor=#3494d4><div align=center><font color=#ffffff><b>性别</b></font></div></td>";
echo "<td width=266 bgColor=#3494d4><div align=center><font color=#ffffff><b>公司电话</b></font></div></td>";
echo "<td width=80 bgColor=#3494d4><div align=center><font color=#ffffff><b>编辑</b></font></div></td>";
echo "<td width=80 bgColor=#3494d4><div align=center><font color=#ffffff><b>删除</b></font></div></td>";
echo "</tr>";
for ( $i=0;$i<40;$i++ ) {
$row = mysql_fetch_array($result);
$id = $row['id'];
$singer_body = substr($row['singer_body'],0,30);
if ( $id ) {
echo "<tr bgColor=#ffffff height=22>";
echo "<td width=120 bgColor=#ffffff><div align=center><a href=# onClick=\"window.open('text.php?id=$row[id]',$row[id],'top=50,left=50,height=500,width=450,scrollbars=yes')\">$row[name]</a></div></td>";
echo "<td width=220 bgColor=#ffffff><div align=center>$row[sex]</div></td>";
echo "<td width=266 bgColor=#ffffff><div align=center>$row[phone1]</div></td>";
echo "<td width=80 bgColor=#ffffff><div align=center><a title=点击编辑联系人信息 href=job_message.php?page=update&id=$row[id]><img src=../images/editicon.gif border=0></a></div></td>";
echo "<td width=80 bgColor=#ffffff><div align=center><a title=点击删除记录 href=job_message.php?page=delete&id=$row[id] onclick=\"return confirm('是否确定删除此记录')\"><img src=../images/clearicon.gif border=0></a></div></td>";
echo "</tr>";
}
}
echo "</table></td></table><br>";
echo "<table width=500 border=0 cellspacing=0 cellpadding=0 height=24>";
echo "<tbody>";
echo "<tr><td><center>";
echo "总共找到<font color=red>$num</font>条记录,第<font color=red>$page</font>页,共<font color=red>$last</font>页。";
echo "</center></td></tr><tr>";
if ( $page <> 1 ) {
echo "<td align=center> <a href=job_message.php?page=1>第一页</a></td>";
echo "<td align=center><a href=job_message.php?page=".($page-1).">上一页</a></td>";
}
if ( $page <> $last ) {
echo "<td align=center><a href=job_message.php?page=".($page+1).">下一页</a></td>";
echo "<td align=center><a href=job_message.php?page=$last>最后一页</a></td>";
}
echo "</tbody>";
echo "</tr>";
echo "</table><br>";
echo "</center>";
} else {
echo "<center>对不起,找不到符合条件的记录!</center>";
}
break;
}
} 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" height="8"></td>
</tr>
</table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -