Advertisement
Guest User

Untitled

a guest
Dec 18th, 2020
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.70 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. function getItemIcons()
  15. {
  16. $t = &get_instance();
  17. $t->load->helper('file');
  18. $files = get_dir_file_info(FOLDERPATH . '/assets/images/icon/icon', false);
  19. $icons = [];
  20.  
  21. foreach (array_keys($files) as $file) {
  22. $iconName = strtolower(str_replace('.png', '', $file));
  23. if (!in_array($file, $icons) && is_numeric($iconName)) {
  24. $icons[intval($iconName)] = strtolower($file);
  25. }
  26. }
  27.  
  28. return $icons;
  29. }
  30.  
  31. function isAllowedViewModule($moduleName = '', $type = '')
  32. {
  33. $t = &get_instance();
  34. $moduleName = ($moduleName == '' ? $t->router->fetch_class() : $moduleName);
  35. $user_roles = writeSession('wikiUserRole');
  36.  
  37. if (writeSession('wikiIsAdmin')) {
  38. return true;
  39. }
  40. else if (isset($user_roles->{$moduleName})) {
  41. if (isset($user_roles->{$moduleName}->{$type})) {
  42. return true;
  43. }
  44. }
  45.  
  46. return false;
  47. }
  48.  
  49. function getControllerList()
  50. {
  51. $notFiles = ['index.html', 'Error_404.php', 'Dashboard.php', 'Logs.php', 'Userop.php', 'Users.php', 'Settings.php', 'Sql.php', 'Txt.php', 'Maps.php'];
  52. $t = &get_instance();
  53. $controllers = [];
  54. $t->load->helper('file');
  55. $files = get_dir_file_info(APPPATH . 'controllers', false);
  56.  
  57. foreach (array_keys($files) as $file) {
  58. if (!in_array($file, $notFiles)) {
  59. $controllers[] = strtolower(str_replace('.php', '', $file));
  60. }
  61. }
  62.  
  63. return $controllers;
  64. }
  65.  
  66. function curlPost($postValue)
  67. {
  68. $ch = curl_init();
  69. curl_setopt($ch, CURLOPT_URL, 'https://metin2hazirpanel.com/Index/Control');
  70. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  71. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  72. curl_setopt($ch, CURLOPT_REFERER, base_url());
  73. curl_setopt($ch, CURLOPT_POST, 1);
  74. curl_setopt($ch, CURLOPT_POSTFIELDS, $postValue);
  75. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  76. return curl_exec($ch);
  77. }
  78.  
  79. function clearValueConstant($value)
  80. {
  81. $dangerCharacter = [':', '.', '0x', 'union', 'UNION', 'from', 'FROM', '\'', '%27', '<', '>', '|', ';', '%', '"', '(', ')', '='];
  82. $change = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''];
  83.  
  84. if (is_array($value)) {
  85. $clearValue = [];
  86.  
  87. foreach ($value as $key => $value) {
  88. $clearValue[$key] = str_replace($dangerCharacter, $change, $value);
  89. addslashes(htmlspecialchars(trim(strip_tags($clearValue[$key]))));
  90. }
  91.  
  92. return $clearValue;
  93. }
  94. else {
  95. $clearValue = str_replace($dangerCharacter, $change, $value);
  96. ...................................................................
  97. .......................................
  98. ............
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement