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