Exemple #1
0
        					);
        					echo json_encode($fmdata);
        					exit();	
        				}
        				$hash = md5($code . $_W['config']['setting']['authkey']);
        				if($_GPC['__code'] != $hash) {					
        					$fmdata = array(
        						"success" => -1,
        						"msg" => '你输入的验证码不正确, 请重新输入.',
        					);
        					echo json_encode($fmdata);
        					exit();	
        					//message('你输入的验证码不正确, 请重新输入.');
        				}
        			}**/
        $tid = $user['id'];
        $content = $_GPC['content'];
        //$reply_id = $user['id'];
        $rdata = array('uniacid' => $uniacid, 'rid' => $rid, 'avatar' => $avatar, 'nickname' => $nickname, 'tfrom_user' => $tfrom_user, 'tid' => $tid, 'from_user' => $from_user, 'content' => $content, 'ip' => getip(), 'createtime' => time());
        $rdata['iparr'] = getiparr($rdata['ip']);
        pdo_insert($this->table_bbsreply, $rdata);
        $reply_id = pdo_insertid();
        pdo_update($this->table_bbsreply, array('storey' => $reply_id), array('uniacid' => $uniacid, 'rid' => $rid, 'id' => $reply_id));
        $msg = '评论成功!';
        //message($msg,$turl,'error');
        $fmdata = array("success" => 1, "msg" => $msg);
        echo json_encode($fmdata);
        exit;
        //message('评论成功!', referer(), 'success');
    }
}
Exemple #2
0
             $ymobile = pdo_fetch("SELECT * FROM " . tablename($this->table_users) . " WHERE uniacid = :uniacid and mobile = :mobile and rid = :rid", array(':uniacid' => $uniacid, ':mobile' => $_GPC['mobile'], ':rid' => $rid));
             if (!empty($ymobile)) {
                 //message('非常抱歉,此手机号码已经被注册,你需要更换注册手机号!');
                 $msg = '非常抱歉,此手机号码已经被注册,你需要更换注册手机号!';
                 $fmdata = array("success" => -1, "msg" => $msg);
                 echo json_encode($fmdata);
                 exit;
             }
         }
     }
 }
 $now = time();
 preg_match('/[a-zA-z]+:\\/\\/[^\\s]*/', $_GPC["youkuurl"], $matchs);
 $tyurl = str_replace(""", '', $matchs[0]);
 $udata = array('avatar' => $avatar, 'nickname' => $nickname, 'sex' => $sex, 'description' => $_GPC["description"], 'photoname' => $_GPC["photoname"], 'youkuurl' => $tyurl, 'realname' => $_GPC["realname"], 'mobile' => $_GPC["mobile"], 'weixin' => $_GPC["weixin"], 'qqhao' => $_GPC["qqhao"], 'email' => $_GPC["email"], 'job' => $_GPC["job"], 'xingqu' => $_GPC["xingqu"], 'address' => $_GPC["address"], 'status' => $reply['tpsh'] == 1 ? '0' : '1', 'lastip' => getip(), 'lasttime' => $now);
 $udata['iparr'] = getiparr($udata['lastip']);
 pdo_update($this->table_users, $udata, array('uniacid' => $uniacid, 'rid' => $rid, 'from_user' => $from_user));
 if ($reply['isfans']) {
     if ($avatar) {
         fans_update($from_user, array('avatar' => $avatar));
     }
     if ($mynickname) {
         fans_update($from_user, array('nickname' => $mynickname));
     }
     if ($reply['isrealname']) {
         fans_update($from_user, array('realname' => $realname));
     }
     if ($reply['ismobile']) {
         fans_update($from_user, array('mobile' => $mobile));
     }
     if ($reply['isqqhao']) {
Exemple #3
0
     $msg = '您总共可以给他投票' . $reply['allonetp'] . '次,您已经投完!';
     //message($msg,$turl,'error');
     $fmdata = array("success" => -1, "msg" => $msg);
     echo json_encode($fmdata);
     exit;
 } else {
     if ($dayonetp >= $reply['dayonetp']) {
         $msg = '您当前最多可以给他投票' . $reply['dayonetp'] . '次,您已经投完,请明天再来';
         //message($msg,$turl,'error');
         $fmdata = array("success" => -1, "msg" => $msg);
         echo json_encode($fmdata);
         exit;
         //exit;
     } else {
         $votedate = array('uniacid' => $uniacid, 'rid' => $rid, 'avatar' => $avatar, 'nickname' => $nickname, 'from_user' => $from_user, 'afrom_user' => $fromuser, 'tfrom_user' => $tfrom_user, 'ip' => getip(), 'createtime' => time());
         $votedate['iparr'] = getiparr($votedate['ip']);
         pdo_insert($this->table_log, $votedate);
         pdo_update($this->table_users, array('photosnum' => $user['photosnum'] + 1), array('rid' => $rid, 'from_user' => $tfrom_user, 'uniacid' => $uniacid));
         $tuservote = pdo_fetch("SELECT * FROM " . tablename($this->table_log) . " WHERE uniacid = :uniacid AND from_user = :from_user  AND tfrom_user = :tfrom_user AND rid = :rid", array(':uniacid' => $uniacid, ':from_user' => $from_user, ':tfrom_user' => $tfrom_user, ':rid' => $rid));
         if ($_W['account']['level'] == 4) {
             $this->sendMobileVoteMsg($tuservote, $from_user, $rid, $uniacid);
         }
         if (!empty($user['realname'])) {
             $user['realname'] = $user['realname'];
         } else {
             $user['realname'] = $user['nickname'];
         }
         $str = array('#编号#' => $user['id'], '#参赛人名#' => $user['realname']);
         $res = strtr($reply['votesuccess'], $str);
         $msg = '恭喜您成功的为编号为: ' . $user['id'] . ' ,姓名为: ' . $user['realname'] . ' 的参赛者投了一票!';
         $msg = empty($res) ? $msg : $res;
Exemple #4
0
 public function stopip($rid, $uniacid, $from_user, $mineip, $do, $ipturl = '0', $limitip = '2')
 {
     $starttime = mktime(0, 0, 0);
     $endtime = mktime(23, 59, 59);
     $times = '';
     $times .= ' AND createtime >=' . $starttime;
     $times .= ' AND createtime <=' . $endtime;
     $iplist = pdo_fetchall('SELECT * FROM ' . tablename($this->table_iplist) . ' WHERE uniacid= :uniacid  AND  rid= :rid order by `createtime` desc ', array(':uniacid' => $uniacid, ':rid' => $rid));
     $totalip = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename($this->table_log) . ' WHERE uniacid= :uniacid  AND rid= :rid AND ip = :ip ' . $times . '  order by `ip` desc ', array(':uniacid' => $uniacid, ':rid' => $rid, ':ip' => $mineip));
     if ($totalip > $limitip && $ipturl == 1) {
         $ipurl = $_W['siteroot'] . $this->createMobileUrl('stopip', array('from_user' => $from_user, 'rid' => $rid));
         header("location:{$ipurl}");
         die;
     }
     $totalip = pdo_fetchcolumn('SELECT COUNT(*) FROM ' . tablename($this->table_log) . ' WHERE uniacid= :uniacid  AND rid= :rid AND ip = :ip  ' . $times . ' order by `ip` desc ', array(':uniacid' => $uniacid, ':rid' => $rid, ':ip' => $mineip));
     $mineipz = sprintf("%u", ip2long($mineip));
     foreach ($iplist as $i) {
         $iparrs = iunserializer($i['iparr']);
         $ipstart = sprintf("%u", ip2long($iparrs['ipstart']));
         $ipend = sprintf("%u", ip2long($iparrs['ipend']));
         if ($mineipz >= $ipstart && $mineipz <= $ipend) {
             $ipdate = array('rid' => $rid, 'uniacid' => $uniacid, 'avatar' => $avatar, 'nickname' => $nickname, 'from_user' => $from_user, 'ip' => $mineip, 'hitym' => $do, 'createtime' => time());
             $ipdate['iparr'] = getiparr($ipdate['ip']);
             pdo_insert($this->table_iplistlog, $ipdate);
             if ($ipturl == 1) {
                 $ipurl = $_W['siteroot'] . $this->createMobileUrl('stopip', array('from_user' => $from_user, 'rid' => $rid));
                 header("location:{$ipurl}");
                 die;
             }
             break;
         }
     }
 }
Exemple #5
0
 * @url http://bbs.012wz.com/
 */
defined('IN_IA') or exit('Access Denied');
$from_user = $_GPC['from_user'];
//
$reply = pdo_fetch('SELECT * FROM ' . tablename($this->table_reply) . ' WHERE uniacid= :uniacid AND rid =:rid ', array(':uniacid' => $uniacid, ':rid' => $rid));
$qiniu = iunserializer($reply['qiniu']);
load()->func('file');
if (!empty($from_user)) {
    $mygift = pdo_fetch("SELECT * FROM " . tablename($this->table_users) . " WHERE uniacid = :uniacid and from_user = :from_user and rid = :rid", array(':uniacid' => $uniacid, ':from_user' => $from_user, ':rid' => $rid));
    $username = pdo_fetch("SELECT * FROM " . tablename($this->table_users_name) . " WHERE uniacid = :uniacid and from_user = :from_user and rid = :rid", array(':uniacid' => $uniacid, ':from_user' => $from_user, ':rid' => $rid));
}
$uid = pdo_fetch("SELECT uid FROM " . tablename($this->table_users) . " WHERE uniacid = :uniacid AND rid = :rid ORDER BY uid DESC, id DESC LIMIT 1", array(':uniacid' => $uniacid, ':rid' => $rid));
if (empty($mygift)) {
    $insertdata = array('rid' => $rid, 'uid' => $uid['uid'] + 1, 'uniacid' => $uniacid, 'from_user' => $from_user, 'avatar' => $avatar, 'nickname' => $nickname, 'sex' => $sex, 'photo' => '', 'description' => '', 'photoname' => '', 'realname' => '', 'mobile' => '', 'weixin' => '', 'qqhao' => '', 'email' => '', 'job' => '', 'xingqu' => '', 'address' => '', 'photosnum' => '0', 'xnphotosnum' => '0', 'hits' => '1', 'xnhits' => '1', 'yaoqingnum' => '0', 'createip' => getip(), 'lastip' => getip(), 'status' => '2', 'sharetime' => $now, 'createtime' => $now);
    $insertdata['iparr'] = getiparr($insertdata['lastip']);
    pdo_insert($this->table_users, $insertdata);
    if ($reply['isfans']) {
        if ($myavatar) {
            fans_update($from_user, array('avatar' => $myavatar));
        }
        if ($mynickname) {
            fans_update($from_user, array('nickname' => $mynickname));
        }
        if ($reply['isrealname']) {
            fans_update($from_user, array('realname' => $realname));
        }
        if ($reply['ismobile']) {
            fans_update($from_user, array('mobile' => $mobile));
        }
        if ($reply['isqqhao']) {