当前位置: 首页>>代码示例>>PHP>>正文


PHP url_wap函数代码示例

本文整理汇总了PHP中url_wap函数的典型用法代码示例。如果您正苦于以下问题:PHP url_wap函数的具体用法?PHP url_wap怎么用?PHP url_wap使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了url_wap函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save_info

 public function save_info()
 {
     $data = array();
     $ajax = intval($_REQUEST['ajax']);
     $data['user_name'] = strim($_REQUEST['user_name']);
     if (empty($data['user_name'])) {
         showErr("请填写您的姓名", $ajax);
     }
     $data['tel'] = strim($_REQUEST['tel']);
     if (empty($data['tel'])) {
         showErr("请填写您的联系方式", $ajax);
     }
     $data['content'] = strim($_REQUEST['content']);
     if (empty($data['content'])) {
         showErr("请填写您的留言内容", $ajax);
     }
     $data['cate_id'] = intval($_REQUEST['cate_id']);
     $data['create_time'] = NOW_TIME;
     $data['user_id'] = intval($_REQUEST['user_id']);
     $GLOBALS['db']->autoExecute(DB_PREFIX . "message", $data, "INSERT", "", "SILENT");
     $message_id = $GLOBALS['db']->insert_id();
     if ($message_id > 0) {
         showSuccess("申请成功!", $ajax, url_wap("index"));
     } else {
         showErr("发送失败,请重新申请!", $ajax);
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:27,代码来源:user_message.action.php

示例2: save

 function save()
 {
     $url = $_GET['referer'];
     es_session::set("gopreview", $url);
     if (!$GLOBALS['user_info']) {
         app_redirect(url_wap("user#login"));
     }
     $info_data = array();
     $info_data['user_id'] = $GLOBALS['user_info']['id'];
     $info_data['name'] = $GLOBALS['user_info']['user_name'];
     $info_data['mobile'] = $GLOBALS['user_info']['mobile'];
     $info_data['ip'] = get_client_ip();
     $info_data['type'] = $_GET['f'];
     $info_data['creat_time'] = time();
     $tmp_zhuanti_user_info = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "zhuanti_user where (mobile='" . $info_data['mobile'] . "' or user_id=" . $info_data['user_id'] . ") and type=2");
     if ($tmp_zhuanti_user_info) {
         app_redirect("http://www.51zhishang.com/course/54.html");
     }
     $GLOBALS['db']->autoExecute(DB_PREFIX . "zhuanti_user", $info_data, "INSERT");
     $msgInfo = array();
     $msgInfo['title'] = '专题报名';
     $msgInfo['content'] = '专题报名';
     send_zhuanti_sms($info_data['mobile'], $msgInfo, 3812);
     $data['status'] = 1;
     $data['info'] = "报名成功!";
     app_redirect("http://www.51zhishang.com/course/54.html");
 }
开发者ID:xinlechou,项目名称:wap,代码行数:27,代码来源:tpu.action.php

示例3: index

 public function index()
 {
     $root = array();
     $root['response_code'] = 1;
     $id = intval($_REQUEST['id']);
     $email = strim($GLOBALS['request']['email']);
     // 用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     // 密码 // 检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     $deal_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "deal where id = " . $id . " and is_delete = 0 and (is_effect = 1 or (is_effect = 0 and user_id = " . intval($GLOBALS['user_info']['id']) . "))");
     if (!$deal_info) {
         app_redirect(url("index"));
     }
     $deal_info = cache_deal_extra($deal_info);
     init_deal_page($deal_info);
     $page_size = $GLOBALS['m_config']['page_size'];
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $log_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_log where deal_id = " . $deal_info['id'] . " order by create_time desc limit " . $limit);
     $log_count = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "deal_log where deal_id = " . $deal_info['id']);
     $url = url_wap("deal#show", array("id" => $id));
     $root['url'] = $url;
     $last_time_key = "";
     foreach ($log_list as $k => $v) {
         $log_list[$k]['image'] = get_user_avatar_root($v["user_id"], "middle");
         //用户头像
         //$log_list[$k]['image'] = get_abs_img_root(get_spec_image($v['image'],640,240,1));
         $log_list[$k]['pass_time'] = pass_date($v['create_time']);
         $online_time = online_date($v['create_time'], $deal_info['begin_time']);
         $log_list[$k]['online_time'] = $online_time['info'];
         $log_list[$k]['comment_data_cache'] = null;
         $log_list[$k]['deal_info_cache'] = null;
         if ($online_time['key'] != $last_time_key) {
             $last_time_key = $log_list[$k]['online_time_key'] = $online_time['key'];
         }
         $log_list[$k] = cache_log_comment($log_list[$k]);
     }
     $root['log_list'] = $log_list;
     //	require APP_ROOT_PATH.'app/Lib/page.php';
     //	$page = new Page($log_count,$page_size);   //初始化分页对象
     //	$p  =  $page->show();
     //	$root['pages'] = $p;
     $root['page'] = array("page" => $page, "page_total" => ceil($log_count / $page_size), "page_size" => intval($page_size), 'total' => intval($log_count));
     output($root);
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:50,代码来源:deal_update.action.php

示例4: send

 public function send()
 {
     $ajax = intval($_REQUEST['ajax']);
     if (!$GLOBALS['user_info']) {
         showErr("", $ajax, url_wap("user#login"));
     }
     $receive_user_id = intval($_REQUEST['id']);
     $send_user_id = intval($GLOBALS['user_info']['id']);
     if ($receive_user_id == $send_user_id) {
         showErr("不能向自己发私信", $ajax);
     } else {
         $receive_user_info = $GLOBALS['db']->getRow("select user_name from " . DB_PREFIX . "user where is_effect = 1 and id = " . $receive_user_id);
         if (!$receive_user_info) {
             showErr("收信人不存在", $ajax);
         }
         //发私信:生成发件与收件
         //1.生成发件
         $data = array();
         $data['create_time'] = NOW_TIME;
         $data['message'] = strim($_REQUEST['message']);
         $data['user_id'] = $send_user_id;
         $data['dest_user_id'] = $receive_user_id;
         $data['send_user_id'] = $send_user_id;
         $data['receive_user_id'] = $receive_user_id;
         $data['user_name'] = $GLOBALS['user_info']['user_name'];
         $data['dest_user_name'] = $receive_user_info['user_name'];
         $data['send_user_name'] = $GLOBALS['user_info']['user_name'];
         $data['receive_user_name'] = $receive_user_info['user_name'];
         $data['message_type'] = "outbox";
         $data['is_read'] = 1;
         $GLOBALS['db']->autoExecute(DB_PREFIX . "user_message", $data);
         //2.生成收件
         $data = array();
         $data['create_time'] = NOW_TIME;
         $data['message'] = strim($_REQUEST['message']);
         $data['user_id'] = $receive_user_id;
         $data['dest_user_id'] = $send_user_id;
         $data['send_user_id'] = $send_user_id;
         $data['receive_user_id'] = $receive_user_id;
         $data['user_name'] = $receive_user_info['user_name'];
         $data['dest_user_name'] = $GLOBALS['user_info']['user_name'];
         $data['send_user_name'] = $GLOBALS['user_info']['user_name'];
         $data['receive_user_name'] = $receive_user_info['user_name'];
         $data['message_type'] = "inbox";
         $GLOBALS['db']->autoExecute(DB_PREFIX . "user_message", $data);
         showSuccess("发送成功", $ajax);
     }
 }
开发者ID:centaurustech,项目名称:crowdfunding-9,代码行数:48,代码来源:messageModule.class.php

示例5: index

 public function index()
 {
     //输出文章
     $id = intval($_REQUEST['id']);
     $article = $GLOBALS['db']->getRow("select a.*,ac.type_id from " . DB_PREFIX . "article as a left join " . DB_PREFIX . "article_cate as ac on ac.id=a.cate_id where a.id={$id}");
     $wx = array();
     $wx['img_url'] = $article['icon'];
     $wx['title'] = $article['title'];
     $wx['desc'] = $article['brief'];
     $GLOBALS['tmpl']->assign('wx', $wx);
     $cate_id = $article['cate_id'];
     $article_cates = $GLOBALS['db']->getAllCached("select ac.*,fa.num from " . DB_PREFIX . "article_cate as ac left join (SELECT count(*) as num,cate_id from " . DB_PREFIX . "article where is_effect=1 and is_delete=0 GROUP BY cate_id) as fa on fa.cate_id=ac.id  where ac.is_effect=1 and  ac.is_delete=0  order by ac.sort asc");
     foreach ($article_cates as $k => $v) {
         $article_cates[$k]['num'] = intval($v['num']);
         $article_cates[$k]['url'] = url_wap('article', array('id' => $v['id']));
     }
     $artilce_cate_new = array();
     foreach ($artilce_cate as $k => $v) {
         if ($v['type_id'] == $article['type_id'] && $v['id'] != $cate_id && $v['num'] > 0) {
             $artilce_cate_new[$k]['cate_id'] = $v['id'];
             $artilce_cate_new[$k]['titles'] = $v['title'];
             $artilce_cate_new[$k]['url'] = url_wap('article_cate', array('id' => $v['id']));
         }
     }
     $GLOBALS['tmpl']->assign("other_cate", $artilce_cate_new);
     //文章详细页面最新更新(控制最新的10条)
     $temp_article_list = $GLOBALS['db']->getAllCached("SELECT a.*,c.type_id from " . DB_PREFIX . "article a LEFT JOIN " . DB_PREFIX . "article_cate c on a.cate_id=c.id where 1=1 and a.is_delete=0 and a.is_effect=1 and c.type_id=" . $article['type_id'] . " and a.cate_id={$cate_id} and a.id!={$id}  order by update_time desc limit 0,5");
     $article_list = array();
     foreach ($temp_article_list as $k => $v) {
         //最新更新
         $article_list[$k]['cate_title'] = $v['title'];
         if ($v['rel_url'] == "") {
             $article_list[$k]['url'] = url_wap('article', array('id' => $v['id']));
         } else {
             $article_list[$k]['url'] = $v['rel_url'];
         }
     }
     unset($temp_article_list);
     $GLOBALS['tmpl']->assign("article", $article);
     $GLOBALS['tmpl']->assign("article_list", $article_list);
     $GLOBALS['tmpl']->display("article_index.html");
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:42,代码来源:article.action.php

示例6: index

 public function index()
 {
     $id = intval($GLOBALS['request']['id']);
     $email = strim($GLOBALS['request']['email']);
     $pwd = strim($GLOBALS['request']['pwd']);
     if (!dealIdIsExist($id, 1)) {
         $result = responseErrorInfo("deal_id参数错误");
         output($result);
     }
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     get_mortgate();
     // 不知道为什么要冻结
     $deal_info = $this->getDealInfo($id, $user_id);
     $leader_info = getLeaderInfo($id);
     $deal_new_info = $this->getNewDeal_info($deal_info);
     // $stock_info = $this->getStockAndUnStock ( $deal_info );
     // $history_info = $this->getHistoryInfo ( $deal_info );
     // $plan_info = $this->getPlanInfo ( $deal_info );
     $result = responseSuccessInfo("项目详情");
     $result["deal_info"] = $deal_new_info;
     $result['leader_info'] = $leader_info;
     // $result ['stock_info'] = $stock_info;
     // $result ['history_info'] = $history_info;
     // $result ['plan_info'] = $plan_info;
     if ($user_id > 0) {
         $is_focus = $GLOBALS['db']->getOne("select  count(*) from " . DB_PREFIX . "deal_focus_log where deal_id = " . $id . " and user_id = " . $user_id);
         $result['is_focus'] = $is_focus;
     }
     $result['business_url'] = get_domain() . url_mapi_html("deal#business", array("id" => $id, "user_id" => $user_id));
     $result['teams_url'] = get_domain() . url_mapi_html("deal#teams", array("id" => $id, "user_id" => $user_id));
     $result['history_url'] = get_domain() . url_mapi_html("deal#history", array("id" => $id, "user_id" => $user_id));
     $result['plans_url'] = get_domain() . url_mapi_html("deal#plans", array("id" => $id, "user_id" => $user_id));
     $url = replace_mapi(url_wap("deal#show", array("id" => $id)));
     $result['share_url'] = $url;
     if ($GLOBALS['m_config']['wx_appid'] != '' && $GLOBALS['m_config']['wx_secrit'] != '') {
         $weixin_1 = new weixin($GLOBALS['m_config']['wx_appid'], $GLOBALS['m_config']['wx_secrit'], $url);
         $wx_url = $weixin_1->scope_get_code();
         $result['wx_share_url'] = $wx_url;
     }
     output($result);
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:42,代码来源:equity_deal_detail.action.php

示例7: edit_applicate_leader

 public function edit_applicate_leader($from = 'wap')
 {
     if (!$GLOBALS['user_info']) {
         if ($from == 'web') {
             app_redirect(url("user#login"));
         } elseif ($from == 'wap') {
             app_redirect(url_wap("user#login"));
         }
     }
     $data = $GLOBALS['db']->getRow("select i.* from " . DB_PREFIX . "investment_list i WHERE i.user_id=" . $GLOBALS['user_info']['id'] . " and i.status=0");
     $data['cate_name_lists']['name'] = explode(",", $data['cates_name']);
     $data['cate_name_lists']['id'] = explode(",", $data['cates_id']);
     $GLOBALS['tmpl']->assign("data", $data);
     $GLOBALS['tmpl']->display("user_edit_applicate_leader.html");
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:15,代码来源:investor.action.php

示例8: DoDwTrade

 /**
  * 用户提现
  * @param int $user_id
  * @param int $user_type 0:普通用户fanwe_user.id;1:担保用户fanwe_deal_agency.id
  * @param float $pTrdAmt 充值金额	 
  */
 public function DoDwTrade()
 {
     //判断是否是黑名单会员
     if ($GLOBALS['user_info']['is_black'] == 1) {
         showErr("您当前无权限提现,具体联系网站客服", 0, url_wap("index", "uc_center"));
     }
     $user_id = intval(strim($_REQUEST['user_id']));
     $user_type = intval(strim($_REQUEST['user_type']));
     $pTrdAmt = floatval(strim($_REQUEST['pTrdAmt']));
     $data = array();
     if ($user_type == 0) {
         $data = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . $user_id);
     } else {
         $data = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . $user_id);
     }
     if (empty($data)) {
         showErr('用户不存在', 0);
     } else {
         if (!empty($data['ips_acct_no'])) {
             $class_name = getCollName();
             require_once APP_ROOT_PATH . "system/collocation/" . $class_name . "_collocation.php";
             $collocation_class = $class_name . "_collocation";
             $collocation_object = new $collocation_class();
             $collocation_object->set_mobile_sys();
             $collocation_code = $collocation_object->DoDwTrade($user_id, $user_type, $pTrdAmt);
             print_r($collocation_code);
         } else {
             showErr('该用户还未申请过资金托管帐户', 0);
         }
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:37,代码来源:collocation.action.php

示例9: init_deal_page_wap

function init_deal_page_wap($deal_info)
{
    $GLOBALS['tmpl']->assign("page_title", $deal_info['name']);
    if ($deal_info['seo_title'] != "") {
        $GLOBALS['tmpl']->assign("seo_title", $deal_info['seo_title']);
    }
    if ($deal_info['seo_keyword'] != "") {
        $GLOBALS['tmpl']->assign("seo_keyword", $deal_info['seo_keyword']);
    }
    if ($deal_info['seo_description'] != "") {
        $GLOBALS['tmpl']->assign("seo_description", $deal_info['seo_description']);
    }
    //开启限购后剩余几位
    $deal_info['deal_item_count'] = 0;
    foreach ($deal_info['deal_item_list'] as $k => $v) {
        // 统计所有真实+虚拟(钱)
        $deal_info['total_virtual_person'] += $v['virtual_person'];
        $deal_info['total_virtual_price'] += $v['price'] * $v['virtual_person'] + $v['support_amount'];
        //统计每个子项目真实+虚拟(钱)
        $deal_info['deal_item_list'][$k]['person'] = $v['virtual_person'] + $v['support_count'];
        $deal_info['deal_item_list'][$k]['money'] = $v['price'] * $v['virtual_person'] + $v['support_amount'];
        $deal_info['deal_item_list'][$k]['cart_url'] = url_wap("cart#index", array("id" => $v['id']));
        if ($v['limit_user']) {
            $deal_info['deal_item_list'][$k]['remain_person'] = $v['limit_user'] - $v['virtual_person'] - $v['support_count'];
        }
        $deal_info['deal_item_count']++;
    }
    //	$deal_info['deal_type']=$GLOBALS['db']->getOne("select name from ".DB_PREFIX."deal_cate where id=".$deal_info['cate_id']);
    $deal_info['tags_arr'] = preg_split("/[ ,]/", $deal_info['tags']);
    $deal_info['support_amount_format'] = number_price_format($deal_info['support_amount']);
    $deal_info['limit_price_format'] = number_price_format($deal_info['limit_price']);
    $deal_info['total_virtual_price_format'] = number_price_format(intval($deal_info['total_virtual_price']));
    $deal_info['remain_days'] = floor(($deal_info['end_time'] - NOW_TIME) / (24 * 3600));
    $deal_info['percent'] = round($deal_info['support_amount'] / $deal_info['limit_price'] * 100);
    //$deal_info['deal_level']=$GLOBALS['db']->getOne("select level from ".DB_PREFIX."deal_level where id=".intval($deal_info['user_level']));
    $deal_info['person'] = $deal_info['total_virtual_person'] + $deal_info['support_count'];
    $deal_info['percent'] = round($deal_info['total_virtual_price'] / $deal_info['limit_price'] * 100);
    $deal_info['update_url'] = url_wap("deal#update", array("id" => $deal_info['id']));
    $deal_info['comment_url'] = url_wap("deal#comment", array("id" => $deal_info['id']));
    $deal_info['info_url'] = url_wap("deal#info", array("id" => $deal_info['id']));
    if ($deal_info['begin_time'] > NOW_TIME) {
        $deal_info['status'] = '0';
        $deal_info['left_days'] = floor(($deal_info['begin_time'] - NOW_TIME) / (24 * 3600));
    } elseif ($deal_info['end_time'] < NOW_TIME && $deal_info['end_time'] > 0) {
        if ($deal_info['percent'] >= 100) {
            $deal_info['status'] = '1';
        } else {
            $deal_info['status'] = '2';
        }
    } else {
        if ($deal_info['end_time'] > 0) {
            $deal_info['status'] = '3';
        } else {
            $deal_info['status'] = '4';
        }
    }
    if ($GLOBALS['user_info']) {
        $is_focus = $GLOBALS['db']->getOne("select  count(*) from " . DB_PREFIX . "deal_focus_log where deal_id = " . $deal_info['id'] . " and user_id = " . intval($GLOBALS['user_info']['id']));
        $GLOBALS['tmpl']->assign("is_focus", $is_focus);
    }
    if ($deal_info['user_id'] > 0) {
        $deal_user_info = $GLOBALS['db']->getRow("select id,user_name,province,city,intro,login_time from " . DB_PREFIX . "user where id = " . $deal_info['user_id'] . " and is_effect = 1");
        if ($deal_user_info) {
            $deal_user_info['weibo_list'] = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "user_weibo where user_id = " . $deal_user_info['id']);
            $deal_user_info['image'] = get_user_avatar($deal_user_info['id'], 'middle');
            $deal_info['user_info'] = $deal_user_info;
        }
    }
    if (!empty($deal_info['vedio']) && !preg_match("/http://player.youku.com/embed/i", $deal_info['source_video'])) {
        $deal_info['source_vedio'] = preg_replace("/id_(.*)\\.html(.*)/i", "http://player.youku.com/embed/\${1}", baseName($deal_info['vedio']));
        $GLOBALS['db']->query("update " . DB_PREFIX . "deal set source_vedio='" . $deal_info['source_vedio'] . "'  where id=" . $deal_info['id']);
    }
    $GLOBALS['tmpl']->assign("deal_info", $deal_info);
}
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:74,代码来源:functions.php

示例10: submit_investor

 public function submit_investor()
 {
     $id = intval($_REQUEST['id']);
     $ajax = 1;
     if (!$GLOBALS['user_info']) {
         showErr("", $ajax, url_wap("user#login"));
     }
     $GLOBALS['db']->query("update " . DB_PREFIX . "deal set is_edit = 0 where id = " . $id);
     $GLOBALS['db']->query("update " . DB_PREFIX . "deal set is_effect = 0 where id = " . $id);
     $GLOBALS['db']->query("update " . DB_PREFIX . "deal set type = 1 where id = " . $id);
     showSuccess("提交成功,等待管理员审核!", $ajax);
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:12,代码来源:project.action.php

示例11: investor_agency_save_data

 public function investor_agency_save_data($from = 'web')
 {
     if (!$GLOBALS['user_info']) {
         if ($from == 'web') {
             app_redirect(url("user#login"));
         } elseif ($from == 'wap') {
             app_redirect(url_wap("user#login"));
         }
     }
     if (!check_ipop_limit(get_client_ip(), "user_investor_result", 5)) {
         showErr("提交太快", 1);
     }
     $id = intval($_REQUEST['id']);
     $ajax = intval($_POST['ajax']);
     $identify_business_name = strim($_POST['identify_business_name']);
     $identify_business_licence = es_session::get("identify_business_licence");
     $identify_business_code = es_session::get("identify_business_code");
     $identify_business_tax = es_session::get("identify_business_tax");
     $image1['url'] = replace_public(strim($_POST['identify_business_licence_u']));
     $image2['url'] = replace_public(strim($_POST['identify_business_code_u']));
     $image3['url'] = replace_public(strim($_POST['identify_business_tax_u']));
     $data = investor_agency_save($id, $ajax = '', $identify_business_name, $identify_business_licence, $identify_business_code, $identify_business_tax, $image1['url'], $image2['url'], $image3['url']);
     ajax_return($data);
     return false;
 }
开发者ID:xinlechou,项目名称:app,代码行数:25,代码来源:userModule.class.php

示例12: save_mobile_password

 public function save_mobile_password()
 {
     //$ajax = intval($_REQUEST['ajax']);
     if (!$GLOBALS['user_info']) {
         app_redirect(url_wap("user#login"));
     }
     $data = array();
     if (!check_ipop_limit(get_client_ip(), "setting_save_mobile_password", 5)) {
         $data['info'] = "提交太频繁";
         ajax_return($data);
         return false;
     }
     //showErr("提交太频繁",$ajax,"");
     $user_pwd = strim($_REQUEST['user_pwd']);
     $confirm_user_pwd = strim($_REQUEST['confirm_user_pwd']);
     $user_info = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "user where id = " . intval($GLOBALS['user_info']['id']));
     $mobile = strim($user_info['mobile']);
     $user_info['verify_coder'] = strim($_REQUEST['verify_coder']);
     if ($mobile) {
         $has_code = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "mobile_verify_code where mobile='" . $mobile . "' and verify_code='" . strim($_REQUEST['verify_coder']) . "' ");
         if (!$has_code) {
             //showErr("验证码错误",$ajax,"");
             $data['info'] = "验证码错误";
             ajax_return($data);
             return false;
         }
     } else {
         //showErr("请绑定手机号",$ajax,"");
         $data['info'] = "请绑定手机号";
         ajax_return($data);
         return false;
     }
     if (strlen($user_pwd) < 4) {
         //showErr("密码不能低于四位",$ajax,"");
         $data['info'] = "密码不能低于四位";
         ajax_return($data);
         return false;
     }
     if ($user_pwd != $confirm_user_pwd) {
         //showErr("密码确认失败",$ajax,"");
         $data['info'] = "密码确认失败";
         ajax_return($data);
         return false;
     }
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $user_info['user_pwd'] = $user_pwd;
     save_user($user_info, "UPDATE");
     if ($GLOBALS['db']->query("update " . DB_PREFIX . "user set password_verify = '' where id = " . intval($GLOBALS['user_info']['id']))) {
         $data['status'] = 1;
     } else {
         $data['status'] = 0;
     }
     ajax_return($data);
     //showSuccess("保存成功",$ajax,url_wap("settings#index"));
 }
开发者ID:xinlechou,项目名称:wap,代码行数:55,代码来源:settings.action.php

示例13: get_deal_list

function get_deal_list($limit = "", $conditions = "", $orderby = " sort desc ")
{
    if ($limit != "") {
        $limit = " LIMIT " . $limit;
    }
    if ($orderby != "") {
        $orderby = " ORDER BY " . $orderby;
    }
    if (app_conf("INVEST_STATUS") == 0) {
        $condition = " 1=1 AND d.is_delete = 0 AND d.is_effect = 1 ";
    } elseif (app_conf("INVEST_STATUS") == 1) {
        $condition = " 1=1 AND d.is_delete = 0 AND d.is_effect = 1 and d.type=0 ";
    } elseif (app_conf("INVEST_STATUS") == 2) {
        $condition = " 1=1 AND d.is_delete = 0 AND d.is_effect = 1 and d.type=1 ";
    }
    if ($conditions != "") {
        $condition .= " AND " . $conditions;
    }
    //权限浏览控制
    if ($GLOBALS['user_info']['user_level'] != 0) {
        $level = $GLOBALS['db']->getOne("SELECT level from " . DB_PREFIX . "user_level where id=" . $GLOBALS['user_info']['user_level']);
        $condition .= " AND (d.user_level ='' or d.user_level=0 or d.user_level <={$level})   ";
    } else {
        $condition .= " AND (d.user_level =0 or d.user_level =1 or d.user_level ='')  ";
    }
    $deal_count = $GLOBALS['db']->getOne("select count(*)  from " . DB_PREFIX . "deal as d  where " . $condition);
    /*(所需项目)准备虚拟数据 start*/
    $deal_list = array();
    $level_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_level ");
    $level_list_array = array();
    foreach ($level_list_array as $k => $v) {
        if ($v['id']) {
            $level_list_array[$v['id']] = $v['level'];
        }
    }
    if ($deal_count > 0) {
        $now_time = NOW_TIME;
        $deal_list = $GLOBALS['db']->getAll("select d.* from " . DB_PREFIX . "deal  as d   where " . $condition . $orderby . $limit);
        $deal_ids = array();
        foreach ($deal_list as $k => $v) {
            $deal_list[$k]['remain_days'] = ceil(($v['end_time'] - $now_time) / (24 * 3600));
            if ($v['begin_time'] > $now_time) {
                $deal_list[$k]['left_days'] = intval(($now_time - $v['create_time']) / 24 / 3600);
            }
            $deal_list[$k]['num_days'] = ceil(($v['end_time'] - $v['begin_time']) / (24 * 3600));
            $deal_ids[] = $v['id'];
            //查询出对应项目id的user_level
            $deal_list[$k]['deal_level'] = $level_list_array[intval($deal_list[$k]['user_level'])];
            if ($v['begin_time'] > $now_time) {
                $deal_list[$k]['left_begin_days'] = intval(($v['begin_time'] - $now_time) / 24 / 3600);
            }
            if ($v['begin_time'] > $now_time) {
                $deal_list[$k]['status'] = '0';
            } elseif ($v['end_time'] < $now_time && $v['end_time'] > 0) {
                if ($deal_list[$k]['percent'] >= 100) {
                    $deal_list[$k]['status'] = '1';
                } else {
                    $deal_list[$k]['status'] = '2';
                }
            } else {
                if ($v['end_time'] > 0) {
                    $deal_list[$k]['status'] = '3';
                } else {
                    $deal_list[$k]['status'] = '4';
                }
            }
        }
        //获取当前项目列表下的所有子项目
        //$temp_virtual_person_list = $GLOBALS['db']->getAll("select deal_id,virtual_person,price,support_count from ".DB_PREFIX."deal_item where deal_id in(".implode(",",$deal_ids).") ");
        //$virtual_person_list  = array();
        //重新组装一个以项目ID为KEY的 统计所有的虚拟人数和虚拟价格
        //		foreach($temp_virtual_person_list as $k=>$v){
        //			$virtual_person_list[$v['deal_id']]['total_virtual_person'] += $v['virtual_person'];
        //			$virtual_person_list[$v['deal_id']]['total_support_person'] += $v['support_count'];
        //			$virtual_person_list[$v['deal_id']]['total_virtual_price'] += $v['price'] * $v['virtual_person'];
        //			$virtual_person_list[$v['deal_id']]['total_support_price'] += $v['price'] * $v['support_count'];
        //		}
        //unset($temp_virtual_person_list);
        //将获取到的虚拟人数和虚拟价格拿到项目列表里面进行统计
        foreach ($deal_list as $k => $v) {
            $deal_list[$k]['url'] = url_wap("deal#show", array("id" => $v['id']));
            if ($v['type'] == 1) {
                $deal_list[$k]['virtual_person'] = $deal_list[$k]['invote_num'];
                $deal_list[$k]['support_count'] = $deal_list[$k]['invote_num'];
                $deal_list[$k]['support_amount'] = $deal_list[$k]['invote_money'];
                $deal_list[$k]['percent'] = round($deal_list[$k]['support_amount'] / $v['limit_price'] * 100);
                $deal_list[$k]['limit_price_w'] = round($deal_list[$k]['limit_price'] / 10000);
                $deal_list[$k]['invote_mini_money_w'] = round($deal_list[$k]['invote_mini_money'] / 10000);
            } else {
                $deal_list[$k]['virtual_person'] = $deal_list[$k]['virtual_num'];
                $deal_list[$k]['support_count'] = $deal_list[$k]['virtual_num'] + $deal_list[$k]['support_count'];
                $deal_list[$k]['support_amount'] = $deal_list[$k]['virtual_price'] + $deal_list[$k]['support_amount'];
                $deal_list[$k]['percent'] = round($deal_list[$k]['support_amount'] / $v['limit_price'] * 100);
            }
        }
    }
    return array("rs_count" => $deal_count, "list" => $deal_list);
}
开发者ID:xinlechou,项目名称:wap,代码行数:98,代码来源:common.php

示例14: aqj_do_login

 public function aqj_do_login()
 {
     $aqj_id = trim($_POST['log_aqjid']);
     $user_mobile = trim($_POST['log_mobile']);
     $user_pwd = trim($_POST['log_pwd']);
     require_once APP_ROOT_PATH . "system/libs/user.php";
     $result = do_login_user($user_mobile, $user_pwd);
     if ($result['status'] == "1") {
         //登录成功,跳转到积分商城,
         $xlc_user = $GLOBALS['db']->getRow("select id,mobile,user_pwd from " . DB_PREFIX . "user where mobile='" . $user_mobile . "'");
         $aqj_user = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "ap_partner_user where user_id=" . $xlc_user['id']);
         if ($aqj_user) {
             //存在新乐筹用户,更新绑定
             $user_ap_partner = array();
             $user_ap_partner['partner_user_id'] = $aqj_id;
             $user_ap_partner['edit_time'] = time();
             $GLOBALS['db']->autoExecute(DB_PREFIX . "ap_partner_user", $user_ap_partner, "UPDATE", "id=" . intval($aqj_user['id']));
         } else {
             //插入新用户
             $user_ap_partner = array();
             $user_ap_partner['user_id'] = $result['user']['id'];
             $user_ap_partner['partner_id'] = 2;
             $user_ap_partner['partner_user_id'] = $aqj_id;
             $user_ap_partner['create_time'] = time();
             $GLOBALS['db']->autoExecute(DB_PREFIX . "ap_partner_user", $user_ap_partner);
         }
         $result['msg'] = "登录中...";
         $result['jump'] = url_wap("deals", array('aqjid' => $aqj_id, 'm' => $user_mobile, 'isap' => 1));
     } else {
         //提示登录失败
         switch ($result['data']) {
             case "1":
                 $result['msg'] = '对不起,帐户不存在。';
                 break;
             case "2":
                 $result['msg'] = '对不起,帐户密码错误。';
                 break;
             case "3":
                 $result['msg'] = '对不起,帐户未激活。';
                 break;
         }
     }
     ajax_return($result);
 }
开发者ID:xinlechou,项目名称:wap,代码行数:44,代码来源:ajax.action.php

示例15: init_deal_page

 public function init_deal_page($deal_info)
 {
     $GLOBALS['tmpl']->assign("page_title", $deal_info['name']);
     if ($deal_info['seo_title'] != "") {
         $GLOBALS['tmpl']->assign("seo_title", $deal_info['seo_title']);
     }
     if ($deal_info['seo_keyword'] != "") {
         $GLOBALS['tmpl']->assign("seo_keyword", $deal_info['seo_keyword']);
     }
     if ($deal_info['seo_description'] != "") {
         $GLOBALS['tmpl']->assign("seo_description", $deal_info['seo_description']);
     }
     $deal_info['tags_arr'] = preg_split("/[ ,]/", $deal_info['tags']);
     $deal_info['support_amount_format'] = number_price_format($deal_info['support_amount']);
     $deal_info['limit_price_format'] = number_price_format($deal_info['limit_price'] / 10000);
     $deal_info['remain_days'] = ceil(($deal_info['end_time'] - NOW_TIME) / (24 * 3600));
     $deal_info['person'] = 0;
     $type_2 = 0;
     $type_array = array();
     //初始化与虚拟金额有所关联的几个比较特殊的数据 start
     foreach ($deal_info['deal_item_list'] as $k => $v) {
         //统计每个子项目真实+虚拟(人)
         $deal_info['deal_item_list'][$k]['virtual_person_list'] = intval($v['virtual_person'] + $v['support_count']);
         if ($v['type'] == 1) {
             $type_array[] = $v;
             unset($deal_info['deal_item_list'][$k]);
         }
     }
     if ($type_array) {
         $deal_info['deal_item_list'] = array_merge($deal_info['deal_item_list'], $type_array);
     }
     if ($deal_info['type'] == 1) {
         $deal_info['person'] = $deal_info['invote_num'];
         $deal_info['total_virtual_price'] = number_price_format($deal_info['invote_money'] / 10000);
         $deal_info['percent'] = round($deal_info['invote_money'] / $deal_info['limit_price'] * 100, 2);
     } else {
         $deal_info['person'] = $deal_info['support_count'] + $deal_info['virtual_num'];
         $deal_info['total_virtual_price'] = number_price_format($deal_info['support_amount'] + $deal_info['virtual_price']);
         $deal_info['percent'] = round(($deal_info['support_amount'] + $deal_info['virtual_price']) / $deal_info['limit_price'] * 100, 2);
     }
     //项目等级放到项目详细页面模块(对详细页面进行控制)
     $deal_info['deal_level'] = $GLOBALS['db']->getOne("select level from " . DB_PREFIX . "deal_level where id=" . intval($deal_info['user_level']));
     $deal_info['virtual_person'] = $GLOBALS['db']->getOne("select sum(virtual_person) from " . DB_PREFIX . "deal_item where deal_id=" . $deal_info['id']);
     $deal_info['update_url'] = url_wap("deal#update", array("id" => $deal_info['id']));
     $deal_info['comment_url'] = url_wap("deal#comment", array("id" => $deal_info['id']));
     //初始化与虚拟金额有所关联的几个比较特殊的数据 end
     if (!empty($deal_info['vedio']) && !preg_match("/http://player.youku.com/embed/i", $deal_info['source_video'])) {
         $deal_info['source_vedio'] = preg_replace("/id_(.*)\\.html(.*)/i", "http://player.youku.com/embed/\${1}", baseName($deal_info['vedio']));
         $GLOBALS['db']->query("update " . DB_PREFIX . "deal set source_vedio='" . $deal_info['source_vedio'] . "'  where id=" . $deal_info['id']);
     }
     $GLOBALS['tmpl']->assign("deal_info", $deal_info);
     $deal_item_list = $deal_info['deal_item_list'];
     //开启限购后剩余几位
     foreach ($deal_item_list as $k => $v) {
         if ($v['limit_user'] > 0) {
             $deal_item_list[$k]['remain_person'] = $v['limit_user'] - $v['virtual_person'] - $v['support_count'];
         }
     }
     $GLOBALS['tmpl']->assign("deal_item_list", $deal_item_list);
     if ($GLOBALS['user_info']) {
         $is_focus = $GLOBALS['db']->getOne("select  count(*) from " . DB_PREFIX . "deal_focus_log where deal_id = " . $deal_info['id'] . " and user_id = " . intval($GLOBALS['user_info']['id']));
         $GLOBALS['tmpl']->assign("is_focus", $is_focus);
     }
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:64,代码来源:deal.action.php


注:本文中的url_wap函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。