<?PHP
/************************************************************************/
/* Theme for NPDS / Net Portal Dynamic System                           */
/* ===========================                                          */
/*                                                                      */
/* Theme : npds2004 Copyright (c) 2002-2005                     by Siem */
/* based on NukeNews and Dummy themes                                   */
/*                                                                      */
/* 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.       */
/************************************************************************/
   global $slogan, $site_logo, $theme;
   global $pdst, $powerpack, $cookie;

   $username = $cookie[1];
   if ($username == "") {
      $username = translate($anonymous);
   }

   list($content1, $content2)=Who_Online();
   echo "<body onload=init()>";
   echo "<table cellspacing=\"0\" cellpadding=\"0\" width=\"98%\" align=\"center\" border=\"0\">
         <tr>
            <td width=\"10\"><img height=\"27\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"10\" border=\"0\" /></td>
            <td width=\"150\" rowspan=\"4\" valign=\"top\" bgcolor=\"#13131E\"><img height=\"87\" alt=\"\" src=\"themes/$theme/images/logo.gif\" width=\"150\" border=\"0\" /><br /><div class=\"BOXMENU\">$slogan</div></td>
            <td align=\"right\" colspan=\"4\">&nbsp;</td>";
            echo "<td width=\"10\"><img height=\"27\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"10\" border=\"0\" /></td>
            <td width=\"1\"><img height=\"27\" alt=\"\" src=\"themes/$theme/images/fon_hauc.gif\" width=\"1\" border=\"0\" /></td>
         </tr>
         <tr>
            <td background=\"themes/$theme/images/fon_g.gif\" rowspan=\"4\"><img alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"10\" border=\"0\" /></td>
            <td background=\"themes/$theme/images/fon_hau.gif\" colspan=\"4\"><img height=\"6\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"6\" border=\"0\" /></td>
            <td><img height=\"6\" alt=\"\" src=\"themes/$theme/images/fon_hauc.gif\" width=\"10\" border=\"0\" /></td>
            <td><img height=\"6\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"1\" border=\"0\" /></td>
         </tr>
         <tr>
            <td nowrap=\"nowrap\" align=\"middle\" bgcolor=\"#605f71\" colspan=\"3\" valign=\"top\" width=\"100%\"><img height=\"5\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"5\" border=\"0\" />";
            global $banners, $hlpfile;
            if (($banners) and (!$hlpfile)) {
               include("banners.php");
            } else {
               echo "<img height=\"60\" src=\"themes/$theme/images/banners/ban_468x60_1.gif\" width=\"468\" />";
            }
   echo "   <img height=\"5\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"5\" border=\"0\"><br /><DIV class=\"BOXMENU\">$content1<br />$content2</DIV>
            </td>
            <td valign=\"top\" width=\"15%\" bgcolor=\"#605f71\">
            <table height=\"47\" cellspacing=\"0\" cellpadding=\"0\" width=\"140\" border=\"0\">
            <tbody>
               <tr>
                  <td><span class=\"TITREC\">".translate("Search")."</span></td>
                  <td><img height=\"1\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"1\" border=\"0\" /></td>
               </tr>
               <tr>
                  <form action=\"search.php\" method=\"post\">
                  <td>
                  <input type=\"name\" name=\"query\" size=\"10\" class=\"INPUTA\" style=\"width:150;\"><br />
                  </td>
                  <td><img height=\"1\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"1\" border=\"0\" /></td>
                  </form>
               </tr>
               <tr>
                  <form action=\"search.php\" method=\"post\">
                  <td valign=\"bottom\" align=\"middle\" width=\"20\"><br />";
                  $toplist = mysql_query("select topicid, topictext from topics order by topictext");
                  echo "<select name=\"topic\"onChange='submit()' class=\"INPUTA\" style=\"width:150;\">" ;
                  echo "<option value=\"\">".translate("All Topics")."</option>\n";
                  while(list($topicid, $topics) = mysql_fetch_row($toplist)) {
                     if ($topicid==$topic) { $sel = "selected "; }
                     echo "<option $sel value=\"$topicid\">$topics</option>\n";
                     $sel = "";
                  }
                  echo "</select></td><td>&nbsp;</td></tr>
                  <tr valign=\"bottom\" align=\"middle\" width=\"20\">
                  <td><br /><span class=\"BOXA\">".meta_lang("!date!")."</span>
                  </td>
                  </form>
                  <td><img height=\"1\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"1\" border=\"0\" /></td>
               </tr>
            </tbody>
            </table>
            </td>
            <td background=\"themes/$theme/images/fon_dro.gif\" rowspan=\"3\"><img height=\"10\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"10\" border=\"0\" /></td>
            <td><img height=\"60\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"1\" border=\"0\" /></td>
         </tr>
         <tr>
            <td bgcolor=\"#605f71\" colspan=\"4\"><img height=\"5\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"5\" border=\"0\" /></td>
            <td><img height=\"5\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"1\" border=\"0\" /></td>
         </tr>
         <tr>
            <td bgcolor=\"#45445b\"><img height=\"3\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"150\" border=\"0\" /></td>";
            if ($pdst== "1") {
               echo "<td colspan=\"3\"><img height=\"3\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"3\" border=\"0\" /></td>";
               echo "<td bgcolor=\"#878698\"><img height=\"3\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"150\" border=\"0\" /></td>";
            } else  {
               echo "<td colspan=\"4\"><img height=\"3\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"3\" border=\"0\" /></td>";
            }
   echo "   <td><img height=\"3\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"1\" border=\"0\" /></td></tr>
         <tr>
            <td background=\"themes/$theme/images/fon_g.gif\"><img alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"10\" border=\"0\" /></td>
            <td class=\"TITRE\" valign=\"top\">";
            if (!isset($powerpack)) {include ("powerpack.php");}
            leftblocks();
   echo "   <br /></td>";

   if ($pdst== "1") {
      echo "<td width=\"5\"><img height=\"5\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"5\" border=\"0\" /></td><td valign=\"top\" width=\"100%\">";
   } else  {
      echo "<td valign=\"top\" width=\"100%\" colspan=\"4\"><table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" align=\"center\" border=\"0\"><tr><td width=\"5\"><img height=\"5\" alt=\"\" src=\"themes/$theme/images/spacer.gif\" width=\"5\" border=\"0\" /></td><td>";
   }

   echo "<table cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" border=\"0\"><tbody>";
   echo "<tr>";
   echo "<td align=\"middle\" bgcolor=\"#c3c2cb\">";
   echo "<a href=\"index.php?\"class=\"HEADER\"><img height=\"19\" alt=\"\" src=\"themes/$theme/images/fle_b.gif\" width=\"13\" align=\"absMiddle\" border=\"0\" /><span class=\"HEADER\">Accueil</span></a>&nbsp;";
   Mess_Check_Mail_interface($username, "HEADER");
   echo "&nbsp;<a href=\"user.php?op=logout\" class=\"HEADER\"><img height=\"19\" alt=\"\" src=\"themes/$theme/images/fle_b.gif\" width=\"13\" align=\"absMiddle\" border=\"0\" /><span class=\"HEADER\">Déconnexion</span></a>";
   echo "&nbsp;<a href=\"submit.php\" class=\"HEADER\"><img height=\"19\" alt=\"\" src=\"themes/$theme/images/fle_b.gif\" width=\"13\" align=\"absMiddle\" border=\"0\" /><span class=\"HEADER\">Soumettre un article</span></a>";
   // Aide en ligne
   echo "&nbsp;&nbsp;<a href=\"#\" onmouseover=\"setObj(description[-1],'override','5')\"  onmouseout=\"stopIt()\" class=\"HEADER\"><img height=\"19\" alt=\"\" src=\"themes/$theme/images/fle_b.gif\" width=\"13\" align=\"absMiddle\" border=\"0\" />Aide</a>";
   // Aide en ligne
   echo "</td>";
   echo "</tr>";
   echo "</tbody></table><br />";

   if (if_chat()) {
      echo "<span class=\"ROUGE\">-: Chat en cours :-</span>";
   }
?>