产品-ECShop函数手册.doc

上传人:心*** 文档编号:1039157 上传时间:2018-11-22 格式:DOC 页数:8 大小:155.50KB
下载 相关 举报
产品-ECShop函数手册.doc_第1页
第1页 / 共8页
产品-ECShop函数手册.doc_第2页
第2页 / 共8页
产品-ECShop函数手册.doc_第3页
第3页 / 共8页
产品-ECShop函数手册.doc_第4页
第4页 / 共8页
产品-ECShop函数手册.doc_第5页
第5页 / 共8页
点击查看更多>>
资源描述

1、lib_time.phpgmtime()P: 获得当前格林威治时间的时间戳 /$0server_timezone()P: 获得服务器的时区 /$0local_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 时间戳loc

2、al_strtotime($str)P: 将一个用户自定义时区的日期转为 GMT 时间戳local_gettime($timestamp = NULL)P: 获得用户所在时区指定的时间戳local_getdate($timestamp = NULL)P: 获得用户所在时区指定的日期和时间信息lib_base.phpsub_str($str, $length = 0, $append = true)P: 截取 UTF-8 编码下字符串的函数real_ip()P: 获得用户的真实 IP 地址str_len($str)P: 计算字符串的长度(汉字按照两个字符计算)get_crlf()P: 获得用户操

3、作系统的换行符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 函数则声明该函数fi

4、le_mode_info($file_path)P: 文件或目录权限检查函数log_write($arg, $file = , $line = )P: 写入日志内容make_dir($folder)P: 检查目标文件夹是否存在,如果不存在则自动创建该目录gzip_enabled()P: 获得系统是否启用了 gzipaddslashes_deep($value)P: 递归方式的对变量中的特殊字符进行转义addslashes_deep_obj($obj)P: 将对象成员变量或者数组的特殊字符进行转义stripslashes_deep($value)P: 递归方式的对变量中的特殊字符去除转义make

5、_semiangle($str)P: 将一个字串中含有全角的数字字符、字母、空格或%+-()字符转换为相应半角字符check_file_type($filename, $realname = , $limit_ext_types = )P: 检查文件类型 /文件名/ 真实文件名/允许的文件类型mysql_like_quote($str)P: 对 MYSQL LIKE 的内容进行转义 过滤掉_ %等字符.real_server_ip()P: 获取服务器的 ipecs_header($string, $replace = true, $http_response_code = 0)P: 自定义 h

6、eader 函数,用于过滤可能出现的安全隐患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

7、()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:

8、获得查询时间和次数,并赋值给 smartyregion_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_

9、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: 获得指定分类下所有底层分类的 IDget_article_chil

10、dren ($cat = 0)P: 获得指定文章分类下所有底层分类的 IDget_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: 返回订单中的虚拟商品 记录是否发

11、货.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 =

12、 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: 重写 UR

13、L 地址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_opt

14、ions($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 = nul

15、l)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_

16、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($tmpP: 获得指定页面的动态内容ass

17、ign_articles($id, $num)P: 分配文章列表给 smartyget_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, $rec

18、ord_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: 获得指定用户、商品的所有标记

19、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%的字串转换为相

20、应数字,并返回操作符号recalculate_price()P: 重新计算购物车中的商品价格:目的是当用户登录时享受会员价格,当用户退出登录时不享受会员价格assign_comment($id, $type, $page = 1)P: 查询评论内容assign_template($ctype = , $catlist = array()P: 默认的 smarty 赋值time2gmt($time)P: 将一个本地时间戳转成 GMT 时间戳get_user_bonus($user_id = 0)P: 查询会员的红包金额set_affiliate()P: 保存推荐 uidget_affiliate

21、()P: 获取推荐 uidarticle_categories_tree($cat_id = 0)P: 获得指定分类同级的所有分类以及该分类下的子分类get_article_parent_cats($cat)P: 获得指定文章分类的所有上级分类get_library_number($library, $template = null)P: 取得某模板某库设置的数量get_navigator($ctype = , $catlist = array()P: 取得自定义导航栏列表license_info()P: 授权信息内容lib_insert.php (动态内容函数库)insert_query_i

22、nfo()P: 获得查询次数以及查询时间insert_history()P: 调用浏览历史insert_cart_info()P: 调用购物车信息insert_ads($arr)P: 调用指定的广告位的广告insert_member_info()P: 调用会员信息insert_comments($arr)P: 调用评论信息insert_vote()P: 调用在线调查信息lib_goods.php (商品相关函数库)goods_sort($goods_a, $goods_b)P: 商品推荐 usort 用自定义排序行数get_categories_tree($cat_id = 0)P: 获得指定

23、分类同级的所有分类以及该分类下的子分类get_child_tree($tree_id = 0)P: 取和指定分类 ID 下的分类树get_top10($cats = )P: 调用当前分类的销售排行榜get_recommend_goods($type = , $cats = )P: 获得推荐商品get_promote_goods($cats = )P: 获得促销商品get_category_recommend_goods($type = , $cats = , $brand = 0, $min =0, $max = 0, $ext=)P: 获得指定分类下的推荐商品get_goods_info($

24、goods_id)P: 获得商品的详细信息get_goods_properties($goods_id)P: 获得商品的属性和规格get_same_attribute_goods($attr)P: 获得属性相同的商品get_goods_gallery($goods_id)P: 获得指定商品的相册assign_cat_goods($cat_id, $num = 0, $from = web)P: 获得指定分类下的商品assign_brand_goods($brand_id, $num = 0, $cat_id = 0)P: 获得指定的品牌下的商品get_extension_goods($cats

25、)P: 获得所有扩展分类属于指定分类的所有商品 IDbargain_price($price, $start, $end)P: 判断某个商品是否正在特价促销期spec_price($spec)P: 获得指定的规格的价格group_buy_info($group_buy_id, $current_num = 0)P: 取得团购活动信息group_buy_stat($group_buy_id, $deposit)P: 取得某团购活动统计信息group_buy_status($group_buy)P: 获得团购的状态auction_info($act_id, $config = false)P: 取

26、得拍卖活动信息auction_log($act_id)P: 取得拍卖活动出价记录auction_status($auction)P: 计算拍卖活动状态(注意参数一定是原始信息)goods_info($goods_id)P: 取得商品信息favourable_info($act_id)P: 取得优惠活动信息wholesale_info($act_id)P: 批发信息add_style($goods_name, $style)P: 添加商品名样式get_goods_attr($goods_id)P: 取得商品属性get_goods_fittings($goods_list = array()P: 获得购物车中商品的配件lib_article.php (文章及文章分类相关函数库)get_cat_articles($cat_id, $page = 1, $size = 20 ,$requirement=)P: 获得文章分类下的文章列表get_article_count($cat_id ,$requirement=)P: 获得指定分类下的文章总数

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 实用文档资料库 > 策划方案

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。