<?PHP
/************************************************************************/
/* DUNE by NPDS                                                         */
/* ===========================                                          */
/*                                                                      */
/* This version name NPDS Copyright (c) 2001-2007 by Philippe Brunier   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
if (!eregi("modules.php", $PHP_SELF)) { die(); }

   global $user, $Default_Theme, $language, $site_font;
   $userX = base64_decode($user);
   $userdata = explode(":", $userX);
   if ($userdata[9]!="") {
      if (!$file=@opendir("themes/$userdata[9]")) {
         $tmp_theme=$Default_Theme;
      } else {
         $tmp_theme=$userdata[9];
      }
   } else {
      $tmp_theme=$Default_Theme;
   }
   include("themes/$tmp_theme/theme.php");
   $Titlesitename="META-LANG";
   include("meta/meta.php");
   echo import_css($tmp_theme, $language, $site_font, "","");

   global $NPDS_Prefix;
   $Q = sql_query("SELECT def, content, type_meta, type_uri, uri, description FROM ".$NPDS_Prefix."metalang order by 'type_meta','def' ASC");
   opentable();
   echo "<b>META</b><hr noshade=\"noshade\" class=\"ongl\" /></td><td><b>Type<hr noshade=\"noshade\" class=\"ongl\" /></b></td><td><b>Description<hr noshade=\"noshade\" class=\"ongl\" /></b></td></tr>";
   $cur_type=""; $ibid=0;
   while (list($def, $content, $type_meta, $type_uri, $uri, $description)= sql_fetch_row($Q)) {
      if ($cur_type=="")
         $cur_type=$type_meta;
      if ($type_meta!=$cur_type) {
         echo "</tr><tr><td colspan=\"3\"><hr noshade=\"noshade\" class=\"ongl\" /></td></tr>";
         $cur_type=$type_meta;
      }
      $rowcolor=tablos();
      echo "<tr $rowcolor><td valign=\"top\"><b>$def</b></td>";
      echo "<td valign=\"top\">$type_meta</td>";
      if ($type_meta=="smil") {
         eval($content);
         echo "<td>".$cmd."</td></tr>";
      } else if ($type_meta=="mot")
         echo "<td>$content</td></tr>";
      else
         echo "<td>".aff_langue($description)."</td></tr>";
      $ibid++;
   }
   echo "<tr><td colspan=\"3\" class=\"header\">Meta-lang pour <a href=\"http://www.npds.org\" class=\"NOIRE\">NPDS</a> ==> $ibid META(s)";
   closetable();
?>