1 <?php // $Id: admin.php,v 1.2 2000-11-08 15:43:46 ahollosi Exp $
3 function rcs_id($id) {} // otherwise this gets in the way
5 define('WIKI_ADMIN', true); // has to be before includes
7 include("lib/config.php");
8 include("lib/stdlib.php");
10 // set these to your preferences. For heaven's sake
11 // pick a good password!
15 // Do not tolerate sloppy systems administration
16 if (empty($wikiadmin) || empty($adminpasswd)) {
17 echo "Set the administrator account and password first.\n";
21 // from the manual, Chapter 16
22 if (($PHP_AUTH_USER != $wikiadmin ) ||
23 ($PHP_AUTH_PW != $adminpasswd)) {
24 Header("WWW-Authenticate: Basic realm=\"PhpWiki\"");
25 Header("HTTP/1.0 401 Unauthorized");
26 echo "You entered an invalid login or password.\n";
30 // All requests require the database
31 $dbi = OpenDataBase($WikiPageStore);
33 if (isset($lock) || isset($unlock)) {
34 include ('admin/lockpage.php');
35 } elseif (isset($zip)) {
36 include ('lib/ziplib.php');
37 include ('admin/zip.php');
39 } elseif (isset($dumpserial)) {
40 include ('admin/dumpserial.php');
41 } elseif (isset($loadserial)) {
42 include ('admin/loadserial.php');
43 } elseif (isset($remove)) {
44 if (function_exists('RemovePage')) {
45 RemovePage($dbi, $remove);
46 $html = "Removed page '" . htmlspecialchars($remove)
49 $html = "Function not yet implemented.";
51 GeneratePage('MESSAGE', $html, 'Remove page', 0);