myfriend.htm
8.17 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!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=<?php echo $cfg_soft_lang; ?>" />
<title>我的好友 - 会员中心 - <?php echo $cfg_webname; ?></title>
<link href="templets/style/base.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="templets/js/j.js"></script>
<script type="text/javascript" src="templets/js/table_function.js"></script>
<script type="text/javascript" src="../include/dedeajax2.js"></script>
<script type="text/javascript" src="templets/js/load.js"></script>
<script type="text/javascript" src="templets/js/leftmenu.js"></script>
<script type="text/javascript">
//获得选中文件的文件名
function GetCheckfolderItem()
{
var allSel='';
if(document.form1.selid.value) return document.form1.selid.value;
for(i=0;i<document.form1.selid.length;i++)
{
if(document.form1.selid[i].checked)
{
if(allSel=='')
allSel=document.form1.selid[i].value;
else
allSel=allSel+","+document.form1.selid[i].value;
}
}
return allSel;
}
function DelSel(ftype)
{
var selid = GetCheckfolderItem();
if(selid=='') {
alert("你没选中任何好友!");
return false;
}
if(window.confirm("你确定要删除这些好友么?"))
{
location = "myfriend.php?dopost=del&ids="+selid+"&ftype="+ftype;
}
}
function ConvSta(sta,ftype)
{
var selid = GetCheckfolderItem();
var stamsg = '';
if(selid=='') {
alert("你没选中任何好友!");
return false;
}
if(sta=='good') stamsg = '加入关注的好友';
else if(sta=='bad') stamsg = '加入黑名单';
else stamsg = '改为普通好友';
if(window.confirm("你确定要把这些好友"+stamsg+"么?"))
{
location = "myfriend.php?dopost=upsta&sta="+sta+"&ids="+selid+"&ftype="+ftype;
}
}
function EditMemberGroup(mid)
{
var taget_obj = document.getElementById('mgp'+mid);
var myajax = new DedeAjax(taget_obj,false,false,"","","");
myajax.SendGet2("ajax_membergroup.php?action=show&mid="+mid);
DedeXHTTP = null;
}
function postMemberGroup(mid){
obj = document.getElementById('mgp'+mid);
v = document.getElementById('m_'+mid).value;
var myajax = new DedeAjax(obj,false,false,"","","");
<?php
if(strtolower(substr($cfg_soft_lang, 0, 3)) == 'utf') {
?>
myajax.AddKeyUtf8('action','post');
myajax.AddKeyUtf8('mid',mid);
myajax.AddKeyUtf8('membergroup',v);
myajax.SendPost2('ajax_membergroup.php');
<?php
}
elseif (strtolower(substr($cfg_soft_lang, 0, 2)) == 'gb') {
echo 'myajax.SendGet2("ajax_membergroup.php?action=show&mid="+mid+"&action=post&membergroup="+v);';
}
?>
DedeXHTTP = null;
}
function EditDescription(mid)
{
var taget_obj = document.getElementById('des'+mid);
var myajax = new DedeAjax(taget_obj,false,false,"","","");
myajax.SendGet2("ajax_membergroup.php?action=desshow&mid="+mid);
DedeXHTTP = null;
}
function postDescription(mid){
obj = document.getElementById('des'+mid);
v = document.getElementById('m_'+mid).value;
var myajax = new DedeAjax(obj,false,false,"","","");
<?php
if(strtolower(substr($cfg_soft_lang, 0, 3)) == 'utf') {
?>
myajax.AddKeyUtf8('action','post');
myajax.AddKeyUtf8('mid',mid);
myajax.AddKeyUtf8('mdescription',v);
myajax.SendPost2('ajax_membergroup.php');
<?php
}
elseif (strtolower(substr($cfg_soft_lang, 0, 2)) == 'gb') {
echo 'myajax.SendGet2("ajax_membergroup.php?action=desshow&mid="+mid+"&action=despost&mdescription="+v);';
}
?>
DedeXHTTP = null;
}
</script>
</head>
<body>
<div id="main">
<?php include(DEDEMEMBER."/templets/head.htm"); ?>
<div id="content" class="w960 clearfix">
<?php include(DEDEMEMBER."/templets/menu.php"); ?>
<div id="mcpmain">
<div id="appTab">
<ul>
<li class="thisTab"><a href="myfriend.php?ftype=0"><span>所有好友</span></a></li>
<li><a href="search.php"><span>查找好友</span></a></li>
<li><a href="visit-history.php?dopost=viewme"><span>关注我的人</span></a></li>
<li><a href="visit-history.php?dopost=meview"><span>我最近访问</span></a></li>
<li><a href="myfriend_group.php"><span>分组设置</span></a></li>
</ul>
</div>
<ul class="tabSub">
<li <?php echo ($ftype==0)? "class='thisTab'" : "";?>><a href="myfriend.php?ftype=0"><span>全部</span></a></li>
<li <?php echo ($ftype==1)? "class='thisTab'" : "";?>><a href="myfriend.php?ftype=1"><span>关注好友</span></a></li>
<li <?php echo ($ftype==-1)? "class='thisTab'" : "";?>><a href="myfriend.php?ftype=-1"><span>黑名单</span></a></li>
</ul>
<form name='form1' action="myfriend.php" method="post">
<input type='hidden' name='ftype' value='del' />
<div id="mainCp">
<h3 class="meTitle">
<?php if($ftype == '0') echo '所有好友';?>
<?php if($ftype == '1') echo '关注好友';?>
<?php if($ftype == '-1') echo '黑名单';?>
(<?php echo $dlist->totalResult;?>)
</h3>
<ul class="listStyle3">
{dede:datalist}
<li class="clearfix">
<div class="frdInfo">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" align="left" valign="middle" class="userTitle"><a href='index.php?uid=<?php echo urlencode($fields['floginid']); ?>' target='_blank'><?php echo $fields['funame']; ?></a>
<div class="fRight">
<input type="checkbox" name="selid" value="<? echo $fields['id']; ?>" />
</div ></td>
</tr>
<tr>
<td width="40%">资料:<?php echo getUserInfo($fields['fid'],'sex');?>
<?php
if(!getUserInfo($fields['fid'],'age')=="")
{
echo ",".getUserInfo($fields['fid'],'age')."岁";
echo ",".getUserInfo($fields['fid'],'birthday');
}
?></td>
<td class="doPost">分组:<span id="mgp<?php echo $fields['fid'];?>"> <?php echo $fields['groupname'];?> <a href="#" onclick="EditMemberGroup('<?php echo $fields['fid'];?>');return false;">修改</a></span></td>
<td align="right" class="doPost" width="20%"><a href="pm.php?dopost=send&uid=<?php echo urlencode($fields['floginid']); ?>">给他发短消息</a></td>
</tr>
<tr>
<td>E-Mail: <?php echo getUserInfo($fields['fid'],'email');?></td>
<td class="doPost">描述:<span id="des<?php echo $fields['fid'];?>"> <?php echo $fields['description'];?> <a href="#" onclick="EditDescription('<?php echo $fields['fid'];?>');return false;">修改</a></span></td>
<td align="right" class="doPost"><a href="index.php?action=delfriend&uid=<?php echo urlencode($fields['floginid']); ?>">解除好友关系</a></td>
</tr>
</table>
</div>
<img src="<?php echo getUserInfo($fields['fid'],'face');?>" width="60" height="60" /></li>
{/dede:datalist}
</ul>
<div class="listDo appMsg">
<div class="control fLeft">
<button id="checkedClick" type="button" class="greenBtn1">全选</button>
<button class="greenBtn1" onclick="DelSel('<?php echo $ftype; ?>');" type="button" >删除</button>
<?php if(empty($ftype)) { ?>
<button class="greenBtn1" onclick="ConvSta('good','<?php echo $ftype; ?>');" type="button" >关注</button>
<button class="greenBtn4" onclick="ConvSta('bad','<?php echo $ftype; ?>');" type="button" >加入黑名单</button>
<?php }else { ?>
<button class="greenBtn4" onclick="ConvSta('common','<?php echo $ftype; ?>');" type="button" >还原为普通</button>
<?php } ?>
</div>
<div class="pageList fRight">{dede:pagelist listsize=5 /}</div>
</div>
</div>
</form>
<!--主操作区域 -->
</div>
</div>
<?php include(DEDEMEMBER."/templets/foot.htm"); ?>
</div>
</body>
</html>