home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / phpMyAdmin / error.php < prev    next >
Encoding:
PHP Script  |  2008-06-23  |  2.1 KB  |  84 lines

  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4.  * phpMyAdmin fatal error display page
  5.  *
  6.  * @version $Id: error.php 10289 2007-04-16 13:32:45Z cybot_tm $
  7.  */
  8.  
  9. /* Input sanitizing */
  10. require_once './libraries/sanitizing.lib.php';
  11.  
  12. /* Get variables */
  13. if (! empty($_REQUEST['lang']) && is_string($_REQUEST['lang'])) {
  14.     $lang = htmlspecialchars($_REQUEST['lang']);
  15. } else {
  16.     $lang = 'en';
  17. }
  18.  
  19. if (! empty($_REQUEST['dir']) && is_string($_REQUEST['dir'])) {
  20.     $dir = htmlspecialchars($_REQUEST['dir']);
  21. } else {
  22.     $dir = 'ltr';
  23. }
  24.  
  25. if (! empty($_REQUEST['type']) && is_string($_REQUEST['type'])) {
  26.     $type = htmlspecialchars($_REQUEST['type']);
  27. } else {
  28.     $type = 'error';
  29. }
  30.  
  31. // force utf-8 to avoid XSS with crafted URL and utf-7 in charset parameter
  32. $charset = 'utf-8';
  33.  
  34. header('Content-Type: text/html; charset=' . $charset);
  35. ?>
  36. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  37. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $lang; ?>" dir="<?php echo $dir; ?>">
  38. <head>
  39.     <link rel="icon" href="./favicon.ico" type="image/x-icon" />
  40.     <link rel="shortcut icon" href="./favicon.ico" type="image/x-icon" />
  41.     <title>phpMyAdmin</title>
  42.     <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
  43.     <style type="text/css">
  44.     <!--
  45.     html {
  46.         padding: 0;
  47.         margin: 0;
  48.     }
  49.     body  {
  50.         font-family: sans-serif;
  51.         font-size: small;
  52.         color: #000000;
  53.         background-color: #F5F5F5;
  54.         margin: 1em;
  55.     }
  56.     h1 {
  57.         margin: 0;
  58.         padding: 0.3em;
  59.         font-size: 1.4em;
  60.         font-weight: bold;
  61.         color: #ffffff;
  62.         background-color: #ff0000;
  63.     }
  64.     p {
  65.         margin: 0;
  66.         padding: 0.5em;
  67.         border: 0.1em solid red;
  68.         background-color: #ffeeee;
  69.     }
  70.     //-->
  71.     </style>
  72. </head>
  73. <body>
  74. <h1>phpMyAdmin - <?php echo $type; ?></h1>
  75. <p><?php
  76. if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
  77.     echo PMA_sanitize(stripslashes($_REQUEST['error']));
  78. } else {
  79.     echo PMA_sanitize($_REQUEST['error']);
  80. }
  81. ?></p>
  82. </body>
  83. </html>
  84.