home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / admin / cook.php < prev    next >
Encoding:
PHP Script  |  2003-01-01  |  4.3 KB  |  76 lines

  1. <?
  2. // This program is free software; you can redistribute it and/or
  3. // modify it under the terms of the GNU General Public License
  4. // as published by the Free Software Foundation; either version 2
  5. // of the License, or (at your option) any later version.
  6. // This program is distributed in the hope that it will be useful,
  7. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9. // GNU General Public License for more details.
  10. // You should have received a copy of the GNU General Public License
  11. // along with this program; if not, write to the Free Software
  12. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  13.  
  14. //  The latest version is always availble at http://basmaaks.xs4all.nl
  15. //  You'll need php version 4.1.0 or above to get it all running.
  16. //  Mail me for any questions at the_gamblers@basmaaks.xs4all.nl or post a message
  17.  
  18. SetCookie("sysinfostats","Admin",time()+100000000,"/","",0) ;
  19.  
  20. // Ask for the config.php file with al the settings
  21. require("config.php");  
  22.  
  23. //check for a theme
  24. if (!(isset($template) && file_exists('themes/' . $template . '.php'))) {
  25.     $template = $defaulttheme;
  26.     if(count($plng) > 0) {
  27.         while(list($k,$v) = each($plng)) {
  28.             $k = split(';', $v, 1);
  29.             $k = split('-', $k[0]);
  30.             if(file_exists('themes/' . $k[0] . '.php')) {
  31.                 $template = $k[0];
  32.                 break;
  33.              }
  34.         }
  35.     }
  36. }
  37. require('themes/' . $template . '.php');
  38.  
  39. // Check for a language
  40. if (!(isset($lng) && file_exists('languages/' . $lng . '.php'))) {
  41.     $lng = $defaultlang;
  42.     // see if the browser knows the right languange.
  43.     if(isset($HTTP_ACCEPT_LANGUAGE)) {
  44.         $plng = split(',', $HTTP_ACCEPT_LANGUAGE);
  45.         if(count($plng) > 0) {
  46.             while(list($k,$v) = each($plng)) {
  47.                 $k = split(';', $v, 1);
  48.                 $k = split('-', $k[0]);
  49.                 if(file_exists('languages/' . $k[0] . '.php')) {
  50.                     $lng = $k[0];
  51.                     break;
  52.                 }
  53.             }
  54.         }
  55.     }
  56. }
  57. require('languages/' . $lng . '.php');
  58.  
  59. // Read the filetime of the index file
  60. $filemod = filemtime("index.php"); 
  61. $filemodtime = date("j F  Y h:i:s A", $filemod);
  62.  
  63. // The costum style sheet
  64. $CSS = "<style type=\"text/css\">table td {background-color:$color_table;color:$font_info;}.head {background-color:$color_header;color:$font_table;}.body {background-color:$color_background;color:$font_text;scrollbar-face-color:$scrollbar_face; scrollbar-highlight-color:$scrollbar_highlight; scrollbar-shadow-color:$scrollbar_shadow; scrollbar-3dlight-color:$scrollbar_3dlight; scrollbar-arrow-color:$scrollbar_arrow; scrollbar-track-color:$scrollbar_track; scrollbar-darkshadow-color:$scrollbar_darkshadow;}.generatedinfo {background-color:$color_table;color:$font_variables;}a:link {font-family:$font_type; color:$color_link;font-size: 11px; font-style: normal; text-decoration: none}a:active {font-family: $font_type; color:$color_alink; font-size: 11px; font-style: normal; text-decoration: none}a:visited {font-family:$font_type; color:$color_vlink; font-size: 11px; font-style: normal; text-decoration: none}a:hover {font-family:$font_type; color:$color_hlink; font-size: 11px; font-style: normal; text-decoration: underline}.buttons {font-family:$font_type; color:$button_text; font-size: 11px; border: 1px solid #C0C0C0;background-color:$button_color}.fields {border:1px solid #7C8184; font-family:$font_type; font-size: 11px; ;}.toneborder {border-color:$border_color;    border-width:$border_thick;    border-style:$border_style; }</style>";
  65.  
  66. // send the header of the page to the browser and begin the body
  67. echo "<head><meta http-equiv=\"Content-Type\" content=\"text/html; $charset\">";        
  68. echo "$CSS<title>Sysinfo $Version for $HTTP_SERVER_VARS[SERVER_NAME]</title></HEAD><BODY class=body>";
  69. if ($usebackground==true){
  70.     echo "<BODY BACKGROUND=\"$imgbackground\">";
  71. }
  72.  
  73. Echo "<CENTER>".$label['cookie']."</CENTER><BR><BR>"
  74. . "<CENTER><a href=\"index.php\">".$label['script']."</a></CENTER>"
  75. ."<HR><font size=-1>Generated by <a href=\"http://basmaaks.xs4all.nl\">Sysinfo $Version</a> written by <a href=\"mailto:the_gamblers@basmaaks.xs4all.nl\">The Gamblers.</a> File last modified $filemodtime</font>";
  76. ?>