pearweb_manual
[ class tree: pearweb_manual ] [ index: pearweb_manual ] [ all elements ]

Source for file apidoc-log.php

Documentation is available at apidoc-log.php

  1. <?php
  2. /*
  3.    +----------------------------------------------------------------------+
  4.    | PEAR Web site version 1.0                                            |
  5.    +----------------------------------------------------------------------+
  6.    | Copyright (c) 2005 The PEAR Group                                    |
  7.    +----------------------------------------------------------------------+
  8.    | This source file is subject to version 2.02 of the PHP license,      |
  9.    | that is bundled with this package in the file LICENSE, and is        |
  10.    | available at through the world-wide-web at                           |
  11.    | http://www.php.net/license/2_02.txt.                                 |
  12.    | If you did not receive a copy of the PHP license and are unable to   |
  13.    | obtain it through the world-wide-web, please send a note to          |
  14.    | license@php.net so we can mail you a copy immediately.               |
  15.    +----------------------------------------------------------------------+
  16.    | Author: Martin Jansen <mj@php.net>                                   |
  17.    +----------------------------------------------------------------------+
  18.    $Id$
  19. */
  20.  
  21. redirect_to_https();
  22. auth_require("pear.dev");
  23. response_header("API Documentation Queue Log");
  24.  
  25. echo "<h1>API Documentation Queue Log</h1>";
  26.  
  27. if (!empty($_GET['filename'])) {
  28.     $filename urldecode($_GET['filename']);
  29.  
  30.     $query "SELECT queued, finished, log FROM apidoc_queue WHERE filename = ?";
  31.     $info $dbh->getRow($queryarray($filename)DB_FETCHMODE_ASSOC);
  32.  
  33.     if (!is_array($info)) {
  34.         echo "<div class=\"errors\">No such file " strip_tags($filename".</div>\n";
  35.     else {
  36.         echo "<p>Log for <strong>" $filename "</strong>:</p>\n";
  37.         echo "<ul>\n";
  38.         echo "  <li>Queued: " $info['queued'"</li>\n";
  39.         echo "  <li>Finished: " $info['finished'"</li>\n";
  40.         echo "  <li>Command output:<br /><pre>" strip_tags($info['log']"</pre></li>\n";
  41.         echo "</ul>\n";
  42.     }
  43. else {
  44.     $query "SELECT filename FROM apidoc_queue ORDER BY queued DESC";
  45.     $sth $dbh->query($query);
  46.  
  47.     echo "<p>Select a filename:</p>\n\n";
  48.  
  49.     echo "<ul>";
  50.     while ($row $sth->fetchRow(DB_FETCHMODE_ASSOC)) {
  51.         printf("<li><a href=\"/admin/apidoc-log.php?filename=%s\">%s</a></li>\n",
  52.             urlencode($row['filename']),
  53.             $row['filename']
  54.         );
  55.    }
  56.    echo "</ul>";
  57. }
  58.  
  59. response_footer();
  60. ?>

Documentation generated on Mon, 11 Mar 2019 16:04:25 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.