⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.4
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-horde
/
ingo
/
lib
/
Basic
/
View File Name :
Script.php
* @author Jan Schneider
* @author Michael Slusarz
* @category Horde * @copyright 2002-2017 Horde LLC * @license http://www.horde.org/licenses/apache ASL * @package Ingo */ class Ingo_Basic_Script extends Ingo_Basic_Base { /** */ protected function _init() { global $injector, $notification, $session; /* Redirect if script updating is not available. */ $script = $injector->getInstance('Ingo_Factory_Script'); if (!$script->hasFeature('script_file')) { Ingo_Basic_Filters::url()->redirect(); } /* Generate the script. */ $scripts = array(); foreach ($script->createAll() as $script) { $scripts = array_merge($scripts, $script->generate()); } /* Token checking. */ $actionID = $this->_checkToken(array( 'action_activate', 'action_deactivate' )); /* Activate/deactivate script if requested. */ switch ($actionID) { case 'action_activate': case 'action_deactivate': if (!empty($scripts)) { try { Ingo_Script_Util::activate($scripts, $actionID == 'action_deactivate'); } catch (Ingo_Exception $e) { $notification->push($e); } } break; case 'show_active': $scripts = array(); foreach ($session->get('ingo', 'backend/transport', Horde_Session::TYPE_ARRAY) as $transport) { try { $backend = $injector->getInstance('Ingo_Factory_Transport')->create($transport); if (method_exists($backend, 'getScript')) { $scripts[] = $backend->getScript(); } } catch (Horde_Exception_NotFound $e) { } catch (Ingo_Exception $e) { $notification->push($e); } } break; } /* Prepare the view. */ $view = new Horde_View(array( 'templatePath' => INGO_TEMPLATES . '/basic/script' )); $view->addHelper('Text'); if (empty($scripts)) { $view->scriptexists = false; } else { $view->scriptexists = true; foreach ($scripts as &$script) { $script['lines'] = preg_split('(\r\n|\n|\r)', trim($script['script'])); $script['width'] = strlen(count($script['lines'])); } } $view->scripturl = $this->_addToken(self::url()); $view->showactivate = ($actionID != 'show_active'); if ($view->scriptexists) { $view->scripts = $scripts; } $this->header = _("Filter Script Display"); $this->output = $view->render('script'); } /** */ static public function url(array $opts = array()) { return Horde::url('basic.php')->add('page', 'script'); } }