<?php
include_once "test-conn.php";

$qid=is_numeric($_GET['qid'])?$_GET['qid']:exit('No Qid!');
$result = mysql_query("SELECT * FROM {$tableqz}qqs where qid='{$qid}' and isjfqd>0 and sidzt=0 limit 1");
if($row=mysql_fetch_array($result)){
	$uin=$row['qq'];
	$sid=$row['sid'];
	$skey=$row['skey'];
	$p_skey=$row['p_skey'];
	$p_skey2=$row['p_skey2'];
	$do=$row['isdel'];
	$now=date("Y-m-d-H:i:s");
	@mysql_query("update {$tableqz}qqs set lastjfqd='$now',nextjfqd='$now' where qid='$qid'");
	include_once "qzone.class.php";
	$qzone=new qzone($uin,$sid,$skey,$p_skey,$p_skey2);
	$qzone->jfqd();
	include_once "mail.php";
	print_r($qzone->msg);
}else{
	exit('请先开启积分商城功能');
}