function init_nav_list($nav_list) { $u_param = ""; foreach ($_GET as $k => $v) { if (strtolower($k) != "ctl" && strtolower($k) != "act") { $u_param .= $k . "=" . $v . "&"; } } if (substr($u_param, -1, 1) == '&') { $u_param = substr($u_param, 0, -1); } foreach ($nav_list as $k => $v) { if ($v['url'] == '') { if ($v['u_module'] == "") { $v['u_module'] = "index"; } if ($v['u_action'] == "") { $v['u_action'] = "index"; } $route = $v['u_module']; if ($v['u_action'] != '') { $route .= "#" . $v['u_action']; } $str = "u:" . $route . "|" . $v['u_param']; $nav_list[$k]['url'] = parse_url_tag($str); if (ACTION_NAME == $v['u_action'] && MODULE_NAME == $v['u_module'] && $v['u_param'] == $u_param) { $nav_list[$k]['current'] = 1; } } } return $nav_list; }
public function index() { if (!$GLOBALS['user_info']) { app_redirect(url("user#login")); } $all = intval($_REQUEST['all']); $page_size = 20; $page = intval($_REQUEST['p']); if ($page == 0) { $page = 1; } $limit = ($page - 1) * $page_size . "," . $page_size; if ($all == 0) { $cond = " and is_read = 0 "; } else { $cond = " and 1=1 "; } $GLOBALS['tmpl']->assign("all", $all); $sql = "select * from " . DB_PREFIX . "user_notify where user_id = " . intval($GLOBALS['user_info']['id']) . " {$cond} order by log_time desc limit " . $limit; $sql_count = "select count(*) from " . DB_PREFIX . "user_notify where user_id = " . intval($GLOBALS['user_info']['id']) . " {$cond} "; $notify_list = $GLOBALS['db']->getAll($sql); $notify_count = $GLOBALS['db']->getOne($sql_count); foreach ($notify_list as $k => $v) { $notify_list[$k]['url'] = parse_url_tag("u:" . $v['url_route'] . "|" . $v['url_param']); } $GLOBALS['tmpl']->assign("notify_list", $notify_list); require APP_ROOT_PATH . 'app/Lib/page.php'; $page = new Page($notify_count, $page_size); //初始化分页对象 $p = $page->show(); $GLOBALS['tmpl']->assign('pages', $p); $GLOBALS['tmpl']->display("notify.html"); }
/** * 获取文章列表 */ function get_article_list($limit, $cate_id = 0, $where = '', $orderby = '', $cached = true) { $key = md5("ARTICLE" . $limit . $cate_id . $where . $orderby); if ($cached) { $res = $GLOBALS['cache']->get($key); } else { $res = false; } if ($res === false) { $count_sql = "select count(*) from " . DB_PREFIX . "article as a left join " . DB_PREFIX . "article_cate as ac on a.cate_id = ac.id where a.is_effect = 1 and a.is_delete = 0 and ac.is_delete = 0 and ac.is_effect = 1 "; $sql = "select a.*,ac.type_id,ac.title as ctitle from " . DB_PREFIX . "article as a left join " . DB_PREFIX . "article_cate as ac on a.cate_id = ac.id where a.is_effect = 1 and a.is_delete = 0 and ac.is_delete = 0 and ac.is_effect = 1 "; if ($cate_id > 0) { $ids = load_auto_cache("deal_shop_acate_belone_ids", array("cate_id" => $cate_id)); $sql .= " and a.cate_id in (" . implode(",", $ids) . ")"; $count_sql .= " and a.cate_id in (" . implode(",", $ids) . ")"; } if ($where != '') { $sql .= " and " . $where; $count_sql .= " and " . $where; } if ($orderby == '') { $sql .= " order by a.sort desc limit " . $limit; } else { $sql .= " order by " . $orderby . " limit " . $limit; } $articles = $GLOBALS['db']->getAll($sql); foreach ($articles as $k => $v) { if ($v['type_id'] == 1) { $module = "help"; } elseif ($v['type_id'] == 2) { $module = "notice"; } elseif ($v['type_id'] == 3) { $module = "sys"; } else { $module = 'article'; } if ($v['rel_url'] != '') { if (!preg_match("/http:\\/\\//i", $v['rel_url'])) { if (substr($v['rel_url'], 0, 2) == 'u:') { $aurl = parse_url_tag($v['rel_url']); } else { $aurl = APP_ROOT . "/" . $v['rel_url']; } } else { $aurl = $v['rel_url']; } } else { $aurl = url("index", $module . "#" . $v['id']); } $articles[$k]['url'] = $aurl; } $articles_count = $GLOBALS['db']->getOne($count_sql); $res = array('list' => $articles, 'count' => $articles_count); $GLOBALS['cache']->set($key, $res); } return $res; }
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); }
public function load($param) { $param = array(); $key = $this->build_key(__CLASS__, $param); $GLOBALS['cache']->set_dir(APP_ROOT_PATH . "public/runtime/data/" . __CLASS__ . "/"); $help_list = $GLOBALS['cache']->get($key); if ($help_list === false) { $ids_util = new ChildIds("article_cate"); $help_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "article_cate where type_id = 1 and is_delete = 0 and pid=0 order by sort desc limit " . intval(app_conf("HELP_CATE_LIMIT"))); foreach ($help_list as $k => $v) { $ids = $GLOBALS['cache']->get("CACHE_HELP_ARTICLE_CATE_" . $v['id']); if ($ids === false) { $ids = $ids_util->getChildIds($v['id']); $ids[] = $v['id']; $GLOBALS['cache']->set("CACHE_HELP_ARTICLE_CATE_" . $v['id'], $ids); } $help_cate_list = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "article where cate_id in (" . implode(",", $ids) . ") and is_delete = 0 order by sort desc limit " . intval(app_conf("HELP_ITEM_LIMIT"))); foreach ($help_cate_list as $kk => $vv) { if ($vv['rel_url'] != '') { if (!preg_match("/http:\\/\\//i", $vv['rel_url'])) { if (substr($vv['rel_url'], 0, 2) == 'u:') { $help_cate_list[$kk]['url'] = parse_url_tag($vv['rel_url']); } else { $help_cate_list[$kk]['url'] = APP_ROOT . "/" . $vv['rel_url']; } } else { $help_cate_list[$kk]['url'] = $vv['rel_url']; } $help_cate_list[$kk]['new'] = 1; } else { if ($vv['uname'] != '') { $hurl = url("index", "help#" . $vv['uname']); } else { $hurl = url("index", "help#" . $vv['id']); } $help_cate_list[$kk]['url'] = $hurl; } } $help_list[$k]['help_list'] = $help_cate_list; } $GLOBALS['cache']->set_dir(APP_ROOT_PATH . "public/runtime/data/" . __CLASS__ . "/"); $GLOBALS['cache']->set($key, $help_list); } return $help_list; }
public function index() { $GLOBALS['tmpl']->caching = true; $cache_id = md5(MODULE_NAME . ACTION_NAME . trim($_REQUEST['id']) . $GLOBALS['deal_city']['id']); if (!$GLOBALS['tmpl']->is_cached('page/help_index.html', $cache_id)) { $id = intval($_REQUEST['id']); $uname = addslashes(trim($_REQUEST['id'])); if ($id == 0 && $uname == '') { $id = $GLOBALS['db']->getOne("select a.id from " . DB_PREFIX . "article as a left join " . DB_PREFIX . "article_cate as ac on a.cate_id = ac.id where ac.type_id = 1 order by a.sort desc"); } elseif ($id == 0 && $uname != '') { $id = $GLOBALS['db']->getOne("select id from " . DB_PREFIX . "article where uname = '" . $uname . "'"); } $article = get_article($id); if (!$article || $article['type_id'] != 1) { app_redirect(APP_ROOT . "/"); } else { if (check_ipop_limit(get_client_ip(), "article", 60, $article['id'])) { //每一分钟访问更新一次点击数 $GLOBALS['db']->query("update " . DB_PREFIX . "article set click_count = click_count + 1 where id =" . $article['id']); } 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']); } } } $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 . ","); $GLOBALS['tmpl']->assign("relate_help", $cate_list); } $GLOBALS['tmpl']->display("page/help_index.html", $cache_id); }
function init_nav_list($nav_list) { $u_param = ""; foreach ($_GET as $k => $v) { if (strtolower($k) != "ctl" && strtolower($k) != "act" && strtolower($k) != "city") { $u_param .= $k . "=" . $v . "&"; } } if (substr($u_param, -1, 1) == '&') { $u_param = substr($u_param, 0, -1); } foreach ($nav_list as $k => $v) { if (trim($v['url']) == '') { $route = $v['u_module']; if ($v['u_action'] != '') { $route .= "#" . $v['u_action']; } $app_index = $v['app_index']; if ($v['u_module'] == 'index') { $route = "index"; $v['u_module'] = "index"; } if ($v['u_action'] == '') { $v["u_action"] = "index"; } $str = "u:" . $app_index . "|" . $route . "|" . $v['u_param']; $nav_list[$k]['url'] = parse_url_tag($str); if (($v['u_module'] == 'deals' || $v['u_module'] == 'transfer' || $v['u_module'] == 'tool') && MODULE_NAME == $v['u_module']) { $nav_list[$k]['current'] = 1; } elseif ($v['u_module'] == 'borrow' && MODULE_NAME == $v['u_module']) { $nav_list[$k]['current'] = 1; } elseif (ACTION_NAME == $v['u_action'] && MODULE_NAME == $v['u_module'] && $v['u_param'] == $u_param) { $nav_list[$k]['current'] = 1; } } } return $nav_list; }
?> <div class="blank5"></div> <?php } ?> <?php } } unset($_from); $this->pop_vars(); ?> </div> </div> <div class="tc pt10"> <a href="<?php echo parse_url_tag("u:index|borrow#stepone|" . "typeid=" . $this->_var['type']['id'] . "" . ""); ?> "><img src="<?php echo $this->_var['TMPL']; ?> /images/toview.jpg" /></a> </div> <div class="blank10"></div> </li> <?php } } unset($_from); $this->pop_vars(); ?> </ul>
$_from = $this->_var['store_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $this->push_vars('key', 'right_store_item'); if (count($_from)) { foreach ($_from as $this->_var['key'] => $this->_var['right_store_item']) { ?> <div class="right_store_item"> <span class="right_store_num num_<?php echo intval($this->_var['key']) + 1; ?> "></span> <div class="right_store_info"> <a href="<?php echo parse_url_tag("u:youhui|store#view|" . "id=" . $this->_var['right_store_item']['id'] . "" . ""); ?> " title="<?php echo $this->_var['right_store_item']['name']; ?> " target="_blank" class="title_link"><?php $k = array('name' => 'msubstr', 'v' => $this->_var['right_store_item']['name'], 'b' => '0', 'e' => '8'); echo $k['name']($k['v'], $k['b'], $k['e']); ?> </a> <div class="blank5"></div> <span class="index_start_bar f_l" title="<?php echo $this->_var['LANG']['dp_point_' . ceil($this->_var['right_store_item']['avg_point'])]; ?> "> <i style="width:<?php
public function decode_weibo($topic) { $data['content'] = $topic['content']; $data['content'] = msubstr($data['content'], 0, 120); $group_data = unserialize(base64_decode($topic['group_data'])); $url_tag = "u:" . $group_data['url']['app_index'] . "|" . $group_data['url']['route'] . "|" . $group_data['url']['param']; $url = get_domain() . parse_url_tag($url_tag); $data['content'] .= " " . $url; //内容 //图片 $topic_image = $GLOBALS['db']->getRow("select o_path from " . DB_PREFIX . "topic_image where topic_id = " . $topic['id']); if ($topic_image) { $data['img'] = APP_ROOT_PATH . $topic_image['o_path']; } return $data; }
public function index() { $id = intval($_REQUEST['id']); $uname = addslashes(trim($_REQUEST['id'])); if ($uname == 'list') { $this->list_notice(); exit; } $GLOBALS['tmpl']->caching = true; $cache_id = md5(MODULE_NAME . ACTION_NAME . trim($_REQUEST['id']) . $GLOBALS['deal_city']['id']); if (!$GLOBALS['tmpl']->is_cached('sys_index.html', $cache_id)) { if ($id == 0 && $uname == '') { app_redirect(APP_ROOT . "/"); } elseif ($id == 0 && $uname != '') { $id = $GLOBALS['db']->getOne("select id from " . DB_PREFIX . "article where uname = '" . $uname . "'"); } $article = get_article($id); if (!$article || $article['type_id'] != 3) { app_redirect(APP_ROOT . "/"); } else { if (check_ipop_limit(get_client_ip(), "article", 60, $article['id'])) { //每一分钟访问更新一次点击数 $GLOBALS['db']->query("update " . DB_PREFIX . "article set click_count = click_count + 1 where id =" . $article['id']); } 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']); } } } $article = get_article($id); $GLOBALS['tmpl']->assign("article", $article); //开始输出当前的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")); if ($article['type_id'] == 1) { $module = "help"; } elseif ($article['type_id'] == 2) { $module = "notice"; } elseif ($article['type_id'] == 3) { $module = "sys"; } else { $module = 'article'; } if ($article['uname'] != '') { $aurl = url("index", $module, array("id" => $article['uname'])); } else { $aurl = url("index", $module, array("id" => $article['id'])); } $site_nav[] = array('name' => $article['title'], 'url' => $aurl); $GLOBALS['tmpl']->assign("site_nav", $site_nav); //输出当前的site_nav $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("sys_index.html", $cache_id); }
echo $this->_var['LANG']['MY_ACCOUNT']; ?> </a> | <a href="<?php echo parse_url_tag("u:shop|user#loginout|" . "" . ""); ?> "><?php echo $this->_var['LANG']['LOGINOUT']; ?> </a> | <?php } else { ?> <?php echo $this->_var['LANG']['PLEASE_FIRST']; ?> [ <a href="javascript:void(0);" onclick="ajax_login();"><?php echo $this->_var['LANG']['LOGIN']; ?> </a> ] <?php echo $this->_var['LANG']['OR']; ?> [ <a href="<?php echo parse_url_tag("u:shop|user#register|" . "" . ""); ?> "><?php echo $this->_var['LANG']['REGISTER']; ?> </a> ] <?php }
<?php $k = array('name' => 'get_user_name', 'v' => $this->_var['dp_item']['user_id']); echo $k['name']($k['v']); ?> 点评 <a href="<?php echo parse_url_tag("u:youhui|store#view|" . "id=" . $this->_var['dp_item']['supplier_location_id'] . "" . ""); ?> " class="title_link" title="<?php echo $this->_var['dp_item']['sp_name']; ?> ">[ <?php $k = array('name' => 'msubstr', 'v' => $this->_var['dp_item']['sp_name'], 'b' => '0', 'e' => '10'); echo $k['name']($k['v'], $k['b'], $k['e']); ?> ]</a>:<a href="<?php echo parse_url_tag("u:youhui|review#detail|" . "id=" . $this->_var['dp_item']['id'] . "" . ""); ?> " title="<?php echo $this->_var['dp_item']['title']; ?> " class="title_link"><?php $k = array('name' => 'msubstr', 'v' => $this->_var['dp_item']['title'], 'b' => '0', 'e' => '8'); echo $k['name']($k['v'], $k['b'], $k['e']); ?> - <?php $k = array('name' => 'msubstr', 'v' => $this->_var['dp_item']['content'], 'b' => '0', 'e' => '30'); echo $k['name']($k['v'], $k['b'], $k['e']); ?> </a> </div> <?php
</p> </dd> <?php } } unset($_from); $this->pop_vars(); ?> <dd> <p class="check-my-cart" id="<?php echo $this->_var['row']['id']; ?> "> <a href="<?php echo parse_url_tag("u:index|cart|" . "" . ""); ?> " class="btn-small check_cart_btn " id="<?php echo $this->_var['row']['id']; ?> ">查看我的购物车</a></p> </dd> <?php } else { ?> <div class="blank10"></div> <p class="check-my-cart" id="<?php echo $this->_var['row']['id']; ?> ">
</form> </div> </div> <div class="blank"></div> <div class="blank"></div> </div> <div class="list"> <div class="list_title clearfix"> <div class="list1 cur" >投资列表</div> <div class="list2" onclick="window.location.href='<?php echo parse_url_tag("u:index|transfer|" . "" . ""); ?> '">债权转让</div> <a href="<?php echo parse_url_tag("u:index|tool|" . "" . ""); ?> " class="calt">理财计算器</a> </div> <div class="list_cont"> <div class="i_deal_list clearfix"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tbody> <tr border="0" style="background-color:#00bef0; color:#fff; height:34px;"> <th style="width:30%">借款标题</th> <th style="width:15%">借款金额</th> <th style="width:10%">信用等级</th> <th style="width:10%">年利率</th> <th style="width:10%">借款进度</th> <th style="width:10%">借款期限</th> <th style="width:15%">借款状态</th>
<div class="<?php $k = array('name' => 'load_wrap', 't' => $this->_var['wrap_type']); echo $k['name']($k['t']); ?> clearfix"> <div class="side_nav left_box"> <?php echo $this->fetch('inc/uc_nav_list.html'); ?> </div> <div class="right_box"> <div class="main_box setting_user_info"> <form name="setting_user_info" action="<?php echo parse_url_tag("u:index|uc_account#save|" . "" . ""); ?> " method="post" bindsubmit="true"> <div class="content"> <div class="title"><span>基本信息</span></div> <?php if ($this->_var['user_info']['is_tmp'] == 1) { ?> <div class="confirm_login_tip"> 为确保账户安全,请完善会员资料以及会员密码 </div> <?php } ?> <div class="blank20"></div> <div class="content_item clearfix">
function get_topic_item($topic, $keywords_array = array()) { //开始解析同步的数据 $group = $topic['topic_group']; if (file_exists(APP_ROOT_PATH . "system/fetch_topic/" . $group . "_fetch_topic.php")) { require_once APP_ROOT_PATH . "system/fetch_topic/" . $group . "_fetch_topic.php"; $class_name = $group . "_fetch_topic"; if (class_exists($class_name)) { $fetch_obj = new $class_name(); $topic = $fetch_obj->decode($topic); } } if ($topic['rel_app_index'] != '' && $topic['rel_route'] != '') { $topic['rel_url'] = parse_url_tag("u:" . $topic['rel_app_index'] . "|" . $topic['rel_route'] . "|" . $topic['rel_param']); } $topic = cache_topic($topic); $topic['content'] = nl2br(trim($topic['content'])); $topic['tags_array'] = explode(" ", $topic['tags']); $matches = array(); foreach ($keywords_array as $k => $item) { $matches[0][] = $item; $matches[1][] = "<span class='result_match'>" . $item . "</span>"; } $topic['title'] = str_replace($matches[0], $matches[1], $topic['title']); $topic['content'] = str_replace($matches[0], $matches[1], $topic['content']); return $topic; //格式化每条的主题 }
} function saveAndPreview(act){ if(!checkSaveDealForm(true)){ return false; } var url = '<?php echo parse_url_tag("u:index|borrow#savedeal|" . "t=save" . ""); ?> '; if(act=="publish") { if(!confirm("确定发布吗?发布后将无法修改!")){ return false; } url = '<?php echo parse_url_tag("u:index|borrow#savedeal|" . "t=publish" . ""); ?> '; } $("#J_save_deal_form").attr("action",url); $("#J_save_deal_form").submit(); } function CalculateDeal(){ if(parseFloat($.trim($("#borrowamount").val())) >0 && parseFloat($.trim($("#apr").val())) > 0){ var amo = parseFloat($.trim($("#borrowamount").val())); var inter = parseFloat($.trim($("#apr").val())); var inters=inter * 100 / 12 /(100 * 100); var loantype = $("#loanType").val(); var value = 0;
<div class="list"> <div class="list_title clearfix"> <div class="cur"><a href="<?php echo parse_url_tag("u:index|uc_deal#borrowed|" . "" . ""); ?> "><?php echo $this->_var['page_title']; ?> </a></div> </div> <div class="list_cont clearfix"> <table width="100%" align="center" border="0" cellspacing="1" class="funds"> <tbody> <tr class="title"> <td colspan="4"> <span class="f_dgray b">还款统计 </span> </td> </tr> <tr> <td width="25%"> 总借款额 </td> <td width="25%" align="right"> <span style="padding-right: 50px"><?php $k = array('name' => 'format_price', 'v' => $this->_var['user_statics']['borrow_amount']); echo $k['name']($k['v']); ?> </span> </td> <td width="25%"> 发布借款笔数
</span><span class='u_c_3'><?php if ($this->_var['user_statics']['total_invest_money']) { echo $this->_var['user_statics']['total_invest_money']; } else { ?> 0.00<?php } ?> </span></li> </ul> </div> <div class='u_zjjy u_t_box'> <div class='u_title'> <span class="f_l">最近交易</span> <a href="<?php echo parse_url_tag("u:index|uc_invest|" . "" . ""); ?> " class='u_more'></a> </div> <ul> <li class='u_title'><span class='u_c_4'>投标金额</span><span class='u_c_3'>时间</span></li> <?php if ($this->_var['load_list']) { ?> <?php $_from = $this->_var['load_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $this->push_vars('', 'load'); if (count($_from)) {
<dl> <dt></dt> <dd> <button class="ui-button orange f_l" rel="orange" type="submit">立即注册</button> </dd> </dl> </form> </div> <div class="panel" rel="ph"> <form name="<?php echo $this->_var['form_prefix']; ?> _ph_register_form" class="ph_register" method="post" action="<?php echo parse_url_tag("u:index|user#dophregister|" . "" . ""); ?> "> <input type="hidden" name="form_prefix" value="<?php echo $this->_var['form_prefix']; ?> " /> <dl> <dt>手机号</dt> <dd> <input class="ui-textbox" name="user_mobile" value="" holder="请输入手机号" /> <span class="form_tip"></span> </dd> </dl> <dl class="ph_img_verify" <?php
}); */ })(); ajax_get_recommend_project(); //获取会员所有项目列表 function ajax_get_recommend_project(){ $("a[name='recommend_project']").bind("click",function(){ if($(this).attr("rel")=='<?php echo $this->_var['user_info']['id']; ?> '){ $.showErr("不能给自己推荐!"); return false; } var ajaxurl ='<?php echo parse_url_tag("u:ajax#ajax_get_recommend_project|" . "" . ""); ?> '; var query=new Object(); //推荐人id query.id='<?php echo $this->_var['user_info']['id']; ?> '; //被推荐人id query.user_id=$(this).attr("rel"); $.ajax({ url: ajaxurl, dataType: "json", data:query, type: "POST",
<i></i><?php } ?> </a> <a href="javascript:void(0);" jump="<?php echo parse_url_tag("u:index|city|" . "" . ""); ?> " class="city_switch f_l">切换城市</a> <?php } ?> </div> <div class="search f_r"> <div class="top_search"> <form action="<?php echo parse_url_tag("u:index|search|" . "" . ""); ?> " name="search_form" method=post > <select name="search_type" class="ui-select search_type f_l"> <option value="1" <?php if ($this->_var['search_type'] == 1) { ?> selected="selected"<?php } ?> >搜团购</option> <option value="2" <?php if ($this->_var['search_type'] == 2) { ?> selected="selected"<?php }
?> 000; var IS_RUN_CRON = 1; var DEAL_MSG_URL = '<?php echo parse_url_tag("u:index|cron#deal_msg_list|" . "" . ""); ?> '; <?php } ?> var AJAX_LOGIN_URL = '<?php echo parse_url_tag("u:index|user#ajax_login|" . "" . ""); ?> '; var AJAX_URL = '<?php echo parse_url_tag("u:index|ajax|" . "" . ""); ?> '; var LOADER_IMG = '<?php echo $this->_var['TMPL']; ?> /images/loader_img.gif'; var order_id = <?php $k = array('name' => 'intval', 'value' => $this->_var['order_info']['id']); echo $k['name']($k['value']); ?> ; </script> <?php //前台队列功能开启 if (app_conf("APP_MSG_SENDER_OPEN") == 1) {
?> " class="see_daijin"></a> </div> </div> </div> <div class="right_daijin_row_item" <?php if ($this->_var['key'] == 0) { ?> style="display:none;"<?php } ?> > <div class="f_l"> <a href="<?php echo parse_url_tag("u:youhui|ydetail|" . "id=" . $this->_var['right_daijin_item']['id'] . "" . ""); ?> " title="<?php echo $this->_var['right_daijin_item']['name']; ?> " target="_blank" class="title_link"><?php $k = array('name' => 'msubstr', 'v' => $this->_var['right_daijin_item']['name'], 'b' => '0', 'e' => '10'); echo $k['name']($k['v'], $k['b'], $k['e']); ?> </a> </div> <div class="f_r" style="padding-right:10px;"> <span style="color:#f30; font-size:12px; font-weight:bolder; font-family:verdana;"><?php echo $this->_var['right_daijin_item']['buy_count']; ?> </span>
$this->push_vars('key', 'deal_hot_pro_items'); $this->_foreach['deal_item_hot_pro'] = array('total' => count($_from), 'iteration' => 0); if ($this->_foreach['deal_item_hot_pro']['total'] > 0) { foreach ($_from as $this->_var['key'] => $this->_var['deal_hot_pro_items']) { $this->_foreach['deal_item_hot_pro']['iteration']++; ?> <div class="nav_item nav_item2<?php if ($this->_foreach['deal_item_hot_pro']['iteration'] % 4 == 1) { ?> first<?php } ?> "> <a href="<?php echo parse_url_tag("u:deal#show|" . "id=" . $this->_var['deal_hot_pro_items']['id'] . "" . ""); ?> " target="_blank"> <div class="project_image"> <img src="<?php if ($this->_var['deal_hot_pro_items']['image'] == '') { echo $this->_var['TMPL']; ?> /images/empty_thumb.gif<?php } else { $k = array('name' => 'get_spec_image', 'v' => $this->_var['deal_hot_pro_items']['image'], 'w' => '300', 'h' => '210', 'g' => '1'); echo $k['name']($k['v'], $k['w'], $k['h'], $k['g']); } ?> " alt="<?php echo $this->_var['deal_hot_pro_items']['name'];
</a><?php if (!($this->_foreach['type_loop']['iteration'] == $this->_foreach['type_loop']['total'])) { ?> | <?php } ?> </li> <?php } } unset($_from); $this->pop_vars(); ?> </ul> <a href="<?php echo parse_url_tag("u:index|cate|" . "cid=" . $this->_var['index_cate']['id'] . "" . ""); ?> " class="more">更多</a> </div> <div class="content_row clearfix"> <ul class="tuan_list"> <?php $_from = $this->_var['index_cate']['deal_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); } $this->push_vars('', 'deal'); if (count($_from)) { foreach ($_from as $this->_var['deal']) { ?>
</div> <?php if ($this->_var['u_info']['region']) { ?> <div class="row addr"><span>所在地:</span><?php echo $this->_var['u_info']['region']; ?> </div> <?php } ?> <div class="row level" title="<?php echo $this->_var['u_info']['point_level']; ?> "><span>信用等级:</span><a href="<?php echo parse_url_tag("u:index|space#level|" . "id=" . $this->_var['deal']['user_id'] . "" . ""); ?> "><img alt="<?php echo $this->_var['u_info']['point_level']; ?> " src="<?php echo $this->_var['TMPL']; ?> /images/<?php echo $this->_var['u_info']['point_level']; ?> .png" width="16" height="16"></a></div> <?php if ($this->_var['user_info'] && $this->_var['user_info'] != $this->_var['deal']['user_id']) { ?> <div class="attent">
$k = array('name' => 'gen_qrcode', 'v' => $this->_var['MOBILE_DOWN_PATH'], 's' => '8'); echo $k['name']($k['v'], $k['s']); ?> " /> </div> </div> <?php } ?> <span id="user_head_tip" class="pr"> <?php $k = array('name' => 'load_user_tip'); echo $this->_hash . $k['name'] . '|' . base64_encode(serialize($k)) . $this->_hash; ?> <span class="li"><a href="<?php echo parse_url_tag("u:index|helpcenter|" . "" . ""); ?> ">帮助</a></span> </span> </div> </div><!--end wrap--> </div> <!--<?php if ($this->_var['MODULE_NAME'] != 'manageagency') { ?> --> <div class="main_bars"> <div class="main_bar wrap"> <div class="logo mr15"> <a class="link f_l" href="<?php
public function index() { $GLOBALS['tmpl']->caching = true; $cache_id = md5(MODULE_NAME . ACTION_NAME . trim($_REQUEST['id']) . $GLOBALS['deal_city']['id']); if (!$GLOBALS['tmpl']->is_cached('article_index.html', $cache_id)) { $cate_tree = get_acate_tree(); $GLOBALS['tmpl']->assign("acate_tree", $cate_tree); //获取当前页的团购商品 $id = intval($_REQUEST['id']); $uname = addslashes(trim($_REQUEST['id'])); if ($id == 0 && $uname == '') { app_redirect(APP_ROOT . "/"); } elseif ($id == 0 && $uname != '') { $id = $GLOBALS['db']->getOne("select id from " . DB_PREFIX . "article where is_delete = 0 and is_effect = 1 and uname = '" . $uname . "'"); } $article = get_article($id); if (!$article || $article['type_id'] != 0) { 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']); } } } //开始输出当前的site_nav $cates = array(); $cate = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "article_cate where id = " . $article['cate_id']); do { $cates[] = $cate; $pid = intval($cate['pid']); $cate = $GLOBALS['db']->getRow("select * from " . DB_PREFIX . "article_cate where is_effect =1 and is_delete =0 and id = " . $pid); } while ($pid != 0); $page_title = substr($page_title, 0, -3); krsort($cates); $site_nav[] = array('name' => $GLOBALS['lang']['HOME_PAGE'], 'url' => APP_ROOT . "/"); if ($cates) { foreach ($cates as $cate_row) { $site_nav[] = array('name' => $cate_row['title'], 'url' => url("shop", "acate#index", array("id" => $cate_row['id']))); } } if ($article['uname'] != '') { $aurl = url("shop", "article#index", array("id" => $article['uname'])); } else { $aurl = url("shop", "article#index", array("id" => $article['id'])); } $site_nav[] = array('name' => $article['title'], 'url' => $aurl); $GLOBALS['tmpl']->assign("site_nav", $site_nav); //输出当前的site_nav $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 . ","); } $GLOBALS['tmpl']->display("article_index.html", $cache_id); }