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


PHP get_deal_list函数代码示例

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


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

示例1: index

 public function index()
 {
     require_once APP_ROOT_PATH . 'app/Lib/deal.php';
     //$catalog_id = intval($GLOBALS['request']['catalog_id']);//商品分类ID
     $city_id = intval($GLOBALS['request']['city_id']);
     //城市分类ID
     $page = intval($GLOBALS['request']['page']);
     //分页
     $keyword = strim($GLOBALS['request']['keyword']);
     //分页
     $page = $page == 0 ? 1 : $page;
     $page_size = PAGE_SIZE;
     $limit = ($page - 1) * $page_size . "," . $page_size;
     $deals = get_deal_list($limit, $catalog_id, $city_id, array(DEAL_ONLINE), "buy_type<>1 and is_lottery = 0 and name like '%" . $keyword . "%'", "sort desc");
     $list = $deals['list'];
     $count = $deals['count'];
     $page_total = ceil($count / $page_size);
     $root = array();
     $root['return'] = 1;
     $goodses = array();
     foreach ($list as $item) {
         //$goods = array();
         $goods = getGoodsArray($item);
         $goodses[] = $goods;
     }
     $root['item'] = $goodses;
     $root['page'] = array("page" => $page, "page_total" => $page_total);
     output($root);
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:29,代码来源:searchgoods.action.php

示例2: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密码
     $page = intval($GLOBALS['request']['page']);
     //检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         require APP_ROOT_PATH . 'app/Lib/deal.php';
         $root['user_login_status'] = 1;
         $root['response_code'] = 1;
         if ($page == 0) {
             $page = 1;
         }
         $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
         $result = get_deal_list($limit, 0, "user_id=" . $user_id, "id DESC");
         $root['item'] = $result['list'];
         $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("PAGE_SIZE")));
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登录";
         $root['user_login_status'] = 0;
     }
     output($root);
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:29,代码来源:uc_borrowed.action.php

示例3: index

 public function index()
 {
     //require APP_ROOT_PATH.'app/Lib/page.php';
     $page = intval($GLOBALS['request']['page']);
     if ($page == 0) {
         $page = 1;
     }
     $keywords = trim(htmlspecialchars($GLOBALS['request']['keywords']));
     $level = intval($GLOBALS['request']['level']);
     $interest = intval($GLOBALS['request']['interest']);
     $months = intval($GLOBALS['request']['months']);
     $lefttime = intval($GLOBALS['request']['lefttime']);
     $deal_status = intval($GLOBALS['request']['deal_status']);
     $limit = ($page - 1) * app_conf("DEAL_PAGE_SIZE") . "," . app_conf("DEAL_PAGE_SIZE");
     $level_list = load_auto_cache("level");
     $cate_id = intval($GLOBALS['request']['cid']);
     $n_cate_id = 0;
     $condition = " publish_wait = 0 ";
     $orderby = "";
     if ($cate_id > 0) {
         $n_cate_id = $cate_id;
         //$condition .= "AND deal_status in(0,1)";
         $orderby = "update_time DESC ,sort DESC,id DESC";
     } else {
         $n_cate_id = 0;
         $orderby = "update_time DESC , sort DESC , id DESC";
     }
     if ($keywords) {
         $kw_unicode = str_to_unicode_string($keywords);
         $condition .= " and (match(name_match,deal_cate_match,tag_match,type_match) against('" . $kw_unicode . "' IN BOOLEAN MODE))";
     }
     if ($level > 0) {
         $point = $level_list['point'][$level];
         $condition .= " AND user_id in(SELECT u.id FROM " . DB_PREFIX . "user u LEFT JOIN " . DB_PREFIX . "user_level ul ON ul.id=u.level_id WHERE ul.point >= {$point})";
     }
     if ($interest > 0) {
         $condition .= " AND rate >= " . $interest;
     }
     if ($months > 0) {
         if ($months == 12) {
             $condition .= " AND repay_time <= " . $months;
         } elseif ($months == 18) {
             $condition .= " AND repay_time >= " . $months;
         }
     }
     if ($lefttime > 0) {
         $condition .= " AND (start_time + enddate*24*3600 - " . TIME_UTC . ") <= " . $lefttime * 24 * 3600;
     }
     if ($deal_status > 0) {
         $condition .= " AND deal_status = " . $deal_status;
     }
     $result = get_deal_list($limit, $n_cate_id, $condition, $orderby);
     $root = array();
     $root['response_code'] = 1;
     $root['item'] = $result['list'];
     //$root['DEAL_PAGE_SIZE'] = app_conf("DEAL_PAGE_SIZE");
     //$root['count'] = $result['count'];
     $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("DEAL_PAGE_SIZE")));
     output($root);
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:60,代码来源:deals.action.php

示例4: load

 public function load($param)
 {
     $key = $this->build_key(__CLASS__, $param);
     $GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/" . __CLASS__ . "/");
     $res = $GLOBALS['fcache']->get($key);
     if ($res === false) {
         $res = get_deal_list(app_conf("SIDE_DEAL_COUNT"), 0, 0, array(DEAL_ONLINE, DEAL_HISTORY, DEAL_NOTICE), "", "buy_count desc");
         $GLOBALS['fcache']->set_dir(APP_ROOT_PATH . "public/runtime/data/" . __CLASS__ . "/");
         $GLOBALS['fcache']->set($key, $res);
     }
     return $res;
 }
开发者ID:dalinhuang,项目名称:zsh_business,代码行数:12,代码来源:recommend_hot_sale_list.auto_cache.php

示例5: index

 public function index()
 {
     $root = array();
     $email = strim($GLOBALS['request']['email']);
     //用户名或邮箱
     $pwd = strim($GLOBALS['request']['pwd']);
     //密码
     $page = intval($GLOBALS['request']['page']);
     //检查用户,用户密码
     $user = user_check($email, $pwd);
     $user_id = intval($user['id']);
     if ($user_id > 0) {
         require APP_ROOT_PATH . 'app/Lib/deal.php';
         $root['user_login_status'] = 1;
         $root['response_code'] = 1;
         if ($page == 0) {
             $page = 1;
         }
         $limit = ($page - 1) * app_conf("PAGE_SIZE") . "," . app_conf("PAGE_SIZE");
         $status = intval($GLOBALS['request']['status']);
         $root['status'] = $status;
         /*
          * $status 1 进行中,2还款中,3已还清,4满标,5流标,0或其他 默认为全部
          */
         if (isset($status) && $status == "1") {
             $result = get_deal_list($limit, 0, "deal_status='1' and user_id=" . $user_id, "id DESC");
             //进行中
         } elseif (isset($status) && $status == "2") {
             $result = get_deal_list($limit, 0, "deal_status='4' and user_id=" . $user_id, "id DESC");
             //还款中
         } elseif (isset($status) && $status == "3") {
             $result = get_deal_list($limit, 0, "deal_status='5' and user_id=" . $user_id, "id DESC");
             //已还清
         } elseif (isset($status) && $status == "4") {
             $result = get_deal_list($limit, 0, "deal_status='2' and user_id=" . $user_id, "id DESC");
             //满标
         } elseif (isset($status) && $status == "5") {
             $result = get_deal_list($limit, 0, "deal_status='3' and user_id=" . $user_id, "id DESC");
             //流标
         } else {
             $result = get_deal_list($limit, 0, "user_id=" . $user_id, "id DESC");
         }
         $root['item'] = $result['list'];
         $root['page'] = array("page" => $page, "page_total" => ceil($result['count'] / app_conf("PAGE_SIZE")), "page_size" => app_conf("PAGE_SIZE"));
     } else {
         $root['response_code'] = 0;
         $root['show_err'] = "未登录";
         $root['user_login_status'] = 0;
     }
     $root['program_title'] = "我的借款";
     output($root);
 }
开发者ID:eliu03,项目名称:fanweP2P,代码行数:52,代码来源:uc_borrowed.action.php

示例6: gen_deal_mail

 public function gen_deal_mail()
 {
     $id = trim(addslashes($_REQUEST['id']));
     require_once APP_ROOT_PATH . 'app/Lib/deal.php';
     require_once APP_ROOT_PATH . 'app/Lib/common.php';
     $rs = get_deal_list(count(explode(",", $id)), 0, " id in (" . $id . ") ");
     if ($rs) {
         $content = get_deal_mail_content($rs['list']);
         $this->ajaxReturn($content, '', 1);
     } else {
         $this->ajaxReturn('', '', 0);
     }
 }
开发者ID:eliu03,项目名称:fanweP2P,代码行数:13,代码来源:PromoteMsgAction.class.php

示例7: insert_success_deal_list

/**
 * 动态输出成功案例, 不受缓存限制
 */
function insert_success_deal_list()
{
    //输出成功案例
    $GLOBALS['tmpl']->caching = true;
    $GLOBALS['tmpl']->cache_lifetime = 120;
    //首页缓存10分钟
    $cache_id = md5("success_deal_list");
    if (!$GLOBALS['tmpl']->is_cached("inc/insert/success_deal_list.html", $cache_id)) {
        $suc_deal_list = get_deal_list(11, 0, "deal_status in(4,5) ", " success_time DESC,sort DESC,id DESC");
        $GLOBALS['tmpl']->assign("succuess_deal_list", $suc_deal_list['list']);
    }
    return $GLOBALS['tmpl']->fetch("inc/insert/success_deal_list.html", $cache_id);
}
开发者ID:eliu03,项目名称:fanweP2P,代码行数:16,代码来源:insert_libs.php

示例8: index

 public function index()
 {
     $article_cate = get_acate_tree(12);
     foreach ($article_cate as $k => $v) {
         $article_cate[$k]['article'] = get_article_list(100, $v['id'], "", "", true);
     }
     $GLOBALS['tmpl']->assign("article_cate", $article_cate);
     //最新借款列表
     require APP_ROOT_PATH . 'app/Lib/deal.php';
     $deal_list = get_deal_list(9, 0, "deal_status in (1,2)", " sort DESC,  id DESC");
     $GLOBALS['tmpl']->assign("deal_list", $deal_list['list']);
     $GLOBALS['tmpl']->assign("page_title", "安全保障");
     $GLOBALS['tmpl']->assign("page_keyword", "安全保障,");
     $GLOBALS['tmpl']->assign("page_description", "安全保障,");
     $GLOBALS['tmpl']->display("page/guarantee_index.html");
 }
开发者ID:workplayteam,项目名称:P2P,代码行数:16,代码来源:guaranteeModule.class.php

示例9: index

 public function index()
 {
     $rss = new UniversalFeedCreator();
     $rss->useCached();
     // use cached version if age<1 hour
     $rss->title = app_conf("SHOP_TITLE") . " - " . app_conf("SHOP_SEO_TITLE");
     $rss->description = app_conf("SHOP_SEO_TITLE");
     //optional
     $rss->descriptionTruncSize = 500;
     $rss->descriptionHtmlSyndicated = true;
     $rss->link = get_domain() . APP_ROOT;
     $rss->syndicationURL = get_domain() . APP_ROOT;
     //optional
     $image->descriptionTruncSize = 500;
     $image->descriptionHtmlSyndicated = true;
     $domain = app_conf("PUBLIC_DOMAIN_ROOT") == '' ? get_domain() . $GLOBALS['IMG_APP_ROOT'] : app_conf("PUBLIC_DOMAIN_ROOT");
     $city = get_current_deal_city();
     $city_id = $city['id'];
     $deal_list = get_deal_list(app_conf("DEAL_PAGE_SIZE"), 0, 0, array(DEAL_ONLINE), " buy_type <> 1 or ( is_shop = 1 and is_effect =1 and is_delete = 0 and buy_type <> 1)");
     $deal_list = $deal_list['list'];
     foreach ($deal_list as $data) {
         $item = new FeedItem();
         if ($data['uname'] != '') {
             $gurl = url("shop", "goods", array("id" => $data['uname']));
         } else {
             $gurl = url("shop", "goods", array("id" => $data['id']));
         }
         $data['url'] = $gurl;
         $item->title = msubstr($data['name'], 0, 30);
         $item->link = get_domain() . $data['url'];
         $data['description'] = str_replace($GLOBALS['IMG_APP_ROOT'] . "./public/", $domain . "/public/", $data['description']);
         $data['description'] = str_replace("./public/", $domain . "/public/", $data['description']);
         $data['img'] = str_replace("./public/", $domain . "/public/", $data['img']);
         $item->description = "<img src='" . $data['img'] . "' /><br />" . $data['brief'] . "<br /> <a href='" . get_domain() . $data['url'] . "' target='_blank' >" . $GLOBALS['lang']['VIEW_DETAIL'] . "</a>";
         //optional
         $item->descriptionTruncSize = 500;
         $item->descriptionHtmlSyndicated = true;
         if ($data['end_time'] != 0) {
             $item->date = date('r', $data['end_time']);
         }
         $item->source = $data['url'];
         $item->author = app_conf("SHOP_TITLE");
         $rss->addItem($item);
     }
     $rss->saveFeed($format = "RSS0.91", $filename = APP_ROOT_PATH . "public/runtime/app/tpl_caches/rss.xml");
 }
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:46,代码来源:rssModule.class.php

示例10: index

 public function index()
 {
     $rss = new UniversalFeedCreator();
     $rss->useCached();
     // use cached version if age<1 hour
     $rss->title = app_conf("SHOP_TITLE") . " - " . app_conf("SHOP_SEO_TITLE");
     $rss->description = app_conf("SHOP_SEO_TITLE");
     //optional
     $rss->descriptionTruncSize = 500;
     $rss->descriptionHtmlSyndicated = true;
     $rss->link = get_domain() . APP_ROOT;
     $rss->syndicationURL = get_domain() . APP_ROOT;
     //optional
     $image->descriptionTruncSize = 500;
     $image->descriptionHtmlSyndicated = true;
     //对图片路径的修复
     if ($GLOBALS['distribution_cfg']['OSS_TYPE'] && $GLOBALS['distribution_cfg']['OSS_TYPE'] != "NONE") {
         $domain = $GLOBALS['distribution_cfg']['OSS_DOMAIN'];
     } else {
         $domain = SITE_DOMAIN . APP_ROOT;
     }
     $city = City::locate_city();
     $city_id = $city['id'];
     $tuan_list = get_deal_list(10, array(DEAL_ONLINE), array("cid" => 0, "city_id" => 0), '', "  is_shop = 0 and is_effect =1 and is_delete = 0 and buy_type <> 1", " create_time desc ");
     $tuan_list = $tuan_list['list'];
     foreach ($tuan_list as $data) {
         $item = new FeedItem();
         $gurl = url("index", "deal#" . $data['id']);
         $data['url'] = $gurl;
         $item->title = msubstr($data['name'], 0, 30);
         $item->link = get_domain() . $data['url'];
         $data['description'] = str_replace($GLOBALS['IMG_APP_ROOT'] . "./public/", $domain . "/public/", $data['description']);
         $data['description'] = str_replace("./public/", $domain . "/public/", $data['description']);
         $data['img'] = str_replace("./public/", $domain . "/public/", $data['img']);
         $item->description = "<img src='" . $data['img'] . "' /><br />" . $data['brief'] . "<br /> <a href='" . get_domain() . $data['url'] . "' target='_blank' >" . $GLOBALS['lang']['VIEW_DETAIL'] . "</a>";
         //optional
         $item->descriptionTruncSize = 500;
         $item->descriptionHtmlSyndicated = true;
         if ($data['end_time'] != 0) {
             $item->date = date('r', $data['end_time']);
         }
         $item->source = $data['url'];
         $item->author = app_conf("SHOP_TITLE");
         $rss->addItem($item);
     }
     $deal_list = get_deal_list(10, array(DEAL_ONLINE), array("cid" => 0, "city_id" => 0), '', "  is_shop = 1 and is_effect =1 and is_delete = 0 and buy_type <> 1", " create_time desc ");
     $deal_list = $deal_list['list'];
     foreach ($deal_list as $data) {
         $item = new FeedItem();
         $gurl = url("index", "deal#" . $data['id']);
         $data['url'] = $gurl;
         $item->title = msubstr($data['name'], 0, 30);
         $item->link = get_domain() . $data['url'];
         $data['description'] = str_replace($GLOBALS['IMG_APP_ROOT'] . "./public/", $domain . "/public/", $data['description']);
         $data['description'] = str_replace("./public/", $domain . "/public/", $data['description']);
         $data['img'] = str_replace("./public/", $domain . "/public/", $data['img']);
         $item->description = "<img src='" . $data['img'] . "' /><br />" . $data['brief'] . "<br /> <a href='" . get_domain() . $data['url'] . "' target='_blank' >" . $GLOBALS['lang']['VIEW_DETAIL'] . "</a>";
         //optional
         $item->descriptionTruncSize = 500;
         $item->descriptionHtmlSyndicated = true;
         if ($data['end_time'] != 0) {
             $item->date = date('r', $data['end_time']);
         }
         $item->source = $data['url'];
         $item->author = app_conf("SHOP_TITLE");
         $rss->addItem($item);
     }
     $youhui_list = get_youhui_list(10, array(YOUHUI_ONLINE), array("cid" => 0, "city_id" => 0), '', "  is_effect =1 ", " create_time desc ");
     $youhui_list = $youhui_list['list'];
     foreach ($youhui_list as $data) {
         $item = new FeedItem();
         $gurl = url("index", "youhui#" . $data['id']);
         $data['url'] = $gurl;
         $item->title = msubstr($data['name'], 0, 30);
         $item->link = get_domain() . $data['url'];
         $data['description'] = str_replace($GLOBALS['IMG_APP_ROOT'] . "./public/", $domain . "/public/", $data['description']);
         $data['description'] = str_replace("./public/", $domain . "/public/", $data['description']);
         $data['img'] = str_replace("./public/", $domain . "/public/", $data['img']);
         $item->description = "<img src='" . $data['img'] . "' /><br />" . $data['brief'] . "<br /> <a href='" . get_domain() . $data['url'] . "' target='_blank' >" . $GLOBALS['lang']['VIEW_DETAIL'] . "</a>";
         //optional
         $item->descriptionTruncSize = 500;
         $item->descriptionHtmlSyndicated = true;
         if ($data['end_time'] != 0) {
             $item->date = date('r', $data['end_time']);
         }
         $item->source = $data['url'];
         $item->author = app_conf("SHOP_TITLE");
         $rss->addItem($item);
     }
     $event_list = get_event_list(10, array(EVENT_ONLINE), array("cid" => 0, "city_id" => 0), '', "  is_effect =1 ", " sort asc ");
     $event_list = $event_list['list'];
     foreach ($event_list as $data) {
         $item = new FeedItem();
         $gurl = url("index", "event#" . $data['id']);
         $data['url'] = $gurl;
         $item->title = msubstr($data['name'], 0, 30);
         $item->link = get_domain() . $data['url'];
         $data['description'] = str_replace($GLOBALS['IMG_APP_ROOT'] . "./public/", $domain . "/public/", $data['description']);
         $data['description'] = str_replace("./public/", $domain . "/public/", $data['description']);
         $data['img'] = str_replace("./public/", $domain . "/public/", $data['img']);
//.........这里部分代码省略.........
开发者ID:macall,项目名称:jsd,代码行数:101,代码来源:rssModule.class.php

示例11: 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

示例12: index


//.........这里部分代码省略.........
         }
         if ($months_type > 0) {
             if ($months_type == 1) {
                 $condition .= " AND ((repay_time < 3  and repay_time_type = 1) or repay_time_type = 0) ";
             } else {
                 if ($months_type == 2) {
                     $condition .= " AND repay_time in (3,4,5) and repay_time_type = 1 ";
                 } else {
                     if ($months_type == 3) {
                         $condition .= " AND repay_time in (6,7,8) and repay_time_type = 1 ";
                     } else {
                         if ($months_type == 4) {
                             $condition .= " AND repay_time in (9,10,11) and repay_time_type = 1 ";
                         } else {
                             $condition .= " AND repay_time >= 12 and repay_time_type = 1 ";
                         }
                     }
                 }
             }
         }
         if ($city > 0) {
             if ($scity > 0) {
                 $dealid_list = $GLOBALS['db']->getAll("SELECT deal_id FROM " . DB_PREFIX . "deal_city_link where city_id = " . $scity);
             } else {
                 $dealid_list = $GLOBALS['db']->getAll("SELECT deal_id FROM " . DB_PREFIX . "deal_city_link where city_id = " . $city);
             }
             $flatmap = array_map("array_pop", $dealid_list);
             $s2 = implode(',', $flatmap);
             $condition .= " AND id in (" . $s2 . ") ";
         }
         //使用技巧
         $use_tech_list = get_article_list(4, 6);
         $GLOBALS['tmpl']->assign("use_tech_list", $use_tech_list);
         $result = get_deal_list($limit, $n_cate_id, $condition, $orderby);
         $GLOBALS['tmpl']->assign("deal_list", $result['list']);
         $GLOBALS['tmpl']->assign("total_money", $total_money);
         //输出公告
         $notice_list = get_notice(3);
         $GLOBALS['tmpl']->assign("notice_list", $notice_list);
         $page_args['cid'] = $cate_id;
         $page_args['keywords'] = $keywords;
         $page_args['level'] = $level;
         $page_args['interest'] = $interest;
         $page_args['months'] = $months;
         $page_args['lefttime'] = $lefttime;
         $page_args['months_type'] = $months_type;
         $page_args['deal_status'] = $deal_status;
         $page_args['city'] = $city;
         //分类
         $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", "deals#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;
开发者ID:eliu03,项目名称:fanweP2P,代码行数:67,代码来源:dealsModule.class.php

示例13: index

 public function index()
 {
     global $tmpl;
     //获取当前页的团购商品列表
     //分页
     $page = intval($_REQUEST['p']);
     if ($page == 0) {
         $page = 1;
     }
     $limit = ($page - 1) * app_conf("DEAL_PAGE_SIZE") . "," . app_conf("DEAL_PAGE_SIZE");
     //分类
     $cate_id = intval($_REQUEST['id']);
     $sort_field = es_cookie::get("sort_field") ? es_cookie::get("sort_field") : "sort";
     $sort_type = es_cookie::get("sort_type") ? es_cookie::get("sort_type") : "desc";
     if ($sort_field != "end_time" && $sort_field != "current_price" && $sort_field != "buy_count" && $sort_field != "sort") {
         $sort_field = "sort";
     }
     if ($sort_type != "desc" && $sort_type != "asc") {
         $sort_type = "desc";
     }
     $act = trim($_REQUEST['act']);
     //显示的类型
     if ($act == 'history') {
         $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['ORDER_HISTORY_LIST']);
         $GLOBALS['tmpl']->assign("page_keyword", $GLOBALS['lang']['ORDER_HISTORY_LIST']);
         $GLOBALS['tmpl']->assign("page_description", $GLOBALS['lang']['ORDER_HISTORY_LIST']);
         $type = array(DEAL_HISTORY);
     } elseif ($act == 'notice') {
         $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['ORDER_NOTICE_LIST']);
         $GLOBALS['tmpl']->assign("page_keyword", $GLOBALS['lang']['ORDER_NOTICE_LIST']);
         $GLOBALS['tmpl']->assign("page_description", $GLOBALS['lang']['ORDER_NOTICE_LIST']);
         $type = array(DEAL_NOTICE);
     } else {
         $GLOBALS['tmpl']->assign("page_title", $GLOBALS['lang']['ORDER_LIST']);
         $GLOBALS['tmpl']->assign("page_keyword", $GLOBALS['lang']['ORDER_LIST']);
         $GLOBALS['tmpl']->assign("page_description", $GLOBALS['lang']['ORDER_LIST']);
         $type = array(DEAL_ONLINE, DEAL_HISTORY);
     }
     if (app_conf("SHOW_DEAL_CATE") == 1) {
         //输出分类
         $deal_cates_db = $GLOBALS['db']->getAll("select * from " . DB_PREFIX . "deal_cate where is_delete = 0 and is_effect = 1 order by sort desc");
         $deal_cates = array();
         if ($act == 'history' || $act == 'notice') {
             $url = url("tuan", "order#" . $act);
         } else {
             $url = url("tuan", "order");
         }
         $deal_cates[] = array('id' => 0, 'name' => $GLOBALS['lang']['ALL'], 'current' => $cate_id == 0 ? 1 : 0, 'url' => $url);
         foreach ($deal_cates_db as $k => $v) {
             if ($cate_id == $v['id']) {
                 $v['current'] = 1;
             }
             if ($act == 'history' || $act == 'notice') {
                 $v['url'] = url("tuan", "order#" . $act, array("id" => $v['id']));
             } else {
                 $v['url'] = url("tuan", "order", array("id" => $v['id']));
             }
             $deal_cates[] = $v;
         }
         $GLOBALS['tmpl']->assign("deal_cate_list", $deal_cates);
     }
     //获取搜索字段
     $no_deal_page = "no_deal.html";
     $condition = ' buy_type=2 ';
     if ($_REQUEST['search']) {
         $search_code = unserialize(base64_decode($_REQUEST['search']));
         if ($search_code['se_name'] != '') {
             $condition .= " and name like '%" . $search_code['se_name'] . "%' ";
             $no_deal_page = 'deals.html';
             $GLOBALS['tmpl']->assign("se_name", $search_code['se_name']);
         }
         if ($search_code['se_begin'] != 0) {
             $condition .= " and (begin_time > " . intval($search_code['se_begin']) . " or begin_time = 0) ";
             $no_deal_page = 'deals.html';
             $GLOBALS['tmpl']->assign("se_begin", to_date($search_code['se_begin'], 'Y-m-d'));
         }
         if ($search_code['se_end'] != 0) {
             $condition .= " and (end_time < " . intval($search_code['se_end']) . " or end_time = 0) ";
             $no_deal_page = 'deals.html';
             $GLOBALS['tmpl']->assign("se_end", to_date($search_code['se_end'], 'Y-m-d'));
         }
     }
     $deals = get_deal_list($limit, $cate_id, 0, $type, $condition, $sort_field . " " . $sort_type);
     $GLOBALS['tmpl']->assign("deals", $deals['list']);
     $page = new Page($deals['count'], app_conf("DEAL_PAGE_SIZE"));
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     require APP_ROOT_PATH . 'app/Lib/side.php';
     //读取边栏信息,需放在deal数据的分配之后
     $GLOBALS['tmpl']->assign('sort_field', $sort_field);
     $GLOBALS['tmpl']->assign('sort_type', $sort_type);
     if (es_cookie::get("list_type") === null) {
         $list_type = app_conf("LIST_TYPE");
     } else {
         $list_type = intval(es_cookie::get("list_type"));
     }
     $GLOBALS['tmpl']->assign("list_type", $list_type);
     if ($deals['list']) {
         if ($list_type == 1) {
//.........这里部分代码省略.........
开发者ID:YouthAndra,项目名称:huaitaoo2o,代码行数:101,代码来源:orderModule.class.php

示例14: index


//.........这里部分代码省略.........
             //当天就要结束
             $GLOBALS['tmpl']->assign("page_title", "即将结束");
         }
         if ($r == "classic") {
             $condition .= " and d.is_classic = 1 ";
             $GLOBALS['tmpl']->assign("page_title", "经典项目");
             $GLOBALS['tmpl']->assign("is_classic", true);
         }
         if ($r == "limit_price") {
             $condition .= " and max(d.limit_price) ";
             $GLOBALS['tmpl']->assign("page_title", "最高目标金额");
         }
     }
     switch ($state) {
         //筹资成功
         case 1:
             $condition .= " and d.is_success=1  ";
             $GLOBALS['tmpl']->assign("page_title", "筹资成功");
             break;
             //筹资失败
         //筹资失败
         case 2:
             $condition .= " and d.end_time < " . NOW_TIME . " and d.end_time!=0  and d.is_success=0  ";
             $GLOBALS['tmpl']->assign("page_title", "筹资失败");
             break;
             //筹资中
         //筹资中
         case 3:
             $condition .= " and (d.end_time > " . NOW_TIME . " or d.end_time=0 ) and d.begin_time < " . NOW_TIME . " and d.is_success=0  ";
             $GLOBALS['tmpl']->assign("page_title", "筹资中");
             break;
     }
     if (count($cate_ids) > 0) {
         $condition .= " and d.cate_id in (" . implode(",", $cate_ids) . ")";
         $GLOBALS['tmpl']->assign("page_title", $cate_result[$id]['name']);
     }
     if ($loc != "") {
         $condition .= " and (d.province = '" . $loc . "' or city = '" . $loc . "') ";
         $GLOBALS['tmpl']->assign("page_title", $loc);
     }
     if ($type !== "") {
         $type = intval($type);
         $condition .= " and type={$type} ";
         $GLOBALS['tmpl']->assign("page_title", $loc);
     }
     if ($tag != "") {
         $unicode_tag = str_to_unicode_string($tag);
         $condition .= " and match(d.tags_match) against('" . $unicode_tag . "'  IN BOOLEAN MODE) ";
         $GLOBALS['tmpl']->assign("page_title", $tag);
     }
     if ($kw != "") {
         $kws_div = div_str($kw);
         foreach ($kws_div as $k => $item) {
             $kws[$k] = str_to_unicode_string($item);
         }
         $ukeyword = implode(" ", $kws);
         $condition .= " and (match(d.name_match) against('" . $ukeyword . "'  IN BOOLEAN MODE) or match(d.tags_match) against('" . $ukeyword . "'  IN BOOLEAN MODE)  or d.name like '%" . $kw . "%') ";
         $GLOBALS['tmpl']->assign("page_title", $kw);
     }
     $result = get_deal_list($limit, $condition);
     foreach ($result['list'] as $key => $val) {
         $result['list'][$key]['limit_ap'] = $val['limit_price'] * $val['ap_ratio'];
         $result['list'][$key]['ap_amount'] = $val['support_amount'] * $val['ap_ratio'];
     }
     if ($type == 1) {
         $GLOBALS['tmpl']->assign("deal_list_invest", $result['list']);
     } else {
         $GLOBALS['tmpl']->assign("deal_list", $result['list']);
     }
     $GLOBALS['tmpl']->assign("deal_count", $result['rs_count']);
     $page = new Page($result['rs_count'], $page_size);
     //初始化分页对象
     $p = $page->show();
     $GLOBALS['tmpl']->assign('pages', $p);
     if ($type == 1) {
         $GLOBALS['tmpl']->assign('deal_type', 'gq_type');
     } else {
         $GLOBALS['tmpl']->assign('deal_type', 'product_type');
     }
     if ($GLOBALS['tmpl']->_var['page_title'] == '') {
         $page_title = '';
         if ($type == 1) {
             foreach ($GLOBALS['nav_list'] as $k => $v) {
                 if ($v['u_module'] == 'deals' && $v['u_action'] == 'index' && $v['u_param'] == 'type=1') {
                     $page_title = $v['name'];
                 }
             }
             $page_title = $page_title ? $page_title : '股权项目';
         } else {
             foreach ($GLOBALS['nav_list'] as $k => $v) {
                 if ($v['u_module'] == 'deals' && $v['u_action'] == 'index' && $v['u_param'] == '') {
                     $page_title = $v['name'];
                 }
             }
             $page_title = $page_title ? $page_title : '产品项目';
         }
         $GLOBALS['tmpl']->assign("page_title", $page_title);
     }
     $GLOBALS['tmpl']->display("aps_index.html");
 }
开发者ID:xinlechou,项目名称:app,代码行数:101,代码来源:apsModule.class.php

示例15: index


//.........这里部分代码省略.........
         } elseif ($price == 2) {
             if ($type == 1) {
                 $orderby .= " d.invote_money asc";
             } else {
                 $orderby .= " (d.support_amount+d.virtual_price) asc";
             }
             $param_new['price'] = 1;
         }
         $url_list['price_url'] = url("deals", $param_new);
     } elseif ($focus > 0) {
         if ($focus == 1) {
             $orderby .= " d.focus_count desc";
             $param_new['focus'] = 2;
         } elseif ($focus == 2) {
             $orderby .= " d.focus_count asc";
             $param_new['focus'] = 1;
         }
         $url_list['focus_url'] = url("deals", $param_new);
     } elseif ($time > 0) {
         if ($time == 1) {
             $orderby .= " d.end_time desc";
             $param_new['time'] = 2;
         } elseif ($time == 2) {
             $orderby .= " d.end_time asc";
             $param_new['time'] = 1;
         }
         $url_list['time_url'] = url("deals", $param_new);
     } elseif ($cp > 0) {
         if ($cp == 1) {
             if ($type == 1) {
                 $orderby .= " d.invote_money/d.limit_price desc";
             } else {
                 $orderby .= " (d.support_amount+d.virtual_price)/d.limit_price desc";
             }
             $param_new['cp'] = 2;
         } else {
             if ($type == 1) {
                 $orderby .= " d.invote_money/d.limit_price asc";
             } else {
                 $orderby .= " (d.support_amount+d.virtual_price)/d.limit_price asc";
             }
             $param_new['cp'] = 1;
         }
         $url_list['cp_url'] = url("deals", $param_new);
     } else {
         $orderby = "  d.begin_time desc ";
     }
     $GLOBALS['tmpl']->assign("url_list", $url_list);
     //		if($r=="new")
     //		{
     //			$orderby ="  d.begin_time desc ";
     //		}
     //		elseif($r=="rec")
     //		{
     //			$orderby.="   d.begin_time desc  ";
     //		}
     //        else
     //		{
     //			$orderby ="  sort asc ";
     //		}
     //		var_dump($limit);
     //		var_dump($condition);
     //		var_dump($orderby);
     $result = get_deal_list($limit, $condition, $orderby);
     if ($type == 1) {
         $GLOBALS['tmpl']->assign("deal_list_invest", $result['list']);
     } else {
         $GLOBALS['tmpl']->assign("deal_list", $result['list']);
     }
     $GLOBALS['tmpl']->assign("deal_count", $result['rs_count']);
     $page = new Page($result['rs_count'], $page_size);
     //初始化分页对象
     $p = $page->para_show("deals#index", $param);
     $GLOBALS['tmpl']->assign('pages', $p);
     if ($type == 1) {
         $GLOBALS['tmpl']->assign('deal_type', 'gq_type');
     } else {
         $GLOBALS['tmpl']->assign('deal_type', 'product_type');
     }
     if ($GLOBALS['tmpl']->_var['page_title'] == '') {
         $page_title = '';
         if ($type == 1) {
             foreach ($GLOBALS['nav_list'] as $k => $v) {
                 if ($v['u_module'] == 'deals' && $v['u_action'] == 'index' && $v['u_param'] == 'type=1') {
                     $page_title = $v['name'];
                 }
             }
             $page_title = $page_title ? $page_title : '股权项目';
         } else {
             foreach ($GLOBALS['nav_list'] as $k => $v) {
                 if ($v['u_module'] == 'deals' && $v['u_action'] == 'index' && $v['u_param'] == '') {
                     $page_title = $v['name'];
                 }
             }
             $page_title = $page_title ? $page_title : '产品项目';
         }
         $GLOBALS['tmpl']->assign("page_title", $page_title);
     }
     $GLOBALS['tmpl']->display("deals_index.html");
 }
开发者ID:myjavawork,项目名称:sanxin-fangwei,代码行数:101,代码来源:dealsModule.class.php


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