Developer Center

EN

Defining Custom Page and Function for Client Area

The pages/ is the directory where the pages are located. The name of the page that you will create in it must be prefixed with "clientArea-" phrase. You can use (lower/upper case letter, number and "-_" as special character) in the name, and .php must be typed as an extension.

The variables you can use in the content of the PHP file of page:

  • $module variable retrieves the content of your module class.

To link to another page within a page, see the examples below.

Javascript Ajax Method

< a href="javascript:reload_module_content('example-page'); void 0;">Example Custom Page

Page Refreshing Method

< a href="< ?php echo $module->area_link; ? >?m_page=example-page">Example Custom Page

Defining a Custom Function

When naming the function you will create in the class, you must use use_clientArea_ in its prefix.

Custom Function Usage Areas

  • Used to display a content you will reflect without including the site theme.
  • Used to get a process done and get a result when the buttons are clicked.
  • Used to process form data that you created in the custom page.
public function use_clientArea_custom_function()
{
if(Filter::POST("var2"))
{
echo Utility::jencode([
'status' => "successful",
'message' => 'Successful message',
]);
}
else
{
echo "Content Here...";
}

return true;
}

See the following examples for use in the page php file.

Javascript Ajax Method

< a href="javascript:void 0;" onclick="run_transaction('custom_function',this);" data-fields='{"var1":"test1","var2":"test2"}'>Example Custom Function

Page Refreshing Method

< a href="< ?php echo $module->area_link; ? >?inc=panel_operation_method&method=custom_function">Example Custom Function
Single Sign-On Multi-Purpose Client Area Buttons

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2020. All rights reserved.
Join Our Discord Channel
Top