• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-jp-ancient: Commit

Nucleus CMS日本語版SVNをgit-svnしたもの。リポジトリの変換作業用


Commit MetaInfo

Revision4d524fbab4622bbd43335f2add27eb96e1c17aed (tree)
Time2007-03-27 20:50:10
Authorkimitake <kimitake@1ca2...>
Commiterkimitake

Log Message

rolled back...

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/branches/branch-3-2@243 1ca29b6e-896d-4ea0-84a5-967f57386b96

Change Summary

Incremental Difference

--- a/euc/action.php
+++ b/euc/action.php
@@ -1,36 +1,37 @@
11 <?php
22 /*
3- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4- * Copyright (C) 2002-2007 The Nucleus Group
5- *
6- * This program is free software; you can redistribute it and/or
7- * modify it under the terms of the GNU General Public License
8- * as published by the Free Software Foundation; either version 2
9- * of the License, or (at your option) any later version.
10- * (see nucleus/documentation/index.html#license for more info)
3+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4+ * Copyright (C) 2002-2005 The Nucleus Group
5+ *
6+ * This program is free software; you can redistribute it and/or
7+ * modify it under the terms of the GNU General Public License
8+ * as published by the Free Software Foundation; either version 2
9+ * of the License, or (at your option) any later version.
10+ * (see nucleus/documentation/index.html#license for more info)
1111 */
1212
1313 /**
14- * File containing actions that can be performed by visitors of the site,
15- * like adding comments, etc...
14+ * File containing actions that can be performed by visitors of the site,
15+ * like adding comments, etc...
1616 * @license http://nucleuscms.org/license.txt GNU General Public License
17- * @copyright Copyright (C) 2002-2007 The Nucleus Group
18- * @version $Id: action.php,v 1.4.2.2 2007-03-27 11:26:50 kimitake Exp $
19- * $NucleusJP: action.php,v 1.7 2007/02/04 06:28:44 kimitake Exp $
20- */
17+ * @copyright Copyright (C) 2002-2005 The Nucleus Group
18+ * @version $Id: action.php,v 1.4.2.3 2007-03-27 11:50:10 kimitake Exp $
19+ * @version $NucleusJP: action.php,v 1.4.2.1 2005/08/23 08:08:37 kimitake Exp $
20+ */
2121
22-$CONF = array();
23-include('./config.php');
2422
25-// common functions
23+$CONF = array();
24+include('./config.php'); // common functions
2625 include_once($DIR_LIBS . 'ACTION.php');
2726
2827 $action = requestVar('action');
28+
2929 $a =& new ACTION();
3030 $errorInfo = $a->doAction($action);
3131
32-if ($errorInfo) {
33- doError($errorInfo['message'], new SKIN($errorInfo['skinid']) );
32+if ($errorInfo)
33+{
34+ doError($errorInfo['message'], new SKIN($errorInfo['skinid']));
3435 }
3536
36-?>
\ No newline at end of file
37+?>
--- a/euc/atom.php
+++ b/euc/atom.php
@@ -1,24 +1,25 @@
11 <?php
2+
23 /*
3- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4- * Copyright (C) 2002-2007 The Nucleus Group
5- *
6- * This program is free software; you can redistribute it and/or
7- * modify it under the terms of the GNU General Public License
8- * as published by the Free Software Foundation; either version 2
9- * of the License, or (at your option) any later version.
10- * (see nucleus/documentation/index.html#license for more info)
4+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
5+ * Copyright (C) 2002-2005 The Nucleus Group
6+ *
7+ * This program is free software; you can redistribute it and/or
8+ * modify it under the terms of the GNU General Public License
9+ * as published by the Free Software Foundation; either version 2
10+ * of the License, or (at your option) any later version.
11+ * (see nucleus/documentation/index.html#license for more info)
1112 */
1213
1314 /**
14- * Nucleus Atom Syndication
15+ * Nucleus Atom Syndication
1516 * @license http://nucleuscms.org/license.txt GNU General Public License
16- * @copyright Copyright (C) 2002-2007 The Nucleus Group
17- * @version $Id: atom.php,v 1.4.2.2 2007-03-27 11:26:50 kimitake Exp $
18- * $NucleusJP: atom.php,v 1.7 2007/02/04 06:28:44 kimitake Exp $
19- */
17+ * @copyright Copyright (C) 2002-2005 The Nucleus Group
18+ * @version $Id: atom.php,v 1.4.2.3 2007-03-27 11:46:50 kimitake Exp $
19+ * @version $NucleusJP: atom.php,v 1.4.2.1 2005/08/23 08:08:37 kimitake Exp $
20+ */
2021
21-header('Pragma: no-cache');
22+header("Pragma: no-cache");
2223
2324 $CONF = array();
2425 $CONF['Self'] = 'atom.php';
@@ -30,17 +31,17 @@ if (!$CONF['DisableSite']) {
3031 ob_start();
3132 selectSkin('feeds/atom');
3233 selector();
33- $feed = ob_get_contents();
34+ $feed = ob_get_contents();
3435 ob_end_clean();
35-
36+
3637 // create ETAG (hash of feed)
3738 // (HTTP_IF_NONE_MATCH has quotes around it)
38- $eTag = '"' . md5($feed) . '"';
39- header('Etag: ' . $eTag);
40-
39+ $eTag = '"'.md5($feed).'"';
40+ header('Etag: '.$eTag);
41+
4142 // compare Etag to what we got
42- if ($eTag == serverVar('HTTP_IF_NONE_MATCH') ) {
43- header('HTTP/1.0 304 Not Modified');
43+ if ($eTag == serverVar('HTTP_IF_NONE_MATCH')) {
44+ header("HTTP/1.0 304 Not Modified");
4445 header('Content-Length: 0');
4546 } else {
4647 $feed = mb_convert_encoding($feed, "UTF-8", "EUC-JP");
@@ -48,7 +49,7 @@ if (!$CONF['DisableSite']) {
4849 // dump feed
4950 echo $feed;
5051 }
51-
52+
5253 }
5354
54-?>
\ No newline at end of file
55+?>
--- a/euc/config.php
+++ b/euc/config.php
@@ -33,6 +33,6 @@ if (!@file_exists($DIR_LIBS . 'globalfunctions.php')) {
3333 // include libs
3434 include($DIR_LIBS.'globalfunctions.php');
3535 if (!extension_loaded('mbstring')) {
36- include($DIR_LIBS.'mb_emulator/mb-emulator.php');
36+include($DIR_LIBS.'mb_emulator/mb-emulator.php');
3737 }
3838 ?>
\ No newline at end of file
--- a/euc/createaccount.html
+++ b/euc/createaccount.html
@@ -37,4 +37,4 @@
3737
3838 </form>
3939 </body>
40-</html>
\ No newline at end of file
40+</html>
--- a/euc/nucleus/bookmarklet.php
+++ b/euc/nucleus/bookmarklet.php
@@ -1,29 +1,29 @@
11 <?php
22 /*
3- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4- * Copyright (C) 2002-2007 The Nucleus Group
5- *
6- * This program is free software; you can redistribute it and/or
7- * modify it under the terms of the GNU General Public License
8- * as published by the Free Software Foundation; either version 2
9- * of the License, or (at your option) any later version.
10- * (see nucleus/documentation/index.html#license for more info)
3+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4+ * Copyright (C) 2002-2005 The Nucleus Group
5+ *
6+ * This program is free software; you can redistribute it and/or
7+ * modify it under the terms of the GNU General Public License
8+ * as published by the Free Software Foundation; either version 2
9+ * of the License, or (at your option) any later version.
10+ * (see nucleus/documentation/index.html#license for more info)
1111 */
1212 /**
13- * This script allows adding items to Nucleus through bookmarklets. The member must be logged in
14- * in order to use this.
15- *
13+ * This script allows adding items to Nucleus through bookmarklets. The member must be logged in
14+ * in order to use this.
15+ *
1616 * @license http://nucleuscms.org/license.txt GNU General Public License
17- * @copyright Copyright (C) 2002-2007 The Nucleus Group
18- * @version $Id: bookmarklet.php,v 1.3.2.2 2007-03-27 11:26:59 kimitake Exp $
19- * $NucleusJP: bookmarklet.php,v 1.9 2007/02/04 06:28:45 kimitake Exp $
20- */
17+ * @copyright Copyright (C) 2002-2005 The Nucleus Group
18+ * @version $Id: bookmarklet.php,v 1.3.2.3 2007-03-27 11:46:58 kimitake Exp $
19+ * @version $NucleusJP: bookmarklet.php,v 1.3.2.1 2005/08/23 08:08:37 kimitake Exp $
20+ */
2121
2222 // bookmarklet is part of admin area (might need XML-RPC)
2323 $CONF = array();
2424 $CONF['UsingAdminArea'] = 1;
2525
26-// include all classes and config data
26+// include all classes and config data
2727 include('../config.php');
2828
2929 $action = requestVar('action');
@@ -33,76 +33,61 @@ if ($action == 'contextmenucode') {
3333 exit;
3434 }
3535
36-if (!$member->isLoggedIn() ) {
36+if (!$member->isLoggedIn()) {
3737 bm_loginAndPassThrough();
3838 exit;
3939 }
4040
4141 // on successfull login
42-if ( ($action == 'login') && ($member->isLoggedIn() ) ) {
42+if (($action == 'login') && ($member->isLoggedIn()))
4343 $action = requestVar('nextaction');
44-}
45-
46-if ($action == '') {
44+if ($action == '')
4745 $action = 'add';
48-}
49-
50-sendContentType('application/xhtml+xml', 'bookmarklet-' . $action);
46+
47+sendContentType('application/xhtml+xml', 'bookmarklet-'.$action);
5148
5249 // check ticket
5350 $action = strtolower($action);
5451 $aActionsNotToCheck = array('login', 'add', 'edit');
55-
56-if (!in_array($action, $aActionsNotToCheck) ) {
57-
58- if (!$manager->checkTicket() ) {
52+if (!in_array($action, $aActionsNotToCheck))
53+{
54+ if (!$manager->checkTicket())
5955 bm_doError(_ERROR_BADTICKET);
60- }
56+}
6157
62-}
6358
6459 // find out what to do
6560 switch ($action) {
66- // adds the item for real
6761 case 'additem':
68- bm_doAddItem();
62+ bm_doAddItem(); // adds the item for real
6963 break;
70-
71- // shows the edit item form
7264 case 'edit':
73- bm_doEditForm();
65+ bm_doEditForm(); // shows the edit item form
7466 break;
75-
76- // edits the item for real
77- case 'edititem':
67+ case 'edititem': // edits the item for real
7868 bm_doEditItem();
7969 break;
80-
81- // on login, 'action' gets changed to 'nextaction'
82- case 'login':
70+ case 'login': // on login, 'action' gets changed to 'nextaction'
8371 bm_doError('Something went wrong');
8472 break;
85-
86- // shows the fill in form
8773 case 'add':
8874 default:
89- bm_doShowForm();
75+ bm_doShowForm(); // shows the fill in form
9076 break;
9177 }
92-
78+
9379 function bm_doAddItem() {
9480 global $member, $manager, $CONF;
95-
81+
9682 $manager->loadClass('ITEM');
9783 $result = ITEM::createFromRequest();
98-
99- if ($result['status'] == 'error') {
84+
85+ if ($result['status'] == 'error')
10086 bm_doError($result['message']);
101- }
10287
10388 $blogid = getBlogIDFromItemID($result['itemid']);
10489 $blog =& $manager->getBlog($blogid);
105-
90+
10691 if ($result['status'] == 'newcategory') {
10792 $message = 'アイテムは追加され、新しいカテゴリーが作成されました。 <a href="index.php?action=categoryedit&amp;blogid='.$blogid.'&amp;catid='.$result['catid'].'" onclick="if (event &amp;&amp; event.preventDefault) event.preventDefault(); window.open(this.href); return false;" title="Opens in new window">ここをクリックしてカテゴリーの名前と説明を編集してください。</a>';
10893 $extrahead = '';
@@ -114,55 +99,52 @@ function bm_doAddItem() {
11499 $message = _ITEM_ADDED;
115100 $extrahead = '';
116101 }
117-
102+
118103 bm_message(_ITEM_ADDED, _ITEM_ADDED, $message,$extrahead);
119104 }
120105
121106 function bm_doEditItem() {
122107 global $member, $manager, $CONF;
123-
124- $itemid = intRequestVar('itemid');
125- $catid = postVar('catid');
126-
108+
109+ $itemid = intRequestVar('itemid');
110+ $catid = postVar('catid');
111+
127112 // only allow if user is allowed to alter item
128- if (!$member->canUpdateItem($itemid, $catid) ) {
113+ if (!$member->canUpdateItem($itemid, $catid))
129114 bm_doError(_ERROR_DISALLOWED);
130- }
131115
132- $body = postVar('body');
133- $title = postVar('title');
134- $more = postVar('more');
135- $closed = intPostVar('closed');
116+ $body = postVar('body');
117+ $title = postVar('title');
118+ $more = postVar('more');
119+ $closed = intPostVar('closed');
136120 $actiontype = postVar('actiontype');
137- $draftid = intPostVar('draftid');
138-
121+
139122 // redirect to admin area on delete (has delete confirmation)
140123 if ($actiontype == 'delete') {
141- redirect('index.php?action=itemdelete&itemid=' . $itemid);
142- exit;
124+ redirect('index.php?action=itemdelete&itemid='.$itemid);
125+ exit;
143126 }
144-
127+
145128 // create new category if needed (only on edit/changedate)
146- if (strstr($catid,'newcat') ) {
147- // get blogid
148- list($blogid) = sscanf($catid, "newcat-%d");
129+ if (strstr($catid,'newcat')) {
130+ // get blogid
131+ list($blogid) = sscanf($catid,"newcat-%d");
149132
150133 // create
151134 $blog =& $manager->getBlog($blogid);
152135 $catid = $blog->createNewCategory();
153136
154137 // show error when sth goes wrong
155- if (!$catid) {
138+ if (!$catid)
156139 bm_doError('Could not create new category');
157- }
158- }
140+ }
159141
160142 // only edit action is allowed for bookmarklet edit
161143 switch ($actiontype) {
162144 case 'changedate':
163145 $publish = 1;
164146 $wasdraft = 0;
165- $timestamp = mktime(postVar('hour'), postVar('minutes'), 0, postVar('month'), postVar('day'), postVar('year') );
147+ $timestamp = mktime(postVar('hour'), postVar('minutes'), 0, postVar('month'), postVar('day'), postVar('year'));
166148 break;
167149 case 'edit':
168150 $publish = 1;
@@ -172,20 +154,15 @@ function bm_doEditItem() {
172154 default:
173155 bm_doError('Something went wrong');
174156 }
175-
157+
176158 // update item for real
177159 ITEM::update($itemid, $catid, $title, $body, $more, $closed, $wasdraft, $publish, $timestamp);
178-
179- if ($draftid > 0) {
180- ITEM::delete($draftid);
181- }
182-
160+
183161 // show success message
184- if ($catid != intPostVar('catid') ) {
162+ if ($catid != intPostVar('catid'))
185163 bm_message(_ITEM_UPDATED, _ITEM_UPDATED, 'アイテムは追加され、新しいカテゴリーが作成されました。<a href="index.php?action=categoryedit&amp;blogid='.$blog->getID().'&amp;catid='.$catid.'" onclick="if (event &amp;&amp; event.preventDefault) event.preventDefault(); window.open(this.href); return false;" title="Opens in new window">ここをクリックしてカテゴリーの名前と説明を編集してください。</a>', '');
186- } else {
164+ else
187165 bm_message(_ITEM_UPDATED, _ITEM_UPDATED, _ITEM_UPDATED, '');
188- }
189166 }
190167
191168 function bm_loginAndPassThrough() {
@@ -194,7 +171,7 @@ function bm_loginAndPassThrough() {
194171 $log_text = requestVar('logtext');
195172 $log_link = requestVar('loglink');
196173 $log_linktitle = requestVar('loglinktitle');
197-
174+
198175 ?>
199176 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
200177 <html xmlns="http://www.w3.org/1999/xhtml">
@@ -204,24 +181,24 @@ function bm_loginAndPassThrough() {
204181 <?php bm_style(); ?>
205182 </head>
206183 <body>
207- <h1><?php echo _LOGIN_PLEASE ?></h1>
208-
184+ <h1><?php echo _LOGIN_PLEASE?></h1>
185+
209186 <form method="post" action="bookmarklet.php">
210187 <p>
211188 <input name="action" value="login" type="hidden" />
212- <input name="blogid" value="<?php echo htmlspecialchars($blogid); ?>" type="hidden" />
213- <input name="logtext" value="<?php echo htmlspecialchars($log_text); ?>" type="hidden" />
214- <input name="loglink" value="<?php echo htmlspecialchars($log_link); ?>" type="hidden" />
215- <input name="loglinktitle" value="<?php echo htmlspecialchars($log_linktitle); ?>" type="hidden" />
216- <?php echo _LOGINFORM_NAME ?>:
189+ <input name="blogid" value="<?php echo htmlspecialchars($blogid) ?>" type="hidden" />
190+ <input name="logtext" value="<?php echo htmlspecialchars($log_text) ?>" type="hidden" />
191+ <input name="loglink" value="<?php echo htmlspecialchars($log_link) ?>" type="hidden" />
192+ <input name="loglinktitle" value="<?php echo htmlspecialchars($log_linktitle) ?>" type="hidden" />
193+ <?php echo _LOGINFORM_NAME?>:
217194 <br /><input name="login" />
218- <br /><?php echo _LOGINFORM_PWD ?>:
195+ <br /><?php echo _LOGINFORM_PWD?>:
219196 <br /><input name="password" type="password" />
220197 <br /><br />
221- <br /><input type="submit" value="<?php echo _LOGIN ?>" />
198+ <br /><input type="submit" value="<?php echo _LOGIN?>" />
222199 </p>
223200 </form>
224- <p><a href="bookmarklet.php" onclick="window.close();"><?php echo _POPUP_CLOSE ?></a></p>
201+ <p><a href="bookmarklet.php" onclick="window.close();"><?php echo _POPUP_CLOSE?></a></p>
225202 </body>
226203 </html>
227204 <?php
@@ -229,7 +206,7 @@ function bm_loginAndPassThrough() {
229206
230207 function bm_doShowForm() {
231208 global $member;
232-
209+
233210 $blogid = intRequestVar('blogid');
234211 $log_text = trim(requestVar('logtext'));
235212 $log_link = requestVar('loglink');
@@ -241,60 +218,53 @@ function bm_doShowForm() {
241218 if (!BLOG::existsID($blogid))
242219 bm_doError(_ERROR_NOSUCHBLOG);
243220
244- if (!$member->isTeamMember($blogid) ) {
221+ if (!$member->isTeamMember($blogid))
245222 bm_doError(_ERROR_NOTONTEAM);
246- }
247-
223+
248224 $logje = '';
249-
250- if ($log_text) {
251- $logje .= '<blockquote><div>"' . htmlspecialchars($log_text) . '"</div></blockquote>' . "\n";
252- }
253-
254- if (!$log_linktitle) {
225+ if ($log_text)
226+ $logje .= '<blockquote><div>"' . htmlspecialchars($log_text) .'"</div></blockquote>' . "\n";
227+ if (!$log_linktitle)
255228 $log_linktitle = $log_link;
256- }
257-
258- if ($log_link) {
259- $logje .= '<a href="' . htmlspecialchars($log_link) . '">' . htmlspecialchars($log_linktitle) . '</a>';
260- }
229+ if ($log_link)
230+ $logje .= '<a href="'. htmlspecialchars($log_link) . '">'. htmlspecialchars($log_linktitle).'</a>';
231+
261232
262233 $item['body'] = $logje;
263234 $item['title'] = htmlspecialchars($log_linktitle);
264235
265236 $factory = new PAGEFACTORY($blogid);
266- $factory->createAddForm('bookmarklet', $item);
237+ $factory->createAddForm('bookmarklet',$item);
267238 }
268239
269240 function bm_doEditForm() {
270241 global $member, $manager;
271-
242+
272243 $itemid = intRequestVar('itemid');
273-
274- if (!$manager->existsItem($itemid, 0, 0) ) {
244+
245+ if (!$manager->existsItem($itemid, 0, 0))
275246 bm_doError(_ERROR_NOSUCHITEM);
276- }
277-
278- if (!$member->canAlterItem($itemid) ) {
247+
248+ if (!$member->canAlterItem($itemid))
279249 bm_doError(_ERROR_DISALLOWED);
280- }
281-
282- $item =& $manager->getItem($itemid, 1, 1);
283- $blog =& $manager->getBlog(getBlogIDFromItemID($itemid) );
284-
285- $manager->notify('PrepareItemForEdit', array('item' => &$item) );
250+
251+ $item =& $manager->getItem($itemid,1,1);
252+ $blog =& $manager->getBlog(getBlogIDFromItemID($itemid));
253+
254+ $manager->notify('PrepareItemForEdit', array('item' => &$item));
286255
287- if ($blog->convertBreaks() ) {
256+ if ($blog->convertBreaks()) {
288257 $item['body'] = removeBreaks($item['body']);
289258 $item['more'] = removeBreaks($item['more']);
290259 }
291260
292- $formfactory = new PAGEFACTORY($blog->getID() );
293- $formfactory->createEditForm('bookmarklet', $item);
261+ $formfactory = new PAGEFACTORY($blog->getID());
262+ $formfactory->createEditForm('bookmarklet',$item);
263+
294264 }
295265
296266 function bm_doError($msg) {
297- bm_message(_ERROR, _ERRORMSG, $msg);
267+ bm_message(_ERROR,_ERRORMSG,$msg);
298268 die;
299269 }
300270
@@ -306,34 +276,33 @@ function bm_message($title, $head, $msg, $extrahead = '') {
306276 <meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET ?>" />
307277 <title><?php echo $title ?></title>
308278 <?php bm_style(); ?>
309- <?php echo $extrahead; ?>
279+ <?php echo $extrahead?>
310280 </head>
311281 <body>
312- <h1><?php echo $head; ?></h1>
313- <p><?php echo $msg; ?></p>
314- <p><a href="bookmarklet.php" onclick="window.close();"><?php echo _POPUP_CLOSE ?></a></p>
282+ <h1><?php echo $head ?></h1>
283+ <p><?php echo $msg ?></p>
284+ <p><a href="bookmarklet.php" onclick="window.close();"><?php echo _POPUP_CLOSE?></a></p>
315285 </body>
316286 </html>
317-
318- <?php
319-}
287+
288+ <?php }
320289
321290 function bm_style() {
322291 echo '<link rel="stylesheet" type="text/css" href="styles/bookmarklet.css" />';
323- echo '<link rel="stylesheet" type="text/css" href="styles/addedit.css" />';
292+ echo '<link rel="stylesheet" type="text/css" href="styles/addedit.css" />';
324293 }
325294
326295 function bm_doContextMenuCode() {
327296 global $CONF;
328297 ?>
329298 <script type="text/javascript" defer="defer">
330-doc = external.menuArguments.document;
331-lt = escape(doc.selection.createRange().text);
332-loglink = escape(external.menuArguments.location.href);
333-loglinktitle = escape(doc.title);
334-wingm = window.open('<?php echo $CONF['AdminURL']?>bookmarklet.php?blogid=<?php echo intGetVar('blogid')?>&logtext=' + lt + '&loglink=' + loglink + '&loglinktitle=' + loglinktitle, 'nucleusbm', 'scrollbars=yes,width=600,height=500,left=10,top=10,status=yes,resizable=yes');
299+doc=external.menuArguments.document;
300+lt=escape(doc.selection.createRange().text);
301+loglink=escape(external.menuArguments.location.href);
302+loglinktitle=escape(doc.title);
303+wingm=window.open('<?php echo $CONF['AdminURL']?>bookmarklet.php?blogid=<?php echo intGetVar('blogid')?>&logtext='+lt+'&loglink='+loglink+'&loglinktitle='+loglinktitle,'nucleusbm','scrollbars=yes,width=600,height=500,left=10,top=10,status=yes,resizable=yes');
335304 wingm.focus();
336-</script>
305+</script>
337306 <?php
338307 }
339308
--- a/euc/nucleus/forgotpassword.html
+++ b/euc/nucleus/forgotpassword.html
@@ -1,9 +1,9 @@
11 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
22 <html xmlns="http://www.w3.org/1999/xhtml">
33 <head>
4- <!-- $Id: forgotpassword.html,v 1.6.2.1 2007-03-27 11:26:59 kimitake Exp $ -->
5- <!-- $NucleusJP: forgotpassword.html,v 1.10 2007/02/21 15:19:32 kimitake Exp $ -->
6- <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
4+ <!-- $Id: forgotpassword.html,v 1.6.2.2 2007-03-27 11:46:58 kimitake Exp $ -->
5+ <!-- $NucleusJP: forgotpassword.html,v 1.6 2005/03/16 08:04:14 kimitake Exp $ -->
6+ <meta http-equiv="content-type" content="application/xhtml+xml; charset=EUC-JP" />
77 <title>Nucleus - パスワードの紛失</title>
88 <style type="text/css">
99 <!--
@@ -43,7 +43,7 @@
4343
4444
4545 <div class="foot">
46- <a href="http://nucleuscms.org/">Nucleus &copy; 2001-2007 The Nucleus Group</a>
46+ <a href="http://nucleuscms.org/">Nucleus &copy; 2001-2005 The Nucleus Group</a>
4747 </div>
4848
4949 </div><!-- content -->
--- a/euc/nucleus/forms/commentform-loggedin.template
+++ b/euc/nucleus/forms/commentform-loggedin.template
@@ -1,18 +1,19 @@
11 <a id="nucleus_cf"></a>
22 <form method="post" action="#nucleus_cf">
3- <div class="commentform">
4-<input type="hidden" name="action" value="addcomment" />
5-<input type="hidden" name="url" value="<%formdata(destinationurl)%>" />
6-<input type="hidden" name="itemid" value="<%itemid%>" />
7- <%errordiv%>
8- <label for="nucleus_cf_body"><%text(_COMMENTFORM_COMMENT)%></label>
9- <textarea name="body" class="formfield" cols="40" rows="10" id="nucleus_cf_body"><%formdata(body)%></textarea>
10-
11- <%text(_COMMENTFORM_YOUARE)%> <%formdata(membername)%>
12- <small>(<a href="<%self%>?action=logout" title="<%text(_LOGOUT)%>"><%text(_LOGOUT)%></a>)</small>
13-
14- <input type="submit" alt="<%text(_COMMENTFORM_SUBMIT)%>" value="<%text(_COMMENTFORM_SUBMIT)%>" class="formbutton" />
15-
16- <%callback(FormExtra,commentform-loggedin)%>
17- </div>
18-</form>
3+ <div class="commentform">
4+ <%errordiv%>
5+
6+ <input type="hidden" name="action" value="addcomment" />
7+ <input type="hidden" name="url" value="<%formdata(destinationurl)%>" />
8+ <input type="hidden" name="itemid" value="<%itemid%>" />
9+ <label for="nucleus_cf_body"><%text(_COMMENTFORM_COMMENT)%></label>:
10+ <br />
11+ <textarea name="body" class="formfield" cols="40" rows="10" id="nucleus_cf_body"><%formdata(body)%></textarea>
12+ <br />
13+ <%text(_COMMENTFORM_YOUARE)%> <%formdata(membername)%>
14+ <small>(<a href="?action=logout"><%text(_LOGOUT)%></a>)</small>
15+ <br />
16+ <input type="submit" value="<%text(_COMMENTFORM_SUBMIT)%>" class="formbutton" />
17+ <%callback(FormExtra,commentform-loggedin)%>
18+ </div>
19+</form>
\ No newline at end of file
--- a/euc/nucleus/forms/commentform-notloggedin.template
+++ b/euc/nucleus/forms/commentform-notloggedin.template
@@ -1,28 +1,25 @@
11 <a id="nucleus_cf"></a>
2-<form method="post" action="#nucleus_cf">
3- <div class="commentform">
4-<input type="hidden" name="action" value="addcomment" />
5-<input type="hidden" name="url" value="<%formdata(destinationurl)%>" />
6-<input type="hidden" name="itemid" value="<%itemid%>" />
7- <%errordiv%>
2+<form method="post" action="#nucleus_cf">
3+ <div class="commentform">
84
9- <label for="nucleus_cf_body"><%text(_COMMENTFORM_COMMENT)%></label>
10- <textarea name="body" class="formfield" cols="40" rows="10" id="nucleus_cf_body"><%formdata(body)%></textarea>
5+ <%errordiv%>
116
12- <label for="nucleus_cf_name"><%text(_COMMENTFORM_NAME)%></label>
13- <input name="user" size="40" maxlength="40" value="<%formdata(user)%>" class="formfield" id="nucleus_cf_name" />
7+ <input type="hidden" name="action" value="addcomment" />
8+ <input type="hidden" name="url" value="<%formdata(destinationurl)%>" />
9+ <input type="hidden" name="itemid" value="<%itemid%>" />
10+ <label for="nucleus_cf_body"><%text(_COMMENTFORM_COMMENT)%></label>:
11+ <br />
12+ <textarea name="body" class="formfield" cols="40" rows="10" id="nucleus_cf_body"><%formdata(body)%></textarea>
13+ <br />
14+ <label for="nucleus_cf_name"><%text(_COMMENTFORM_NAME)%></label>: <input name="user" size="40" maxlength="40" value="<%formdata(user)%>" class="formfield" id="nucleus_cf_name" />
15+ <br />
16+ <label for="nucleus_cf_mail"><%text(_COMMENTFORM_MAIL)%></label>: <input name="userid" size="40" maxlength="60" value="<%formdata(userid)%>" class="formfield" id="nucleus_cf_mail" />
1417
15- <label for="nucleus_cf_mail"><%text(_COMMENTFORM_MAIL)%></label>
16- <input name="userid" size="40" maxlength="60" value="<%formdata(userid)%>" class="formfield" id="nucleus_cf_mail" />
17-
18- <label for="nucleus_cf_email"><%text(_COMMENTFORM_EMAIL)%></label>
19- <input name="email" size="40" maxlength="100" value="<%formdata(email)%>" class="formfield" id="nucleus_cf_email" />
20-
21- <%callback(FormExtra,commentform-notloggedin)%>
22-
23- <input type="checkbox" value="1" name="remember" id="nucleus_cf_remember" <%formdata(rememberchecked)%> />
24- <label for="nucleus_cf_remember"><%text(_COMMENTFORM_REMEMBER)%></label>
25-
26- <input type="submit" alt="<%text(_COMMENTFORM_SUBMIT)%>" value="<%text(_COMMENTFORM_SUBMIT)%>" class="formbutton" />
27- </div>
28-</form>
18+ <%callback(FormExtra,commentform-notloggedin)%>
19+
20+ <br />
21+ <input type="checkbox" value="1" name="remember" id="nucleus_cf_remember" <%formdata(rememberchecked)%> /><label for="nucleus_cf_remember"><%text(_COMMENTFORM_REMEMBER)%></label>
22+ <br />
23+ <input type="submit" value="<%text(_COMMENTFORM_SUBMIT)%>" class="formbutton" />
24+ </div>
25+</form>
\ No newline at end of file
--- a/euc/nucleus/forms/loginform-loggedin.template
+++ b/euc/nucleus/forms/loginform-loggedin.template
@@ -1,4 +1,4 @@
11 <a id="nucleus_lf"></a>
22 <div class="loginform">
3- <%text(_LOGINFORM_YOUARE)%> <%formdata(membername)%> ! (<a href="<%self%>?action=logout" title="<%text(_LOGOUT)%>"><%text(_LOGOUT)%></a>)
3+ <%text(_LOGINFORM_YOUARE)%> <%formdata(membername)%> ! (<a href="<%self%>?action=logout"><%text(_LOGOUT)%></a>)
44 </div>
--- a/euc/nucleus/forms/loginform-notloggedin.template
+++ b/euc/nucleus/forms/loginform-notloggedin.template
@@ -1,18 +1,16 @@
11 <a id="nucleus_lf"></a>
22 <form method="post" action="#nucleus_lf">
3- <div class="loginform">
4-<input type="hidden" name="action" value="login" />
5- <%errordiv%>
6-
7- <label for="nucleus_lf_name" accesskey="l"><%text(_LOGINFORM_NAME)%></label>
8- <input id="nucleus_lf_name" name="login" size="10" value="" class="formfield" />
9-
10- <label for="nucleus_lf_pwd"><%text(_LOGINFORM_PWD)%></label>
11- <input id="nucleus_lf_pwd" name="password" size="10" type="password" value="" class="formfield" />
12-
13- <input type="checkbox" value="1" name="shared" id="nucleus_lf_shared" />
14- <label for="nucleus_lf_shared"><%text(_LOGINFORM_SHARED)%></label>
15-
16- <input type="submit" alt="<%text(_LOGIN)%>" value="<%text(_LOGIN)%>" class="formbutton" />
17- </div>
18-</form>
3+ <div class="loginform">
4+
5+ <%errordiv%>
6+
7+ <input type="hidden" name="action" value="login" />
8+ <label for="nucleus_lf_name" accesskey="l"><%text(_LOGINFORM_NAME)%></label>: <input id="nucleus_lf_name" name="login" size="10" value="" class="formfield" />
9+ <br />
10+ <label for="nucleus_lf_pwd"><%text(_LOGINFORM_PWD)%></label>: <input id="nucleus_lf_pwd" name="password" size="10" type="password" value="" class="formfield" />
11+ <br />
12+ <input type="submit" value="<%text(_LOGIN)%>" class="formbutton" />
13+ <br />
14+ <input type="checkbox" value="1" name="shared" id="nucleus_lf_shared" /><label for="nucleus_lf_shared"><%text(_LOGINFORM_SHARED)%></label>
15+ </div>
16+</form>
\ No newline at end of file
--- a/euc/nucleus/forms/membermailform-loggedin.template
+++ b/euc/nucleus/forms/membermailform-loggedin.template
@@ -1,15 +1,19 @@
11 <a id="nucleus_mf"></a>
22 <form method="post" action="#nucleus_mf">
3- <div class="mailform">
4-<input type="hidden" name="memberid" value="<%formdata(memberid)%>" />
5-<input type="hidden" name="action" value="sendmessage" />
6-<input type="hidden" name="url" value="<%formdata(url)%>" />
7- <%errordiv%>
3+ <div class="mailform">
4+ <%errordiv%>
5+
6+ <input type="hidden" name="memberid" value="<%formdata(memberid)%>" />
7+ <input type="hidden" name="action" value="sendmessage" />
88
9- <textarea alt="<%text(_MMAIL_MAIL)%>" name="message" class="formfield" rows="<%formdata(rows)%>" cols="<%formdata(cols)%>"><%formdata(message)%></textarea>
9+ <input type="hidden" name="url" value="<%formdata(url)%>" />
1010
11- <%callback(FormExtra,membermailform-loggedin)%>
11+ <textarea name="message" class="formfield" rows="<%formdata(rows)%>" cols="<%formdata(cols)%>"><%formdata(message)%></textarea>
1212
13- <input type="submit" alt="<%text(_MEMBERMAIL_SUBMIT)%>" value="<%text(_MEMBERMAIL_SUBMIT)%>" class="formbutton" />
14- </div>
15-</form>
13+ <%callback(FormExtra,membermailform-loggedin)%>
14+
15+ <br />
16+ <input type="submit" value="<%text(_MEMBERMAIL_SUBMIT)%>" class="formbutton" />
17+
18+ </div>
19+</form>
--- a/euc/nucleus/forms/membermailform-notloggedin.template
+++ b/euc/nucleus/forms/membermailform-notloggedin.template
@@ -1,18 +1,20 @@
11 <a id="nucleus_mf"></a>
22 <form method="post" action="#nucleus_mf">
3- <div class="mailform">
4-<input type="hidden" name="memberid" value="<%formdata(memberid)%>" />
5-<input type="hidden" name="action" value="sendmessage" />
6-<input type="hidden" name="url" value="<%formdata(url)%>" />
7- <%errordiv%>
3+ <div class="mailform">
4+ <%errordiv%>
5+
6+ <input type="hidden" name="memberid" value="<%formdata(memberid)%>" />
7+ <input type="hidden" name="action" value="sendmessage" />
88
9- <textarea alt="<%text(_MMAIL_MAIL)%>" name="message" class="formfield" rows="<%formdata(rows)%>" cols="<%formdata(cols)%>"><%formdata(message)%></textarea>
9+ <input type="hidden" name="url" value="<%formdata(url)%>" />
1010
11- <label for="nucleus_mmf_frommail"><%text(_MEMBERMAIL_MAIL)%></label>
12- <input id="nucleus_mmf_frommail" type="text" name="frommail" class="formfield" value="<%formdata(frommail)%>" />
13-
14- <%callback(FormExtra,membermailform-notloggedin)%>
15-
16- <input type="submit" alt="<%text(_MEMBERMAIL_SUBMIT)%>" value="<%text(_MEMBERMAIL_SUBMIT)%>" class="formbutton" />
17- </div>
18-</form>
11+ <textarea name="message" class="formfield" rows="<%formdata(rows)%>" cols="<%formdata(cols)%>"><%formdata(message)%></textarea>
12+ <br />
13+ <%text(_MEMBERMAIL_MAIL)%><input type="text" name="frommail" class="formfield" value="<%formdata(frommail)%>" />
14+
15+ <%callback(FormExtra,membermailform-notloggedin)%>
16+
17+ <br />
18+ <input type="submit" value="<%text(_MEMBERMAIL_SUBMIT)%>" class="formbutton" />
19+ </div>
20+</form>
--- a/euc/nucleus/forms/nucleusbutton.template
+++ b/euc/nucleus/forms/nucleusbutton.template
@@ -1,3 +1,3 @@
11 <div class="nucleusbutton">
2- <a href="http://nucleuscms.org/"><img src="<%formdata(imgurl)%>" width="<%formdata(imgwidth)%>" height="<%formdata(imgheight)%>" alt="Powered by Nucleus CMS" title="Powered by Nucleus CMS" /></a>
2+<a href="http://nucleuscms.org/"><img src="<%formdata(imgurl)%>" width="<%formdata(imgwidth)%>" height="<%formdata(imgheight)%>" alt="Powered by Nucleus CMS" /></a>
33 </div>
--- a/euc/nucleus/forms/searchform.template
+++ b/euc/nucleus/forms/searchform.template
@@ -1,8 +1,9 @@
11 <form method="get" action="<%self%>">
2- <div class="searchform">
3-<input type="hidden" name="amount" value="0" />
4-<input type="hidden" name="blogid" value="<%formdata(id)%>" />
5- <input name="query" alt="<%text(_SEARCHFORM_QUERY)%>" class="formfield" size="10" maxlength="60" accesskey="4" value="<%formdata(query)%>" />
6- <input type="submit" alt="<%text(_SEARCHFORM_SUBMIT)%>" value="<%text(_SEARCHFORM_SUBMIT)%>" class="formbutton" />
7- </div>
2+ <div class="searchform">
3+ <input name="query" class="formfield" size="10" maxlength="60" accesskey="4" value="<%formdata(query)%>" />
4+ <input type="hidden" name="amount" value="0" />
5+ <input type="hidden" name="blogid" value="<%formdata(id)%>" />
6+ <br />
7+ <input type="submit" value="<%text(_SEARCHFORM_SUBMIT)%>" class="formbutton" />
8+ </div>
89 </form>
--- a/euc/nucleus/index.php
+++ b/euc/nucleus/index.php
@@ -1,20 +1,20 @@
11 <?php
22 /*
3- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4- * Copyright (C) 2002-2007 The Nucleus Group
5- *
6- * This program is free software; you can redistribute it and/or
7- * modify it under the terms of the GNU General Public License
8- * as published by the Free Software Foundation; either version 2
9- * of the License, or (at your option) any later version.
10- * (see nucleus/documentation/index.html#license for more info)
3+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4+ * Copyright (C) 2002-2005 The Nucleus Group
5+ *
6+ * This program is free software; you can redistribute it and/or
7+ * modify it under the terms of the GNU General Public License
8+ * as published by the Free Software Foundation; either version 2
9+ * of the License, or (at your option) any later version.
10+ * (see nucleus/documentation/index.html#license for more info)
1111 */
1212 /**
1313 * @license http://nucleuscms.org/license.txt GNU General Public License
14- * @copyright Copyright (C) 2002-2007 The Nucleus Group
15- * @version $Id: index.php,v 1.3.2.2 2007-03-27 11:26:59 kimitake Exp $
16- * $NucleusJP: index.php,v 1.8 2007/02/04 06:28:45 kimitake Exp $
17- */
14+ * @copyright Copyright (C) 2002-2005 The Nucleus Group
15+ * @version $Id: index.php,v 1.3.2.3 2007-03-27 11:46:58 kimitake Exp $
16+ * @version $NucleusJP: index.php,v 1.3.2.1 2005/08/23 08:08:37 kimitake Exp $
17+ */
1818 // we are using admin stuff:
1919 $CONF = array();
2020 $CONF['UsingAdminArea'] = 1;
@@ -51,10 +51,10 @@
5151
5252 $bNeedsLogin = false;
5353 $bIsActivation = in_array($action, array('activate', 'activatesetpwd'));
54-
55- if ($action == 'logout')
56- $bNeedsLogin = true;
57-
54+
55+ if ($action == 'logout')
56+ $bNeedsLogin = true;
57+
5858 if (!$member->isLoggedIn() && !$bIsActivation)
5959 $bNeedsLogin = true;
6060
@@ -63,7 +63,7 @@
6363 $error = _ERROR_LOGINDISALLOWED;
6464 $bNeedsLogin = true;
6565 }
66-
66+
6767 if ($bNeedsLogin)
6868 {
6969 setOldAction($action); // see ADMIN::login() (sets old action in POST vars)
@@ -71,7 +71,7 @@
7171 }
7272
7373 sendContentType('application/xhtml+xml', 'admin-' . $action);
74-
74+
7575 $admin = new ADMIN();
7676 $admin->action($action);
77-?>
\ No newline at end of file
77+?>
--- a/euc/nucleus/javascript/admin.js
+++ b/euc/nucleus/javascript/admin.js
@@ -1,6 +1,6 @@
11 /**
22 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
3- * Copyright (C) 2002-2007 The Nucleus Group
3+ * Copyright (C) 2002-2005 The Nucleus Group
44 *
55 * This program is free software; you can redistribute it and/or
66 * modify it under the terms of the GNU General Public License
@@ -10,8 +10,8 @@
1010 *
1111 * Some JavaScript code for the admin area
1212 *
13- * $Id: admin.js,v 1.3.2.1 2007-03-27 11:27:16 kimitake Exp $
14- * $NucleusJP: admin.js,v 1.6 2007/02/28 07:22:22 kimitake Exp $
13+ * $Id: admin.js,v 1.3.2.2 2007-03-27 11:47:14 kimitake Exp $
14+ * $NucleusJP: admin.js,v 1.3 2005/03/16 08:07:24 kimitake Exp $
1515 */
1616
1717 function help(url) {
@@ -46,15 +46,4 @@ function batchSelectAll(what) {
4646 }
4747 return false;
4848 }
49-function selectCanLogin(flag) {
50- if (flag) {
51- window.document.memberedit.canlogin[0].checked=true;
5249
53- // don't disable canlogin[0], otherwise the value won't be passed.
54-// window.document.memberedit.canlogin[0].disabled=true;
55- window.document.memberedit.canlogin[1].disabled=true;
56- } else {
57- window.document.memberedit.canlogin[0].disabled=false;
58- window.document.memberedit.canlogin[1].disabled=false;
59- }
60-}
--- a/euc/nucleus/javascript/bookmarklet.js
+++ b/euc/nucleus/javascript/bookmarklet.js
@@ -1,6 +1,6 @@
11 /**
22 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
3- * Copyright (C) 2002-2007 The Nucleus Group
3+ * Copyright (C) 2002-2005 The Nucleus Group
44 *
55 * This program is free software; you can redistribute it and/or
66 * modify it under the terms of the GNU General Public License
@@ -10,8 +10,8 @@
1010 *
1111 * Some JavaScript code for the bookmarklets
1212 *
13- * $Id: bookmarklet.js,v 1.3.2.1 2007-03-27 11:27:16 kimitake Exp $
14- * $NucleusJP: bookmarklet.js,v 1.5 2007/02/04 06:28:45 kimitake Exp $
13+ * $Id: bookmarklet.js,v 1.3.2.2 2007-03-27 11:47:14 kimitake Exp $
14+ * $NucleusJP: bookmarklet.js,v 1.3 2005/03/16 08:07:50 kimitake Exp $
1515 */
1616
1717 /**
--- a/euc/nucleus/javascript/compatibility.js
+++ b/euc/nucleus/javascript/compatibility.js
@@ -1,6 +1,6 @@
11 /**
22 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
3- * Copyright (C) 2002-2007 The Nucleus Group
3+ * Copyright (C) 2002-2005 The Nucleus Group
44 *
55 * This program is free software; you can redistribute it and/or
66 * modify it under the terms of the GNU General Public License
@@ -18,8 +18,8 @@
1818 *
1919 * That's basically it :)
2020 *
21- * $Id: compatibility.js,v 1.3.2.1 2007-03-27 11:27:16 kimitake Exp $
22- * $NucleusJP: compatibility.js,v 1.5 2007/02/04 06:28:45 kimitake Exp $
21+ * $Id: compatibility.js,v 1.3.2.2 2007-03-27 11:47:14 kimitake Exp $
22+ * $NucleusJP: compatibility.js,v 1.3 2005/03/16 08:07:50 kimitake Exp $
2323 */
2424
2525 // to get the script working when page is sent as application/xhtml+xml
--- a/euc/nucleus/javascript/edit.js
+++ b/euc/nucleus/javascript/edit.js
@@ -1,6 +1,6 @@
11 /**
2- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
3- * Copyright (C) 2002-2007 The Nucleus Group
2+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
3+ * Copyright (C) 2002-2005 The Nucleus Group
44 *
55 * This program is free software; you can redistribute it and/or
66 * modify it under the terms of the GNU General Public License
@@ -11,8 +11,8 @@
1111 * This file contains functions to allow adding items from inside the weblog.
1212 * Also contains code to avoid submitting form data twice.
1313 *
14- * $Id: edit.js,v 1.4.2.2 2007-03-27 11:27:16 kimitake Exp $
15- * $NucleusJP: edit.js,v 1.6 2007/02/04 06:28:45 kimitake Exp $
14+ * $Id: edit.js,v 1.4.2.3 2007-03-27 11:47:14 kimitake Exp $
15+ * $NucleusJP: edit.js,v 1.4.2.1 2005/09/27 06:58:41 kimitake Exp $
1616 */
1717
1818 var nucleusConvertBreaks = true;
@@ -28,17 +28,17 @@ function setAuthorId(id) { nucleusAuthorId = id; }
2828 function preview(id, value) {
2929 elem = document.getElementById(id);
3030 if (!elem) return;
31-
32- var preview = nucleusConvertBreaks ? str_replace("\n","<br />",value)+"&#160;" : value+"&#160;";
33-
31+
32+ var preview = nucleusConvertBreaks ? str_replace("\n","<br />",value)+"&nbsp;" : value+"&nbsp;";
33+
3434 // expand the media commands (without explicit collection)
3535 preview = preview.replace(/\<\%image\(([^\/\|]*)\|([^\|]*)\|([^\|]*)\|([^)]*)\)\%\>/g,"<img src='"+nucleusMediaURL+nucleusAuthorId+"/$1' width='$2' height='$3' alt=\"$4\" />");
36-
36+
3737 // expand the media commands (with collection)
3838 preview = preview.replace(/\<\%image\(([^\|]*)\|([^\|]*)\|([^\|]*)\|([^)]*)\)\%\>/g,"<img src='"+nucleusMediaURL+"$1' width='$2' height='$3' alt=\"$4\" />");
3939 preview = preview.replace(/\<\%popup\(([^\|]*)\|([^\|]*)\|([^\|]*)\|([^)]*)\)\%\>/g,"<a href='' onclick='if (event &amp;&amp; event.preventDefault) event.preventDefault(); alert(\"popup image\"); return false;' title='popup'>$4</a>");
40- preview = preview.replace(/\<\%media\(([^\|]*)\|([^)]*)\)\%\>/g,"<a href='' title='media link'>$2</a>");
41-
40+ preview = preview.replace(/\<\%media\(([^\|]*)\|([^)]*)\)\%\>/g,"<a href='' title='media link'>$2</a>");
41+
4242 elem.innerHTML = preview;
4343 }
4444
@@ -51,7 +51,7 @@ function showedit() {
5151 document.getElementById('edit').style.display = newval;
5252
5353 if (newval == "block")
54- updAllPreviews();
54+ updAllPreviews();
5555 }
5656
5757 function updAllPreviews() {
@@ -70,7 +70,7 @@ function isEditVisible() {
7070 function updPreview(id) {
7171 // don't update when preview is hidden
7272 if (!isEditVisible()) return;
73-
73+
7474 var inputField = document.getElementById('input' + id);
7575 if (!inputField) return;
7676 preview('prev' + id, inputField.value);
@@ -87,7 +87,7 @@ function str_replace(a, b, s)
8787
8888 function shortCuts() {
8989 if (!event || (event.ctrlKey != true)) return;
90-
90+
9191 switch (event.keyCode) {
9292 case 1:
9393 ahrefThis(); break; // ctrl-shift-a
@@ -97,7 +97,7 @@ function shortCuts() {
9797 italicThis(); break; // ctrl-shift-i
9898 case 13:
9999 addMedia(); break; // ctrl-shift-m
100- default:
100+ default:
101101 return;
102102 }
103103 return;
@@ -120,17 +120,17 @@ function ahrefThis() {
120120 strSelection = document.selection.createRange().text;
121121 else
122122 strSelection = '';
123-
123+
124124 strHref = prompt("Create a link to:","http://");
125125 if (strHref == null) return;
126-
126+
127127 var textpre = "<a href=\"" + strHref.replace(/&/g,'&amp;') + "\">";
128128 insertAroundCaret(textpre, "</a>");
129129 }
130130
131131 function execAndUpdate(action) {
132132 lastSelected.caretPos.execCommand(action);
133- updAllPreviews();
133+ updAllPreviews();
134134 }
135135
136136
@@ -138,12 +138,12 @@ var nonie_FormType = 'body';
138138
139139 // Add media to new item
140140 function addMedia() {
141-
141+
142142 var mediapopup = window.open(nucleusMediaPopupURL + 'media.php','name',
143143 'status=yes,toolbar=no,scrollbars=yes,resizable=yes,width=500,height=450,top=0,left=0');
144144
145145 return;
146-}
146+}
147147
148148
149149 function setMediaPopupURL(url) {
@@ -156,7 +156,7 @@ function includeImage(collection, filename, type, width, height) {
156156 } else {
157157 text = getCaretText();
158158 }
159-
159+
160160 // add collection name when not private collection (or editing a message that's not your)
161161 var fullName;
162162 if (isNaN(collection) || (nucleusAuthorId != collection)) {
@@ -164,8 +164,8 @@ function includeImage(collection, filename, type, width, height) {
164164 } else {
165165 fullName = filename;
166166 }
167-
168-
167+
168+
169169 var replaceBy;
170170 switch(type) {
171171 case 'popup':
@@ -175,9 +175,9 @@ function includeImage(collection, filename, type, width, height) {
175175 default:
176176 replaceBy = '<%image(' + fullName + '|'+width+'|'+height+'|' + text +')%>';
177177 }
178-
178+
179179 insertAtCaret(replaceBy);
180- updAllPreviews();
180+ updAllPreviews();
181181
182182 }
183183
@@ -188,19 +188,19 @@ function includeOtherMedia(collection, filename) {
188188 } else {
189189 text = getCaretText();
190190 }
191-
191+
192192 // add collection name when not private collection (or editing a message that's not your)
193193 var fullName;
194194 if (isNaN(collection) || (nucleusAuthorId != collection)) {
195195 fullName = collection + '/' + filename;
196196 } else {
197197 fullName = filename;
198- }
199-
198+ }
199+
200200 var replaceBy = '<%media(' + fullName + '|' + text +')%>';
201-
201+
202202 insertAtCaret(replaceBy);
203- updAllPreviews();
203+ updAllPreviews();
204204 }
205205
206206
--- a/euc/nucleus/javascript/numbercheck.js
+++ b/euc/nucleus/javascript/numbercheck.js
@@ -1,6 +1,6 @@
11 /**
22 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
3- * Copyright (C) 2002-2007 The Nucleus Group
3+ * Copyright (C) 2002-2005 The Nucleus Group
44 *
55 * This program is free software; you can redistribute it and/or
66 * modify it under the terms of the GNU General Public License
@@ -11,8 +11,8 @@
1111 * script the check (on the clientside) if a entered value
1212 * is a valid number and remove the invalid chars
1313 *
14- * $Id: numbercheck.js,v 1.2.2.1 2007-03-27 11:27:16 kimitake Exp $
15- * $NucleusJP: numbercheck.js,v 1.4 2007/02/04 06:28:45 kimitake Exp $
14+ * $Id: numbercheck.js,v 1.2.2.2 2007-03-27 11:47:14 kimitake Exp $
15+ * $NucleusJP: numbercheck.js,v 1.2 2005/03/16 08:07:50 kimitake Exp $
1616 */
1717
1818 function checkNumeric(f)
--- a/euc/nucleus/javascript/opennew.js
+++ b/euc/nucleus/javascript/opennew.js
@@ -1,6 +1,6 @@
11 /*
22 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
3- * Copyright (C) 2002-2007 The Nucleus Group
3+ * Copyright (C) 2002-2005 The Nucleus Group
44 *
55 * This program is free software; you can redistribute it and/or
66 * modify it under the terms of the GNU General Public License
@@ -8,8 +8,8 @@
88 * of the License, or (at your option) any later version.
99 * (see nucleus/documentation/index.html#license for more info)
1010 *
11- * $Id: opennew.js,v 1.3.2.1 2007-03-27 11:27:16 kimitake Exp $
12- * $NucleusJP: opennew.js,v 1.5 2007/02/04 06:28:45 kimitake Exp $
11+ * $Id: opennew.js,v 1.3.2.2 2007-03-27 11:47:14 kimitake Exp $
12+ * $NucleusJP: opennew.js,v 1.3 2005/03/16 08:07:50 kimitake Exp $
1313 *
1414 * JavaScript to open non-local links in a new window.
1515 *
--- a/euc/nucleus/javascript/templateEdit.js
+++ b/euc/nucleus/javascript/templateEdit.js
@@ -1,6 +1,6 @@
11 /**
22 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
3- * Copyright (C) 2002-2007 The Nucleus Group
3+ * Copyright (C) 2002-2005 The Nucleus Group
44 *
55 * This program is free software; you can redistribute it and/or
66 * modify it under the terms of the GNU General Public License
@@ -12,8 +12,8 @@
1212 *
1313 * @require compatibility.js
1414 *
15- * $Id: templateEdit.js,v 1.3.2.1 2007-03-27 11:27:16 kimitake Exp $
16- * $NucleusJP: templateEdit.js,v 1.5 2007/02/04 06:28:45 kimitake Exp $
15+ * $Id: templateEdit.js,v 1.3.2.2 2007-03-27 11:47:14 kimitake Exp $
16+ * $NucleusJP: templateEdit.js,v 1.3 2005/03/16 08:07:50 kimitake Exp $
1717 */
1818
1919 var amountOfFields = 1;
@@ -64,4 +64,4 @@ function makeVisible(i) {
6464 return false;
6565 }
6666
67-window.onload = hideUnused;
\ No newline at end of file
67+window.onload = hideUnused;
--- a/euc/nucleus/language/english.php
+++ b/euc/nucleus/language/english.php
@@ -12,27 +12,6 @@
1212 // Fully translated language file can be sent to us and will be made
1313 // available for download (with proper credit to the author, of course)
1414
15-// START changed/added after 3.3 START
16-define('_AUTOSAVEDRAFT', 'Auto save draft');
17-define('_AUTOSAVEDRAFT_LASTSAVED', 'Last saved: ');
18-define('_AUTOSAVEDRAFT_NOTYETSAVED', 'No saves have been made yet');
19-define('_AUTOSAVEDRAFT_NOW', 'Auto save now');
20-define('_SKIN_PARTS_SPECIAL', 'Special skin parts');
21-define('_ERROR_SKIN_PARTS_SPECIAL_FORMAT', 'You must enter a name that exists only out of lowercase letters and digits');
22-define('_ERROR_SKIN_PARTS_SPECIAL_DELETE', 'Can\'t delete this skin part');
23-define('_CONFIRMTXT_SKIN_PARTS_SPECIAL', 'Do you really want to delete this special skin part?');
24-define('_ERROR_PLUGIN_LOAD', 'Plugin could not be loaded, or does not support certain features that are required for it to run on your Nucleus installation (you might want to check the <a href="?action=actionlog">actionlog</a> for more info)');
25-// END changed/added after 3.3 END
26-
27-// START changed/added after 3.22 START
28-define('_SEARCHFORM_QUERY', 'Keywords to search');
29-define('_ERROR_EMAIL_REQUIRED', 'Email address is required');
30-define('_COMMENTFORM_MAIL', 'Website:');
31-define('_COMMENTFORM_EMAIL', 'E-mail:');
32-define('_EBLOG_REQUIREDEMAIL', 'Require E-mail address with comments?');
33-define('_ERROR_COMMENTS_SPAM', 'Your comment was rejected because it did not pass the spam test');
34-// END changed/added after 3.22 END
35-
3615 // START changed/added after 3.15 START
3716
3817 define('_LIST_PLUG_SUBS_NEEDUPDATE','Please use the \'Update Subscription list\'-button to update the plugin\'s subscription list.');
@@ -119,12 +98,12 @@ define('_BATCH_EXEC', 'Execute');
11998 define('_QMENU_HOME', 'Home');
12099 define('_QMENU_ADD', 'Add Item');
121100 define('_QMENU_ADD_SELECT', '-- select --');
122-define('_QMENU_USER_SETTINGS', 'Profile');
101+define('_QMENU_USER_SETTINGS', 'Settings');
123102 define('_QMENU_USER_ITEMS', 'Items');
124103 define('_QMENU_USER_COMMENTS', 'Comments');
125104 define('_QMENU_MANAGE', 'Management');
126105 define('_QMENU_MANAGE_LOG', 'Action Log');
127-define('_QMENU_MANAGE_SETTINGS', 'Configuration');
106+define('_QMENU_MANAGE_SETTINGS', 'Global Settings');
128107 define('_QMENU_MANAGE_MEMBERS', 'Members');
129108 define('_QMENU_MANAGE_NEWBLOG', 'New Weblog');
130109 define('_QMENU_MANAGE_BACKUPS', 'Backups');
@@ -466,13 +445,14 @@ define('_LOGIN_PLEASE', 'Please Log in First');
466445 // commentform
467446 define('_COMMENTFORM_YOUARE', 'You are');
468447 define('_COMMENTFORM_SUBMIT', 'Add Comment');
469-define('_COMMENTFORM_COMMENT', 'Your comment:');
470-define('_COMMENTFORM_NAME', 'Name:');
448+define('_COMMENTFORM_COMMENT', 'Your comment');
449+define('_COMMENTFORM_NAME', 'Name');
450+define('_COMMENTFORM_MAIL', 'E-mail/HTTP');
471451 define('_COMMENTFORM_REMEMBER', 'Remember Me');
472452
473453 // loginform
474-define('_LOGINFORM_NAME', 'Username:');
475-define('_LOGINFORM_PWD', 'Password:');
454+define('_LOGINFORM_NAME', 'Username');
455+define('_LOGINFORM_PWD', 'Password');
476456 define('_LOGINFORM_YOUARE', 'Logged in as');
477457 define('_LOGINFORM_SHARED', 'Shared Computer');
478458
@@ -575,7 +555,7 @@ define('_ERROR_BADSHORTBLOGNAME', 'The short blog name should only contain a-z a
575555 define('_ERROR_DUPSHORTBLOGNAME', 'Another blog already has the chosen short name. These names should be unique');
576556 define('_ERROR_UPDATEFILE', 'Cannot get write access to the update-file. Make sure the file permissions are set ok (try chmodding it to 666). Also note that the location is relative to the admin-area directory, so you might want to use an absolute path (something like /your/path/to/nucleus/)');
577557 define('_ERROR_DELDEFBLOG', 'Cannot delete the default blog');
578-define('_ERROR_DELETEMEMBER', 'This member cannot be deleted, probably because he/she is the author of item(s)');
558+define('_ERROR_DELETEMEMBER', 'This member cannot be deleted, probably because she is the author of items or comments');
579559 define('_ERROR_BADTEMPLATENAME', 'Invalid name for template, use only a-z and 0-9, without spaces');
580560 define('_ERROR_DUPTEMPLATENAME', 'Another template with this name already exists');
581561 define('_ERROR_BADSKINNAME', 'Invalid name for skin (only a-z, 0-9 are allowed, no spaces)');
--- a/euc/nucleus/libs/globalfunctions.php
+++ b/euc/nucleus/libs/globalfunctions.php
@@ -13,7 +13,7 @@
1313 /**
1414 * @license http://nucleuscms.org/license.txt GNU General Public License
1515 * @copyright Copyright (C) 2002-2005 The Nucleus Group
16- * @version $Id: globalfunctions.php,v 1.6.2.7 2006-12-18 20:34:49 kimitake Exp $
16+ * @version $Id: globalfunctions.php,v 1.6.2.8 2007-03-27 11:47:31 kimitake Exp $
1717 * @version $NucleusJP: globalfunctions.php,v 1.6.2.6 2006/11/17 07:59:29 kimitake Exp $
1818 */
1919
@@ -1283,7 +1283,7 @@ function serverStringToArray($str, &$array, &$frontParam)
12831283
12841284 // split front param, e.g. /index.php, and others, e.g. blogid=1&page=2
12851285 if (strstr($str, "?")){
1286- list($frontParam, $args) = preg_split("/\?/", $str, 2);
1286+ list($frontParam, $args) = preg_split("/\?/", $str);
12871287 }
12881288 else {
12891289 $args = $str;
@@ -1329,7 +1329,7 @@ function sanitizeArray(&$array)
13291329 foreach ($array as $k => $v) {
13301330
13311331 // split to key and value
1332- list($key, $val) = preg_split("/=/", $v, 2);
1332+ list($key, $val) = preg_split("/=/", $v);
13331333 if (!isset($val)) {
13341334 continue;
13351335 }
@@ -1381,7 +1381,7 @@ function convArrayForSanitizing($src, &$array)
13811381 function revertArrayForSanitizing($array, &$dst)
13821382 {
13831383 foreach ($array as $v) {
1384- list($key, $val) = preg_split("/=/", $v, 2);
1384+ list($key, $val) = preg_split("/=/", $v);
13851385 $dst[$key] = $val;
13861386 }
13871387 }
--- a/euc/nucleus/libs/include/admin-add.template
+++ b/euc/nucleus/libs/include/admin-add.template
@@ -2,24 +2,19 @@
22
33 <%init%>
44 <script type="text/javascript" src="javascript/numbercheck.js"></script>
5-<script type="text/javascript" src="javascript/xmlhttprequest.js"></script>
65
7-<form id="addform" method="post" action="index.php" >
6+<form method="post" action="index.php" >
87
98 <div>
109
1110 <input type="hidden" name="action" value="additem" />
1211 <input name="blogid" value="<%blogid%>" type="hidden" />
13-<input type="hidden" name="draftid" value="0" />
1412 <%ticket%>
1513
1614 <table>
1715 <tr>
1816 <th colspan="2"><%text(_ADD_CREATENEW)%></th>
1917 </tr><tr>
20- <td><%text(_AUTOSAVEDRAFT)%></td>
21- <td><span id="info"><%text(_AUTOSAVEDRAFT_NOTYETSAVED)%></span></td>
22- </tr><tr>
2318 <td><%text(_ADD_TITLE)%></td>
2419 <td><input
2520 <%jsinput(title)%>
@@ -42,9 +37,9 @@
4237 </td>
4338 </tr><tr id="edit" style="display:none;">
4439 <td><%text(_ADD_PREVIEW)%></td>
45- <td><b><span id="prevtitle">&#160;</span></b><br />
46- <span id="prevbody">&#160;</span><br />
47- <span id="prevmore">&#160;</span><br />
40+ <td><b><span id="prevtitle"></span></b><br />
41+ <span id="prevbody"></span><br />
42+ <span id="prevmore"></span><br />
4843 </td>
4944 </tr><tr>
5045
@@ -116,24 +111,9 @@
116111 <td>
117112 <input tabindex="60" type="submit" value="<%text(_ADD_ADDITEM)%>"
118113 onclick="return checkSubmit();" />
119- <input tabindex="80" type="button" name="autosavenow" value="<%text(_AUTOSAVEDRAFT_NOW)%>"
120- onclick="autoSaveDraft();" />
121114 </td>
122115 </tr>
123116 </table>
124117
125118 </div>
126-</form>
127-
128-<script type="text/javascript">
129- var xmlhttprequest = new Array();
130- xmlhttprequest[0] = createHTTPHandler(); // AutoDraft handler
131- xmlhttprequest[1] = createHTTPHandler(); // UpdateTicket handler
132- var seconds = now(); // Last AutoDraft time
133- var checks = 0; // Number of checks since last AutoDraft
134- var addform = document.getElementById('addform'); // The form id
135- var goal = document.getElementById('info'); // The html div id where 'Last saved: date time' must come
136- var goalurl = '../action.php'; // The PHP file where the content must be posted to
137- var lastsavedtext = '<%text(_AUTOSAVEDRAFT_LASTSAVED)%>'; // The language variable for 'Last saved'
138- var formtype = 'add'; // Add or edit form
139-</script>
119+</form>
--- a/euc/nucleus/libs/include/admin-edit.template
+++ b/euc/nucleus/libs/include/admin-edit.template
@@ -2,22 +2,17 @@
22
33 <%init%>
44 <script type="text/javascript" src="javascript/numbercheck.js"></script>
5-<script type="text/javascript" src="javascript/xmlhttprequest.js"></script>
65
7-<form id="editform" method="post" action="index.php">
6+<form method="post" action="index.php">
87 <div>
98
109 <input type="hidden" name="action" value="itemupdate" />
1110 <input name="itemid" value="<%contents(itemid)%>" type="hidden" />
12-<input type="hidden" name="draftid" value="0" />
1311 <%ticket%>
1412
1513 <table><tr>
1614 <th colspan="2"><%text(_EDIT_ITEM)%></th>
1715 </tr><tr>
18- <td><%text(_AUTOSAVEDRAFT)%></td>
19- <td><span id="info"><%text(_AUTOSAVEDRAFT_NOTYETSAVED)%></span></td>
20-</tr><tr>
2116 <td><%text(_EDIT_ORIG_AUTHOR)%></td>
2217 <td><%contents(author)%></td>
2318 </tr><tr>
@@ -43,9 +38,9 @@
4338 </td>
4439 </tr><tr id="edit" style="display:none;">
4540 <td><%text(_ADD_PREVIEW)%></td>
46- <td><b><span id="prevtitle">&#160;</span></b><br />
47- <span id="prevbody">&#160;</span><br />
48- <span id="prevmore">&#160;</span><br />
41+ <td><b><span id="prevtitle"></span></b><br />
42+ <span id="prevbody"></span><br />
43+ <span id="prevmore"></span><br />
4944 </td>
5045 </tr><tr>
5146
@@ -77,13 +72,13 @@
7772 <input name="actiontype" value="addfuture" type="radio" id="act_future" tabindex="61" /><label for="act_future"><%text(_ADD_ADDLATER)%></label> <%helplink(future)%>
7873 <div class="indent">
7974 <%text(_ADD_PLACE_ON)%>
80- <input id="inputyear" name="year" tabindex="71" size="4" value="<%currenttime(year)%>" />/
75+ <input id="inputday" name="day" tabindex="71" size="2" value="<%currenttime(mday)%>" />/
8176 <input id="inputmonth" name="month" tabindex="72" size="2" value="<%currenttime(mon)%>" />/
82- <input id="inputday" name="day" tabindex="73" size="2" value="<%currenttime(mday)%>" />&nbsp;
83-
77+ <input id="inputyear" name="year" tabindex="73" size="4" value="<%currenttime(year)%>" />
78+ at
8479 <input id="inputhour" name="hour" tabindex="74" size="2" value="<%currenttime(hours)%>" />:
8580 <input id="inputminutes" name="minutes" tabindex="75" size="2" value="<%currenttime(minutes)%>" />
86- (yyyy/mm/dd hh:mm)
81+ (dd/mm/yyyy hh:mm)
8782 <%ifblogsetting(ballowpast,0)%>
8883 <br />
8984 <%text(_ADD_NOPASTDATES)%>
@@ -143,24 +138,9 @@
143138 <td>
144139 <input tabindex="60" type="submit" value="<%text(_EDIT_SUBMIT)%>"
145140 onclick="return checkSubmit();" />
146- <input tabindex="80" type="button" name="autosavenow" value="<%text(_AUTOSAVEDRAFT_NOW)%>"
147- onclick="autoSaveDraft();" />
148141 </td>
149142
150143 </tr></table>
151144
152145 </div>
153-</form>
154-
155-<script type="text/javascript">
156- var xmlhttprequest = new Array();
157- xmlhttprequest[0] = createHTTPHandler(); // AutoDraft handler
158- xmlhttprequest[1] = createHTTPHandler(); // UpdateTicket handler
159- var seconds = now(); // Last AutoDraft time
160- var checks = 0; // Number of checks since last AutoDraft
161- var addform = document.getElementById('editform'); // The form id
162- var goal = document.getElementById('info'); // The html div id where 'Last saved: date time' must come
163- var goalurl = '../action.php'; // The PHP file where the content must be posted to
164- var lastsavedtext = '<%text(_AUTOSAVEDRAFT_LASTSAVED)%>'; // The language variable for 'Last saved'
165- var formtype = 'edit'; // Add or edit form
166-</script>
146+</form>
--- a/euc/nucleus/libs/include/bookmarklet-add.template
+++ b/euc/nucleus/libs/include/bookmarklet-add.template
@@ -7,7 +7,6 @@
77 <script type="text/javascript" src="javascript/bookmarklet.js"></script>
88 <script type="text/javascript" src="javascript/edit.js"></script>
99 <script type="text/javascript" src="javascript/numbercheck.js"></script>
10- <script type="text/javascript" src="javascript/xmlhttprequest.js"></script>
1110 <%init%>
1211 <%extrahead%>
1312 <script type="text/javascript">
@@ -25,11 +24,10 @@
2524 </head>
2625 <body>
2726 <h1><%text(_ADD_ADDTO)%> '<%bloglink%>'</h1>
28- <form id="addform" method="post" action="bookmarklet.php" ><div>
27+ <form method="post" action="bookmarklet.php" ><div>
2928
3029 <input name="action" type="hidden" value="additem" />
3130 <input name="blogid" type="hidden" value="<%blogid%>" />
32- <input type="hidden" name="draftid" value="0" />
3331 <%ticket%>
3432
3533 <div id="submit" class="buttonbar">
@@ -46,10 +44,6 @@
4644
4745 <table>
4846 <tr>
49- <td><%text(_AUTOSAVEDRAFT)%></td>
50- <td><span id="info"><%text(_AUTOSAVEDRAFT_NOTYETSAVED)%></span></td>
51- </tr>
52- <tr>
5347 <td><%text(_ADD_TITLE)%></td>
5448 <td>
5549 <input
@@ -71,12 +65,7 @@
7165 <tr><td>
7266 <%text(_ADD_CATEGORY)%></td>
7367 <td><%categories%></td>
74- </tr>
75- <tr>
76- <td><%text(_AUTOSAVEDRAFT_NOW)%></td>
77- <td><input tabindex="80" type="button" name="autosavenow" value="<%text(_AUTOSAVEDRAFT_NOW)%>" onclick="autoSaveDraft();" /></td>
78- </tr>
79- </table>
68+ </tr></table>
8069
8170
8271 </div>
@@ -144,28 +133,14 @@
144133 <div id="preview" class="contentblock">
145134 <h2><%text(_ADD_PREVIEW)%></h2>
146135
147- <b><span id="prevtitle">&#160;</span></b>
136+ <b><span id="prevtitle"></span></b>
148137 <br />
149- <span id="prevbody">&#160;</span>
138+ <span id="prevbody"></span>
150139 <br />
151- <span id="prevmore">&#160;</span>
140+ <span id="prevmore"></span>
152141 </div>
153142
154143 </div></form>
155-
156- <script type="text/javascript">
157- var xmlhttprequest = new Array();
158- xmlhttprequest[0] = createHTTPHandler(); // AutoDraft handler
159- xmlhttprequest[1] = createHTTPHandler(); // UpdateTicket handler
160- var seconds = now(); // Last AutoDraft time
161- var checks = 0; // Number of checks since last AutoDraft
162- var addform = document.getElementById('addform'); // The form id
163- var goal = document.getElementById('info'); // The html div id where 'Last saved: date time' must come
164- var goalurl = '../action.php'; // The PHP file where the content must be posted to
165- var lastsavedtext = '<%text(_AUTOSAVEDRAFT_LASTSAVED)%>'; // The language variable for 'Last saved'
166- var formtype = 'add'; // Add or edit form
167- </script>
168-
169144 </body>
170145 </html>
171146
--- a/euc/nucleus/libs/include/bookmarklet-edit.template
+++ b/euc/nucleus/libs/include/bookmarklet-edit.template
@@ -7,7 +7,6 @@
77 <script type="text/javascript" src="javascript/bookmarklet.js"></script>
88 <script type="text/javascript" src="javascript/edit.js"></script>
99 <script type="text/javascript" src="javascript/numbercheck.js"></script>
10- <script type="text/javascript" src="javascript/xmlhttprequest.js"></script>
1110 <%init%>
1211 <%extrahead%>
1312 <script type="text/javascript">
@@ -25,11 +24,10 @@
2524 </head>
2625 <body>
2726 <h1><%text(_EDIT_ITEM)%> (<%contents(itemid)%>)</h1>
28- <form id="editform" method="post" action="bookmarklet.php" ><div>
27+ <form method="post" action="bookmarklet.php" ><div>
2928
3029 <input name="action" type="hidden" value="edititem" />
3130 <input name="itemid" type="hidden" value="<%contents(itemid)%>" />
32- <input type="hidden" name="draftid" value="0" />
3331 <%ticket%>
3432
3533 <div id="submit" class="buttonbar">
@@ -45,10 +43,6 @@
4543 <div id="body" class="contentblock">
4644 <table>
4745 <tr>
48- <td><%text(_AUTOSAVEDRAFT)%></td>
49- <td><span id="info"><%text(_AUTOSAVEDRAFT_NOTYETSAVED)%></span></td>
50- </tr>
51- <tr>
5246 <td><%text(_ADD_TITLE)%></td>
5347 <td><input
5448 <%jsinput(title)%>
@@ -70,10 +64,6 @@
7064 <td><%text(_ADD_CATEGORY)%></td>
7165 <td><%categories%></td>
7266 </tr>
73- <tr>
74- <td><%text(_AUTOSAVEDRAFT_NOW)%></td>
75- <td><input tabindex="80" type="button" name="autosavenow" value="<%text(_AUTOSAVEDRAFT_NOW)%>" onclick="autoSaveDraft();" /></td>
76- </tr>
7767 </table>
7868
7969 </div>
@@ -140,28 +130,14 @@
140130 <div id="preview" class="contentblock">
141131 <h2><%text(_ADD_PREVIEW)%></h2>
142132
143- <b><span id="prevtitle">&#160;</span></b>
133+ <b><span id="prevtitle"></span></b>
144134 <br />
145- <span id="prevbody">&#160;</span>
135+ <span id="prevbody"></span>
146136 <br />
147- <span id="prevmore">&#160;</span>
137+ <span id="prevmore"></span>
148138 </div>
149139
150140 </div></form>
151-
152- <script type="text/javascript">
153- var xmlhttprequest = new Array();
154- xmlhttprequest[0] = createHTTPHandler(); // AutoDraft handler
155- xmlhttprequest[1] = createHTTPHandler(); // UpdateTicket handler
156- var seconds = now(); // Last AutoDraft time
157- var checks = 0; // Number of checks since last AutoDraft
158- var addform = document.getElementById('editform'); // The form id
159- var goal = document.getElementById('info'); // The html div id where 'Last saved: date time' must come
160- var goalurl = '../action.php'; // The PHP file where the content must be posted to
161- var lastsavedtext = '<%text(_AUTOSAVEDRAFT_LASTSAVED)%>'; // The language variable for 'Last saved'
162- var formtype = 'edit'; // Add or edit form
163- </script>
164-
165141 </body>
166142 </html>
167143
--- a/euc/nucleus/libs/mb_emulator/convert.table
+++ b/euc/nucleus/libs/mb_emulator/convert.table
@@ -1,5 +1,5 @@
11 <?php
2-$mbemu_internals['sjistoeuc_byte1'] = array(
2+$_sjistoeuc_byte1 = array(
33 129 => 161 ,130 => 163 ,131 => 165 ,132 => 167 ,133 => 169 ,134 => 171 ,
44 135 => 173 ,136 => 175 ,137 => 177 ,138 => 179 ,139 => 181 ,140 => 183 ,
55 141 => 185 ,142 => 187 ,143 => 189 ,144 => 191 ,145 => 193 ,146 => 195 ,
@@ -9,7 +9,7 @@ $mbemu_internals['sjistoeuc_byte1'] = array(
99 229 => 233 ,230 => 235 ,231 => 237 ,232 => 239 ,233 => 241 ,234 => 243 ,
1010 235 => 245 ,236 => 247 ,237 => 249 ,238 => 251 ,239 => 253 ,240 => 255 );
1111
12-$mbemu_internals['sjistoeuc_byte2'] = array(
12+$_sjistoeuc_byte2 = array(
1313 0 => array(
1414 64 => 161 ,65 => 162 ,66 => 163 ,67 => 164 ,68 => 165 ,69 => 166 ,
1515 70 => 167 ,71 => 168 ,72 => 169 ,73 => 170 ,74 => 171 ,75 => 172 ,
@@ -46,7 +46,7 @@ $mbemu_internals['sjistoeuc_byte2'] = array(
4646 245 => 247 ,246 => 248 ,247 => 249 ,248 => 250 ,249 => 251 ,250 => 252 ,
4747 251 => 253 ,252 => 254 ));
4848
49-$mbemu_internals['sjistoeuc_byte1_shift'] = array (
49+$_sjistoeuc_byte1_shift = array (
5050 64 => 0 ,65 => 0 ,66 => 0 ,67 => 0 ,68 => 0 ,69 => 0 ,
5151 70 => 0 ,71 => 0 ,72 => 0 ,73 => 0 ,74 => 0 ,75 => 0 ,
5252 76 => 0 ,77 => 0 ,78 => 0 ,79 => 0 ,80 => 0 ,81 => 0 ,
@@ -80,7 +80,7 @@ $mbemu_internals['sjistoeuc_byte1_shift'] = array (
8080 245 => 1 ,246 => 1 ,247 => 1 ,248 => 1 ,249 => 1 ,250 => 1 ,
8181 251 => 1 ,252 => 1 );
8282
83-$mbemu_internals['euctosjis_byte1'] = array(
83+$_euctosjis_byte1 = array(
8484 161 => 129, 162 => 129, 163 => 130, 164 => 130, 165 => 131,
8585 166 => 131, 167 => 132, 168 => 132, 169 => 133, 170 => 133,
8686 171 => 134, 172 => 134, 173 => 135, 174 => 135, 175 => 136,
@@ -101,7 +101,7 @@ $mbemu_internals['euctosjis_byte1'] = array(
101101 246 => 235, 247 => 236, 248 => 236, 249 => 237, 250 => 237,
102102 251 => 238, 252 => 238, 253 => 239, 254 => 239, 255 => 240);
103103
104-$mbemu_internals['euctosjis_byte2'] = array(
104+$_euctosjis_byte2 = array(
105105 0 => array(
106106 161 => 64, 162 => 65, 163 => 66, 164 => 67, 165 => 68,
107107 166 => 69, 167 => 70, 168 => 71, 169 => 72, 170 => 73,
@@ -143,7 +143,7 @@ $mbemu_internals['euctosjis_byte2'] = array(
143143 246 => 244, 247 => 245, 248 => 246, 249 => 247, 250 => 248,
144144 251 => 249, 252 => 250, 253 => 251, 254 => 252));
145145
146-$mbemu_internals['alphanumeric_convert'] = array (
146+$alphanumeric_convert = array (
147147 0x20 => "\xa1\xa1",0x21 => "\xa1\xaa",0x23 => "\xa1\xf4",0x24 =>
148148 "\xa1\xf0",0x25 => "\xa1\xf3",
149149 0x26 => "\xa1\xf5",0x28 => "\xa1\xca",0x29 => "\xa1\xcb",0x2a => "\xa1\xf6",
@@ -169,7 +169,7 @@ $mbemu_internals['alphanumeric_convert'] = array (
169169 0x79 => "\xa3\xf9",0x7a => "\xa3\xfa",0x7b => "\xa1\xd0",0x7c => "\xa1\xc3",
170170 0x7d => "\xa1\xd1");
171171
172-$mbemu_internals['kana_zenhan_convert'] = array (
172+$kana_zenhan_convert = array (
173173 0xa1 => "\xa7",0xa2 => "\xb1",0xa3 => "\xa8",0xa4 => "\xb2",
174174 0xa5 => "\xa9",0xa6 => "\xb3",0xa7 => "\xaa",0xa8 => "\xb4",
175175 0xa9 => "\xab",0xaa => "\xb5",0xab => "\xb6",0xac => "\xb6\x8e\xde",
@@ -195,7 +195,7 @@ $mbemu_internals['kana_zenhan_convert'] = array (
195195 0xee => "\xdc",0xf0 => "\xb2",0xf1 => "\xb4",0xf2 => "\xa6",0xf3 => "\xdd",
196196 0xf4 => "\xb3\x8e\xde");
197197
198-$mbemu_internals['special_zenhan_convert'] = array(
198+$special_zenhan_convert = array(
199199 0xa2 => "\xa4",0xa3 => "\xa1",0xa6 => "\xa5",0xab => "\xde",
200200 0xac => "\xdf",0xbc => "\xb0",0xd6 => "\xa2",0xd7 => "\xa3");
201201
--- a/euc/nucleus/libs/mb_emulator/history.html
+++ b/euc/nucleus/libs/mb_emulator/history.html
@@ -1,1031 +1,495 @@
11 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2-<html>
3-<head>
4-
5- <meta http-equiv="CONTENT-TYPE" content="text/html; charset=shift_jis">
6- <title>変更履歴</title>
7-
8-
9- <meta name="GENERATOR" content="OpenOffice.org 1.1.3 (Win32)">
10-
11- <meta name="CREATED" content="20050130;2310982">
12-
13- <meta name="CHANGED" content="20050130;2372139">
14-
15-</head>
16-
17-
18-<body style="direction: ltr;" lang="ja-JP">
19-
20-<h2>変更履歴</h2>
21-
22-<h3><font face="Times New Roman, serif"><span lang="en-US">mbstringエミュレータ for Japanese Ver.0.84</span></font>(<font face="Times New Roman, serif"><span lang="en-US">2006/1/23</span></font>)</h3>
23-
24-<ul>
25-
26- <li>シフトJISで半角カンマの処理がおかしかったのを修正しました</li>
27-</ul>
28-
29-<h3><font face="Times New Roman, serif"><span lang="en-US">mbstringエミュレータ for Japanese Ver.0.83</span></font>(<font face="Times New Roman, serif"><span lang="en-US">2005/12/15</span></font>)</h3>
30-
31-<ul>
32-
33- <li>mb_send_mailでmb_languageがjaだったときに対応しました</li>
34- <li>mb_send_mailで日本語処理の最後にbreakがなかったので加えました</li>
35-</ul>
36-
37-<h3><font face="Times New Roman, serif"><span lang="en-US">mbstringエミュレータ for Japanese Ver.0.82</span></font>(<font face="Times New Roman, serif"><span lang="en-US">2005/11/28</span></font>)</h3>
38-
39-<ul>
40-
41- <li>mb_languageでパラメータがなかった場合にwarningが出てしまうのを修正しました</li>
42- <li>mb_send_mail内部で_is_encodedを呼び出しているのを_check_encodingを呼ぶように修正しました</li>
43-</ul>
44-
45-<h3><font face="Times New Roman, serif"><span lang="en-US">mbstringエミュレータ for Japanese Ver.0.81</span></font>(<font face="Times New Roman, serif"><span lang="en-US">2005/10/09</span></font>)</h3>
46-
47-<ul>
48-
49- <li>$jis_matchが未定義だったバグを修正しました</li>
50-</ul>
51-
52-<h3><font face="Times New Roman, serif"><span lang="en-US">mbstringエミュレータ for Japanese Ver.0.8</span></font>(<font face="Times New Roman, serif"><span lang="en-US">2005/8/23</span></font>)</h3>
53-
54-<ul>
55-
56- <li>名称をmbstringエミュレータ for Japaneseに変更しました</li>
57- <li>
58-mb_substitute_characterサポートしました
59- </li>
60-
61- <li>
62-mb_convert_caseサポートしました
63- </li>
64-
65- <li>
66-mb_get_infoサポートしました
67- </li>
68-
69- <li>
70-mb_strtolowerサポートしました
71- </li>
72-
73- <li>
74-mb_strtoupperサポートしました</li>
75- <li>MB_CASE_UPPER,MB_CASE_LOWER,MB_CASE_CASEを定義しました</li>
76-
77- <li>グローバル変数を$mbemu_internalsに集約しました</li>
78-
79- <li>エンコーディングにSHIFT_JIS,ISO-8859-1を追加しました</li>
80-
81- <li>変換テーブルを必要時に読み込むように修正しました</li>
82- <li>
83- mb_convert_kanaのエンコーディングが指定されていないとき,internal_encodingの値を使うように修正しました</li>
84-
85-</ul>
86-
87-<h3><font face="Times New Roman, serif"><span lang="en-US">Ver.0.37</span></font>(<font face="Times New Roman, serif"><span lang="en-US">2005/1/30</span></font>)</h3>
88-
89-<ul>
90-
91- <li>
92- <p><font face="Times New Roman, serif"><span lang="en-US">JIS</span></font>のマッチングのバグを再び修正しました。
93- </p>
94-
95- </li>
96-
97-</ul>
98-
99-<h3><font face="Times New Roman, serif"><span lang="en-US">Ver.0.36</span></font>(<font face="Times New Roman, serif"><span lang="en-US">2004/11/13</span></font>)</h3>
100-
101-<ul>
102-
103- <li>
104- <p><font face="Times New Roman, serif"><span lang="en-US">JIS</span></font>のマッチングのバグを修正しました。 </p>
105-
106- </li>
107-
108-</ul>
109-
110-<h3><font face="Times New Roman, serif"><span lang="en-US">Ver.0.35</span></font>(<font face="Times New Roman, serif"><span lang="en-US">2004/9/26</span></font>)</h3>
111-
112-<ul>
113-
114- <li>
115- <p><font face="Times New Roman, serif"><span lang="en-US">mb_send_mail</span></font>のバグを修正しまし
116-た。 </p>
117-
118- </li>
119-
120-</ul>
121-
122-<h3><font face="Times New Roman, serif"><span lang="en-US">Ver.0.341</span></font>(<font face="Times New Roman, serif"><span lang="en-US">2004/9/16</span></font>)</h3>
123-
124-<ul>
125-
126- <li>
127- <p><font face="Times New Roman, serif"><span lang="en-US">mb_convert_kana</span></font>のバグを修正し
128-ました。 </p>
129-
130- </li>
131-
132-</ul>
133-
134-<h3><font face="Times New Roman, serif"><span lang="en-US">Ver.0.34</span></font>(<font face="Times New Roman, serif"><span lang="en-US">2004/9/15</span></font>)</h3>
135-
136-<ul>
137-
138- <li>
139- <p><font face="Times New Roman, serif"><span lang="en-US">mb_convert_kana</span></font>のバグを修正し
140-ました。 </p>
141-
142- </li>
143-
144-</ul>
145-
146-<h3><font face="Times New Roman, serif"><span lang="en-US">Ver.0.33</span></font>(<font face="Times New Roman, serif"><span lang="en-US">2004/8/27</span></font>)</h3>
147-
148-<ul>
149-
150- <li>
151- <p style="margin-bottom: 0cm;"><font face="Times New Roman, serif"><span lang="en-US">mb_encode_numericentity,
152-mb_decode_numericentity</span></font>をサポートしました。 </p>
153-
154- </li>
155-
156- <li>
157- <p style="margin-bottom: 0cm;"><font face="Times New Roman, serif"><span lang="en-US">mb_convert_encoding</span></font>で<font face="Times New Roman, serif"><span lang="en-US">UTF-16</span></font>か
158-らの変換をサポートしました。 </p>
159-
160- </li>
161-
162- <li>
163- <p style="margin-bottom: 0cm;">シフト<font face="Times New Roman, serif"><span lang="en-US">JIS</span></font>の
164-処理を<font face="Times New Roman, serif"><span lang="en-US">SJIS-WIN</span></font>互換にしました。<font face="Times New Roman, serif"><span lang="en-US"><br>
165-
166-mbstring</span></font>本家とは異なり,<font face="Times New Roman, serif"><span lang="en-US">SJIS</span></font>と<font face="Times New Roman, serif"><span lang="en-US">SJIS-WIN</span></font>の
167-動作は同じです。 </p>
168-
169- </li>
170-
171- <li>
172- <p style="margin-bottom: 0cm;"><font face="Times New Roman, serif"><span lang="en-US">mb_strcut</span></font>の
173-バグを修正しました。 </p>
174-
175- </li>
176-
177- <li>
178- <p>変更履歴を<font face="Times New Roman, serif"><span lang="en-US">HTML</span></font>に変えました。 </p>
179-
180- </li>
181-
182-</ul>
183-
184-<h3><font face="Times New Roman, serif"><span lang="en-US">Ver.0.32(2004/8/19)</span></font></h3>
185-
186-<ul>
187-
188- <li>
189- <p><font face="Times New Roman, serif"><span lang="en-US">mb_http_input, mb_http_output,
190-mb_output_handler </span></font>をサポートしました<font face="Times New Roman, serif"><span lang="en-US"><br>
191-
192- </span></font>ただし,<font face="Times New Roman, serif"><span lang="en-US">mb_http_input</span></font>に関しては文字コー
193-ド変換を行わないため,常に<font face="Times New Roman, serif"><span lang="en-US">FALSE</span></font>を返します。 </p>
194-
195- </li>
196-
197-</ul>
198-
199-<h3><font face="Times New Roman, serif"><span lang="en-US">Ver.0.31(2004/8/16)</span></font></h3>
200-
201-<ul>
202-
203- <li>
204- <p style="margin-bottom: 0cm;"><font face="Times New Roman, serif"><span lang="en-US">mb_decode_mimeheader</span></font>の
205-バグを修正しました </p>
206-
207- </li>
208-
209- <li>
210- <p><font face="Times New Roman, serif"><span lang="en-US">mb_convert_variables</span></font>の初
211-期設定チェックのバグを修正しました </p>
212-
213- </li>
214-
215-</ul>
216-
217-<h3><font face="Times New Roman, serif"><span lang="en-US">Ver.0.3(2004/8/8)</span></font></h3>
218-
219-<ul>
220-
221- <li>
222- <p style="margin-bottom: 0cm;">バグつぶし<font face="Times New Roman, serif"><span lang="en-US"><br>
223-
224- </span></font>入れ子のファンクションで二重宣言になってしまう場合があるので外部に出しました。 </p>
225-
226- </li>
227-
228- <li>
229- <p style="margin-bottom: 0cm;">バグつぶし<font face="Times New Roman, serif"><span lang="en-US"><br>
230-
231-mb_strcut</span></font>のバグを修正しました </p>
232-
233- </li>
234-
235- <li>
236- <p style="margin-bottom: 0cm;"><font face="Times New Roman, serif"><span lang="en-US">mb_encode_mimeheader,
237-mb_decode_mimeheader</span></font>をサポートしました。 </p>
238-
239- </li>
240-
241- <li>
242- <p><font face="Times New Roman, serif"><span lang="en-US">mb_convert_variables</span></font>で配
243-列からの変換をサポートしました。<font face="Times New Roman, serif"><span lang="en-US"><br>
244-
245- </span></font>これに伴い<font face="Times New Roman, serif"><span lang="en-US">mb_convert_variables</span></font>を<font face="Times New Roman, serif"><span lang="en-US">2</span></font>パ
246-ターンにし,初期設定で変更できるようにしました。<font face="Times New Roman, serif"><span lang="en-US"><br>
247-
248- </span></font>初期設定ファイルの<font face="Times New Roman, serif"><span lang="en-US">convert-variables-arrayonly</span></font>が<font face="Times New Roman, serif"><span lang="en-US">no</span></font>の
249-場合(デフォルト),これまでと同じように配列でなくても変換します。また,最初の要素が配列の場合,それだけを変換します。ただし,こちらの場合,呼び
250-出し時に引数に<font face="Times New Roman, serif"><span lang="en-US">&amp;</span></font>を付けて明示的に参照渡しに
251-する必要があります。<font face="Times New Roman, serif"><span lang="en-US"><br>
252-
253-convert-variables-arrayonly</span></font>が<font face="Times New Roman, serif"><span lang="en-US">no</span></font>で
254-ない場合,変換する引数は配列だけになります。その代わり,<font face="Times New Roman, serif"><span lang="en-US">&amp;</span></font>は不要です。 </p>
255-
256- </li>
257-
258-</ul>
259-
260-<h3><font face="Times New Roman, serif"><span lang="en-US">Ver.0.25(2004/7/7)</span></font></h3>
261-
262-<ul>
263-
264- <li>
265- <p>バグつぶし<font face="Times New Roman, serif"><span lang="en-US"><br>
266-
267- </span></font>入れ子のファンクションで二重宣言になってしまう場合があるので外部に出しました。 </p>
268-
269- </li>
270-
271-</ul>
272-
273-<h3><font face="Times New Roman, serif"><span lang="en-US">ver.0.24(2004/6/8)</span></font></h3>
274-
275-<ul>
276-
277- <li>
278- <p><font face="Times New Roman, serif"><span lang="en-US">mb_strpos, mb_substr_count,
279-mb_preferred_mime_name</span></font>をサポートしました。 </p>
280-
281- </li>
282-
283-</ul>
284-
285-<h3><font face="Times New Roman, serif"><span lang="en-US">ver.0.23(2004/5/19)</span></font></h3>
286-
287-<ul>
288-
289- <li>
290- <p><font face="Times New Roman, serif"><span lang="en-US">mb_convert_encoding</span></font>で<font face="Times New Roman, serif"><span lang="en-US">UTF-16</span></font>へ
291-の変換をサポートしました。<font face="Times New Roman, serif"><span lang="en-US"><br>
292-
293- <br>
294-
295-usage:<br>
296-
297-$str = mb_convert_encoding($str, 'UTF-16', 'EUC-JP, UTF-8');<br>
298-
299- <br>
300-
301- </span></font>返すのは<font face="Times New Roman, serif"><span lang="en-US">BOM</span></font>なしのビッグ・エンディアンになります。
302- </p>
303-
304- </li>
305-
306-</ul>
307-
308-<h3><font face="Times New Roman, serif"><span lang="en-US">ver.0.22(2004/5/11)</span></font></h3>
309-
310-<ul>
311-
312- <li>
313- <p style="margin-bottom: 0cm;">バグつぶし </p>
314-
315- </li>
316-
317- <li>
318- <p style="margin-bottom: 0cm;"><font face="Times New Roman, serif"><span lang="en-US">mb_convert_variables</span></font>を
319-暫定サポート </p>
320-
321- </li>
322-
323- <li>
324- <p><font face="Times New Roman, serif"><span lang="en-US">mb_strwidth</span></font>をサポート </p>
325-
326- </li>
327-
328-</ul>
329-
330-<h3><font face="Times New Roman, serif"><span lang="en-US">ver.0.21(2004/4/28)</span></font></h3>
331-
332-<ul>
333-
334- <li>
335- <p style="margin-bottom: 0cm;">初期設定を<font face="Times New Roman, serif"><span lang="en-US">mb-emulator.ini</span></font>か
336-ら読むように変更 </p>
337-
338- </li>
339-
340- <li>
341- <p style="margin-bottom: 0cm;"><font face="Times New Roman, serif"><span lang="en-US">EUC</span></font>と<font face="Times New Roman, serif"><span lang="en-US">UTF-8</span></font>間
342-を直接変換するように変更 </p>
343-
344- </li>
345-
346- <li>
347- <p>バグつぶし </p>
348-
349- </li>
350-
351-</ul>
352-
353-<h3><font face="Times New Roman, serif"><span lang="en-US">ver.0.2(2004/4/27)</span></font></h3>
354-
355-<ul>
356-
357- <li>
358- <p><font face="Times New Roman, serif"><span lang="en-US">jcode</span></font>を使わない形で独立しました。<font face="Times New Roman, serif"><span lang="en-US">12</span></font>関
359-数サポート<font face="Times New Roman, serif"><span lang="en-US"><br>
360-
361-mb_language, mb_internal_encoding, mb_convert_encoding,
362-mb_convert_kana, mb_send_mail, mb_strimwidth, mb_detect_encoding,
363-mb_detect_order, mb_strlen, mb_substr, mb_strcut, mb_strrpos </span></font>
364- </p>
365-
366- </li>
367-
368-</ul>
369-
370-<h2>関数サポート状況(<font face="Times New Roman, serif"><span lang="en-US">2004/8/19</span></font>)</h2>
371-
372-<table cellpadding="2" cellspacing="2">
373-
374- <tbody>
375-
376- <tr>
377-
378- <td width="150">
379- <p><font face="Times New Roman, serif"><span lang="en-US"><b>mbstring</b></span></font><b>関
380-数名</b></p>
381-
382- </td>
383-
384- <td width="300">
385- <p><b>今後のサポート予定</b></p>
386-
387- </td>
388-
389- </tr>
390-
391- <tr>
392-
393- <td>
394- <p><font face="Times New Roman, serif"><span lang="en-US">mb_convert_case</span></font></p>
395-
396- </td>
397-
398- <td>
399- <p>サポート可能だけど結構大変そう。あまり使いそうにない気がする。もしニーズがあれば</p>
400-
401- </td>
402-
403- </tr>
404-
405- <tr>
406-
407- <td>
408- <p><font face="Times New Roman, serif"><span lang="en-US">mb_convert_encoding</span></font></p>
409-
410- </td>
411-
412- <td>
413- <p>サポート済み</p>
414-
415- </td>
416-
417- </tr>
418-
419- <tr>
420-
421- <td>
422- <p><font face="Times New Roman, serif"><span lang="en-US">mb_convert_kana</span></font></p>
423-
424- </td>
425-
426- <td>
427- <p>サポート済み</p>
428-
429- </td>
430-
431- </tr>
432-
433- <tr>
434-
435- <td>
436- <p><font face="Times New Roman, serif"><span lang="en-US">mb_convert_variables</span></font></p>
437-
438- </td>
439-
440- <td>
441- <p>サポート済み</p>
442-
443- </td>
444-
445- </tr>
446-
447- <tr>
448-
449- <td>
450- <p><font face="Times New Roman, serif"><span lang="en-US">mb_decode_mimeheader</span></font></p>
451-
452- </td>
453-
454- <td>
455- <p>サポート済み</p>
456-
457- </td>
458-
459- </tr>
460-
461- <tr>
462-
463- <td>
464- <p><font face="Times New Roman, serif"><span lang="en-US">mb_decode_numericentity</span></font></p>
465-
466- </td>
467-
468- <td>
469- <p>サポート済み</p>
470-
471- </td>
472-
473- </tr>
474-
475- <tr>
476-
477- <td>
478- <p><font face="Times New Roman, serif"><span lang="en-US">mb_detect_encoding</span></font></p>
479-
480- </td>
481-
482- <td>
483- <p>サポート済み</p>
484-
485- </td>
486-
487- </tr>
488-
489- <tr>
490-
491- <td>
492- <p><font face="Times New Roman, serif"><span lang="en-US">mb_detect_order</span></font></p>
493-
494- </td>
495-
496- <td>
497- <p>サポート済み</p>
498-
499- </td>
500-
501- </tr>
502-
503- <tr>
504-
505- <td>
506- <p><font face="Times New Roman, serif"><span lang="en-US">mb_encode_mimeheader</span></font></p>
507-
508- </td>
509-
510- <td>
511- <p>サポート済み</p>
512-
513- </td>
514-
515- </tr>
516-
517- <tr>
518-
519- <td>
520- <p><font face="Times New Roman, serif"><span lang="en-US">mb_encode_numericentity</span></font></p>
521-
522- </td>
523-
524- <td>
525- <p>サポート済み</p>
526-
527- </td>
528-
529- </tr>
530-
531- <tr>
532-
533- <td>
534- <p><font face="Times New Roman, serif"><span lang="en-US">mb_ereg_match</span></font></p>
535-
536- </td>
537-
538- <td>
539- <p>サポート不可能</p>
540-
541- </td>
542-
543- </tr>
544-
545- <tr>
546-
547- <td>
548- <p><font face="Times New Roman, serif"><span lang="en-US">mb_ereg_replace</span></font></p>
549-
550- </td>
551-
552- <td>
553- <p>サポート不可能</p>
554-
555- </td>
556-
557- </tr>
558-
559- <tr>
560-
561- <td>
562- <p><font face="Times New Roman, serif"><span lang="en-US">mb_ereg_search_getpos</span></font></p>
563-
564- </td>
565-
566- <td>
567- <p>サポート不可能</p>
568-
569- </td>
570-
571- </tr>
572-
573- <tr>
574-
575- <td>
576- <p><font face="Times New Roman, serif"><span lang="en-US">mb_ereg_search_getregs</span></font></p>
577-
578- </td>
579-
580- <td>
581- <p>サポート不可能</p>
582-
583- </td>
584-
585- </tr>
586-
587- <tr>
588-
589- <td>
590- <p><font face="Times New Roman, serif"><span lang="en-US">mb_ereg_search_init</span></font></p>
591-
592- </td>
593-
594- <td>
595- <p>サポート不可能</p>
596-
597- </td>
598-
599- </tr>
600-
601- <tr>
602-
603- <td>
604- <p><font face="Times New Roman, serif"><span lang="en-US">mb_ereg_search_pos</span></font></p>
605-
606- </td>
607-
608- <td>
609- <p>サポート不可能</p>
610-
611- </td>
612-
613- </tr>
614-
615- <tr>
616-
617- <td>
618- <p><font face="Times New Roman, serif"><span lang="en-US">mb_ereg_search_regs</span></font></p>
619-
620- </td>
621-
622- <td>
623- <p>サポート不可能</p>
624-
625- </td>
626-
627- </tr>
628-
629- <tr>
630-
631- <td>
632- <p><font face="Times New Roman, serif"><span lang="en-US">mb_ereg_search_setpos</span></font></p>
633-
634- </td>
635-
636- <td>
637- <p>サポート不可能</p>
638-
639- </td>
640-
641- </tr>
642-
643- <tr>
644-
645- <td>
646- <p><font face="Times New Roman, serif"><span lang="en-US">mb_ereg_search</span></font></p>
647-
648- </td>
649-
650- <td>
651- <p>サポート不可能</p>
652-
653- </td>
654-
655- </tr>
656-
657- <tr>
658-
659- <td>
660- <p><font face="Times New Roman, serif"><span lang="en-US">mb_ereg</span></font></p>
661-
662- </td>
663-
664- <td>
665- <p>サポート不可能</p>
666-
667- </td>
668-
669- </tr>
670-
671- <tr>
672-
673- <td>
674- <p><font face="Times New Roman, serif"><span lang="en-US">mb_eregi_replace</span></font></p>
675-
676- </td>
677-
678- <td>
679- <p>サポート不可能</p>
680-
681- </td>
682-
683- </tr>
684-
685- <tr>
686-
687- <td>
688- <p><font face="Times New Roman, serif"><span lang="en-US">mb_eregi</span></font></p>
689-
690- </td>
691-
692- <td>
693- <p>サポート不可能</p>
694-
695- </td>
696-
697- </tr>
698-
699- <tr>
700-
701- <td>
702- <p><font face="Times New Roman, serif"><span lang="en-US">mb_get_info</span></font></p>
703-
704- </td>
705-
706- <td>
707- <p>サポート可能</p>
708-
709- </td>
710-
711- </tr>
712-
713- <tr>
714-
715- <td>
716- <p><font face="Times New Roman, serif"><span lang="en-US">mb_http_input</span></font></p>
717-
718- </td>
719-
720- <td>
721- <p>サポート済み(常に<font face="Times New Roman, serif"><span lang="en-US">FALSE</span></font>を返す)</p>
722-
723- </td>
724-
725- </tr>
726-
727- <tr>
728-
729- <td>
730- <p><font face="Times New Roman, serif"><span lang="en-US">mb_http_output</span></font></p>
731-
732- </td>
733-
734- <td>
735- <p>サポート済み</p>
736-
737- </td>
738-
739- </tr>
740-
741- <tr>
742-
743- <td>
744- <p><font face="Times New Roman, serif"><span lang="en-US">mb_internal_encoding</span></font></p>
745-
746- </td>
747-
748- <td>
749- <p>サポート済み</p>
750-
751- </td>
752-
753- </tr>
754-
755- <tr>
756-
757- <td>
758- <p><font face="Times New Roman, serif"><span lang="en-US">mb_language</span></font></p>
759-
760- </td>
761-
762- <td>
763- <p>サポート済み(ただし指定しても何も変わらない)</p>
764-
765- </td>
766-
767- </tr>
768-
769- <tr>
770-
771- <td>
772- <p><font face="Times New Roman, serif"><span lang="en-US">mb_output_handler</span></font></p>
773-
774- </td>
775-
776- <td>
777- <p>サポート済み</p>
778-
779- </td>
780-
781- </tr>
782-
783- <tr>
784-
785- <td>
786- <p><font face="Times New Roman, serif"><span lang="en-US">mb_parse_str</span></font></p>
787-
788- </td>
789-
790- <td>
791- <p>サポート可能</p>
792-
793- </td>
794-
795- </tr>
796-
797- <tr>
798-
799- <td>
800- <p><font face="Times New Roman, serif"><span lang="en-US">mb_preferred_mime_name</span></font></p>
801-
802- </td>
803-
804- <td>
805- <p>サポート済み</p>
806-
807- </td>
808-
809- </tr>
810-
811- <tr>
812-
813- <td>
814- <p><font face="Times New Roman, serif"><span lang="en-US">mb_regex_encoding</span></font></p>
815-
816- </td>
817-
818- <td>
819- <p>サポート不可能</p>
820-
821- </td>
822-
823- </tr>
824-
825- <tr>
826-
827- <td>
828- <p><font face="Times New Roman, serif"><span lang="en-US">mb_regex_set_options</span></font></p>
829-
830- </td>
831-
832- <td>
833- <p>サポート不可能</p>
834-
835- </td>
836-
837- </tr>
838-
839- <tr>
840-
841- <td>
842- <p><font face="Times New Roman, serif"><span lang="en-US">mb_send_mail</span></font></p>
843-
844- </td>
845-
846- <td>
847- <p>サポート済み</p>
848-
849- </td>
850-
851- </tr>
852-
853- <tr>
854-
855- <td>
856- <p><font face="Times New Roman, serif"><span lang="en-US">mb_split</span></font></p>
857-
858- </td>
859-
860- <td>
861- <p>サポート不可能</p>
862-
863- </td>
864-
865- </tr>
866-
867- <tr>
868-
869- <td>
870- <p><font face="Times New Roman, serif"><span lang="en-US">mb_strcut</span></font></p>
871-
872- </td>
873-
874- <td>
875- <p>サポート済み</p>
876-
877- </td>
878-
879- </tr>
880-
881- <tr>
882-
883- <td>
884- <p><font face="Times New Roman, serif"><span lang="en-US">mb_strimwidth</span></font></p>
885-
886- </td>
887-
888- <td>
889- <p>サポート済み</p>
890-
891- </td>
892-
893- </tr>
894-
895- <tr>
896-
897- <td>
898- <p><font face="Times New Roman, serif"><span lang="en-US">mb_strlen</span></font></p>
899-
900- </td>
901-
902- <td>
903- <p>サポート済み</p>
904-
905- </td>
906-
907- </tr>
908-
909- <tr>
910-
911- <td>
912- <p><font face="Times New Roman, serif"><span lang="en-US">mb_strpos</span></font></p>
913-
914- </td>
915-
916- <td>
917- <p>サポート済み</p>
918-
919- </td>
920-
921- </tr>
922-
923- <tr>
924-
925- <td>
926- <p><font face="Times New Roman, serif"><span lang="en-US">mb_strrpos</span></font></p>
927-
928- </td>
929-
930- <td>
931- <p>サポート済み</p>
932-
933- </td>
934-
935- </tr>
936-
937- <tr>
938-
939- <td>
940- <p><font face="Times New Roman, serif"><span lang="en-US">mb_strtolower</span></font></p>
941-
942- </td>
943-
944- <td>
945- <p>サポート可能だけど大変そう</p>
946-
947- </td>
948-
949- </tr>
950-
951- <tr>
952-
953- <td>
954- <p><font face="Times New Roman, serif"><span lang="en-US">mb_strtoupper</span></font></p>
955-
956- </td>
957-
958- <td>
959- <p>サポート可能だけど大変そう</p>
960-
961- </td>
962-
963- </tr>
964-
965- <tr>
966-
967- <td>
968- <p><font face="Times New Roman, serif"><span lang="en-US">mb_strwidth</span></font></p>
969-
970- </td>
971-
972- <td>
973- <p>サポート済み</p>
974-
975- </td>
976-
977- </tr>
978-
979- <tr>
980-
981- <td>
982- <p><font face="Times New Roman, serif"><span lang="en-US">mb_substitute_character</span></font></p>
983-
984- </td>
985-
986- <td>
987- <p>サポート難しそう</p>
988-
989- </td>
990-
991- </tr>
992-
993- <tr>
994-
995- <td>
996- <p><font face="Times New Roman, serif"><span lang="en-US">mb_substr_count</span></font></p>
997-
998- </td>
999-
1000- <td>
1001- <p>サポート済み</p>
1002-
1003- </td>
1004-
1005- </tr>
1006-
1007- <tr>
1008-
1009- <td>
1010- <p><font face="Times New Roman, serif"><span lang="en-US">mb_substr</span></font></p>
1011-
1012- </td>
1013-
1014- <td>
1015- <p>サポート済み</p>
1016-
1017- </td>
1018-
1019- </tr>
1020-
1021- </tbody>
1022-</table>
1023-
1024-<p><br>
1025-
1026-<br>
1027-
1028-</p>
1029-
1030-</body>
1031-</html>
2+<HTML>
3+<HEAD>
4+ <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=shift_jis">
5+ <TITLE>変更履歴</TITLE>
6+ <META NAME="GENERATOR" CONTENT="OpenOffice.org 1.1.3 (Win32)">
7+ <META NAME="CREATED" CONTENT="20050130;2310982">
8+ <META NAME="CHANGED" CONTENT="20050130;2372139">
9+</HEAD>
10+<BODY LANG="ja-JP" DIR="LTR">
11+<H2>変更履歴</H2>
12+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">Ver.0.37</SPAN></FONT>(<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">2005/1/30</SPAN></FONT>)</H3>
13+<UL>
14+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">JIS</SPAN></FONT>のマッチングのバグを再び修正しました。
15+ </P>
16+</UL>
17+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">Ver.0.36</SPAN></FONT>(<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">2004/11/13</SPAN></FONT>)</H3>
18+<UL>
19+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">JIS</SPAN></FONT>のマッチングのバグを修正しました。
20+ </P>
21+</UL>
22+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">Ver.0.35</SPAN></FONT>(<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">2004/9/26</SPAN></FONT>)</H3>
23+<UL>
24+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_send_mail</SPAN></FONT>のバグを修正しました。
25+ </P>
26+</UL>
27+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">Ver.0.341</SPAN></FONT>(<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">2004/9/16</SPAN></FONT>)</H3>
28+<UL>
29+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_kana</SPAN></FONT>のバグを修正しました。
30+ </P>
31+</UL>
32+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">Ver.0.34</SPAN></FONT>(<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">2004/9/15</SPAN></FONT>)</H3>
33+<UL>
34+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_kana</SPAN></FONT>のバグを修正しました。
35+ </P>
36+</UL>
37+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">Ver.0.33</SPAN></FONT>(<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">2004/8/27</SPAN></FONT>)</H3>
38+<UL>
39+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_encode_numericentity,
40+ mb_decode_numericentity</SPAN></FONT>をサポートしました。
41+ </P>
42+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_encoding</SPAN></FONT>で<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">UTF-16</SPAN></FONT>からの変換をサポートしました。
43+ </P>
44+ <LI><P STYLE="margin-bottom: 0cm">シフト<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">JIS</SPAN></FONT>の処理を<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">SJIS-WIN</SPAN></FONT>互換にしました。<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US"><BR>mbstring</SPAN></FONT>本家とは異なり,<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">SJIS</SPAN></FONT>と<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">SJIS-WIN</SPAN></FONT>の動作は同じです。
45+ </P>
46+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_strcut</SPAN></FONT>のバグを修正しました。
47+ </P>
48+ <LI><P>変更履歴を<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">HTML</SPAN></FONT>に変えました。
49+ </P>
50+</UL>
51+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">Ver.0.32(2004/8/19)</SPAN></FONT></H3>
52+<UL>
53+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_http_input,
54+ mb_http_output, mb_output_handler
55+ </SPAN></FONT>をサポートしました<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US"><BR></SPAN></FONT>ただし,<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_http_input</SPAN></FONT>に関しては文字コード変換を行わないため,常に<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">FALSE</SPAN></FONT>を返します。
56+ </P>
57+</UL>
58+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">Ver.0.31(2004/8/16)</SPAN></FONT></H3>
59+<UL>
60+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_decode_mimeheader</SPAN></FONT>のバグを修正しました
61+ </P>
62+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_variables</SPAN></FONT>の初期設定チェックのバグを修正しました
63+ </P>
64+</UL>
65+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">Ver.0.3(2004/8/8)</SPAN></FONT></H3>
66+<UL>
67+ <LI><P STYLE="margin-bottom: 0cm">バグつぶし<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US"><BR></SPAN></FONT>入れ子のファンクションで二重宣言になってしまう場合があるので外部に出しました。
68+ </P>
69+ <LI><P STYLE="margin-bottom: 0cm">バグつぶし<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US"><BR>mb_strcut</SPAN></FONT>のバグを修正しました
70+ </P>
71+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_encode_mimeheader,
72+ mb_decode_mimeheader</SPAN></FONT>をサポートしました。
73+ </P>
74+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_variables</SPAN></FONT>で配列からの変換をサポートしました。<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US"><BR></SPAN></FONT>これに伴い<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_variables</SPAN></FONT>を<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">2</SPAN></FONT>パターンにし,初期設定で変更できるようにしました。<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US"><BR></SPAN></FONT>初期設定ファイルの<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">convert-variables-arrayonly</SPAN></FONT>が<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">no</SPAN></FONT>の場合(デフォルト),これまでと同じように配列でなくても変換します。また,最初の要素が配列の場合,それだけを変換します。ただし,こちらの場合,呼び出し時に引数に<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">&amp;</SPAN></FONT>を付けて明示的に参照渡しにする必要があります。<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US"><BR>convert-variables-arrayonly</SPAN></FONT>が<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">no</SPAN></FONT>でない場合,変換する引数は配列だけになります。その代わり,<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">&amp;</SPAN></FONT>は不要です。
75+ </P>
76+</UL>
77+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">Ver.0.25(2004/7/7)</SPAN></FONT></H3>
78+<UL>
79+ <LI><P>バグつぶし<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US"><BR></SPAN></FONT>入れ子のファンクションで二重宣言になってしまう場合があるので外部に出しました。
80+ </P>
81+</UL>
82+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">ver.0.24(2004/6/8)</SPAN></FONT></H3>
83+<UL>
84+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_strpos,
85+ mb_substr_count, mb_preferred_mime_name</SPAN></FONT>をサポートしました。
86+ </P>
87+</UL>
88+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">ver.0.23(2004/5/19)</SPAN></FONT></H3>
89+<UL>
90+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_encoding</SPAN></FONT>で<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">UTF-16</SPAN></FONT>への変換をサポートしました。<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US"><BR><BR>usage:<BR>$str
91+ = mb_convert_encoding($str, 'UTF-16', 'EUC-JP,
92+ UTF-8');<BR><BR></SPAN></FONT>返すのは<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">BOM</SPAN></FONT>なしのビッグ・エンディアンになります。
93+ </P>
94+</UL>
95+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">ver.0.22(2004/5/11)</SPAN></FONT></H3>
96+<UL>
97+ <LI><P STYLE="margin-bottom: 0cm">バグつぶし
98+ </P>
99+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_variables</SPAN></FONT>を暫定サポート
100+ </P>
101+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_strwidth</SPAN></FONT>をサポート
102+ </P>
103+</UL>
104+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">ver.0.21(2004/4/28)</SPAN></FONT></H3>
105+<UL>
106+ <LI><P STYLE="margin-bottom: 0cm">初期設定を<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb-emulator.ini</SPAN></FONT>から読むように変更
107+ </P>
108+ <LI><P STYLE="margin-bottom: 0cm"><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">EUC</SPAN></FONT>と<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">UTF-8</SPAN></FONT>間を直接変換するように変更
109+ </P>
110+ <LI><P>バグつぶし
111+ </P>
112+</UL>
113+<H3><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">ver.0.2(2004/4/27)</SPAN></FONT></H3>
114+<UL>
115+ <LI><P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">jcode</SPAN></FONT>を使わない形で独立しました。<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">12</SPAN></FONT>関数サポート<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US"><BR>mb_language,
116+ mb_internal_encoding, mb_convert_encoding, mb_convert_kana,
117+ mb_send_mail, mb_strimwidth, mb_detect_encoding, mb_detect_order,
118+ mb_strlen, mb_substr, mb_strcut, mb_strrpos </SPAN></FONT>
119+ </P>
120+</UL>
121+<H2>関数サポート状況(<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">2004/8/19</SPAN></FONT>)</H2>
122+<TABLE CELLPADDING=2 CELLSPACING=2>
123+ <TR>
124+ <TD WIDTH=150>
125+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US"><B>mbstring</B></SPAN></FONT><B>関数名</B></P>
126+ </TD>
127+ <TD WIDTH=300>
128+ <P><B>今後のサポート予定</B></P>
129+ </TD>
130+ </TR>
131+ <TR>
132+ <TD>
133+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_case</SPAN></FONT></P>
134+ </TD>
135+ <TD>
136+ <P>サポート可能だけど結構大変そう。あまり使いそうにない気がする。もしニーズがあれば</P>
137+ </TD>
138+ </TR>
139+ <TR>
140+ <TD>
141+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_encoding</SPAN></FONT></P>
142+ </TD>
143+ <TD>
144+ <P>サポート済み</P>
145+ </TD>
146+ </TR>
147+ <TR>
148+ <TD>
149+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_kana</SPAN></FONT></P>
150+ </TD>
151+ <TD>
152+ <P>サポート済み</P>
153+ </TD>
154+ </TR>
155+ <TR>
156+ <TD>
157+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_convert_variables</SPAN></FONT></P>
158+ </TD>
159+ <TD>
160+ <P>サポート済み</P>
161+ </TD>
162+ </TR>
163+ <TR>
164+ <TD>
165+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_decode_mimeheader</SPAN></FONT></P>
166+ </TD>
167+ <TD>
168+ <P>サポート済み</P>
169+ </TD>
170+ </TR>
171+ <TR>
172+ <TD>
173+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_decode_numericentity</SPAN></FONT></P>
174+ </TD>
175+ <TD>
176+ <P>サポート済み</P>
177+ </TD>
178+ </TR>
179+ <TR>
180+ <TD>
181+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_detect_encoding</SPAN></FONT></P>
182+ </TD>
183+ <TD>
184+ <P>サポート済み</P>
185+ </TD>
186+ </TR>
187+ <TR>
188+ <TD>
189+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_detect_order</SPAN></FONT></P>
190+ </TD>
191+ <TD>
192+ <P>サポート済み</P>
193+ </TD>
194+ </TR>
195+ <TR>
196+ <TD>
197+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_encode_mimeheader</SPAN></FONT></P>
198+ </TD>
199+ <TD>
200+ <P>サポート済み</P>
201+ </TD>
202+ </TR>
203+ <TR>
204+ <TD>
205+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_encode_numericentity</SPAN></FONT></P>
206+ </TD>
207+ <TD>
208+ <P>サポート済み</P>
209+ </TD>
210+ </TR>
211+ <TR>
212+ <TD>
213+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_ereg_match</SPAN></FONT></P>
214+ </TD>
215+ <TD>
216+ <P>サポート不可能</P>
217+ </TD>
218+ </TR>
219+ <TR>
220+ <TD>
221+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_ereg_replace</SPAN></FONT></P>
222+ </TD>
223+ <TD>
224+ <P>サポート不可能</P>
225+ </TD>
226+ </TR>
227+ <TR>
228+ <TD>
229+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_ereg_search_getpos</SPAN></FONT></P>
230+ </TD>
231+ <TD>
232+ <P>サポート不可能</P>
233+ </TD>
234+ </TR>
235+ <TR>
236+ <TD>
237+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_ereg_search_getregs</SPAN></FONT></P>
238+ </TD>
239+ <TD>
240+ <P>サポート不可能</P>
241+ </TD>
242+ </TR>
243+ <TR>
244+ <TD>
245+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_ereg_search_init</SPAN></FONT></P>
246+ </TD>
247+ <TD>
248+ <P>サポート不可能</P>
249+ </TD>
250+ </TR>
251+ <TR>
252+ <TD>
253+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_ereg_search_pos</SPAN></FONT></P>
254+ </TD>
255+ <TD>
256+ <P>サポート不可能</P>
257+ </TD>
258+ </TR>
259+ <TR>
260+ <TD>
261+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_ereg_search_regs</SPAN></FONT></P>
262+ </TD>
263+ <TD>
264+ <P>サポート不可能</P>
265+ </TD>
266+ </TR>
267+ <TR>
268+ <TD>
269+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_ereg_search_setpos</SPAN></FONT></P>
270+ </TD>
271+ <TD>
272+ <P>サポート不可能</P>
273+ </TD>
274+ </TR>
275+ <TR>
276+ <TD>
277+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_ereg_search</SPAN></FONT></P>
278+ </TD>
279+ <TD>
280+ <P>サポート不可能</P>
281+ </TD>
282+ </TR>
283+ <TR>
284+ <TD>
285+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_ereg</SPAN></FONT></P>
286+ </TD>
287+ <TD>
288+ <P>サポート不可能</P>
289+ </TD>
290+ </TR>
291+ <TR>
292+ <TD>
293+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_eregi_replace</SPAN></FONT></P>
294+ </TD>
295+ <TD>
296+ <P>サポート不可能</P>
297+ </TD>
298+ </TR>
299+ <TR>
300+ <TD>
301+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_eregi</SPAN></FONT></P>
302+ </TD>
303+ <TD>
304+ <P>サポート不可能</P>
305+ </TD>
306+ </TR>
307+ <TR>
308+ <TD>
309+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_get_info</SPAN></FONT></P>
310+ </TD>
311+ <TD>
312+ <P>サポート可能</P>
313+ </TD>
314+ </TR>
315+ <TR>
316+ <TD>
317+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_http_input</SPAN></FONT></P>
318+ </TD>
319+ <TD>
320+ <P>サポート済み(常に<FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">FALSE</SPAN></FONT>を返す)</P>
321+ </TD>
322+ </TR>
323+ <TR>
324+ <TD>
325+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_http_output</SPAN></FONT></P>
326+ </TD>
327+ <TD>
328+ <P>サポート済み</P>
329+ </TD>
330+ </TR>
331+ <TR>
332+ <TD>
333+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_internal_encoding</SPAN></FONT></P>
334+ </TD>
335+ <TD>
336+ <P>サポート済み</P>
337+ </TD>
338+ </TR>
339+ <TR>
340+ <TD>
341+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_language</SPAN></FONT></P>
342+ </TD>
343+ <TD>
344+ <P>サポート済み(ただし指定しても何も変わらない)</P>
345+ </TD>
346+ </TR>
347+ <TR>
348+ <TD>
349+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_output_handler</SPAN></FONT></P>
350+ </TD>
351+ <TD>
352+ <P>サポート済み</P>
353+ </TD>
354+ </TR>
355+ <TR>
356+ <TD>
357+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_parse_str</SPAN></FONT></P>
358+ </TD>
359+ <TD>
360+ <P>サポート可能</P>
361+ </TD>
362+ </TR>
363+ <TR>
364+ <TD>
365+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_preferred_mime_name</SPAN></FONT></P>
366+ </TD>
367+ <TD>
368+ <P>サポート済み</P>
369+ </TD>
370+ </TR>
371+ <TR>
372+ <TD>
373+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_regex_encoding</SPAN></FONT></P>
374+ </TD>
375+ <TD>
376+ <P>サポート不可能</P>
377+ </TD>
378+ </TR>
379+ <TR>
380+ <TD>
381+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_regex_set_options</SPAN></FONT></P>
382+ </TD>
383+ <TD>
384+ <P>サポート不可能</P>
385+ </TD>
386+ </TR>
387+ <TR>
388+ <TD>
389+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_send_mail</SPAN></FONT></P>
390+ </TD>
391+ <TD>
392+ <P>サポート済み</P>
393+ </TD>
394+ </TR>
395+ <TR>
396+ <TD>
397+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_split</SPAN></FONT></P>
398+ </TD>
399+ <TD>
400+ <P>サポート不可能</P>
401+ </TD>
402+ </TR>
403+ <TR>
404+ <TD>
405+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_strcut</SPAN></FONT></P>
406+ </TD>
407+ <TD>
408+ <P>サポート済み</P>
409+ </TD>
410+ </TR>
411+ <TR>
412+ <TD>
413+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_strimwidth</SPAN></FONT></P>
414+ </TD>
415+ <TD>
416+ <P>サポート済み</P>
417+ </TD>
418+ </TR>
419+ <TR>
420+ <TD>
421+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_strlen</SPAN></FONT></P>
422+ </TD>
423+ <TD>
424+ <P>サポート済み</P>
425+ </TD>
426+ </TR>
427+ <TR>
428+ <TD>
429+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_strpos</SPAN></FONT></P>
430+ </TD>
431+ <TD>
432+ <P>サポート済み</P>
433+ </TD>
434+ </TR>
435+ <TR>
436+ <TD>
437+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_strrpos</SPAN></FONT></P>
438+ </TD>
439+ <TD>
440+ <P>サポート済み</P>
441+ </TD>
442+ </TR>
443+ <TR>
444+ <TD>
445+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_strtolower</SPAN></FONT></P>
446+ </TD>
447+ <TD>
448+ <P>サポート可能だけど大変そう</P>
449+ </TD>
450+ </TR>
451+ <TR>
452+ <TD>
453+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_strtoupper</SPAN></FONT></P>
454+ </TD>
455+ <TD>
456+ <P>サポート可能だけど大変そう</P>
457+ </TD>
458+ </TR>
459+ <TR>
460+ <TD>
461+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_strwidth</SPAN></FONT></P>
462+ </TD>
463+ <TD>
464+ <P>サポート済み</P>
465+ </TD>
466+ </TR>
467+ <TR>
468+ <TD>
469+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_substitute_character</SPAN></FONT></P>
470+ </TD>
471+ <TD>
472+ <P>サポート難しそう</P>
473+ </TD>
474+ </TR>
475+ <TR>
476+ <TD>
477+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_substr_count</SPAN></FONT></P>
478+ </TD>
479+ <TD>
480+ <P>サポート済み</P>
481+ </TD>
482+ </TR>
483+ <TR>
484+ <TD>
485+ <P><FONT FACE="Times New Roman, serif"><SPAN LANG="en-US">mb_substr</SPAN></FONT></P>
486+ </TD>
487+ <TD>
488+ <P>サポート済み</P>
489+ </TD>
490+ </TR>
491+</TABLE>
492+<P><BR><BR>
493+</P>
494+</BODY>
495+</HTML>
\ No newline at end of file
--- a/euc/nucleus/libs/mb_emulator/mb-emulator.ini
+++ b/euc/nucleus/libs/mb_emulator/mb-emulator.ini
@@ -1,6 +1,5 @@
11 language=ja
2-internal_encoding=UTF-8
2+internal_encoding=
33 detect_order=ASCII, JIS, UTF-8, EUC-JP, SJIS
44 convert_variables_arrayonly=no
55 http_output=pass
6-substitute_character=none
--- a/euc/nucleus/libs/mb_emulator/mb-emulator.php
+++ b/euc/nucleus/libs/mb_emulator/mb-emulator.php
@@ -1,93 +1,62 @@
11 <?php
2-/* mbstring emulator for Japanese by Andy
2+/* mb-emulator.php by Andy
33 * email : webmaster@matsubarafamily.com
44 *
55 * license based on GPL(GNU General Public License)
66 *
7- * Ver.0.84 (2006/1/20)
7+ * Ver.0.37 (2005/1/30)
88 */
99
1010
11-define('MB_CASE_UPPER', 0);
12-define('MB_CASE_LOWER', 1);
13-define('MB_CASE_TITLE', 2);
1411
1512 include dirname(__FILE__).'/convert.table';
16-// include dirname(__FILE__).'/sjistouni.table';
17-// include dirname(__FILE__).'/unitosjis.table';
13+include dirname(__FILE__).'/sjistouni.table';
14+include dirname(__FILE__).'/unitosjis.table';
1815
16+$ini_file = parse_ini_file(dirname(__FILE__).'/mb-emulator.ini');
1917
20-$mbemu_internals['ini_file'] = parse_ini_file(dirname(__FILE__).'/mb-emulator.ini');
21-
22-$mbemu_internals['language'] = $mbemu_internals['ini_file']['language'];
23-$mbemu_internals['internal_encoding'] = $mbemu_internals['ini_file']['internal_encoding'];
24-$mbemu_internals['lang_array'] = array (
25- 'Japanese', 'ja','jp', 'English', 'en', 'uni'
18+$_language = $ini_file['language'];
19+$_internal_encoding = $ini_file['internal_encoding'];
20+$_lang_array = array (
21+ 'Japanese', 'ja', 'English', 'en', 'uni'
2622 );
2723
28-$mbemu_internals['encoding'] = array (
29- 'AUTO' => 0xFF,
24+$_mb_encoding = array (
25+ 'AUTO' => 0,
3026 'ASCII' => 0,
3127 'EUC-JP' => 1,
3228 'EUC' => 1,
3329 'SJIS' => 2,
3430 'SHIFT-JIS' => 2,
35- 'SHIFT_JIS' => 2,
3631 'SJIS-WIN' => 2,
3732 'JIS' => 3,
3833 'ISO-2022-JP' => 3,
3934 'UTF-8' => 4,
4035 'UTF8' => 4,
41- 'UTF-16'=>5,
42- 'ISO-8859-1' => 6
36+ 'UTF-16'=>5
4337 );
4438
39+if (!(mb_detect_order($ini_file['detect_order'])))
40+ $_detect_order = array ("ASCII", "JIS", "UTF-8", "EUC-JP", "SJIS");
4541
46-function mb_detect_order($encoding_list = '')
47-{
48- global $mbemu_internals;
49-
50- if ($encoding_list) {
51- if (is_string($encoding_list)) {
52- $encoding_list = strtoupper($encoding_list);
53- $encoding_list = split(', *', $encoding_list);
54- }
55- foreach($encoding_list as $encode)
56- if (!array_key_exists($encode, $mbemu_internals['encoding'])) return FALSE;
57- $mbemu_internals['detect_order'] = $encoding_list;
58- return TRUE;
59- }
60- return $mbemu_internals['detect_order'];
61-}
62-
63-if (!(mb_detect_order($mbemu_internals['ini_file']['detect_order'])))
64- $mbemu_internals['detect_order'] = array ("ASCII", "JIS", "UTF-8", "EUC-JP", "SJIS");
65-
66-$mbemu_internals['substitute_character'] = $mbemu_internals['ini_file']['substitute_character'];
67-
68-$mbemu_internals['regex'] = array(
69- 0 => "[\x01-\x7F]", // for ASCII
70- 1 => "[\xA1-\xFE]([\xA1-\xFE])|[\x01-\x7F]|\x8E([\xA0-\xDF])", // for EUC-JP
71- 2 => "[\x81-\x9F\xE0-\xFC]([\x40-\xFC])|[\x01-\x7F]|[\xA0-\xDF]", // for Shift_JIS
72- 3 => "(?:^|\x1B\(\x42)([\x01-\x1A,\x1C-\x7F]*)|(?:\x1B\\$\x42([\x01-\x1A,\x1C-\x7F]*))|(?:\x1B\(I([\x01-\x1A,\x1C-\x7F]*))", // for JIS
73- 4 => "[\x01-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF][\x80-\xBF]", // for UTF-8
74- 5 => "..", // for UTF-16
75- 6 => "." // for ISO-8859-1
76- );
7742
7843
44+$sjis_match = "[\x81-\x9F,\xE0-\xFC]([\x40-\xFC])|[\x01-\x7F]|[\xA0-\xDF]";
45+$euc_match = "[\xa1-\xfe]([\xa1-\xfe])|[\x01-\x7f]|\x8e([\xa0-\xdf])";
46+$utf8_match = "[\x01-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF][\x80-\xBF]";
47+$jis_match = "(?:^|\x1b\(\x42)([^\x1b]*)|(?:\x1b\\$\x42([^\x1b]*))|(?:\x1b\(I([^\x1b]*))";
7948
80-function mb_language($language='')
49+function mb_language($language)
8150 {
82- global $mbemu_internals;
51+ global $_language, $_lang_array;
8352
8453 if ($language =='') {
85- if ($mbemu_internals['language'] == '') return FALSE;
86- else return $mbemu_internals['language'];
54+ if ($_language == '') return FALSE;
55+ else return $_language;
8756 } else {
88- foreach ($mbemu_internals['lang_array'] as $element) {
57+ foreach ($_lang_array as $element) {
8958 if ($element == $language) {
90- $mbemu_internals['language'] = $language;
59+ $_language = $language;
9160 return TRUE;
9261 }
9362 }
@@ -98,65 +67,29 @@ function mb_language($language='')
9867
9968 function mb_internal_encoding($encoding = '')
10069 {
101- global $mbemu_internals;
70+ global $_internal_encoding;
10271
10372 if ($encoding =='') {
104- if ($mbemu_internals['internal_encoding'] == '') return FALSE;
105- else return $mbemu_internals['internal_encoding'];
73+ if ($_internal_encoding == '') return FALSE;
74+ else return $_internal_encoding;
10675 } else {
107- $mbemu_internals['internal_encoding'] = $encoding;
76+ $_internal_encoding = $encoding;
10877 return TRUE;
10978 }
11079 }
11180
112-function mb_get_info($type = 'all')
113-{
114- switch(strtolower($type)) {
115- case 'all' :
116- $a['internal_encoding'] = mb_internal_encoding();
117- $a['http_output'] = mb_http_output();
118- $a['http_input'] = 'pass';
119- $a['func_overload'] = 'pass';
120- return $a;
121- case 'internal_encoding' :
122- return mb_internal_encoding();
123- case 'http_output' :
124- return mb_http_output();
125- case 'http_input' :
126- return 'pass';
127- case 'func_overloard' :
128- return 'pass';
129- }
130-}
131-
132-function mb_substitute_character($subchar='')
133-{
134- global $mbemu_internals;
135-
136- if (!$subchar) return $mbemu_internals['substitute_character'];
137- if (is_int($subchar)) {
138- $mbemu_internals['substitute_character'] = $subchar;
139- } else {
140- $subchar = strtolower($subchar);
141- switch ($subchar) {
142- case 'none' :
143- case 'long' :
144- $mbemu_internals['substitute_character'] = $subchar;
145- }
146- }
147-}
14881
14982
15083 function mb_convert_encoding( $str, $to_encoding, $from_encoding = '')
15184 {
152- global $mbemu_internals;
85+ global $_internal_encoding, $_mb_encoding;
15386
15487 $to_encoding = strtoupper($to_encoding);
15588 $from_encoding = mb_detect_encoding($str, $from_encoding);
15689
157- switch ($mbemu_internals['encoding'][$from_encoding]) {
90+ switch ($_mb_encoding[$from_encoding]) {
15891 case 1: //euc-jp
159- switch($mbemu_internals['encoding'][$to_encoding]) {
92+ switch($_mb_encoding[$to_encoding]) {
16093 case 2: //sjis
16194 return _euctosjis($str);
16295 case 3: //jis
@@ -171,7 +104,7 @@ function mb_convert_encoding( $str, $to_encoding, $from_encoding = '')
171104 return $str;
172105 }
173106 case 2: //sjis
174- switch($mbemu_internals['encoding'][$to_encoding]) {
107+ switch($_mb_encoding[$to_encoding]) {
175108 case 1: //euc-jp
176109 return _sjistoeuc($str);
177110 case 3: //jis
@@ -185,7 +118,7 @@ function mb_convert_encoding( $str, $to_encoding, $from_encoding = '')
185118 return $str;
186119 }
187120 case 3: //jis
188- switch($mbemu_internals['encoding'][$to_encoding]) {
121+ switch($_mb_encoding[$to_encoding]) {
189122 case 1: //euc-jp
190123 $str = _jistosjis($str);
191124 return _sjistoeuc($str);
@@ -202,7 +135,7 @@ function mb_convert_encoding( $str, $to_encoding, $from_encoding = '')
202135 return $str;
203136 }
204137 case 4: //utf8
205- switch($mbemu_internals['encoding'][$to_encoding]) {
138+ switch($_mb_encoding[$to_encoding]) {
206139 case 1: //euc-jp
207140 return _utf8toeuc($str);
208141 case 2: //sjis
@@ -217,7 +150,7 @@ function mb_convert_encoding( $str, $to_encoding, $from_encoding = '')
217150 }
218151 case 5: //utf16
219152 $str = _utf16toutf8($str);
220- switch($mbemu_internals['encoding'][$to_encoding]) {
153+ switch($_mb_encoding[$to_encoding]) {
221154 case 1: //euc-jp
222155 return _utf8toeuc($str);
223156 case 2: //sjis
@@ -235,20 +168,34 @@ function mb_convert_encoding( $str, $to_encoding, $from_encoding = '')
235168 }
236169 }
237170
171+function _get_encoding(&$str, $encoding)
172+{
173+ global $_internal_encoding, $_mb_encoding;
174+
175+ if ($encoding =='') {
176+ if ($_internal_encoding == '') {
177+ return mb_detect_encoding($str, mb_detect_order());
178+ } else {
179+ return $_internal_encoding;
180+ }
181+ }
182+ return strtoupper($encoding);
183+}
184+
238185
239186
240187 function _sjistoeuc(&$str)
241188 {
242- global $mbemu_internals;
189+ global $sjis_match, $_sjistoeuc_byte1, $_sjistoeuc_byte2, $_sjistoeuc_byte1_shift;
243190
244- $max = preg_match_all('/'.$mbemu_internals['regex'][2].'/', $str, $allchars); // 文字の配列に分解
191+ $max = preg_match_all("/$sjis_match/", $str, $allchars); // 文字の配列に分解
245192 $str_EUC = '';
246193 for ($i = 0; $i < $max; ++$i) {
247194 $num = ord($allchars[0][$i]); // 各文字の1バイト目を数値として取り出す
248195 if ($num2 = ord($allchars[1][$i])) { // 2バイト目がある場合
249- $shift = $mbemu_internals['sjistoeuc_byte1_shift'][$num2];
250- $str_EUC .= chr($mbemu_internals['sjistoeuc_byte1'][$num] + $shift)
251- .chr($mbemu_internals['sjistoeuc_byte2'][$shift][$num2]);
196+ $shift = $_sjistoeuc_byte1_shift[$num2];
197+ $str_EUC .= chr($_sjistoeuc_byte1[$num] + $shift)
198+ .chr($_sjistoeuc_byte2[$shift][$num2]);
252199 } elseif ($num <= 0x7F) {//英数字
253200 $str_EUC .= chr($num);
254201 } else { //半角カナ
@@ -261,17 +208,17 @@ function _sjistoeuc(&$str)
261208
262209 function _euctosjis(&$str)
263210 {
264- global $mbemu_internals;
265- $max = preg_match_all('/'.$mbemu_internals['regex'][1].'/', $str, $allchars); // 文字の配列に分解
211+ global $euc_match, $_euctosjis_byte1, $_euctosjis_byte2;
212+ $max = preg_match_all("/$euc_match/", $str, $allchars); // 文字の配列に分解
266213 $str_SJIS = '';
267214 for ($i = 0; $i < $max; ++$i) {
268215 $num = ord($allchars[0][$i]); // 各文字の1バイト目を数値として取り出す
269216 if ($num2 = ord($allchars[1][$i])) { // 漢字の場合
270- $str_SJIS .= chr($mbemu_internals['euctosjis_byte1'][$num]);
217+ $str_SJIS .= chr($_euctosjis_byte1[$num]);
271218 if ($num & 1)
272- $str_SJIS .= chr($mbemu_internals['euctosjis_byte2'][0][$num2]);
219+ $str_SJIS .= chr($_euctosjis_byte2[0][$num2]);
273220 else
274- $str_SJIS .= chr($mbemu_internals['euctosjis_byte2'][1][$num2]);
221+ $str_SJIS .= chr($_euctosjis_byte2[1][$num2]);
275222 } elseif ($num3 = ord($allchars[2][$i])) {//半角カナ
276223 $str_SJIS .= chr($num3);
277224 } else { //英数字
@@ -283,9 +230,9 @@ function _euctosjis(&$str)
283230
284231 function _sjistojis(&$str)
285232 {
286- global $mbemu_internals;
233+ global $sjis_match, $_sjistoeuc_byte1, $_sjistoeuc_byte2, $_sjistoeuc_byte1_shift;
287234
288- $max = preg_match_all('/'.$mbemu_internals['regex'][2].'/', $str, $allchars); // 文字の配列に分解
235+ $max = preg_match_all("/$sjis_match/", $str, $allchars); // 文字の配列に分解
289236 $str_JIS = '';
290237 $mode = 0; // 英数
291238 for ($i = 0; $i < $max; ++$i) {
@@ -295,9 +242,9 @@ function _sjistojis(&$str)
295242 $mode = 1;
296243 $str_JIS .= chr(0x1b).'$B';
297244 }
298- $shift = $mbemu_internals['sjistoeuc_byte1_shift'][$num2];
299- $str_JIS .= chr(($mbemu_internals['sjistoeuc_byte1'][$num] + $shift) & 0x7F)
300- .chr($mbemu_internals['sjistoeuc_byte2'][$shift][$num2] & 0x7F);
245+ $shift = $_sjistoeuc_byte1_shift[$num2];
246+ $str_JIS .= chr(($_sjistoeuc_byte1[$num] + $shift) & 0x7F)
247+ .chr($_sjistoeuc_byte2[$shift][$num2] & 0x7F);
301248 } elseif ($num > 0x80) {//半角カナ
302249 if ($mode != 2) {
303250 $mode = 2;
@@ -320,23 +267,23 @@ function _sjistojis(&$str)
320267
321268 function _sub_jtosj($match)
322269 {
323- global $mbemu_internals;
270+ global $_euctosjis_byte1, $_euctosjis_byte2;
324271 $num = ord($match[0]);
325272 $num2 = ord($match[1]);
326- $s = chr($mbemu_internals['euctosjis_byte1'][$num | 0x80]);
273+ $s = chr($_euctosjis_byte1[$num | 0x80]);
327274 if ($num & 1) {
328- $s .= chr($mbemu_internals['euctosjis_byte2'][0][$num2 | 0x80]);
275+ $s .= chr($_euctosjis_byte2[0][$num2 | 0x80]);
329276 } else {
330- $s .= chr($mbemu_internals['euctosjis_byte2'][1][$num2 | 0x80]);
277+ $s .= chr($_euctosjis_byte2[1][$num2 | 0x80]);
331278 }
332279 return $s;
333280 }
334281
335282 function _jistosjis(&$str)
336283 {
337- global $mbemu_internals;
284+ global $_euctosjis_byte1, $_euctosjis_byte2, $jis_match;
338285
339- $max = preg_match_all('/'.$mbemu_internals['regex'][3].'/', $str, $allchunks, PREG_SET_ORDER); // 文字種ごとの配列に分解
286+ $max = preg_match_all("/$jis_match/", $str, $allchunks, PREG_SET_ORDER); // 文字種ごとの配列に分解
340287 $st = '';
341288 for ($i = 0; $i < $max; ++$i) {
342289 if (ord($allchunks[$i][1])) { //英数にマッチ
@@ -370,14 +317,14 @@ function _ucs2utf8($uni)
370317
371318 function _sjistoutf8(&$str)
372319 {
373- global $mbemu_internals;
374- include_once(dirname(__FILE__).'/sjistouni.table');
320+
321+ global $sjis_match, $sjistoucs2;
375322 $st = '';
376- $max = preg_match_all('/'.$mbemu_internals['regex'][2].'/', $str, $allchars); // 文字の配列に分解
323+ $max = preg_match_all("/$sjis_match/", $str, $allchars); // 文字の配列に分解
377324 for ($i = 0; $i < $max; ++$i) {
378325 $num = ord($allchars[0][$i]); // 各文字の1バイト目を数値として取り出す
379326 if ($num2 = ord($allchars[1][$i])) { // 2バイト目がある場合
380- $ucs2 = $mbemu_internals['sjistoucs2'][($num << 8) | $num2];
327+ $ucs2 = $sjistoucs2[($num << 8) | $num2];
381328 $st .= _ucs2utf8($ucs2);
382329 } elseif ($num > 0x80) {//半角カナ
383330 $st .= _ucs2utf8(0xfec0 + $num);
@@ -405,10 +352,9 @@ function _utf8ucs2($st)
405352
406353 function _utf8tosjis(&$str)
407354 {
408- global $mbemu_internals;
409- include_once(dirname(__FILE__).'/unitosjis.table');
355+ global $utf8_match, $ucs2tosjis;
410356 $st = '';
411- $max = preg_match_all('/'.$mbemu_internals['regex'][4].'/', $str, $allchars); // 文字の配列に分解
357+ $max = preg_match_all("/$utf8_match/", $str, $allchars); // 文字の配列に分解
412358 for ($i = 0; $i < $max; ++$i) {
413359 $num = _utf8ucs2($allchars[0][$i]); //ucs2の値を取り出す
414360 if ($num < 0x80)
@@ -416,7 +362,7 @@ function _utf8tosjis(&$str)
416362 elseif ((0xff61 <= $num) && ($num <= 0xff9f))
417363 $st .= chr($num - 0xfec0);
418364 else {
419- $sjis = $mbemu_internals['ucs2tosjis'][$num];
365+ $sjis = $ucs2tosjis[$num];
420366 $st .= chr($sjis >> 8) . chr($sjis & 0xff);
421367 }
422368 }
@@ -425,18 +371,17 @@ function _utf8tosjis(&$str)
425371
426372 function _euctoutf8(&$str)
427373 {
428- global $mbemu_internals;
429- include_once(dirname(__FILE__).'/sjistouni.table');
374+ global $euc_match, $sjistoucs2, $_euctosjis_byte1, $_euctosjis_byte2;
430375 $st = '';
431- $max = preg_match_all('/'.$mbemu_internals['regex'][1].'/', $str, $allchars); // 文字の配列に分解
376+ $max = preg_match_all("/$euc_match/", $str, $allchars); // 文字の配列に分解
432377 for ($i = 0; $i < $max; ++$i) {
433378 $num = ord($allchars[0][$i]); // 各文字の1バイト目を数値として取り出す
434379 if ($num2 = ord($allchars[1][$i])) { // 2バイト目がある場合
435380 if ($num & 1)
436- $sjis = ($mbemu_internals['euctosjis_byte1'][$num] << 8) | $mbemu_internals['euctosjis_byte2'][0][$num2];
381+ $sjis = ($_euctosjis_byte1[$num] << 8) | $_euctosjis_byte2[0][$num2];
437382 else
438- $sjis = ($mbemu_internals['euctosjis_byte1'][$num] << 8) | $mbemu_internals['euctosjis_byte2'][1][$num2];
439- $st .= _ucs2utf8($mbemu_internals['sjistoucs2'][$sjis]);
383+ $sjis = ($_euctosjis_byte1[$num] << 8) | $_euctosjis_byte2[1][$num2];
384+ $st .= _ucs2utf8($sjistoucs2[$sjis]);
440385 } elseif ($num3 = ord($allchars[2][$i])) {
441386 $st .= _ucs2utf8(0xfec0 + $num3);
442387 } else {//半角英数
@@ -448,10 +393,9 @@ function _euctoutf8(&$str)
448393
449394 function _utf8toeuc(&$str)
450395 {
451- global $mbemu_internals;
452- include_once(dirname(__FILE__).'/unitosjis.table');
396+ global $utf8_match, $ucs2tosjis, $_sjistoeuc_byte1, $_sjistoeuc_byte2, $_sjistoeuc_byte1_shift;
453397 $st = '';
454- $max = preg_match_all('/'.$mbemu_internals['regex'][4].'/', $str, $allchars); // 文字の配列に分解
398+ $max = preg_match_all("/$utf8_match/", $str, $allchars); // 文字の配列に分解
455399 for ($i = 0; $i < $max; ++$i) {
456400 $num = _utf8ucs2($allchars[0][$i]); //ucs2の値を取り出す
457401 if ($num < 0x80)
@@ -459,12 +403,12 @@ function _utf8toeuc(&$str)
459403 elseif ((0xff61 <= $num) && ($num <= 0xff9f)) //半角カナ
460404 $st .= chr(0x8e) . chr($num - 0xfec0);
461405 else {
462- $sjis = $mbemu_internals['ucs2tosjis'][$num];
406+ $sjis = $ucs2tosjis[$num];
463407 $upper = $sjis >> 8;
464408 $lower = $sjis & 0xff;
465- $shift = $mbemu_internals['sjistoeuc_byte1_shift'][$lower];
466- $st .= chr($mbemu_internals['sjistoeuc_byte1'][$upper] + $shift)
467- .chr($mbemu_internals['sjistoeuc_byte2'][$shift][$lower]);
409+ $shift = $_sjistoeuc_byte1_shift[$lower];
410+ $st .= chr($_sjistoeuc_byte1[$upper] + $shift)
411+ .chr($_sjistoeuc_byte2[$shift][$lower]);
468412 }
469413 }
470414 return $st;
@@ -472,9 +416,9 @@ function _utf8toeuc(&$str)
472416
473417 function _utf8toutf16(&$str)
474418 {
475- global $mbemu_internals;
419+ global $utf8_match;
476420 $st = '';
477- $max = preg_match_all('/'.$mbemu_internals['regex'][4].'/', $str, $allchars); // 文字の配列に分解
421+ $max = preg_match_all("/$utf8_match/", $str, $allchars); // 文字の配列に分解
478422 for ($i = 0; $i < $max; ++$i) {
479423 $num = _utf8ucs2($allchars[0][$i]); //ucs2の値を取り出す
480424 $st .= chr(($num >> 8) & 0xff).chr($num & 0xff);
@@ -484,7 +428,7 @@ function _utf8toutf16(&$str)
484428
485429 function _utf16toutf8(&$str)
486430 {
487- global $mbemu_internals;
431+ global $utf8_match;
488432 $st = '';
489433 $ar = unpack("n*", $str);
490434 foreach($ar as $char) {
@@ -495,14 +439,14 @@ function _utf16toutf8(&$str)
495439
496440
497441 function sub_zenhan_EUC(&$str, $match) {
498- global $mbemu_internals;
442+ global $alphanumeric_convert;
499443
500444 $match = $match . "|[\xa1-\xfe][\xa1-\xfe]|[\x01-\x7f]|\x8e[\xa0-\xdf]";
501445 $max = preg_match_all("/$match/", $str, $chars);
502446 $str = '';
503447 for ($i = 0; $i < $max; ++$i) {
504448 if ($num = ord($chars[1][$i])) //全角にマッチングした場合
505- $str .= chr(array_search($chars[1][$i], $mbemu_internals['alphanumeric_convert']));
449+ $str .= chr(array_search($chars[1][$i], $alphanumeric_convert));
506450 // $str .= chr($num & 0x7F);
507451 else
508452 $str .= $chars[0][$i];
@@ -510,14 +454,14 @@ function sub_zenhan_EUC(&$str, $match) {
510454 }
511455
512456 function sub_hanzen_EUC(&$str, $match) {
513- global $mbemu_internals;
457+ global $alphanumeric_convert;
514458
515459 $match = $match . "|[\xa1-\xfe][\xa1-\xfe]|[\x01-\x7f]|\x8e[\xa0-\xdf]";
516460 $max = preg_match_all("/$match/", $str, $chars);
517461 $str = '';
518462 for ($i = 0; $i < $max; ++$i) {
519463 if ($num = ord($chars[1][$i])) //半角にマッチングした場合
520- $str .= $mbemu_internals['alphanumeric_convert'][$num];
464+ $str .= $alphanumeric_convert[$num];
521465 else
522466 $str .= $chars[0][$i];
523467 }
@@ -558,39 +502,39 @@ function space_hanzen_EUC(&$str) {
558502 }
559503
560504 function katakana_zenhan_EUC(&$str) {
561- global $mbemu_internals;
505+global $kana_zenhan_convert, $special_zenhan_convert;
562506
563507 $match = "\xa5([\xa1-\xf4])|\xa1([\xa2,\xa3,\xa6,\xab,\xac,\xbc,\xd6,\xd7])|[\xa1-\xfe][\xa1-\xfe]|[\x01-\x7f]|\x8e[\xa0-\xdf]";
564508 $max = preg_match_all("/$match/", $str, $chars);
565509 $str = '';
566510 for ($i = 0; $i < $max; ++$i) {
567511 if ($num = ord($chars[1][$i])) //カナにマッチングした場合
568- $str .= chr(0x8e) . $mbemu_internals['kana_zenhan_convert'][$num];
512+ $str .= chr(0x8e) . $kana_zenhan_convert[$num];
569513 elseif ($num = ord($chars[2][$i])) //半角変換可能な特殊文字にマッチした場合
570- $str .= chr(0x8e) . $mbemu_internals['special_zenhan_convert'][$num];
514+ $str .= chr(0x8e) . $special_zenhan_convert[$num];
571515 else
572516 $str .= $chars[0][$i];
573517 }
574518 }
575519
576520 function hiragana_zenhan_EUC(&$str) {
577- global $mbemu_internals;
521+global $kana_zenhan_convert, $special_zenhan_convert;
578522
579523 $match = "\xa4([\xa1-\xf4])|\xa1([\xa2,\xa3,\xa6,\xab,\xac,\xbc,\xd6,\xd7])|[\xa1-\xfe][\xa1-\xfe]|[\x01-\x7f]|\x8e[\xa0-\xdf]";
580524 $max = preg_match_all("/$match/", $str, $chars);
581525 $str = '';
582526 for ($i = 0; $i < $max; ++$i) {
583527 if ($num = ord($chars[1][$i])) //かなにマッチングした場合
584- $str .= chr(0x8e) . $mbemu_internals['kana_zenhan_convert'][$num];
528+ $str .= chr(0x8e) . $kana_zenhan_convert[$num];
585529 elseif ($num = ord($chars[2][$i])) //半角変換可能な特殊文字にマッチした場合
586- $str .= chr(0x8e) . $mbemu_internals['special_zenhan_convert'][$num];
530+ $str .= chr(0x8e) . $special_zenhan_convert[$num];
587531 else
588532 $str .= $chars[0][$i];
589533 }
590534 }
591535
592536 function katakana_hanzen1_EUC(&$str) { //濁点の統合をする方
593- global $mbemu_internals;
537+global $kana_zenhan_convert, $special_zenhan_convert;
594538
595539 $match = "\x8e((?:[\xb3,\xb6-\xc4,\xca-\xce]\x8e\xde)|(?:[\xca-\xce]\x8e\xdf))|[\xa1-\xfe][\xa1-\xfe]|[\x01-\x7f]|\x8e([\xa1-\xdf])";
596540 //濁点や半濁点は一緒にマッチング
@@ -598,19 +542,19 @@ function katakana_hanzen1_EUC(&$str) { //
598542 $str = '';
599543 for ($i = 0; $i < $max; ++$i) {
600544 if ($chars[1][$i]) //濁音,半濁音にマッチングした場合
601- $str .= chr(0xa5).chr(array_search($chars[1][$i], $mbemu_internals['kana_zenhan_convert']));
545+ $str .= chr(0xa5).chr(array_search($chars[1][$i], $kana_zenhan_convert));
602546 elseif ($chars[2][$i]) //その他の半角カナにマッチ
603- if ($num = array_search($chars[2][$i], $mbemu_internals['kana_zenhan_convert']))
547+ if ($num = array_search($chars[2][$i], $kana_zenhan_convert))
604548 $str .= chr(0xa5).chr($num);
605549 else
606- $str .= chr(0xa1).chr(array_search($chars[2][$i], $mbemu_internals['special_zenhan_convert']));
550+ $str .= chr(0xa1).chr(array_search($chars[2][$i], $special_zenhan_convert));
607551 else
608552 $str .= $chars[0][$i];
609553 }
610554 }
611555
612556 function hiragana_hanzen1_EUC(&$str) { //濁点の統合をする方
613- global $mbemu_internals;
557+global $kana_zenhan_convert, $special_zenhan_convert;
614558
615559 $match = "\x8e((?:[\xb6-\xc4,\xca-\xce]\x8e\xde)|(?:[\xca-\xce]\x8e\xdf))|[\xa1-\xfe][\xa1-\xfe]|[\x01-\x7f]|\x8e([\xa1-\xdf])";
616560 //濁点や半濁点は一緒にマッチング
@@ -618,46 +562,46 @@ function hiragana_hanzen1_EUC(&$str) { //
618562 $str = '';
619563 for ($i = 0; $i < $max; ++$i) {
620564 if ($chars[1][$i]) //濁音,半濁音にマッチングした場合
621- $str .= chr(0xa4).chr(array_search($chars[1][$i], $mbemu_internals['kana_zenhan_convert']));
565+ $str .= chr(0xa4).chr(array_search($chars[1][$i], $kana_zenhan_convert));
622566 elseif ($chars[2][$i]) //その他の半角カナにマッチ
623- if ($num = array_search($chars[2][$i], $mbemu_internals['kana_zenhan_convert']))
567+ if ($num = array_search($chars[2][$i], $kana_zenhan_convert))
624568 $str .= chr(0xa4).chr($num);
625569 else
626- $str .= chr(0xa1).chr(array_search($chars[2][$i], $mbemu_internals['special_zenhan_convert']));
570+ $str .= chr(0xa1).chr(array_search($chars[2][$i], $special_zenhan_convert));
627571 else
628572 $str .= $chars[0][$i];
629573 }
630574 }
631575
632576 function katakana_hanzen2_EUC(&$str) { //濁点の統合をしない方
633- global $mbemu_internals;
577+global $kana_zenhan_convert, $special_zenhan_convert;
634578
635579 $match = "[\xa1-\xfe][\xa1-\xfe]|[\x01-\x7f]|\x8e([\xa1-\xdf])";
636580 $max = preg_match_all("/$match/", $str, $chars);
637581 $str = '';
638582 for ($i = 0; $i < $max; ++$i) {
639583 if ($chars[1][$i]) //半角カナにマッチ
640- if ($num = array_search($chars[1][$i], $mbemu_internals['kana_zenhan_convert']))
584+ if ($num = array_search($chars[1][$i], $kana_zenhan_convert))
641585 $str .= chr(0xa5).chr($num);
642586 else
643- $str .= chr(0xa1).chr(array_search($chars[1][$i], $mbemu_internals['special_zenhan_convert']));
587+ $str .= chr(0xa1).chr(array_search($chars[1][$i], $special_zenhan_convert));
644588 else
645589 $str .= $chars[0][$i];
646590 }
647591 }
648592
649593 function hiragana_hanzen2_EUC(&$str) { //濁点の統合をしない方
650- global $mbemu_internals;
594+global $kana_zenhan_convert, $special_zenhan_convert;
651595
652596 $match = "[\xa1-\xfe][\xa1-\xfe]|[\x01-\x7f]|\x8e([\xa1-\xdf])";
653597 $max = preg_match_all("/$match/", $str, $chars);
654598 $str = '';
655599 for ($i = 0; $i < $max; ++$i) {
656600 if ($chars[1][$i]) //半角カナにマッチ
657- if ($num = array_search($chars[1][$i], $mbemu_internals['kana_zenhan_convert']))
601+ if ($num = array_search($chars[1][$i], $kana_zenhan_convert))
658602 $str .= chr(0xa4).chr($num);
659603 else
660- $str .= chr(0xa1).chr(array_search($chars[1][$i], $mbemu_internals['special_zenhan_convert']));
604+ $str .= chr(0xa1).chr(array_search($chars[1][$i], $special_zenhan_convert));
661605 else
662606 $str .= $chars[0][$i];
663607 }
@@ -691,7 +635,7 @@ function hiragana_katakana_EUC(&$str) {
691635
692636 function mb_convert_kana( $str, $option='KV', $encoding = '')
693637 {
694- if (!$encoding) $encoding = mb_internal_encoding();
638+ $encoding = mb_detect_encoding($str, $encoding);
695639 $str = mb_convert_encoding($str, 'EUC-JP', $encoding);
696640
697641 if (strstr($option, "r")) alpha_zenhan_EUC($str);
@@ -723,63 +667,76 @@ function mb_convert_kana( $str, $option='KV', $encoding = '')
723667 return $str;
724668 }
725669
726-// if mb_language is uni this function send mail using UTF-8/Base64
727-// if English or en this function send mail using ISO-8859-1/quoted printable
728-// if Japanese this function send mail using ISO-2022-JP
729-function mb_send_mail($to, $subject, $message , $additional_headers='', $additional_parameter='')
670+function mb_send_mail($to, $subject, $message , $additional_headers, $additional_parameter)
730671 {
731- switch (mb_language()) {
732- case 'jp' :
733- case 'ja' :
734- case 'Japanese' :
735- if (!_check_encoding($subject, 3)) //if not JIS encoded
736- $subject =mb_encode_mimeheader($subject);
737- else {
738- $tmp = mb_internal_encoding();
739- mb_internal_encoding('iso-2022-jp');
740- $subject =mb_encode_mimeheader($subject);
741- mb_internal_encoding($tmp);
742- }
743- if (!_check_encoding($message, 3))
744- $message = mb_convert_encoding($message, "iso-2022-jp", mb_internal_encoding());
745- $additional_headers .=
746- "\r\nMime-Version: 1.0\r\nContent-Type: text/plain; charset=ISO-2022-JP\r\nContent-Transfer-Encoding: 7bit";
747- mail($to, $subject, $message, $additional_headers, $additional_parameter);
748- break;
749- case 'en' :
750- case 'English' :
751- $subject =mb_encode_mimeheader($subject, mb_internal_encoding(), 'Q');
752- $message = _sub_encode_base64($message, mb_internal_encoding(), 76 , "\r\n");
753- $additional_headers .=
754- "\r\nMime-Version: 1.0\r\nContent-Type: text/plain; charset=".
755- mb_preferred_mime_name(mb_internal_encoding()).
756- "\r\nContent-Transfer-Encoding: BASE64";
757- mail($to, $subject, $message, $additional_headers, $additional_parameter);
758- break;
759- case 'uni' :
760- $subject =mb_encode_mimeheader($subject, mb_internal_encoding(), 'B');
761- $message = _sub_encode_base64($message, mb_internal_encoding(), 76 , "\r\n");
762- $additional_headers .=
763- "\r\nMime-Version: 1.0\r\nContent-Type: text/plain; charset=".
764- mb_preferred_mime_name(mb_internal_encoding()).
765- "\r\nContent-Transfer-Encoding: BASE64";
766- mail($to, $subject, $message, $additional_headers, $additional_parameter);
767- break;
768- }
672+ if (!_is_JIS($subject))
673+ $subject =mb_encode_mimeheader($subject);
674+ else {
675+ $tmp = mb_internal_encoding();
676+ mb_internal_encoding('iso-2022-jp');
677+ $subject =mb_encode_mimeheader($subject);
678+ mb_internal_encoding($tmp);
679+ }
680+ if (!_is_JIS($message))
681+ $message = mb_convert_encoding($message, "iso-2022-jp", mb_internal_encoding());
682+ $additional_headers .=
683+ "\r\nMime-Version: 1.0\r\nContent-Type: text/plain; charset=ISO-2022-JP\r\nContent-Transfer-Encoding: 7bit";
684+ mail($to, $subject, $message, $additional_headers, $additional_parameter);
685+
686+}
687+
688+
689+function mb_detect_order($encoding_list = '')
690+{
691+ global $_detect_order, $_mb_encoding;
769692
693+ if ($encoding_list) {
694+ if (is_string($encoding_list)) {
695+ $encoding_list = strtoupper($encoding_list);
696+ $encoding_list = split(', *', $encoding_list);
697+ }
698+ foreach($encoding_list as $encode)
699+ if (!array_key_exists($encode, $_mb_encoding)) return FALSE;
700+ $_detect_order = $encoding_list;
701+ return TRUE;
702+ }
703+ return $_detect_order;
704+}
705+
706+function _is_Ascii(&$str)
707+{
708+ return (!ereg("[\x80-\xFF]", $str) && !ereg("\x1B", $str));
770709 }
771710
711+function _is_JIS(&$str)
712+{
713+ return (!ereg("[\x80-\xFF]", $str) && ereg("\x1B", $str));
714+}
772715
716+function _is_SJIS(&$str)
717+{
718+ $sjis_match =
719+ "[\x01-\x7F]|[\xA0-\xDF]|[\x81-\xFC][\x40-\xFC]";
720+ return (preg_match("/^($sjis_match)+$/", $str) == 1);
721+}
722+
723+function _is_EUCJP(&$str)
724+{
725+ $euc_match =
726+ "[\x01-\x7F]|\x8E[\xA0-\xDF]|\x8F[xA1-\xFE][\xA1-\xFE]|[\xA1-\xFE][\xA1-\xFE]";
727+ return (preg_match("/^($euc_match)+$/", $str) == 1);
728+}
773729
774-function _check_encoding($str, $encoding_number)
730+function _is_UTF8(&$str)
775731 {
776- global $mbemu_internals;
777- return (preg_match('/^('.$mbemu_internals['regex'][$encoding_number].')+$/', $str) == 1);
732+ $utf8_match =
733+ "[\x01-\x7F]|[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF][\x80-\xBF]";
734+ return (preg_match("/^($utf8_match)+$/", $str) == 1);
778735 }
779736
780737 function mb_detect_encoding( $str , $encoding_list = '')
781738 {
782- global $mbemu_internals;
739+ global $_mb_encoding;
783740
784741 if ($encoding_list == '')
785742 $encoding_list = mb_detect_order();
@@ -792,68 +749,76 @@ function mb_detect_encoding( $str , $encoding_list = '')
792749 }
793750 }
794751 foreach($encoding_list as $encode) {
795- if (_check_encoding($str, $mbemu_internals['encoding'][$encode]))
796- return $encode;
752+ switch ($_mb_encoding[$encode]) {
753+ case 0 : //ascii
754+ if (_is_ASCII($str)) return 'ASCII';
755+ break;
756+ case 1 : //euc-jp
757+ if (_is_EUCJP($str)) return 'EUC-JP';
758+ break;
759+ case 2 : //shift-jis
760+ if (_is_SJIS($str)) return 'SJIS';
761+ break;
762+ case 3 : //jis
763+ if (_is_JIS($str)) return 'JIS';
764+ break;
765+ case 4 : //utf-8
766+ if (_is_UTF8($str)) return 'UTF-8';
767+ break;
768+ }
797769 }
798770 return $encode;
799771 }
800772
801773 function mb_strlen ( $str , $encoding='')
802774 {
803- global $mbemu_internals;
775+ global $_mb_encoding, $euc_match, $utf8_match, $sjis_match;
804776
805- $encoding = mb_detect_encoding($str, $encoding);
777+ $encoding = _get_encoding($str, $encoding);
806778
807- switch ($e = $mbemu_internals['encoding'][$encoding]) {
779+ switch ($_mb_encoding[$encoding]) {
808780 case 1 : //euc-jp
809- case 2 : //shift-jis
810- case 4 : //utf-8
811- return preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $str, $arr);
812- case 5 : //utf-16
813- return strlen($str) >> 1;
781+ return preg_match_all("/$euc_match/", $str, $arr);
814782 case 0 : //ascii
815- case 6 : //iso8859-1
816- return strlen($str);
783+ case 4 : //utf-8
784+ return preg_match_all("/$utf8_match/", $str, $arr);
785+ case 2 : //shift-jis
786+ return preg_match_all("/$sjis_match/", $str, $arr);
817787 case 3 : //jis
818788 $str = mb_convert_encoding($str, 'SJIS', 'JIS');
819- return preg_match_all('/'.$mbemu_internals['regex'][2].'/', $str, $arr);
789+ return preg_match_all("/$sjis_match/", $str, $arr);
820790 }
821791 }
822792
823793 function mb_strwidth( $str, $encoding='')
824794 {
825- global $mbemu_internals;
795+ global $_mb_encoding, $euc_match, $utf8_match, $sjis_match;
826796
827- $encoding = mb_detect_encoding($str, $encoding);
828- switch ($e = $mbemu_internals['encoding'][$encoding]) {
797+ $encoding = _get_encoding($str, $encoding);
798+ switch ($_mb_encoding[$encoding]) {
799+ case 1 : //euc-jp
800+ $max = $len = preg_match_all("/$euc_match/", $str, $arr);
801+ $len;
802+ for ($i=0; $i < $max; ++$i)
803+ if ($arr[1][$i]) ++$len;
804+ return $len;
805+ case 0 : //ascii
829806 case 4 : //utf-8
830- $max = $len = preg_match_all('/'.$mbemu_internals['regex'][4].'/', $str, $arr);
807+ $max = $len = preg_match_all("/$utf8_match/", $str, $arr);
831808 for ($i=0; $i < $max; ++$i) {
832809 $ucs2 = _utf8ucs2($arr[0][$i]);
833810 if (((0x2000 <= $ucs2) && ($ucs2 <= 0xff60)) || (0xffa0 <= $ucs2))
834811 ++$len;
835812 }
836813 return $len;
837- case 1 : //euc-jp
838814 case 2 : //shift-jis
839- $max = $len = preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $str, $arr);
815+ $max = $len = preg_match_all("/$sjis_match/", $str, $arr);
840816 for ($i=0; $i < $max; ++$i)
841817 if ($arr[1][$i]) ++$len;
842818 return $len;
843- case 5 : //utf-16
844- $max = $len = preg_match_all('/'.$mbemu_internals['regex'][5].'/', $str, $arr);
845- for ($i=0; $i < $max; ++$i) {
846- $ucs2 = (ord($arr[0][$i]) << 8) | ord(substr($arr[0][$i],1,1));
847- if (((0x2000 <= $ucs2) && ($ucs2 <= 0xff60)) || (0xffa0 <= $ucs2))
848- ++$len;
849- }
850- return $len;
851- case 0 : //ascii
852- case 6 : //iso8859-1
853- return strlen($str);
854819 case 3 : //jis
855820 $str = mb_convert_encoding($str, 'SJIS', 'JIS');
856- $max = $len = preg_match_all('/'.$mbemu_internals['regex'][2].'/', $str, $arr);
821+ $max = $len = preg_match_all("/$sjis_match/", $str, $arr);
857822 for ($i=0; $i < $max; ++$i)
858823 if ($arr[1][$i]) ++$len;
859824 return $len;
@@ -862,9 +827,9 @@ function mb_strwidth( $str, $encoding='')
862827
863828 function mb_strimwidth( $str, $start, $width, $trimmarker , $encoding = '')
864829 {
865- global $mbemu_internals;
830+ global $_mb_encoding, $euc_match, $utf8_match, $sjis_match;
866831
867- $encoding = mb_detect_encoding($str, $encoding);
832+ $encoding = _get_encoding($str, $encoding);
868833 $str = mb_substr($str, $start, 'notnumber', $encoding);
869834 if (($len = mb_strwidth($str,$encoding)) <= $width)
870835 return $str;
@@ -872,16 +837,12 @@ function mb_strimwidth( $str, $start, $width, $trimmarker , $encoding = '')
872837 $width -= $trimwidth;
873838 if ($width <= 0) return $trimmarker;
874839
875- switch ($e = $mbemu_internals['encoding'][$encoding]) {
876- case 0 : //ascii
877- case 6 : //iso8859-1
878- return substr($str, 0, $width).$trimmarker;
879- case 4 : //utf-8
880- preg_match_all('/'.$mbemu_internals['regex'][4].'/', $str, $arr);
840+ switch ($_mb_encoding[$encoding]) {
841+ case 1 : //euc-jp
842+ preg_match_all("/$euc_match/", $str, $arr);
881843 $i = 0;
882844 while(TRUE) {
883- $ucs2 = _utf8ucs2($arr[0][$i]);
884- if (((0x2000 <= $ucs2) && ($ucs2 <= 0xff60)) || (0xffa0 <= $ucs2))
845+ if ($arr[1][$i])
885846 $width -= 2;
886847 else
887848 --$width;
@@ -890,10 +851,12 @@ function mb_strimwidth( $str, $start, $width, $trimmarker , $encoding = '')
890851 }
891852 $arr[0] = array_slice($arr[0], 0, $i);
892853 return implode("", $arr[0]).$trimmarker;
893- case 5 : //utf-16
894- $arr = unpack("n*", $str);
854+ case 0 : //ascii
855+ case 4 : //utf-8
856+ preg_match_all("/$utf8_match/", $str, $arr);
895857 $i = 0;
896- foreach($arr as $ucs2) {
858+ while(TRUE) {
859+ $ucs2 = _utf8ucs2($arr[0][$i]);
897860 if (((0x2000 <= $ucs2) && ($ucs2 <= 0xff60)) || (0xffa0 <= $ucs2))
898861 $width -= 2;
899862 else
@@ -903,9 +866,8 @@ function mb_strimwidth( $str, $start, $width, $trimmarker , $encoding = '')
903866 }
904867 $arr[0] = array_slice($arr[0], 0, $i);
905868 return implode("", $arr[0]).$trimmarker;
906- case 1 : //euc-jp
907869 case 2 : //shift-jis
908- preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $str, $arr);
870+ preg_match_all("/$sjis_match/", $str, $arr);
909871 $i = 0;
910872 while(TRUE) {
911873 if ($arr[1][$i])
@@ -920,7 +882,7 @@ function mb_strimwidth( $str, $start, $width, $trimmarker , $encoding = '')
920882 case 3 : //jis
921883 $str = mb_convert_encoding($str, 'SJIS', 'JIS');
922884 $trimmarker = mb_convert_encoding($trimmarker, 'SJIS', 'JIS');
923- preg_match_all('/'.$mbemu_internals['regex'][2].'/', $str, $arr);
885+ preg_match_all("/$sjis_match/", $str, $arr);
924886 $i = 0;
925887 while(TRUE) {
926888 if ($arr[1][$i])
@@ -938,29 +900,31 @@ function mb_strimwidth( $str, $start, $width, $trimmarker , $encoding = '')
938900
939901 function mb_substr ( $str, $start , $length='notnumber' , $encoding='')
940902 {
941- global $mbemu_internals;
903+ global $_mb_encoding, $euc_match, $utf8_match, $sjis_match;
942904
943- $encoding = mb_detect_encoding($str, $encoding);
905+ $encoding = _get_encoding($str, $encoding);
944906
945- switch ($e = $mbemu_internals['encoding'][$encoding]) {
946- case 0 : //ascii
907+ switch ($_mb_encoding[$encoding]) {
947908 case 1 : //euc-jp
948- case 2 : //shift-jis
909+ preg_match_all("/$euc_match/", $str, $arr);
910+ break;
911+ case 0 : //ascii
949912 case 4 : //utf-8
950- case 5 : //utf-16
951- case 6 : //iso-8859-1
952- preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $str, $arr);
913+ preg_match_all("/$utf8_match/", $str, $arr);
914+ break;
915+ case 2 : //shift-jis
916+ preg_match_all("/$sjis_match/", $str, $arr);
953917 break;
954918 case 3 : //jis
955919 $str = mb_convert_encoding($str, 'SJIS', 'JIS');
956- preg_match_all('/'.$mbemu_internals['regex'][2].'/', $str, $arr);
920+ preg_match_all("/$sjis_match/", $str, $arr);
957921 }
958922 if (is_int($length))
959923 $arr[0] = array_slice($arr[0], $start, $length);
960924 else
961925 $arr[0] = array_slice($arr[0], $start);
962926 $str = implode("", $arr[0]);
963- if ($mbemu_internals['encoding'][$encoding] == 3)
927+ if ($_mb_encoding[$encoding] == 3)
964928 $str = mb_convert_encoding($str, 'JIS', 'SJIS');
965929 return $str;
966930 }
@@ -990,22 +954,26 @@ function _sub_strcut($arr, $start, $length) {
990954
991955 function mb_strcut ( $str, $start , $length=0 , $encoding = '')
992956 {
993- global $mbemu_internals;
957+ global $_mb_encoding, $euc_match, $utf8_match, $sjis_match;
994958
995- $encoding = mb_detect_encoding($str, $encoding);
959+
960+ $encoding = _get_encoding($str, $encoding);
996961
997- switch ($e = $mbemu_internals['encoding'][$encoding]) {
998- case 0 : //ascii
962+ switch ($_mb_encoding[$encoding]) {
999963 case 1 : //euc-jp
1000- case 2 : //shift-jis
964+ preg_match_all("/$euc_match/", $str, $arr);
965+ return _sub_strcut($arr, $start, $length);
966+ case 0 : //ascii
967+ return substr($str, $start, $length);
1001968 case 4 : //utf-8
1002- case 5 : //utf-16
1003- case 6 : //iso-8859-1
1004- preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $str, $arr);
969+ preg_match_all("/$utf8_match/", $str, $arr);
970+ return _sub_strcut($arr, $start, $length);
971+ case 2 : //shift-jis
972+ preg_match_all("/$sjis_match/", $str, $arr);
1005973 return _sub_strcut($arr, $start, $length);
1006974 case 3 : //jis
1007975 $str = mb_convert_encoding($str, 'SJIS', 'JIS');
1008- preg_match_all('/'.$mbemu_internals['regex'][2].'/', $str, $arr);
976+ preg_match_all("/$sjis_match/", $str, $arr);
1009977 $sub = _sub_strcut($arr, $start, $length);
1010978 return mb_convert_encoding($sub, 'JIS', 'SJIS');
1011979 }
@@ -1032,25 +1000,29 @@ function _sub_strrpos($ar_haystack, $ar_needle)
10321000 function mb_strrpos ( $haystack, $needle , $encoding = '')
10331001 {
10341002
1035- global $mbemu_internals;
1003+ global $_mb_encoding, $euc_match, $utf8_match, $sjis_match;
10361004
1037- $encoding = mb_detect_encoding($haystack, $encoding);
1005+ $encoding = _get_encoding($haystack, $encoding);
10381006
1039- switch ($e = $mbemu_internals['encoding'][$encoding]) {
1040- case 0 : //ascii
1007+ switch ($_mb_encoding[$encoding]) {
10411008 case 1 : //euc-jp
1042- case 2 : //shift-jis
1009+ preg_match_all("/$euc_match/", $haystack, $ar_h);
1010+ preg_match_all("/$euc_match/", $needle, $ar_n);
1011+ return _sub_strrpos($ar_h[0], $ar_n[0]);
1012+ case 0 : //ascii
10431013 case 4 : //utf-8
1044- case 5 : //utf-16
1045- case 6 : //iso-8859-1
1046- preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $haystack, $ar_h);
1047- preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $needle, $ar_n);
1014+ preg_match_all("/$utf8_match/", $haystack, $ar_h);
1015+ preg_match_all("/$utf8_match/", $needle, $ar_n);
1016+ return _sub_strrpos($ar_h[0], $ar_n[0]);
1017+ case 2 : //shift-jis
1018+ preg_match_all("/$sjis_match/", $haystack, $ar_h);
1019+ preg_match_all("/$sjis_match/", $needle, $ar_n);
10481020 return _sub_strrpos($ar_h[0], $ar_n[0]);
10491021 case 3 : //jis
10501022 $haystack = mb_convert_encoding($haystack, 'SJIS', 'JIS');
10511023 $needle = mb_convert_encoding($needle, 'SJIS', 'JIS');
1052- preg_match_all('/'.$mbemu_internals['regex'][2].'/', $haystack, $ar_h);
1053- preg_match_all('/'.$mbemu_internals['regex'][2].'/', $needle, $ar_n);
1024+ preg_match_all("/$sjis_match/", $haystack, $ar_h);
1025+ preg_match_all("/$sjis_match/", $needle, $ar_n);
10541026 return _sub_strrpos($ar_h[0], $ar_n[0]);
10551027 }
10561028 }
@@ -1075,25 +1047,29 @@ function _sub_strpos($ar_haystack, $ar_needle, $offset)
10751047 function mb_strpos ( $haystack, $needle , $offset = 0, $encoding = '')
10761048 {
10771049
1078- global $mbemu_internals;
1050+ global $_mb_encoding, $euc_match, $utf8_match, $sjis_match;
10791051
1080- $encoding = mb_detect_encoding($haystack, $encoding);
1052+ $encoding = _get_encoding($haystack, $encoding);
10811053
1082- switch ($e = $mbemu_internals['encoding'][$encoding]) {
1083- case 0 : //ascii
1054+ switch ($_mb_encoding[$encoding]) {
10841055 case 1 : //euc-jp
1085- case 2 : //shift-jis
1056+ preg_match_all("/$euc_match/", $haystack, $ar_h);
1057+ preg_match_all("/$euc_match/", $needle, $ar_n);
1058+ return _sub_strpos($ar_h[0], $ar_n[0], $offset);
1059+ case 0 : //ascii
10861060 case 4 : //utf-8
1087- case 5 : //utf-16
1088- case 6 : //iso-8859-1
1089- preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $haystack, $ar_h);
1090- preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $needle, $ar_n);
1061+ preg_match_all("/$utf8_match/", $haystack, $ar_h);
1062+ preg_match_all("/$utf8_match/", $needle, $ar_n);
1063+ return _sub_strpos($ar_h[0], $ar_n[0], $offset);
1064+ case 2 : //shift-jis
1065+ preg_match_all("/$sjis_match/", $haystack, $ar_h);
1066+ preg_match_all("/$sjis_match/", $needle, $ar_n);
10911067 return _sub_strpos($ar_h[0], $ar_n[0], $offset);
10921068 case 3 : //jis
10931069 $haystack = mb_convert_encoding($haystack, 'SJIS', 'JIS');
10941070 $needle = mb_convert_encoding($needle, 'SJIS', 'JIS');
1095- preg_match_all('/'.$mbemu_internals['regex'][2].'/', $haystack, $ar_h);
1096- preg_match_all('/'.$mbemu_internals['regex'][2].'/', $needle, $ar_n);
1071+ preg_match_all("/$sjis_match/", $haystack, $ar_h);
1072+ preg_match_all("/$sjis_match/", $needle, $ar_n);
10971073 return _sub_strpos($ar_h[0], $ar_n[0], $offset);
10981074 }
10991075 }
@@ -1119,25 +1095,29 @@ function _sub_substr_count($ar_haystack, $ar_needle)
11191095 function mb_substr_count($haystack, $needle , $encoding = '')
11201096 {
11211097
1122- global $mbemu_internals;
1098+ global $_mb_encoding, $euc_match, $utf8_match, $sjis_match;
11231099
1124- $encoding = mb_detect_encoding($haystack, $encoding);
1100+ $encoding = _get_encoding($haystack, $encoding);
11251101
1126- switch ($e = $mbemu_internals['encoding'][$encoding]) {
1127- case 0 : //ascii
1102+ switch ($_mb_encoding[$encoding]) {
11281103 case 1 : //euc-jp
1129- case 2 : //shift-jis
1104+ preg_match_all("/$euc_match/", $haystack, $ar_h);
1105+ preg_match_all("/$euc_match/", $needle, $ar_n);
1106+ return _sub_substr_count($ar_h[0], $ar_n[0]);
1107+ case 0 : //ascii
11301108 case 4 : //utf-8
1131- case 5 : //utf-16
1132- case 6 : //iso-8859-1
1133- preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $haystack, $ar_h);
1134- preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $needle, $ar_n);
1109+ preg_match_all("/$utf8_match/", $haystack, $ar_h);
1110+ preg_match_all("/$utf8_match/", $needle, $ar_n);
1111+ return _sub_substr_count($ar_h[0], $ar_n[0]);
1112+ case 2 : //shift-jis
1113+ preg_match_all("/$sjis_match/", $haystack, $ar_h);
1114+ preg_match_all("/$sjis_match/", $needle, $ar_n);
11351115 return _sub_substr_count($ar_h[0], $ar_n[0]);
11361116 case 3 : //jis
11371117 $haystack = mb_convert_encoding($haystack, 'SJIS', 'JIS');
11381118 $needle = mb_convert_encoding($needle, 'SJIS', 'JIS');
1139- preg_match_all('/'.$mbemu_internals['regex'][2].'/', $haystack, $ar_h);
1140- preg_match_all('/'.$mbemu_internals['regex'][2].'/', $needle, $ar_n);
1119+ preg_match_all("/$sjis_match/", $haystack, $ar_h);
1120+ preg_match_all("/$sjis_match/", $needle, $ar_n);
11411121 return _sub_substr_count($ar_h[0], $ar_n[0]);
11421122 }
11431123 }
@@ -1146,7 +1126,7 @@ function mb_substr_count($haystack, $needle , $encoding = '')
11461126 /******************
11471127 mb_convert_variables
11481128 *******************/
1149-if (!$mbemu_internals['ini_file']['convert_variables_arrayonly']) {
1129+if (!$ini_file['convert_variables_arrayonly']) {
11501130 function mb_convert_variables($to_encoding, $from_encoding, $s1, $s2='',$s3='',$s4='',$s5='',$s6='',$s7='', $s8='',$s9='', $s10='')
11511131 {
11521132 if (is_array($s1)) {
@@ -1192,11 +1172,11 @@ if (!$mbemu_internals['ini_file']['convert_variables_arrayonly']) {
11921172
11931173 function mb_preferred_mime_name ($encoding)
11941174 {
1195- global $mbemu_internals;
1175+ global $_mb_encoding;
11961176
11971177 $encoding = strtoupper($encoding);
11981178
1199- switch ($mbemu_internals['encoding'][$encoding]) {
1179+ switch ($_mb_encoding[$encoding]) {
12001180 case 0 : //ascii
12011181 return 'US-ASCII';
12021182 case 1 : //euc-jp
@@ -1207,10 +1187,6 @@ function mb_preferred_mime_name ($encoding)
12071187 return 'ISO-2022-JP';
12081188 case 4 : //utf-8
12091189 return 'UTF-8';
1210- case 5 :
1211- return 'UTF-16';
1212- case 6 :
1213- return 'ISO-8859-1';
12141190 }
12151191 }
12161192
@@ -1258,16 +1234,23 @@ function _sub_qponechar($str, &$len)
12581234
12591235 function _sub_quoted_printable_encode($str, $encoding, $maxline, $linefeed)
12601236 {
1261- global $mbemu_internals;
1262- switch ($e = $mbemu_internals['encoding'][$encoding]) {
1237+ global $_mb_encoding, $euc_match, $utf8_match, $sjis_match, $jis_match;
1238+ switch ($_mb_encoding[$encoding]) {
12631239 case 0 : //ascii
1240+ $allchars[0] = unpack("c*", $str);
1241+ $max = count($allchars[0]);
1242+ break;
12641243 case 1 : //euc-jp
1244+ $max = preg_match_all("/$euc_match/", $str, $allchars);
1245+ break;
12651246 case 2 : //shift-jis
1247+ $max = preg_match_all("/$sjis_match/", $str, $allchars);
1248+ break;
12661249 case 4 : //utf-8
1267- $max = preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $str, $allchars);
1250+ $max = preg_match_all("/$utf8_match/", $str, $allchars);
12681251 break;
12691252 case 3 : //jis
1270- $max = preg_match_all('/'.$mbemu_internals['regex'][3].'/', $str, $allchunks, PREG_SET_ORDER); // 文字種ごとの配列に分解
1253+ $max = preg_match_all("/$jis_match/", $str, $allchunks, PREG_SET_ORDER); // 文字種ごとの配列に分解
12711254 $st = ''; // quoted printable変換後の文字列
12721255 $len = $maxline; // その行に追加可能なバイト数
12731256 $needterminate = FALSE; //最後にエスケープシーケンスが必要かどうか
@@ -1354,31 +1337,33 @@ function _sub_quoted_printable_encode($str, $encoding, $maxline, $linefeed)
13541337
13551338 function _sub_encode_base64($str, $encoding, $maxline , $linefeed)
13561339 {
1357- global $mbemu_internals;
1358- switch ($e = $mbemu_internals['encoding'][$encoding]) {
1340+ global $_mb_encoding, $euc_match, $utf8_match, $sjis_match, $jis_match;
1341+ switch ($_mb_encoding[$encoding]) {
13591342 case 0 : //ascii
1360- case 6 : //iso-8859-1
13611343 return chunk_split( base64_encode($str) , $maxline, $linefeed);
13621344 case 1 : //euc-jp
1345+ $max = preg_match_all("/$euc_match/", $str, $allchars);
1346+ break;
13631347 case 2 : //shift-jis
1348+ $max = preg_match_all("/$sjis_match/", $str, $allchars);
1349+ break;
13641350 case 4 : //utf-8
1365- case 5 : //utf-16
1366- $max = preg_match_all('/'.$mbemu_internals['regex'][$e].'/', $str, $allchars);
1351+ $max = preg_match_all("/$utf8_match/", $str, $allchars);
13671352 break;
13681353 case 3 : //jis
1369- $max = preg_match_all('/'.$mbemu_internals['regex'][3].'/', $str, $allchunks); // 文字種ごとの配列に分解
1354+ $max = preg_match_all("/$jis_match/", $str, $allchunks, PREG_SET_ORDER); // 文字種ごとの配列に分解
13701355 $st = ''; // BASE64変換後の文字列
13711356 $maxbytes = floor($maxline * 3 / 4); //1行に変換可能なバイト数
13721357 $len = $maxbytes; // その行に追加可能なバイト数
13731358 $line = ''; //1行分の変換前の文字列
13741359 $needterminate = FALSE; //最後にエスケープシーケンスが必要かどうか
13751360 for ($i = 0; $i < $max; ++$i) {
1376- if (ord($allchunks[1][$i])) { //英数にマッチ
1361+ if (ord($allchunks[$i][1])) { //英数にマッチ
13771362 if ($needterminate) {
13781363 $line .= chr(0x1B).'(B';
13791364 $len -= 3;
13801365 }
1381- $tmpstr = $allchunks[1][$i]; //追加する文字列
1366+ $tmpstr = $allchunks[$i][1]; //追加する文字列
13821367 $l = strlen($tmpstr); //追加する文字列の長さ
13831368 while ($l > $len) {
13841369 $line .= substr($tmpstr, 0, $len);
@@ -1391,8 +1376,8 @@ function _sub_encode_base64($str, $encoding, $maxline , $linefeed)
13911376 $line .= $tmpstr;
13921377 $len -= $l;
13931378 $needterminate = FALSE;
1394- } elseif (ord($allchunks[2][$i])) { //漢字にマッチ
1395- $tmpstr = substr($allchunks[0][$i], 3);
1379+ } elseif (ord($allchunks[$i][2])) { //漢字にマッチ
1380+ $tmpstr = substr($allchunks[$i][0], 3);
13961381 if ($len < 8) { //文字を追加するのに最低8バイト必要なので
13971382 if ($needterminate)
13981383 $line .= chr(0x1B).'(B';
@@ -1417,8 +1402,8 @@ function _sub_encode_base64($str, $encoding, $maxline , $linefeed)
14171402 $len -= $l;
14181403 $needterminate = TRUE;
14191404
1420- } elseif (ord($allchunks[3][$i])) { //半角カナにマッチ
1421- $tmpstr = $allchunks[3][$i];
1405+ } elseif (ord($allchunks[$i][3])) { //半角カナにマッチ
1406+ $tmpstr = $allchunks[$i][3];
14221407 if ($len < 7) { //文字を追加するのに最低7バイト必要なので
14231408 if ($needterminate)
14241409 $line .= chr(0x1B).'(B';
@@ -1466,7 +1451,7 @@ function _sub_encode_base64($str, $encoding, $maxline , $linefeed)
14661451
14671452 function mb_encode_mimeheader( $str, $encoding = "ISO-2022-JP", $transfer_encoding = "B", $linefeed = "\r\n")
14681453 {
1469- global $mbemu_internals;
1454+ global $_mb_encoding;
14701455 if ($transfer_encoding == "b") $transfer_encoding = "B";
14711456 if ($transfer_encoding <> "B") $transfer_encoding = "Q";
14721457 $encoding = strtoupper($encoding);
@@ -1495,24 +1480,24 @@ function mb_http_input($type = '')
14951480
14961481 function mb_http_output($encoding = '')
14971482 {
1498- global $mbemu_internals;
1483+ global $ini_file;
14991484
1500- if ($encoding == '') return $mbemu_internals['ini_file']['http_output'];
1485+ if ($encoding == '') return $ini_file['http_output'];
15011486 if (strtolower($encoding) == 'pass') {
1502- $mbemu_internals['ini_file']['http_output'] = 'pass';
1487+ $ini_file['http_output'] = 'pass';
15031488 return TRUE;
15041489 }
1505- $mbemu_internals['ini_file']['http_output'] = mb_preferred_mime_name($encoding);
1490+ $ini_file['http_output'] = mb_preferred_mime_name($encoding);
15061491 return TRUE;
15071492 }
15081493
15091494
15101495 function mb_output_handler ( $buffer, $status='')
15111496 {
1512- global $mbemu_internals;
1513- if ($mbemu_internals['ini_file']['http_output'] == 'pass')
1497+ global $ini_file, $tmpstr;
1498+ if ($ini_file['http_output'] == 'pass')
15141499 return $buffer;
1515- return mb_convert_encoding($buffer, $mbemu_internals['ini_file']['http_output'], mb_internal_encoding());
1500+ return mb_convert_encoding($buffer, $ini_file['http_output'], mb_internal_encoding());
15161501 }
15171502
15181503
@@ -1561,110 +1546,6 @@ function mb_decode_numericentity ($str, $convmap, $encoding="")
15611546 return $s;
15621547 }
15631548
1564-function mb_strtoupper($str, $encoding='')
1565-{
1566- global $mbemu_internals;
1567-
1568- include_once(dirname(__FILE__).'/upper.table');
1569- $encoding = mb_detect_encoding($str, $encoding);
1570- $str = mb_convert_encoding($str, 'UTF-8', $encoding);
1571-
1572- $max = preg_match_all('/'.$mbemu_internals['regex'][4].'/', $str, $allchars); // make array of chars
1573- $newst = '';
1574- for ($i = 0; $i < $max; ++$i) {
1575- $val = _utf8ucs2($allchars[0][$i]); //get ucs2 value
1576- if ((0x61 <= $val) && ($val <= 0x7a)) {
1577- $val -= 0x20;
1578- $newst .= _ucs2utf8($val);
1579- } elseif ($upper = $mbemu_internals['upperarray'][$val]) {
1580- $newst .= _ucs2utf8($upper);
1581- } else {
1582- $newst .= $allchars[0][$i];
1583- }
1584- }
1585- return mb_convert_encoding($newst, $encoding, 'UTF-8');
1586-}
1587-
1588-function mb_strtolower($str, $encoding='')
1589-{
1590- global $mbemu_internals;
1591-
1592- include_once(dirname(__FILE__).'/lower.table');
1593- $encoding = mb_detect_encoding($str, $encoding);
1594- $str = mb_convert_encoding($str, 'UTF-8', $encoding);
1595-
1596- $max = preg_match_all('/'.$mbemu_internals['regex'][4].'/', $str, $allchars); // make array of chars
1597- $newst = '';
1598- for ($i = 0; $i < $max; ++$i) {
1599- $val = _utf8ucs2($allchars[0][$i]); //get ucs2 value
1600- if ((0x41 <= $val) && ($val <= 0x5a)) {
1601- $val += 0x20;
1602- $newst .= _ucs2utf8($val);
1603- } elseif ($lower = $mbemu_internals['lowerarray'][$val]) {
1604- $newst .= _ucs2utf8($lower);
1605- } else {
1606- $newst .= $allchars[0][$i];
1607- }
1608- }
1609- return mb_convert_encoding($newst, $encoding, 'UTF-8');
1610-}
1611-
1612-function mb_convert_case($str, $case, $encoding='')
1613-{
1614- global $mbemu_internals;
1615-
1616- switch($case) {
1617- case MB_CASE_UPPER :
1618- return mb_strtoupper($str, $encoding);
1619- case MB_CASE_LOWER :
1620- return mb_strtolower($str, $encoding);
1621- case MB_CASE_TITLE :
1622- include_once(dirname(__FILE__).'/upper.table');
1623- include_once(dirname(__FILE__).'/lower.table');
1624- $encoding = mb_detect_encoding($str, $encoding);
1625- $str = mb_convert_encoding($str, 'UTF-8', $encoding);
1626-
1627- $max = preg_match_all('/'.$mbemu_internals['regex'][4].'/', $str, $allchars); // make array of chars
1628- $newst = '';
1629- $isalpha = FALSE;
1630- for ($i = 0; $i < $max; ++$i) {
1631- $val = _utf8ucs2($allchars[0][$i]); //get ucs2 value
1632- if ((0x41 <= $val) && ($val <= 0x5a)) {
1633- if ($isalpha) {
1634- $val += 0x20; // to lower;
1635- } else {
1636- $isalpha = TRUE;
1637- }
1638- $newst .= _ucs2utf8($val);
1639- } elseif ((0x61 <= $val) && ($val <= 0x7a)){
1640- if (!$isalpha) {
1641- $val -= 0x20; // to upper
1642- $isalpha = TRUE;
1643- }
1644- $newst .= _ucs2utf8($val);
1645- } elseif ($upper = $mbemu_internals['upperarray'][$val]) { // this char is lower
1646- if ($isalpha) {
1647- $newst .= _ucs2utf8($val);
1648- } else {
1649- $isalpha = TRUE;
1650- $newst .= _ucs2utf8($upper);
1651- }
1652- } elseif ($lower = $mbemu_internals['lowerarray'][$val]) { // this char is upper
1653- if ($isalpha) {
1654- $newst .= _ucs2utf8($lower);
1655- } else {
1656- $isalpha = TRUE;
1657- $newst .= _ucs2utf8($val);
1658- }
1659- } else {
1660- $isalpha = FALSE;
1661- $newst .= $allchars[0][$i];
1662- }
1663- }
1664- return mb_convert_encoding($newst, $encoding, 'UTF-8');
1665- }
1666-}
1667-
16681549
16691550 function _print_str($str) {
16701551 $all = unpack("C*", $str);
--- a/euc/nucleus/libs/mb_emulator/sjistouni.table
+++ b/euc/nucleus/libs/mb_emulator/sjistouni.table
@@ -1,5 +1,5 @@
11 <?php
2-$mbemu_internals['sjistoucs2'] = array (
2+$sjistoucs2 = array (
33 0x8140=>0x3000,
44 0x8141=>0x3001,
55 0x8142=>0x3002,
--- a/euc/nucleus/libs/mb_emulator/unitosjis.table
+++ b/euc/nucleus/libs/mb_emulator/unitosjis.table
@@ -1,5 +1,5 @@
11 <?php
2-$mbemu_internals['ucs2tosjis'] = array(
2+$ucs2tosjis = array(
33 0x3000=>0x8140,
44 0x3001=>0x8141,
55 0x3002=>0x8142,
--- a/euc/nucleus/media.php
+++ b/euc/nucleus/media.php
@@ -1,31 +1,31 @@
11 <?php
22 /*
3- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4- * Copyright (C) 2002-2007 The Nucleus Group
5- *
6- * This program is free software; you can redistribute it and/or
7- * modify it under the terms of the GNU General Public License
8- * as published by the Free Software Foundation; either version 2
9- * of the License, or (at your option) any later version.
10- * (see nucleus/documentation/index.html#license for more info)
3+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4+ * Copyright (C) 2002-2005 The Nucleus Group
5+ *
6+ * This program is free software; you can redistribute it and/or
7+ * modify it under the terms of the GNU General Public License
8+ * as published by the Free Software Foundation; either version 2
9+ * of the License, or (at your option) any later version.
10+ * (see nucleus/documentation/index.html#license for more info)
1111 */
1212 /**
13- * Media popup window for Nucleus
14- *
15- * Purpose:
16- * - can be openen from an add-item form or bookmarklet popup
17- * - shows a list of recent files, allowing browsing, search and
18- * upload of new files
19- * - close the popup by selecting a file in the list. The file gets
20- * passed through to the add-item form (linkto, popupimg or inline img)
21- *
13+ * Media popup window for Nucleus
14+ *
15+ * Purpose:
16+ * - can be openen from an add-item form or bookmarklet popup
17+ * - shows a list of recent files, allowing browsing, search and
18+ * upload of new files
19+ * - close the popup by selecting a file in the list. The file gets
20+ * passed through to the add-item form (linkto, popupimg or inline img)
21+ *
2222 * @license http://nucleuscms.org/license.txt GNU General Public License
23- * @copyright Copyright (C) 2002-2007 The Nucleus Group
24- * @version $Id: media.php,v 1.3.2.2 2007-03-27 11:26:59 kimitake Exp $
25- * $NucleusJP: media.php,v 1.8 2007/03/20 19:32:19 kmorimatsu Exp $
23+ * @copyright Copyright (C) 2002-2005 The Nucleus Group
24+ * @version $Id: media.php,v 1.3.2.3 2007-03-27 11:46:58 kimitake Exp $
25+ * @version $NucleusJP: media.php,v 1.3.2.1 2005/08/23 08:08:37 kimitake Exp $
2626 *
27- */
28-
27+ */
28+
2929 $CONF = array();
3030
3131 // defines how much media items will be shown per page. You can override this
@@ -34,7 +34,7 @@ $CONF = array();
3434 $CONF['MediaPerPage'] = 10;
3535
3636 // include all classes and config data
37-require('../config.php');
37+include('../config.php');
3838 include($DIR_LIBS . 'MEDIA.php'); // media classes
3939
4040 sendContentType('application/xhtml+xml', 'media');
@@ -50,19 +50,19 @@ $query = 'SELECT * FROM ' . sql_table('team'). ' WHERE tmember=' . $member->getI
5050 $teams = mysql_query($query);
5151 if (mysql_num_rows($teams) == 0)
5252 media_doError(_ERROR_DISALLOWEDUPLOAD);
53-
53+
5454 // get action
5555 $action = requestVar('action');
5656 if ($action == '')
5757 $action = 'selectmedia';
58-
58+
5959 // check ticket
6060 $aActionsNotToCheck = array('selectmedia', _MEDIA_FILTER_APPLY, _MEDIA_COLLECTION_SELECT);
6161 if (!in_array($action, $aActionsNotToCheck))
6262 {
6363 if (!$manager->checkTicket())
6464 media_doError(_ERROR_BADTICKET);
65-}
65+}
6666
6767
6868 switch($action) {
@@ -85,10 +85,10 @@ switch($action) {
8585 // select a file
8686 function media_select() {
8787 global $member, $CONF, $DIR_MEDIA, $manager;
88-
88+
8989 media_head();
90-
91- // show 10 files + navigation buttons
90+
91+ // show 10 files + navigation buttons
9292 // show msg when no files
9393 // show upload form
9494 // files sorted according to last modification date
@@ -97,8 +97,8 @@ function media_select() {
9797 $currentCollection = requestVar('collection');
9898 if (!$currentCollection || !@is_dir($DIR_MEDIA . $currentCollection))
9999 $currentCollection = $member->getID();
100-
101-
100+
101+
102102 // get collection list
103103 $collections = MEDIA::getCollectionList();
104104
@@ -126,11 +126,11 @@ function media_select() {
126126 <input type="hidden" name="collection" value="<?php echo htmlspecialchars($currentCollection)?>" />
127127 <input type="submit" name="action" value="<?php echo htmlspecialchars(_MEDIA_UPLOAD_NEW) ?>" title="<?php echo htmlspecialchars(_MEDIA_UPLOADLINK) ?>" />
128128 <?php $manager->addTicketHidden() ?>
129- </div></form>
129+ </div></form>
130130 <?php } // if sizeof
131-
132- $filter = requestVar('filter');
133- $offset = intRequestVar('offset');
131+
132+ $filter = requestVar('filter');
133+ $offset = intRequestVar('offset');
134134 $arr = MEDIA::getMediaListByCollection($currentCollection, $filter);
135135
136136 ?>
@@ -138,28 +138,28 @@ function media_select() {
138138 <label for="media_filter"><?php echo htmlspecialchars(_MEDIA_FILTER_LABEL)?></label>
139139 <input id="media_filter" type="text" name="filter" value="<?php echo htmlspecialchars($filter)?>" />
140140 <input type="submit" name="action" value="<?php echo htmlspecialchars(_MEDIA_FILTER_APPLY) ?>" />
141- <input type="hidden" name="collection" value="<?php echo htmlspecialchars($currentCollection)?>" />
142- <input type="hidden" name="offset" value="<?php echo intval($offset)?>" />
143- </div></form>
144-
141+ <input type="hidden" name="collection" value="<?php echo htmlspecialchars($currentCollection)?>" />
142+ <input type="hidden" name="offset" value="<?php echo intval($offset)?>" />
143+ </div></form>
144+
145145 <?php
146-
147- ?>
146+
147+ ?>
148148 <table width="100%">
149149 <caption><?php echo _MEDIA_COLLECTION_LABEL . htmlspecialchars($collections[$currentCollection])?></caption>
150150 <tr>
151151 <th><?php echo _MEDIA_MODIFIED?></th><th><?php echo _MEDIA_FILENAME?></th><th><?php echo _MEDIA_DIMENSIONS?></th>
152152 </tr>
153-
154- <?php
155-
153+
154+ <?php
155+
156156 if (sizeof($arr)>0) {
157-
157+
158158 if (($offset + $CONF['MediaPerPage']) >= sizeof($arr))
159159 $offset = sizeof($arr) - $CONF['MediaPerPage'];
160160
161161 if ($offset < 0) $offset = 0;
162-
162+
163163 $idxStart = $offset;
164164 $idxEnd = $offset + $CONF['MediaPerPage'];
165165 $idxNext = $idxEnd;
@@ -175,15 +175,15 @@ function media_select() {
175175 $filename = $DIR_MEDIA . $currentCollection . '/' . $obj->filename;
176176
177177 $old_level = error_reporting(0);
178- $size = @GetImageSize($filename);
178+ $size = @GetImageSize($filename);
179179 error_reporting($old_level);
180180 $width = $size[0];
181181 $height = $size[1];
182182 $filetype = $size[2];
183-
183+
184184 echo "<tr>";
185185 echo "<td>". date("Y-m-d",$obj->timestamp) ."</td>";
186-
186+
187187 // strings for javascript
188188 $jsCurrentCollection = str_replace("'","\\'",$currentCollection);
189189 $jsFileName = str_replace("'","\\'",$obj->filename);
@@ -210,21 +210,21 @@ function media_select() {
210210 }
211211 } // if (sizeof($arr)>0)
212212 ?>
213-
213+
214214 </table>
215- <?php
215+ <?php
216216 if ($idxStart > 0)
217217 echo "<a href='media.php?offset=$idxPrev&amp;collection=".urlencode($currentCollection)."'>". _LISTS_PREV."</a> ";
218218 if ($idxEnd < sizeof($arr))
219219 echo "<a href='media.php?offset=$idxNext&amp;collection=".urlencode($currentCollection)."'>". _LISTS_NEXT."</a> ";
220-
220+
221221 ?>
222222 <input id="typeradio0" type="radio" name="typeradio" onclick="setType(0);" checked="checked" /><label for="typeradio0"><?php echo _MEDIA_INLINE?></label>
223223 <input id="typeradio1" type="radio" name="typeradio" onclick="setType(1);" /><label for="typeradio1"><?php echo _MEDIA_POPUP?></label>
224- <?php
224+ <?php
225225 media_foot();
226-
227-
226+
227+
228228 }
229229
230230 /**
@@ -234,19 +234,19 @@ function media_choose() {
234234 global $CONF, $member, $manager;
235235
236236 $currentCollection = requestVar('collection');
237-
237+
238238 $collections = MEDIA::getCollectionList();
239239
240240 media_head();
241241 ?>
242242 <h1><?php echo _UPLOAD_TITLE?></h1>
243-
243+
244244 <p><?php echo _UPLOAD_MSG?></p>
245-
245+
246246 <form method="post" enctype="multipart/form-data" action="media.php">
247247 <div>
248- <input type="hidden" name="action" value="uploadfile" />
249- <?php $manager->addTicketHidden() ?>
248+ <input type="hidden" name="action" value="uploadfile" />
249+ <?php $manager->addTicketHidden() ?>
250250 <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo $CONF['MaxUploadSize']?>" />
251251 File:
252252 <br />
@@ -266,15 +266,15 @@ function media_choose() {
266266 </select>
267267 <?php } else {
268268 ?>
269- <input name="collection" type="hidden" value="<?php echo htmlspecialchars(requestVar('collection'))?>" />
269+ <input name="collection" type="hidden" value="<?php echo htmlspecialchars(requestVar('collection'))?>" />
270270 <?php } // if sizeof
271- ?>
271+ ?>
272272 <br /><br />
273273 <input type="submit" value="<?php echo _UPLOAD_BUTTON?>" />
274274 </div>
275275 </form>
276-
277- <?php
276+
277+ <?php
278278 media_foot();
279279 }
280280
@@ -286,41 +286,23 @@ function media_upload() {
286286 global $DIR_MEDIA, $member, $CONF;
287287
288288 $uploadInfo = postFileInfo('uploadfile');
289-
289+
290290 $filename = $uploadInfo['name'];
291291 $filetype = $uploadInfo['type'];
292292 $filesize = $uploadInfo['size'];
293293 $filetempname = $uploadInfo['tmp_name'];
294- $fileerror = intval($uploadInfo['error']);
295294
296- switch ($fileerror)
297- {
298- case 0: // = UPLOAD_ERR_OK
299- break;
300- case 1: // = UPLOAD_ERR_INI_SIZE
301- case 2: // = UPLOAD_ERR_FORM_SIZE
302- media_doError(_ERROR_FILE_TOO_BIG);
303- case 3: // = UPLOAD_ERR_PARTIAL
304- case 4: // = UPLOAD_ERR_NO_FILE
305- case 6: // = UPLOAD_ERR_NO_TMP_DIR
306- case 7: // = UPLOAD_ERR_CANT_WRITE
307- default:
308- // include error code for debugging
309- // (see http://www.php.net/manual/en/features.file-upload.errors.php)
310- media_doError(_ERROR_BADREQUEST . ' (' . $fileerror . ')');
311- }
312-
313295 if ($filesize > $CONF['MaxUploadSize'])
314296 media_doError(_ERROR_FILE_TOO_BIG);
315-
297+
316298 // check file type against allowed types
317299 $ok = 0;
318300 $allowedtypes = explode (',', $CONF['AllowedTypes']);
319- foreach ( $allowedtypes as $type )
320- if (eregi("\." .$type. "$",$filename)) $ok = 1;
301+ foreach ( $allowedtypes as $type )
302+ if (eregi("\." .$type. "$",$filename)) $ok = 1;
321303 if (!$ok) media_doError(_ERROR_BADFILETYPE);
322-
323- if (!is_uploaded_file($filetempname))
304+
305+ if (!is_uploaded_file($filetempname))
324306 media_doError(_ERROR_BADREQUEST);
325307
326308 // prefix filename with current date (YYYY-MM-DD-)
@@ -331,9 +313,9 @@ function media_upload() {
331313 $collection = requestVar('collection');
332314 $res = MEDIA::addMediaObject($collection, $filetempname, $filename);
333315
334- if ($res != '')
316+ if ($res != '')
335317 media_doError($res);
336-
318+
337319 // shows updated list afterwards
338320 media_select();
339321 }
@@ -342,11 +324,11 @@ function media_loginAndPassThrough() {
342324 media_head();
343325 ?>
344326 <h1><?php echo _LOGIN_PLEASE?></h1>
345-
327+
346328 <form method="post" action="media.php">
347329 <div>
348330 <input name="action" value="login" type="hidden" />
349- <input name="collection" value="<?php echo htmlspecialchars(requestVar('collection'))?>" type="hidden" />
331+ <input name="collection" value="<?php echo htmlspecialchars(requestVar('collection'))?>" type="hidden" />
350332 <?php echo _LOGINFORM_NAME?>: <input name="login" />
351333 <br /><?php echo _LOGINFORM_PWD?>: <input name="password" type="password" />
352334 <br /><input type="submit" value="<?php echo _LOGIN?>" />
@@ -379,33 +361,33 @@ function media_head() {
379361 <script type="text/javascript">
380362 var type = 0;
381363 function setType(val) { type = val; }
382-
364+
383365 function chooseImage(collection, filename, width, height) {
384- window.opener.focus();
366+ window.opener.focus();
385367 window.opener.includeImage(collection,
386- filename,
387- type == 0 ? 'inline' : 'popup',
388- width,
389- height
390- );
368+ filename,
369+ type == 0 ? 'inline' : 'popup',
370+ width,
371+ height
372+ );
391373 window.close();
392374 }
393-
375+
394376 function chooseOther(collection, filename) {
395- window.opener.focus();
377+ window.opener.focus();
396378 window.opener.includeOtherMedia(collection, filename);
397379 window.close();
398-
380+
399381 }
400382 </script>
401383 </head>
402- <body>
384+ <body>
403385 <?php }
404386
405387 function media_foot() {
406388 ?>
407389 </body>
408- </html>
409-<?php }
390+ </html>
391+<?php }
410392
411393 ?>
--- a/euc/nucleus/xmlrpc/api_blogger.inc.php
+++ b/euc/nucleus/xmlrpc/api_blogger.inc.php
@@ -1,24 +1,24 @@
11 <?php
22 /*
3- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4- * Copyright (C) 2002-2007 The Nucleus Group
5- *
6- * This program is free software; you can redistribute it and/or
7- * modify it under the terms of the GNU General Public License
8- * as published by the Free Software Foundation; either version 2
9- * of the License, or (at your option) any later version.
10- * (see nucleus/documentation/index.html#license for more info)
11- */
12-
3+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4+ * Copyright (C) 2002-2005 The Nucleus Group
5+ *
6+ * This program is free software; you can redistribute it and/or
7+ * modify it under the terms of the GNU General Public License
8+ * as published by the Free Software Foundation; either version 2
9+ * of the License, or (at your option) any later version.
10+ * (see nucleus/documentation/index.html#license for more info)
11+ */
12+
1313 /**
1414 * This file contains definitions for the methods in the Blogger API
1515 *
1616 * @license http://nucleuscms.org/license.txt GNU General Public License
17- * @copyright Copyright (C) 2002-2007 The Nucleus Group
18- * @version $Id: api_blogger.inc.php,v 1.3.2.2 2007-03-27 11:27:53 kimitake Exp $
19- * $NucleusJP: api_blogger.inc.php,v 1.6 2007/02/04 06:28:46 kimitake Exp $
20- */
21-
17+ * @copyright Copyright (C) 2002-2005 The Nucleus Group
18+ * @version $Id: api_blogger.inc.php,v 1.3.2.3 2007-03-27 11:47:55 kimitake Exp $
19+ * @version $NucleusJP: api_blogger.inc.php,v 1.3.2.1 2005/08/23 08:08:38 kimitake Exp $
20+ */
21+
2222
2323 // blogger.newPost
2424 $f_blogger_newPost_sig = array(array(
@@ -41,10 +41,10 @@
4141 $password = _getScalar($m,3);
4242 $content = _getScalar($m,4);
4343 $publish = _getScalar($m,5);
44-
44+
4545 $title = blogger_extractTitle($content);
4646 $category = blogger_extractCategory($content);
47- $content = blogger_removeSpecialTags($content);
47+ $content = blogger_removeSpecialTags($content);
4848
4949 return _addItem($blogid, $username, $password, $title, $content, '', $publish, 0, $category);
5050 }
@@ -66,7 +66,7 @@
6666 $f_blogger_editPost_doc = "Edits an item of a blog";
6767 function f_blogger_editPost($m) {
6868 global $manager;
69-
69+
7070 $itemid = intval(_getScalar($m,1));
7171 $username = _getScalar($m,2);
7272 $password = _getScalar($m,3);
@@ -75,9 +75,9 @@
7575
7676 $title = blogger_extractTitle($content);
7777 $category = blogger_extractCategory($content);
78- $content = blogger_removeSpecialTags($content);
78+ $content = blogger_removeSpecialTags($content);
7979
80- // get old title and extended part
80+ // get old title and extended part
8181 if (!$manager->existsItem($itemid,1,1))
8282 return _error(6,"No such item ($itemid)");
8383 $old =& $manager->getItem($itemid,1,1);
@@ -86,7 +86,7 @@
8686
8787 $blog = new BLOG($blogid);
8888 $catid = $blog->getCategoryIdFromName($category);
89-
89+
9090 if ($old['draft'] && $publish) {
9191 $wasdraft = 1;
9292 $publish = 1;
@@ -265,19 +265,19 @@
265265
266266
267267 /**
268- * Returns a list of recent items
268+ * Returns a list of recent items
269269 */
270270 function _getRecentItemsBlogger($blogid, $username, $password, $amount) {
271-
271+
272272 $blogid = intval($blogid);
273273 $amount = intval($amount);
274-
274+
275275 // 1. login
276276 $mem = new MEMBER();
277277 if (!$mem->login($username, $password))
278278 return _error(1,"Could not log in");
279279
280- // 2. check if allowed
280+ // 2. check if allowed
281281 if (!BLOG::existsID($blogid))
282282 return _error(2,"No such blog ($blogid)");
283283 if (!$mem->teamRights($blogid))
@@ -288,7 +288,7 @@
288288
289289 // 3. create and return list of recent items
290290 // Struct returned has dateCreated, userid, blogid and content
291-
291+
292292 $blog = new BLOG($blogid);
293293
294294 $structarray = array(); // the array in which the structs will be stored
@@ -299,15 +299,15 @@
299299 ." ORDER BY itime DESC"
300300 ." LIMIT $amount";
301301 $r = sql_query($query);
302-
302+
303303 while ($row = mysql_fetch_assoc($r)) {
304-
304+
305305 // remove linebreaks if needed
306306 if ($blog->convertBreaks())
307307 $row['ibody'] = removeBreaks($row['ibody']);
308308
309309 $content = blogger_specialTags($row) . $row['ibody'];
310-
310+
311311 $newstruct = new xmlrpcval(array(
312312 "userid" => new xmlrpcval($row['iauthor'],"string"),
313313 "dateCreated" => new xmlrpcval(iso8601_encode(strtotime($row['itime'])),"dateTime.iso8601"),
@@ -317,25 +317,25 @@
317317 "authorName" => new xmlrpcval($row['mname'],'string'),
318318 "title" => new xmlrpcval($row['title'],'string'),
319319 ),'struct');
320- array_push($structarray, $newstruct);
320+ array_push($structarray, $newstruct);
321321 }
322322
323323 return new xmlrpcresp(new xmlrpcval( $structarray , "array"));
324324
325325 }
326-
326+
327327 /**
328328 * Returns one item (Blogger version)
329329 */
330330 function _getItemBlogger($itemid, $username, $password) {
331331 global $manager;
332-
332+
333333 // 1. login
334334 $mem = new MEMBER();
335335 if (!$mem->login($username, $password))
336336 return _error(1,"Could not log in");
337337
338- // 2. check if allowed
338+ // 2. check if allowed
339339 if (!$manager->existsItem($itemid,1,1))
340340 return _error(6,"No such item ($itemid)");
341341 $blogid = getBlogIDFromItemID($itemid);
@@ -347,10 +347,10 @@
347347
348348 $item =& $manager->getItem($itemid,1,1); // (also allow drafts and future items)
349349 $blog = new BLOG($blogid);
350-
350+
351351 // get category
352352 $item['category'] = $blog->getCategoryName($item['catid']);
353-
353+
354354 // remove linebreaks if needed
355355 if ($blog->convertBreaks())
356356 $item['body'] = removeBreaks($item['body']);
@@ -376,10 +376,10 @@
376376
377377 function blogger_extractCategory($body) {
378378 return blogger_matchTag('category',$body);
379- }
380-
379+ }
380+
381381 function blogger_matchTag($tag, $body) {
382- if (preg_match("/<" . $tag .">(.+?)<\/".$tag.">/is",$body,$match))
382+ if (preg_match("/<" . $tag .">(.+?)<\/".$tag.">/is",$body,$match))
383383 return $match[1];
384384 else
385385 return "";
@@ -390,13 +390,13 @@
390390 $body = preg_replace("/<category>(.+?)<\/category>/","",$body);
391391 return trim($body);
392392 }
393-
393+
394394 function blogger_specialTags($item) {
395395 $result = "<title>". $item['title']."</title>";
396396 $result .= "<category>".$item['category']."</category>";
397397 return $result;
398398 }
399-
399+
400400
401401
402402 $functionDefs = array_merge($functionDefs,
@@ -445,7 +445,7 @@
445445 array( "function" => "f_blogger_setTemplate",
446446 "signature" => $f_blogger_setTemplate_sig,
447447 "docstring" => $f_blogger_setTemplate_doc)
448-
448+
449449 )
450450 );
451451
--- a/euc/nucleus/xmlrpc/api_metaweblog.inc.php
+++ b/euc/nucleus/xmlrpc/api_metaweblog.inc.php
@@ -1,26 +1,26 @@
11 <?php
22
33 /*
4- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
5- * Copyright (C) 2002-2007 The Nucleus Group
6- *
7- * This program is free software; you can redistribute it and/or
8- * modify it under the terms of the GNU General Public License
9- * as published by the Free Software Foundation; either version 2
10- * of the License, or (at your option) any later version.
11- * (see nucleus/documentation/index.html#license for more info)
12- */
4+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
5+ * Copyright (C) 2002-2005 The Nucleus Group
6+ *
7+ * This program is free software; you can redistribute it and/or
8+ * modify it under the terms of the GNU General Public License
9+ * as published by the Free Software Foundation; either version 2
10+ * of the License, or (at your option) any later version.
11+ * (see nucleus/documentation/index.html#license for more info)
12+ */
1313
1414 /**
1515 * This file contains definitions for the methods of the metaWeblog API
1616 *
1717 * @license http://nucleuscms.org/license.txt GNU General Public License
18- * @copyright Copyright (C) 2002-2007 The Nucleus Group
19- * @version $Id: api_metaweblog.inc.php,v 1.3.2.2 2007-03-27 11:27:53 kimitake Exp $
20- * $NucleusJP: api_metaweblog.inc.php,v 1.6 2007/02/04 06:28:46 kimitake Exp $
21- */
22-
23-
18+ * @copyright Copyright (C) 2002-2005 The Nucleus Group
19+ * @version $Id: api_metaweblog.inc.php,v 1.3.2.3 2007-03-27 11:47:55 kimitake Exp $
20+ * @version $NucleusJP: api_metaweblog.inc.php,v 1.3.2.1 2005/08/23 08:08:38 kimitake Exp $
21+ */
22+
23+
2424 // metaWeblog.newPost
2525 $f_metaWeblog_newPost_sig = array(array(
2626 // return type
@@ -43,15 +43,15 @@
4343 $password = _getScalar($m,2);
4444 $struct = $m->getParam(3);
4545
46- $content = _getStructVal($struct, 'description');
47- $more = _getStructVal($struct, 'mt_text_more');
48- $title = _getStructVal($struct, 'title');
46+ $content = _getStructVal($struct, 'description');
47+ $more = _getStructVal($struct, 'mt_text_more');
48+ $title = _getStructVal($struct, 'title');
49+
50+ // category is optional (thus: be careful)!
51+ $catlist = $struct->structmem('categories');
52+ if ($catlist && ($catlist->kindOf() == "array") && ($catlist->arraysize() > 0))
53+ $category = _getArrayVal($catlist, 0);
4954
50- // category is optional (thus: be careful)!
51- $catlist = $struct->structmem('categories');
52- if ($catlist && ($catlist->kindOf() == "array") && ($catlist->arraysize() > 0))
53- $category = _getArrayVal($catlist, 0);
54-
5555
5656 $comments = (int) _getStructVal($struct, 'mt_allow_comments') ? 0 : 1;
5757 $publish = _getScalar($m,4);
@@ -75,48 +75,48 @@
7575 return $res;
7676 }
7777
78-
78+
7979 // metaWeblog.getCategories
8080 $f_metaWeblog_getCategories_sig = array(array(
8181 // return
8282 $xmlrpcStruct, // categories for blog
83-
83+
8484 // params
8585 $xmlrpcString, // blogid
8686 $xmlrpcString, // username
8787 $xmlrpcString, // password
88-
88+
8989 ));
9090 $f_metaWeblog_getCategories_doc = "Returns the categories for a given blog";
9191 function f_metaWeblog_getCategories($m) {
9292 $blogid = _getScalar($m,0);
9393 $username = _getScalar($m,1);
9494 $password = _getScalar($m,2);
95-
95+
9696 return _categoryList($blogid, $username, $password);
9797 }
98-
98+
9999
100100 // metaWeblog.getPost
101101 $f_metaWeblog_getPost_sig = array(array(
102102 // return
103- $xmlrpcStruct, // the juice
104-
103+ $xmlrpcStruct, // the juice
104+
105105 // params
106106 $xmlrpcString, // itemid
107107 $xmlrpcString, // username
108108 $xmlrpcString, // password
109-
109+
110110 ));
111111 $f_metaWeblog_getPost_doc = "Retrieves a post";
112112 function f_metaWeblog_getPost($m) {
113113 $itemid = _getScalar($m,0);
114114 $username = _getScalar($m,1);
115115 $password = _getScalar($m,2);
116-
116+
117117 return _mw_getPost($itemid, $username, $password);
118118 }
119-
119+
120120
121121 // metaWeblog.editPost
122122 $f_metaWeblog_editPost_sig = array(array(
@@ -148,18 +148,17 @@
148148 $catlist = $struct->structmem('categories');
149149 if ($catlist && ($catlist->kindOf() == "array") && ($catlist->arraysize() > 0)) {
150150 $category = _getArrayVal($catlist, 0);
151- }
152-
151+ }
152+
153153 $publish = _getScalar($m,4);
154154
155-
156- // get old title and extended part
155+ // get old title and extended part
157156 if (!$manager->existsItem($itemid,1,1))
158157 return _error(6,"No such item ($itemid)");
159158 $blogid = getBlogIDFromItemID($itemid);
160159
161160 $old =& $manager->getItem($itemid,1,1);
162-
161+
163162 if ($category == '')
164163 {
165164 // leave category unchanged when not present
@@ -170,7 +169,7 @@
170169 $blog = new BLOG($blogid);
171170 $catid = $blog->getCategoryIdFromName($category);
172171 }
173-
172+
174173 if ($old['draft'] && $publish) {
175174 $wasdraft = 1;
176175 $publish = 1;
@@ -208,12 +207,12 @@
208207
209208 return $res;
210209 }
211-
210+
212211 // metaWeblog.newMediaObject
213212 $f_metaWeblog_newMediaObject_sig = array(array(
214213 // return type
215214 $xmlrpcStruct, // "url" element
216-
215+
217216 // params
218217 $xmlrpcString, // blogid
219218 $xmlrpcString, // username
@@ -225,15 +224,15 @@
225224 $blogid = _getScalar($m, 0);
226225 $username = _getScalar($m, 1);
227226 $password = _getScalar($m, 2);
228-
227+
229228 $struct = $m->getParam(3);
230229 $name = _getStructVal($struct, 'name');
231230 $type = _getStructVal($struct, 'type');
232231 $bits = _getStructVal($struct, 'bits');
233-
232+
234233 return _newMediaObject($blogid, $username, $password, array('name' => $name, 'type' => $type, 'bits' => $bits));
235234 }
236-
235+
237236 // metaWeblog.getRecentPosts
238237 $f_metaWeblog_getRecentPosts_sig = array(array(
239238 // return type
@@ -251,21 +250,21 @@
251250 $username = _getScalar($m, 1);
252251 $password = _getScalar($m, 2);
253252 $amount = intval(_getScalar($m, 3));
254-
255- return _getRecentItemsMetaWeblog($blogid, $username, $password, $amount);
253+
254+ return _getRecentItemsMetaWeblog($blogid, $username, $password, $amount);
256255 }
257-
256+
258257 function _getRecentItemsMetaWeblog($blogid, $username, $password, $amount) {
259-
258+
260259 $blogid = intval($blogid);
261260 $amount = intval($amount);
262-
261+
263262 // 1. login
264263 $mem = new MEMBER();
265264 if (!$mem->login($username, $password))
266265 return _error(1,"Could not log in");
267266
268- // 2. check if allowed
267+ // 2. check if allowed
269268 if (!BLOG::existsID($blogid))
270269 return _error(2,"No such blog ($blogid)");
271270 if (!$mem->teamRights($blogid))
@@ -276,7 +275,7 @@
276275
277276 // 3. create and return list of recent items
278277 // Struct returned has dateCreated, userid, blogid and content
279-
278+
280279 $blog = new BLOG($blogid);
281280
282281 $structarray = array(); // the array in which the structs will be stored
@@ -287,9 +286,9 @@
287286 ." ORDER BY itime DESC"
288287 ." LIMIT $amount";
289288 $r = sql_query($query);
290-
289+
291290 while ($row = mysql_fetch_assoc($r)) {
292-
291+
293292 // remove linebreaks if needed
294293 if ($blog->convertBreaks()) {
295294 $row['ibody'] = removeBreaks($row['ibody']);
@@ -314,73 +313,73 @@
314313 "mt_allow_comments" => new xmlrpcval($row['iclosed'] ? 0 : 1, "int"),
315314 "mt_allow_pings" => new xmlrpcval(1, "int")
316315 ),'struct');
317-
316+
318317 //TODO: String link?
319318 //TODO: String permaLink?
320-
321-
322- array_push($structarray, $newstruct);
319+
320+
321+ array_push($structarray, $newstruct);
323322 }
324323
325324 return new xmlrpcresp(new xmlrpcval( $structarray , "array"));
326325 }
327-
326+
328327 function _newMediaObject($blogid, $username, $password, $info) {
329328 global $CONF, $DIR_MEDIA, $DIR_LIBS;
330-
329+
331330 // - login
332331 $mem = new MEMBER();
333332 if (!$mem->login($username, $password))
334333 return _error(1,'Could not log in');
335-
336- // - check if team member
334+
335+ // - check if team member
337336 if (!BLOG::existsID($blogid))
338337 return _error(2,"No such blog ($blogid)");
339338 if (!$mem->teamRights($blogid))
340339 return _error(3,'Not a team member');
341-
340+
342341 $b = new BLOG($blogid);
343-
342+
344343 // - decode data
345344 $data = $info['bits']; // decoding was done transparantly by xmlrpclib
346-
345+
347346 // - check filesize
348347 if (strlen($data) > $CONF['MaxUploadSize'])
349348 return _error(9, 'filesize is too big');
350349
351-
350+
352351 // - check if filetype is allowed (check filename)
353352 $filename = $info['name'];
354353 $ok = 0;
355354 $allowedtypes = explode (',', $CONF['AllowedTypes']);
356- foreach ( $allowedtypes as $type )
357- if (eregi("\." .$type. "$",$filename)) $ok = 1;
358- if (!$ok)
355+ foreach ( $allowedtypes as $type )
356+ if (eregi("\." .$type. "$",$filename)) $ok = 1;
357+ if (!$ok)
359358 _error(8, 'Filetype is not allowed');
360-
359+
361360 // - add file to media library
362361 include_once($DIR_LIBS . 'MEDIA.php'); // media classes
363-
362+
364363 // always use private media library of member
365364 $collection = $mem->getID();
366365
367366 // prefix filename with current date (YYYY-MM-DD-)
368367 // this to avoid nameclashes
369368 if ($CONF['MediaPrefix'])
370- $filename = strftime("%Y%m%d-", time()) . $filename;
371-
369+ $filename = strftime("%Y%m%d-", time()) . $filename;
370+
372371 $res = MEDIA::addMediaObjectRaw($collection, $filename, $data);
373372 if ($res)
374373 return _error(10, $res);
375-
374+
376375 // - return URL
377376 $urlstruct = new xmlrpcval(array(
378377 "url" => new xmlrpcval($CONF['MediaURL'] . $collection. '/' . $filename,'string')
379- ),'struct');
380-
378+ ),'struct');
379+
381380 return new xmlrpcresp($urlstruct);
382381 }
383-
382+
384383 function _categoryList($blogid, $username, $password) {
385384 // 1. login
386385 $mem = new MEMBER();
@@ -392,9 +391,9 @@
392391 return _error(2,"No such blog ($blogid)");
393392 if (!$mem->teamRights($blogid))
394393 return _error(3,"Not a team member");
395-
394+
396395 $b = new BLOG($blogid);
397-
396+
398397 $categorystruct = array();
399398
400399 $query = "SELECT cname, cdesc, catid"
@@ -413,22 +412,22 @@
413412 )
414413 ,'struct');
415414 }
416-
417-
415+
416+
418417 return new xmlrpcresp(new xmlrpcval( $categorystruct , "struct"));
419-
418+
420419 }
421-
422-
420+
421+
423422 function _mw_getPost($itemid, $username, $password) {
424423 global $manager;
425-
424+
426425 // 1. login
427426 $mem = new MEMBER();
428427 if (!$mem->login($username, $password))
429428 return _error(1,"Could not log in");
430429
431- // 2. check if allowed
430+ // 2. check if allowed
432431 if (!$manager->existsItem($itemid,1,1))
433432 return _error(6,"No such item ($itemid)");
434433 $blogid = getBlogIDFromItemID($itemid);
@@ -437,13 +436,13 @@
437436
438437 // 3. return the item
439438 $item =& $manager->getItem($itemid,1,1); // (also allow drafts and future items)
440-
439+
441440 $b = new BLOG($blogid);
442441 if ($b->convertBreaks()) {
443442 $item['body'] = removeBreaks($item['body']);
444443 $item['more'] = removeBreaks($item['more']);
445444 }
446-
445+
447446 $categoryname = $b->getCategoryName($item['catid']);
448447
449448 $newstruct = new xmlrpcval(array(
@@ -463,14 +462,14 @@
463462 "mt_allow_comments" => new xmlrpcval($item['closed'] ? 0 : 1, "int"),
464463 "mt_allow_pings" => new xmlrpcval(1, "int")
465464 ),'struct');
466-
465+
467466 //TODO: add "String link" to struct?
468- //TODO: add "String permaLink" to struct?
467+ //TODO: add "String permaLink" to struct?
469468
470469 return new xmlrpcresp($newstruct);
471-
470+
472471 }
473-
472+
474473 $functionDefs = array_merge($functionDefs,
475474 array(
476475 "metaWeblog.newPost" =>
@@ -485,14 +484,14 @@
485484 "function" => "f_metaWeblog_getCategories",
486485 "signature" => $f_metaWeblog_getCategories_sig,
487486 "docstring" => $f_metaWeblog_getCategories_doc
488- ),
487+ ),
489488
490489 "metaWeblog.getPost" =>
491490 array(
492491 "function" => "f_metaWeblog_getPost",
493492 "signature" => $f_metaWeblog_getPost_sig,
494493 "docstring" => $f_metaWeblog_getPost_doc
495- ),
494+ ),
496495
497496 "metaWeblog.editPost" =>
498497 array(
@@ -500,21 +499,21 @@
500499 "signature" => $f_metaWeblog_editPost_sig,
501500 "docstring" => $f_metaWeblog_editPost_doc
502501 ),
503-
502+
504503 'metaWeblog.newMediaObject' =>
505504 array(
506- 'function' => 'f_metaWeblog_newMediaObject',
507- 'signature' => $f_metaWeblog_newMediaObject_sig,
508- 'docstring' => $f_metaWeblog_newMediaObject_doc
505+ 'function' => 'f_metaWeblog_newMediaObject',
506+ 'signature' => $f_metaWeblog_newMediaObject_sig,
507+ 'docstring' => $f_metaWeblog_newMediaObject_doc
509508 ),
510-
509+
511510 'metaWeblog.getRecentPosts' =>
512511 array(
513- 'function' => 'f_metaWeblog_getRecentPosts',
514- 'signature' => $f_metaWeblog_getRecentPosts_sig,
515- 'docstring' => $f_metaWeblog_getRecentPosts_doc
516- )
517-
512+ 'function' => 'f_metaWeblog_getRecentPosts',
513+ 'signature' => $f_metaWeblog_getRecentPosts_sig,
514+ 'docstring' => $f_metaWeblog_getRecentPosts_doc
515+ )
516+
518517 )
519518 );
520-?>
\ No newline at end of file
519+?>
--- a/euc/nucleus/xmlrpc/api_mt.inc.php
+++ b/euc/nucleus/xmlrpc/api_mt.inc.php
@@ -1,24 +1,26 @@
11 <?php
22
33 /*
4- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
5- * Copyright (C) 2002-2007 The Nucleus Group
6- *
7- * This program is free software; you can redistribute it and/or
8- * modify it under the terms of the GNU General Public License
9- * as published by the Free Software Foundation; either version 2
10- * of the License, or (at your option) any later version.
11- * (see nucleus/documentation/index.html#license for more info)
12- */
4+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
5+ * Copyright (C) 2002-2005 The Nucleus Group
6+ *
7+ * This program is free software; you can redistribute it and/or
8+ * modify it under the terms of the GNU General Public License
9+ * as published by the Free Software Foundation; either version 2
10+ * of the License, or (at your option) any later version.
11+ * (see nucleus/documentation/index.html#license for more info)
12+ */
1313 /**
1414 * This file contains definitions for the methods in the Movable Type API
1515 *
1616 * Wouter Demuynck 2003-08-31
1717 *
1818 * @license http://nucleuscms.org/license.txt GNU General Public License
19- * @copyright Copyright (C) 2002-2007 The Nucleus Group
20- * $NucleusJP: api_mt.inc.php,v 1.6 2007/02/04 06:28:46 kimitake Exp $
21- */
19+ * @copyright Copyright (C) 2002-2005 The Nucleus Group
20+ * @version $Id: api_mt.inc.php,v 1.3.2.3 2007-03-27 11:47:55 kimitake Exp $
21+ * @version $NucleusJP: api_mt.inc.php,v 1.3.2.1 2005/08/23 08:08:38 kimitake Exp $
22+ */
23+
2224
2325 // mt.supportedMethods
2426 $f_mt_supportedMethods_sig = array(array(
@@ -27,7 +29,7 @@
2729 ));
2830 $f_mt_supportedMethods_doc = 'returns an array of supported methods';
2931 function f_mt_supportedMethods($m) {
30- $res = new xmlrpcresp(new xmlrpcval(
32+ $res = new xmlrpcresp(new xmlrpcval(
3133 array(
3234 new xmlrpcval('mt.supportedMethods', 'string'),
3335 new xmlrpcval('mt.supportedTextFilters', 'string'),
@@ -41,7 +43,7 @@
4143 );
4244 return $res;
4345 }
44-
46+
4547 // mt.supportedTextFilters
4648 $f_mt_supportedTextFilters_sig = array(array(
4749 // return type
@@ -49,24 +51,24 @@
4951 ));
5052 $f_mt_supportedTextFilters_doc = 'returns the supported text filters';
5153 function f_mt_supportedTextFilters($m) {
52- $res = new xmlrpcresp(new xmlrpcval(
54+ $res = new xmlrpcresp(new xmlrpcval(
5355 array(
5456 // no text filters in nucleus
5557 ), 'array')
5658 );
5759 return $res;
5860 }
59-
61+
6062 // mt.getCategoryList
6163 $f_mt_getCategoryList_sig = array(array(
6264 // return type
6365 $xmlrpcArray, // array of structs
64-
66+
6567 // params
6668 $xmlrpcString, // blogid
6769 $xmlrpcString, // username
6870 $xmlrpcString // password
69-
71+
7072 ));
7173 $f_mt_getCategoryList_doc = 'Returns a list of all categories defined in the weblog';
7274 function f_mt_getCategoryList($m) {
@@ -76,12 +78,12 @@
7678
7779 return _mt_categoryList($blogid, $username, $password);
7880 }
79-
81+
8082 // mt.publishPost
8183 $f_mt_publishPost_sig = array(array(
8284 // return type
8385 $xmlrpcBoolean, // true
84-
86+
8587 // params
8688 $xmlrpcString, // itemid
8789 $xmlrpcString, // username
@@ -91,11 +93,11 @@
9193 function f_mt_publishPost($m) {
9294 $itemid = intval(_getScalar($m, 0));
9395 $username = _getScalar($m, 1);
94- $password = _getScalar($m, 2);
95-
96+ $password = _getScalar($m, 2);
97+
9698 return _mt_publishPost($itemid, $username, $password);
9799 }
98-
100+
99101 // mt.getPostCategories
100102 $f_mt_getPostCategories_sig = array(array(
101103 // return
@@ -110,7 +112,7 @@
110112 $itemid = intval(_getScalar($m, 0));
111113 $username = _getScalar($m, 1);
112114 $password = _getScalar($m, 2);
113-
115+
114116 return _mt_getPostCategories($itemid, $username, $password);
115117 }
116118
@@ -131,7 +133,7 @@
131133 $password = _getScalar($m, 2);
132134
133135 $categories = $m->getParam(3);
134- $iSize = $categories->arraysize();
136+ $iSize = $categories->arraysize();
135137
136138 $category = '';
137139 for ($i=0;$i<$iSize;$i++) {
@@ -141,18 +143,18 @@
141143 $bPrimary = $bPrimary->scalarval();
142144 else if (!$category)
143145 $bPrimary = 1; // "Using isPrimary to set the primary category is optional--
144- // in the absence of this flag, the first struct in the array
146+ // in the absence of this flag, the first struct in the array
145147 // will be assigned the primary category for the post." (MT doc)
146148 if ($bPrimary) {
147149 $category = $struct->structmem('categoryId');
148150 $category = $category->scalarval();
149151 }
150-
152+
151153 }
152-
154+
153155 return _mt_setPostCategories($itemid, $username, $password, $category);
154156 }
155-
157+
156158 // mt.getRecentPostTitles
157159 $f_mt_getRecentPostTitles_sig = array(array(
158160 // return
@@ -166,10 +168,10 @@
166168 $f_mt_getRecentPostTitles_doc = 'Returns a bandwidth-friendly list of the most recent posts in the system.';
167169 function f_mt_getRecentPostTitles($m) {
168170 $blogid = intval(_getScalar($m, 0));
169- $username = _getScalar($m, 1);
171+ $username = _getScalar($m, 1);
170172 $password = _getScalar($m, 2);
171173 $iAmount = intval(_getScalar($m, 3));
172-
174+
173175 return _mt_getRecentPostTitles($blogid, $username, $password, $iAmount);
174176 }
175177
@@ -185,7 +187,7 @@
185187 global $manager;
186188
187189 $itemid = intval(_getScalar($m, 0));
188-
190+
189191 $trackbacks = array ();
190192 $tbstruct = array ();
191193
@@ -203,39 +205,39 @@
203205
204206 return new xmlrpcresp(new xmlrpcval( $tbstruct , "array"));
205207 }
206-
208+
207209 $functionDefs = array_merge($functionDefs,
208210 array(
209211 "mt.supportedMethods" =>
210212 array( "function" => "f_mt_supportedMethods",
211213 "signature" => $f_mt_supportedMethods_sig,
212214 "docstring" => $f_mt_supportedMethods_doc),
213-
215+
214216 "mt.supportedTextFilters" =>
215217 array( "function" => "f_mt_supportedTextFilters",
216218 "signature" => $f_mt_supportedTextFilters_sig,
217219 "docstring" => $f_mt_supportedTextFilters_doc),
218-
220+
219221 "mt.getCategoryList" =>
220222 array( "function" => "f_mt_getCategoryList",
221223 "signature" => $f_mt_getCategoryList_sig,
222224 "docstring" => $f_mt_getCategoryList_doc),
223-
225+
224226 "mt.publishPost" =>
225227 array( "function" => "f_mt_publishPost",
226228 "signature" => $f_mt_publishPost_sig,
227229 "docstring" => $f_mt_publishPost_doc),
228-
230+
229231 "mt.getPostCategories" =>
230232 array( "function" => "f_mt_getPostCategories",
231233 "signature" => $f_mt_getPostCategories_sig,
232234 "docstring" => $f_mt_getPostCategories_doc),
233-
235+
234236 "mt.setPostCategories" =>
235237 array( "function" => "f_mt_setPostCategories",
236238 "signature" => $f_mt_setPostCategories_sig,
237239 "docstring" => $f_mt_setPostCategories_doc),
238-
240+
239241 "mt.getRecentPostTitles" =>
240242 array( "function" => "f_mt_getRecentPostTitles",
241243 "signature" => $f_mt_getRecentPostTitles_sig,
@@ -257,19 +259,19 @@
257259 if (!$mem->login($username, $password))
258260 return _error(1,"Could not log in");
259261
260- // check if item exists
262+ // check if item exists
261263 if (!$manager->existsItem($itemid,1,1))
262264 return _error(6,"No such item ($itemid)");
263-
265+
264266 $blogid = getBlogIDFromItemID($itemid);
265267 $blog = new BLOG($blogid);
266268
267269 if (!$mem->canAlterItem($itemid))
268270 return _error(7,"Not allowed to alter item");
271+
272+ $old =& $manager->getItem($itemid,1,1);
269273
270- $old =& $manager->getItem($itemid,1,1);
271-
272- $catid = $blog->getCategoryIdFromName($category);
274+ $catid = $blog->getCategoryIdFromName($category);
273275
274276 $publish = 0;
275277 if ($old['draft'] && $publish) {
@@ -278,11 +280,11 @@
278280 } else {
279281 $wasdraft = 0;
280282 }
281-
283+
282284 return _edititem($itemid, $username, $password, $catid, $old['title'], $old['body'], $old['more'], $wasdraft, $publish, $old['closed']);
283285 }
284-
285-
286+
287+
286288 function _mt_getPostCategories($itemid, $username, $password) {
287289 global $manager;
288290
@@ -291,7 +293,7 @@
291293 if (!$mem->login($username, $password))
292294 return _error(1,"Could not log in");
293295
294- // check if item exists
296+ // check if item exists
295297 if (!$manager->existsItem($itemid,1,1))
296298 return _error(6,"No such item ($itemid)");
297299
@@ -300,25 +302,25 @@
300302
301303 if (!$mem->canAlterItem($itemid))
302304 return _error(7, 'You are not allowed to request this information');
303-
304- $info =& $manager->getItem($itemid,1,1);
305+
306+ $info =& $manager->getItem($itemid,1,1);
305307 $catName = $blog->getCategoryName($info['catid']);
306-
308+
307309 $struct = new xmlrpcval(
308310 array(
309311 'categoryId' => new xmlrpcval($catName, 'string'),
310312 'categoryName' => new xmlrpcval($catName, 'string'),
311313 'isPrimary' => new xmlrpcval(1, 'boolean')
312314 ), 'struct'
313- );
314-
315+ );
316+
315317 return new xmlrpcresp(new xmlrpcval(array($struct), 'array'));
316318
317319 }
318-
320+
319321 function _mt_publishPost($itemid, $username, $password) {
320322 global $manager;
321-
323+
322324 if (!$manager->existsItem($itemid,1,1))
323325 return _error(6,"No such item ($itemid)");
324326
@@ -329,8 +331,8 @@
329331
330332 return _edititem($itemid, $username, $password, $old['catid'], $old['title'], $old['body'], $old['more'], $old['draft'], 1, $old['closed']);
331333 }
332-
333-
334+
335+
334336 function _mt_categoryList($blogid, $username, $password) {
335337 // 1. login
336338 $mem = new MEMBER();
@@ -342,9 +344,9 @@
342344 return _error(2,"No such blog ($blogid)");
343345 if (!$mem->teamRights($blogid))
344346 return _error(3,"Not a team member");
345-
347+
346348 $b = new BLOG($blogid);
347-
349+
348350 $categorystruct = array();
349351
350352 $query = "SELECT cname, cdesc, catid"
@@ -361,25 +363,25 @@
361363 "categoryId" => new xmlrpcval($obj->cname,"string")
362364 )
363365 ,'struct');
364-
366+
365367 }
366-
367-
368+
369+
368370 return new xmlrpcresp(new xmlrpcval( $categorystruct , "array"));
369-
371+
370372 }
371-
372- function _mt_getRecentPostTitles($blogid, $username, $password, $iAmount)
373+
374+ function _mt_getRecentPostTitles($blogid, $username, $password, $iAmount)
373375 {
374376 $blogid = intval($blogid);
375377 $iAmount = intval($iAmount);
376-
378+
377379 // 1. login
378380 $mem = new MEMBER();
379381 if (!$mem->login($username, $password))
380382 return _error(1,"Could not log in");
381383
382- // 2. check if allowed
384+ // 2. check if allowed
383385 if (!BLOG::existsID($blogid))
384386 return _error(2,"No such blog ($blogid)");
385387 if (!$mem->teamRights($blogid))
@@ -390,7 +392,7 @@
390392
391393 // 3. create and return list of recent items
392394 // Struct returned has dateCreated, userid, postid and title
393-
395+
394396 $blog = new BLOG($blogid);
395397
396398 $structarray = array(); // the array in which the structs will be stored
@@ -401,23 +403,23 @@
401403 ." ORDER BY itime DESC"
402404 ." LIMIT $iAmount";
403405 $r = sql_query($query);
404-
406+
405407 while ($row = mysql_fetch_assoc($r)) {
406-
408+
407409 $newstruct = new xmlrpcval(array(
408410 "dateCreated" => new xmlrpcval(iso8601_encode(strtotime($row['itime'])),"dateTime.iso8601"),
409411 "postid" => new xmlrpcval($row['inumber'],"string"),
410412 "title" => new xmlrpcval($row['title'],"string"),
411413 "userid" => new xmlrpcval($row['iauthor'],"string")
412414 ),'struct');
413-
414- array_push($structarray, $newstruct);
415+
416+ array_push($structarray, $newstruct);
415417 }
416418
417419 return new xmlrpcresp(new xmlrpcval( $structarray , "array"));
418-
420+
419421 }
422+
420423
421424
422-
423-?>
\ No newline at end of file
425+?>
--- a/euc/nucleus/xmlrpc/api_nucleus.inc.php
+++ b/euc/nucleus/xmlrpc/api_nucleus.inc.php
@@ -1,14 +1,14 @@
11 <?php
22 /*
3- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4- * Copyright (C) 2002-2007 The Nucleus Group
5- *
6- * This program is free software; you can redistribute it and/or
7- * modify it under the terms of the GNU General Public License
8- * as published by the Free Software Foundation; either version 2
9- * of the License, or (at your option) any later version.
10- * (see nucleus/documentation/index.html#license for more info)
11- */
3+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4+ * Copyright (C) 2002-2005 The Nucleus Group
5+ *
6+ * This program is free software; you can redistribute it and/or
7+ * modify it under the terms of the GNU General Public License
8+ * as published by the Free Software Foundation; either version 2
9+ * of the License, or (at your option) any later version.
10+ * (see nucleus/documentation/index.html#license for more info)
11+ */
1212
1313 /**
1414 * This file contains definitions for the functions in the Nucleus API
@@ -16,10 +16,11 @@
1616 * NOTE: These functions are deprecated and will most likely be removed!
1717 *
1818 * @license http://nucleuscms.org/license.txt GNU General Public License
19- * @copyright Copyright (C) 2002-2007 The Nucleus Group
20- * @version $Id: api_nucleus.inc.php,v 1.3.2.2 2007-03-27 11:27:53 kimitake Exp $
21- * $NucleusJP: api_nucleus.inc.php,v 1.6 2007/02/04 06:28:46 kimitake Exp $
22- */
19+ * @copyright Copyright (C) 2002-2005 The Nucleus Group
20+ * @version $Id: api_nucleus.inc.php,v 1.3.2.3 2007-03-27 11:47:55 kimitake Exp $
21+ * $NucleusJP: api_nucleus.inc.php,v 1.3.2.1 2005/08/23 08:08:38 kimitake Exp $
22+ */
23+
2324
2425 // nucleus.addItem
2526 $f_nucleus_addItem_sig = array(array(
@@ -102,7 +103,7 @@
102103 $f_nucleus_editItem_doc = "Edits an item of a blog";
103104 function f_nucleus_editItem($m) {
104105 global $manager;
105-
106+
106107 $itemid = intval(_getScalar($m,0));
107108 $username = _getScalar($m,1);
108109 $password = _getScalar($m,2);
@@ -112,7 +113,7 @@
112113 $publish = _getScalar($m,6);
113114 $closed = _getScalar($m,7);
114115
115- // get old title and extended part
116+ // get old title and extended part
116117 if (!$manager->existsItem($itemid,1,1))
117118 return _error(6,"No such item ($itemid)");
118119
@@ -207,13 +208,13 @@
207208 function _getRecentItems($blogid, $username, $password, $amount) {
208209 $blogid = intval($blogid);
209210 $amount = intval($amount);
210-
211+
211212 // 1. login
212213 $mem = new MEMBER();
213214 if (!$mem->login($username, $password))
214215 return _error(1,"Could not log in");
215216
216- // 2. check if allowed
217+ // 2. check if allowed
217218 if (!BLOG::existsID($blogid))
218219 return _error(2,"No such blog ($blogid)");
219220 if (!$mem->teamRights($blogid))
@@ -244,31 +245,31 @@
244245 "draft" => new xmlrpcval($obj->idraft,"boolean"),
245246 "closed" => new xmlrpcval($obj->iclosed,"boolean"),
246247 ),'struct');
247- array_push($structarray, $newstruct);
248+ array_push($structarray, $newstruct);
248249 }
249250
250251 return new xmlrpcresp(new xmlrpcval( $structarray , "array"));
251252
252253 }
253-
254-
254+
255+
255256
256257 /**
257258 * Returns one item (Nucleus version)
258259 */
259260 function _getItem($itemid, $username, $password) {
260261 global $manager;
261-
262+
262263 // 1. login
263264 $mem = new MEMBER();
264265 if (!$mem->login($username, $password))
265266 return _error(1,"Could not log in");
266267
267- // 2. check if allowed
268+ // 2. check if allowed
268269 if (!$manager->existsItem($itemid,1,1))
269270 return _error(6,"No such item ($itemid)");
270271 $blogid = getBlogIDFromItemID($itemid);
271-
272+
272273 if (!$mem->teamRights($blogid))
273274 return _error(3,"Not a team member");
274275
@@ -276,7 +277,7 @@
276277 // Structure returned has dateCreated, userid, blogid and content
277278
278279 $item =& $manager->getItem($itemid,1,1); // (also allow drafts and future items)
279-
280+
280281 $blog = new BLOG($blogid);
281282 if ($blog->convertBreaks())
282283 $item['body'] = removeBreaks($item['body']);
@@ -295,7 +296,7 @@
295296 return new xmlrpcresp($newstruct);
296297
297298
298- }
299+ }
299300
300301
301302 $functionDefs = array_merge($functionDefs,
@@ -323,19 +324,19 @@
323324 "nucleus.getUsersBlogs" =>
324325 array( "function" => "f_nucleus_getUsersBlogs",
325326 "signature" => $f_nucleus_getUsersBlogs_sig,
326- "docstring" => $f_nucleus_getUsersBlogs_doc),
327+ "docstring" => $f_nucleus_getUsersBlogs_doc),
327328
328329 "nucleus.getRecentItems" =>
329330 array( "function" => "f_nucleus_getRecentItems",
330331 "signature" => $f_nucleus_getRecentItems_sig,
331- "docstring" => $f_nucleus_getRecentItems_doc),
332+ "docstring" => $f_nucleus_getRecentItems_doc),
332333
333334 "nucleus.getItem" =>
334335 array( "function" => "f_nucleus_getItem",
335336 "signature" => $f_nucleus_getItem_sig,
336337 "docstring" => $f_nucleus_getItem_doc)
337- )
338-
338+ )
339+
339340 );
340341
341-?>
\ No newline at end of file
342+?>
--- a/euc/nucleus/xmlrpc/server.php
+++ b/euc/nucleus/xmlrpc/server.php
@@ -1,7 +1,7 @@
11 <?php
22 /*
33 * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
4- * Copyright (C) 2002-2007 The Nucleus Group
4+ * Copyright (C) 2002-2005 The Nucleus Group
55 *
66 * This program is free software; you can redistribute it and/or
77 * modify it under the terms of the GNU General Public License
@@ -61,12 +61,12 @@
6161 * mt.supportedMethods
6262 *
6363 * @license http://nucleuscms.org/license.txt GNU General Public License
64- * @copyright Copyright (C) 2002-2007 The Nucleus Group
65- * @version $Id: server.php,v 1.5.2.4 2007-03-27 11:27:53 kimitake Exp $
66- * @version $NucleusJP: server.php,v 1.8 2007/03/20 19:33:25 kmorimatsu Exp $
64+ * @copyright Copyright (C) 2002-2005 The Nucleus Group
65+ * @version $Id: server.php,v 1.5.2.5 2007-03-27 11:47:55 kimitake Exp $
66+ * @version $NucleusJP: server.php,v 1.5.2.3 2005/08/23 08:08:38 kimitake Exp $
6767 */
6868 $CONF = array();
69-require("../../config.php"); // include Nucleus libs and code
69+include("../../config.php"); // include Nucleus libs and code
7070 include($DIR_LIBS . "xmlrpc.inc.php");
7171 include($DIR_LIBS . "xmlrpcs.inc.php");
7272
@@ -325,4 +325,4 @@ function _error($err, $msg) {
325325 global $xmlrpcerruser;
326326 return new xmlrpcresp(0, $xmlrpcerruser + $err, $msg);
327327 }
328-?>
\ No newline at end of file
328+?>
--- a/euc/rsd.php
+++ b/euc/rsd.php
@@ -5,4 +5,4 @@ include('./config.php');
55 selectSkin('xml/rsd');
66 selector();
77
8-?>
\ No newline at end of file
8+?>
--- a/euc/skins/atom/skinbackup.xml
+++ b/euc/skins/atom/skinbackup.xml
@@ -4,23 +4,18 @@
44 <template name="feeds/atom/modified" />
55 <template name="feeds/atom/entries" />
66 <info>
7- <![CDATA[Atom 1.0 weblog syndication]]>
7+ <![CDATA[Atom 0.3 weblog syndication]]>
88 </info>
99 </meta>
1010
1111 <skin name="feeds/atom" type="application/atom+xml" includeMode="normal" includePrefix="">
12- <description>Atom 1.0 weblog syndication</description>
12+ <description>Atom 0.3 weblog syndication</description>
1313 <part name="index"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
14-<feed xml:lang="ja" xmlns="http://www.w3.org/2005/Atom">
14+<feed version="0.3" xmlns="http://purl.org/atom/ns#">
1515 <title><%blogsetting(name)%></title>
16- <subtitle><%blogsetting(desc)%></subtitle>
17- <id><%blogsetting(url)%>:<%blogsetting(id)%></id>
18-
1916 <link rel="alternate" type="text/html" href="<%blogsetting(url)%>" />
20- <link rel="self" type="application/atom+xml" href="<%blogsetting(url)%><%self%>" />
21- <generator uri="http://nucleuscms.org/"><%version%></generator>
22- <updated><%blog(feeds/atom/modified,1)%></updated>
23-
17+ <generator url="http://nucleuscms.org/"><%version%></generator>
18+ <modified><%blog(feeds/atom/modified,1)%></modified>
2419 <%blog(feeds/atom/entries,10)%>
2520 </feed>]]></part>
2621 </skin>
@@ -35,14 +30,14 @@
3530 <template name="feeds/atom/entries">
3631 <description>Atom feeds: Feed items</description>
3732 <part name="ITEM"><![CDATA[<entry>
38- <title type="html"><![CDATA[<%title%>]]]]><![CDATA[></title>
33+ <title type="text/html" mode="escaped"><![CDATA[<%title%>]]]]><![CDATA[></title>
3934 <link rel="alternate" type="text/html" href="<%blogurl%>?itemid=<%itemid%>" />
4035 <author>
4136 <name><%author%></name>
4237 </author>
43- <updated><%date(utc)%></updated>
44- <published><%date(iso8601)%></published>
45- <content type="html"><![CDATA[<%body%><%more%>]]]]><![CDATA[></content>
38+ <modified><%date(utc)%></modified>
39+ <issued><%date(iso8601)%></issued>
40+ <content type="text/html" mode="escaped"><![CDATA[<%body%><%more%>]]]]><![CDATA[></content>
4641 <id><%blogurl%>:<%blogid%>:<%itemid%></id>
4742 </entry>]]></part>
4843 <part name="IMAGE_CODE"><![CDATA[<%image%>]]></part>
--- a/euc/skins/default/default_left.css
+++ b/euc/skins/default/default_left.css
@@ -355,7 +355,6 @@ a:hover, a:active
355355 }
356356 .formfield
357357 {
358- display:block;
359358 font-size: 11px;
360359 background: white;
361360 color: #494949;
@@ -376,9 +375,6 @@ a:hover, a:active
376375 border-right: 1px solid #868686;
377376 margin: 1px 0 0 0;
378377 }
379-.commentform .formfield, .commentform .formbutton, .loginform .formbutton {
380- display: block;
381-}
382378 .searchform .formfield
383379 {
384380 width: 130px;
@@ -418,7 +414,7 @@ a:hover, a:active
418414 font-family: Tahoma, Arial, Trebuchet MS, Verdana, sans-serif;
419415 padding: 2px 2px;
420416 }
421-#nucleus_cf_name, #nucleus_cf_mail, #nucleus_cf_email
417+#nucleus_cf_name, #nucleus_cf_mail
422418 {
423419 width: 300px;
424420 margin-right: 105px;
--- a/euc/skins/default/default_right.css
+++ b/euc/skins/default/default_right.css
@@ -355,7 +355,6 @@ a:hover, a:active
355355 }
356356 .formfield
357357 {
358- display:block;
359358 font-size: 11px;
360359 background: white;
361360 color: #494949;
@@ -376,9 +375,6 @@ a:hover, a:active
376375 border-right: 1px solid #868686;
377376 margin: 1px 0 0 0;
378377 }
379-.commentform .formfield, .commentform .formbutton, .loginform .formbutton {
380- display: block;
381-}
382378 .searchform .formfield
383379 {
384380 width: 130px;
@@ -418,7 +414,7 @@ a:hover, a:active
418414 font-family: Tahoma, Arial, Trebuchet MS, Verdana, sans-serif;
419415 padding: 2px 2px;
420416 }
421-#nucleus_cf_name, #nucleus_cf_mail, #nucleus_cf_email
417+#nucleus_cf_name, #nucleus_cf_mail
422418 {
423419 width: 300px;
424420 margin-right: 105px;
--- a/euc/skins/default/head.inc
+++ b/euc/skins/default/head.inc
@@ -7,8 +7,8 @@
77
88 <!-- meta information for search engines -->
99 <meta name="generator" content="<%version%>" />
10-<meta name="name" content="<%if(skintype,error)%><%sitevar(name)%><%else%><%blogsetting(name)%><%endif%>" />
11-<meta name="description" content="<%if(skintype,error)%><%sitevar(name)%><%else%><%blogsetting(desc)%><%endif%>" />
10+<meta name="name" content="<%blogsetting(name)%>" />
11+<meta name="description" content="<%blogsetting(desc)%>" />
1212
1313 <!-- prevent caching (can be removed) -->
1414 <meta http-equiv="Pragma" content="no-cache" />
--- a/euc/skins/default/navigation.inc
+++ b/euc/skins/default/navigation.inc
@@ -53,4 +53,4 @@
5353 <link rel="top" title="Today" href="<%sitevar(url)%>" />
5454 <link rel="up" href="<%todaylink%>" title="Today" />
5555 <%endif%>
56-</head>
\ No newline at end of file
56+</head>
--- a/euc/skins/default/sidebar.inc
+++ b/euc/skins/default/sidebar.inc
@@ -5,16 +5,8 @@
55
66 <!-- archive: navigation -->
77 <%if(skintype,archive)%>
8-<%if(archiveprevexists)%>
98 <dd><a href="<%prevlink%>" title="Previous month">Previous <%archivetype%></a></dd>
10-<%else%>
11-<dd>&nbsp;</dd>
12-<%endif%>
13-<%if(archivenextexists)%>
149 <dd><a href="<%nextlink%>" title="Next month">Next <%archivetype%></a></dd>
15-<%else%>
16-<dd>&nbsp;</dd>
17-<%endif%>
1810 <dd><a href="<%todaylink%>" title="Today&#39;s entry">Today</a></dd>
1911 <dd><a href="<%archivelink%>" title="Archives">Archives</a></dd>
2012 <%endif%>
@@ -73,14 +65,6 @@
7365 </div>
7466 <%endif%><%endif%>
7567
76-<!-- bloglist-->
77-<div class="sidebar">
78-<dl class="sidebardl">
79-<dt>Blogs</dt>
80-<%bloglist(default/index)%>
81-</dl>
82-</div>
83-
8468 <!-- search form -->
8569 <div class="sidebar">
8670 <dl class="sidebardl">
--- a/euc/skins/default/skinbackup.xml
+++ b/euc/skins/default/skinbackup.xml
@@ -228,10 +228,6 @@ Website: <a href="<%member(url)%>"><%member(url)%></a>
228228 <a href="<%archivelink%>" title="Archive for %B, %Y">%B, %Y</a>
229229 </dd>]]></part>
230230
231- <part name="BLOGLIST_LISTITEM"><![CDATA[<dd>
232-<a href="<%bloglink%>" title="<%blogdesc%>"><%blogname%></a>
233-</dd>]]></part>
234-
235231 <part name="CATLIST_HEADER"><![CDATA[<dd>
236232 <a href="<%blogurl%>" title="All categories">All</a>
237233 </dd>]]></part>
--- a/euc/xml-rss2.php
+++ b/euc/xml-rss2.php
@@ -1,48 +1,47 @@
11 <?php
22
33 /*
4- * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
5- * Copyright (C) 2002-2007 The Nucleus Group
6- *
7- * This program is free software; you can redistribute it and/or
8- * modify it under the terms of the GNU General Public License
9- * as published by the Free Software Foundation; either version 2
10- * of the License, or (at your option) any later version.
11- * (see nucleus/documentation/index.html#license for more info)
4+ * Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
5+ * Copyright (C) 2002-2005 The Nucleus Group
6+ *
7+ * This program is free software; you can redistribute it and/or
8+ * modify it under the terms of the GNU General Public License
9+ * as published by the Free Software Foundation; either version 2
10+ * of the License, or (at your option) any later version.
11+ * (see nucleus/documentation/index.html#license for more info)
1212 */
1313
1414 /**
15- * Nucleus RSS syndication channel skin
15+ * Nucleus RSS syndication channel skin
1616 * @license http://nucleuscms.org/license.txt GNU General Public License
17- * @copyright Copyright (C) 2002-2007 The Nucleus Group
18- * @version $Id: xml-rss2.php,v 1.4.2.2 2007-03-27 11:26:50 kimitake Exp $
19- * $NucleusJP: xml-rss2.php,v 1.8 2007/02/04 06:28:44 kimitake Exp $
20- */
17+ * @copyright Copyright (C) 2002-2005 The Nucleus Group
18+ * @version $Id: xml-rss2.php,v 1.4.2.3 2007-03-27 11:46:50 kimitake Exp $
19+ * @version $NucleusJP: xml-rss2.php,v 1.4.2.1 2005/08/23 08:08:37 kimitake Exp $
20+ */
2121
22-header('Pragma: no-cache');
22+header("Pragma: no-cache");
2323
2424 $CONF = array();
25-$CONF['Self'] = 'xml-rss2.php';
25+$CONF['Self'] = "xml-rss2.php";
2626
2727 include('./config.php');
2828
2929 if (!$CONF['DisableSite']) {
30-
3130 // get feed into $feed
3231 ob_start();
33- selectSkin('feeds/rss20');
34- selector();
32+ selectSkin('feeds/rss20');
33+ selector();
3534 $feed = ob_get_contents();
3635 ob_end_clean();
37-
36+
3837 // create ETAG (hash of feed)
3938 // (HTTP_IF_NONE_MATCH has quotes around it)
40- $eTag = '"' . md5($feed) . '"';
41- header('Etag: ' . $eTag);
42-
39+ $eTag = '"'.md5($feed).'"';
40+ header('Etag: '.$eTag);
41+
4342 // compare Etag to what we got
44- if ($eTag == serverVar('HTTP_IF_NONE_MATCH') ) {
45- header('HTTP/1.0 304 Not Modified');
43+ if ($eTag == serverVar('HTTP_IF_NONE_MATCH')) {
44+ header("HTTP/1.0 304 Not Modified");
4645 header('Content-Length: 0');
4746 } else {
4847 $feed = mb_convert_encoding($feed, "UTF-8", "EUC-JP");
@@ -50,23 +49,23 @@ if (!$CONF['DisableSite']) {
5049 // dump feed
5150 echo $feed;
5251 }
53-
52+
5453 } else {
5554 // output empty RSS file...
5655 // (because site is disabled)
57-
58- echo '<' . '?xml version="1.0" encoding="' . _CHARSET . '"?' . '>';
59-
56+
57+ echo '<' . '?xml version="1.0" encoding="ISO-8859-1"?' . '>';
58+
6059 ?>
6160 <rss version="2.0">
62- <channel>
63- <title><?php echo htmlspecialchars($CONF['SiteName']); ?></title>
64- <link><?php echo htmlspecialchars($CONF['IndexURL']); ?></link>
65- <description></description>
66- <docs>http://backend.userland.com/rss</docs>
67- </channel>
68- </rss>
61+ <channel>
62+ <title><?php echo htmlspecialchars($CONF['SiteName'])?></title>
63+ <link><?php echo htmlspecialchars($CONF['IndexURL'])?></link>
64+ <description></description>
65+ <docs>http://backend.userland.com/rss</docs>
66+ </channel>
67+ </rss>
6968 <?php
7069 }
7170
72-?>
\ No newline at end of file
71+?>
Show on old repository browser