<?php

	@set_time_limit(0);
	@ignore_user_abort(true);

	require '../siteinfo.php';

	if (@$_GET['job'] != $websitejob){
		die ('Parameter error!');
	}

	$localhost = mysql_connect ($sqlhost,$sqluser,$sqlpass)or die ('连接数据库失败，请联系网站管理员！');
	mysql_select_db ($sqldata,$localhost);

	$result = mysql_query ('SELECT * FROM `qqlist`');

	while ($row = mysql_fetch_array ($result)){
		mysql_query ("UPDATE `qqlist` SET `nos`='0' WHERE `qq`='$row[qq]' and qid='$row[qid]';");
		echo "<h5>$row[qq] --- 处理成功</h5>";
	}





	###挂Q数量较少，暂不启用此功能！###

	/*

	require '../header.php';
	mysql_query ('SELECT COUNT(id) FROM `qqlist`');
	$result = mysql_query ('SELECT * FROM `qqlist`');

	while($row=mysql_fetch_array($result)){
		if ($row['nos'] > 299){
			mysql_query ("DELETE FROM `{$row['fwq']}` WHERE `qq`='$row[qq]' and `qid`='$row[qid]'");
			mysql_query ("DELETE FROM `qqlist` WHERE `qq`='$row[qq]' and `qid`='$row[qid]'");
			$user = mysql_fetch_array (mysql_query ("SELECT * FROM `user` WHERE `user`='$row[myqq]'"));
			Send_out_Mail ($user['email'],"[{$configure[webname]}] 失效QQ删除通知","<h3>被删除QQ号: <font color='red'>$row[qq]</font></h3><br><h3>号码删除原因: <font color='blue'>此QQ挂机失败次数超过300次，为确保服务器性能稳定、保证其他用户挂机不受影响，系统自动删除！</font></h3><br><h3>其他说明: 若您对此结果不满或给予我们更好的建议，请加入我们的官方QQ群（242958579）交流讨论！</h3><br><br><br>".date ('Y-m-d H:i:s'));
			echo "<h5>用户: $row[myqq] --- QQ: $row[qq] --- 删除成功</h5>";
		}
	}

	*/

