Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP8 Decoder for ionCube Encoder)
- *
- * @ Version : 8.2.0.1
- * @ Author : DeZender
- * @ Release on : 27.10.2023
- * @ Official site : http://DeZender.Net
- *
- */
- function get_all_domains()
- {
- $cmd = '/usr/sbin/whmapi1 get_domain_info --output=json';
- $output = shell_exec($cmd);
- $whmdata = json_decode($output, true);
- $domains = $whmdata['data']['domains'];
- $data = [];
- foreach ($domains as $domdata) {
- if (!stringStartsWith($domdata['domain'], '*')) {
- $data[$domdata['domain']]['domain'] = $domdata['domain'];
- $data[$domdata['domain']]['user'] = $domdata['user'];
- $data[$domdata['domain']]['docroot'] = $domdata['docroot'];
- $data[$domdata['domain']]['domain_type'] = $domdata['domain_type'];
- }
- }
- return $data;
- }
- function list_users()
- {
- $cmd = '/usr/sbin/whmapi1 list_users --output=json';
- $output = shell_exec($cmd);
- $whmdata = json_decode($output, true);
- $users = $whmdata['data']['users'];
- asort($users);
- $data = [];
- foreach ($users as $user) {
- if ($user != 'root') {
- $data[] = $user;
- }
- }
- return $data;
- }
- function settings()
- {
- $settings = [];
- if (file_exists('/etc/cpremote/data/settings.json')) {
- $data = file_get_contents('/etc/cpremote/data/settings.json');
- $settings = json_decode($data, true);
- }
- else {
- $settings = [];
- }
- return $settings;
- }
- function get_all_schedule()
- {
- $data = [];
- if (is_dir('/etc/cpremote/schedule/')) {
- $schedules = array_diff(scandir('/etc/cpremote/schedule/'), ['.', '..']);
- }
- else {
- $schedules = [];
- }
- foreach ($schedules as $s) {
- if (stringEndsWith($s, '.json')) {
- $job = explode('.', $s);
- $data[$job[0]] = '/etc/cpremote/schedule/' . $s;
- }
- }
- return $data;
- }
- function search_backups($id)
- {
- $cmd = '/usr/local/cpremote/bin/cpremotectl backup search ' . $id . ' output=json';
- $output = shell_exec($cmd);
- ...............................................................................
- ..........................................
- ................
Advertisement
Add Comment
Please, Sign In to add comment