|
End User Documentation
|
3.2.1 - Dynamic Content - - (gpte.cgi)
With the gpte.cgi tool you can generate dynamic content pages easily and with no programming skill requirement.
In order to use gpte.cgi to display a dynamic page at your site, please, follow the steps below:
- Go to edit pages at GPTEngine™ Admin and add a new page.
- Edit the source code of that page as you want.
- Access the page using the URL: <Your Site URL>/cgi-bin/gpte.cgi?page=<Page Name>
For example, if you have created a page named My_Page in the edit pages at GPTEngine™ Admin and your site URL is http://www.mydomain.com, to display that page using gpte.cgi, simply use the URL:
http://www.mydomain.com/cgi-bin/gpte.cgi?page=My_Page
Displaying methods
The gpte.cgi tool offers three ways of displaying a page:
- HTML with GPTE functions:
In this mode you get dynamic HTML pages using gpte.cgi built in functions.
To enable this displaying mode for a page place the tag <!--^gpte_html^-->
in the very beginning of the source code.
- PHP with GPTE functions:
In this displaying mode you combine the power of PHP with the gpte.cgi functions.
Place the tag <!--^gpte_php^-->
in the very beginning of the source code in order to activate this mode of display.
- Static HTML output:
gpte.cgi will display HTML pages statically if none of the above methods is selected.
Note that, in this mode, eventual gpte functions tags in the source code will not be parsed.
Built in functions
Use these functions to insert dynamic content on the pages of your program.
Please , note that all gpte.cgi functions are enclosed with <!--^ ^--> tags.
- HTTP functions
- set_cookie
Use this function to set up a cookie from your site.
Usage: <!--^set_cookie(name,value,expiration,path,domain,secure)^-->
Arguments:
- name: The name of the cookie.
- value: The value of the cookie.
- expiration: The time, in seconds, after that the cookie will expire.
- path: The working path of the cookie. Set 0 to use the current path.
- domain: The working domain of the cookie. Set 0 to use the current domain.
- secure: Set this to 1 if this cookie will be used over a SSL (https) connection. Else, set it to 0.
Location in the source: Inside <body> </body>.
- get_cookie
Use this function to get the value of a cookie.
Usage: <!--^get_cookie(name)^-->
Arguments:
- name: The name of the cookie.
Location in the source: Inside <body> </body>.
- delete_cookie
Use this function to delete a cookie.
Usage: <!--^delete_cookie(name)^-->
Arguments:
- name: The name of the cookie.
Location in the source: Inside <body> </body>.
- get_value
Use this to retrive the value of a variable-value pair sent to the page using post or get method.
Usage: <!--^get_value(variable)^-->
Arguments:
- variable: The name of the variable.
Location in the source: Anywhere in the source file.
- get_env
Use this to retrive the value of enviroment variables like REMOTE_ADDR or HTTP_USER_AGENT.
Usage: <!--^get_env(variable)^-->
Arguments:
- variable: The name of environment variable.
Location in the source: Anywhere in the source file.
- http_redirect
Use this to redirect the viewer to another page after a delay.
Usage: <!--^http_redirect(url,delay)^-->
Arguments:
- url: The URL of the page.
- delay: The delay in seconds before the redirection.
Location in the source: Inside <body> </body>.
- Ad functions
- show_ptc
Use this to display a specific PTC campaign ad.
Usage: <!--^show_ptc(ptc,type)^-->
Arguments:
- ptc: The name of the PTC campaign.
- type: The type of the ad (banner,html,popup,popunder or iframe).
Location in the source: Inside <body> </body>.
- show_random_ptc
Use this to display a random PTC campaign ad to users.
Usage: <!--^show_random_ptc(type)^-->
Arguments:
- type: The type of the ad (banner,html,popup,popunder or iframe).
Location in the source: Inside <body> </body>.
- show_rotating_content
Use this to display random PTC campaign ads from a specific content rotator to users.
Usage: <!--^show_rotating_content(rotator,type)^-->
Arguments:
- rotator: The name of the content rotator.
- type: The type of the ad (banner,html,popup,popunder or iframe).
Location in the source: Inside <body> </body>.
- Users functions
- user_info
Use this to show information from the users table, like Username or Signup_Time.
Usage: <!--^user_info(info)^-->
Arguments:
- info: The field information which you want to retrieve.
Location in the source: Anywhere in the source code.
- user_upline
Use this to show the user referrer in a given level of his/her upline.
Usage: <!--^user_upline(level)^-->
Arguments:
- level: The level in the user upline.
Location in the source: Inside <body> </body>.
- user_referrals
Use this to show the number of referrals in a given level of the user downline.
Usage: <!--^user_referrals(level)^-->
Arguments:
- level: The level in the user downline.
Location in the source: Inside <body> </body>.
- user_show_referrals
Use this to show the a list of referrals in a given level of the user downline.
Usage: <!--^user_show_referrals(level,count,order)^-->
Arguments:
- level: The level in the user downline.
- count: The number of referrals to list.
- order: Select listing order using first or last.
Location in the source: Inside <body> </body>.
- user_requested_payouts
Use this to show the a list of the user last requested payouts.
Usage: <!--^user_requested_payouts(count,table_porpeties)^-->
Arguments:
- count: The number of requested payouts to list.
- table_porpeties: The poperties (width, border, style, etc) of the table.
Location in the source: Inside <body> </body>.
- user_to_user_referral_link
Use this to show the user link to refer affiliates.
Usage: <!--^user_to_user_referral_link^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- user_to_advertiser_referral_link
Use this to show the user link to refer advertisers.
Usage: <!--^user_to_advertiser_referral_link^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- user_last_ptcs
Use this to show the the user last clicked PTC campaigns.
Usage: <!--^user_last_ptcs(count,table_porpeties)^-->
Arguments:
- count: The number of clicked PTC campaigns to list.
- table_porpeties: The poperties (width, border, style, etc) of the table.
Location in the source: Inside <body> </body>.
- user_last_ptrs
Use this to show the the user last clicked PTR campaigns.
Usage: <!--^user_last_ptrs(count,table_porpeties)^-->
Arguments:
- count: The number of clicked PTR campaigns to list.
- table_porpeties: The poperties (width, border, style, etc) of the table.
Location in the source: Inside <body> </body>.
- user_last_ptss
Use this to show the the user last visited PTS campaigns.
Usage: <!--^user_last_ptss(count,table_porpeties)^-->
Arguments:
- count: The number of visited PTS campaigns to list.
- table_porpeties: The poperties (width, border, style, etc) of the table.
Location in the source: Inside <body> </body>.
- user_downline_cash
Use this to show the user cash coming from a given downline level.
Usage: <!--^user_downline_cash(level)^-->
Arguments:
- level: The level in the user downline.
Location in the source: Anywhere in the source code.
- user_downline_points
Use this to show the user points coming from a given downline level.
Usage: <!--^user_downline_points(level)^-->
Arguments:
- level: The level in the user downline.
Location in the source: Anywhere in the source code.
- user_downline_total_cash
Use this to show the user total cash coming from a given downline level since signup.
Usage: <!--^user_downline_total_cash(level)^-->
Arguments:
- level: The level in the user downline.
Location in the source: Anywhere in the source code.
- user_downline_total_points
Use this to show the user total points coming from a given downline level since signup.
Usage: <!--^user_downline_total_points(level)^-->
Arguments:
- level: The level in the user downline.
Location in the source: Anywhere in the source code.
- user_available_ptcs
Use this to list all currently available PTC campaigns to the user.
Usage: <!--^user_available_ptcs(type,separator)^-->
Arguments:
- type: The ad type the PTC campaign (banner, HTML or iFrame).
- separator: The separator of the ads in the source code (<br>, for example).
Location in the source: Inside <body> </body>.
- user_referred_advertisers
Use this to show the number of user referred advertisers.
Usage: <!--^user_referred_advertisers^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- user_show_referrer_advertisers
Use this to list the user referred advertisers.
Usage: <!--^user_show_referred_advertisers(count,order,div_settings)^-->
Arguments:
- count: The number of referred advertisers to list.
- order: The order for listing, can be first or last.
- div_settings: The porpeties of the <div> containing the list.
Location in the source: Inside <body> </body>.
- user_inbox
Use this to show the user inbox messages. The table containing all messages are hidden and require javascript manipulation to generate a visible interface.
Usage: <!--^user_inbox^-->
Arguments: none.
Location in the source: Inside <body> </body>.
- Advertisers functions
- advertiser_info
Use this to show information from the advertisers table, like Business_Name or E_Mail.
Usage: <!--^advertiser_info(info)^-->
Arguments:
- info: The field information which you want to retrieve.
Location in the source: Anywhere in the source code.
- advertiser_purchased_products
Use this to list the advertiser packages purchases in your program.
Usage: <!--^advertiser_purchased_products(table_settings)^-->
Arguments:
- table_settings: The porpeties of the table containing the data.
Location in the source: Inside <body> </body>.
- advertiser_ptcs
Use this to list the PTC campaigns of the advertiser .
Usage: <!--^advertiser_ptcs(table_settings)^-->
Arguments:
- table_settings: The porpeties of the table containing the data.
Location in the source: Inside <body> </body>.
- advertiser_ptrs
Use this to list the PTR campaigns of the advertiser .
Usage: <!--^advertiser_ptrs(table_settings)^-->
Arguments:
- table_settings: The porpeties of the table containing the data.
Location in the source: Inside <body> </body>.
- advertiser_ptss
Use this to list the PTS campaigns of the advertiser .
Usage: <!--^advertiser_ptss(table_settings)^-->
Arguments:
- table_settings: The porpeties of the table containing the data.
Location in the source: Inside <body> </body>.
- advertiser_referral_link
Use this to show the advertiser link to refer advertisers.
Usage: <!--^advertiser_referral_link^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- advertiser_referrals
Use this to list the advertiser referrals.
Usage: <!--^advertiser_referrals^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- advertiser_total_spend
Use this to get the total cash spent in package purchases by the advertiser since signup.
Usage: <!--^advertiser_total_spend^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- advertiser_inbox
Use this to show the advertiser inbox messages. The table containing all messages are hidden and require javascript manipulation to generate a visible interface.
Usage: <!--^advertiser_inbox^-->
Arguments: none.
Location in the source: Inside <body> </body>.
- Site functions
- site_name
Use this to show your site name.
Usage: <!--^site_name^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- site_email
Use this to show your site e-mail.
Usage: <!--^site_email^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- site_reply_email
Use this to show your site e-mail for replying.
Usage: <!--^site_reply_email^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- site_url
Use this to show your site URL.
Usage: <!--^site_url^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- site_copyright_notice
Use this to show your site copyright notice.
Usage: <!--^site_copyright_notice^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- site_administrator
Use this to show your site administrator name.
Usage: <!--^site_administrator^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- site_administrator_email
Use this to show your site administrator e-mail.
Usage: <!--^site_administrator_email^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- logged_users
Use this to show the number of online users.
Usage: <!--^logged_users^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- logged_advertisers
Use this to show the number of online advertisers.
Usage: <!--^logged_advertisers^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- online_visitors
Use this to show the number of online visitors of your site.
Usage: <!--^online_visitors^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- total_users
Use this to show the number of users of your program.
Usage: <!--^total_users^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- total_advertisers
Use this to show the number of advertisers of your program.
Usage: <!--^total_advertisers^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- Time and local functions
- system_time
Use this to show the system time in the format hh:mm:ss.
Usage: <!--^system_time^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- system_date
Use this to show the system date in the format YYY:MM:DD.
Usage: <!--^system_date^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- system_datetime
Use this to show the system datetime in the format YYY:MM:DD hh:mm:ss.
Usage: <!--^system_datetime^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- system_day_of_week
Use this to show the system date day of week.
Usage: <!--^system_day_of_week^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- system_day_of_month
Use this to show the system date day of month.
Usage: <!--^system_day_of_month^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- system_month
Use this to show the system date month.
Usage: <!--^system_month^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- system_month_name
Use this to show the system date name of the month.
Usage: <!--^system_month_name^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- system_year
Use this to show the system date year.
Usage: <!--^system_year^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- country_name
Use this to show the country name of the page viewer.
Usage: <!--^country_name^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- country_two_digit_code
Use this to show the country two digit code of the page viewer (like US or UK, for example).
Usage: <!--^country_two_digit_code^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- country_three_digit_code
Use this to show the ccountry three digit code of the page viewer (like CAN or ARG, for example).
Usage: <!--^country_three_digit_code^-->
Arguments: none.
Location in the source: Anywhere in the source code.
- country_flag
Use this to show the country flag of the page viewer (like
or
, for example).
Usage: <!--^country_flag^-->
Arguments: none.
Location in the source: Inside <body> </body>.
- Window functions
- alert
Use this to show a javascript alert box message after some time.
Usage: <!--^alert(message,delay)^-->
Arguments:
- message: The text that will be exhibited in the box.
- delay: The time after what the message will be displayed.
Location in the source: Inside <body> </body>.
- status
Use this to show a message in the status bar after some time.
Usage: <!--^status(message,delay)^-->
Arguments:
- message: The text that will be exhibited in the status bar.
- delay: The time, in seconds, after what the message will be displayed.
Location in the source: Inside <body> </body>.
- blur
Use this to remove the focus of the current window after some time.
Usage: <!--^blur(delay)^-->
Arguments:
- delay: The time after what the window will lose focus.
Location in the source: Inside <body> </body>.
- focus
Use this to focus the current window after some time.
Usage: <!--^focus(delay)^-->
Arguments:
- delay: The time after what the window will get focused.
Location in the source: Inside <body> </body>.
- close
Use this to close the window after some time.
Usage: <!--^close(delay)^-->
Arguments:
- delay: The time after what the window will close.
Location in the source: Inside <body> </body>.
- refresh
Use this to reload the current window after some time.
Usage: <!--^refresh(delay)^-->
Arguments:
- delay: The time after what the window will be refreshed.
Location in the source: Inside <body> </body>.
- new_window
Use this to open an new window after some time.
Usage: <!--^new_window(url,delay)^-->
Arguments:
- url: The URL of the new window.
- delay: The time after what the window will lose focus.
Location in the source: Inside <body> </body>.
- popup
Use this to create a popup window.
Usage: <!--^popup(url,width,height,left,top)^-->
Arguments:
- url: The URL of the new window.
- width: The width of the popup window in pixels.
- height: The height of the popup window in pixels.
- left: The left margin of the popup window in pixels.
- top: The top margin of the popup window in pixels.
Location in the source: Inside <body> </body>.
- popunder
Use this to create a popunder window.
Usage: <!--^popunder(url,width,height,left,top)^-->
Arguments:
- url: The URL of the new window.
- width: The width of the popunder window in pixels.
- height: The height of the popunder window in pixels.
- left: The left margin of the popunder window in pixels.
- top: The top margin of the popunder window in pixels.
Location in the source: Inside <body> </body>.
- Misc functions
- turing_number
Use this to show a turing number in the page.
Usage: <!--^turing_number(digits,width,height,expiration)^-->
Arguments:
- digits: The number of digits of the number.
- width: The width of turing number in pixels.
- height: The height of the turing number in pixels.
- expiration: The time, in seconds, after what this turing number will lost its validity.
Location in the source: Inside <body> </body>.
- mysql_query
Use this to enter a MySQL® query.
Usage: <!--^mysql_query(query)^-->
Arguments:
- query: The MySQL® query you want to enter.
Location in the source: Anywhere in the source code.
- mysql_result
Use this to retrieve a MySQL® query result.
Usage: <!--^mysql_result(row,column)^-->
Arguments:
- row: The row number of the last query result.
- column: The column number of the last query result.
Location in the source: Anywhere in the source code.