Example #1
0
function check_member_voice()
{
    $uid = MooGetGPC('uid', 'string');
    $sql = "select a.birthyear,a.gender,b.uid,b.toshoot_voice_check,b.toshoot_voice_url from {$GLOBALS['dbTablePre']}certification b left join {$GLOBALS['dbTablePre']}members a on a.uid=b.uid where b.uid={$uid}";
    $member_voice = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
    $value = array();
    //录音存储路径
    $path_url = strtolower(substr($_SERVER['SERVER_PROTOCOL'], 0, strpos($_SERVER['SERVER_PROTOCOL'], '/'))) . '://' . $_SERVER['HTTP_HOST'];
    $voice_path = $path_url . '/' . $member_voice['toshoot_voice_url'] . '/voi_' . $uid . '.flv';
    if ($_POST) {
        $is_pass = MooGetGPC('pass', 'string');
        $is_onpass = MooGetGPC('nopass', 'string');
        if ($is_onpass) {
            if ($member_voice['toshoot_voice_check'] == 2) {
                $sql = "update {$GLOBALS['dbTablePre']}certification set toshoot_voice_check='1' where uid={$uid}";
                $GLOBALS['_MooClass']['MooMySQL']->query($sql);
            }
            if (MOOPHP_ALLOW_FASTDB) {
                $value['toshoot_video_check'] = 1;
                MooFastdbUpdate('certification', 'uid', $uid, $value);
            }
            sendusermessage($uid, "尊敬的红娘会员,您的录音不符合要求,请重新录音!", "录音审核");
            echo "<script>alert('审核不通过!')</script>";
            exit;
        } elseif ($is_pass) {
            $sql = "update {$GLOBALS['dbTablePre']}certification set toshoot_voice_check='2' where uid={$uid}";
            $GLOBALS['_MooClass']['MooMySQL']->query($sql);
            if (MOOPHP_ALLOW_FASTDB) {
                $value['toshoot_video_check'] = 2;
                MooFastdbUpdate('certification', 'uid', $uid, $value);
            }
            sendusermessage($uid, "尊敬的红娘会员,您的录音已经通过红娘的审核!", "录音审核");
            echo "<script>alert('审核通过!');window.history.go(-1);</script>";
            exit;
        }
    }
    require_once adminTemplate('check_member_voice');
}
Example #2
0
File: ajax.php Project: noikiy/zays
function ajax_check_introduce()
{
    global $dbTablePre;
    $ajax = MooGetGPC('ajax', 'integer', 'P');
    $pass = MooGetGPC('pass', 'integer', 'P');
    $introduce = MooGetGPC('introduce', 'string', 'P');
    $uid = MooGetGPC('uid', 'integer', 'P');
    $sid = MooGetGPC('sid', 'integer', 'P');
    if (in_array($GLOBALS['groupid'], array('67', '70')) && $sid == 1) {
        echo -1;
        exit;
    }
    //审核内心独白
    if ($ajax == 1) {
        if ($pass == 1) {
            //审核通过
            $sql = "SELECT uid FROM {$GLOBALS['dbTablePre']}members_introduce where uid='{$uid}' and introduce_pass=1 and introduce!=''";
            $pass_have = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql);
            if (isset($pass_have['uid'])) {
                echo $pass;
                exit;
            }
            //已经审核通过的直接退出
            $sql = "UPDATE {$GLOBALS['dbTablePre']}members_introduce SET `introduce`=`introduce_check`,`introduce_check`='',`introduce_pass`='1' WHERE `uid`='{$uid}'";
            $GLOBALS['_MooClass']['MooMySQL']->query($sql);
            serverlog(3, $dbTablePre . "members_introduce", $GLOBALS['username'] . "审核会员" . $uid . "的内心独白为通过", $GLOBALS['adminid'], $uid);
            if (MOOPHP_ALLOW_FASTDB) {
                $old_introduce = MooFastdbGet("members_introduce", 'uid', $uid);
                $value['introduce'] = $old_introduce['introduce_check'];
                $value['introduce_check'] = '';
                $value['introduce_pass'] = 1;
                MooFastdbUpdate("members_introduce", 'uid', $uid, $value);
            }
        } else {
            //审核不通过
            $sql = "UPDATE {$GLOBALS['dbTablePre']}members_introduce SET `introduce_check`=`introduce`,`introduce`='',`introduce_pass`='0' WHERE `uid`='{$uid}'";
            $GLOBALS['_MooClass']['MooMySQL']->query($sql);
            serverlog(3, $dbTablePre . "members_introduce", $GLOBALS['username'] . "审核会员" . $uid . "的内心独白为不通过", $GLOBALS['adminid'], $uid);
            if (MOOPHP_ALLOW_FASTDB) {
                $value['introduce'] = '';
                $value['introduce_check'] = '';
                $value['introduce_pass'] = 0;
                MooFastdbUpdate("members_introduce", 'uid', $uid, $value);
            }
        }
        echo $pass;
        exit;
    }
    //修改内心独白
    if ($ajax == 2) {
        /* $updatecarr = array();
        			$updatecarr['introduce_check'] = $introduce;
        						
        			$where_arr=array('uid'=>$uid);
        			updatetable('members_introduce',$updatecarr,$where_arr);
        			
        			//更新缓存
        			if(MOOPHP_ALLOW_FASTDB){
        				$value['introduce_check'] = $introduce;
        				MooFastdbUpdate("members_introduce",'uid',$uid,$value);
        			}
        			echo 'ok';exit; */
        //修改内心独白并提交
        $updatecarr = array();
        $updatecarr['introduce'] = $introduce;
        $updatecarr['introduce_check'] = '';
        $updatecarr['introduce_pass'] = '******';
        $where_arr = array('uid' => $uid);
        updatetable('members_introduce', $updatecarr, $where_arr);
        //更新缓存
        if (MOOPHP_ALLOW_FASTDB) {
            $value['introduce'] = $introduce;
            $value['introduce_check'] = '';
            $value['introduce_pass'] = '******';
            MooFastdbUpdate("members_introduce", 'uid', $uid, $value);
        }
        echo 1;
        exit;
    }
    //提醒
    if ($introduce != '' || $pass == 1) {
        sendusermessage($uid, "尊敬的红娘会员,您的内心独白已经过红娘的审核", "内心独白审核");
    } else {
        sendusermessage($uid, "尊敬的红娘会员,您的内心独白不符合要求,请按要求填写", "内心独白审核");
    }
    serverlog(3, $dbTablePre . "members_introduce", $GLOBALS['username'] . "审核会员" . $uid . "的内心独白", $GLOBALS['adminid'], $uid);
}