<?php

if (!function_exists('sv') || preg_match('#/plugins/collection/admin.php#i', $_SERVER['SCRIPT_NAME']))
{
	die('no direct access');
}

/*
============================================================
CMSimple Plugin Collection
============================================================
Version:    Collection 1.8
Released:   2024-07
Copyright:  Gert Ebersbach
Internet:   ge-webdesign.de
============================================================ 
utf-8 check: äöü 
*/



initvar('collection');
if ($collection) 
{
	if(!defined('CMSIMPLE_VERSION'))
	{
		$o.= '<p>This plugin requires <b>CMSimple 4.2</b> or higher.</p><p><a href="http://www.cmsimple.org/">CMSimple Download & Updates &raquo;</a></p>';
		return;
	}
	
	// Make CMSimple variables accessible
	global $sn,$sv,$sl,$pth;
	
	global $plugin;
	
	// Detect the foldername of the plugin.
	$plugin=basename(dirname(__FILE__),"/");

	$admin = isset($_GET['admin']) ? $_GET['admin'] : '';
	$admin .= isset($_POST['admin']) ? $_POST['admin'] : '';
	
	// Parameter "ON"  shows the Plugin Main Tab.
	// Blank "" or "OFF" does not show the Plugin Main Tab.
	$o.=print_plugin_admin('off');
	
	// First page when loading the plugin.
	if ($admin == '' || $admin == 'plugin_main') 
	{
		$o.='
		<h4>Plugin Collection</h4>
		<hr />
		<ul>
		<li>Version: Collection 1.8</li>
		<li>Released: 2024-07</li>
		<li>Copyright: Gert Ebersbach</li>
		<li>Internet: <a href="http://www.ge-webdesign.de/cmsimpleplugins/?Eigene_Plugins">www.ge-webdesign.de</a></li>
		</ul>
		<hr />
		<p><b>No admin options</b></p>
		';
	}

	if ($admin <> 'plugin_main') 
	{
		$hint=array();
		$hint['mode_donotshowvarnames'] = false;
		$o.=plugin_admin_common($action, $admin, $plugin, $hint);
	}
}
?>