示例#1
0
/**
 * Loaded when config/config.ini was not found.
 * So we have no main loop and no request object yet.
 */
function init_install()
{
    // prevent from recursion
    static $already = 0;
    // setup default settings
    if (!$already) {
        IniConfig(dirname(__FILE__) . "/../config/config-dist.ini");
    }
    $already = 1;
}
 function render($lite = false, $full_screen = false)
 {
     if ($lite) {
         define('THEME', 'Codendi-lite');
     }
     if ($full_screen) {
         define('THEME', 'Codendi-light-printer-version');
     }
     $initial_include_path = ini_get('include_path');
     IniConfig(PHPWIKI_SRC_PATH . "/config/config.ini");
     ini_set('include_path', PHPWIKI_SRC_PATH . ':' . $initial_include_path . ':' . ini_get('include_path'));
     include PHPWIKI_SRC_PATH . "/codendi.php";
 }
示例#3
0
    // check password
    if (ENCRYPTED_PASSWD and function_exists('crypt')) {
        if (crypt($admin_pw, ADMIN_PASSWD) != ADMIN_PASSWD) {
            _http_logout();
        }
    } elseif ($admin_pw != ADMIN_PASSWD) {
        _http_logout();
    }
} else {
    if (!function_exists("IniConfig")) {
        include_once "lib/prepend.php";
        include_once "lib/IniConfig.php";
    }
    $def_file = substr(PHP_OS, 0, 3) == 'WIN' ? 'config\\config-default.ini' : 'config/config-default.ini';
    $fs_def_file = dirname(__FILE__) . (substr(PHP_OS, 0, 3) == 'WIN' ? '\\' : '/') . $def_file;
    IniConfig($fs_def_file);
}
echo '<', '?xml version="1.0" encoding="iso-8859-1"?', ">\n";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- $Id: configurator.php,v 1.40 2005/09/18 12:06:41 rurban Exp $ -->
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Configuration tool for PhpWiki <?php 
echo $config_file;
?>
</title>
<style type="text/css" media="screen">
<!--
示例#4
0
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

PhpWiki is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PhpWiki; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
require_once dirname(__FILE__) . '/lib/prepend.php';
rcs_id('$Id: index.php,v 1.147 2005/01/13 07:28:36 rurban Exp $');
require_once dirname(__FILE__) . '/lib/IniConfig.php';
IniConfig(dirname(__FILE__) . "/config/config.ini");
////////////////////////////////////////////////////////////////
// PrettyWiki
// Check if we were included by some other wiki version
// (getimg.php, en, de, wiki, ...) or not.
// If the server requested this index.php fire up the code by loading lib/main.php.
// Parallel wiki scripts can now simply include /index.php for the
// main configuration, extend or redefine some settings and
// load lib/main.php by themselves. See the file 'wiki'.
// This overcomes the IndexAsConfigProblem.
// Generally a simple
//   define('VIRTUAL_PATH', $_SERVER['SCRIPT_NAME']);
// is enough in the wiki file, plus the action definition in a .htaccess file
////////////////////////////////////////////////////////////////
// If any page is empty, comment the if ... line out,
// to force include "lib/main.php".