$setting['vote']['voteendtime']){
showmessage(lang('plugin/xj_event', 'tpyjjs'));
}
}
if($setting['vote']['ipcheck'] == 1){
$votes = DB::result_first("SELECT COUNT(*) FROM ".DB::table('xj_event_vote_log')." WHERE tid='$tid' and ip='$ip' AND votetime>$votechecktime");
if($votes>=$votechecknumber){
showmessage(lang('plugin/xj_event', 'mei').$votecheckhour.lang('plugin/xj_event', 'xsznt').$votechecknumber.lang('plugin/xj_event', 'pqshztp'));
}
}
if($setting['vote']['usercheck'] == 1){
if($uid==0){
showmessage(lang('plugin/xj_event', 'ykwftpqdl'));
}
$votes = DB::result_first("SELECT COUNT(*) FROM ".DB::table('xj_event_vote_log')." WHERE tid='$tid' and uid='$uid' AND votetime>$votechecktime");
if($votes>=$votechecknumber){
showmessage(lang('plugin/xj_event', 'mei').$votecheckhour.lang('plugin/xj_event', 'xsznt').$votechecknumber.lang('plugin/xj_event', 'pqshztp'));
}
}
if($_GET['formhash'] != $_G['formhash']){
showmessage('submit_invalid');
}
DB::query("INSERT INTO ".DB::table('xj_event_vote_log')." (eid,tid,uid,ip,votetime) VALUES ($eid,$tid,$uid,'$ip',$nowtime)");
DB::query("UPDATE ".DB::table('xj_eventthread')." set votes = votes+1 WHERE tid = '$tid'");
$items = DB::fetch_first("SELECT votes FROM ".DB::table('xj_eventthread')." WHERE tid='$tid'");
showmessage(lang('plugin/xj_event', 'dqps').'
'.lang('plugin/xj_event', 'tpcg'));
?>