Examples of common built-in functions for Tongda OA

Source: Internet
Author: User

Tongda OA system built up a large number of functions, simplifying the development of the program, here from the two Development manual section to select some examples, through the actual program run debugging to give you a brief introduction.
built-in function reference First, utility.php 1. Button_back Display a return button<?phpinclude_once ("inc/utility.php"); Make a function file reference first
button_back ($HTML _charset = ' GBK '); Using Functions?>Operation Result:

2, get_client_ip Get the client IP address of the user

<?phpinclude_once ("inc/utility.php");
echo get_client_ip ();?>Operation Result:

Second,utility_all.php 1, is_ip to determine whether a string is a legitimate IP address <?phpinclude_once ("inc/utility_all.php");Echo is_ip ("10.0.0.1");?>

2, Add_log ($TYPE, $REMARK, $OPERATOR) Add System log

Parameters:

$TYPE// log type Code, refer to "System log type" under System code settings

$REMARK// notes

$OPERATOR// user name of the user who generated the log, typically the current user

<?phpinclude_once ("inc/utility_all.php");
add_log (' login log ', ' Test login log ', ' admin ');?>

3, Dept_long_name ($DEPT _id) Get Department ID to be $DEPT _id the multi-level department name

Parameters: $DEPT _id// Department ID

<?phpinclude_once ("inc/utility_all.php");
Echo dept_long_name (1); ?>
In addition to some of the above-mentioned functions, OA also provides server file management related functions, upload attachment processing related functions, SMS functions, these relatively less use, you can further find two development manuals.

Examples of common built-in functions for Tongda OA

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.