Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by deZender.Net
- * @ deZender (PHP5 Decoder for ionCube Loader)
- *
- * @ Version : 2.0.0.4
- * @ Author : DeZender
- * @ Release on : 21.10.2015
- * @ Official site : http://DeZender.Net
- *
- */
- namespace MGModule\cpanel_extended_functions\controllers\admin {
- class functions extends MGModule\cpanel_extended_functions\controllers\abstractController {
- private static $features = array("emails" => array(0 => "emails", 1 => "emails_forwarders", 2 => "mx"), "login" => array(0 => "cpanel_login", 1 => "webmail_login", 2 => "phpmyadmin", 3 => "rvsitebuilderlogin", 4 => "fileslogin"), "domains" => array(0 => "forward_domains", 1 => "addon_domains", 2 => "subdomains", 3 => "parked_domains"), "statistics" => array(0 => "webalizer", 1 => "awstats", 2 => "analog", 3 => "lastvisitors"), "files" => array(0 => "ftp", 1 => "files", 2 => "backups", 3 => "automaticbackups"), "security" => array(0 => "manage_ssl", 1 => "ssh", 2 => "bans", 3 => "unbanonlogin", 4 => "change_password"), "others" => array(0 => "databases", 1 => "cron"));
- public function indexHTML($input, $vars = array()) {
- $vars["products"] = MGModule\cpanel_extended_functions\mgLibs\MySQL::query("SELECT cpanel_extended_functions_settings.*, tblproducts.id AS pid, tblproducts.name AS product_name, tblproductgroups.name AS product_group FROM tblproducts
- INNER JOIN tblproductgroups ON tblproductgroups.id = tblproducts.gid
- LEFT JOIN cpanel_extended_functions_settings ON tblproducts.id = cpanel_extended_functions_settings.product_id
- WHERE tblproducts.servertype = \"cpanelExtended\"")->fetchAll();
- foreach ($vars["products"] as &$product)
- {
- $features_count = 0;
- foreach (self::$features as $items)
- {
- foreach ($items as $item)
- {
- if (($product[$item] == "on"))
- {
- ++$features_count;
- continue;
- }
- continue;
- }
- continue;
- }
- $product["features_count"] = $features_count;
- continue;
- }
- $vars["apps"] = MGModule\cpanel_extended_functions\mgLibs\custom\AppsHelper::getApps();
- return array("tpl" => "functions", "vars" => $vars);
- }
- public function downloadHTML($input, $vars = array()) {
- $temp_dir = sys_get_temp_dir();
- $iname = (int)$_GET["apps_list"] == 1 ? "softaculous.txt" : "installatron.txt";
- $apps = (int)$_GET["apps_list"] == 1 ? (MGModule\cpanel_extended_functions\mgLibs\custom\AppsHelper::getSoftaculousApps()) : (MGModule\cpanel_extended_functions\mgLibs\custom\AppsHelper::getInstallatronApps());
- $list = (int)$_GET["apps_list"] == 1 ? "SOFTACULPUS APPLICATIONS LIST\r
- " : "INSTALLATRON APPLICATIONS LIST\r
- ";
- $list .= "If you want to automatically install the latest version of the application then you have to use only application name without version number.\r
- ";
- $list .= "Please note that Option Name of Configurable Options must be \"Installation App\". In other case the entire functionality will not work (http://www.docs.modulesgarden.com/CPanel_Extended_For_WHMCS#Configurable_Options_For_Application_Auto_Install).\r
- \r
- ";
- $list .= str_pad("APP NAME WITH VERSION NUMBER", 40) . " | APP NAME WITHOUT VERSION NUMBER\r
- ";
- foreach ($apps as $l)
- {
- $lines[] = str_pad($l["name"] . " " . $l["version"], 40) . " | " . $l["name"] . "\r\n";
- continue;
- }
- sort($lines);
- foreach ($lines as $l)
- {
- $list .= $l;
- continue;
- }
- $tmpfname = tempnam($temp_dir, "al");
- $fp = fopen($tmpfname, "w");
- fwrite($fp, $list);
- fclose($fp);
- if (file_exists($tmpfname))
- {
- header("Content-Description: File Transfer");
- header("Content-Type: application/octet-stream");
- header("Content-Disposition: attachment; filename=\"" . $iname);
- header("Content-Transfer-Encoding: binary");
- header("Expires: 0");
- header("Cache-Control: must-revalidate");
- header("Pragma: public");
- header("Content-Length: " . filesize($tmpfname));
- ob_clean();
- flush();
- ..............................................................
- ........................
- .......
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement