Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- *
- * @ This file is created by http://DeZender.Net
- * @ deZender (PHP7 Decoder for ionCube Encoder)
- *
- * @ Version : 4.0.9.0
- * @ Author : DeZender
- * @ Release on : 08.08.2019
- * @ Official site : http://DeZender.Net
- *
- */
- namespace Plugins\Masslooking;
- require_once Plugins\Masslooking\PLUGINS_PATH . '/' . Plugins\Masslooking\IDNAME . '/vendor/autoload.php';
- if (!defined('APP_VERSION')) {
- exit('Yo, what\'s up?');
- }
- class SettingsController extends \Controller
- {
- const IDNAME = 'masslooking';
- public function process()
- {
- $AuthUser = $this->getVariable('AuthUser');
- $this->setVariable('idname', self::IDNAME);
- if (!$AuthUser || !$AuthUser->isAdmin()) {
- header('Location: ' . APPURL . '/login');
- exit();
- }
- else if ($AuthUser->isExpired()) {
- header('Location: ' . APPURL . '/expired');
- exit();
- }
- require_once PLUGINS_PATH . '/' . $this->getVariable('idname') . '/models/SchedulesModel.php';
- $Schedules = new SchedulesModel();
- $Schedules->setPageSize(20)->setPage(\Input::get('page'))->orderBy('process_id', 'ASC')->fetchData();
- $Schedule = [PLUGINS_PATH . '/' . $this->getVariable('idname') . '/models/ScheduleModel.php', 'Plugins\\Masslooking\\ScheduleModel'];
- require_once PLUGINS_PATH . '/' . $this->getVariable('idname') . '/models/LogsModel.php';
- $L = [PLUGINS_PATH . '/' . $this->getVariable('idname') . '/models/LogModel.php', 'Plugins\\Masslooking\\LogModel'];
- $LL_Ds = [];
- foreach ($Schedules->getDataAs($Schedule) as $sc) {
- $LL = new LogsModel();
- $LL->setPageSize(1)->setPage(1)->where('user_id', '=', $sc->get('user_id'))->where('account_id', '=', $sc->get('account_id'))->orderBy('id', 'DESC')->fetchData();
- foreach ($LL->getDataAs($L) as $l) {
- $LL_Ds[$sc->get('account_id')] = $l->get('date');
- }
- }
- $server_info = NULL;
- exec('/usr/bin/top -b -n 1', $server_info);
- $this->setVariable('Schedules', $Schedules)->setVariable('Schedule', $Schedule)->setVariable('server_info', $server_info)->setVariable('LL_Ds', $LL_Ds);
- $this->setVariable('Settings', settings());
- if (\Input::post('action') == 'save') {
- $this->save();
- }
- else if (\Input::post('action') == 'restart') {
- $this->restart();
- }
- else if (\Input::post('action') == 'bulk-restart') {
- $this->bulk_restart();
- }
- $this->view(PLUGINS_PATH . '/' . self::IDNAME . '/views/settings.php', NULL);
- }
- private function save()
- {
- $Settings = $this->getVariable('Settings');
- if (!$Settings->isAvailable()) {
- $Settings->set('name', 'plugin-' . self::IDNAME . '-settings');
- }
- $maximum_speed = (int) \Input::post('maximum-speed');
- if ($maximum_speed == 'maximum') {
- $maximum_speed = 'maximum';
- }
- else if ($maximum_speed < 10000) {
- $maximum_speed = 10000;
- ..................................................................
- ......................................
- ...........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement