Location: PHPKode > scripts > phpMyAccess > phpmyaccess-1.5.3/phpmyaccess/pma-debuginc.php
<?php
/*
This file contains some support routines for debugging etc.

*/
// $debug=0;

if ($debug) {
   if ($auth) {
      $debugout = 0;
      $debuglog[] .= "\n<!--// Auth active, Start Debug logging //--!>\n";
   } else {
      $debugout = 1;
   }
}

function pma_debug( $message ) {
  if ($GLOBALS['debug']) {
     if ($GLOBALS['debugout']) {
        if (count($GLOBALS['debuglog'])) {
           while (list($index,$mess) = each($GLOBALS['debuglog'])) {
              echo $mess;
           }
           unset($GLOBALS['debuglog']);
        }
        echo "\n <!--// *DEBUG* $message //--!>\n";
     } else {
        $GLOBALS['debuglog'][] .= "\n <!--// *DEBUG* $message //--!>\n";
     }
  }
}

function pma_comment( $message ) {
  if ($GLOBALS['debugout']) {
     if (count($GLOBALS['commentlog'])) {
        while (list($index,$mess) = each($GLOBALS['commentlog'])) {
           echo $mess;
        }
        unset($GLOBALS['commentlog']);
     }
     echo "\n <!--// $message //--!>\n";
  } else {
     $GLOBALS['commentlog'][] .= "\n <!--// $message //--!>\n";
  }
}

function debug_on () {
  $GLOBALS['debugout'] = 1;
  if ($auth) {
     pma_debug ("Authentication done");
  }
}

function pma_errpage ($message) {
  echo "<?xml version=\"1.0\"?>\n";
  echo "  <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n";
  echo "  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
  echo " <html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
  echo "  <head>\n";
  echo "    <title>Error</title>\n";
  echo "  </head>\n";
  echo " <body bgcolor=\"#ffeb10\">\n";
  echo "  <div class=\"main\">\n";
  echo "    $message <br/>\n";
#print_r($GLOBALS['opt']);
#echo "<br>\n";
  echo "  </div>\n";
  echo " </body>\n";
  echo "</html>\n";
  die();
}

function Say_No_acces_then_die() {
  echo "<?xml version=\"1.0\"?>\n";
  echo "  <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n";
  echo "  \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
  echo " <html xmlns=\"http://www.w3.org/1999/xhtml\">\n";
  echo "  <head>\n";
  echo "    <title>Authentication Error</title>\n";
  echo "  </head>\n";
  echo " <body bgcolor=\"#ffeb10\">\n";
  echo "  <div class=\"main\">\n";
  echo "   <h3>Access Denied</h3>\n";
  echo "    <p/>\n";
  echo "   <hr  width=\"30%\"  align=\"left\"/>\n";
  echo "    <p/>\n";
  echo "    <b>You are not allowed access </b><br/>\n";
  echo "    <b>Check your password and user name !</b><br/>\n";
  echo "   <hr  width=\"30%\"  align=\"left\"/>\n";
  echo "  </div>\n";
  echo " </body>\n";
  echo "</html>\n";
  die();
}

?>
Return current item: phpMyAccess