<?php
/**
 * @package linea21.modules
 * @subpackage workshop
 * @author linea21 <info@linea21.com>
 * @version $id SVN
 * @access public
 * @license http://opensource.org/licenses/gpl-3.0.html
 */

//////////// Check Droits utilisateur ////////////  
if (!HaveRight('workshop')) ReloadIndex('admin');  
////////////

include_once($dir."/".SQL.".inc.php");
include_once('../class/class.workshop.php'); 
include_once('../class/class.workshop_report.php');
include_once('../class/class.calendar.php');
include_once('../class/class.workshop_com.php');

	
function afflinkbar($todo, $id, $lang){

	$link_details="<a href=\"index.php?rub=workshop&amp;todo=det&amp;id=".$id."\" title=\""._t('workshop','det')."\">"._t('workshop','det')."</a>";
	$link_cal="<a href=\"index.php?rub=workshop&amp;todo=list_cal&amp;id=".$id."\" title=\""._t('workshop','list_cal')."\">"._t('workshop','list_cal')."</a>";
	$link_com="<a href=\"index.php?rub=workshop&amp;todo=list_com&amp;id=".$id."\" title=\""._t('workshop','list_com')."\">"._t('workshop','list_com')."</a>";
	$liste=$link_details." | ".$link_cal." | ".$link_com;
	echo "<div class=\"mod_link\">";
	echo $liste;
	echo "</div><br class=\"brendstep\" />";
	
}

$todopage=$dir."/";
	switch ($todo) 
	{
		case 'add':
	    $todopage.="add.php";
		break;
		case 'mod':
		$todopage.="mod.php";
		break;
		case 'mod_p':
		$todopage.="modpass.php";
		break;
		case 'sup':
	    $todopage.="sup.php";
		break;		
		case 'list':
	    $todopage.="list.php";
		break;
		case 'det':
	    $todopage.="det.php";
		break;
		case 'sup_u':
	    $todopage.="sup_u.php";
		break;
		case 'add_u':
	    $todopage.="add_u.php";
		break;
		case 'add_cal':
	    $todopage.="add_cal.php";
		break;
		case 'sup_cal':
	    $todopage.="sup_cal.php";
		break;
		case 'mod_cal':
	    $todopage.="mod_cal.php";
		break;
		case 'list_cal':
	    $todopage.="list_cal.php";
		break;
		case 'list_com':
	    $todopage.="list_com.php";
		break;
		case 'det_com':
	    $todopage.="det_com.php";
		break;
		case 'sup_com':
	    $todopage.="sup_com.php";
		break;
		case 'lock_com':
	    $todopage.="lock_com.php";
		break;
		case 'mod_com':
	    $todopage.="mod_com.php";
		break;
		case 'add_com':
	    $todopage.="add_com.php";
		break;
		default:
		$todopage.="list.php";			
	}
include_once($todopage);    
?>