
<!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>
<?php include(DEDEMEMBER."/templets/head_inc.htm"); ?>
<title>我的好友 - <?php echo $cfg_webname; ?></title>
<link href="/templets/skin/cm.css" rel="stylesheet" type="text/css" />
<link href="/templets/skin/default.css" rel="stylesheet" type="text/css" />
<style>
 /* 分页
-------------------------------------------------------------------*/
.pages1 {
	font-size: 12px;
	clear: both;
	line-height: 15px;
	float:right;
}
.pages1 a,
.pages1 span {
	display: block;
	background: #fff;
	float: left;
	color: #4E5D80;
	margin-right:0.2em;
	padding:0.2em 0.5em;
	text-decoration: none;
	border: 1px solid #83867D;
}
.pages1 a:link, .pages a:visited {
	color:#4aa833;
	text-decoration:none;
}
.pages1 a:hover, .pages a:active {
	color:#fff;
	text-decoration:none;
	border: 1px solid #83867D;
	background-color: #83867D;
}
.pages1 strong {
	padding-right: 0.5em;
	padding-left: 0.5em;
	font-weight: bold;
	background: #8ac108;
	float: left;
	padding-bottom: 0.2em;
	color: #fff;
	padding-top: 0.2em;
	border: 1px solid #83867D;
	margin-right: 0.2em;
}</style>
<script type="text/javascript" language='javascript' src='js/main.js'></script>
<script language="javascript" type="text/javascript" src="/include/dedeajax2.js"></script>
<script language="javascript" type="text/javascript">
<!--
	function CheckLogin(){
	  var taget_obj = document.getElementById('_userlogin');
	  myajax = new DedeAjax(taget_obj,false,false,'','','');
	  myajax.SendGet2("/member/ajax_loginsta.php");
	  DedeXHTTP = null;
	}
-->
</script>
<script language="javascript" 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;
	}
}

</script>


</head>
<body>
<?php include(DEDEMEMBER."/templets/head.htm"); ?>


<div class="bgcolor_w con_2">
    <div class="fL_">
        <div class="bordercolor_g3 con_2L4">
            <div class="con_2L4t">
               <div id="newsfeed_2" class="con_2L4tL1  con_2L4tL2">
                        <a href="myfriend.php?ftype=0">所有好友</a>
                    </div>
					<div id="newsfeed_2" class="con_2L4tL1">
                        <a href="myfriend.php?ftype=1">我特别关注的人</a>
                    </div>
		            <div id="newsfeed_2" class="con_2L4tL1">
                        <a href="myfriend.php?ftype=-1">黑名单</a>
                    </div>
            </div>
          <div id="lblMyNotes">
		   <form name='form1' action="myfriend.php" method="post">
            <input type='hidden' name='ftype' value='del' />
            {dede:datalist}
		  <div style="background:#F2F2F2; border:1px solid #D8D8D8; margin-right:35px;" class="con_2L10cL" >
  <div class="con_2L10cL_L"> <a class="b2" href="index.php?uid=<?php echo urlencode($fields['floginid']); ?>" title="<?php echo $fields['funame']; ?>"><img src="<?php echo getUserInfo($fields['fid'],'face');?>" width="46" height="46" border="0"></a><br>
      <input type="checkbox" name="selid" value="<? echo $fields['id']; ?>" />
  </div>
  <div class="con_2L10cL_R"><div style="height:60px;"><a href="index.php?uid=<?php echo urlencode($fields['floginid']); ?>"><?php echo $fields['funame']; ?></a>
</div>
      <span style="display: block;"  class="msg"><a class="nom_un" href="pm.php?dopost=send&uid=<?php echo urlencode($fields['floginid']); ?>">发送消息</a></span> </div>
</div>
{/dede:datalist}
</form>
<div class="con_1line"></div>
<div class="fL_" style="margin-top:10px;">
<input class="btna" type="button" id="checkedClick" value="全选"  style="width:40px;"/>
<input class="btna" type="button" onclick="DelSel('<?php echo $ftype; ?>');" value="删除好友" style="width:70px;"/>
<?php if(empty($ftype)) { ?>
<input class="btna" type="button"  onclick="ConvSta('good','<?php echo $ftype; ?>');" value="关注好友" style="width:70px;"/>
<input class="btna" type="button"  onclick="ConvSta('bad','<?php echo $ftype; ?>');" value="加入黑名单" style="width:70px;"/>
<?php }else { ?>
<input class="btna" type="button"  onclick="ConvSta('common','<?php echo $ftype; ?>');" value="还原为普通" style="width:70px;"/>

 <?php } ?>
</div>  <div class="page_"><div class="pages1">{dede:pagelist listitem="end,pre,next,pageno" listsize="5"/}</DIV></div>
</div>

        </div>
    </div>
    
    <?php include(DEDEMEMBER."/templets/right.htm"); ?>
</div>

<div id="foot_"></div>
<?php include(DEDEMEMBER."/templets/foot.htm"); ?>
<div class="foot_bottom"></div> 
</body>
</html>
