Ecshop Basic Functions List Daquan

Source: Internet
Author: User
Tags get ip
lib_time.php
Gmtime ()
P: Get timestamp of current GMT time/$0
Server_timezone ()
P: Get the time zone of the server/$0
Local_mktime ($hour = null, $minute = NULL, $second = NULL, $month = NULL, $day = NULL, $year = NULL)
P: Generates a GMT timestamp for a user-defined time zone date
Local_date ($format, $time = NULL)
P: Format GMT timestamp as user custom time zone date
Gmstr2time ($STR)
P: Convert time expression in string form to GMT timestamp
Local_strtotime ($STR)
P: Convert the date of a user-defined time zone to GMT timestamp
Local_gettime ($timestamp = NULL)
P: Gets the timestamp specified by the user's time zone
Local_getdate ($timestamp = NULL)
P: Obtain the date and time information specified by the user's time zone

lib_base.php
Sub_str ($str, $length = 0, $append = True)
P: Intercept the function of UTF-8 encoded string
REAL_IP ()
P: Get the real IP address of the user
Str_len ($STR)
P: Calculates the length of a string (Chinese characters are calculated as two characters)
Get_crlf ()
P: Get line breaks for the user's operating system
Send_mail ($name, $email, $subject, $content, $type = 0, $notification =false)
P: Mail Sending
Gd_version ()
P: Obtain the GD version on the server
File_get_contents ($file)
P: Declares the function if the system does not exist file_get_contents function
File_put_contents ($file, $data, $flags = ")
P: Declares the function if the system does not exist file_put_contents function
Floatval ($n)
P: Declares the function if the system does not exist floatval 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 whether the destination folder exists and automatically create the directory if it does not exist
Gzip_enabled ()
P: Get the system if gzip is enabled
Addslashes_deep ($value)
P: Escaping a special character in a variable recursively
Addslashes_deep_obj ($obj)
P: Escape the special characters of an object member variable or an array
Stripslashes_deep ($value)
P: Remove escape for special characters in a recursive way
Make_semiangle ($STR)
P: Converts a string containing full-width numeric characters, letters, spaces, or '%+-() ' characters to 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: Escape the content of MYSQL like to filter out _% characters.
REAL_SERVER_IP ()
P: Get the IP of the server
Ecs_header ($string, $replace = True, $http _response_code = 0)
P: Custom header function for filtering possible security implications
Ecs_iconv ($source _lang, $target _lang, $source _string = ")
P: Custom Encoding Conversion
Ecs_geoip ($IP)
P: Get IP address, use IP library
Trim_right ($STR)
P: Remove possible garbled characters to the right of the string
Move_upload_file ($file _name, $target _name = ")
P: Transfer the uploaded file to the specified location
Json_str_iconv ($STR)
P: transcoding of parameters 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 Array
Is_email ($user _email)
P: Verify that the e-mail address entered is legal
Is_time ($time)
P: Check if it is a valid time format
Assign_query_info ()
P: Get query time and number, 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: For all provinces in a given country, the function requires database support.
Get_shipping_config ($area _id)
P: The calculation parameters for the distribution cost of the delivery method specified in the distribution area, such as the Express 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 classification, $re _type control return type
Cat_options ($spec _cat_id, $arr)
P: Filters and sorts all categories, returning an array with indentation levels
Load_config ()
P: Load configuration information
Get_brand_list ()
P: Get a list of brands
Get_brands ($cat = 0, $app = ' brand ')
P: Get a list of brands under a category
Get_promotion_info ($goods _id = ")
P: All Promotion information
Get_children ($cat = 0)
P: Gets the ID of all underlying categories under the specified classification
Get_article_children ($cat = 0)
P: Gets the ID of all 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 record
Price_format ($price, $change _price = True)
P: Format the price of the commodity
Get_virtual_goods ($order _id, $shipping = False)
P: Returns whether the virtual product record in the order is shipped.
Virtual_goods_ship (& $virtual _goods, & $msg, $order _sn, $return _result = false, $process = ' other ')
P: Virtual Goods shipping
Virtual_card_shipping ($goods, $order _sn, & $msg, $process = ' other ')
P: Virtual Card shipping
Virtual_card_result ($order _sn, $goods)
P: Return 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: Clear template cache or compile file for specified suffix
Clear_compiled_files ($ext = ")
P: Clear Template Compilation file
Clear_cache_files ($ext = ")
P: Clear Cache file
Clear_all_files ($ext = ")
P: Clear templates compile and cache files
Smarty_insert_scripts ($args)
P: JS file called on the page, combined function.
Smarty_create_pages ($params)
P: Create a list of pagination
Build_uri ($app, $params, $append = ", $page = 0, $size = 0)
P: Rewrite URL address
Formated_weight ($weight)
P: Formatted weight
Log_account_change ($user _id, $user _money = 0, $frozen _money = 0, $rank _points = 0, $pay _points = 0, $change _desc = ", $ch Ange_type = Act_other)
P: Record account changes
Article_cat_list ($cat _id = 0, $selected = 0, $re _type = true, $level = 0)
P: Gets an array of sub-categories under the specified classification/down-fetch array.
Article_cat_options ($spec _cat_id, $arr)
P: Filter and sort all article categories, returning an array with indentation levels
Uc_call ($func, $params =null)
P: function that calls Ucenter
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-get the address of the product picture and product album
User_uc_call ($func, $params = null)
P: Call the function when using the Ucenter plugin
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: Get the final price of the product
Get_package_info ($id)
P: Get information for the specified ID package
Get_package_goods ($package _id)
P: Items that have been given a gift package

lib_main.php (foreground common function library)
Update_user_info ()
P: Update user Session,cookie and logon time, login 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 parent categories for the specified category
Build_pagetitle ($arr, $type = ' category ')
P: Translated into page titles based on the number of uncorrupted set provided
Build_urhere ($arr, $type = ' category ')
P: Translated into current position according to the number uncorrupted set provided
Assign_dynamic ($tmp
P: Get dynamic content for a 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. The paging function.
Get_pager ($url, $param, $record _count, $page = 1, $size = 10)
P: Generate an array for Pager.lbi assignment
Get_vote ($id = ")
P: Invoke Survey content
Get_user_browser ()
P: Get browser name and version
Is_spider ($record = True)
P: Judging whether a search engine spider
Get_os ()
P: Get 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 tags for the specified user, product
Get_dyna_libs ($theme, $tmp)
P: Gets a dynamic module that specifies the subject of a template for a topic
Dyna_libs_replace ($matches)
P: Change dynamic module
Upload_file ($upload, $type)
P: Process the upload file and return the uploaded image name (The return image is empty when upload fails)
Show_message ($content, $links = ", $hrefs =", $type = ' info ', $auto _redirect = True)
P: Displays a hint message
Parse_rate_value ($STR, & $operate)
P: Converts a string of characters such as +10, 10,-10, 10% to the corresponding number and returns the action symbol
Recalculate_price ()
P: Recalculate the price of the item in the CART: The purpose is to enjoy the member's price when the user logs in, not to enjoy the member's price when the user logs out
Assign_comment ($id, $type, $page = 1)
P: Query Comment content
Assign_template ($ctype = ", $catlist = Array ())
P: Default Smarty Assignment
TIME2GMT ($time)
P: Turn a local timestamp into GMT timestamp
Get_user_bonus ($user _id = 0)
P: Check the bonus amount of the member
Set_affiliate ()
P: Save recommended UID
Get_affiliate ()
P: Get the recommended UID
Article_categories_tree ($cat _id = 0)
P: Get all the classifications of the specified classification siblings and sub-categories under the classification
Get_article_parent_cats ($cat)
P: Get all parent categories for the specified article category
Get_library_number ($library, $template = null)
P: Get the number of a library setting for a template
Get_navigator ($ctype = ", $catlist = Array ())
P: Get a list of custom navigation bars
License_info ()
P: Authorization Information content

lib_insert.php (Dynamic content function library)
Insert_query_info ()
P: Number of queries and time for queries
Insert_history ()
P: Call Browsing History
Insert_cart_info ()
P: Call Shopping cart information
Insert_ads ($arr)
P: ad that invokes the specified ad bit
Insert_member_info ()
P: Call member Information
Insert_comments ($arr)
P: Call Comment Information
Insert_vote ()
P: Call online survey information

lib_goods.php (Commodity correlation function Library)
Goods_sort ($goods _a, $goods _b)
P: Product recommended usort with custom sort rows
Get_categories_tree ($cat _id = 0)
P: Get all the classifications of the specified classification siblings and sub-categories under the classification
Get_child_tree ($tree _id = 0)
P: Take and specify the classification tree under the classification ID
GET_TOP10 ($cats = ")
P: Call the current category's sales leaderboard
Get_recommend_goods ($type = ", $cats =")
P: Get Recommended items
Get_promote_goods ($cats = ")
P: Get Promotional Items
Get_category_recommend_goods ($type = ', $cats = ', $brand = 0, $min =0, $max = 0, $ext = ')
P: Get recommended items under the specified category
Get_goods_info ($goods _id)
P: Get detailed information about the product
Get_goods_properties ($goods _id)
P: Access to product properties and specifications
Get_same_attribute_goods ($attr)
P: Get the same product with the same property
Get_goods_gallery ($goods _id)
P: Photo Album for the specified product
Assign_cat_goods ($cat _id, $num = 0, $from = ' web ')
P: Get the product under the specified category
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 the product IDs for all extended categories that belong to the specified category
Bargain_price ($price, $start, $end)
P: Determine if an item is in a 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 information about group buying activities
Group_buy_stat ($group _buy_id, $deposit)
P: Get statistics on a group purchase activity
Group_buy_status ($group _buy)
P: Get the status of group purchase
Auction_info ($act _id, $config = False)
P: Get information on auction activities
Auction_log ($act _id)
P: Get auction bid record
Auction_status ($auction)
P: Calculate Auction activity Status (note that the parameter must be the original information)
Goods_info ($goods _id)
P: Get product information
Favourable_info ($act _id)
P: Get Promotion information
Wholesale_info ($act _id)
P: Wholesale Information
Add_style ($goods _name, $style)
P: Add product Name Style
Get_goods_attr ($goods _id)
P: Get Product attributes
Get_goods_fittings ($goods _list = Array ())
P: Get accessories for items in your shopping cart

lib_article.php (article and article Classification correlation function Library)
Get_cat_articles ($cat _id, $page = 1, $size =, $requirement = ")
P: Get a list of articles in 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.