Examples of common built-in functions and oa examples

Source: Internet
Author: User

Examples of common built-in functions (text) and oa examples
The Tongda OA system has a large number of built-in functions, which simplifies program development. Here we will select some examples from the section in the secondary development manual and give you a brief introduction through the actual program running and debugging.
For built-in functions, see utility. php1 and Button_Back to display a return button <? Phpinclude_once ("inc/utility. php"); // reference the function file first.
Button_Back ($ HTML_CHARSET = 'gbk'); // use a function?> Running result:

2. get_client_ip obtains the Client IP address of the user.

<? Phpinclude_once ("inc/utility. php ");
Echo get_client_ip ();?> Running result:

Ii. utility_all.php1 and is_ip determine whether a string is a legal IP address <? Phpinclude_once ("inc/utility_all.php"); echo is_ip ("10.0.0.1");?>

2. add_log ($ TYPE, $ REMARK, $ OPERATOR) add system logs

Parameters:

$ TYPE // Log TYPE Code. For details, refer to "System Log TYPE" in system code settings"

$ REMARK // remarks

$ OPERATOR // The username of the user who generates logs, usually the current user

<? Phpinclude_once ("inc/utility_all.php ");
Add_log ('login log', 'test login log', 'admin');?>

3. dept_long_name ($ DEPT_ID) obtains the name of a multi-level department whose department ID is $ DEPT_ID.

Parameter: $ DEPT_ID // department ID

<? Phpinclude_once ("inc/utility_all.php ");
Echo dept_long_name (1);?>
In addition to the common functions above, OA also provides server file management functions, attachment upload processing functions, and SMS functions, which are relatively less used, if necessary, you can further find the secondary development manual.

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.