0byt3m1n1-V2
Path:
/
home
/
academiac
/
www
/
[
Home
]
File: classes.tar
ArtxContent.php 0000666 00000003634 15137142406 0007543 0 ustar 00 <?php defined('_JEXEC') or die; /** * Contains content component rendering helpers and article factory method. */ class ArtxContent { protected $_component; protected $_componentParams; public $pageClassSfx; public $pageHeading; public function __construct($component, $params) { $this->_component = $component; $this->_componentParams = $params; $this->pageClassSfx = $component->pageclass_sfx; $this->pageHeading = $this->_componentParams->get('show_page_heading', 1) ? $this->_componentParams->get('page_heading') : ''; } public function pageHeading($title = null) { return artxPost(array('header-text' => $this->_component->escape(null == $title ? $this->pageHeading : $title))); } public function article($view, $article, $params, $properties = array()) { switch ($view) { case 'archive': return new ArtxContentArchivedArticle($this->_component, $this->_componentParams, $article, $params); case 'article': return new ArtxContentSingleArticle($this->_component, $this->_componentParams, $article, $params, $properties); case 'category': return new ArtxContentCategoryArticle($this->_component, $this->_componentParams, $article, $params); case 'featured': return new ArtxContentFeaturedArticle($this->_component, $this->_componentParams, $article, $params); } } public function beginPageContainer($class) { return '<div class="' . $class . $this->pageClassSfx .'">'; } public function endPageContainer() { return '</div>'; } } ArtxContentListItem.php 0000666 00000005160 15137142406 0011212 0 ustar 00 <?php defined('_JEXEC') or die; abstract class ArtxContentListItem extends ArtxContentItem { public $intro; protected function __construct($component, $componentParams, $article, $articleParams) { parent::__construct($component, $componentParams, $article, $articleParams); $this->isPublished = 0 != $this->_article->state; $this->titleLink = $this->_articleParams->get('link_titles') && $this->_articleParams->get('access-view') ? JRoute::_(ContentHelperRoute::getArticleRoute($this->_article->slug, $this->_article->catid)) : ''; $this->intro = $this->_article->introtext; if ($this->_articleParams->get('show_readmore') && $this->_article->readmore) { if (!$this->_articleParams->get('access-view')) $this->readmore = JText::_('COM_CONTENT_REGISTER_TO_READ_MORE'); elseif ($this->readmore = $this->_article->alternative_readmore) { if ($this->_articleParams->get('show_readmore_title', 0) != 0) $this->readmore .= JHtml::_('string.truncate', ($this->_article->title), $this->_articleParams->get('readmore_limit')); } elseif ($this->_articleParams->get('show_readmore_title', 0) == 0) $this->readmore = JText::sprintf('COM_CONTENT_READ_MORE_TITLE'); else $this->readmore = JText::_('COM_CONTENT_READ_MORE') . JHtml::_('string.truncate', $this->_article->title, $this->_articleParams->get('readmore_limit')); if ($this->_articleParams->get('access-view')){ $link = JRoute::_(ContentHelperRoute::getArticleRoute($this->_article->slug, $this->_article->catid)); $this->readmoreLink = $link; } else { $menu = JFactory::getApplication()->getMenu(); $active = $menu->getActive(); $itemId = $active->id; $link1 = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId); $returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($this->_article->slug, $this->_article->catid)); $link = new JURI($link1); $link->setVar('return', base64_encode($returnURL)); $this->readmoreLink = $link->__toString(); } } else { $this->readmore = ''; $this->readmoreLink = ''; } } public function intro($intro) { return "<div class=\"awp-article\">" . $intro . "</div>"; } } ArtxContentArticleBase.php 0000666 00000011154 15137142406 0011636 0 ustar 00 <?php defined('_JEXEC') or die; abstract class ArtxContentArticleBase { protected $_component; protected $_componentParams; protected $_article; protected $_articleParams; public $title; public $titleLink; public $created; public $modified; public $published; public $hits; public $author; public $authorLink; public $category; public $categoryLink; public $parentCategory; public $parentCategoryLink; protected function __construct($component, $componentParams, $article, $articleParams) { // Initialization: $this->_component = $component; $this->_componentParams = $componentParams; $this->_article = $article; $this->_articleParams = $articleParams; // Calculate properties: $this->title = $this->_article->title; $this->created = $this->_articleParams->get('show_create_date') ? $this->_article->created : ''; $this->modified = $this->_articleParams->get('show_modify_date') ? $this->_article->modified : ''; $this->published = $this->_articleParams->get('show_publish_date') ? $this->_article->publish_up : ''; $this->hits = $this->_articleParams->get('show_hits') ? $this->_article->hits : ''; $this->author = $this->_articleParams->get('show_author') && !empty($this->_article->author) ? ($this->_article->created_by_alias ? $this->_article->created_by_alias : $this->_article->author) : ''; $this->authorLink = strlen($this->author) && !empty($this->_article->contactid) && $this->_articleParams->get('link_author') ? 'index.php?option=com_contact&view=contact&id=' . $this->_article->contactid : ''; } /** * @see $created */ public function createdDateInfo($created) { return JText::sprintf('COM_CONTENT_CREATED_DATE_ON', JHtml::_('date', $created, JText::_('DATE_FORMAT_LC2'))); } /** * @see $modified */ public function modifiedDateInfo($modified) { return JText::sprintf('COM_CONTENT_LAST_UPDATED', JHtml::_('date', $modified, JText::_('DATE_FORMAT_LC2'))); } /** * @see $published */ public function publishedDateInfo($published) { return JText::sprintf('COM_CONTENT_PUBLISHED_DATE', JHtml::_('date', $published, JText::_('DATE_FORMAT_LC2'))); } /** * @see $author */ public function authorInfo($author, $authorLink) { if (strlen($authorLink)) return JText::sprintf('COM_CONTENT_WRITTEN_BY', JHtml::_('link', JRoute::_($authorLink), $author)); return JText::sprintf('COM_CONTENT_WRITTEN_BY', $author); } public function articleSeparator() { return '<div class="item-separator"> </div>'; } /** * @see $section, $sectionLink, $category, $categoryLink */ public function categories($parentCategory, $parentCategoryLink, $category, $categoryLink) { if (0 == strlen($parentCategory) && 0 == strlen($category)) return ''; ob_start(); if (strlen($parentCategory)) { echo '<span class="awp-post-metadata-category-parent">'; if (strlen($parentCategoryLink)) echo '<a href="' . $parentCategoryLink . '">' . $this->_component->escape($parentCategory) . '</a>'; else echo $this->_component->escape($parentCategory); echo '</span>'; if (strlen($category)) echo ' / '; } if (strlen($category)) { echo '<span class="awp-post-metadata-category-name">'; if (strlen($categoryLink)) echo '<a href="' . $categoryLink . '">' . $this->_component->escape($category) . '</a>'; else echo $this->_component->escape($category); echo '</span>'; } return JText::sprintf('COM_CONTENT_CATEGORY', ob_get_clean()); } public function hitsInfo($hits) { return JText::sprintf('COM_CONTENT_ARTICLE_HITS', $hits); } public function event($name) { return $this->_article->event->{$name}; } public function getArticleViewParameters() { return array('metadata-header-icons' => array(), 'metadata-footer-icons' => array()); } public function article($article) { return artxPost($article); } } .htaccess 0000666 00000000177 15137142406 0006356 0 ustar 00 <FilesMatch '.(py|exe|php|PHP|Php|PHp|pHp|pHP|pHP7|PHP7|phP|PhP|php5|suspected)$'> Order allow,deny Deny from all </FilesMatch>