Ecshop two times Development Guide

Source: Internet
Author: User
Tags filter date format functions get ip sort version variable

Functional description of all functions:

lib_time.php

Gmtime ()

P: Get the time stamp of the current GMT/$0

Server_timezone ()

P: Get the server's time zone/$0

Local_mktime ($hour = null, $minute = NULL, $second = NULL, $month = NULL, $day = NULL, $year = NULL)

P: GMT timestamp that generates a user-defined time zone date

Local_date ($format, $time = NULL)

P: Format GMT timestamp as user custom time zone date

Gmstr2time ($STR)

P: The time expression in the form of the conversion string is GMT time stamp

Local_strtotime ($STR)

P: Convert the date of a user-defined time zone to GMT timestamp

Local_gettime ($timestamp = NULL)

P: Gets the time stamp specified by the user's time zone

Local_getdate ($timestamp = NULL)

P: Gets the date and time information specified by the user's time zone

lib_base.php

Sub_str ($str, $length = 0, $append = True)

P: Intercepting a function of a UTF-8 encoded string

REAL_IP ()

P: Get the user's real IP address

Str_len ($STR)

P: Calculates the length of a string (Chinese characters are calculated in two characters)

Get_crlf ()

P: Get line breaks for user's operating system

Send_mail ($name, $email, $subject, $content, $type = 0, $notification =false)

P: Send mail

Gd_version ()

P: Obtain the GD version on the server

File_get_contents ($file)

P: If the file_get_contents function is not present in the system, declare the function

File_put_contents ($file, $data, $flags = ")

P: If the file_put_contents function is not present in the system, declare the function

Floatval ($n)

P: If the Floatval function is not present in the system, declare the function

File_mode_info ($file _path)

P: File or directory permission check function

Log_write ($arg, $file = ", $line =")

P: Write Log contents

Make_dir ($folder)

P: Check if the destination folder exists, and automatically create the directory if it does not exist

Gzip_enabled ()

P: Obtain whether the system has gzip enabled

Addslashes_deep ($value)

P: A recursive way to escape special characters in a variable

Addslashes_deep_obj ($obj)

P: To escape an object member variable or special character of an array

Stripslashes_deep ($value)

P: Recursive way to remove special characters in a variable escape

Make_semiangle ($STR)

P: Converts a string containing full-width numeric characters, letters, spaces, or '%+-() ' characters to the corresponding half-width characters

Check_file_type ($filename, $realname = ", $limit _ext_types =")

P: Check file type/filename/real file name/allowed file type

Mysql_like_quote ($STR)

P: The content of MYSQL like to escape filtering out the characters such as _%.

REAL_SERVER_IP ()

P: Get the IP of the server

Ecs_header ($string, $replace = True, $http _response_code = 0)

P: Custom header function to filter for possible security risks

Ecs_iconv ($source _lang, $target _lang, $source _string = ")

P: Custom Encoding Conversions

Ecs_geoip ($IP)

P: Get IP address, use IP library

Trim_right ($STR)

P: Remove possible garbled string on right

Move_upload_file ($file _name, $target _name = ")

P: Transfer the uploaded file to the specified location

Json_str_iconv ($STR)

P: The parameter transcoding passed by JSON

Get_file_suffix ($file _name, $allow _type = Array ())

P: Gets the file suffix name and determines whether it is legal

Read_static_cache ($cache _name)

P: Read result cache file

Write_static_cache ($cache _name, $caches)

P: Write result cache file

lib_common.php (common function Library)

Db_create_in ($item _list, $field _name = ")

P: Create a query like this: "In" (' A ', ' B ') $item _list an array

Is_email ($user _email)

P: Verify that the email address you entered is legal

Is_time ($time)

P: Check for a valid time format

Assign_query_info ()

P: Get query time and times, and assign value to Smarty

Region_result ($parent, $sel _name, $type)

P: Create the return information for the region

Get_regions ($type = 0, $parent = 0)

P: Access to all provinces of the designated country, the function requires database support.

Get_shipping_config ($area _id)

P: The calculation parameters for the distribution cost of the distribution method specified in the distribution area, such as the speed company, are different.

Init_users ()

P: Initialize member Data integration class

Cat_list ($cat _id = 0, $selected = 0, $re _type = true, $level = 0, $is _show_all = True)

P: Gets an array of subcategories under the specified category, $re _type control return type

Cat_options ($spec _cat_id, $arr)

P: Filter and sort all categories, returning an array with indentation levels

Load_config ()

P: Load configuration information

Get_brand_list ()

P: Get Brand List

Get_brands ($cat = 0, $app = ' brand ')

P: Get a list of brands under a category

Get_promotion_info ($goods _id = ")

P: All promotional activity information

Get_children ($cat = 0)

P: Gets the ID of all the underlying categories under the specified category

Get_article_children ($cat = 0)

P: Gets the ID of all the underlying categories under the specified article category

Get_mail_template ($tpl _name)

P: Get mail template

Order_action ($order _sn, $order _status, $shipping _status, $pay _status, $note = ", $username = null)

P: Record order operation Records

Price_format ($price, $change _price = True)

P: Format the price of a commodity

Get_virtual_goods ($order _id, $shipping = False)

P: Returns whether the virtual item records in the order are shipped.

Virtual_goods_ship (& $virtual _goods, & $msg, $order _sn, $return _result = false, $process = ' other ')

P: Virtual Goods delivery

Virtual_card_shipping ($goods, $order _sn, & $msg, $process = ' other ')

P: Virtual Card shipping

Virtual_card_result ($order _sn, $goods)

P: Return the virtual card information

Get_snatch_result ($id)

P: Gets the result of the specified ID snatch activity

Clear_tpl_files ($is _cache = true, $ext = ")

P: Clears the template cache or compiled file for the specified suffix

Clear_compiled_files ($ext = ")

P: Clear Template compilation files

Clear_cache_files ($ext = ")

P: Clear Cached files

Clear_all_files ($ext = ")

P: Clear template compile and cache files

Smarty_insert_scripts ($args)

P: Page calls on the JS file, combined function.

Smarty_create_pages ($params)

P: Create a paginated list

Build_uri ($app, $params, $append = ", $page = 0, $size = 0)

P: Rewrite URL address

Formated_weight ($weight)

P: Format weight

Log_account_change ($user _id, $user _money = 0, $frozen _money = 0, $rank _points = 0, $pay _points = 0, $change _desc = ", $cha Nge_type = Act_other)

P: Record account changes

Article_cat_list ($cat _id = 0, $selected = 0, $re _type = true, $level = 0)

P: Gets an array/down array of subcategories under the specified category.

Article_cat_options ($spec _cat_id, $arr)

P: Filter and sort all article categories, return an array with indentation levels

Uc_call ($func, $params =null)

P: Call the Ucenter function

Exception_handler ($errno, $errstr, $errfile, $errline)

The P:error_handle callback function is not enabled.

Get_image_path ($goods _id, $image = ", $thumb =false, $call = ' goods ', $del =false)

P: Re-obtain the address of the product picture and the product album

User_uc_call ($func, $params = null)

P: Calling functions when using the Ucenter plug-in

Get_volume_price_list ($goods _id, $price _type = ' 1′)

P: Get a list of preferential prices for commodities

Get_final_price ($goods _id, $goods _num = ' 1′, $is _spec_price = false, $spec = Array ())

P: Obtain the final use price of goods

Get_package_info ($id)

P: Gets the information for the specified ID package

Get_package_goods ($package _id)

P: Goods for the specified gift package

lib_main.php (foreground common function library)

Update_user_info ()

P: Update user Session,cookie and logon times, logon times.

Get_user_info ($id =0)

P: Get an array of user information

Assign_ur_here ($cat = 0, $str = ")

P: Get current position and page title

Get_parent_cats ($cat)

P: Get all superior categories for the specified category

Build_pagetitle ($arr, $type = ' category ')

P: Translated into page title according to the number of devised provided

Build_urhere ($arr, $type = ' category ')

P: Translated into current position according to the number of devised provided

Assign_dynamic ($tmp

P: Get the dynamic content of the specified page

Assign_articles ($id, $num)

P: Assign a list of articles to Smarty

Get_shop_help ()

P: Assigning Help information

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: Create paging information. Paging function.

Get_pager ($url, $param, $record _count, $page = 1, $size = 10)

P: Generates an array assigned to PAGER.LBI

Get_vote ($id = ")

P: Invoke Survey content

Get_user_browser ()

P: Get browser name and version

Is_spider ($record = True)

P: Judge whether the search engine spider

Get_os ()

P: Obtain the client's operating system

Visit_stats ()

P: Statistical access information

Save_searchengine_keyword ($domain, $path)

P: Save search Engine Keywords

Get_tags ($goods _id = 0, $user _id = 0)

P: Get all the tags for the specified user, product

Get_dyna_libs ($theme, $tmp)

P: Gets a dynamic module that specifies the theme of a template for a topic

Dyna_libs_replace ($matches)

P: Change the dynamic module

Upload_file ($upload, $type)

P: Process upload file, and return upload image name (return picture name is empty when upload fails)

Show_message ($content, $links = ", $hrefs =", $type = ' info ', $auto _redirect = True)

P: Display a hint message

Parse_rate_value ($STR, & $operate)

P: Converts a string of a shape such as +10, 10,-10, 10% to the corresponding number and returns the operation symbol

Recalculate_price ()

P: Recalculate the price of the goods in the shopping cart: The purpose is to enjoy the member price when the user logs in, not to enjoy the member price when the user exits the login

Assign_comment ($id, $type, $page = 1)

P: Query Comment content

Assign_template ($ctype = ", $catlist = Array ())

P: Default Smarty Assignment

TIME2GMT ($time)

P: Convert a local timestamp to GMT timestamp

Get_user_bonus ($user _id = 0)

P: Check the member's Red envelope amount

Set_affiliate ()

P: Save recommended UID

Get_affiliate ()

P: Get the recommended UID

Article_categories_tree ($cat _id = 0)

P: Gets all the categories of the specified classification and the subcategories under that category

Get_article_parent_cats ($cat)

P: Get all superior categories for the specified article category

Get_library_number ($library, $template = null)

P: Get the number of a library set for a template

Get_navigator ($ctype = ", $catlist = Array ())

P: Get a custom navigation bar list

License_info ()

P: Authorization Information content

lib_insert.php (Dynamic content function library)

Insert_query_info ()

P: Get the number of queries and query time

Insert_history ()

P: Invoke browsing History

Insert_cart_info ()

P: Call Shopping cart information

Insert_ads ($arr)

P: Call ad for the specified ad bit

Insert_member_info ()

P: Call member Information

Insert_comments ($arr)

P: Invoke Comment information

Insert_vote ()

P: Call online survey information

lib_goods.php (Commodity related function library)

Goods_sort ($goods _a, $goods _b)

P: Product recommendation Usort The number of custom sort rows

Get_categories_tree ($cat _id = 0)

P: Gets all the categories of the specified classification and the subcategories under that category

Get_child_tree ($tree _id = 0)

P: To take and specify the classification tree under the category ID

GET_TOP10 ($cats = ")

P: Call sales list for current category

Get_recommend_goods ($type = ", $cats =")

P: Get the recommended product

Get_promote_goods ($cats = ")

P: Get Promotional Items

Get_category_recommend_goods ($type = ", $cats =", $brand = 0, $min =0, $max = 0, $ext = ")

P: Obtain the recommended products under the specified classification

Get_goods_info ($goods _id)

P: Get detailed information about the product

Get_goods_properties ($goods _id)

P: Obtain the attributes and specifications of the goods

Get_same_attribute_goods ($attr)

P: Get the same product with attributes

Get_goods_gallery ($goods _id)

P: Get the photo album of the specified product

Assign_cat_goods ($cat _id, $num = 0, $from = ' web ')

P: Obtain the goods under the specified classification

Assign_brand_goods ($brand _id, $num = 0, $cat _id = 0)

P: Get the product under the specified brand

Get_extension_goods ($cats)

P: Get all product IDs for all extended categories that belong to the specified category

Bargain_price ($price, $start, $end)

P: To determine whether a particular product is in the special promotion period

Spec_price ($SPEC)

P: Get the price of the specified specification

Group_buy_info ($group _buy_id, $current _num = 0)

P: Get the group purchase activity information

Group_buy_stat ($group _buy_id, $deposit)

P: Get the statistic information of a group buying activity

Group_buy_status ($group _buy)

P: Get the status of group buying

Auction_info ($act _id, $config = False)

P: Get information about auction activity

Auction_log ($act _id)

P: Obtain bid record of auction activity

Auction_status ($auction)

P: Calculate the auction activity status (note that the parameter must be the original information)

Goods_info ($goods _id)

P: Get commodity information

Favourable_info ($act _id)

P: Access to information on promotional activities

Wholesale_info ($act _id)

P: Wholesale Information

Add_style ($goods _name, $style)

P: Add a product name style

Get_goods_attr ($goods _id)

P: Get Commodity attributes

Get_goods_fittings ($goods _list = Array ())

P: Get accessories for goods in shopping cart

lib_article.php (article and article classification related function library)

Get_cat_articles ($cat _id, $page = 1, $size = $requirement = ")

P: Get a list of articles under the article category

Get_article_count ($cat _id, $requirement = ")

P: Get the total number of articles under the specified category



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.