How to Build a New Module for Web Panel
It’s very easy to build a new module for CentOS-WebPanel
Let’s create file named: test2.php
Location of the modules folder is: /usr/local/cwpsrv/htdocs/resources/admin/modules/
<?php
$cpu_info = shell_exec(“cat /proc/cpuinfo”);
echo “This is example module<br>”;
echo “You can edit this file and make new modules based on this file<br>”;
echo “Examples and functions are on our website: centos-webpanel.com<br>”;
echo “<h3>CPU INFO</h3><pre>”.$cpu_info.”</pre>”;
?>
To open this file in CentOS-WebPanel , upload it to the modules folder and use this link path:
http://SERVER_IP:2030/index.php?module=FILE_NAME
eg. http://123.123.123.123:2030/index.php?module=test2
How to add this module to CentOS-WebPanel menu?
It’s easy. Go to include folder and make new file named 3rdparty.php .Through file, you add links one per line.
File Location: /usr/local/cwpsrv/htdocs/resources/admin/include/3rdparty.php
eg.
<li><a href=”index.php?module=test2″><span class=”icon16 icomoon-icon-arrow-right-3″></span>Test2 Module</a></li>