<?php
require_once ('LoadConfig.php');
session_name((string)$GLOBALS["config"]->general->namesession);
session_start(); /* on vérifie le login */
require_once('LoginVerif.php');
include('Head.php');
include('Topbar.php');
require_once("fctphp/function.php");
?>
<ul>
<?php
//$SommaireHelp= simplexml_load_file('help/sommaire.help');
$document_xml = new DomDocument(); // Instanciation de la classe DomDocument : création d'un nouvel objet
$document_xml->load('help/sommaire.help');
//$resultat_html = ''; // Initialisation de la chaine qui contient le résultat
$SommaireHelps = $document_xml->getElementsByTagName('helpsommaire');
$SommaireHelp = $SommaireHelps->item(0); // On obtient le noeud zcode
$helps = $SommaireHelp->childNodes; // On récupère les noeuds enfants de zcode avec childNodes
$index1=0;
$index2=0;
foreach($helps as $help)
{ switch ($help->nodeName)
{
Case "titre": ?>
<script LANGUAGE="JavaScript">UpdateTitle('<?php echo utf8_decode($help->nodeValue); ?>');</script>
<?php
Break;
Case "niv1":
if ($index2!=0)
echo "</div></div>";
if ($index1!=0)
echo "</div></div><hr>\n";
if ( file_exists("help/".$help->nodeValue.".help") )
$data = simplexml_load_file("help/".$help->nodeValue.".help");
else
$data = new SimpleXMLElement("<help><titre>Error ".$help->nodeValue.".help</titre><message>no</message></help>");
echo "<div class='section_help' onclick=\"javascript:Disp('det_sec_".$help->nodeValue."');\"><img class='icon' src='images/skins/".$GLOBALS["config"]->general->skin."/".$help->nodeValue.".png' />".utf8_decode($data->titre);
echo "</div>\n";
echo "<div class=descript_section_help id=des_sec_".$help->nodeValue.">".utf8_decode($data->message);
if ( isset($data->inline_help) )
echo "<span class='support_help'><img class='icon' src='images/skins/".$GLOBALS["config"]->general->skin."/support.png' onclick=\"javascript:window.open('".utf8_decode($data->inline_help)."');\" alt='Aide en ligne'></span>";
echo "</div>\n";
echo "<div class=detail_section_help id=det_sec_".$help->nodeValue." >\n";
echo "<div>\n";
$index1=$index1+1;
$index2=0;
$index3=0;
Break;
Case "niv2":
if ($index2!=0)
echo "</div></div><hr>\n";
if ( file_exists("help/".$help->nodeValue.".help") )
$data = simplexml_load_file("help/".$help->nodeValue.".help");
else
$data = new SimpleXMLElement("<help><titre>Error ".$help->nodeValue.".help</titre><message>no</message></help>");
echo "<div class='ssection_help' onclick=\"javascript:Disp('det_sec_".$help->nodeValue."');\"><img class='icon' src='images/skins/".$GLOBALS["config"]->general->skin."/".$help->nodeValue.".png' />".utf8_decode($data->titre)."</div>\n";
echo "<div class='descript_ssection_help' id=des_sec_".$help->nodeValue.">".utf8_decode($data->message)."</div>\n";
echo "<div class='detail_ssection_help' id=det_sec_".$help->nodeValue." >\n";
echo "<div>\n";
$index2=$index2+1;
$index3=0;
Break;
Case "niv3":
if ( file_exists("help/".$help->nodeValue.".help") )
$data = simplexml_load_file("help/".$help->nodeValue.".help");
else
$data = new SimpleXMLElement("<help><titre>Error ".$help->nodeValue.".help</titre><message>no</message></help>");
if ($index2>0)
$niv=3;
else
$niv=2;
echo "<div class='detail".$niv."_help' onclick=\"javascript:Disp('det_".$help->nodeValue."');\"><img src='images/skins/commun/bg-fleche01-blue.png' />".utf8_decode($data->titre)."</div>\n";
echo "<div class='descript".$niv."_detail_help' id=det_".$help->nodeValue.">".utf8_decode($data->message)."<br>".utf8_decode($data->detail)."</div>\n";
$index3=$index3+1;
Break;
default:
$afficher = false;
}
/*
list($section, $soussection, $zone) = explode(".", $help);
if ( $section_old != $section )
{
if ( $section_old != "" )
echo "</ul></div><hr>\n";
if ( file_exists("help/".$section.".help") )
$data = simplexml_load_file("help/".$section.".help");
else
$data = new SimpleXMLElement("<help><titre>Error ".$section.".help</titre><message>no</message></help>");
echo "<li class='section_help' onclick=\"javascript:Disp('det_sec_".$section."');\"><img class='icon' src='images/".$section.".png' />".utf8_decode($data->titre)."</li>\n";
echo "<div class=descript_section_help id=des_sec_".$section.">".utf8_decode($data->message)."</div>\n";
echo "<div class=detail_section_help id=det_sec_".$section." >\n";
echo "<ul>\n";
$section_old = $section;
}
if ( $soussection_old != $soussection )
{
if ( $soussection_old != "" )
{
echo "</ul></div><hr>\n";
echo $section;
echo $soussection;
}
//if ( file_exists("help/".$section.'.'.$soussection.".help") )
// $data = simplexml_load_file("help/".$section.'.'.$soussection".help");
else
$data = new SimpleXMLElement("<help><titre>Error ".$soussection.".help</titre><message>no</message></help>");
echo "<li class='section_help' onclick=\"javascript:Disp('det_sec_".$soussection."');\"><img class='icon' src='images/".$soussection.".png' />".utf8_decode($data->titre)."</li>\n";
echo "<div class=descript_section_help id=des_sec_".$soussection.">".utf8_decode($data->message)."</div>\n";
echo "<div class=detail_section_help id=det_sec_".$soussection." >\n";
echo "<ul>\n";
$soussection_old = $soussection;
}
if ( file_exists("help/".$help.".help") )
$data = simplexml_load_file("help/".$help.".help");
else
$data = new SimpleXMLElement("<help><titre>Error ".$help.".help</titre><message>no</message></help>");
echo "<li class=detail_help onclick=\"javascript:Disp('det_".$help."');\"><img src='images/skins/commun/bg-fleche01-blue.png' />".utf8_decode($data->titre)."</li>\n";
echo "<div class=descript_detail_help id=det_".$help.">".utf8_decode($data->message)."</div>\n";
*/
}
?>
<ul>
</div>
<ul>
</body>
</html>