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


PHP ECS::table方法代码示例

本文整理汇总了PHP中ECS::table方法的典型用法代码示例。如果您正苦于以下问题:PHP ECS::table方法的具体用法?PHP ECS::table怎么用?PHP ECS::table使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ECS的用法示例。


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

示例1: addTongji

function addTongji($domain, $ip)
{
    global $db, $db_host, $db_user, $db_pass, $db_name, $prefix;
    $ecs = new ECS($db_name, $prefix);
    $db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
    list($dom, $domainname, $ext) = explode('.', $domain);
    $domainname .= '.' . $ext;
    $namemd5 = md5($domainname);
    $userip = $ip;
    try {
        $sql = 'INSERT INTO ' . $ecs->table('userinfo') . ' (`domain_name`, `name_md5`, `addtime`, `userip`, `userpv`) VALUES ("' . $domainname . '","' . $namemd5 . '",' . time() . ',"' . $userip . '",0) ON DUPLICATE KEY UPDATE userpv=userpv+1';
        $db->query($sql);
        return '1';
    } catch (Exception $e) {
        return '0';
    }
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:17,代码来源:record.php

示例2: define

    define('PHP_SELF', $_SERVER['SCRIPT_NAME']);
}
$root_path = preg_replace('/includes(.*)/i', '', PHP_SELF);
require ROOT_PATH . 'data/config.php';
require ROOT_PATH . 'includes/lib_base.php';
require ROOT_PATH . 'includes/cls_mysql.php';
require ROOT_PATH . 'includes/cls_ecshop.php';
require ROOT_PATH . 'includes/cls_session.php';
require ROOT_PATH . 'includes/lib_common.php';
/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', $ecs->data_dir());
define('IMAGE_DIR', $ecs->image_dir());
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
/* init session */
$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'), 'ECSCP_ID');
if (!empty($_SESSION['admin_id'])) {
    if ($_SESSION['action_list'] == 'all') {
        $enable = true;
    } else {
        if (strpos(',' . $_SESSION['action_list'] . ',', ',goods_manage,') === false && strpos(',' . $_SESSION['action_list'] . ',', ',virualcard,') === false && strpos(',' . $_SESSION['action_list'] . ',', ',article_manage,') === false) {
            $enable = false;
        } else {
            $enable = true;
        }
    }
} else {
    //添加入驻商上传图片的权限
    if (empty($_SESSION['supplier_id'])) {
        $enable = false;
    } else {
开发者ID:seanguo166,项目名称:yinoos,代码行数:31,代码来源:config.php

示例3: get_spt_code

/**
 * 获得spt代码
 *
 * @access  public
 * @return  string   spt代码
 */
function get_spt_code()
{
    include(ROOT_PATH . 'data/config.php');
    include_once(ROOT_PATH . 'includes/cls_ecshop.php');
    include_once(ROOT_PATH . 'includes/cls_mysql.php');
    $db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
    $ecs = new ECS($db_name, $prefix);
    $hash_code = $db->getOne("SELECT value FROM " . $ecs->table('shop_config') . " WHERE code='hash_code'");
    $spt = '<script type="text/javascript" src="http://api.ecshop.com/record.php?';
    $spt .= "url=" .urlencode($ecs->url()). "&mod=install&version=" .VERSION. "&hash_code=" . $hash_code . "&charset=" .EC_CHARSET. "&language=" . $GLOBALS['installer_lang'] . "\"></script>";

    return $spt;
}
开发者ID:noikiy,项目名称:mdwp,代码行数:19,代码来源:lib_auto_installer.php

示例4: ECS

    }

    $_COOKIE   = addslashes_deep($_COOKIE);
    $_REQUEST  = addslashes_deep($_REQUEST);
}

/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', $ecs->data_dir());
define('IMAGE_DIR', $ecs->image_dir());


/* 初始化数据库类 */
require(ROOT_PATH . 'includes/cls_mysql.php');
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db->set_disable_cache_tables(array($ecs->table('sessions'), $ecs->table('sessions_data'), $ecs->table('cart')));
$db_host = $db_user = $db_pass = $db_name = NULL;

/* 创建错误处理对象 */
$err = new ecs_error('message.dwt');

/* 载入系统参数 */
$_CFG = load_config();

/* 载入语言文件 */
require(ROOT_PATH . 'languages/' . $_CFG['lang'] . '/common.php');

if ($_CFG['shop_closed'] == 1)
{
    /* 商店关闭了,输出关闭的消息 */
    header('Content-type: text/html; charset='.EC_CHARSET);
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:init.php

示例5: ECS

}
require ROOT_PATH . 'includes/cls_ecshop.php';
require ROOT_PATH . 'includes/cls_mysql.php';
/* 鍒涘缓 ECSHOP 瀵硅薄 */
$ecs = new ECS($db_name, $prefix);
/* 鐗堟湰瀛楃?闆嗗彉閲
$ec_version_charset = 'gbk';
*/
$mysql_charset = $ecshop_charset = '';
/* 鑷?姩鑾峰彇鏁版嵁琛ㄧ殑瀛楃?闆 */
$tmp_link = @mysql_connect($db_host, $db_user, $db_pass);
if (!$tmp_link) {
    die("Can't pConnect MySQL Server({$db_host})!");
} else {
    mysql_select_db($db_name);
    $query = mysql_query(" SHOW CREATE TABLE " . $ecs->table('users'), $tmp_link) or die(mysql_error());
    $tablestruct = mysql_fetch_row($query);
    preg_match("/CHARSET=(\\w+)/", $tablestruct[1], $m);
    if (strpos($m[1], 'utf') === 0) {
        $mysql_charset = str_replace('utf', 'utf-', $m[1]);
    } else {
        $mysql_charset = $m[1];
    }
}
if (defined('EC_CHARSET')) {
    $ecshop_charset = EC_CHARSET;
}
/*
if (empty($tmp_charset))
{
    $check_charset = false;
开发者ID:cjjmem,项目名称:lywj,代码行数:31,代码来源:init.php

示例6: ECS

        $_POST = addslashes_deep($_POST);
    }
    $_COOKIE = addslashes_deep($_COOKIE);
    $_REQUEST = addslashes_deep($_REQUEST);
}
/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
$data_dir = $ecs->data_dir();
/* 初始化数据库类 */
require ROOT_PATH . 'includes/cls_mysql.php';
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db_host = $db_user = $db_pass = $db_name = NULL;
/* 初始化session */
require ROOT_PATH . 'includes/cls_session.php';
$sess_name = defined("SESS_NAME") ? SESS_NAME : 'ECS_ID';
$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'), $sess_name);
/* 载入系统参数 */
$_CFG = load_config();
/* 初始化用户插件 */
$user =& init_users();
if ((DEBUG_MODE & 1) == 1) {
    error_reporting(E_ALL);
} else {
    error_reporting(E_ALL ^ E_NOTICE);
}
if ((DEBUG_MODE & 4) == 4) {
    include ROOT_PATH . 'includes/lib.debug.php';
}
/* 判断是否支持 Gzip 模式 */
if (gzip_enabled()) {
    ob_start('ob_gzhandler');
开发者ID:dw250100785,项目名称:ECShop-1,代码行数:31,代码来源:init.php

示例7: substr

    ecs_header("Location:" . substr(PHP_SELF, 0, strpos(PHP_SELF, '.php/') + 4) . "\n");
    exit;
}
/* 创建 ECSHOP 对象  TODO*/
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', $ecs->data_dir());
define('IMAGE_DIR', $ecs->image_dir());
/* 初始化数据库类 */
require ROOT_PATH . 'includes/cls_mysql.php';
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db_host = $db_user = $db_pass = $db_name = NULL;
/* 创建错误处理对象 */
$err = new ecs_error('message.htm');
/* 初始化session */
require ROOT_PATH . 'includes/cls_session.php';
$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'), 'ECSCP_ID');
/* 载入系统参数 */
// $_CFG = load_config();
$_CFG = array("lang" => "zh_cn", "template" => "default", "hash_code" => "feb0af8dda696ecc1a9ba790973096a8", "captcha" => "0");
/* 初始化 action */
if (!isset($_REQUEST['act'])) {
    $_REQUEST['act'] = '';
}
require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/common.php';
require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/log_action.php';
if (file_exists(ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/' . basename(PHP_SELF))) {
    include ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/' . basename(PHP_SELF);
}
/* 创建 Smarty 对象。*/
require ROOT_PATH . 'includes/cls_template.php';
$smarty = new cls_template();
开发者ID:dalinhuang,项目名称:hteacher,代码行数:31,代码来源:login.php

示例8: substr

    ecs_header("Location:" . substr(PHP_SELF, 0, strpos(PHP_SELF, '.php/') + 4) . "\n");
    exit;
}
/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', $ecs->data_dir());
define('IMAGE_DIR', $ecs->image_dir());
/* 初始化数据库类 */
require ROOT_PATH . 'includes/cls_mysql.php';
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db_host = $db_user = $db_pass = $db_name = NULL;
/* 创建错误处理对象 */
$err = new ecs_error('message.htm');
/* 初始化session */
require ROOT_PATH . 'includes/cls_session.php';
$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'), 'ECSCP_ID');
/* 初始化 action */
if (!isset($_REQUEST['act'])) {
    $_REQUEST['act'] = '';
} elseif (($_REQUEST['act'] == 'login' || $_REQUEST['act'] == 'logout' || $_REQUEST['act'] == 'signin') && strpos(PHP_SELF, '/privilege.php') === false) {
    $_REQUEST['act'] = '';
} elseif (($_REQUEST['act'] == 'forget_pwd' || $_REQUEST['act'] == 'reset_pwd' || $_REQUEST['act'] == 'get_pwd') && strpos(PHP_SELF, '/get_password.php') === false) {
    $_REQUEST['act'] = '';
}
/* 载入系统参数 */
$_CFG = load_config();
// TODO : 登录部分准备拿出去做,到时候把以下操作一起挪过去
if ($_REQUEST['act'] == 'captcha') {
    include ROOT_PATH . 'includes/cls_captcha.php';
    $img = new captcha('../data/captcha/');
    @ob_end_clean();
开发者ID:BGCX261,项目名称:zishashop-svn-to-git,代码行数:31,代码来源:init.php

示例9: ECS

/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', $ecs->data_dir());
define('IMAGE_DIR', $ecs->image_dir());

/* 初始化数据库类 */
require(ROOT_PATH . 'includes/cls_mysql.php');
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db_host = $db_user = $db_pass = $db_name = NULL;

/* 创建错误处理对象 */
$err = new ecs_error('message.htm');

/* 初始化session */
require(ROOT_PATH . 'includes/cls_session.php');
$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'), 'ECSCP_ID');

/* 初始化 action */
if (!isset($_REQUEST['act']))
{
    $_REQUEST['act'] = '';
}
elseif (($_REQUEST['act'] == 'login' || $_REQUEST['act'] == 'logout' || $_REQUEST['act'] == 'signin') &&
    strpos(PHP_SELF, '/privilege.php') === false)
{
    $_REQUEST['act'] = '';
}
elseif (($_REQUEST['act'] == 'forget_pwd' || $_REQUEST['act'] == 'reset_pwd' || $_REQUEST['act'] == 'get_pwd') &&
    strpos(PHP_SELF, '/get_password.php') === false)
{
    $_REQUEST['act'] = '';
开发者ID:alphaouyang,项目名称:ecshop,代码行数:31,代码来源:init.php

示例10: ECS

        $_GET = addslashes_deep($_GET);
    }
    if (!empty($_POST)) {
        $_POST = addslashes_deep($_POST);
    }
    $_COOKIE = addslashes_deep($_COOKIE);
    $_REQUEST = addslashes_deep($_REQUEST);
}
/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', $ecs->data_dir());
define('IMAGE_DIR', $ecs->image_dir());
/* 初始化数据库类 */
require ROOT_PATH . 'includes/cls_mysql.php';
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db->set_disable_cache_tables(array($ecs->table('sessions'), $ecs->table('sessions_data'), $ecs->table('cart')));
$db_host = $db_user = $db_pass = $db_name = NULL;
/* 载入系统参数 */
$_CFG = array("lang" => "zh_cn", "template" => "default", "hash_code" => "feb0af8dda696ecc1a9ba790973096a8", "captcha" => "0");
if (isset($_SERVER['PHP_SELF'])) {
    $_SERVER['PHP_SELF'] = htmlspecialchars($_SERVER['PHP_SELF']);
}
if ((DEBUG_MODE & 1) == 1) {
    error_reporting(E_ALL);
} else {
    error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
}
if ((DEBUG_MODE & 4) == 4) {
    include ROOT_PATH . 'includes/lib.debug.php';
}
ob_start();
开发者ID:dalinhuang,项目名称:hteacher,代码行数:31,代码来源:sinit.php

示例11: ECS

        $_GET = addslashes_deep($_GET);
    }
    if (!empty($_POST)) {
        $_POST = addslashes_deep($_POST);
    }
    $_COOKIE = addslashes_deep($_COOKIE);
    $_REQUEST = addslashes_deep($_REQUEST);
}
/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', $ecs->data_dir());
define('IMAGE_DIR', $ecs->image_dir());
/* 初始化数据库类 */
require ROOT_PATH . 'includes/cls_mysql.php';
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db->set_disable_cache_tables(array($ecs->table('sessions'), $ecs->table('sessions_data'), $ecs->table('cart')));
$db_host = $db_user = $db_pass = $db_name = NULL;
/* 创建错误处理对象 */
$err = new ecs_error('message.dwt');
/* 载入系统参数 */
$_CFG = load_config();
/* 载入语言文件 */
require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/common.php';
if ($_CFG['shop_closed'] == 1) {
    /* 商店关闭了,输出关闭的消息 */
    header('Content-type: text/html; charset=' . EC_CHARSET);
    die('<div style="margin: 150px; text-align: center; font-size: 14px"><p>' . $_LANG['shop_closed'] . '</p><p>' . $_CFG['close_comment'] . '</p></div>');
}
if (is_spider()) {
    /* 如果是蜘蛛的访问,那么默认为访客方式,并且不记录到日志中 */
    if (!defined('INIT_NO_USERS')) {
开发者ID:nanhuacrab,项目名称:ecshop,代码行数:31,代码来源:init.php

示例12: ECS

/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', '/' . $ecs->data_dir());
/* 初始化数据库类 */
require ROOT_PATH . 'includes/cls_mysql.php';
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db_host = $db_user = $db_pass = $db_name = NULL;
$yhcwebsite = "http://weixin.dream-gardens.com.cn/";
$yhctestdb = new cls_mysql("112.124.110.58", "root", "dream@sh123data", "yhctest");
/* 创建错误处理对象 */
$err = new ecs_error('message.dwt');
/* 载入系统参数 */
$_CFG = load_config();
/* 初始化session */
require ROOT_PATH . 'includes/cls_session.php';
$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'), 'ecsid');
define('SESS_ID', $sess->get_session_id());
if (!defined('INIT_NO_SMARTY')) {
    header('Cache-control: private');
    header('Content-type: text/html; charset=utf-8');
    /* 创建 Smarty 对象。*/
    require ROOT_PATH . 'includes/cls_template.php';
    $smarty = new cls_template();
    $smarty->cache_lifetime = $_CFG['cache_time'];
    $smarty->template_dir = ROOT_PATH . 'mobile/templates';
    $smarty->cache_dir = ROOT_PATH . 'temp/caches';
    $smarty->compile_dir = ROOT_PATH . 'temp/compiled/mobile';
    if ((DEBUG_MODE & 2) == 2) {
        $smarty->direct_output = true;
        $smarty->force_compile = true;
    } else {
开发者ID:naliduo,项目名称:ecshop,代码行数:31,代码来源:init.php

示例13: ECS

        $_GET = addslashes_deep($_GET);
    }
    if (!empty($_POST)) {
        $_POST = addslashes_deep($_POST);
    }
    $_COOKIE = addslashes_deep($_COOKIE);
    $_REQUEST = addslashes_deep($_REQUEST);
}
/* 创建  对象 */
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', $ecs->data_dir());
define('IMAGE_DIR', $ecs->image_dir());
/* 初始化数据库类 */
require ROOT_PATH . 'includes/cls_mysql.php';
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db->set_disable_cache_tables(array($ecs->table('sessions'), $ecs->table('sessions_data'), $ecs->table('cart')));
$db_host = $db_user = $db_pass = $db_name = NULL;
/* 创建错误处理对象 */
$err = new ecs_error('message.dwt');
/* 载入系统参数 */
$_CFG = load_config();
/* 当前网站地址 */
$present_url = agency_url();
#####   配置信息(放至所有配置网站一些信息)   #####################
$_CFG['o2o_img_url'] = 'http://' . $present_url;
//.'/o2o/'
define('TMUSER', 'o2o');
/*配置天猫过来的用户名前缀*/
/* 网站图片地址 */
$img_arr = array('http://img1.txd168.com', 'http://img2.txd168.com', 'http://img3.txd168.com');
##### end ####################################
开发者ID:dlpc,项目名称:ecshop,代码行数:31,代码来源:init.php

示例14: ECS

    }
    if (!empty($_POST)) {
        $_POST = addslashes_deep($_POST);
    }
    $_COOKIE = addslashes_deep($_COOKIE);
    $_REQUEST = addslashes_deep($_REQUEST);
}
//$db_name = 'mescake';
/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', $ecs->data_dir());
define('IMAGE_DIR', $ecs->image_dir());
/* 初始化数据库类 */
require ROOT_PATH . 'includes/cls_mysql.php';
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db->set_disable_cache_tables(array($ecs->table('sessions'), $ecs->table('sessions_data'), $ecs->table('cart')));
$db_host = $db_user = $db_pass = $db_name = NULL;
/* 创建错误处理对象 */
$err = new ecs_error('message.dwt');
/* 载入系统参数 */
$_CFG = load_config();
/* 载入语言文件 */
require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/common.php';
if ($_CFG['shop_closed'] == 1) {
    /* 商店关闭了,输出关闭的消息 */
    header('Content-type: text/html; charset=' . EC_CHARSET);
    die('<div style="margin: 150px; text-align: center; font-size: 14px"><p>' . $_LANG['shop_closed'] . '</p><p>' . $_CFG['close_comment'] . '</p></div>');
}
if (is_spider()) {
    /* 如果是蜘蛛的访问,那么默认为访客方式,并且不记录到日志中 */
    if (!defined('INIT_NO_USERS')) {
开发者ID:fromzyy2ann,项目名称:mescake,代码行数:31,代码来源:init.php

示例15: JSON

/* 初始化JSON对象 */
$json = new JSON();
/* 分析JSON数据 */
parse_json($json, $_POST['Json']);
/* 初始化包含文件 */
require ROOT_PATH . 'includes/inc_constant.php';
require ROOT_PATH . 'includes/cls_ecshop.php';
require ROOT_PATH . 'includes/lib_time.php';
require ROOT_PATH . 'includes/lib_main.php';
require ROOT_PATH . 'includes/lib_insert.php';
require ROOT_PATH . 'includes/lib_goods.php';
/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
/* 初始化数据库类 */
$db = new cls_mysql($db_host, $db_user, $db_pass, $db_name);
$db->set_disable_cache_tables(array($ecs->table('sessions'), $ecs->table('sessions_data'), $ecs->table('cart')));
$db_host = $db_user = $db_pass = $db_name = null;
/* 载入系统参数 */
$_CFG = load_config();
/* 载入语言包 */
require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/common.php';
require ROOT_PATH . 'languages/' . $_CFG['lang'] . '/admin/log_action.php';
/* 初始化session */
include ROOT_PATH . 'includes/cls_session.php';
$sess = new cls_session($db, $ecs->table('sessions'), $ecs->table('sessions_data'), 'CL_ECSCP_ID');
define('SESS_ID', $sess->get_session_id());
/* 判断是否登录了 */
if ((!isset($_SESSION['admin_id']) || intval($_SESSION['admin_id']) <= 0) && $_POST['Action'] != 'UserLogin') {
    client_show_message(110);
}
if ($_CFG['shop_closed'] == 1) {
开发者ID:netroby,项目名称:ecshop,代码行数:31,代码来源:init.php


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