示例#1
0
 /**
  * Generating Debug-Table (Simple HTML)
  * @todo Make Funktions for automatic add/generate Sections ala Timer, Vars, etc.
  * @todo Add "Jump Top" Links
  * @return string HTML-Table
  */
 function show()
 {
     if ($this->mode > 0) {
         $this->tracker("END DEBUG-CLASS");
         $out .= "<div align=\"left\"><table width=\"100%\" border=\"0\" cols=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
         /*          $out .= debug::row_top("<a name=\"debug_top\"><b>Quicknavi</b></a>");
                   $out .= debug::row_single("<a href=\"#debugtracker\">Debugtracker</a>&nbsp;|&nbsp;"
                                            ."<a href=\"#debugvars\">User-Debugvars</a>&nbsp;|&nbsp;"
                                            ."<a href=\"#post\">\$_POST</a>&nbsp;|&nbsp;"
                                            ."<a href=\"#get\">\$_GET</a>&nbsp;|&nbsp;"
                                            ."<a href=\"#cookie\">\$_COOKIE</a>&nbsp;|&nbsp;"
                                            ."<a href=\"#session\">\$_SESSION</a>&nbsp;|&nbsp;"
                                            ."<a href=\"#server\">\$_SERVER</a>&nbsp;|&nbsp;"
                                            ."<a href=\"#files\">\$_FILES</a>&nbsp;|&nbsp;"
                                            ."<a href=\"#sql_querys\">SQL-Querys</a>");*/
         $out .= debug::row_top("<a name=\"debugtracker\"><b>Debugtracker</b></a>");
         $out .= debug::row_single($this->timer_show());
         /*
                   $out .= debug::row_top("<a name=\"debugvars\"><b>Userdefined Debugvars</b></a>");
                   $out .= debug::row_array($this->debugvars);
                   $out .= debug::row_top("<a name=\"post\"><b>\$_POST-Data</b></a>");
                   $out .= debug::row_array($_POST);
                   $out .= debug::row_top("<a name=\"get\"><b>\$_GET-Data</b></a>");
                   $out .= debug::row_array($_GET);
                   $out .= debug::row_top("<a name=\"cookie\"><b>\$_COOKIE-Data</b></a>");
                   $out .= debug::row_array($_COOKIE);
                   $out .= debug::row_top("<a name=\"session\"><b>\$_Session-Data</b></a>");
                   $out .= debug::row_array($_SESSION);
                   $out .= debug::row_top("<a name=\"server\"><b>\$_SERVER-Data</b></a>");
                   $out .= debug::row_array($_SERVER);
                   $out .= debug::row_top("<a name=\"files\"><b>\$_FILES-Data</b></a>");
                   $out .= debug::row_array($_FILES);
         */
         $out .= debug::row_top("<a name=\"sql_querys\"><b>SQL-Querys (" . count($this->sql_query_list) . ")</b></a>");
         $out .= $this->query_fetchlist();
         $out .= "</table></div>";
         // Mode 2 write complete Debugvars to a file. The directory has to be protected.
         if ($this->mode == "2") {
             echo $this->mode;
             $file_handle = fopen($this->debug_path . "debug_" . time() . ".htm", "a");
             fputs($file_handle, $out);
             fclose($file_handle);
         }
         return $out;
     } else {
         return "";
     }
 }