• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP init_app_page函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: 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"));
     }
     $GLOBALS['tmpl']->assign("page_title", "我的点评");
     assign_uc_nav_list();
     //begin review
     require_once APP_ROOT_PATH . "system/model/review.php";
     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;
     $dp_res = get_dp_list($limit, "", " user_id = " . $GLOBALS['user_info']['id']);
     $dp_list = $dp_res['list'];
     $total = $GLOBALS['db']->getOne("select count(*) from " . DB_PREFIX . "supplier_location_dp  where " . $dp_res['condition']);
     $page = new Page($total, $page_size);
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     foreach ($dp_list as $k => $v) {
         if ($v['deal_id'] > 0) {
             $data_info = load_auto_cache("deal", array("id" => $v['deal_id']));
         } elseif ($v['youhui_id'] > 0) {
             $data_info = load_auto_cache("youhui", array("id" => $v['youhui_id']));
         } elseif ($v['event_id'] > 0) {
             $data_info = load_auto_cache("event", array("id" => $v['event_id']));
         }
         if (empty($data_info)) {
             $data_info = load_auto_cache("store", array("id" => $v['supplier_location_id']));
         }
         $dp_list[$k]['data_info'] = $data_info;
     }
     $GLOBALS['tmpl']->assign('dp_list', $dp_list);
     require_once APP_ROOT_PATH . "system/model/topic.php";
     global $no_lazy;
     $no_lazy = true;
     $review_html = decode_topic_without_img($GLOBALS['tmpl']->fetch("inc/uc_review_list.html"));
     $GLOBALS['tmpl']->assign("review_html", $review_html);
     //end review
     $no_lazy = false;
     $GLOBALS['tmpl']->display("uc/uc_review_index.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:51,代码来源:uc_reviewModule.class.php


示例17: 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 . trim($_REQUEST['act']));
     if (!$GLOBALS['tmpl']->is_cached('notice_list.html', $cache_id)) {
         $site_nav[] = array('name' => $GLOBALS['lang']['HOME_PAGE'], 'url' => url("index", "index"));
         $site_nav[] = array('name' => $GLOBALS['lang']['SITE_NOTICE_LIST'], 'url' => url("index", "news"));
         $GLOBALS['tmpl']->assign("site_nav", $site_nav);
         $id = intval($_REQUEST['act']);
         $cate_item = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "article_cate where id = " . $id . " and is_effect = 1 and is_delete = 0");
         if ($id > 0 && !$cate_item) {
             app_redirect(APP_ROOT . "/");
         } elseif ($cate_item && $cate_item['type_id'] != 2) {
             if ($cate_item['type_id'] == 1) {
                 app_redirect(url("index", "help"));
             }
             if ($cate_item['type_id'] == 0) {
                 app_redirect(url("index", "acate"));
             }
             if ($cate_item['type_id'] == 3) {
                 app_redirect(APP_ROOT . "/");
             }
         }
         $cate_id = intval($cate_item['id']);
         $cate_tree = get_acate_tree('', 2, "news");
         $GLOBALS['tmpl']->assign("acate_tree", $cate_tree);
         //分页
         $page = intval($_REQUEST['p']);
         if ($page <= 0) {
             $page = 1;
         }
         $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
         $result = get_article_list($limit, $cate_id, 'ac.type_id = 2', '', false);
         $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("cur_id", $cate_id);
         $GLOBALS['tmpl']->assign("cur_title", $GLOBALS['lang']['SITE_NOTICE_LIST']);
         $GLOBALS['tmpl']->assign("page_title", $cate_item['title']);
         $GLOBALS['tmpl']->assign("page_keyword", $cate_item['title'] . ",");
         $GLOBALS['tmpl']->assign("page_description", $cate_item['title'] . ",");
     }
     $GLOBALS['tmpl']->display("notice_list.html", $cache_id);
 }
开发者ID:macall,项目名称:jsd,代码行数:50,代码来源:newsModule.class.php


示例18: 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 = 10;
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $user_id = $GLOBALS['user_info']['id'];
     require_once APP_ROOT_PATH . "system/model/deal_order.php";
     $order_item_table = get_user_order_item_table_name($user_id);
     $order_table = get_user_order_table_name($user_id);
     if ($did > 0) {
         $order_deal_item = $GLOBALS['db']->getRow("select doi.* from " . $order_item_table . " as doi left join " . $order_table . " as do on doi.order_id = do.id where doi.id = " . $did . " and doi.is_coupon = 1 and do.user_id = " . $user_id);
         $deal = load_auto_cache("deal", array("id" => $order_deal_item['deal_id']));
         $order_deal_item['url'] = $deal['url'];
     }
     if ($order_deal_item) {
         $sql = "select doi.sub_name,doi.name,doi.number,c.* from " . DB_PREFIX . "deal_coupon as c left join " . $order_item_table . " as doi on doi.id = c.order_deal_id where c.is_valid > 0 and " . " c.user_id = " . $user_id . " and doi.id = " . $order_deal_item['id'] . " order by c.id desc limit " . $limit;
         $sql_count = "select count(*) from " . DB_PREFIX . "deal_coupon as c where c.is_valid > 0 and " . " c.user_id = " . $user_id . " and c.order_deal_id = " . $order_deal_item['id'];
         $GLOBALS['tmpl']->assign("deal", $order_deal_item);
     } else {
         $sql = "select doi.sub_name,doi.name,doi.number,c.* from " . DB_PREFIX . "deal_coupon as c left join " . DB_PREFIX . "deal_order_item as doi on doi.id = c.order_deal_id where c.is_valid > 0 and " . " c.user_id = " . $user_id . " order by c.id desc limit " . $limit;
         $sql_count = "select count(*) from " . DB_PREFIX . "deal_coupon as c where c.is_valid > 0 and " . " c.user_id = " . $user_id;
     }
     $list = $GLOBALS['db']->getAll($sql);
     foreach ($list as $k => $v) {
         $list[$k]['deal'] = load_auto_cache("deal", array("id" => $v['deal_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_coupon_index.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:49,代码来源:uc_couponModule.class.php


示例19: add

 public function add()
 {
     global_run();
     init_app_page();
     $GLOBALS['tmpl']->assign("no_nav", true);
     //无分类下拉
     if (check_save_login() != LOGIN_STATUS_LOGINED) {
         app_redirect(url("index", "user#login"));
     }
     if (intval($_REQUEST['id']) > 0) {
         $GLOBALS['tmpl']->assign("consignee_id", intval($_REQUEST['id']));
     }
     $GLOBALS['tmpl']->assign("page_title", "配送地址");
     assign_uc_nav_list();
     //左侧导航菜单
     $GLOBALS['tmpl']->display("uc/uc_consignee_add.html");
 }
开发者ID:macall,项目名称:jsd,代码行数:17,代码来源:uc_consigneeModule.class.php


示例20: 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 . trim($_REQUEST['act']));
     if (!$GLOBALS['tmpl']->is_cached('notice_index.html', $cache_id)) {
         $site_nav[] = array('name' => $GLOBALS['lang']['HOME_PAGE'], 'url' => url("index", "index"));
         $site_nav[] = array('name' => $GLOBALS['lang']['SITE_NOTICE_LIST'], 'url' => url("index", "news"));
         $GLOBALS['tmpl']->assign("site_nav", $site_nav);
         $id = intval($_REQUEST['act']);
         if ($id == 0) {
             app_redirect(url("index", "news"));
         }
         $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");
         $cate_tree = get_acate_tree('', 2, "news");
         $GLOBALS['tmpl']->assign("acate_tree", $cate_tree);
         if (!$article || $article['type_id'] != 2) {
             app_redirect(APP_ROOT . "/");
         } else {
             if ($article['rel_url'] != '') {
                 if (!preg_match("/http:\\/\\//i", $article['rel_url'])) {
                     if (substr($article['rel_url'], 0, 2) == 'u:') {
                         app_redirect(parse_url_tag($article['rel_url']));
                     } else {
                         app_redirect(APP_ROOT . "/" . $article['rel_url']);
                     }
                 } else {
                     app_redirect($article['rel_url']);
                 }
             }
         }
         $GLOBALS['tmpl']->assign("article", $article);
         $GLOBALS['tmpl']->assign("cur_id", $article['cate_id']);
         $GLOBALS['tmpl']->assign("cur_title", $GLOBALS['lang']['SITE_NOTICE_LIST']);
         $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("notice_index.html", $cache_id);
 }
开发者ID:macall,项目名称:jsd,代码行数:46,代码来源:noticeModule.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP init_args函数代码示例发布时间:2022-05-15
下一篇:
PHP initWriteDB函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap