Пример #1
0
function assign_template($ctype = '', $catlist = array())
{
    ECTouch::view()->assign('image_width', C('image_width'));
    ECTouch::view()->assign('image_height', C('image_height'));
    ECTouch::view()->assign('points_name', C('integral_name'));
    ECTouch::view()->assign('qq', explode(',', C('qq')));
    ECTouch::view()->assign('ww', explode(',', C('ww')));
    ECTouch::view()->assign('ym', explode(',', C('ym')));
    ECTouch::view()->assign('msn', explode(',', C('msn')));
    ECTouch::view()->assign('skype', explode(',', C('skype')));
    ECTouch::view()->assign('stats_code', C('stats_code'));
    ECTouch::view()->assign('copyright', sprintf(L('copyright'), date('Y'), C('shop_name')));
    ECTouch::view()->assign('shop_name', C('shop_name'));
    ECTouch::view()->assign('service_email', C('service_email'));
    ECTouch::view()->assign('service_phone', C('service_phone'));
    ECTouch::view()->assign('shop_address', C('shop_address'));
    ECTouch::view()->assign('licensed', license_info());
    ECTouch::view()->assign('ecs_version', VERSION);
    ECTouch::view()->assign('icp_number', C('icp_number'));
    ECTouch::view()->assign('username', !empty($_SESSION['user_name']) ? $_SESSION['user_name'] : '');
    ECTouch::view()->assign('category_list', cat_list(0, 0, true, 2, false));
    ECTouch::view()->assign('catalog_list', cat_list(0, 0, false, 1, false));
    ECTouch::view()->assign('navigator_list', model('Common')->get_navigator($ctype, $catlist));
    //自定义导航栏
    $search_keywords = C('search_keywords');
    if (!empty($search_keywords)) {
        $searchkeywords = explode(',', trim(C('search_keywords')));
    } else {
        $searchkeywords = array();
    }
    ECTouch::view()->assign('searchkeywords', $searchkeywords);
}
Пример #2
0
function assign_template($ctype = '', $catlist = array())
{
    global $smarty;

    $smarty->assign('image_width',   $GLOBALS['_CFG']['image_width']);
    $smarty->assign('image_height',  $GLOBALS['_CFG']['image_height']);
    $smarty->assign('points_name',   $GLOBALS['_CFG']['integral_name']);
    $smarty->assign('qq',            explode(',', $GLOBALS['_CFG']['qq']));
    $smarty->assign('ww',            explode(',', $GLOBALS['_CFG']['ww']));
    $smarty->assign('ym',            explode(',', $GLOBALS['_CFG']['ym']));
    $smarty->assign('msn',           explode(',', $GLOBALS['_CFG']['msn']));
    $smarty->assign('skype',         explode(',', $GLOBALS['_CFG']['skype']));
    $smarty->assign('stats_code',    $GLOBALS['_CFG']['stats_code']);
    $smarty->assign('copyright',     sprintf($GLOBALS['_LANG']['copyright'], date('Y'), $GLOBALS['_CFG']['shop_name']));
    $smarty->assign('shop_name',     $GLOBALS['_CFG']['shop_name']);
    $smarty->assign('service_email', $GLOBALS['_CFG']['service_email']);
    $smarty->assign('service_phone', $GLOBALS['_CFG']['service_phone']);
    $smarty->assign('shop_address',  $GLOBALS['_CFG']['shop_address']);
    $smarty->assign('licensed',      license_info());
    $smarty->assign('ecs_version',   VERSION);
    $smarty->assign('icp_number',    $GLOBALS['_CFG']['icp_number']);
    $smarty->assign('username',      !empty($_SESSION['user_name']) ? $_SESSION['user_name'] : '');
    $smarty->assign('category_list', cat_list(0, 0, true,  2, false));
    $smarty->assign('catalog_list',  cat_list(0, 0, false, 1, false));
    $smarty->assign('navigator_list',        get_navigator($ctype, $catlist));  //自定义导航栏

    if (!empty($GLOBALS['_CFG']['search_keywords']))
    {
        $searchkeywords = explode(',', trim($GLOBALS['_CFG']['search_keywords']));
    }
    else
    {
        $searchkeywords = array();
    }
    $smarty->assign('searchkeywords', $searchkeywords);
}
Пример #3
0
function assign_template($ctype = '', $catlist = array())
{
    global $smarty, $db;
    $smarty->assign('image_width', $GLOBALS['_CFG']['image_width']);
    $smarty->assign('image_height', $GLOBALS['_CFG']['image_height']);
    $smarty->assign('points_name', $GLOBALS['_CFG']['integral_name']);
    $smarty->assign('qq', explode(',', $GLOBALS['_CFG']['qq']));
    $smarty->assign('ww', explode(',', $GLOBALS['_CFG']['ww']));
    $smarty->assign('ym', explode(',', $GLOBALS['_CFG']['ym']));
    $smarty->assign('msn', explode(',', $GLOBALS['_CFG']['msn']));
    $smarty->assign('skype', explode(',', $GLOBALS['_CFG']['skype']));
    $smarty->assign('stats_code', $GLOBALS['_CFG']['stats_code']);
    $smarty->assign('copyright', sprintf($GLOBALS['_LANG']['copyright'], date('Y'), $GLOBALS['_CFG']['shop_name']));
    $smarty->assign('shop_name', $GLOBALS['_CFG']['shop_name']);
    $full_uri = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
    //by Bragg
    $smarty->assign('shop_url', substr($full_uri, 0, strripos($full_uri, "mobile/")));
    //by Bragg
    $smarty->assign('service_email', $GLOBALS['_CFG']['service_email']);
    $smarty->assign('service_phone', $GLOBALS['_CFG']['service_phone']);
    $smarty->assign('shop_address', $GLOBALS['_CFG']['shop_address']);
    $smarty->assign('licensed', license_info());
    $smarty->assign('ecs_version', VERSION);
    $smarty->assign('icp_number', $GLOBALS['_CFG']['icp_number']);
    $smarty->assign('username', !empty($_SESSION['user_name']) ? $_SESSION['user_name'] : '');
    $smarty->assign('category_list', cat_list(0, 0, true, 2, false));
    $smarty->assign('catalog_list', cat_list(0, 0, false, 1, false));
    $smarty->assign('navigator_list', get_navigator($ctype, $catlist));
    //自定义导航栏
    //查询地区 by wang
    $GLOBALS['_CFG']['shop_country'] = !empty($GLOBALS['_CFG']['shop_country']) ? $GLOBALS['_CFG']['shop_country'] : '0';
    $GLOBALS['_CFG']['shop_province'] = !empty($GLOBALS['_CFG']['shop_province']) ? $GLOBALS['_CFG']['shop_province'] : '0';
    $GLOBALS['_CFG']['shop_city'] = !empty($GLOBALS['_CFG']['shop_city']) ? $GLOBALS['_CFG']['shop_city'] : '0';
    $condition_arr = array($GLOBALS['_CFG']['shop_country'], $GLOBALS['_CFG']['shop_province'], $GLOBALS['_CFG']['shop_city']);
    $condition_str = implode(',', $condition_arr);
    $sql = "select region_name from " . $GLOBALS['ecs']->table('region') . " where region_id in ({$condition_str})";
    $region_arr = $GLOBALS['db']->getAll($sql);
    $shop_region = '';
    if (is_array($region_arr)) {
        foreach ($region_arr as $value) {
            $shop_region .= $value['region_name'];
        }
    }
    $smarty->assign('shop_region', $shop_region);
    //查询地区 by wang
    if (!empty($GLOBALS['_CFG']['search_keywords'])) {
        $searchkeywords = explode(',', trim($GLOBALS['_CFG']['search_keywords']));
    } else {
        $searchkeywords = array();
    }
    $smarty->assign('searchkeywords', $searchkeywords);
}
Пример #4
0
    $GLOBALS["VERBOSE"] = true;
    ini_set('display_errors', 1);
    ini_set('error_reporting', E_ALL);
    ini_set('error_prepend_string', null);
    ini_set('error_append_string', null);
}
$user = new usersMenus();
if (!$user->AsPostfixAdministrator) {
    die;
}
if (isset($_GET["popup"])) {
    popup();
    exit;
}
if (isset($_GET["license-info"])) {
    license_info();
    exit;
}
if (isset($_POST["InstallLicenseFile"])) {
    InstallLicenseFile();
    exit;
}
if (isset($_POST["RemoveLicenseFile"])) {
    RemoveLicenseFile();
    exit;
}
js();
function js()
{
    $page = CurrentPageName();
    $tpl = new templates();