⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 friend.php

📁 Download you own three BR
💻 PHP
字号:
<?php
require_once("functions/login_flag.php");//是否已经登录
require_once("functions/class_mysql.php");//加载数据库类文件

?>


<!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="css/id.css" rel="stylesheet" type="text/css">
<link href="css/css.css" rel="stylesheet" type="text/css">
<link type="text/css" href="css/build.css" rel="stylesheet">
<SCRIPT language="JavaScript">

function check_login(obj)
{
	if(obj.e_name.value==""){
		alert("请输入昵称!");
		obj.e_name.focus();
		return false;	
	}	
	login.style.display="none";
	logining.style.display="";
}


<!--
//屏蔽js错误
 function ResumeError() {
 return true;
 }
 window.onerror = ResumeError;
 // -->
</SCRIPT>
<style>
body{
margin-top:0px;
}
</style>

</head>

<body>
    
<!--导航-->
<?php require_once("diplomatism_daohang.htm");?>

<div id="mb_01">
	<div class="page_build_title">好友管理</div>
</div>
<div id="mb_04">

<!--替换区域开始-->

<table width="95%" border="0" cellspacing="0" cellpadding="0" style="margin-top:20px;">
  <tr align="center">
    <td height="20" colspan="2"><div align="center">
      <form id="form1" name="form1" method="post" action="add_friend.php" onsubmit="return check_login(this);">
        输入好友昵称:<input name="e_name" type="text" size="20" value="<?php echo $_GET['nickname'];?>" />
        <input type="submit" name="Submit" value="添加" />
      </form>
      </div></td>
  </tr>
  <?php
  $query=$db->query("SELECT * FROM friend where `f_uname`='".$_COOKIE["NickName"]."';");
  $query=$db->fetch_array($query);
  if($query){
  ?>
  <tr>
    <td width="392" height="25" >好友昵称</td>
    <td width="308" height="25" >操作</td>
  </tr>
  <?php } 
  $friend_num=explode(",",$query['f_nickname']);
  $sum=count($friend_num)-1;
  for ($i=0;$i<$sum;$i++)
  {
  ?>
  <tr>
    <td height="20"><?php echo $friend_num[$i];?></td>
    <td height="20"> <a href="message_put.php?e_username=<?php echo $friend_num[$i];?>">发消息</a>&nbsp;<a href="dele_friend.php?e_username=<?php echo $friend_num[$i];?>">删除好友</a></td>
  </tr>
  <?php
  }
  ?>
  
</table>
  
<!--替换区域结束-->
<div style="padding-bottom:<?php echo 260-$sum*20;?>px;"> </div>
</div>

</div>
<div id="mb_03"></div>

<?php $db->close();?>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -