2 // PukiWiki - Yet another WikiWikiWeb clone.
5 // Copyright (C) 2002 by PukiWiki Developers Team
6 // http://pukiwiki.org/
9 // Copyright (C) 2002 by PukiWiki Developers Team
10 // http://pukiwiki.org/
12 // PukiWiki 1.3 (Base)
13 // Copyright (C) 2001,2002 by sng.
15 // http://factage.com/sng/pukiwiki/
18 // YukiWiki by Hiroshi Yuki
20 // http://www.hyuki.com/yukiwiki/
22 // This program is free software; you can redistribute it and/or modify
23 // it under the terms of the GNU General Public License as published by
24 // the Free Software Foundation; either version 2 of the License, or
25 // (at your option) any later version.
27 // This program is distributed in the hope that it will be useful,
28 // but WITHOUT ANY WARRANTY; without even the implied warranty of
29 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 // GNU General Public License for more details.
32 // $Id: pukiwiki.php,v 1.4 2004/10/10 12:58:30 henoheno Exp $
33 /////////////////////////////////////////////////
35 /////////////////////////////////////////////////
36 // ¥Ç¡¼¥¿¤ò³ÊǼ¤¹¤ë¥Ç¥£¥ì¥¯¥È¥ê¤äÀßÄê¥Õ¥¡¥¤¥ë¤òÃÖ¤¯¥Ç¥£¥ì¥¯¥È¥ê
38 if (! defined('DATA_HOME')) define('DATA_HOME', '');
40 /////////////////////////////////////////////////
41 // ¥µ¥Ö¥ë¡¼¥Á¥ó¤Î³ÊǼÀè¥Ç¥£¥ì¥¯¥È¥ê (¾¤Î *.php¥Õ¥¡¥¤¥ë)
43 if (! defined('LIB_DIR')) define('LIB_DIR', '');
45 /////////////////////////////////////////////////
46 // Include subroutines
48 require(LIB_DIR . 'func.php');
49 require(LIB_DIR . 'file.php');
50 require(LIB_DIR . 'plugin.php');
51 require(LIB_DIR . 'html.php');
52 require(LIB_DIR . 'backup.php');
54 require(LIB_DIR . 'convert_html.php');
55 require(LIB_DIR . 'make_link.php');
56 require(LIB_DIR . 'diff.php');
57 require(LIB_DIR . 'config.php');
58 require(LIB_DIR . 'link.php');
59 require(LIB_DIR . 'trackback.php');
60 require(LIB_DIR . 'auth.php');
61 require(LIB_DIR . 'proxy.php');
62 require(LIB_DIR . 'mail.php');
63 if (! extension_loaded('mbstring')) {
64 require(LIB_DIR . 'mbstring.php');
67 // ½é´ü²½: ÀßÄê¥Õ¥¡¥¤¥ë¤ÎÆɤ߹þ¤ß
68 require(LIB_DIR . 'init.php');
70 /////////////////////////////////////////////////
76 if (isset($vars['plugin'])) {
78 if (! exist_plugin_action($vars['plugin'])) {
79 $s_plugin = htmlspecialchars($vars['plugin']);
80 $msg = "plugin=$s_plugin is not implemented.";
81 $retvars = array('msg'=>$msg,'body'=>$msg);
83 $retvars = do_plugin_action($vars['plugin']);
84 if ($retvars !== FALSE)
85 $base = isset($vars['refer']) ? $vars['refer'] : '';
88 } else if (isset($vars['cmd'])) {
90 if (! exist_plugin_action($vars['cmd'])) {
91 $s_cmd = htmlspecialchars($vars['cmd']);
92 $msg = "cmd=$s_cmd is not implemented.";
93 $retvars = array('msg'=>$msg,'body'=>$msg);
95 $retvars = do_plugin_action($vars['cmd']);
96 $base = $vars['page'];
100 if ($retvars !== FALSE) {
101 $title = htmlspecialchars(strip_bracket($base));
102 $page = make_search($base);
104 if (isset($retvars['msg']) && $retvars['msg'] != '') {
105 $title = str_replace('$1', $title, $retvars['msg']);
106 $page = str_replace('$1', $page, $retvars['msg']);
109 if (isset($retvars['body']) && $retvars['body'] != '') {
110 $body = $retvars['body'];
112 if ($base == '' || ! is_page($base)) {
113 $base = $defaultpage;
114 $title = htmlspecialchars(strip_bracket($base));
115 $page = make_search($base);
118 $vars['cmd'] = 'read';
119 $vars['page'] = $base;
120 $body = convert_html(get_source($base));
121 $body .= tb_get_rdf($vars['page']);
122 ref_save($vars['page']);
126 catbody($title, $page, $body);