<?php

define('IN_ECS', true);
require dirname(__FILE__) . '/includes/init.php';
require dirname(__FILE__) . '/includes/lib_v_user.php';
if ((DEBUG_MODE & 2) != 2) {
    $smarty->caching = true;
}
if ($_CFG['is_distrib'] == 0) {
    show_message('没有开启微信分销服务!', '返回首页', 'index.php');
}
if ($_SESSION['user_id'] == 0) {
    ecs_header("Location: ./\n");
    exit;
}
$is_distribor = is_distribor($_SESSION['user_id']);
if ($is_distribor != 1) {
    show_message('您还不是分销商!', '去首页', 'index.php');
    exit;
}
if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'edit') {
    $id = intval($_REQUEST['id']);
    $info = get_dp_info($id, $_SESSION['user_id']);
    if ($info) {
        $smarty->assign('info', $info);
    } else {
        show_message('您没有权限查看此信息!');
    }
}
if (isset($_REQUEST['act']) && $_REQUEST['act'] == 'act_save') {
    $id = intval($_POST['id']);
Beispiel #2
0
            }
            $action = 'login';
        } else {
            // 未登录提交数据。非正常途径提交数据!
            // 			die($_LANG['require_login']);
            show_message($_LANG['require_login'], array('</br>登录', '</br>返回首页'), array('user.php?act=login', $ecs->url()), 'error', false);
        }
    }
}
/* 如果是显示页面,对页面进行相应赋值 */
if (in_array($action, $ui_arr)) {
    require_once ROOT_PATH . 'includes/lib_v_user.php';
    if ($_CFG['is_distrib'] == 0) {
        $is_distrib = 0;
    } else {
        $is_distribor = is_distribor($user_id);
        if ($is_distribor == 1) {
            $is_distrib = 1;
        } else {
            $is_distrib = 0;
        }
    }
    assign_template();
    $position = assign_ur_here(0, $_LANG['user_center']);
    $smarty->assign('page_title', $position['title']);
    // 页面标题
    $smarty->assign('ur_here', $position['ur_here']);
    $sql = "SELECT value FROM " . $ecs->table('ecsmart_shop_config') . " WHERE id = 419";
    $row = $db->getRow($sql);
    $car_off = $row['value'];
    $smarty->assign('car_off', $car_off);