Newer
Older
Import / web / internal.subflexion.com / history.php
<?php
  function authRequired($message)
  {
     header('WWW-Authenticate: Basic realm="My Realm"');
     header('HTTP/1.0 401 Unauthorized');
     echo "Failure.<br>You need to login to be able to edit pages!<br>$message";
     die();
  }

  if ( "{$_SERVER['PHP_AUTH_USER']}" == "" || "{$_SERVER['PHP_AUTH_PW']}" == "" )
  {
    authRequired("Please enter a valid username and password.");
  }
?>

<html>
 <head>
  <?php
   $TITLE    = 'History';
   $SUBTITLE = 'SubflexionPages';
   include('style.php');
  ?>
 </head>
 <body>
  <div class="content-wrapper">
   <?php include('navbar.php'); ?>
   <?php include('heading.php'); ?>
   <div class="container">
   <p>
   <br>
   <p>
   <h3>History for "<?php echo "<a href='view.php?page=${_GET['page']}'>${_GET['page']}</a>"; ?>"</h3>
   <p>
   <br>
<?php
    if (isset($_GET['page']))
    {
        $results = shell_exec("`pwd`/history.sh \"{$_GET['page']}\" {$_SERVER['PHP_AUTH_USER']} {$_SERVER['PHP_AUTH_PW']}");
        echo "$results";
    }
?>
   </div> <!-- end of container -->
  </div> <!-- end of content-wrapper -->
  <?php include('footer.php'); ?>
 </body>
</html>