<?php
/**
 * @package linea21.modules
 * @subpackage content
 * @author linea21 <info@linea21.com>
 * @version $id SVN
 * @access public
 * @license http://opensource.org/licenses/gpl-3.0.html
 * 'Content' module is used by 'Publication' and 'Workshop' modules
 */

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



include_once('../class/class.contents.php');
if(isset($_POST['type']))	$type=$_POST['type'];
if(isset($_GET['type']))	$type=$_GET['type'];

if(isset($_POST['parent']))	$parent=$_POST['parent'];
if(isset($_GET['parent']))	$parent=$_GET['parent'];

if(isset($_POST['res']))	$res=$_POST['res'];
if(isset($_GET['res']))		$res=$_GET['res'];

if($type=='P')  {
  $mod_inc='publication';
  $rub_link='?rub='.$mod_inc;
  $cancel_link='index.php?rub=publication&amp;todo=det&amp;id='.$parent;
}
if($type=='W') {
  $mod_inc='workshop';
  $rub_link='?rub='.$mod_inc;
  $cancel_link='index.php?rub=workshoprep&amp;todo=det&amp;id='.$parent;
}

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

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