| Server IP : 195.130.67.5 / Your IP : 216.73.216.231 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/icd/administrator/components/com_jce/classes/ |
Upload File : |
<?php
jimport('joomla.application.component.view');
if (!class_exists('WFViewBase')) {
if (interface_exists('JView')) {
abstract class WFViewBase extends JViewLegacy {
}
} else {
abstract class WFViewBase extends JView {
}
}
}
class WFView extends WFViewBase {
/**
* Array of linked scripts
*
* @var array
*/
protected $scripts = array();
/**
* Array of linked style sheets
*
* @var array
*/
protected $stylesheets = array();
/**
* Array of included style declarations
*
* @var array
*/
protected $styles = array();
/**
* Array of scripts placed in the header
*
* @var array
*/
protected $javascript = array();
public function display($tpl = null) {
$document = JFactory::getDocument();
$tab = $document->_getTab();
$end = $document->_getLineEnd();
foreach ($this->stylesheets as $style) {
$document->addCustomTag($tab . '<link rel="stylesheet" href="' . $style . '" type="text/css" />' . $end);
}
foreach ($this->scripts as $script) {
$document->addCustomTag($tab . '<script src="' . $script . '" type="text/javascript"></script>' . $end);
}
$head = array();
foreach ($this->javascript as $script) {
$head[] = $tab . '<script type="text/javascript">' . $script . '</script>' . $end;
}
foreach ($this->styles as $style) {
$head[] = $tab . '<style type="text/css">' . $style . '></style>' . $end;
}
if (!empty($head)) {
$document->addCustomTag(implode('', $head));
}
parent::display($tpl);
}
public function addScript($url) {
$this->scripts[] = $url;
}
public function addStyleSheet($url) {
$this->stylesheets[] = $url;
}
public function addScriptDeclaration($text) {
$this->javascript[] = $text;
}
public function addStyleDeclaration($text) {
$this->styles[] = $text;
}
}
?>