本文整理汇总了PHP中get_article_list函数的典型用法代码示例。如果您正苦于以下问题:PHP get_article_list函数的具体用法?PHP get_article_list怎么用?PHP get_article_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_article_list函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: view
private function view()
{
$id = intval($_REQUEST['id']);
if ($id == 0) {
app_redirect(url("index", "usagetip"));
}
$GLOBALS['tmpl']->caching = true;
$GLOBALS['tmpl']->cache_lifetime = 6000;
//首页缓存10分钟
$cache_id = md5(MODULE_NAME . ACTION_NAME . "view" . $id);
if (!$GLOBALS['tmpl']->is_cached("page/usagetip_view.html", $cache_id)) {
$article = get_article($id);
$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 . ",");
//使用技巧
$use_tech_list = get_article_list(6, 6);
$GLOBALS['tmpl']->assign("use_tech_list", $use_tech_list);
}
$GLOBALS['tmpl']->display("page/usagetip_view.html", $cache_id);
}
开发者ID:workplayteam,项目名称:P2P,代码行数:25,代码来源:usagetipModule.class.php
示例2: index
public function index()
{
$ajax = intval($_REQUEST["is_ajax"]);
$GLOBALS['tmpl']->caching = true;
$cache_id = md5(MODULE_NAME . ACTION_NAME . trim($_REQUEST['title']) . $GLOBALS['deal_city']['id']);
if (!$GLOBALS['tmpl']->is_cached('page/article_index.html', $cache_id)) {
$article_name = urldecode($_REQUEST['title']);
$article = get_article_buy_uname($article_name);
if ($article) {
$article_list = get_article_list(12, $article["cate_id"], "", "");
}
if ($article["title"] == "") {
$article["title"] = $article_name;
}
$GLOBALS['tmpl']->assign("article", $article);
$GLOBALS['tmpl']->assign("article_list", $article_list["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']->assign("ajax", $ajax);
$GLOBALS['tmpl']->display("debit/debit_article.html", $cache_id);
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:26,代码来源:debit_articleModule.class.php
示例3: detail
public function detail()
{
$id = intval($_REQUEST['id']);
$aid = intval($_REQUEST['aid']);
if ($id == 0) {
app_redirect(url("index", "guarantee"));
}
$article_cate = get_acate_tree(12);
$info = null;
foreach ($article_cate as $k => $v) {
if ($id == $v['id']) {
$info = $v;
}
$article_cate[$k]['article'] = get_article_list(100, $v['id'], "", "", true);
}
$GLOBALS['tmpl']->assign("article_cate", $article_cate);
$GLOBALS['tmpl']->assign("id", $id);
$GLOBALS['tmpl']->assign("aid", $aid);
$seo_title = $info['seo_title'] != '' ? $info['seo_title'] : $info['title'];
$GLOBALS['tmpl']->assign("page_title", $seo_title . " - 安全保障");
$seo_keyword = $info['seo_keyword'] != '' ? $info['seo_keyword'] : $info['title'];
$GLOBALS['tmpl']->assign("page_keyword", $seo_keyword . ",安全保障,");
$seo_description = $info['seo_description'] != '' ? $info['seo_description'] : $info['title'];
$GLOBALS['tmpl']->assign("page_description", $seo_description . ",安全保障,");
$GLOBALS['tmpl']->display("page/guarantee_detail.html");
}
开发者ID:workplayteam,项目名称:P2P,代码行数:26,代码来源:guaranteeModule.class.php
示例4: __construct
public function __construct()
{
$GLOBALS['tmpl']->assign("MODULE_NAME", MODULE_NAME);
$GLOBALS['tmpl']->assign("ACTION_NAME", ACTION_NAME);
$GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/page_static_cache/");
$GLOBALS['dynamic_cache'] = $GLOBALS['fcache']->get("APP_DYNAMIC_CACHE_" . APP_INDEX . "_" . MODULE_NAME . "_" . ACTION_NAME);
$GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/avatar_cache/");
$GLOBALS['dynamic_avatar_cache'] = $GLOBALS['fcache']->get("AVATAR_DYNAMIC_CACHE");
//头像的动态缓存
//输出导航菜单
$nav_list = get_shop_nav_list();
$nav_list = init_nav_list($nav_list);
$GLOBALS['tmpl']->assign("nav_list", $nav_list);
//输出在线客服与时间
$qq = explode("|", app_conf("ONLINE_QQ"));
$msn = explode("|", app_conf("ONLINE_MSN"));
$GLOBALS['tmpl']->assign("online_qq", $qq);
$GLOBALS['tmpl']->assign("online_msn", $msn);
//输出页面的标题关键词与描述
$GLOBALS['tmpl']->assign("shop_info", get_shop_info());
//输出系统文章
$system_article = get_article_list(8, 0, "ac.type_id = 3", "", true);
$GLOBALS['tmpl']->assign("system_article", $system_article['list']);
//输出帮助
$deal_help = get_help();
$GLOBALS['tmpl']->assign("deal_help", $deal_help);
//输出热门关键词
// 热门搜索词
$hot_kw = get_hot_kw();
$GLOBALS['tmpl']->assign("hot_kw", $hot_kw);
if (MODULE_NAME == "index" && ACTION_NAME == "index" || MODULE_NAME == "acate" && ACTION_NAME == "index" || MODULE_NAME == "article" && ACTION_NAME == "index" || MODULE_NAME == "brand" && ACTION_NAME == "index" || MODULE_NAME == "cate" && ACTION_NAME == "index" || MODULE_NAME == "city" && ACTION_NAME == "index" || MODULE_NAME == "comment" && ACTION_NAME == "index" || MODULE_NAME == "daren" && ACTION_NAME == "index" || MODULE_NAME == "daren" && ACTION_NAME == "submit" || MODULE_NAME == "discount" && ACTION_NAME == "index" || MODULE_NAME == "discover" && ACTION_NAME == "index" || MODULE_NAME == "exchange" && ACTION_NAME == "index" || MODULE_NAME == "goods" && ACTION_NAME == "index" || MODULE_NAME == "group" && ACTION_NAME == "index" || MODULE_NAME == "group" && ACTION_NAME == "forum" || MODULE_NAME == "group" && ACTION_NAME == "create" || MODULE_NAME == "help" && ACTION_NAME == "index" || MODULE_NAME == "link" && ACTION_NAME == "index" || MODULE_NAME == "mall" && ACTION_NAME == "index" || MODULE_NAME == "mobile" && ACTION_NAME == "index" || MODULE_NAME == "msg" && ACTION_NAME == "index" || MODULE_NAME == "notice" && ACTION_NAME == "index" || MODULE_NAME == "notice" && ACTION_NAME == "list_notice" || MODULE_NAME == "rec" && ACTION_NAME == "rhot" || MODULE_NAME == "rec" && ACTION_NAME == "rnew" || MODULE_NAME == "rec" && ACTION_NAME == "rbest" || MODULE_NAME == "rec" && ACTION_NAME == "rsale" || MODULE_NAME == "score" && ACTION_NAME == "index" || MODULE_NAME == "space" && ACTION_NAME == "index" || MODULE_NAME == "space" && ACTION_NAME == "fav" || MODULE_NAME == "space" && ACTION_NAME == "fans" || MODULE_NAME == "space" && ACTION_NAME == "focus" || MODULE_NAME == "msg" && ACTION_NAME == "index" || MODULE_NAME == "ss" && ACTION_NAME == "index" || MODULE_NAME == "ss" && ACTION_NAME == "pick" || MODULE_NAME == "sys" && ACTION_NAME == "index" || MODULE_NAME == "sys" && ACTION_NAME == "list_notice" || MODULE_NAME == "topic" && ACTION_NAME == "index" || MODULE_NAME == "vote" && ACTION_NAME == "index") {
set_gopreview();
}
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:34,代码来源:ShopBaseModule.class.php
示例5: __construct
public function __construct()
{
$GLOBALS['tmpl']->assign("MODULE_NAME", MODULE_NAME);
$GLOBALS['tmpl']->assign("ACTION_NAME", ACTION_NAME);
$GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/page_static_cache/");
$GLOBALS['dynamic_cache'] = $GLOBALS['fcache']->get("APP_DYNAMIC_CACHE_" . APP_INDEX . "_" . MODULE_NAME . "_" . ACTION_NAME);
$GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/avatar_cache/");
$GLOBALS['dynamic_avatar_cache'] = $GLOBALS['fcache']->get("AVATAR_DYNAMIC_CACHE");
//头像的动态缓存
//输出导航菜单
$nav_list = get_nav_list();
$nav_list = init_nav_list($nav_list);
$GLOBALS['tmpl']->assign("nav_list", $nav_list);
//输出在线客服与时间
$qq = explode("|", app_conf("ONLINE_QQ"));
$msn = explode("|", app_conf("ONLINE_MSN"));
$GLOBALS['tmpl']->assign("online_qq", $qq);
$GLOBALS['tmpl']->assign("online_msn", $msn);
//输出页面的标题关键词与描述
$GLOBALS['tmpl']->assign("shop_info", get_shop_info());
//输出帮助
$deal_help = get_help();
$GLOBALS['tmpl']->assign("deal_help", $deal_help);
//输出系统文章
$system_article = get_article_list(8, 0, "ac.type_id = 3", "", true);
$GLOBALS['tmpl']->assign("system_article", $system_article['list']);
//输出热门关键词
$hot_kw = get_hot_kw();
$GLOBALS['tmpl']->assign("hot_kw", $hot_kw);
if (MODULE_NAME == "deal" && ACTION_NAME == "index" || MODULE_NAME == "deals" && ACTION_NAME == "index" || MODULE_NAME == "dhapi" && ACTION_NAME == "index" || MODULE_NAME == "index" && ACTION_NAME == "index" || MODULE_NAME == "message" && ACTION_NAME == "index" || MODULE_NAME == "order" && ACTION_NAME == "index" || MODULE_NAME == "search" && ACTION_NAME == "index" || MODULE_NAME == "second" && ACTION_NAME == "index") {
set_gopreview();
}
}
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:33,代码来源:TuanBaseModule.class.php
示例6: __construct
public function __construct()
{
if ($GLOBALS['distribution_cfg']['OSS_TYPE'] && $GLOBALS['distribution_cfg']['OSS_TYPE'] == "ES_FILE") {
logger::write($GLOBALS['distribution_cfg']['OSS_DOMAIN'] . "/es_file.php");
global $syn_image_ci;
global $curl_param;
//global $syn_image_idx;
$syn_image_idx = 0;
$syn_image_ci = curl_init($GLOBALS['distribution_cfg']['OSS_DOMAIN'] . "/es_file.php");
curl_setopt($syn_image_ci, CURLOPT_RETURNTRANSFER, true);
curl_setopt($syn_image_ci, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($syn_image_ci, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($syn_image_ci, CURLOPT_NOPROGRESS, true);
curl_setopt($syn_image_ci, CURLOPT_HEADER, false);
curl_setopt($syn_image_ci, CURLOPT_POST, TRUE);
curl_setopt($syn_image_ci, CURLOPT_TIMEOUT, 1);
curl_setopt($syn_image_ci, CURLOPT_TIMECONDITION, 1);
$curl_param['username'] = $GLOBALS['distribution_cfg']['OSS_ACCESS_ID'];
$curl_param['password'] = $GLOBALS['distribution_cfg']['OSS_ACCESS_KEY'];
$curl_param['act'] = 2;
}
$GLOBALS['tmpl']->assign("MODULE_NAME", MODULE_NAME);
$GLOBALS['tmpl']->assign("ACTION_NAME", ACTION_NAME);
$GLOBALS['cache']->set_dir(APP_ROOT_PATH . "public/runtime/data/page_static_cache/");
$GLOBALS['dynamic_cache'] = $GLOBALS['cache']->get("APP_DYNAMIC_CACHE_" . APP_INDEX . "_" . MODULE_NAME . "_" . ACTION_NAME);
$GLOBALS['cache']->set_dir(APP_ROOT_PATH . "public/runtime/data/avatar_cache/");
$GLOBALS['dynamic_avatar_cache'] = $GLOBALS['cache']->get("AVATAR_DYNAMIC_CACHE");
//头像的动态缓存
//输出导航菜单
$nav_list = get_nav_list();
$nav_list = init_nav_list($nav_list);
foreach ($nav_list as $k => $v) {
$nav_list[$k]['sub_nav'] = init_nav_list($v['sub_nav']);
}
$GLOBALS['tmpl']->assign("nav_list", $nav_list);
//输出在线客服与时间
if (app_conf("ONLINE_QQ") != "") {
$qq = unserialize(app_conf("ONLINE_QQ"));
$GLOBALS['tmpl']->assign("online_qq", $qq);
}
//输出页面的标题关键词与描述
$GLOBALS['tmpl']->assign("site_info", get_site_info());
//输出系统文章
$system_article = get_article_list(8, 0, "ac.type_id = 3", "", true);
$GLOBALS['tmpl']->assign("system_article", $system_article['list']);
//输出帮助
$deal_help = get_help();
$GLOBALS['tmpl']->assign("deal_help", $deal_help);
if (MODULE_NAME == "acate" && ACTION_NAME == "index" || MODULE_NAME == "article" && ACTION_NAME == "index" || MODULE_NAME == "cate" && ACTION_NAME == "index" || MODULE_NAME == "comment" && ACTION_NAME == "index" || MODULE_NAME == "help" && ACTION_NAME == "index" || MODULE_NAME == "link" && ACTION_NAME == "index" || MODULE_NAME == "mobile" && ACTION_NAME == "index" || MODULE_NAME == "msg" && ACTION_NAME == "index" || MODULE_NAME == "notice" && ACTION_NAME == "index" || MODULE_NAME == "notice" && ACTION_NAME == "list_notice" || MODULE_NAME == "rec" && ACTION_NAME == "rhot" || MODULE_NAME == "rec" && ACTION_NAME == "rnew" || MODULE_NAME == "rec" && ACTION_NAME == "rbest" || MODULE_NAME == "rec" && ACTION_NAME == "rsale" || MODULE_NAME == "score" && ACTION_NAME == "index" || MODULE_NAME == "space" && ACTION_NAME == "index" || MODULE_NAME == "space" && ACTION_NAME == "fav" || MODULE_NAME == "space" && ACTION_NAME == "fans" || MODULE_NAME == "space" && ACTION_NAME == "focus" || MODULE_NAME == "msg" && ACTION_NAME == "index" || MODULE_NAME == "ss" && ACTION_NAME == "index" || MODULE_NAME == "ss" && ACTION_NAME == "pick" || MODULE_NAME == "sys" && ACTION_NAME == "index" || MODULE_NAME == "sys" && ACTION_NAME == "list_notice" || MODULE_NAME == "vote" && ACTION_NAME == "index") {
set_gopreview();
}
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:52,代码来源:SiteBaseModule.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 . 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
示例8: index
public function index()
{
$GLOBALS['tmpl']->caching = true;
$cache_id = md5(MODULE_NAME . ACTION_NAME);
if (!$GLOBALS['tmpl']->is_cached('page/helpcenter.html', $cache_id)) {
$article_cate = get_acate_tree(13);
$info = null;
foreach ($article_cate as $k => $v) {
$article_cate[$k]['article'] = get_article_list(100, $v['id'], "", "", true);
}
$GLOBALS['tmpl']->assign("article_cate", $article_cate);
$GLOBALS['tmpl']->assign("page_title", "帮助中心");
$GLOBALS['tmpl']->assign("page_keyword", "帮助中心");
$GLOBALS['tmpl']->assign("page_description", "帮助中心");
}
$GLOBALS['tmpl']->display("page/helpcenter.html", $cache_id);
}
开发者ID:workplayteam,项目名称:P2P,代码行数:17,代码来源:helpcenterModule.class.php
示例9: __construct
public function __construct()
{
$GLOBALS['tmpl']->assign("MODULE_NAME", MODULE_NAME);
$GLOBALS['tmpl']->assign("ACTION_NAME", ACTION_NAME);
$GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/page_static_cache/");
$GLOBALS['dynamic_cache'] = $GLOBALS['fcache']->get("APP_DYNAMIC_CACHE_" . APP_INDEX . "_" . MODULE_NAME . "_" . ACTION_NAME);
$GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/avatar_cache/");
$GLOBALS['dynamic_avatar_cache'] = $GLOBALS['fcache']->get("AVATAR_DYNAMIC_CACHE");
//头像的动态缓存
//输出导航菜单
$nav_list = get_nav_list();
$nav_list = init_nav_list($nav_list);
foreach ($nav_list as $k => $v) {
$nav_list[$k]['sub_nav'] = init_nav_list($v['sub_nav']);
}
$GLOBALS['tmpl']->assign("nav_list", $nav_list);
//输出在线客服与时间
if (app_conf("ONLINE_QQ") != "") {
$qq = unserialize(app_conf("ONLINE_QQ"));
$GLOBALS['tmpl']->assign("online_qq", $qq);
}
//输出页面的标题关键词与描述
$GLOBALS['tmpl']->assign("site_info", get_site_info());
//输出系统文章
$system_article = get_article_list(8, 0, "ac.type_id = 3", "", true);
$GLOBALS['tmpl']->assign("system_article", $system_article['list']);
//输出帮助
$deal_help = get_help();
$GLOBALS['tmpl']->assign("deal_help", $deal_help);
//输出热门关键词
$hot_kw = app_conf("SHOP_SEARCH_KEYWORD");
$hot_kw = preg_split("/[ ,]/i", $hot_kw);
$GLOBALS['tmpl']->assign("hot_kw", $hot_kw);
if (MODULE_NAME == "acate" && ACTION_NAME == "index" || MODULE_NAME == "article" && ACTION_NAME == "index" || MODULE_NAME == "cate" && ACTION_NAME == "index" || MODULE_NAME == "comment" && ACTION_NAME == "index" || MODULE_NAME == "help" && ACTION_NAME == "index" || MODULE_NAME == "link" && ACTION_NAME == "index" || MODULE_NAME == "mobile" && ACTION_NAME == "index" || MODULE_NAME == "msg" && ACTION_NAME == "index" || MODULE_NAME == "notice" && ACTION_NAME == "index" || MODULE_NAME == "notice" && ACTION_NAME == "list_notice" || MODULE_NAME == "rec" && ACTION_NAME == "rhot" || MODULE_NAME == "rec" && ACTION_NAME == "rnew" || MODULE_NAME == "rec" && ACTION_NAME == "rbest" || MODULE_NAME == "rec" && ACTION_NAME == "rsale" || MODULE_NAME == "score" && ACTION_NAME == "index" || MODULE_NAME == "space" && ACTION_NAME == "index" || MODULE_NAME == "space" && ACTION_NAME == "fav" || MODULE_NAME == "space" && ACTION_NAME == "fans" || MODULE_NAME == "space" && ACTION_NAME == "focus" || MODULE_NAME == "msg" && ACTION_NAME == "index" || MODULE_NAME == "ss" && ACTION_NAME == "index" || MODULE_NAME == "ss" && ACTION_NAME == "pick" || MODULE_NAME == "sys" && ACTION_NAME == "index" || MODULE_NAME == "sys" && ACTION_NAME == "list_notice" || MODULE_NAME == "vote" && ACTION_NAME == "index") {
set_gopreview();
}
}
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:37,代码来源:SiteBaseModule.class.php
示例10: index
public function index()
{
$GLOBALS['tmpl']->caching = true;
$GLOBALS['tmpl']->cache_lifetime = 600;
//首页缓存10分钟
$cache_id = md5(MODULE_NAME . ACTION_NAME);
if (!$GLOBALS['tmpl']->is_cached("page/index.html", $cache_id)) {
make_deal_cate_js();
make_delivery_region_js();
change_deal_status();
//开始输出友情链接
$f_link_group = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "link_group where is_effect = 1 order by sort desc");
foreach ($f_link_group as $k => $v) {
$g_links = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "link where is_effect = 1 and show_index = 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']);
}
}
$f_link_group[$k]['links'] = $g_links;
} else {
unset($f_link_group[$k]);
}
}
//最新借款列表
$deal_list = get_deal_list(11, 0, "publish_wait =0 AND deal_status in(1,2,4) ", " deal_status ASC,is_recommend DESC,sort DESC,id DESC");
$GLOBALS['tmpl']->assign("deal_list", $deal_list['list']);
//输出最新转让
$transfer_list = get_transfer_list(11, " and d.deal_status >= 4 ", '', '', " d.create_time DESC , dlt.id DESC ");
$GLOBALS['tmpl']->assign('transfer_list', $transfer_list['list']);
//输出公告
$notice_list = get_notice(7);
$GLOBALS['tmpl']->assign("notice_list", $notice_list);
//输出公司动态
$art_id = $GLOBALS['db']->getOne("SELECT id FROM " . DB_PREFIX . "article_cate where title='公司动态'");
if ($art_id > 0) {
$compnay_active_list = get_article_list(5, $art_id);
$GLOBALS['tmpl']->assign("art_id", $art_id);
$GLOBALS['tmpl']->assign("compnay_active_list", $compnay_active_list['list']);
}
//投资排行
//天
$now_time = to_timespan(to_date(TIME_UTC, "Y-m-d"), "Y-m-d");
$day_load_top_list = $GLOBALS['db']->getAll("SELECT * FROM (SELECT user_name,sum(money) as total_money FROM " . DB_PREFIX . "deal_load where create_time >= " . $now_time . " group by user_id ORDER BY total_money DESC) as tmp LIMIT 5");
//周
$week_time = to_timespan(to_date(TIME_UTC - to_date(TIME_UTC, "w") * 24 * 3600, "Y-m-d"), "Y-m-d");
$week_load_top_list = $GLOBALS['db']->getAll("SELECT * FROM (SELECT user_name,sum(money) as total_money FROM " . DB_PREFIX . "deal_load where create_time >= " . $week_time . " group by user_id ORDER BY total_money DESC) as tmp LIMIT 5 ");
//月
$month_time = to_timespan(to_date(TIME_UTC, "Y-m") . "-01", "Y-m-d");
$month_load_top_list = $GLOBALS['db']->getAll("SELECT * FROM (SELECT user_name,sum(money) as total_money FROM " . DB_PREFIX . "deal_load where create_time >= " . $month_time . " group by user_id ORDER BY total_money DESC) as tmp LIMIT 5");
$GLOBALS['tmpl']->assign("day_load_top_list", $day_load_top_list);
$GLOBALS['tmpl']->assign("week_load_top_list", $week_load_top_list);
$GLOBALS['tmpl']->assign("month_load_top_list", $month_load_top_list);
//收益排名
$load_repay_list = $GLOBALS['db']->getAll("SELECT us.*,u.user_name FROM " . DB_PREFIX . "user_sta us LEFT JOIN " . DB_PREFIX . "user u ON us.user_id=u.id WHERE u.is_effect =1 and u.is_delete=0 and us.load_earnings > 0 ORDER BY us.load_earnings DESC LIMIT 5");
$GLOBALS['tmpl']->assign("load_repay_list", $load_repay_list);
//使用技巧
$use_tech_list = get_article_list(12, 6);
$GLOBALS['tmpl']->assign("use_tech_list", $use_tech_list);
$now = TIME_UTC;
$vote = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "vote where is_effect = 1 and begin_time < " . $now . " and (end_time = 0 or end_time > " . $now . ") order by sort desc limit 1");
$GLOBALS['tmpl']->assign("vote", $vote);
$GLOBALS['tmpl']->assign("f_link_data", $f_link_group);
//累计投资金额
$stats['total_load'] = $GLOBALS['db']->getOne("SELECT sum(money) FROM " . DB_PREFIX . "deal_load where is_repay= 0 ");
$stats['total_load_format'] = format_conf_count(number_format($stats['total_load'], 2));
//成交笔数
$stats['deal_total_count'] = $GLOBALS['db']->getOne("SELECT count(*) FROM " . DB_PREFIX . "deal where deal_status >=4 ");
//累计创造收益
$stats['total_rate'] = $GLOBALS['db']->getOne("SELECT sum(repay_money-self_money) FROM " . DB_PREFIX . "deal_load_repay where has_repay = 1 ");
$stats['total_rate_format'] = format_conf_count(number_format($stats['total_rate'], 2));
//本息保证金(元)
$stats['total_bzh'] = $GLOBALS['db']->getOne("SELECT sum(guarantor_real_freezen_amt+real_freezen_amt) FROM " . DB_PREFIX . "deal where deal_status= 4 ");
$stats['total_bzh_format'] = format_conf_count(number_format($stats['total_bzh'], 2));
//待收资金(元)
$stats['total_repay'] = $GLOBALS['db']->getOne("SELECT sum(repay_money) FROM " . DB_PREFIX . "deal_load_repay where has_repay = 1 ");
$stats['total_repay_format'] = format_conf_count(number_format($stats['total_repay'], 2));
//待投资金(元)
$statsU = $GLOBALS['db']->getRow("SELECT sum(money) as total_usermoney ,count(*) total_user FROM " . DB_PREFIX . "user where is_effect = 1 and is_delete=0 ");
$stats['total_usermoney'] = $statsU['total_usermoney'];
$stats['total_usermoney_format'] = format_conf_count(number_format($stats['total_usermoney'], 2));
$stats['total_user'] = $statsU['total_user'];
$GLOBALS['tmpl']->assign("stats", $stats);
//格式化统计代码
$VIRTUAL_MONEY_1_FORMAT = format_conf_count(floatval(trim(app_conf("VIRTUAL_MONEY_1"))) + $stats['total_load']);
$VIRTUAL_MONEY_2_FORMAT = format_conf_count(floatval(trim(app_conf("VIRTUAL_MONEY_2"))) + $stats['total_rate']);
$VIRTUAL_MONEY_3_FORMAT = format_conf_count(floatval(trim(app_conf("VIRTUAL_MONEY_3"))) + $stats['total_bzh']);
$GLOBALS['tmpl']->assign("VIRTUAL_MONEY_1_FORMAT", $VIRTUAL_MONEY_1_FORMAT);
$GLOBALS['tmpl']->assign("VIRTUAL_MONEY_2_FORMAT", $VIRTUAL_MONEY_2_FORMAT);
$GLOBALS['tmpl']->assign("VIRTUAL_MONEY_3_FORMAT", $VIRTUAL_MONEY_3_FORMAT);
$GLOBALS['tmpl']->assign("show_site_titile", 1);
}
$GLOBALS['tmpl']->display("page/index.html", $cache_id);
}
开发者ID:neteasy-work,项目名称:fanwei_xindai_3.2,代码行数:95,代码来源:indexModule.class.php
示例11: about
public function about()
{
$GLOBALS['tmpl']->caching = true;
$GLOBALS['tmpl']->cache_lifetime = 6000;
//首页缓存10分钟
$name = trim($_REQUEST['u']) == "" ? "financing" : trim($_REQUEST['u']);
$cache_id = md5(MODULE_NAME . ACTION_NAME . $name);
if (!$GLOBALS['tmpl']->is_cached("page/deals_about.html", $cache_id)) {
$info = get_article_buy_uname($name);
$info['content'] = $GLOBALS['tmpl']->fetch("str:" . $info['content']);
$GLOBALS['tmpl']->assign("info", $info);
$about_list = get_article_list(20, 7, "", "id ASC", true);
$GLOBALS['tmpl']->assign("about_list", $about_list['list']);
$seo_title = $info['seo_title'] != '' ? $info['seo_title'] : $info['title'];
$GLOBALS['tmpl']->assign("page_title", $seo_title);
$seo_keyword = $info['seo_keyword'] != '' ? $info['seo_keyword'] : $info['title'];
$GLOBALS['tmpl']->assign("page_keyword", $seo_keyword . ",");
$seo_description = $info['seo_description'] != '' ? $info['seo_description'] : $info['title'];
$GLOBALS['tmpl']->assign("page_description", $seo_description . ",");
}
$GLOBALS['tmpl']->display("page/deals_about.html", $cache_id);
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:22,代码来源:dealsModule.class.php
示例12: index
//.........这里部分代码省略.........
$page_pram = "";
foreach ($page_args as $k => $v) {
$page_pram .= "&" . $k . "=" . $v;
}
$page = new Page($result['rs_count'], app_conf("DEAL_PAGE_SIZE"), $page_pram);
//初始化分页对象
$p = $page->show();
$GLOBALS['tmpl']->assign('pages', $p);
$GLOBALS['tmpl']->assign('transfer_list', $result['list']);
}
//分类
$cate_list_url = array();
$tmp_args = $page_args;
$tmp_args['cid'] = 0;
$cate_list_url[0]['url'] = url("index", "deals#index", $tmp_args);
$cate_list_url[0]['name'] = "不限";
$cate_list_url[0]['id'] = 0;
foreach ($deal_cates as $k => $v) {
$cate_list_url[$k + 1] = $v;
$tmp_args = $page_args;
$tmp_args['cid'] = $v['id'];
$cate_list_url[$k + 1]['url'] = url("index", "transfer#index", $tmp_args);
}
$GLOBALS['tmpl']->assign('cate_list_url', $cate_list_url);
//利率
$interest_url = array(array("interest" => 0, "name" => "不限"), array("interest" => 10, "name" => "10%"), array("interest" => 12, "name" => "12%"), array("interest" => 15, "name" => "15%"), array("interest" => 18, "name" => "18"));
foreach ($interest_url as $k => $v) {
$tmp_args = $page_args;
$tmp_args['interest'] = $v['interest'];
$interest_url[$k]['url'] = url("index", "transfer#index", $tmp_args);
}
$GLOBALS['tmpl']->assign('interest_url', $interest_url);
//几天内
$lefttime_url = array(array("lefttime" => 0, "name" => "不限"), array("lefttime" => 1, "name" => "1天"), array("lefttime" => 3, "name" => "3天"), array("lefttime" => 6, "name" => "6天"), array("lefttime" => 9, "name" => "9天"), array("lefttime" => 12, "name" => "12天"));
foreach ($lefttime_url as $k => $v) {
$tmp_args = $page_args;
$tmp_args['lefttime'] = $v['lefttime'];
$lefttime_url[$k]['url'] = url("index", "transfer#index", $tmp_args);
}
$GLOBALS['tmpl']->assign('lefttime_url', $lefttime_url);
//借款期限
$months_type_url = array(array("name" => "不限"), array("name" => "3 个月以下"), array("name" => "3-6 个月"), array("name" => "6-9 个月"), array("name" => "9-12 个月"), array("name" => "12 个月以上"));
foreach ($months_type_url as $k => $v) {
$tmp_args = $page_args;
$tmp_args['months_type'] = $k;
$months_type_url[$k]['url'] = url("index", "transfer#index", $tmp_args);
}
$GLOBALS['tmpl']->assign('months_type_url', $months_type_url);
//城市
$temp_city_urls = load_auto_cache("deal_city");
$city_urls[0]['id'] = 0;
$city_urls[0]['name'] = "全部";
if (count($temp_city_urls) == 1) {
$temp_city_urls = $temp_city_urls[key($temp_city_urls)]['child'];
}
$temp_city_urls = array_merge($city_urls, $temp_city_urls);
$city_urls = array();
foreach ($temp_city_urls as $k => $v) {
$city_urls[$v['id']] = $v;
$tmp_args = $page_args;
$tmp_args['city'] = $v['id'];
$city_urls[$v['id']]['url'] = url("index", "transfer#index", $tmp_args);
}
$GLOBALS['tmpl']->assign('city_urls', $city_urls);
$sub_citys = $city_urls[$city]['child'];
foreach ($sub_citys as $k => $v) {
$tmp_args = $page_args;
$tmp_args['city'] = $v['pid'];
$tmp_args['scity'] = $v['id'];
$sub_citys[$k]['url'] = url("index", "transfer#index", $tmp_args);
}
$GLOBALS['tmpl']->assign('sub_citys', $sub_citys);
//使用技巧
$use_tech_list = get_article_list(4, 6);
$GLOBALS['tmpl']->assign("use_tech_list", $use_tech_list);
//输出公告
$notice_list = get_notice(3);
$GLOBALS['tmpl']->assign("notice_list", $notice_list);
//会员等级
$level_list_url = array();
$tmp_args = $page_args;
$tmp_args['level'] = 0;
$level_list_url[0]['url'] = url("index", "deals#index", $tmp_args);
$level_list_url[0]['name'] = "不限";
foreach ($level_list['list'] as $k => $v) {
$tmp_args = $page_args;
$tmp_args['level'] = $v['id'];
$level_list_url[$k + 1] = $v;
$level_list_url[$k + 1]['url'] = url("index", "deals#index", $tmp_args);
}
$GLOBALS['tmpl']->assign('level_list_url', $level_list_url);
$GLOBALS['tmpl']->assign("page_title", $page_title . $GLOBALS['lang']['FINANCIAL_MANAGEMENT']);
$GLOBALS['tmpl']->assign("cate_id", $cate_id);
$GLOBALS['tmpl']->assign("cid", strim($_REQUEST['cid']));
$GLOBALS['tmpl']->assign("keywords", $keywords);
$GLOBALS['tmpl']->assign("deal_cate_list", $deal_cates);
$GLOBALS['tmpl']->assign("field", $field);
$GLOBALS['tmpl']->assign("field_sort", $field_sort);
$GLOBALS['tmpl']->display("page/transfers.html");
}
开发者ID:norain2050,项目名称:fanwei_xindai_3.2,代码行数:101,代码来源:transferModule.class.php
示例13: list_notice
public function list_notice()
{
$GLOBALS['tmpl']->caching = true;
$cache_id = md5(MODULE_NAME . "list_notice" . trim($_REQUEST['id']) . intval($_REQUEST['p']) . $GLOBALS['deal_city']['id']);
if (!$GLOBALS['tmpl']->is_cached('page/notice_list.html', $cache_id)) {
//分页
$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, 0, 'ac.type_id = 3', '', true);
$GLOBALS['tmpl']->assign("list", $result['list']);
$page = new Page($result['count'], app_conf("PAGE_SIZE"));
//初始化分页对象
$p = $page->show();
$GLOBALS['tmpl']->assign('pages', $p);
//开始输出当前的site_nav
$site_nav[] = array('name' => $GLOBALS['lang']['HOME_PAGE'], 'url' => APP_ROOT . "/");
$site_nav[] = array('name' => $GLOBALS['lang']['SHOP_SYSTEM'], 'url' => url("shop", "sys#list"));
$GLOBALS['tmpl']->assign("site_nav", $site_nav);
//输出当前的site_nav
$GLOBALS['tmpl']->assign('page_title', $GLOBALS['lang']['SHOP_SYSTEM']);
$GLOBALS['tmpl']->assign('page_keyword', $GLOBALS['lang']['SHOP_SYSTEM']);
$GLOBALS['tmpl']->assign('page_description', $GLOBALS['lang']['SHOP_SYSTEM']);
}
$GLOBALS['tmpl']->display("page/notice_list.html", $cache_id);
}
开发者ID:workplayteam,项目名称:P2P,代码行数:28,代码来源:sysModule.class.php
示例14: insert_artile_list
function insert_artile_list($param)
{
if ($param['cate'] == "" || $param['tpl'] == "") {
return "";
}
if ($param['limit'] == "") {
$param['limit'] = 5;
}
$cate_id = $GLOBALS['db']->getOne("SELECT id FROM " . DB_PREFIX . "article_cate where title='" . $param['cate'] . "'", false);
if ($cate_id > 0) {
$article_list = get_article_list($param['limit'], $cate_id);
if ($article_list) {
$GLOBALS['tmpl']->assign($param['datakey'] . "_id", $cate_id);
$GLOBALS['tmpl']->assign($param['datakey'] . "_list", $article_list['list']);
}
}
return $GLOBALS['tmpl']->fetch($param['tpl']);
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:18,代码来源:insert_libs.php
示例15: get_gmtime
}
}
}
$GLOBALS['tmpl']->assign("nav_list", $nav_list);
$now = get_gmtime();
$vote = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "vote where is_effect = 1 and begin_time < " . $now . " and (end_time = 0 or end_time > " . $now . ") order by sort desc limit 1");
$GLOBALS['tmpl']->assign("vote", $vote);
//输出在线客服与时间
$qq = explode("|", app_conf("ONLINE_QQ"));
$msn = explode("|", app_conf("ONLINE_MSN"));
$GLOBALS['tmpl']->assign("online_qq", $qq);
$GLOBALS['tmpl']->assign("online_msn", $msn);
//输出页面的标题关键词与描述
$GLOBALS['tmpl']->assign("shop_info", get_shop_info());
//输出系统文章
$system_article = get_article_list(8, 0, "ac.type_id = 3", "", true);
$GLOBALS['tmpl']->assign("system_article", $system_article['list']);
//输出帮助
$deal_help = get_help();
$GLOBALS['tmpl']->assign("deal_help", $deal_help);
//开始输出友情链接
$f_link_group = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "link_group where is_effect = 1 order by sort desc");
foreach ($f_link_group as $k => $v) {
$g_links = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "link where is_effect = 1 and show_index = 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']);
}
}
$f_link_group[$k]['links'] = $g_links;
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:31,代码来源:shoppreview.php
|
请发表评论