ecshop 函数列表大全

本文档详尽列举了ECSHOP系统中的各种实用函数,包括时间处理、字符串操作、文件管理、邮件发送等功能,并介绍了相关目录结构,如API、数据库、图片上传等关键组件。

ecshop 函数列表大全

所有函数功能说明:

 

lib_time.php
gmtime()
P: 获得当前格林威治时间的时间戳 /$0
server_timezone()
P: 获得服务器的时区 /$0
local_mktime($hour = NULL , $minute= NULL, $second = NULL,  $month = NULL,  $day = NULL,  $year = NULL)
P: 生成一个用户自定义时区日期的GMT时间戳
local_date($format, $time = NULL)
P: 将GMT时间戳格式化为用户自定义时区日期
gmstr2time($str)
P: 转换字符串形式的时间表达式为GMT时间戳
local_strtotime($str)
P: 将一个用户自定义时区的日期转为GMT时间戳
local_gettime($timestamp = NULL)
P:  获得用户所在时区指定的时间戳
local_getdate($timestamp = NULL)
P: 获得用户所在时区指定的日期和时间信息

lib_base.php
sub_str($str, $length = 0, $append = true)
P: 截取UTF-8编码下字符串的函数
real_ip()
P: 获得用户的真实IP地址
str_len($str)
P: 计算字符串的长度(汉字按照两个字符计算)
get_crlf()
P: 获得用户操作系统的换行符
send_mail($name, $email, $subject, $content, $type = 0, $notification=false)
P: 邮件发送
gd_version()
P:  获得服务器上的 GD 版本
file_get_contents($file)
P: 如果系统不存在file_get_contents函数则声明该函数
file_put_contents($file, $data, $flags = ”)
P: 如果系统不存在file_put_contents函数则声明该函数
floatval($n)
P: 如果系统不存在 floatval 函数则声明该函数
file_mode_info($file_path)
P: 文件或目录权限检查函数
log_write($arg, $file = ”, $line = ”)
P: 写入日志内容
make_dir($folder)
P: 检查目标文件夹是否存在,如果不存在则自动创建该目录
gzip_enabled()
P: 获得系统是否启用了 gzip
addslashes_deep($value)
P: 递归方式的对变量中的特殊字符进行转义
addslashes_deep_obj($obj)
P: 将对象成员变量或者数组的特殊字符进行转义
stripslashes_deep($value)
P: 递归方式的对变量中的特殊字符去除转义
make_semiangle($str)
P: 将一个字串中含有全角的数字字符、字母、空格或’%+-()’字符转换为相应半角字符
check_file_type($filename, $realname = ”, $limit_ext_types = ”)
P: 检查文件类型 /文件名/真实文件名/允许的文件类型
mysql_like_quote($str)
P: 对 MYSQL LIKE 的内容进行转义 过滤掉_ %等字符.
real_server_ip()
P: 获取服务器的ip
ecs_header($string, $replace = true, $http_response_code = 0)
P: 自定义 header 函数,用于过滤可能出现的安全隐患
ecs_iconv($source_lang, $target_lang, $source_string = ”)
P: 自定义的编码转换
ecs_geoip($ip)
P: 取得IP的地址,采用IP库
trim_right($str)
P: 去除字符串右侧可能出现的乱码
move_upload_file($file_name, $target_name = ”)
P: 将上传文件转移到指定位置
json_str_iconv($str)
P: 将JSON传递的参数转码
get_file_suffix($file_name, $allow_type = array())
P: 获取文件后缀名,并判断是否合法
read_static_cache($cache_name)
P: 读结果缓存文件
write_static_cache($cache_name, $caches)
P: 写结果缓存文件

lib_common.php (公用函数库)
db_create_in($item_list, $field_name = ”)
P: 创建像这样的查询: “IN(‘a’,'b’)” $item_list为数组
is_email($user_email)
P: 验证输入的邮件地址是否合法
is_time($time)
P: 检查是否为一个合法的时间格式
assign_query_info()
P: 获得查询时间和次数,并赋值给smarty
region_result($parent, $sel_name, $type)
P: 创建地区的返回信息
get_regions($type = 0, $parent = 0)
P: 获得指定国家的所有省份, 函数需要数据库支持.
get_shipping_config($area_id)
P: 获得配送区域中指定的配送方式的配送费用的计算参数 比如快捷公司不同.
init_users()
P: 初始化会员数据整合类
cat_list($cat_id = 0, $selected = 0, $re_type = true, $level = 0, $is_show_all = true)
P: 获得指定分类下的子分类的数组, $re_type控制返回类型
cat_options($spec_cat_id, $arr)
P: 过滤和排序所有分类,返回一个带有缩进级别的数组
load_config()
P: 载入配置信息
get_brand_list()
P: 取得品牌列表
get_brands($cat = 0, $app = ‘brand’)
P: 获得某个分类下的品牌列表
get_promotion_info($goods_id = ”)
P: 所有的促销活动信息
get_children($cat = 0)
P: 获得指定分类下所有底层分类的ID
get_article_children ($cat = 0)
P: 获得指定文章分类下所有底层分类的ID
get_mail_template($tpl_name)
P: 获取邮件模板
order_action($order_sn, $order_status, $shipping_status, $pay_status, $note = ”, $username = null)
P: 记录订单操作记录
price_format($price, $change_price = true)
P: 格式化商品价格
get_virtual_goods($order_id, $shipping = false)
P: 返回订单中的虚拟商品 记录是否发货.
virtual_goods_ship(&$virtual_goods, &$msg, $order_sn, $return_result = false, $process = ‘other’)
P:  虚拟商品发货
virtual_card_shipping ($goods, $order_sn, &$msg, $process = ‘other’)
P: 虚拟卡发货
virtual_card_result($order_sn, $goods)
P: 返回虚拟卡信息
get_snatch_result($id)
P: 获取指定 id snatch 活动的结果
clear_tpl_files($is_cache = true, $ext = ”)
P: 清除指定后缀的模板缓存或编译文件
clear_compiled_files($ext = ”)
P: 清除模版编译文件
clear_cache_files($ext = ”)
P: 清除缓存文件
clear_all_files($ext = ”)
P: 清除模版编译和缓存文件
smarty_insert_scripts($args)
P: 页面上调用的js文件,组合功能.
smarty_create_pages($params)
P: 创建分页的列表
build_uri($app, $params, $append = ”, $page = 0, $size = 0)
P: 重写 URL 地址
formated_weight($weight)
P: 格式化重量
log_account_change($user_id, $user_money = 0, $frozen_money = 0, $rank_points = 0, $pay_points = 0, $change_desc = ”, $change_type = ACT_OTHER)
P: 记录帐户变动
article_cat_list($cat_id = 0, $selected = 0, $re_type = true, $level = 0)
P: 获得指定分类下的子分类的数组/ 向下取数组.
article_cat_options($spec_cat_id, $arr)
P: 过滤和排序所有文章分类,返回一个带有缩进级别的数组
uc_call($func, $params=null)
P: 调用UCenter的函数
exception_handler($errno, $errstr, $errfile, $errline)
P: error_handle回调函数未启用.
get_image_path($goods_id, $image=”, $thumb=false, $call=’goods’, $del=false)
P: 重新获得商品图片与商品相册的地址
user_uc_call($func, $params = null)
P: 调用使用UCenter插件时的函数
get_volume_price_list($goods_id, $price_type = ’1′)
P: 取得商品优惠价格列表
get_final_price($goods_id, $goods_num = ’1′, $is_spec_price = false, $spec = array())
P: 取得商品最终使用价格
get_package_info($id)
P: 获取指定id package 的信息
get_package_goods($package_id)
P: 获得指定礼包的商品

lib_main.php (前台公用函数库)
update_user_info()
P: 更新用户SESSION,COOKIE及登录时间、登录次数。
get_user_info($id=0)
P:  获取用户信息数组
assign_ur_here($cat = 0, $str = ”)
P: 取得当前位置和页面标题
get_parent_cats($cat)
P: 获得指定分类的所有上级分类
build_pagetitle($arr, $type = ‘category’)
P: 根据提供的数组编译成页面标题
build_urhere($arr, $type = ‘category’)
P: 根据提供的数组编译成当前位置
assign_dynamic($tmp
P: 获得指定页面的动态内容
assign_articles($id, $num)
P: 分配文章列表给smarty
get_shop_help()
P: 分配帮助信息
assign_pager($app, $cat, $record_count, $size, $sort, $order, $page = 1,$keywords = ”, $brand = 0, $price_min = 0, $price_max = 0, $display_type = ‘list’, $filter_attr=”, $url_format=”, $sch_array=”)
P: 创建分页信息.分页函数.
get_pager($url, $param, $record_count, $page = 1, $size = 10)
P: 生成给pager.lbi赋值的数组
get_vote($id = ”)
P: 调用调查内容
get_user_browser()
P: 获得浏览器名称和版本
is_spider($record = true)
P: 判断是否为搜索引擎蜘蛛
get_os()
P: 获得客户端的操作系统
visit_stats()
P: 统计访问信息
save_searchengine_keyword($domain, $path)
P: 保存搜索引擎关键字
get_tags($goods_id = 0, $user_id = 0)
P: 获得指定用户、商品的所有标记
get_dyna_libs($theme, $tmp)
P:  获取指定主题某个模板的主题的动态模块
dyna_libs_replace($matches)
P: 换动态模块
upload_file($upload, $type)
P: 处理上传文件,并返回上传图片名(上传失败时返回图片名为空)
show_message($content, $links = ”, $hrefs = ”, $type = ‘info’, $auto_redirect = true)
P: 显示一个提示信息
parse_rate_value($str, &$operate)
P: 将一个形如+10, 10, -10, 10%的字串转换为相应数字,并返回操作符号
recalculate_price()
P: 重新计算购物车中的商品价格:目的是当用户登录时享受会员价格,当用户退出登录时不享受会员价格

┣ api 目录
    ┃   ┣ checkorder.php 检查订单 API
    ┃   ┣ cron.php
    ┃   ┗ init.php API 公用初始化文件
    ┣ cert 目录 网站备案证书上传目录存放
    ┃   ┗ index.htm
    ┣ data 数据库目录
    ┃   ┣ ffiliate.html
    ┃   ┣ goods_script.html
    ┃   ┣ order_print.html
    ┃   ┣ afficheimg 目录
    ┃   ┃   ┗ index.htm
    ┃   ┣ brandlogo 目录
    ┃   ┃   ┗ index.htm
    ┃   ┣ captcha 目录 验证码背景图片存放位置
    ┃   ┃   ┣ captcha_bg1.gif
    ┃   ┃   ┣ captcha_bg1.jpg
    ┃   ┃   ┣ captcha_bg2.gif
    ┃   ┃   ┣ captcha_bg2.jpg
    ┃   ┃   ┣ captcha_bg3.gif
    ┃   ┃   ┣ captcha_bg3.jpg
    ┃   ┃   ┣ captcha_bg4.gif
    ┃   ┃   ┣ captcha_bg4.jpg
    ┃   ┃   ┣ captcha_bg5.gif
    ┃   ┃   ┗ captcha_bg5.jpg
    ┃   ┣ cardimg 目录
    ┃   ┃   ┗ index.htm
    ┃   ┣ feedbackimg 目录
    ┃   ┃   ┗ index.htm
    ┃   ┣ images 目录
    ┃   ┃   ┣ bcastr.swf
    ┃   ┃   ┗ ecshop_slagon.jpg
    ┃   ┣ packimg 目录
    ┃   ┃   ┗ index.htm
    ┃   ┗ sqldata MySQL数据库目录
    ┃        ┗ index.htm
    ┣ images 目录
    ┃   ┗ upload 目录
    ┃        ┣ File 文件上传存放处
    ┃        ┣ Flash flash上传存放处
    ┃        ┣ Image 图片上传存放处
    ┃        ┗ Media 视频上传存放处
    ┣ includes 目录
    ┃   ┣ cls_captcha.php 验证码图片类
    ┃   ┣ cls_ecshop.php 基础类
    ┃   ┣ cls_error.php 用户级错误处理类
    ┃   ┣ cls_iconv.php 字符集转换类
    ┃   ┣ cls_image.php 后台对上传文件的处理类(实现图片上传,图片缩小, 增加水印)
    ┃   ┣ cls_json.php JSON 类
    ┃   ┣ cls_mysql.php MYSQL 公用类库
    ┃   ┣ cls_rss.php RSS 类
    ┃   ┣ cls_session.php SESSION 公用类库
    ┃   ┣ cls_sms.php 短信模块 之 模型(类库)
    ┃   ┣ cls_smtp.php SMTP 邮件类
    ┃   ┣ cls_sql_executor.php SQL语句执行类。
    ┃   ┣ cls_template.php 模版类
    ┃   ┣ cls_transport.php 服务器之间数据传输器
    ┃   ┣ inc_constant.php 常量
    ┃   ┣ init.php 前台公用文件
    ┃   ┣ lib.debug.php
    ┃   ┣ lib_article.php 文章及文章分类相关函数库
    ┃   ┣ lib_clips.php ECSHOP 用户相关函数库
    ┃   ┣ lib_code.php 加密解密类
    ┃   ┣ lib_common.php 公用函数库
    ┃   ┣ lib_goods.php 商品相关函数库
    ┃   ┣ lib_insert.php 动态内容函数库
    ┃   ┣ lib_main.php 前台公用函数库
    ┃   ┣ lib_order.php 购物流程函数库
    ┃   ┣ lib_passport.php 用户帐号相关函数库
    ┃   ┣ lib_payment.php 支付接口函数库
    ┃   ┣ lib_time.php 时间函数
    ┃   ┣ lib_transaction.php ECSHOP 用户交易相关函数库
    ┃   ┣ codetable 目录
    ┃   ┃    ┣ big5-gb.table
    ┃   ┃    ┣ big5_utf8.php
    ┃   ┃    ┣ gb-big5.table
    ┃   ┃    ┣ gb_utf8.php
    ┃   ┃    ┗ ipdata.dat
    ┃   ┣ fckeditor 目录 fckeditor编辑器目录
    ┃   ┗ modules 目录
    ┃         ┣ convert 目录
    ┃         ┃    ┣ shopex46.php vshopex4.6转换程序插件
    ┃         ┃    ┗ shopex47.php shopex4.7转换程序插件
    ┃         ┣ cron 目录
    ┃         ┃    ┣ auto_manage.php 自动上下架管理
    ┃         ┃    ┗ ipdel.php 定期删除
    ┃         ┣ integrates 目录
    ┃         ┃    ┣ bmforum.php 会员数据处理类
    ┃         ┃    ┣ discuz.php
    ┃         ┃    ┣ discuz55.php
    ┃         ┃    ┣ dvbbs.php
    ┃         ┃    ┣ ecshop.php
    ┃         ┃    ┣ integrate.php
    ┃         ┃    ┣ ipb.php
    ┃         ┃    ┣ molyx.php
    ┃         ┃    ┣ phpbb.php
    ┃         ┃    ┣ phpwind.php
    ┃         ┃    ┣ phpwind5.php
    ┃         ┃    ┗ vbb.php
    ┃         ┣ payment 目录
    ┃         ┃    ┣ alipay.php 支付宝插件
    ┃         ┃    ┣ balance.php 余额支付插件
    ┃         ┃    ┣ bank.php 银行汇款(转帐)插件
    ┃         ┃    ┣ cappay.php 首信易支付插件
    ┃         ┃    ┣ chinabank.php 网银在线插件
    ┃         ┃    ┣ cncard.php 云网支付插件
    ┃         ┃    ┣ cod.php 货到付款插件
    ┃         ┃    ┣ ctopay.php Ctopay 支付插件
    ┃         ┃    ┣ express.php express支付系统插件
    ┃         ┃    ┣ ips.php ips支付系统插件
    ┃         ┃    ┣ kuaiqian.php 快钱插件
    ┃         ┃    ┣ nps.php NPS支付插件
    ┃         ┃    ┣ pay800.php 800pay 支付宝插件
    ┃         ┃    ┣ paypal.php 贝宝插件
    ┃         ┃    ┣ paypalcn.php 贝宝中国插件
    ┃         ┃    ┣ post.php 邮局汇款插件
    ┃         ┃    ┣ tenpay.php 财付通插件
    ┃         ┃    ┣ udpay.php 网汇通插件
    ┃         ┃    ┣ xpay.php 易付通插件
    ┃         ┃    ┗ yeepay.php YeePay易宝插件
    ┃         ┗ shipping 目录
    ┃               ┣ cac.php 上门取货插件
    ┃               ┣ city_express.php 城际快递插件
    ┃               ┣ ems.php EMS插件
    ┃               ┣ flat.php 邮政包裹插件
    ┃               ┣ fpd.php 到付运费插件
    ┃               ┣ post_express.php 邮政包裹插件
    ┃               ┣ post_mail.php 邮局平邮插件
    ┃               ┣ presswork.php 挂号印刷品插件
    ┃               ┣ sf_express.php 顺丰速运 配送方式插件
    ┃               ┣ sto_express.php 申通快递 配送方式插件
    ┃               ┣ yto.php 圆通速递插件
    ┃               ┗ zto.php 中通速递插件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值