Guest User

Untitled

a guest
Sep 7th, 2020
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 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.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. namespace Plugins\MassVoting;
  15.  
  16. require_once PLUGINS_PATH . '/' . IDNAME . '/vendor/autoload.php';
  17.  
  18. if (!defined('APP_VERSION')) {
  19. exit('Yo, what\'s up?');
  20. }
  21.  
  22. class IndexController extends \Controller
  23. {
  24. const IDNAME = 'massvoting';
  25.  
  26. public function process()
  27. {
  28. $AuthUser = $this->getVariable('AuthUser');
  29. $this->setVariable('idname', self::IDNAME);
  30.  
  31. if (!$AuthUser) {
  32. header('Location: ' . APPURL . '/login');
  33. exit();
  34. }
  35. else if ($AuthUser->isExpired()) {
  36. header('Location: ' . APPURL . '/expired');
  37. exit();
  38. }
  39.  
  40. $user_modules = $AuthUser->get('settings.modules');
  41. if (!is_array($user_modules) || !in_array(self::IDNAME, $user_modules)) {
  42. header('Location: ' . APPURL . '/post');
  43. exit();
  44. }
  45.  
  46. $Accounts = \Controller::model('Accounts');
  47. $Accounts->setPageSize(500)->setPage(\Input::get('page'))->where('user_id', '=', $AuthUser->get('id'));
  48. $search_query = \Input::get('q');
  49.  
  50. if (!empty($search_query)) {
  51. $search_query = trim($search_query);
  52. $Accounts->where('username', 'LIKE', $search_query . '%');
  53. }
  54.  
  55. $Accounts->orderBy('id', 'DESC')->fetchData();
  56. ......................................................................
  57. ......................................
  58. ..............
Add Comment
Please, Sign In to add comment