<?php
/* **
 * @application PhpMyShopping
 * @part        Admin boutique
 * @file        template.php
 * @path        ./admin/
 * @author      Stephane DINE <stephane@phpmyshopping.org>
 * @site        http://www.phpmyshopping.org
 * @license     http://www.php.net/license/3_0.txt  PHP License 3.0
 *
 * PHP version 5
 */

if ((!isset($_SESSION['LoginOk']) or $_SESSION['LoginOk'] != 'IdentOk')) {
    header('Location: ./login.php');
}

require_once 'include/class.template.php';
$template = new Template();

switch ($C3) {
/** -------------------------------------------------------------------------------------
 * Liste des templates
 */
case 'list':
	echo $template->viewTemplateList();
	break;

/** -------------------------------------------------------------------------------------
 * Modification du template
 */
case 'update':
	$template->modifTemplateShop($_GET['IDT']);
	echo $template->viewTemplateList();
	break;

/** -------------------------------------------------------------------------------------
 * Affichage par defaut
 */
default:
	echo $template->viewTemplateList();
}
?>
