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.2 2004/08/01 02:22:36 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 // ¥µ¥Ö¥ë¡¼¥Á¥ó¤ÎÆɤ߹þ¤ß
50 require('plugin.php');
52 require('backup.php');
54 require('convert_html.php');
55 require('make_link.php');
57 require('config.php');
59 require('trackback.php');
63 if (!extension_loaded('mbstring')) {
64 require('mbstring.php');
67 // ½é´ü²½: ÀßÄê¥Õ¥¡¥¤¥ë¤ÎÆɤ߹þ¤ß
70 /////////////////////////////////////////////////
77 if (!empty($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);
84 $retvars = do_plugin_action($vars['plugin']);
85 if ($retvars !== FALSE) {
86 $base = array_key_exists('refer',$vars) ? $vars['refer'] : '';
91 else if (!empty($vars['cmd'])) {
92 if (!exist_plugin_action($vars['cmd'])) {
93 $s_cmd = htmlspecialchars($vars['cmd']);
94 $msg = "cmd=$s_cmd is not implemented.";
95 $retvars = array('msg'=>$msg,'body'=>$msg);
98 $retvars = do_plugin_action($vars['cmd']);
99 $base = $vars['page'];
103 if ($retvars !== FALSE) {
104 $title = htmlspecialchars(strip_bracket($base));
105 $page = make_search($base);
107 if (array_key_exists('msg',$retvars) and $retvars['msg'] != '') {
108 $title = str_replace('$1',$title,$retvars['msg']);
109 $page = str_replace('$1',$page,$retvars['msg']);
112 if (array_key_exists('body',$retvars) and $retvars['body'] != '') {
113 $body = $retvars['body'];
116 if ($base == '' or !is_page($base)) {
117 $base = $defaultpage;
118 $title = htmlspecialchars(strip_bracket($base));
119 $page = make_search($base);
122 $vars['cmd'] = 'read';
123 $vars['page'] = $base;
124 $body = convert_html(get_source($base));
125 $body .= tb_get_rdf($vars['page']);
126 ref_save($vars['page']);
130 catbody($title,$page,$body);