<?PHP
/************************************************************************/
/* NPDS V : Net Portal Dynamic System .                                 */
/* ===========================                                          */
/*                                                                      */
/* This version name NPDS Copyright (c) 2001-2004 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.       */
/************************************************************************/
/************************************************************************/
/* You can secur the access to static page by using the methode         */
/* describe in model.txt, simply add phpcode to call secur_static       */
/* new function (in mainfile.php).                                      */
/* this function accept one param with three values :                   */
/* - member / admin                                                     */
/*                                                                      */
/* static.php?op=test.txt&npds=-1&metalang=1                            */
/*                                                                      */
/* valeurs de npds :                                                    */
/* => -1 : pas de blocs de Gauche ET pas de blocs de Droite (no blocks) */
/* =>  0 : blocs de Gauche ET pas de blocs Droite (no right blocks)     */
/* =>  1 : blocs de Gauche ET blocs de Droite (the two)                 */
/* =>  2 : pas de blocs Gauche ET blocs de Droite (no left blocks)      */
/*                                                                      */
/* SI le paramètre metalang est présent (valeur différente de 0),       */
/* l'interprétation meta-lang, [code] ... [/code] et Multi-langue sera  */
/* réalisée                                                             */
/************************************************************************/
if (!function_exists("Mysql_Connexion")) {include ("mainfile.php");}

   $pdst=$npds;
   include ("header.php");
   opentable();
   if (($op!="") and ($op)) {
      // Troll Control for security
      if (eregi("(^[0-9a-z_\.-])",$op) and !stristr($op,".*://") and !stristr($op,"..") and !stristr($op,"../") and !stristr($op, "script") and !stristr($op, "cookie") and !stristr($op, "iframe") and  !stristr($op, "applet") and !stristr($op, "object") and !stristr($op, "meta"))  {
         if (file_exists("static/$op")) {
            if (!$metalang) {
               include ("static/$op");
            } else {
               ob_start();
                 include ("static/$op");
                 $remp=ob_get_contents();
               ob_end_clean();
               echo meta_lang(aff_code(aff_langue($remp)));
            }
            if (!$imgtmp=theme_image("box/print.gif")) { $imgtmp="images/print.gif"; }
            echo "<br /><p align=\"left\"><a href=\"print.php?sid=static:$op&amp;metalang=$metalang\"><img src=\"$imgtmp\" border=\"0\" alt=\"".translate("Printer Friendly Page")."\" align=\"middle\"></a></p>";

            // Si vous voulez tracer les appels au pages statiques : supprimer les // devant la ligne ci-dessous
            // Ecr_Log("security", "static/$op", "");
         } else {
            echo "<center class=\"ROUGE\">".translate("Please enter information according to the specifications")."</center><br />";
         }
      } else {
         echo "<center class=\"ROUGE\">".translate("Please enter information according to the specifications")."</center><br />";
      }
   }
   closetable();
   include ("footer.php");
?>