| 1 |
lars |
1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
2 |
<?php
|
|
|
3 |
/**
|
|
|
4 |
* phpDocumentor :: docBuilder Web Interface
|
|
|
5 |
*
|
|
|
6 |
* Advanced Web Interface to phpDocumentor
|
|
|
7 |
*
|
|
|
8 |
* PHP versions 4 and 5
|
|
|
9 |
*
|
|
|
10 |
* Copyright (c) 2003-2006 Andrew Eddie, Greg Beaver
|
|
|
11 |
*
|
|
|
12 |
* LICENSE:
|
|
|
13 |
*
|
|
|
14 |
* This library is free software; you can redistribute it
|
|
|
15 |
* and/or modify it under the terms of the GNU Lesser General
|
|
|
16 |
* Public License as published by the Free Software Foundation;
|
|
|
17 |
* either version 2.1 of the License, or (at your option) any
|
|
|
18 |
* later version.
|
|
|
19 |
*
|
|
|
20 |
* This library is distributed in the hope that it will be useful,
|
|
|
21 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
22 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
23 |
* Lesser General Public License for more details.
|
|
|
24 |
*
|
|
|
25 |
* You should have received a copy of the GNU Lesser General Public
|
|
|
26 |
* License along with this library; if not, write to the Free Software
|
|
|
27 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
28 |
*
|
|
|
29 |
* @package phpDocumentor
|
|
|
30 |
* @author Andrew Eddie
|
|
|
31 |
* @author Greg Beaver <cellog@php.net>
|
|
|
32 |
* @copyright 2003-2006 Andrew Eddie, Greg Beaver
|
|
|
33 |
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
|
|
|
34 |
* @version CVS: $Id: builder.php 212211 2006-04-30 22:18:14Z cellog $
|
|
|
35 |
* @filesource
|
|
|
36 |
* @see phpdoc.php
|
|
|
37 |
*/
|
|
|
38 |
|
|
|
39 |
if (!function_exists('version_compare'))
|
|
|
40 |
{
|
|
|
41 |
print "phpDocumentor requires PHP version 4.1.0 or greater to function";
|
|
|
42 |
exit;
|
|
|
43 |
}
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
if ('/usr/share/php/data' != '@'.'DATA-DIR@') {
|
|
|
47 |
// set up include path so we can find all files, no matter what
|
|
|
48 |
$root_dir = 'PhpDocumentor';
|
|
|
49 |
/**
|
|
|
50 |
* common file information
|
|
|
51 |
*/
|
|
|
52 |
include_once("$root_dir/phpDocumentor/common.inc.php");
|
|
|
53 |
$GLOBALS['_phpDocumentor_install_dir'] = 'PhpDocumentor';
|
|
|
54 |
// find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir]
|
|
|
55 |
$ini = phpDocumentor_parse_ini_file('/usr/share/php/data/PhpDocumentor/phpDocumentor.ini', true);
|
|
|
56 |
if (isset($ini['_phpDocumentor_options']['userdir']))
|
|
|
57 |
{
|
|
|
58 |
$configdir = $ini['_phpDocumentor_options']['userdir'];
|
|
|
59 |
} else {
|
|
|
60 |
$configdir = '/usr/share/php/data/user';
|
|
|
61 |
}
|
|
|
62 |
} else {
|
|
|
63 |
// set up include path so we can find all files, no matter what
|
|
|
64 |
$GLOBALS['_phpDocumentor_install_dir'] = dirname(dirname(realpath(__FILE__)));
|
|
|
65 |
$root_dir = dirname(dirname(__FILE__));
|
|
|
66 |
/**
|
|
|
67 |
* common file information
|
|
|
68 |
*/
|
|
|
69 |
include_once("$root_dir/phpDocumentor/common.inc.php");
|
|
|
70 |
// add my directory to the include path, and make it first, should fix any errors
|
|
|
71 |
if (substr(PHP_OS, 0, 3) == 'WIN')
|
|
|
72 |
{
|
|
|
73 |
ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].';'.ini_get('include_path'));
|
|
|
74 |
} else {
|
|
|
75 |
ini_set('include_path',$GLOBALS['_phpDocumentor_install_dir'].':'.ini_get('include_path'));
|
|
|
76 |
}
|
|
|
77 |
// find the .ini directory by parsing phpDocumentor.ini and extracting _phpDocumentor_options[userdir]
|
|
|
78 |
$ini = phpDocumentor_parse_ini_file($_phpDocumentor_install_dir . PATH_DELIMITER . 'phpDocumentor.ini', true);
|
|
|
79 |
if (isset($ini['_phpDocumentor_options']['userdir']))
|
|
|
80 |
{
|
|
|
81 |
$configdir = $ini['_phpDocumentor_options']['userdir'];
|
|
|
82 |
} else {
|
|
|
83 |
$configdir = $_phpDocumentor_install_dir . '/user';
|
|
|
84 |
}
|
|
|
85 |
}
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
// allow the user to change this at runtime
|
|
|
90 |
if (!empty($_REQUEST['altuserdir'])) $configdir = $_REQUEST['altuserdir'];
|
|
|
91 |
?>
|
|
|
92 |
<html>
|
|
|
93 |
<head>
|
|
|
94 |
<title>
|
|
|
95 |
output: docbuilder - phpDocumentor v<?php print PHPDOCUMENTOR_VER; ?> doc generation information
|
|
|
96 |
</title>
|
|
|
97 |
<style type="text/css">
|
|
|
98 |
body, td, th {
|
|
|
99 |
font-family: verdana,sans-serif;
|
|
|
100 |
font-size: 8pt;
|
|
|
101 |
}
|
|
|
102 |
</style>
|
|
|
103 |
|
|
|
104 |
</head>
|
|
|
105 |
<body bgcolor="#e0e0e0" text="#000000" topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">
|
|
|
106 |
|
|
|
107 |
<?php
|
|
|
108 |
// Find out if we are submitting and if we are, send it
|
|
|
109 |
// This code originally by Joshua Eichorn on phpdoc.php
|
|
|
110 |
//
|
|
|
111 |
if (isset($_GET['dataform']) && empty($_REQUEST['altuserdir'])) {
|
|
|
112 |
foreach ($_GET as $k=>$v) {
|
|
|
113 |
if (strpos( $k, 'setting_' ) === 0) {
|
|
|
114 |
$_GET['setting'][substr( $k, 8 )] = $v;
|
|
|
115 |
}
|
|
|
116 |
}
|
|
|
117 |
|
|
|
118 |
echo "<strong>Parsing Files ...</strong>";
|
|
|
119 |
flush();
|
|
|
120 |
echo "<pre>\n";
|
|
|
121 |
/** phpdoc.inc */
|
|
|
122 |
include("$root_dir/phpDocumentor/phpdoc.inc");
|
|
|
123 |
echo "</pre>\n";
|
|
|
124 |
echo "<h1>Operation Completed!!</h1>";
|
|
|
125 |
} else {
|
|
|
126 |
echo "whoops!";
|
|
|
127 |
}
|
|
|
128 |
?>
|