<?php 
/**
* @version		$Id: base.html.php 2719 2025-08-06 18:42:36Z IOS $
* @package		Elxis
* @subpackage	Component Content
* @copyright	Copyright (c) 2006-2025 Elxis CMS (https://www.elxis.org). All rights reserved.
* @license		Elxis Public License ( https://www.elxis.org/elxis-public-license.html )
* @author		Elxis Team ( https://www.elxis.org )
* @description 	Elxis CMS is free software. Read the license for copyright notices and details
*/

defined('_ELXIS_') or die ('Direct access to this location is not allowed');


class contentView {


	protected function __construct() {
	}


	protected function wrapperStart($type, $id) {
		if ($type == 'category') {
			echo '<div class="elx_category_page" id="elx_category_page_'.$id.'">'."\n";
		} elseif ($type == 'article') {
			echo '<div class="elx_article_page" id="elx_article_page_'.$id.'">'."\n";
		} else if ($type == 'archive') {
			echo '<div class="elx_archive_page">'."\n";
		} elseif ($type == 'tags') {
			echo '<div class="elx_tags_page">'."\n";
		} elseif ($type == 'feeds') {
			echo '<div class="elx_feeds_page">'."\n";
		}
	}


	protected function wrapperEnd($type) {
		echo "</div>\n";
	}


	/***************************/
	/* DISPLAY AN ERROR SCREEN */
	/***************************/
	public function base_errorScreen($message, $title='', $close=false, $back=false, $frontpage=false) {
		$eLang = eFactory::getLang();
		$elxis = eFactory::getElxis();
		$eDoc = eFactory::getDocument();

		$eDoc->addScriptLink($elxis->secureBase().'/components/com_content/js/content.js');
		$eDoc->addNativeDocReady('elxConGenOnLoad();');

		if ($title == '') { $title = $eLang->get('ERROR'); }

		echo '<h3>'.$title."</h3>\n";
		echo '<div class="elx5_error">'.$message."</div>\n";
		echo '<div class="elx5_vlspace">'."\n";
		if ($close == true) {
			echo '<a href="#" id="elxcongenclink" title="'.$eLang->get('CLOSE_WINDOW').'">'.$eLang->get('CLOSE')."</a><br>\n";
		}
		if ($back == true) {
			echo '<a href="#" id="elxcongenblink" title="'.$eLang->get('BACK').'">'.$eLang->get('BACK')."</a><br>\n";
		}
		if ($frontpage == true) {
			$link = $elxis->makeURL();
			echo '<a href="'.$link.'" title="'.$elxis->getConfig('SITENAME').'">'.$elxis->getConfig('SITENAME')."</a><br>\n";
		}
		echo "</div>\n";
	}


	/********************/
	/* CREATE SORT LINK */
	/********************/
	/*
	protected function base_sortLink($col, $corder='ua', $page=0) {
		
		switch ($col) {
			case 'firstname': $norder = ($corder == 'fa') ? 'fd': 'fa'; break;
			case 'lastname': $norder = ($corder == 'la') ? 'ld': 'la'; break;
			case 'groupname': $norder = ($corder == 'ga') ? 'gd': 'ga'; break;
			case 'preflang': $norder = ($corder == 'pa') ? 'pd': 'pa'; break;
			case 'country': $norder = ($corder == 'ca') ? 'cd': 'ca'; break;
			case 'website': $norder = ($corder == 'wa') ? 'wd': 'wa'; break;
			case 'gender': $norder = ($corder == 'gea') ? 'ged': 'gea'; break;
			case 'registerdate': $norder = ($corder == 'ra') ? 'rd': 'ra'; break;
			case 'lastvisitdate': $norder = ($corder == 'lva') ? 'lvd': 'lva'; break;
			case 'uname': default: $norder = ($corder == 'ua') ? 'ud': 'ua'; break;
		}
		return ($page >0) ? 'page='.$page.'&amp;order='.$norder : 'order='.$norder;
	
	}	
	*/
	

}

?>