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

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

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

include_once("../lib/lib_common.php");


if(is_string($id[0]) && $id[0]=='s') {
	$is_sd=1;
	$id=str_replace('s' ,''  , $id);
	$req_det= SQL_getoneCompleteSDtheme($id);
	$result=$sql_object->DBSelect($req_det);
	
	// formattage des données
	$current_title=formatText($result[0]['sdtheme_name'], '2HTML');
	$description=empty_nc(formatText($result[0]['sdtheme_description'],'2HTML'));
	$date_crea=$result[0]['sdtheme_date_crea_display'];
	$last_modify=$result[0]['sdtheme_last_modify_display'];
	
	$link_det=$rub_link."&amp;todo=det&amp;id="; 
	$link_sup=$rub_link."&amp;todo=sup&amp;id=";
	$link_mod=$rub_link."&amp;todo=mod&amp;id=";
?>
<div id="chemin">
	<ul>
		<li>
			<a href="index.php"><?php echo $GLOBALS['lang']['way']['home']; ?></a>
		</li>
		<li>
			<a href="<?php echo $rub_link; ?>"><?php echo $GLOBALS['lang']['menu']['theme']; ?></a>
		</li>
		<li>
			<span><?php echo formatNavTitle($GLOBALS['lang']['sdtheme']['det']. " : " .$current_title); ?></span>
		</li>
	</ul>
</div>
  <!--end barre haute -->
<?php
include_once("quickicons.php");
?>
<div class="contentcontainer">
<?php
include_once($dir."/menurub.php");
?>
<div id="content">
		<?php
		echo "<h2>";
		echo formatTitleh2($current_title);
		echo "</h2>\n";
		echo "<dl class=\"dl3\">\n";
		echo "<dt>".$GLOBALS['lang']['theme']['description']." :</dt>\n";
		echo "<dd>".$description."</dd>\n";
		echo "<dt>".$GLOBALS['lang']['divers']['last_modify']."</dt>\n";
		echo "<dd>". $last_modify."</dd>\n";
		echo "<dt>".$GLOBALS['lang']['divers']['date_crea']."</dt>\n";
		echo "<dd>". $date_crea."</dd>\n";
		echo "</dl>\n";
		
}	else 	{

$req_det= SQL_getonetheme($id);
$result=$sql_object->DBSelect($req_det);
$current_title=formatText($result[0]['theme_name'],'2HTML');

// formattage des données
$desc_project=empty_none(formatText($result[0]['theme_desc_project'], '2HTML'));
$desc_dashboard=empty_none(formatText($result[0]['theme_desc_dashboard'], '2HTML'));
$desc_publi=empty_none(formatText($result[0]['theme_desc_publication'], '2HTML'));
$desc_workshop=empty_none(formatText($result[0]['theme_desc_workshop'], '2HTML'));
$desc_news=empty_none(formatText($result[0]['theme_desc_news'], '2HTML'));
$date_crea=$result[0]['theme_date_crea'];
$last_modify=$result[0]['theme_last_modify'];

$link_det=$rub_link."&amp;todo=det&amp;id="; 
$link_sup=$rub_link."&amp;todo=sup&amp;id=";
$link_mod=$rub_link."&amp;todo=mod&amp;id=";
?>
<div id="chemin">
	<ul>
		<li>
			<a href="index.php"><?php echo $GLOBALS['lang']['way']['home']; ?></a>
		</li>
		<li>
			<a href="<?php echo $rub_link; ?>"><?php echo $GLOBALS['lang']['menu']['theme'];?></a>
		</li>
		<li>
			<span><?php echo formatNavTitle($GLOBALS['lang']['theme']['det']. " : " .$current_title)?></span>
		</li>
	</ul>
</div>
  <!--end barre haute -->
<?php
include_once("quickicons.php");
?>
<div class="contentcontainer">
<?php
include_once($dir."/menurub.php");
?>
<div id="content">
		<?php
		echo "<h2>";
		echo formatTitleh2($current_title);
		echo "</h2>\n";
		echo "\t<a href=\"".$link_sup.$id."\" title=\"".$GLOBALS['lang']['theme']['sup']."\" class=\"ico_sup2\"></a>\n";
		echo "\t<a href=\"".$link_mod.$id."\" title=\"".$GLOBALS['lang']['theme']['mod']."\" class=\"ico_mod2\"></a>\n";
		echo "<dl class=\"dl3\">\n";
		echo "<dt>".formatText($GLOBALS['lang']['theme']['sdtheme'], '2HTML'). "</dt>\n";
		echo "<dd><a href=\"".$link_det."s".$result[0]['sdtheme_id']."\">".formatText($result[0]['sdtheme_name'],'2HTML')."</a></dd>\n";
        if(defined('MOD_PROJECT')) {
			echo "<dt>".formatText($GLOBALS['lang']['theme']['desc_det_project'], '2HTML')."</dt>\n";
			echo "<dd>".$desc_project."</dd>\n";
		}
		if(defined('MOD_SDI')) {
			echo "<dt>".formatText($GLOBALS['lang']['theme']['desc_det_dashboard'], '2HTML')."</dt>\n";
			echo "<dd>".$desc_dashboard."</dd>\n";
		}
		if(defined('MOD_PUBLICATION')) {
			echo "<dt>".formatText($GLOBALS['lang']['theme']['desc_det_publication'], '2HTML')."</dt>\n";
			echo "<dd>".$desc_publi."</dd>\n";
		}
		if(defined('MOD_WORKSHOP')) {
			echo "<dt>".formatText($GLOBALS['lang']['theme']['desc_det_workshop'], '2HTML')."</dt>\n";
			echo "<dd>".$desc_workshop."</dd>\n";
		}
		if(defined('MOD_NEWS')) {
			echo "<dt>".formatText($GLOBALS['lang']['theme']['desc_det_news'], '2HTML')."</dt>\n";
			echo "<dd>".$desc_news."</dd>\n";
		}
		echo "<dt>".formatText($GLOBALS['lang']['divers']['last_modify'], '2HTML')."</dt>\n";
		echo "<dd>".$last_modify."</dd>\n";
		echo "<dt>".formatText($GLOBALS['lang']['divers']['date_crea'], '2HTML')."</dt>\n";
		echo "<dd>".$date_crea."</dd>\n";
		/** PAS DE GESTION DES STATUTS
		echo "<dt>".formatText($GLOBALS['lang']['divers']['statut'], '2HTML') ."</dt>\n";
		echo "<dd>".display_statut($result[0]['theme_statut']). "</dd>\n";
		**/
		echo "</dl>\n";
}
?>

</div>
<?php include_once($dir."/help.php"); ?>
</div>
