Example #1
0
    return $hotgoods_list;
}
/* 代码增加_end  By  www.68ecshop.com  */
$smarty->assign('currency_format', $_CFG['currency_format']);
$smarty->assign('integral_scale', $_CFG['integral_scale']);
$smarty->assign('step', $_REQUEST['step']);
assign_dynamic('shopping_flow');
/* 代码修改_start  By  www.68ecshop.com */
if ($_REQUEST['step'] == 'cart') {
    app_display('cart.dwt');
} else {
    if ($_REQUEST['step'] == 'checkout') {
        app_display('checkout.dwt');
    } else {
        if ($_REQUEST['step'] == 'done') {
            app_display('done.dwt');
        }
    }
}
/* 代码修改_end  By  www.68ecshop.com */
/*------------------------------------------------------ */
//-- PRIVATE FUNCTION
/*------------------------------------------------------ */
/**
 * 获得用户的可用积分
 *
 * @access  private
 * @return  integral
 */
function flow_available_points()
{
Example #2
0
        $prev_article = $db->getRow("SELECT article_id, title FROM " . $ecs->table('article') . " WHERE article_id = {$prev_aid}");
        $prev_article['url'] = build_uri('article', array('aid' => $prev_article['article_id']), $prev_article['title']);
        $smarty->assign('prev_article', $prev_article);
    }
    assign_dynamic('article');
}
/* if(isset($article) && $article['cat_id'] > 2)
{
    $smarty->display('article.dwt', $cache_id);
}
else
{
    $smarty->display('article_pro.dwt', $cache_id);
}
 */
app_display('article.dwt');
/*------------------------------------------------------ */
//-- PRIVATE FUNCTION
/*------------------------------------------------------ */
/**
 * 获得指定的文章的详细信息
 *
 * @access  private
 * @param   integer     $article_id
 * @return  array
 */
function get_article_info($article_id)
{
    /* 获得文章的信息 */
    $sql = "SELECT a.*, IFNULL(AVG(r.comment_rank), 0) AS comment_rank " . "FROM " . $GLOBALS['ecs']->table('article') . " AS a " . "LEFT JOIN " . $GLOBALS['ecs']->table('comment') . " AS r ON r.id_value = a.article_id AND comment_type = 1 " . "WHERE a.is_open = 1 AND a.article_id = '{$article_id}' GROUP BY a.article_id";
    $row = $GLOBALS['db']->getRow($sql);
Example #3
0
        if (!empty($last)) {
            $sql_r = "SELECT w_id FROM " . $GLOBALS['ecs']->table('keyword') . " WHERE searchengine='ecshop' AND word='{$Recordkw}'  ";
            $w_id = $db->getOne($sql_r);
            if ($w_id) {
                $sql_r = "UPDATE " . $ecs->table('keyword') . " SET " . "keyword_cat = '" . $last['name'] . "', " . "keyword_cat_url = '" . $last['url'] . "', " . "keyword_cat_count = '" . $last['count'] . "' " . "WHERE w_id = " . $w_id['w_id'];
                $db->query($sql_r);
            }
        }
    }
    //echo '<pre>';
    //print_r($cat_two_arr);
    //echo '</pre>';
    /* www.68ecshop.com */
    $is_full_page = !isset($_REQUEST['is_full_page']) ? 1 : trim($_REQUEST['is_full_page']);
    $smarty->assign('is_full_page', $is_full_page);
    app_display('search.dwt');
}
/*------------------------------------------------------ */
//-- PRIVATE FUNCTION
/*------------------------------------------------------ */
/**
 *
 *
 * @access public
 * @param
 *
 * @return void
 */
function is_not_null($value)
{
    if (is_array($value)) {
Example #4
0
    // 当前位置
    $smarty->assign('intromode', $intromode);
    $smarty->assign('categories', get_categories_tree());
    // 分类树
    $smarty->assign('helps', get_shop_help());
    // 网店帮助
    $smarty->assign('top_goods', get_top10());
    // 销售排行
    $smarty->assign('promotion_info', get_promotion_info());
    $smarty->assign('categories_pro', get_categories_tree2());
    // 分类树
    $smarty->assign('list_default_sort', $default_sort_order_type);
    // $smarty->display('pro_search.dwt');
    $is_full_page = isset($_REQUEST['is_full_page']) ? intval($_REQUEST['is_full_page']) : '1';
    $smarty->assign('is_full_page', $is_full_page);
    app_display('promote_list.dwt');
}
/*------------------------------------------------------ */
//-- PRIVATE FUNCTION
/*------------------------------------------------------ */
/**
 *
 *
 * @access public
 * @param
 *
 * @return void
 */
function is_not_null($value)
{
    if (is_array($value)) {
Example #5
0
        $position = assign_ur_here('', $_LANG['all_brand']);
        $smarty->assign('page_title', $position['title']);
        // 页面标题
        $smarty->assign('ur_here', $position['ur_here']);
        // 当前位置
        $smarty->assign('categories', get_categories_tree());
        // 分类树
        $smarty->assign('helps', get_shop_help());
        // 网店帮助
        $smarty->assign('top_goods', get_top10());
        // 销售排行
        $smarty->assign('brand_list', get_brands());
    }
    // $smarty->display('brand_list.dwt', $cache_id);
    // exit();
    app_display('brand_list.dwt');
}
/* 初始化分页信息 */
$page = !empty($_REQUEST['page']) && intval($_REQUEST['page']) > 0 ? intval($_REQUEST['page']) : 1;
$size = !empty($_CFG['page_size']) && intval($_CFG['page_size']) > 0 ? intval($_CFG['page_size']) : 10;
$cate = !empty($_REQUEST['cat']) && intval($_REQUEST['cat']) > 0 ? intval($_REQUEST['cat']) : 0;
$suppId = !empty($_REQUEST['suppId']) && intval($_REQUEST['suppId']) > 0 ? intval($_REQUEST['suppId']) : 0;
/* 排序、显示方式以及类型 */
$default_display_type = $_CFG['show_order_type'] == '0' ? 'list' : ($_CFG['show_order_type'] == '1' ? 'grid' : 'text');
$default_sort_order_method = $_CFG['sort_order_method'] == '0' ? 'DESC' : 'ASC';
$default_sort_order_type = $_CFG['sort_order_type'] == '0' ? 'goods_id' : ($_CFG['sort_order_type'] == '1' ? 'shop_price' : 'last_update');
$sort = isset($_REQUEST['sort']) && in_array(trim(strtolower($_REQUEST['sort'])), array('goods_id', 'shop_price', 'last_update', 'click_count', 'salenum')) ? trim($_REQUEST['sort']) : $default_sort_order_type;
$order = isset($_REQUEST['order']) && in_array(trim(strtoupper($_REQUEST['order'])), array('ASC', 'DESC')) ? trim($_REQUEST['order']) : $default_sort_order_method;
$display = isset($_REQUEST['display']) && in_array(trim(strtolower($_REQUEST['display'])), array('list', 'grid', 'text')) ? trim($_REQUEST['display']) : (isset($_COOKIE['ECS']['display']) ? $_COOKIE['ECS']['display'] : $default_display_type);
$display = in_array($display, array('list', 'grid', 'text')) ? $display : 'text';
setcookie('ECS[display]', $display, gmtime() + 86400 * 7);
Example #6
0
    if ($page - 5 > 0) {
        $smarty->assign('start', $page - 3);
        $start_array = range($page, $page - 2);
    }
    if ($shop_list['page_count'] - $page > 5) {
        $smarty->assign('end', $page + 3);
        $end_array = range($page, $page + 2);
    }
    $page_array = array_merge($start_array, $end_array);
    sort($page_array);
    $smarty->assign('page_array', array_unique($page_array));
    assign_dynamic('stores');
}
/* 显示模板 */
//$smarty->display($tpl, $cache_id);
app_display($tpl);
/**
 * 获取所有店铺分类
 */
function get_all_category()
{
    $sql = "select * from " . $GLOBALS['ecs']->table('street_category') . " where is_show=1 order by sort_order";
    $all = $GLOBALS['db']->getAll($sql);
    $ret1 = $ret = array();
    foreach ($all as $key => $val) {
        $val['url'] = build_uri('stores', array('cid' => $val['str_id']), $val['str_name']);
        if ($val['is_groom'] > 0) {
            $ret[$val['str_id']] = $val;
        }
        $ret1[$val['str_id']] = $val;
    }
Example #7
0
/**
 * 找回密码第四步:完成
 */
function action_to_success()
{
    $smarty = $GLOBALS['smarty'];
    $db = $GLOBALS['db'];
    $ecs = $GLOBALS['ecs'];
    $smarty->assign("action", "step_4");
    app_display('find_password.dwt');
}
Example #8
0
                $row['gift'] = array();
                break;
            case 2:
                $row['act_type'] = $_LANG['fat_discount'];
                $row['act_type_ext'] .= "%";
                $row['gift'] = array();
                break;
        }
        if ($row['supplier_id'] > 0) {
            $sql = "select code,value from " . $ecs->table('supplier_shop_config') . " where supplier_id=" . $row['supplier_id'] . " AND code in('shop_name','shop_logo')";
            $r = $db->getAll($sql);
            foreach ($r as $k => $v) {
                $row[$v['code']] = $v['value'];
            }
        } else {
            $row['shop_logo'] = './images/ziying.jpg';
        }
        $list[] = $row;
    }
    //echo "<pre>";
    //print_r($list);
    $smarty->assign('list', $list);
    $smarty->assign('helps', get_shop_help());
    // 网店帮助
    $smarty->assign('lang', $_LANG);
    assign_dynamic('activity');
}
//$smarty->assign('feed_url',         ($_CFG['rewrite'] == 1) ? "feed-typeactivity.xml" : 'feed.php?type=activity'); // RSS URL
// $smarty->display('activity.dwt', $cache_id);
app_display('activity.dwt');
Example #9
0
/**
 * 显示会员注册界面
 */
function action_default()
{
    // 获取全局变量
    $_CFG = $GLOBALS['_CFG'];
    $_LANG = $GLOBALS['_LANG'];
    $smarty = $GLOBALS['smarty'];
    $db = $GLOBALS['db'];
    $ecs = $GLOBALS['ecs'];
    if ((!isset($back_act) || empty($back_act)) && isset($GLOBALS['_SERVER']['HTTP_REFERER'])) {
        $back_act = strpos($GLOBALS['_SERVER']['HTTP_REFERER'], 'user.php') ? './index.php' : $GLOBALS['_SERVER']['HTTP_REFERER'];
    }
    /* 取出注册扩展字段 */
    $sql = 'SELECT * FROM ' . $ecs->table('reg_fields') . ' WHERE type < 2 AND display = 1 ORDER BY dis_order, id';
    $extend_info_list = $db->getAll($sql);
    $smarty->assign('extend_info_list', $extend_info_list);
    /* 验证码相关设置 */
    if (intval($_CFG['captcha']) & CAPTCHA_REGISTER && gd_version() > 0) {
        $smarty->assign('enabled_captcha', 1);
        $smarty->assign('rand', mt_rand());
    }
    /* 密码提示问题 */
    $smarty->assign('passwd_questions', $_LANG['passwd_questions']);
    /* 代码增加_start By www.68ecshop.com */
    $smarty->assign('sms_register', $_CFG['sms_register']);
    /* 代码增加_end By www.68ecshop.com */
    /* 代码增加_star By www.68ecshop.com */
    $smarty->assign('sms_register', $_CFG['sms_register']);
    /* 代码增加_end By www.68ecshop.com */
    /* 增加是否关闭注册 */
    $smarty->assign('shop_reg_closed', $_CFG['shop_reg_closed']);
    // 登陆注册-注册类型
    $register_type = empty($_REQUEST['register_type']) ? 'mobile' : $_REQUEST['register_type'];
    if ($register_type != 'email' && $register_type != 'mobile') {
        $register_type = 'mobile';
    }
    $smarty->assign('register_type', $register_type);
    // $smarty->assign('back_act', $back_act);
    // $smarty->display('user_register.dwt');
    app_display('register.dwt');
}
Example #10
0
    /* 获得文章列表 */
    if (isset($_REQUEST['keywords'])) {
        $keywords = addslashes(htmlspecialchars(urldecode(trim($_REQUEST['keywords']))));
        $pager['search']['keywords'] = $keywords;
        $search_url = substr(strrchr($_POST['cur_url'], '/'), 1);
        $smarty->assign('search_value', stripslashes(stripslashes($keywords)));
        $smarty->assign('search_url', $search_url);
        $count = get_article_count($cat_id, $keywords);
        $pages = $count > 0 ? ceil($count / $size) : 1;
        if ($page > $pages) {
            $page = $pages;
        }
        $goon_keywords = urlencode($_REQUEST['keywords']);
    }
    /* 代码增加_start  By  www.68ecshop.com */
    $search_url = "article_cat.php?id={$cat_id}";
    $smarty->assign('search_url', $search_url);
    /* 代码增加_end  By  www.68ecshop.com */
    $smarty->assign('artciles_list', get_cat_articles($cat_id, $page, $size, $keywords));
    $smarty->assign('cat_id', $cat_id);
    /* 分页 */
    assign_pager('article_cat', $cat_id, $count, $size, '', '', $page, $goon_keywords);
    assign_dynamic('article_cat');
}
$smarty->assign('feed_url', $_CFG['rewrite'] == 1 ? "feed-typearticle_cat" . $cat_id . ".xml" : 'feed.php?type=article_cat' . $cat_id);
// RSS URL
// $smarty->display('article_cat.dwt', $cache_id);
app_display('article_list.dwt');
/* 代码增加_start  By  www.68ecshop.com */
make_html();
/* 代码增加_end   By  www.68ecshop.com */