Advertisement
Guest User

Untitled

a guest
Nov 9th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.88 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.0.9.0
  8. * @ Author : DeZender
  9. * @ Release on : 08.08.2019
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace Plugins\Masslooking;
  15.  
  16. require_once Plugins\Masslooking\PLUGINS_PATH . '/' . Plugins\Masslooking\IDNAME . '/vendor/autoload.php';
  17.  
  18. if (!defined('APP_VERSION')) {
  19. exit('Yo, what\'s up?');
  20. }
  21.  
  22. class SettingsController extends \Controller
  23. {
  24. const IDNAME = 'masslooking';
  25.  
  26. public function process()
  27. {
  28. $AuthUser = $this->getVariable('AuthUser');
  29. $this->setVariable('idname', self::IDNAME);
  30. if (!$AuthUser || !$AuthUser->isAdmin()) {
  31. header('Location: ' . APPURL . '/login');
  32. exit();
  33. }
  34. else if ($AuthUser->isExpired()) {
  35. header('Location: ' . APPURL . '/expired');
  36. exit();
  37. }
  38.  
  39. require_once PLUGINS_PATH . '/' . $this->getVariable('idname') . '/models/SchedulesModel.php';
  40. $Schedules = new SchedulesModel();
  41. $Schedules->setPageSize(20)->setPage(\Input::get('page'))->orderBy('process_id', 'ASC')->fetchData();
  42. $Schedule = [PLUGINS_PATH . '/' . $this->getVariable('idname') . '/models/ScheduleModel.php', 'Plugins\\Masslooking\\ScheduleModel'];
  43. require_once PLUGINS_PATH . '/' . $this->getVariable('idname') . '/models/LogsModel.php';
  44. $L = [PLUGINS_PATH . '/' . $this->getVariable('idname') . '/models/LogModel.php', 'Plugins\\Masslooking\\LogModel'];
  45. $LL_Ds = [];
  46.  
  47. foreach ($Schedules->getDataAs($Schedule) as $sc) {
  48. $LL = new LogsModel();
  49. $LL->setPageSize(1)->setPage(1)->where('user_id', '=', $sc->get('user_id'))->where('account_id', '=', $sc->get('account_id'))->orderBy('id', 'DESC')->fetchData();
  50.  
  51. foreach ($LL->getDataAs($L) as $l) {
  52. $LL_Ds[$sc->get('account_id')] = $l->get('date');
  53. }
  54. }
  55.  
  56. $server_info = NULL;
  57. exec('/usr/bin/top -b -n 1', $server_info);
  58. $this->setVariable('Schedules', $Schedules)->setVariable('Schedule', $Schedule)->setVariable('server_info', $server_info)->setVariable('LL_Ds', $LL_Ds);
  59. $this->setVariable('Settings', settings());
  60.  
  61. if (\Input::post('action') == 'save') {
  62. $this->save();
  63. }
  64. else if (\Input::post('action') == 'restart') {
  65. $this->restart();
  66. }
  67. else if (\Input::post('action') == 'bulk-restart') {
  68. $this->bulk_restart();
  69. }
  70.  
  71. $this->view(PLUGINS_PATH . '/' . self::IDNAME . '/views/settings.php', NULL);
  72. }
  73.  
  74. private function save()
  75. {
  76. $Settings = $this->getVariable('Settings');
  77.  
  78. if (!$Settings->isAvailable()) {
  79. $Settings->set('name', 'plugin-' . self::IDNAME . '-settings');
  80. }
  81.  
  82. $maximum_speed = (int) \Input::post('maximum-speed');
  83.  
  84. if ($maximum_speed == 'maximum') {
  85. $maximum_speed = 'maximum';
  86. }
  87. else if ($maximum_speed < 10000) {
  88. $maximum_speed = 10000;
  89. ..................................................................
  90. ......................................
  91. ...........
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement