index.php 1015 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. require("../../../class/connect.php");
  3. require("../../../class/q_functions.php");
  4. require("../../../class/db_sql.php");
  5. require("../../class/user.php");
  6. require('../../class/friendfun.php');
  7. $link=db_connect();
  8. $empire=new mysqlquery();
  9. $editor=2;
  10. eCheckCloseMods('member');//关闭模块
  11. $user=islogin();
  12. $enews=RepPostStr($_GET['enews'],1);
  13. if(empty($enews))
  14. {
  15. $enews="AddFriend";
  16. }
  17. $r=array();
  18. $fid=0;
  19. $word="添加好友";
  20. $fcid=(int)$_GET['fcid'];
  21. if($fcid)
  22. {
  23. $r['cid']=$fcid;
  24. }
  25. $fname=RepPostStr($_GET['fname'],1);
  26. //修改
  27. if($enews=="EditFriend")
  28. {
  29. $fid=(int)$_GET['fid'];
  30. if(empty($fid))
  31. {
  32. printerror("ErrorUrl","",1);
  33. }
  34. $r=$empire->fetch1("select fid,fname,cid,fsay from {$dbtbpre}enewshy where fid=$fid and userid='$user[userid]'");
  35. if(empty($r['fid']))
  36. {
  37. printerror("ErrorUrl","",1);
  38. }
  39. $fname=$r['fname'];
  40. $word="修改好友";
  41. }
  42. $select=ReturnFriendclass($user['userid'],$r['cid']);
  43. //导入模板
  44. require(ECMS_PATH.'e/template/member/AddFriend.php');
  45. db_close();
  46. $empire=null;
  47. ?>