Source for file display.php

Documentation is available at display.php

  1. <?php
  2.  
  3. chdir(dirname(__FILE__));
  4. set_include_path("./:../");
  5.  
  6. // include configuration
  7. require_once('../../etc/config.inc');
  8. // include functions
  9. require_once('./webfuncs.inc');
  10.  
  11. include_once('print.inc');
  12.  
  13. function display_stuff()
  14. {
  15.    global $dbuser,$dbpass;
  16.    db_connect($dbuser,$dbpass);
  17.    $single_host mysql_real_escape_string($_GET["single_host"]);
  18.    echo print_host($single_host);
  19. }
  20.  
  21. if ($ad_auth===true)
  22. {
  23.    $rights=user_rights($_SERVER['PHP_AUTH_USER']);
  24.    if ($rights>=1)
  25.    {
  26.       echo header_read();
  27.       echo main_stuff();
  28.       echo "<hr /><br />";
  29.       display_stuff();
  30.       echo read_footer();
  31.    }
  32.    else echo "<h1>ACCESS DENIED</h1>";
  33. }
  34. else
  35. {
  36.    echo header_read();
  37.    echo main_stuff();
  38.    echo "<hr /><br />";
  39.    display_stuff();
  40.    echo read_footer();
  41. }
  42.  
  43. ?>

Documentation generated on Mon, 17 Nov 2008 01:10:29 +0100 by phpDocumentor 1.4.0