<?php if (!Tourists()){ header('refresh:0;url=index.php?act=olog'); exit; } ?>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title>我的QQ - <?=$configure['webname']?></title>
		<link rel="shortcut icon" href="favicon.ico">
		<link type="text/css" rel="stylesheet" href="./Style/Template/default/css/bootstrap.css" />
		<link rel="stylesheet" href="./Style/Template/default/css/base.css" />	
		<link rel="stylesheet" href="./Style/Template/default/css/user.css" />
		<link href="./Style/Template/default/css/header.css" rel="stylesheet" type="text/css" />
		<?php echo $Head_Code,$Tongji_Code; ?>
	</head>
	<body >
<br>
<!-- <script type="text/javascript" src="Style/Template/default/js/yxgq_1.js"></script>
<script type="text/javascript" src="Style/Template/default/js/yxgq_2.js"></script>
-->
<div class="container" style="height: 500px;">
<div class="container content" style="margin-top: -6px;">
	<div class="row" style="border-bottom:1px solid #dcdcdc;height:80px;margin-left:0px;">
	<div class="span4" style="line-height:80px; font-size:24px;font-weight:bold;text-align:left;margin-left:21px;">QQ信息</div>
	</div>
<form method="post" action="index.php?act=logout" id="logoutz"></form>
<form method="post" action="index.php?act=delete" id="delqq">
	<input name="mod" style="display:none" value="del"/>
	<div style="margin:20px;" class="row">
		<div style="height:38px;">
			<a class="btn btn-primary pull-left" onclick="aygq_open()" title="添加挂机记录，支持单个添加、批量添加">添加QQ</a>
			<button style="margin-left:10px;" onclick="checkform(this);" type="button" class="btn pull-left">删除选中</button>
			<div class="btn-group pull-right scanv-pager">
			<a class="btn pull-left" href="index.php?act=my">我的资料</a>
			<a style="margin-left:10px;" onclick="logout(this);" type="button" class="btn pull-left">安全退出</a>
	</div>
	
		</div>
		<br>
		<table id="site_table" class="table table-bordered">
			<thead>
				<tr style="background-color:#f5f5f5;">
				  <th class="ckbox"><div align="center"><input type="checkbox" name="checkName" onClick="funCheck(this)"></div></th>
				  <th class="show-report">ID</th>
				  <th class="domain">QQ号码</th>
				  <th class="domain">服务器</th>
				  <th class="show-report">QQ等级</th>
				  <th class="appeal_info">SID码</th>
				  <th class="appeal_info">SID自动更新</th>
				  <th class="appeal_info">挂Q失败次数</th>
				  <th class="appeal_info">快捷操作</th>
				</tr>
			</thead>
						<tbody>
<?php
  $qqlistsql = mysql_query("SELECT * FROM `qqlist` WHERE `myqq`='".AnYue_User."' ORDER BY `id` ASC");
  //服务器变量
  $fw['fw1'] = '<strong><font color="red">①号服务器</font></strong>';
  $fw['fw2'] = '<strong><font color="#FF00FF">②号服务器</font></strong>';
  $fw['fw3'] = '<strong><font color="#0000FF">③号服务器</font></strong>';
  $fw['fw4'] = '<strong><font color="#006400">④号服务器</font></strong>';
  $fw['fw5'] = '<strong><font color="#00BFFF">⑤号服务器</font></strong>';
  $fw['fw6'] = '<strong><font color="#8A2BE2">⑥号服务器</font></strong>';
  $fw['fw7'] = '<strong><font color="#CC0066">⑦号服务器</font></strong>';
  $fw['fw8'] = '<strong><font color="#FF9933">⑧号服务器</font></strong>';
  //SID更新变量
  $sid['yesno'] = '暂时未知';
  $sid['yes'] = '<font color="#0DC70D">√</font>';
  $sid['no'] = '<font color=red>×</font>';
  //挂Q失败次数处理函数
  function noc ($dls){
  if ($dls > 19){
  $dm = '<font color=#FF0000>即将删除</font>';
  }else if ($dls >= 15){
  $dm = '<font color=#990000>'.$dls.' 次</font>';
  }else if ($dls >= 10){
  $dm = '<font color=#FF00FF>'.$dls.' 次</font>';
  }else if ($dls >= 5){
  $dm = '<font color=#0000FF>'.$dls.' 次</font>';
  }else if ($dls == 3){
  $dm = '<font color=#990099>'.$dls.' 次</font>';
  }else if ($dls == 2){
  $dm = '<font color=#000066>'.$dls.' 次</font>';
  }else{
  $dm = $dls.' 次';
  }
  return $dm;
  }

while($qqlist = @mysql_fetch_array($qqlistsql)){

  $fwq = $qqlist['fwq']; //服务器
  $sidma = $qqlist['newsid']; //SID更新
  $nos = $qqlist['nos'];
  if ($qqlist['dj'] == 'hqz'){
  $dj = '获取中';
  }else{
  $dj = $qqlist['dj'];
  }
  if ($qqlist['qy'] == 'false'){
  $zt = '启动挂Q';
  $bjs = '#FFFF99';
  $gqts = '挂Q状态: 已暂停';
  $zttp = 'Start.png';
  $ztdz = 'index.php?act=AnYueGuaQ_qy&qq='.$qqlist['qq'].'&user='.$qqlist['myqq'];
  }else{
  $zt = '暂停挂Q';
  $bjs = '#CCFFFF';
  $gqts = '挂Q状态: 已启用';
  $zttp = 'Suspend.png';
  $ztdz = 'index.php?act=AnYueGuaQ_zt&qq='.$qqlist['qq'].'&user='.$qqlist['myqq'];
  }

  $tuic = '	QQ号码：'.$qqlist['qq'].'
	QQ等级：'.$dj.'
	QQ SID：'.$qqlist['sid'];

	$ID++;

  echo 
'
			<tr>
				  <td class="ckbox" bgcolor="'.$bjs.'"><div align="center"><input id="1" name="qid[]" value="'.$qqlist['qid'].'" type="checkbox"></div></td>
				  <td bgcolor="'.$bjs.'"><div align="center">'.$ID.'</div></td>
				  <td bgcolor="'.$bjs.'" title="'.$gqts.'"><div align="center">'.$qqlist['qq'].'</div></td>
				  <td bgcolor="'.$bjs.'"><span class="safe"><div align="center">'.$fw[$fwq].'</div></span></td>
				  <td bgcolor="'.$bjs.'"><div align="center">'.$dj.'</div></td>
				  <td bgcolor="'.$bjs.'"><div align="center">'.$qqlist['sid'].'</div></td>
				  <td bgcolor="'.$bjs.'"><div align="center">'.$sid[$sidma].'</div></td>
				  <td bgcolor="'.$bjs.'"><div align="center">'.noc ($qqlist['nos']).'</div></td>				  
				  <td bgcolor="'.$bjs.'"><div align="center">
				  <a href="'.$ztdz.'"><img src="Style/Template/default/images/'.$zttp.'" title="'.$zt.'" width="16" height="16" border="0" align="middle"></a>&nbsp;
				  <a href="javascript:;" onclick="aygq_config(\''.$qqlist['qq'].'\')"><img src="Style/Template/default/images/Modify.png" title="修改配置" width="16" height="16" border="0" align="middle"></a>&nbsp;
				  <a href="index.php?act=delete&qq='.$qqlist['qq'].'&qid='.$qqlist['qid'].'&lx=d"><img src="Style/Template/default/images/Delete.png" title="删除挂Q" width="16" height="16" border="0" align="middle"></a>
				  <object title="复制详情" type="application/x-shockwave-flash" data="Style/Template/default/images/clipboard.swf" width="16" height="16" id="forLoadSwf" style="visibility: visible; " name="forLoadSwf">
					<param name="movie" value="Style/Template/default/images/clipboard.swf" />
					<param name="wmode" value="transparent">
					<param name="allowScriptAccess" value="always">
					<param name="flashvars" value="content='.$tuic.'&amp;uri=Style/Template/default/images/Copy.png">
				  </object>
				  </div></td>
			</tr>
';
}
?>
</table>
<!-- 删除QQ -->
</form>
<script src="http://res.xiami.net/pc/lay/lib.js"></script>
<script src="./Style/Template/default/js/layer/layer.min.js"></script>

<script type="text/javascript">
//layer.use('./Style/Template/default/js/layer/extend/layer.ext.js');
function aygq_open (){
	$.layer({
		type: 2,
		shadeClose: true,
		title: '添加挂Q记录',
		closeBtn: [0, true],
		shade: [0.5, '#000'],
		shift: 'top',
		border: [10, 0.3, '#000'],
		area: ['480px', '265px'],
		iframe: {src: './Agreement/3G/qplus.php'},
		close: function(){location.reload(true);}
	});
}

function aygq_config (qq){
	$.layer({
		type: 2,
		shadeClose: true,
		title: 'QQ信息配置',
		closeBtn: [0, true],
		shade: [0.5, '#000'],
		shift: 'top',
		border: [10, 0.3, '#000'],
		area: ['500px', '325px'],
		iframe: {src: 'index.php?act=AnYueGuaQ_pz&qq='+qq},
	});
}

function funCheck (){
	var chk=document.getElementsByName('qid[]');
	if(document.getElementsByName('checkName')[0].checked){
		for(var i=0;i<chk.length;i++){
			chk[i].checked=true;
		}
	}else{
		for(var i=0;i<chk.length;i++){
			chk[i].checked=false;
		}
	}
}

function checkform (va){
	layer.confirm('您确定要删除选中的QQ吗？',function(){delqq.submit();},"删除");
}

function logout (va){
	layer.confirm('您确定要退出<?=$configure['webname']?>吗？',function(){logoutz.submit();},"退出");
}
</script>
</bdoy>
</html>
			</tbody>
		</table>	
	</div>
</form>
</div>
</div>