Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 463 Vote(s) - 3.58 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WHMCS: cannot access WHMCS's constants, autoloader, like namespacing stuff, etc if an addon module file is accessed directly

#1
First of all the goal is to create a new whole php file/page on the admin page through addon module because from the `_output()` function, whmcs will insert header, sidebar and footer and AFAIK, we cannot remove it.

The workaround I've done is to create a new PHP file from my custom addon module, thus a (whole) new page is created but the issue is cannot access WHMCS's constants, autoloader, like namespacing stuff, etc because the file is accessed directly. In the browser, I access it on this url: `{rooturl}/modules/addons/my_custom_addon_module/pages/my_page.php`

To get an idea, this is a basic structure of the file (smarty template):
```html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<span>{$myVar}</span>
</body>
</html>
```

What's the best solution for this?
Reply



Forum Jump:


Users browsing this thread:
2 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through