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


PHP ECS类代码示例

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


在下文中一共展示了ECS类的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: addslashes_deep

{
    if (!empty($_GET))
    {
        $_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();
开发者ID:noikiy,项目名称:mdwp,代码行数:31,代码来源:init.php

示例3: clear_all_files

clear_all_files();
/* 鍔犺浇鏁版嵁搴撻厤缃?枃浠 */
if (file_exists(ROOT_PATH . 'data/config.php')) {
    include ROOT_PATH . 'data/config.php';
} elseif (file_exists(ROOT_PATH . 'includes/config.php')) {
    if (!rename(ROOT_PATH . 'includes/config.php', ROOT_PATH . 'data/config.php')) {
        die('Can\'t move config.php, please move it from includes/ to data/ manually!');
    }
    include ROOT_PATH . 'data/config.php';
} else {
    die('Can\'t find config.php!');
}
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]);
开发者ID:cjjmem,项目名称:lywj,代码行数:31,代码来源:init.php

示例4: addslashes_deep

require ROOT_PATH . 'includes/lib_base.php';
require ROOT_PATH . 'includes/lib_common.php';
require ROOT_PATH . 'includes/lib_time.php';
/* 对用户传入的变量进行转义操作。*/
if (!get_magic_quotes_gpc()) {
    if (!empty($_GET)) {
        $_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);
$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);
开发者ID:dw250100785,项目名称:ECShop-1,代码行数:31,代码来源:init.php

示例5: addslashes_deep

require ROOT_PATH . 'include/lib_insert.php';
require ROOT_PATH . 'include/lib_goods.php';
require ROOT_PATH . 'include/lib_article.php';
/* 对用户传入的变量进行转义操作。 */
if (!get_magic_quotes_gpc()) {
    if (!empty($_GET)) {
        $_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 . 'include/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();
$_CFG['URL_HTTP_HOST'] = $config['site_url'];
/* 载入语言文件 */
require ROOT_PATH . 'lang/' . $_CFG['lang'] . '/common.php';
if ($_CFG['shop_closed'] == 1) {
开发者ID:seanguo166,项目名称:microdistribution,代码行数:31,代码来源:init.php

示例6: addslashes_deep

require ROOT_PATH . 'includes/lib_goods.php';
require ROOT_PATH . 'includes/lib_article.php';
require ROOT_PATH . 'includes/lib_ecmoban.php';
/* 对用户传入的变量进行转义操作。*/
if (!get_magic_quotes_gpc()) {
    if (!empty($_GET)) {
        $_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;
开发者ID:dlpc,项目名称:ecshop,代码行数:31,代码来源:init.php

示例7: addslashes_deep

    if (!empty($_GET)) {
        $_GET = addslashes_deep($_GET);
    }
    if (!empty($_POST)) {
        $_POST = addslashes_deep($_POST);
    }
    $_COOKIE = addslashes_deep($_COOKIE);
    $_REQUEST = addslashes_deep($_REQUEST);
}
/* 对路径进行安全处理 */
if (strpos(PHP_SELF, '.php/') !== false) {
    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) {
开发者ID:BGCX261,项目名称:zishashop-svn-to-git,代码行数:31,代码来源:init.php

示例8: addslashes_deep

require ROOT_PATH . 'includes/lib_goods.php';
require ROOT_PATH . 'includes/lib_article.php';
/* 对用户传入的变量进行转义操作。*/
if (!get_magic_quotes_gpc()) {
    if (!empty($_GET)) {
        $_GET = addslashes_deep($_GET);
    }
    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) {
    /* 商店关闭了,输出关闭的消息 */
开发者ID:fromzyy2ann,项目名称:mescake,代码行数:31,代码来源:init.php

示例9: addslashes_deep

require ROOT_PATH . 'includes/lib_goods.php';
require ROOT_PATH . 'includes/lib_article.php';
require ROOT_PATH . 'themes/xm2013/init.php';
/* 对用户传入的变量进行转义操作。*/
if (!get_magic_quotes_gpc()) {
    if (!empty($_GET)) {
        $_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) {
    /* 商店关闭了,输出关闭的消息 */
开发者ID:nanhuacrab,项目名称:ecshop,代码行数:31,代码来源:init.php

示例10: define

}
define('ROOT_PATH', str_replace('json/includes/init.php', '', str_replace('\\', '/', __FILE__)));
if (defined('DEBUG_MODE') == false) {
    define('DEBUG_MODE', 0);
}
if (PHP_VERSION >= '5.1' && !empty($timezone)) {
    date_default_timezone_set($timezone);
}
if (isset($_SERVER['PHP_SELF'])) {
    define('PHP_SELF', $_SERVER['PHP_SELF']);
} else {
    define('PHP_SELF', $_SERVER['SCRIPT_NAME']);
}
require '../includes/inc_constant.php';
require '../includes/cls_ecshop.php';
require '../includes/cls_error.php';
require '../includes/lib_time.php';
require '../includes/lib_base.php';
require '../includes/lib_common.php';
require './includes/lib_main.php';
require './includes/cls_exchange.php';
/* 创建 ECSHOP 对象 */
$ecs = new ECS($db_name, $prefix);
define('DATA_DIR', $ecs->data_dir());
define('IMAGE_DIR', $ecs->image_dir());
/* 初始化数据库类 */
require '../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;
/* 载入系统参数 */
$_CFG = load_config();
开发者ID:firsteam,项目名称:falcons,代码行数:31,代码来源:init.php

示例11: ecs_header

        $class_code = $_COOKIE['ECSCP']['class_code'];
    } else {
        ecs_header("Location: ../login.php\n");
        exit;
    }
} else {
    $class_code = $_SESSION["class_code"];
}
if ($school_code == 'super' || $class_code == 'super') {
    clearstatcache();
    ecs_header("Location: ../login.php\n");
    exit;
}
$db_name = $school_code . "_school";
/* 创建 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);
$db_host = $db_user = $db_pass = $db_name = NULL;
/* 初始化 action */
if (!isset($_REQUEST['act'])) {
    $_REQUEST['act'] = 'list';
}
/* 载入系统参数 */
$_CFG = load_config();
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);
开发者ID:dalinhuang,项目名称:hteacher,代码行数:31,代码来源:init.php

示例12: addslashes_deep

require ROOT_PATH . 'includes/inc_constant.php';
require ROOT_PATH . 'includes/cls_error.php';
require ROOT_PATH . 'includes/lib_insert.php';
/* 对用户传入的变量进行转义操作。*/
if (!get_magic_quotes_gpc()) {
    if (!empty($_GET)) {
        $_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());
/* 初始化数据库类 */
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());
开发者ID:naliduo,项目名称:ecshop,代码行数:31,代码来源:init.php

示例13: define

}
define('PHP_SELF', $php_self);
// 通用包含文件
require ROOT_PATH . 'data/config.php';
require ROOT_PATH . 'includes/lib_common.php';
require ROOT_PATH . 'includes/cls_mysql.php';
/* 兼容ECShopV2.5.1版本载入库文件 */
if (!function_exists('addslashes_deep')) {
    require ROOT_PATH . 'includes/lib_base.php';
}
/* 兼容ECShopV2.5.1版本 */
if (!defined('EC_CHARSET')) {
    define('EC_CHARSET', 'utf-8');
}
/* 初始化包含文件 */
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();
$data = array('service_phone' => $_CFG['service_phone'], 'site_url' => dirname($GLOBALS['ecs']->url()), 'goods_url' => dirname($GLOBALS['ecs']->url()) . '/goods.php?id=', 'shop_closed' => $_CFG['shop_closed'], 'close_comment' => $_CFG['close_comment'], 'shop_reg_closed' => $_CFG['shop_reg_closed'], 'shop_desc' => $_CFG['shop_desc'], 'currency_format' => $_CFG['currency_format'], "time_format" => $_CFG['time_format']);
GZ_Api::outPut(array('data' => $data));
开发者ID:dx8719,项目名称:ECMobile_Universal,代码行数:31,代码来源:config.php

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

示例15: addslashes_deep

require ROOT_PATH . 'includes/lib_insert.php';
require ROOT_PATH . 'includes/lib_article.php';
require ROOT_PATH . 'includes/lib_new_common.php';
/* 对用户传入的变量进行转义操作。*/
if (!get_magic_quotes_gpc()) {
    if (!empty($_GET)) {
        $_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 {
开发者ID:dalinhuang,项目名称:hteacher,代码行数:31,代码来源:sinit.php


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