$sql="select * from game_member_sign where uid=$uid and game_code='ylc' and add_time < '".strtotime(date('Y-m-d'))."' and add_time > '".strtotime(date('Y-m-d',time()-(60*60*24)))."' order by add_time desc";
// $sql = "select * from ".get_table("game_global_task")." where uid=$uid and en_name='$taskEnName' and add_time > '".date('Y-m-d')."' order by add_time desc";
// $sql = "select * from ".get_table("game_member_sign")." where uid=$userid and game_code='hezi' and add_time < '".strtotime(date('Y-m-d'))."' and add_time > '".strtotime(date('Y-m-d',time()-(60*60*24)))."' order by add_time desc";
// $result = $GLOBALS["conn"]->Query($sql);
// $signInfo = $GLOBALS["conn"]->getOne($result);
$sql="select * from game_member_sign where uid=$uid and game_code='ylc' and add_time < '".strtotime(date('Y-m-d'))."' and add_time > '".strtotime(date('Y-m-d',time()-(60*60*24)))."' order by add_time desc";
// $today = $GLOBALS["conn"]->NumRows($GLOBALS["conn"]->Query("select * from ".get_table("game_member_sign")." where uid=$userid and game_code='hezi' and add_time > '".strtotime(date('Y-m-d'))."'"));
// $today = $GLOBALS["conn"]->NumRows($GLOBALS["conn"]->Query("select * from ".get_table("game_member_sign")." where uid=$userid and game_code='hezi' and add_time > '".strtotime(date('Y-m-d'))."'"));
$signWhere=array(
'uid'=>$uid
,'game_code'=>'ylc'
,'add_time'=>array('gt',strtotime(date('Y-m-d')))
);
$today=$signModel->where($signWhere)->count();
if($today>0){
//用户已签到
$result=array(
'c'=>2
,'msg'=>'用户已签到'
);
}else{
//获取用户签到信息(签到天数验证)
// $sql = "select * from ".get_table("game_member_sign")." where uid=$userid and game_code='hezi' and add_time < '".strtotime(date('Y-m-d'))."' and add_time > '".strtotime(date('Y-m-d',time()-(60*60*24)))."' order by add_time desc";
// $result = $GLOBALS["conn"]->Query($sql);
// $signInfo = $GLOBALS["conn"]->getOne($result);
$sql="select * from game_member_sign where uid=$uid and game_code='ylc' and add_time < '".strtotime(date('Y-m-d'))."' and add_time > '".strtotime(date('Y-m-d',time()-(60*60*24)))."' order by add_time desc";
// $sql = "select * from ".get_table("game_global_task")." where uid=$uid and en_name='$task_name' and status=2 and add_time > '".date('Y-m-d')."' order by add_time desc";
// $result = $GLOBALS["conn"]->Query($sql);
// $taskArr = $GLOBALS["conn"]->getOne($result);
$taskWhere=array(
'uid'=>$uid
,'status'=>2
,'add_time'=>array('gt',date('Y-m-d'))
);
$taskArr=$taskModel->where($taskWhere)->select();
if(!empty($taskArr)){
if(!empty($taskName)){
//获取对应任务金币数量
foreach($taskListas$key=>$val){
if($val['en_name']==$taskName){
$gold=$val['gold'];
}
}
$taskModel->startTrans();
//更新今日任务奖励状态
/*$tupdateArr = array(
'status'=>'3'
);
$twhere =" and uid=$uid and en_name='$task_name' and add_time > '".date('Y-m-d')."'";