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


PHP init_app_page函数代码示例

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


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

示例1: index

 public function index()
 {
     global_run();
     init_app_page();
     $GLOBALS['tmpl']->assign("no_nav", true);
     //无分类下拉
     if (check_save_login() != LOGIN_STATUS_LOGINED) {
         app_redirect(url("index", "user#login"));
     }
     $did = intval($_REQUEST['did']);
     require_once APP_ROOT_PATH . "app/Lib/page.php";
     $page_size = app_conf("PAGE_SIZE");
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $user_id = $GLOBALS['user_info']['id'];
     $sql = "select * from " . DB_PREFIX . "youhui_log  where  " . " user_id = " . $user_id . " order by  create_time desc limit " . $limit;
     $sql_count = "select count(*) from " . DB_PREFIX . "youhui_log  where  " . " user_id = " . $user_id;
     $list = $GLOBALS['db']->getAll($sql);
     foreach ($list as $k => $v) {
         $list[$k]['youhui'] = load_auto_cache("youhui", array("id" => $v['youhui_id']));
     }
     $count = $GLOBALS['db']->getOne($sql_count);
     $page = new Page($count, $page_size);
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->assign("list", $list);
     $GLOBALS['tmpl']->assign("NOW_TIME", NOW_TIME);
     $GLOBALS['tmpl']->assign("page_title", "我的优惠券");
     assign_uc_nav_list();
     $GLOBALS['tmpl']->display("uc/uc_youhui_index.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:35,代码来源:uc_youhuiModule.class.php

示例2: index

 /**
  * 活动点评
  * @see BizBaseModule::index()
  */
 public function index()
 {
     init_app_page();
     $s_account_info = $GLOBALS['account_info'];
     $supplier_id = intval($s_account_info['supplier_id']);
     $filter_point = intval($_REQUEST['filter_point']);
     $filter_is_img = intval($_REQUEST['filter_is_img']);
     $GLOBALS['tmpl']->assign("filter_point", $filter_point);
     $GLOBALS['tmpl']->assign("filter_is_img", $filter_is_img);
     $dp_type = "event";
     require_once APP_ROOT_PATH . 'system/model/review.php';
     //组装查询条件
     $conditions = biz_get_dp_conditions($supplier_id, $dp_type, $filter_point, $filter_is_img);
     require_once APP_ROOT_PATH . "app/Lib/page.php";
     //分页
     $page_size = 10;
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $total = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "supplier_location_dp " . $conditions);
     $page = new Page($total, $page_size);
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     //获取点评数据
     $dp_list = biz_get_dp_list($conditions, $dp_type, $limit);
     $GLOBALS['tmpl']->assign("dp_list", $dp_list);
     $GLOBALS['tmpl']->assign("ajax_url", url("biz", "eventr"));
     $GLOBALS['tmpl']->assign("form_url", url("biz", "eventr#index"));
     $GLOBALS['tmpl']->assign("head_title", "活动点评管理");
     $GLOBALS['tmpl']->display("pages/review/index.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:38,代码来源:eventrModule.class.php

示例3: index

 public function index()
 {
     global_run();
     init_app_page();
     $GLOBALS['tmpl']->assign("no_nav", true);
     //无分类下拉
     $id = intval($_REQUEST['id']);
     require_once APP_ROOT_PATH . 'system/model/topic.php';
     $topic = get_topic_item($id);
     if ($id > 0 && !empty($topic)) {
         //
     } else {
         app_redirect(url("index"));
     }
     if ($topic['group_id'] > 0) {
         $GLOBALS['tmpl']->assign('topic_group', get_topic_group($topic['group_id']));
     }
     $title = $topic['forum_title'];
     $content = decode_topic($topic['content']);
     $is_fav = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "topic where  (fav_id = " . $id . " or (origin_id = " . $id . " and fav_id <> 0))  and user_id = " . intval($GLOBALS['user_info']['id']));
     $GLOBALS['tmpl']->assign("topic", $topic);
     $GLOBALS['tmpl']->assign("title", $title);
     $GLOBALS['tmpl']->assign("content", $content);
     $GLOBALS['tmpl']->assign("is_fav", $is_fav);
     $GLOBALS['tmpl']->assign("page_title", $title);
     $GLOBALS['tmpl']->assign("page_keyword", $title . ",");
     $GLOBALS['tmpl']->assign("page_description", $title . ",");
     $GLOBALS['tmpl']->assign('user_auth', get_user_auth());
     $GLOBALS['tmpl']->display("topic_index.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:30,代码来源:topicModule.class.php

示例4: __construct

 public function __construct()
 {
     if (file_exists(APP_ROOT_PATH . "public/uc_config.php")) {
         require_once APP_ROOT_PATH . "public/uc_config.php";
     }
     if (app_conf("INTEGRATE_CODE") == 'Ucenter' && UC_CONNECT == 'mysql') {
         if (file_exists(APP_ROOT_PATH . "public/uc_data/creditsettings.php")) {
             require_once APP_ROOT_PATH . "public/uc_data/creditsettings.php";
             $this->creditsettings = $_CACHE['creditsettings'];
             if (count($this->creditsettings) > 0) {
                 foreach ($this->creditsettings as $k => $v) {
                     $this->creditsettings[$k]['srctitle'] = $this->credits_CFG[$v['creditsrc']]['title'];
                 }
                 $this->allow_exchange = true;
             }
         }
     }
     $GLOBALS['tmpl']->assign("allow_exchange", $this->allow_exchange);
     parent::__construct();
     global_run();
     if (check_save_login() != LOGIN_STATUS_LOGINED) {
         app_redirect(url("index", "user#login"));
     }
     init_app_page();
 }
开发者ID:macall,项目名称:jsd,代码行数:25,代码来源:uc_logModule.class.php

示例5: index

 public function index()
 {
     global_run();
     $GLOBALS['tmpl']->caching = true;
     $GLOBALS['tmpl']->cache_lifetime = 600;
     //首页缓存10分钟
     $cache_id = md5(MODULE_NAME . ACTION_NAME . $GLOBALS['city']['id']);
     if (!$GLOBALS['tmpl']->is_cached('mall.html', $cache_id)) {
         init_app_page();
         //获取商城公告
         $notice_list = get_notice(0, array(0, 2));
         $GLOBALS['tmpl']->assign("notice_list", $notice_list);
         //输出首页推荐的分类
         $index_cates = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "shop_cate where is_delete = 0 and is_effect = 1 and recommend = 1 and pid = 0 order by sort");
         foreach ($index_cates as $k => $v) {
             $index_cates[$k]['deal_cate_type_list'] = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "shop_cate  where pid = " . $v['id'] . " order by sort limit 8");
             require_once APP_ROOT_PATH . "system/model/deal.php";
             $deal_result = get_goods_list(8, array(DEAL_ONLINE, DEAL_NOTICE), array("city_id" => $GLOBALS['city']['id'], "cid" => $v['id']), "", " d.buy_type <> 1 and d.is_shop = 1 and d.is_recommend = 1 ");
             $index_cates[$k]['deal_list'] = $deal_result['list'];
         }
         $GLOBALS['tmpl']->assign("index_cates", $index_cates);
         $GLOBALS['tmpl']->assign("drop_nav", "no_drop");
         //首页下拉菜单不输出
         $GLOBALS['tmpl']->assign("wrap_type", "1");
         //首页宽屏展示
     }
     $GLOBALS['tmpl']->display("mall.html", $cache_id);
 }
开发者ID:macall,项目名称:jsd,代码行数:28,代码来源:mallModule.class.php

示例6: exchange

 public function exchange()
 {
     global_run();
     init_app_page();
     $GLOBALS['tmpl']->assign("no_nav", true);
     //无分类下拉
     if (check_save_login() != LOGIN_STATUS_LOGINED) {
         app_redirect(url("index", "user#login"));
     }
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
     $result = get_exchange_voucher_list($limit);
     $GLOBALS['tmpl']->assign("list", $result['list']);
     $page = new Page($result['count'], app_conf("PAGE_SIZE"));
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['UC_VOUCHER']);
     assign_uc_nav_list();
     //左侧导航菜单
     $GLOBALS['tmpl']->display("uc/uc_voucher_exchange.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:25,代码来源:uc_voucherModule.class.php

示例7: index

 public function index()
 {
     global_run();
     init_app_page();
     $GLOBALS['tmpl']->assign("no_nav", true);
     //无分类下拉
     $GLOBALS['tmpl']->caching = true;
     $cache_id = md5(MODULE_NAME . ACTION_NAME);
     if (!$GLOBALS['tmpl']->is_cached('link_index.html', $cache_id)) {
         $site_nav[] = array('name' => $GLOBALS['lang']['HOME_PAGE'], 'url' => url("index", "index"));
         $site_nav[] = array('name' => $GLOBALS['lang']['FRIEND_LINK'], 'url' => url("index", "acate"));
         $GLOBALS['tmpl']->assign("site_nav", $site_nav);
         $p_link_group = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "link_group where is_effect = 1 order by sort desc");
         foreach ($p_link_group as $k => $v) {
             $g_links = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "link where is_effect = 1 and group_id = " . $v['id'] . " order by sort desc");
             if ($g_links) {
                 foreach ($g_links as $kk => $vv) {
                     if (substr($vv['url'], 0, 7) == 'http://') {
                         $g_links[$kk]['url'] = str_replace("http://", "", $vv['url']);
                     }
                 }
                 $p_link_group[$k]['links'] = $g_links;
             } else {
                 unset($p_link_group[$k]);
             }
         }
         $GLOBALS['tmpl']->assign("click_url", url('index', 'link#go'));
         $GLOBALS['tmpl']->assign("p_link_data", $p_link_group);
         $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['FRIEND_LINK']);
     }
     $GLOBALS['tmpl']->display("link_index.html", $cache_id);
 }
开发者ID:macall,项目名称:jsd,代码行数:32,代码来源:linkModule.class.php

示例8: index

 public function index()
 {
     init_app_page();
     $s_account_info = $GLOBALS["account_info"];
     $supplier_id = intval($s_account_info['supplier_id']);
     $supplier_info = $GLOBALS['db']->getRow("select * from  " . DB_PREFIX . "supplier where id=" . $supplier_id);
     //分页
     $page_size = 10;
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "supplier_money_submit  where supplier_id=" . $supplier_id . " order by status asc,create_time desc limit " . $limit);
     foreach ($list as $k => $v) {
         if ($v['status'] == 1) {
             $list[$k]['status'] = "已确认提现";
         } else {
             $list[$k]['status'] = "待审核";
         }
     }
     $total = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "supplier_money_submit  where supplier_id=" . $supplier_id);
     $page = new Page($total, $page_size);
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->assign("sms_lesstime", load_sms_lesstime());
     $GLOBALS['tmpl']->assign("sms_ipcount", load_sms_ipcount());
     $GLOBALS['tmpl']->assign("list", $list);
     $GLOBALS['tmpl']->assign("supplier_info", $supplier_info);
     $GLOBALS['tmpl']->assign("head_title", "商户提现");
     $GLOBALS['tmpl']->display("pages/withdrawal/index.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:33,代码来源:withdrawalModule.class.php

示例9: event_collect

 public function event_collect()
 {
     global_run();
     init_app_page();
     $GLOBALS['tmpl']->assign("no_nav", true);
     //无分类下拉
     if (check_save_login() != LOGIN_STATUS_LOGINED) {
         app_redirect(url("index", "user#login"));
     }
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
     $event_result = get_event_collect($GLOBALS['user_info']['id']);
     foreach ($event_result['list'] as $k => $v) {
         $event_result['list'][$k]['url'] = url('index', 'event#' . $v['id']);
         $event_result['list'][$k]['del_url'] = url('index', 'uc_collect#del', array('id' => $v['cid'], 'type' => 'event'));
     }
     $GLOBALS['tmpl']->assign("list", $event_result['list']);
     $page = new Page($event_result['count'], app_conf("PAGE_SIZE"));
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->assign("type", "event");
     $GLOBALS['tmpl']->assign("page_title", "我的收藏");
     assign_uc_nav_list();
     //左侧导航菜单
     $GLOBALS['tmpl']->display("uc/uc_collect.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:30,代码来源:uc_collectModule.class.php

示例10: index

 public function index()
 {
     global_run();
     init_app_page();
     $GLOBALS['tmpl']->caching = true;
     $cache_id = md5(MODULE_NAME . "system_article" . trim($_REQUEST['act']));
     if (!$GLOBALS['tmpl']->is_cached('system_article.html', $cache_id)) {
         $id = intval($_REQUEST['act']);
         if ($id == 0) {
             app_redirect(APP_ROOT . "/");
         }
         $article = $GLOBALS['db']->getRow("select a.*,ac.type_id from " . DB_PREFIX . "article as a left join " . DB_PREFIX . "article_cate as ac on a.cate_id = ac.id where a.id = " . $id . " and a.is_effect = 1 and a.is_delete = 0");
         if (!$article || $article['type_id'] != 3) {
             app_redirect(APP_ROOT . "/");
         }
         $GLOBALS['tmpl']->assign("article", $article);
         $seo_title = $article['seo_title'] != '' ? $article['seo_title'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_title", $seo_title);
         $seo_keyword = $article['seo_keyword'] != '' ? $article['seo_keyword'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_keyword", $seo_keyword . ",");
         $seo_description = $article['seo_description'] != '' ? $article['seo_description'] : $article['title'];
         $GLOBALS['tmpl']->assign("page_description", $seo_description . ",");
     }
     $GLOBALS['tmpl']->display("system_article.html", $cache_id);
 }
开发者ID:macall,项目名称:jsd,代码行数:25,代码来源:sys_articleModule.class.php

示例11: index

 public function index()
 {
     init_app_page();
     $s_account_info = $GLOBALS["account_info"];
     $supplier_id = intval($s_account_info['supplier_id']);
     $name = strim($_REQUEST['name']);
     $begin_time = strim($_REQUEST['begin_time']);
     $end_time = strim($_REQUEST['end_time']);
     $begin_time_s = to_timespan($begin_time, "Y-m-d H:i");
     $end_time_s = to_timespan($end_time, "Y-m-d H:i");
     $condition = "";
     if ($name != "") {
         $youhui_ids = $GLOBALS['db']->getRow("select group_concat(id SEPARATOR ',') as ids  from " . DB_PREFIX . "youhui where name  like '%" . $name . "%'");
         $condition .= " and log.youhui_id in (" . $youhui_ids['ids'] . ") ";
     }
     if ($begin_time_s) {
         $condition .= " and log.create_time > " . $begin_time_s . " ";
     }
     if ($end_time_s) {
         $condition .= " and log.create_time < " . $end_time_s . " ";
     }
     $GLOBALS['tmpl']->assign("name", $name);
     $GLOBALS['tmpl']->assign("begin_time", $begin_time);
     $GLOBALS['tmpl']->assign("end_time", $end_time);
     //分页
     $page_size = 15;
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $list = $GLOBALS['db']->getAll("select distinct(log.id),log.* from " . DB_PREFIX . "youhui_log as log  left join " . DB_PREFIX . "youhui_location_link as l on l.youhui_id = log.youhui_id where l.location_id in (" . implode(",", $s_account_info['location_ids']) . ") " . $condition . " order by log.create_time desc limit " . $limit);
     foreach ($list as $k => $v) {
         $list[$k]['user_name'] = load_user($v['user_id']);
         $list[$k]['user_name'] = $list[$k]['user_name']['user_name'];
         $youhui_info = load_auto_cache("youhui", array('id' => $v['youhui_id']));
         $list[$k]['youhui_name'] = $youhui_info['name'];
         $location_info = load_auto_cache("store", array('id' => $v['location_id']));
         $list[$k]['location_name'] = $location_info['name'];
         if ($list[$k]['expire_time'] != 0 && $list[$k]['expire_time'] < NOW_TIME) {
             $list[$k]['expire_time'] = "已过期";
         } elseif ($list[$k]['expire_time'] == 0) {
             $list[$k]['expire_time'] = "永久有效";
         } else {
             $list[$k]['expire_time'] = to_date($list[$k]['expire_time']);
         }
         $list[$k]['url'] = url('index', 'youhui#' . $v['youhui_id']);
     }
     $total = $GLOBALS['db']->getOne("select count(distinct(log.id)) from " . DB_PREFIX . "youhui_log as log  left join " . DB_PREFIX . "youhui_location_link as l on l.youhui_id = log.youhui_id where l.location_id in (" . implode(",", $s_account_info['location_ids']) . ") " . $condition);
     $page = new Page($total, $page_size);
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     $GLOBALS['tmpl']->assign("list", $list);
     $GLOBALS['tmpl']->assign("head_title", "优惠券下载记录");
     $GLOBALS['tmpl']->display("pages/youhuio/index.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:57,代码来源:youhuioModule.class.php

示例12: index

 public function index()
 {
     global_run();
     init_app_page();
     $GLOBALS['tmpl']->assign("no_nav", true);
     //无分类下拉
     $GLOBALS['tmpl']->assign("city_name", $GLOBALS['city']['name']);
     $GLOBALS['tmpl']->display("position.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:9,代码来源:positionModule.class.php

示例13: index

 public function index()
 {
     init_app_page();
     $s_account_info = $GLOBALS['account_info'];
     $account_id = intval($s_account_info['id']);
     //获取支持的门店
     //$location_list = $GLOBALS['db']->getAll("select sl.id,sl.name from ".DB_PREFIX."supplier_account_location_link sall left join ".DB_PREFIX."supplier_location sl on sl.id = sall.location_id where sall.account_id=".$account_id);
     $location_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "supplier_location where id in (" . implode(",", $s_account_info['location_ids']) . ") ");
     $GLOBALS['tmpl']->assign("location_list", $location_list);
     $GLOBALS['tmpl']->assign("page_title", "优惠券验证");
     $GLOBALS['tmpl']->display("pages/youhuiv/index.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:12,代码来源:youhuivModule.class.php

示例14: index

 public function index()
 {
     init_app_page();
     $s_account_info = $GLOBALS["account_info"];
     $supplier_id = intval($s_account_info['supplier_id']);
     $supplier_info = $GLOBALS['db']->getRow("select * from  " . DB_PREFIX . "supplier where id=" . $supplier_id);
     $GLOBALS['tmpl']->assign("sms_lesstime", load_sms_lesstime());
     $GLOBALS['tmpl']->assign("sms_ipcount", load_sms_ipcount());
     $GLOBALS['tmpl']->assign("supplier_info", $supplier_info);
     $GLOBALS['tmpl']->assign("head_title", "银行卡绑定");
     $GLOBALS['tmpl']->display("pages/bankinfo/index.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:12,代码来源:bankinfoModule.class.php

示例15: super

 public function super()
 {
     init_app_page();
     $s_account_info = $GLOBALS['account_info'];
     $account_id = intval($s_account_info['id']);
     assign_biz_nav_list();
     //获取支持的门店
     $location_list = $GLOBALS['db']->getAll("select id,name from " . DB_PREFIX . "supplier_location where id in(" . implode(",", $GLOBALS['account_info']['location_ids']) . ")");
     $GLOBALS['tmpl']->assign("location_list", $location_list);
     $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['VERIFY_COUPON']);
     $GLOBALS['tmpl']->display("pages/verify/super.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:12,代码来源:dealvModule.class.php


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