<?php
/**
 * Page module
 * 
 * Default module index file
 * 
 * @package linea21\modules\page
 * @author $Author$ - Simon Georget <simon@linea21.com>
 * @version $Id$ 
 * @access public
 * @license http://opensource.org/licenses/gpl-3.0.html
 */

//////////// Check Inclusion de pages ////////////
if (!class_exists('auth')){
  include_once("../lib/lib_common.php");
  ReloadIndex('admin');
}
////////////

//////////// Check Droits utilisateur ////////////
if (!$l21auth->isSuperAdmin()) ReloadIndex('admin');
////////////

include_once('../class/class.page.php');

// we define $headingEntries
$headingEntries = ['' => empty_none(''), 'homepage' => $l10n_links[U_L]['home']['title'], 'news' => _t('menu_alt', 'news'), 'directory' => _t('menu_alt', 'yellowpages'), 'contact' => $l10n_links[U_L]['contact']['title'], 'contribute' => $l10n_links[U_L]['contribute']['title'], 'workgroup' => _t('menu_alt', 'workshop'), 'workgroup-sub' => _t('name', 'workshop_module'). ' - '.$l10n_links[U_L]['workgroup-subscription']['title'], 'newsletter' => _t('menu_alt', 'newsletter'), 'project' => _t('menu_alt', 'project'), 'publication' => _t('menu_alt', 'publication'), 'directory' => _t('menu_alt', 'yellowpages'), 'dashboard' => _t('menu_alt', 'dashboard')
];

$todopage=$dir."/";
switch ($todo)
{
  case 'add':
    $todopage.="add.php";
    break;
  case 'mod':
    $todopage.="mod.php";
    break;
  case 'sup':
    $todopage.="sup.php";
    break;
  case 'list':
    $todopage.="list.php";
    break;
  case 'det':
    $todopage.="det.php";
    break;
  default:
    $todopage.="add.php";
}
include_once(override($todopage, THEME_ADMIN_PATH));
?>