function check_member_video() { $uid = MooGetGPC('uid', 'string'); $sql = "select a.birthyear,a.gender,b.uid,b.toshoot_video_url,b.toshoot_video_check from {$GLOBALS['dbTablePre']}certification b left join {$GLOBALS['dbTablePre']}members a on a.uid=b.uid where b.uid={$uid}"; $member_video = $GLOBALS['_MooClass']['MooMySQL']->getOne($sql); $value = array(); //视频存储路径 $path_url = strtolower(substr($_SERVER['SERVER_PROTOCOL'], 0, strpos($_SERVER['SERVER_PROTOCOL'], '/'))) . '://' . $_SERVER['HTTP_HOST']; $cs_path = videoPathEncrypt($path_url . '/' . $member_video['toshoot_video_url'] . '/mov_' . $uid . '.flv'); if ($_POST) { $is_pass = MooGetGPC('pass', 'string'); $is_onpass = MooGetGPC('nopass', 'string'); if ($is_onpass) { if ($member_video['toshoot_video_check'] == 2) { $sql = "update {$GLOBALS['dbTablePre']}certification set toshoot_video_check='1',video_check='2' where uid={$uid}"; $GLOBALS['_MooClass']['MooMySQL']->query($sql); } if (MOOPHP_ALLOW_FASTDB) { $value['toshoot_video_check'] = 1; $value['video_check'] = 2; MooFastdbUpdate('certification', 'uid', $uid, $value); } sendusermessage($uid, "尊敬的红娘会员,您的视频不符合要求,请重新录制视频!", "视频审核"); echo "<script>alert('审核不通过!')</script>"; exit; } elseif ($is_pass) { $sql = "update {$GLOBALS['dbTablePre']}certification set toshoot_video_check='2',video_check='3' where uid={$uid}"; $GLOBALS['_MooClass']['MooMySQL']->query($sql); if (MOOPHP_ALLOW_FASTDB) { $value['toshoot_video_check'] = 2; $value['video_check'] = 3; MooFastdbUpdate('certification', 'uid', $uid, $value); } sendusermessage($uid, "尊敬的红娘会员,您的视频已经通过红娘的审核!", "视频审核"); echo "<script>alert('审核通过!');window.history.go(-1);</script>"; exit; } } require_once adminTemplate('check_member_video'); }
function space_video() { global $_MooClass, $dbTablePre, $userid, $user_arr, $style_user_arr, $diamond, $last_login_time; $uid = $GLOBALS['style_uid']; $c = MooGetData('members_choice', 'uid', $userid); $vid = MooGetGPC('vid', 'integer', 'G'); $sql = "select * from {$dbTablePre}video where uid='{$uid}' and status='2' order by sort desc"; $video_list = $_MooClass['MooMySQL']->getAll($sql); if (!empty($video_list)) { if ($vid) { foreach ($video_list as $video) { if ($video['vid'] == $vid) { $default_video_name = md5($video['vid'] . MOOPHP_AUTHKEY); $default_video_pic = MOOPHP_URL . substr($video['filepath'], 2) . '/pic/' . $default_video_name . '_' . $video['pic'] . '.jpg'; $video_subject = $video['subject']; $video_dateline = date("Y-m-d", $video['dateline']); $video_intro = $video['intro']; $video_expert_comment = $video['expert_comment']; break; } } } else { $default_video_name = md5($video_list[0]['vid'] . MOOPHP_AUTHKEY); $default_video_pic = MOOPHP_URL . substr($video_list[0]['filepath'], 2) . '/pic/' . $default_video_name . '_' . $video_list[0]['pic'] . '.jpg'; $video_subject = $video_list[0]['subject']; $video_dateline = date("Y-m-d", $video_list[0]['dateline']); $video_intro = $video_list[0]['intro']; $video_expert_comment = $video_list[0]['expert_comment']; $vid = $video_list[0]['vid']; } } //视频path $path = isset($video_list[0]['filepath']) ? videoPathEncrypt(MOOPHP_URL . substr($video_list[0]['filepath'], 2) . '/' . $default_video_name . '.flv') : ''; //视频评论 $pagesize = 5; $page = isset($_GET['page']) ? max(1, intval($_GET['page'])) : 1; $start = ($page - 1) * $pagesize; $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"]; $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl); if (!empty($vid)) { $sql = "select count(*) c from {$dbTablePre}diamond_comment where vid='{$vid}'"; $video_count = $_MooClass['MooMySQL']->getOne($sql); $count = $video_count['c']; if ($count > 0) { $sql = "select comment,uid,nickname,dateline from {$dbTablePre}diamond_comment where vid='{$vid}' order by id desc LIMIT {$start},{$pagesize}"; $video_comment = $_MooClass['MooMySQL']->getAll($sql); } } //note_显示相册中的普通照片 $user_pic = $_MooClass['MooMySQL']->getAll("SELECT imgurl,pic_date,pic_name FROM {$dbTablePre}pic WHERE syscheck=1 and isimage='0' and uid='{$uid}'"); //note 您可能喜欢的人,匹配相同地区 $able_like = youAbleLike($l, 5); //判断性别类型 $gender_value = check_diff_gender(); //根据来访性虽显示固定评语 $comment_list = comment_list($gender_value, $type = 1); //音乐 $sql = "select * from {$dbTablePre}art_music where uid='{$GLOBALS['style_uid']}'"; $arr = $_MooClass['MooMySQL']->getAll($sql); $mp3_list = array(); foreach ($arr as $v) { $mp3_list[] = array('path' => 'data/mp3/' . $v['path'], 'title' => $v['title'], 'note' => $v['note']); } $mp3_list = json_encode($mp3_list); include MooTemplate('space_video', 'data'); }