Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
Apache/2.4.59 (Debian)
: 10.2.73.233 | : 18.119.235.107
Cant Read [ /etc/named.conf ]
5.6.40-64+0~20230107.71+debian10~1.gbp673146
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
ifk /
web /
prado4.3.2 /
Web /
UI /
[ HOME SHELL ]
Name
Size
Permission
Action
ActiveControls
[ DIR ]
drwxr-xr-x
JuiControls
[ DIR ]
drwxr-xr-x
WebControls
[ DIR ]
drwxr-xr-x
IBindable.php
527
B
-rw-r--r--
IBroadcastEventReceiver.php
941
B
-rw-r--r--
IButtonControl.php
2.5
KB
-rw-r--r--
INamingContainer.php
467
B
-rw-r--r--
IPageStatePersister.php
888
B
-rw-r--r--
IPostBackDataHandler.php
1.28
KB
-rw-r--r--
IPostBackEventHandler.php
830
B
-rw-r--r--
IRenderable.php
618
B
-rw-r--r--
ISurroundable.php
887
B
-rw-r--r--
ITemplate.php
761
B
-rw-r--r--
ITheme.php
621
B
-rw-r--r--
IValidatable.php
830
B
-rw-r--r--
IValidator.php
1.13
KB
-rw-r--r--
TBroadcastEventParameter.php
1.49
KB
-rw-r--r--
TCachePageStatePersister.php
6.17
KB
-rw-r--r--
TClientScriptManager.php
27.57
KB
-rw-r--r--
TClientSideOptions.php
2.24
KB
-rw-r--r--
TCommandEventParameter.php
1.26
KB
-rw-r--r--
TCompositeControl.php
950
B
-rw-r--r--
TCompositeLiteral.php
2.87
KB
-rw-r--r--
TControl.php
55.29
KB
-rw-r--r--
TControlAdapter.php
3.67
KB
-rw-r--r--
TControlCollection.php
2.47
KB
-rw-r--r--
TEmptyControlCollection.php
1.24
KB
-rw-r--r--
TEventContent.php
1.38
KB
-rw-r--r--
TForm.php
4.45
KB
-rw-r--r--
THtmlWriter.php
5.32
KB
-rw-r--r--
TPage.php
35.57
KB
-rw-r--r--
TPageStateFormatter.php
2.69
KB
-rw-r--r--
TPageStatePersister.php
1.66
KB
-rw-r--r--
TSessionPageStatePersister.php
3.93
KB
-rw-r--r--
TSkinTemplate.php
1.38
KB
-rw-r--r--
TTemplate.php
35.29
KB
-rw-r--r--
TTemplateControl.php
9.48
KB
-rw-r--r--
TTemplateControlInheritable.ph...
3.38
KB
-rw-r--r--
TTemplateManager.php
4.2
KB
-rw-r--r--
TTheme.php
10.8
KB
-rw-r--r--
TThemeManager.php
5.6
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : TTemplateControl.php
<?php /** * TTemplateControl class file. * * @author Qiang Xue <qiang.xue@gmail.com> * @link https://github.com/pradosoft/prado * @license https://github.com/pradosoft/prado/blob/master/LICENSE */ namespace Prado\Web\UI; use Prado\Prado; use Prado\Exceptions\TConfigurationException; use Prado\Exceptions\TInvalidDataValueException; use Prado\Web\UI\WebControls\TContent; use Prado\Web\UI\WebControls\TContentPlaceHolder; use Prado\Web\UI\WebControls\TCheckBox; use Prado\Web\UI\WebControls\TDatePicker; use Prado\Web\UI\WebControls\TListControl; use Prado\Web\UI\WebControls\TTextBox; use Prado\Data\ActiveRecord\TActiveRecord; /** * TTemplateControl class. * TTemplateControl is the base class for all controls that use templates. * By default, a control template is assumed to be in a file under the same * directory with the control class file. They have the same file name and * different extension name. For template file, the extension name is ".tpl". * * @author Qiang Xue <qiang.xue@gmail.com> * @since 3.0 * @method \Prado\Web\Services\TPageService getService() */ class TTemplateControl extends TCompositeControl { /** * template file extension. */ public const EXT_TEMPLATE = '.tpl'; /** * @var ITemplate the parsed template structure shared by the same control class */ private static $_template = []; /** * @var ITemplate the parsed template structure specific for this control instance */ private $_localTemplate; /** * @var TTemplateControl the master control if any */ private $_master; /** * @var string master control class name */ private $_masterClass = ''; /** * @var array list of TContent controls */ private $_contents = []; /** * @var array list of TContentPlaceHolder controls */ private $_placeholders = []; /** * Returns the template object associated with this control object. * @return null|TTemplate the parsed template, null if none */ public function getTemplate() { if ($this->_localTemplate === null) { $class = get_class($this); if (!isset(self::$_template[$class])) { self::$_template[$class] = $this->loadTemplate(); } return self::$_template[$class]; } else { return $this->_localTemplate; } } /** * Sets the parsed template. * Note, the template will be applied to the whole control class. * This method should only be used by framework and control developers. * @param \Prado\Web\UI\ITemplate $value the parsed template */ public function setTemplate($value) { $this->_localTemplate = $value; } /** * @return bool whether this control is a source template control. * A source template control loads its template from external storage, * such as file, db, rather than from within another template. */ public function getIsSourceTemplateControl() { if (($template = $this->getTemplate()) !== null) { return $template->getIsSourceTemplate(); } else { return false; } } /** * @return string the directory containing the template. Empty if no template available. */ public function getTemplateDirectory() { if (($template = $this->getTemplate()) !== null) { return $template->getContextPath(); } else { return ''; } } /** * Loads the template associated with this control class. * @return \Prado\Web\UI\ITemplate the parsed template structure */ protected function loadTemplate() { Prado::trace("Loading template " . get_class($this), '\Prado\Web\UI\TTemplateControl'); $template = $this->getService()->getTemplateManager()->getTemplateByClassName(get_class($this)); return $template; } /** * Creates child controls. * This method is overridden to load and instantiate control template. * This method should only be used by framework and control developers. */ public function createChildControls() { if ($tpl = $this->getTemplate()) { foreach ($tpl->getDirective() as $name => $value) { if (is_string($value)) { $this->setSubProperty($name, $value); } else { throw new TConfigurationException('templatecontrol_directive_invalid', get_class($this), $name); } } $tpl->instantiateIn($this); } } /** * Registers a content control. * @param string $id ID of the content * @param TContent $object */ public function registerContent($id, TContent $object) { if (isset($this->_contents[$id])) { throw new TConfigurationException('templatecontrol_contentid_duplicated', $id); } else { $this->_contents[$id] = $object; } } /** * Registers a content placeholder to this template control. * This method should only be used by framework and control developers. * @param string $id placeholder ID * @param TContentPlaceHolder $object placeholder control */ public function registerContentPlaceHolder($id, TContentPlaceHolder $object) { if (isset($this->_placeholders[$id])) { throw new TConfigurationException('templatecontrol_placeholderid_duplicated', $id); } else { $this->_placeholders[$id] = $object; } } /** * @return string master class name (in namespace form) */ public function getMasterClass() { return $this->_masterClass; } /** * @param string $value master control class name (in namespace form) */ public function setMasterClass($value) { $this->_masterClass = $value; } /** * @return null|TTemplateControl master control associated with this control, null if none */ public function getMaster() { return $this->_master; } /** * Injects all content controls (and their children) to the corresponding content placeholders. * This method should only be used by framework and control developers. * @param string $id ID of the content control * @param TContent $content the content to be injected */ public function injectContent($id, $content) { if (isset($this->_placeholders[$id])) { $placeholder = $this->_placeholders[$id]; $controls = $placeholder->getParent()->getControls(); $loc = $controls->remove($placeholder); $controls->insertAt($loc, $content); } else { if ($this->_masterClass !== '') { $this->_contents[$id] = $content; } else { throw new TConfigurationException('templatecontrol_placeholder_inexistent', $id); } } } /** * Performs the OnInit step for the control and all its child controls. * This method overrides the parent implementation * by ensuring child controls are created first, * and if master class is set, master will be applied. * Only framework developers should use this method. * @param \Prado\Web\UI\TControl $namingContainer the naming container control */ protected function initRecursive($namingContainer = null) { $this->ensureChildControls(); if ($this->_masterClass !== '') { $master = Prado::createComponent($this->_masterClass); if (!($master instanceof TTemplateControl)) { throw new TInvalidDataValueException('templatecontrol_mastercontrol_invalid'); } $this->_master = $master; $this->getControls()->clear(); $this->getControls()->add($master); $master->ensureChildControls(); foreach ($this->_contents as $id => $content) { $master->injectContent($id, $content); } } elseif (!empty($this->_contents)) { throw new TConfigurationException('templatecontrol_mastercontrol_required', get_class($this)); } parent::initRecursive($namingContainer); } /** * Function to update view controls with data in a given AR object. * View controls and AR object need to have the same name in IDs and Attrs respectively. * @param \Prado\Data\ActiveRecord\TActiveRecord $arObj * @param bool $throwExceptions Wheter or not to throw exceptions * @author Daniel Sampedro <darthdaniel85@gmail.com> */ public function tryToUpdateView($arObj, $throwExceptions = false) { $objAttrs = get_class_vars(get_class($arObj)); foreach (array_keys($objAttrs) as $key) { try { if ($key != "RELATIONS") { $control = $this->{$key}; if ($control instanceof TTextBox) { $control->setText($arObj->{$key}); } elseif ($control instanceof TCheckBox) { $control->setChecked((bool) $arObj->{$key}); } elseif ($control instanceof TDatePicker) { $control->setDate($arObj->{$key}); } } else { foreach ($objAttrs["RELATIONS"] as $relKey => $relValues) { $relControl = $this->{$relKey}; switch ($relValues[0]) { case TActiveRecord::BELONGS_TO: case TActiveRecord::HAS_ONE: $relControl->setText($arObj->{$relKey}); break; case TActiveRecord::HAS_MANY: if ($relControl instanceof TListControl) { $relControl->setDataSource($arObj->{$relKey}); $relControl->dataBind(); } break; } } break; } } catch (\Exception $ex) { if ($throwExceptions) { throw $ex; } } } } /** * Function to try to update an AR object with data in view controls. * @param \Prado\Data\ActiveRecord\TActiveRecord $arObj * @param bool $throwExceptions Wheter or not to throw exceptions * @author Daniel Sampedro <darthdaniel85@gmail.com> */ public function tryToUpdateAR($arObj, $throwExceptions = false) { $objAttrs = get_class_vars(get_class($arObj)); foreach (array_keys($objAttrs) as $key) { try { if ($key == "RELATIONS") { break; } $control = $this->{$key}; if ($control instanceof TTextBox) { $arObj->{$key} = $control->getText(); } elseif ($control instanceof TCheckBox) { $arObj->{$key} = $control->getChecked(); } elseif ($control instanceof TDatePicker) { $arObj->{$key} = $control->getDate(); } } catch (\Exception $ex) { if ($throwExceptions) { throw $ex; } } } } }
Close