예제 #1
0
파일: index.bak.php 프로젝트: noikiy/zays
     //活动日期
     include "./module/service/album_config.php";
     $channel = array_key_exists($channel, $album_channel_array) ? $channel : 0;
     $term = in_array($term, $album_channel_term_array[$channel]) ? $term : $album_channel_term_array[$channel][0];
     if (in_array($channel, array(2, 3))) {
         MooMessage("你要关注的活动还没有开始", "index.php?n=service&h=album", '', '1', 1);
         exit;
     }
     $image_root_dir = 'module/service/templates/default/images/album/' . $album_channel_array[$channel]['dir'] . '/' . $term . '/';
     include './' . $image_root_dir . 'album_data_config.php';
     $type = MooGetGPC('album_type', 'intval', 'G');
     $type = array_key_exists($type, $album_type) ? $type : 0;
     require MooTemplate('public/service_album', 'module');
     exit;
 case "seccode":
     post_code();
     exit;
 case "qixi":
     $qixi_regest_count = array();
     $qixi_regest_counts = $_MooClass['MooMySQL']->getAll('SELECT count(`id`) AS count ,`gender`  FROM `web_ahtv_reguser`  WHERE `uid`!=0 and `channel`=4 group by `gender`');
     foreach ($qixi_regest_counts as $value) {
         $qixi_regest_count[$value['gender']] = $value['count'];
     }
     $man_qixi_regest = $_MooClass['MooMySQL']->getAll('SELECT a.`uid`,b.`nickname`,b.`education`,b.`birthyear` FROM `web_ahtv_reguser` as a left join web_members as b  on a.`uid`=b.`uid` WHERE a.`uid`!=0 and a.`channel`=4 and a.`gender`=0 and b.nickname!=\'\' order by a.`regtime` desc limit 9 ');
     $woman_qixi_regest = $_MooClass['MooMySQL']->getAll('SELECT a.`uid`,b.`nickname`,b.`education`,b.`birthyear` FROM `web_ahtv_reguser` as a left join web_members as b  on a.`uid`=b.`uid` WHERE a.`uid`!=0 and a.`channel`=4 and a.`gender`=1 and b.nickname!=\'\' order by a.`regtime` desc limit 9 ');
     require 'templates/function.php';
     if ($_COOKIE['Moo_username']) {
         $sql = "select uid,nickname from web_members where username = '******'Moo_username']}'";
         $values = $db->getOne($sql);
     }
     if ($_COOKIE['Moo_username'] && empty($_REQUEST['action'])) {
예제 #2
0
 public function reg_tel_verify_step_1()
 {
     $tel = $_POST['phone'];
     if (strlen($tel) != 11) {
         $data['status'] = 0;
         $data['error'] = '手机号码长度错误';
         $this->ajaxReturn($data);
         return;
     }
     //检查手机号码是否已经使用。
     $query['tel'] = $tel;
     $vip = M('vip');
     $ret = $vip->where($query)->select();
     if ($ret) {
         $data['status'] = 0;
         $data['error'] = "手机号码已经使用.";
         $this->ajaxReturn($data);
         return;
     }
     //发送验证码要手机
     $ret = post_code($tel);
     if ($ret < 0) {
         $data['status'] = 0;
         $data['error'] = "发送验证码失败:" . $ret;
         $data['error_code'] = $ret;
         $this->ajaxReturn($data);
         return;
     }
     //保存发送验证码,用于收到用户的反馈后进行校验
     $code['verify_count'] = 0;
     $code['verify_num'] = $ret;
     session('reg_tel_verify_code', $code);
     $data['status'] = 1;
     $data['error'] = "发送验证码成功.";
     $data['code'] = $ret;
     $this->ajaxReturn($data);
 }