<?php\r
/*\r
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)\r
- * Copyright (C) 2002-2007 The Nucleus Group\r
+ * Copyright (C) 2002-2009 The Nucleus Group\r
*\r
* This program is free software; you can redistribute it and/or\r
* modify it under the terms of the GNU General Public License\r
* The code for the Nucleus admin area\r
*\r
* @license http://nucleuscms.org/license.txt GNU General Public License\r
- * @copyright Copyright (C) 2002-2007 The Nucleus Group\r
- * @version $Id: ADMIN.php,v 1.24 2008-02-08 09:31:22 kimitake Exp $\r
+ * @copyright Copyright (C) 2002-2009 The Nucleus Group\r
+ * @version $Id$\r
* @version $NucleusJP: ADMIN.php,v 1.21.2.4 2007/10/30 19:04:24 kmorimatsu Exp $\r
*/\r
\r
// check ticket. All actions need a ticket, unless they are considered to be safe (a safe action\r
// is an action that requires user interaction before something is actually done)\r
// all safe actions are in this array:\r
- $aActionsNotToCheck = array('showlogin', 'login', 'overview', 'itemlist', 'blogcommentlist', 'bookmarklet', 'blogsettings', 'banlist', 'deleteblog', 'editmembersettings', 'browseownitems', 'browseowncomments', 'createitem', 'itemedit', 'itemmove', 'categoryedit', 'categorydelete', 'manage', 'actionlog', 'settingsedit', 'backupoverview', 'pluginlist', 'createnewlog', 'usermanagement', 'skinoverview', 'templateoverview', 'skinieoverview', 'itemcommentlist', 'commentedit', 'commentdelete', 'banlistnewfromitem', 'banlistdelete', 'itemdelete', 'manageteam', 'teamdelete', 'banlistnew', 'memberedit', 'memberdelete', 'pluginhelp', 'pluginoptions', 'plugindelete', 'skinedittype', 'skinremovetype', 'skindelete', 'skinedit', 'templateedit', 'templatedelete', 'activate');\r
+ $aActionsNotToCheck = array(\r
+ 'showlogin',\r
+ 'login',\r
+ 'overview',\r
+ 'itemlist',\r
+ 'blogcommentlist',\r
+ 'bookmarklet',\r
+ 'blogsettings',\r
+ 'banlist',\r
+ 'deleteblog',\r
+ 'editmembersettings',\r
+ 'browseownitems',\r
+ 'browseowncomments',\r
+ 'createitem',\r
+ 'itemedit',\r
+ 'itemmove',\r
+ 'categoryedit',\r
+ 'categorydelete',\r
+ 'manage',\r
+ 'actionlog',\r
+ 'settingsedit',\r
+ 'backupoverview',\r
+ 'pluginlist',\r
+ 'createnewlog',\r
+ 'usermanagement',\r
+ 'skinoverview',\r
+ 'templateoverview',\r
+ 'skinieoverview',\r
+ 'itemcommentlist',\r
+ 'commentedit',\r
+ 'commentdelete',\r
+ 'banlistnewfromitem',\r
+ 'banlistdelete',\r
+ 'itemdelete',\r
+ 'manageteam',\r
+ 'teamdelete',\r
+ 'banlistnew',\r
+ 'memberedit',\r
+ 'memberdelete',\r
+ 'pluginhelp',\r
+ 'pluginoptions',\r
+ 'plugindelete',\r
+ 'skinedittype',\r
+ 'skinremovetype',\r
+ 'skindelete',\r
+ 'skinedit',\r
+ 'templateedit',\r
+ 'templatedelete',\r
+ 'activate',\r
+ 'systemoverview'\r
+ );\r
/*\r
// the rest of the actions needs to be checked\r
$aActionsToCheck = array('additem', 'itemupdate', 'itemmoveto', 'categoryupdate', 'categorydeleteconfirm', 'itemdeleteconfirm', 'commentdeleteconfirm', 'teamdeleteconfirm', 'memberdeleteconfirm', 'templatedeleteconfirm', 'skindeleteconfirm', 'banlistdeleteconfirm', 'plugindeleteconfirm', 'batchitem', 'batchcomment', 'batchmember', 'batchcategory', 'batchteam', 'regfile', 'commentupdate', 'banlistadd', 'changemembersettings', 'clearactionlog', 'settingsupdate', 'blogsettingsupdate', 'categorynew', 'teamchangeadmin', 'teamaddmember', 'memberadd', 'addnewlog', 'addnewlog2', 'backupcreate', 'backuprestore', 'pluginup', 'plugindown', 'pluginupdate', 'pluginadd', 'pluginoptionsupdate', 'skinupdate', 'skinclone', 'skineditgeneral', 'templateclone', 'templatenew', 'templateupdate', 'skinieimport', 'skinieexport', 'skiniedoimport', 'skinnew', 'deleteblogconfirm', 'sendping', 'rawping', 'activatesetpwd');\r
?>\r
\r
<form action="index.php" method="post"><p>\r
- <?php echo _LOGIN_NAME?>: <br /><input name="login" tabindex="10" />\r
+ <?php echo _LOGIN_NAME; ?> <br /><input name="login" tabindex="10" />\r
<br />\r
- <?php echo _LOGIN_PASSWORD?>: <br /><input name="password" tabindex="20" type="password" />\r
+ <?php echo _LOGIN_PASSWORD; ?> <br /><input name="password" tabindex="20" type="password" />\r
<br />\r
<input name="action" value="login" type="hidden" />\r
<br />\r
if (($showAll != 'yes') && ($member->isAdmin())) {\r
$total = quickQuery('SELECT COUNT(*) as result FROM ' . sql_table('blog'));\r
if ($total > $amount)\r
- echo '<p><a href="index.php?action=overview&showall=yes">Show all blogs</a></p>';\r
+ echo '<p><a href="index.php?action=overview&showall=yes">' . _OVERVIEW_SHOWALL . '</a></p>';\r
}\r
\r
if ($amount == 0)\r
* @todo document this\r
*/\r
function action_itemlist($blogid = '') {\r
- global $member, $manager;\r
+ global $member, $manager, $CONF;\r
\r
if ($blogid == '')\r
$blogid = intRequestVar('blogid');\r
// amount of items to show\r
if (postVar('amount'))\r
$amount = intPostVar('amount');\r
- else\r
- $amount = 10;\r
+ else {\r
+ $amount = intval($CONF['DefaultListSize']);\r
+ if ($amount < 1)\r
+ $amount = 10;\r
+ }\r
\r
$search = postVar('search'); // search through items\r
\r
* @todo document this\r
*/\r
function action_browseownitems() {\r
- global $member, $manager;\r
+ global $member, $manager, $CONF;\r
\r
$this->pagehead();\r
\r
// amount of items to show\r
if (postVar('amount'))\r
$amount = intPostVar('amount');\r
- else\r
- $amount = 10;\r
+ else {\r
+ $amount = intval($CONF['DefaultListSize']);\r
+ if ($amount < 1)\r
+ $amount = 10;\r
+ }\r
\r
$search = postVar('search'); // search through items\r
\r
* @param int $itemid\r
*/\r
function action_itemcommentlist($itemid = '') {\r
- global $member, $manager;\r
+ global $member, $manager, $CONF;\r
\r
if ($itemid == '')\r
$itemid = intRequestVar('itemid');\r
// amount of items to show\r
if (postVar('amount'))\r
$amount = intPostVar('amount');\r
- else\r
- $amount = 10;\r
+ else {\r
+ $amount = intval($CONF['DefaultListSize']);\r
+ if ($amount < 1)\r
+ $amount = 10;\r
+ }\r
\r
$search = postVar('search');\r
\r
echo '<p>(<a href="index.php?action=itemlist&blogid=',$blogid,'">',_BACKTOOVERVIEW,'</a>)</p>';\r
echo '<h2>',_COMMENTS,'</h2>';\r
\r
- $query = 'SELECT cbody, cuser, cmail, mname, ctime, chost, cnumber, cip, citem FROM '.sql_table('comment').' LEFT OUTER JOIN '.sql_table('member').' ON mnumber=cmember WHERE citem=' . $itemid;\r
+ $query = 'SELECT cbody, cuser, cmail, cemail, mname, ctime, chost, cnumber, cip, citem FROM ' . sql_table('comment') . ' LEFT OUTER JOIN ' . sql_table('member') . ' ON mnumber = cmember WHERE citem = ' . $itemid;\r
\r
if ($search)\r
$query .= ' and cbody LIKE "%' . addslashes($search) . '%"';\r
* Browse own comments\r
*/\r
function action_browseowncomments() {\r
- global $member, $manager;\r
+ global $member, $manager, $CONF;\r
\r
// start index\r
if (postVar('start'))\r
// amount of items to show\r
if (postVar('amount'))\r
$amount = intPostVar('amount');\r
- else\r
- $amount = 10;\r
+ else {\r
+ $amount = intval($CONF['DefaultListSize']);\r
+ if ($amount < 1)\r
+ $amount = 10;\r
+ }\r
\r
$search = postVar('search');\r
\r
*/\r
function action_blogcommentlist($blogid = '')\r
{\r
- global $member, $manager;\r
+ global $member, $manager, $CONF;\r
\r
if ($blogid == '')\r
$blogid = intRequestVar('blogid');\r
// amount of items to show\r
if (postVar('amount'))\r
$amount = intPostVar('amount');\r
- else\r
- $amount = 10;\r
+ else {\r
+ $amount = intval($CONF['DefaultListSize']);\r
+ if ($amount < 1)\r
+ $amount = 10;\r
+ }\r
\r
$search = postVar('search'); // search through comments\r
\r
$wasdraft: set to 1 when the item used to be a draft item\r
$publish: set to 1 when the edited item is not a draft\r
*/\r
- switch ($actiontype) {\r
- case 'adddraft':\r
- $publish = 0;\r
- $wasdraft = 1;\r
- $timestamp = 0;\r
- break;\r
- case 'addfuture':\r
- $wasdraft = 1;\r
- $publish = 1;\r
- $timestamp = mktime(postVar('hour'), postVar('minutes'), 0, postVar('month'), postVar('day'), postVar('year'));\r
- break;\r
- case 'addnow':\r
- $wasdraft = 1;\r
- $publish = 1;\r
- $timestamp = 0;\r
- break;\r
- case 'changedate':\r
- $timestamp = mktime(postVar('hour'), postVar('minutes'), 0, postVar('month'), postVar('day'), postVar('year'));\r
- $publish = 1;\r
- $wasdraft = 0;\r
- break;\r
- case 'edit':\r
- default:\r
- $publish = 1;\r
- $wasdraft = 0;\r
- $timestamp = 0;\r
+ $blogid = getBlogIDFromItemID($itemid);\r
+ $blog =& $manager->getBlog($blogid);\r
+\r
+ $wasdrafts = array('adddraft', 'addfuture', 'addnow');\r
+ $wasdraft = in_array($actiontype, $wasdrafts) ? 1 : 0;\r
+ $publish = ($actiontype != 'adddraft' && $actiontype != 'backtodrafts') ? 1 : 0;\r
+ if ($actiontype == 'addfuture' || $actiontype == 'changedate') {\r
+ $timestamp = mktime(intPostVar('hour'), intPostVar('minutes'), 0, intPostVar('month'), intPostVar('day'), intPostVar('year'));\r
+ } else {\r
+ $timestamp =0;\r
}\r
+ $doping = ($publish && $timestamp < $blog->getCorrectTime() && postVar('dosendping')) ? 1 : 0;\r
\r
// edit the item for real\r
ITEM::update($itemid, $catid, $title, $body, $more, $closed, $wasdraft, $publish, $timestamp);\r
\r
- $blogid = getBlogIDFromItemID($itemid);\r
- $blog =& $manager->getBlog($blogid);\r
-\r
- $isFuture = 0;\r
- if ($timestamp > $blog->getCorrectTime(time())) {\r
- $isFuture = 1;\r
- }\r
-\r
$this->updateFuturePosted($blogid);\r
\r
if ($draftid > 0) {\r
ITEM::delete($draftid);\r
}\r
\r
- if (!$closed && $publish && $wasdraft && $blog->sendPing() && numberOfEventSubscriber('SendPing') > 0 && !$isFuture) {\r
+// if (!$closed && $publish && $wasdraft && $blog->sendPing() && numberOfEventSubscriber('SendPing') > 0 && !$isFuture) {\r
+ if (!$closed && $doping && $blog->sendPing() && numberOfEventSubscriber('SendPing') > 0) { //<mod by shizuki />\r
$this->action_sendping($blogid);\r
return;\r
}\r
\r
$blogid = getBlogIDFromItemID($result['itemid']);\r
$blog =& $manager->getBlog($blogid);\r
-\r
- $pingUrl = $manager->addTicketToUrl($CONF['AdminURL'] . 'index.php?action=sendping&blogid=' . intval($blogid));\r
-\r
- if ($result['status'] == 'newcategory')\r
- $this->action_categoryedit(\r
- $result['catid'],\r
- $blogid,\r
- $blog->sendPing() && numberOfEventSubscriber('SendPing') > 0 ? $pingUrl : ''\r
- );\r
- elseif ((postVar('actiontype') == 'addnow') && $blog->sendPing() && numberOfEventSubscriber('SendPing') > 0)\r
- $this->action_sendping($blogid);\r
- else\r
- $this->action_itemlist($blogid);\r
+ $btimestamp = $blog->getCorrectTime();\r
+ $item = $manager->getItem(intval($result['itemid']), 1, 1);\r
+ $iPingInfo = (!$item['draft'] && postVar('dosendping') && $item['timestamp'] <= $btimestamp);\r
+ if ($iPingInfo && $bPingInfo) {\r
+ $nextAction = 'sendping';\r
+ } else {\r
+ $nextAction = 'itemlist';\r
+ }\r
+ if ($result['status'] == 'newcategory') {\r
+ $distURI = $manager->addTicketToUrl($CONF['AdminURL'] . 'index.php?action=' . $nextAction . '&blogid=' . intval($blogid));\r
+ $this->action_categoryedit($result['catid'], $blogid, $distURI);\r
+ } else {\r
+ $methodName = 'action_' . $nextAction;\r
+ call_user_func(array(&$this, $methodName), $blogid);\r
+ }\r
}\r
\r
/**\r
$rawPingUrl = $manager->addTicketToUrl('index.php?action=rawping&blogid=' . intval($blogid));\r
\r
$this->pagehead('<meta http-equiv="refresh" content="1; url='.htmlspecialchars($rawPingUrl).'" />');\r
+ echo _UPDATEDPING_MESSAGE;\r
?>\r
- <h2>Site Updated, Now pinging various weblog listing services...</h2>\r
-\r
- <p>\r
- This can take a while...\r
+ <a href="index.php?action=rawping&blogid=<?php echo $blogid?>"><?php echo _UPDATEDPING_GOPINGPAGE ?></a>\r
</p>\r
-\r
- <p>\r
- If you aren't automatically passed through, <a href="index.php?action=rawping&blogid=<?php echo $blogid?>">try again</a>\r
- </p>\r
- <?php $this->pagefoot();\r
+ <?php\r
+ $this->pagefoot();\r
}\r
\r
/**\r
\r
?>\r
\r
- <h2>Pinging services, please wait...</h2>\r
+ <h2><?php echo _UPDATEDPING_PINGING ?></h2>\r
<div class='note'>\r
<?php\r
\r
</div>\r
\r
<ul>\r
- <li><a href="index.php?action=itemlist&blogid=<?php echo $blog->getID()?>">View list of recent items for <?php echo htmlspecialchars($blog->getName())?></a></li>\r
- <li><a href="<?php echo $blog->getURL()?>">Visit your own site</a></li>\r
+ <li><a href="index.php?action=itemlist&blogid=<?php echo $blog->getID()?>"><?php echo _UPDATEDPING_VIEWITEM . htmlspecialchars($blog->getName())?></a></li>\r
+ <li><a href="<?php echo $blog->getURL()?>"><?php echo _UPDATEDPING_VISITOWNSITE ?></a></li>\r
</ul>\r
\r
<?php $this->pagefoot();\r
</tr><tr>\r
<td><?php echo _EDITC_HOST?></td>\r
<td><?php echo $comment['host']; ?></td>\r
- </tr><tr>\r
+ </tr>\r
+ <tr>\r
+ <td><?php echo _EDITC_URL; ?></td>\r
+ <td><input type="text" name="url" size="30" tabindex="6" value="<?php echo $comment['userid']; ?>" /></td>\r
+ </tr>\r
+ <tr>\r
+ <td><?php echo _EDITC_EMAIL; ?></td>\r
+ <td><input type="text" name="email" size="30" tabindex="8" value="<?php echo $comment['email']; ?>" /></td>\r
+ </tr>\r
+ <tr>\r
<td><?php echo _EDITC_TEXT?></td>\r
<td>\r
<textarea name="body" tabindex="10" rows="10" cols="50"><?php // htmlspecialchars not needed (things should be escaped already)\r
\r
$member->canAlterComment($commentid) or $this->disallow();\r
\r
+ $url = postVar('url');\r
+ $email = postVar('email');\r
$body = postVar('body');\r
\r
// intercept words that are too long\r
$manager->notify('PreUpdateComment',array('body' => &$body));\r
\r
$query = 'UPDATE '.sql_table('comment')\r
- . " SET cbody='" .addslashes($body). "'"\r
+ . " SET cmail = '" . addslashes($url) . "', cemail = '" . addslashes($email) . "', cbody = '" . addslashes($body) . "'"\r
. " WHERE cnumber=" . $commentid;\r
sql_query($query);\r
\r
\r
</td>\r
</tr>\r
+ <tr>\r
+ <td><?php echo _MEMBERS_USEAUTOSAVE?> <?php help('autosave'); ?></td>\r
+ <td><?php $this->input_yesno('autosave', $mem->getAutosave(), 87); ?></td>\r
+ </tr>\r
<?php\r
// plugin options\r
$this->_insertPluginOptions('member',$memberid);\r
$mem->setCanLogin($canlogin);\r
}\r
\r
+ $autosave = postVar ('autosave');\r
+ $mem->setAutosave($autosave);\r
\r
$mem->write();\r
\r
\r
// check if: - there remains at least one blog admin\r
// - (there remains at least one team member)\r
- $mem = MEMBER::createFromID($memberid);\r
+ $tmem = MEMBER::createFromID($memberid);\r
\r
- $manager->notify('PreDeleteTeamMember', array('member' => &$mem, 'blogid' => $blogid));\r
+ $manager->notify('PreDeleteTeamMember', array('member' => &$tmem, 'blogid' => $blogid));\r
\r
- if ($mem->isBlogAdmin($blogid)) {\r
+ if ($tmem->isBlogAdmin($blogid)) {\r
// check if there are more blog members left and at least one admin\r
// (check for at least two admins before deletion)\r
$query = 'SELECT * FROM '.sql_table('team') . ' WHERE tblog='.$blogid.' and tadmin=1';\r
$query = 'DELETE FROM '.sql_table('team')." WHERE tblog=$blogid and tmember=$memberid";\r
sql_query($query);\r
\r
- $manager->notify('PostDeleteTeamMember', array('member' => &$mem, 'blogid' => $blogid));\r
+ $manager->notify('PostDeleteTeamMember', array('member' => &$tmem, 'blogid' => $blogid));\r
\r
return '';\r
}\r
\r
<h3><?php echo _EBLOG_TEAM_TITLE?></h3>\r
\r
- <p>Members currently on your team:\r
+ <p><?php echo _EBLOG_CURRENT_TEAM_MEMBER; ?>\r
<?php\r
$res = sql_query('SELECT mname, mrealname FROM ' . sql_table('member') . ',' . sql_table('team') . ' WHERE mnumber=tmember AND tblog=' . intval($blogid));\r
$aMemberNames = array();\r
</p>\r
\r
<p>\r
- Please note that media files will <b>NOT</b> be deleted. (At least not in this Nucleus version)\r
+ <?php echo _WARNINGTXT_NOTDELMEDIAFILES ?>\r
</p>\r
\r
<form method="post" action="index.php"><div>\r
$manager->notify('PreDeleteMember', array('member' => &$mem));\r
\r
/* unlink comments from memberid */\r
- $query = 'UPDATE ' . sql_table('comment') . ' SET cmember="0", cuser="'. addslashes($mem->getDisplayName())\r
- .'" WHERE cmember='.$memberid;\r
- sql_query($query);\r
+ if ($memberid) {\r
+ $query = 'UPDATE ' . sql_table('comment') . ' SET cmember="0", cuser="'. addslashes($mem->getDisplayName())\r
+ .'" WHERE cmember='.$memberid;\r
+ sql_query($query);\r
+ }\r
\r
$query = 'DELETE FROM '.sql_table('member').' WHERE mnumber='.$memberid;\r
sql_query($query);\r
?>\r
<h2><?php echo _EBLOG_CREATE_TITLE?></h2>\r
\r
- <h3>注意事項</h3>\r
+ <h3><?php echo _ADMIN_NOTABILIA ?></h3>\r
\r
- <p>作成にあたって、下記の<strong>注意事項</strong> をまずお読み下さい</p>\r
+ <p><?php echo _ADMIN_PLEASE_READ ?></p>\r
\r
- <p>新しいweblogを作成した後に、このblogにアクセスするための方法を紹介しておきます。方法は2つあります:</p>\r
+ <p><?php echo _ADMIN_HOW_TO_ACCESS ?></p>\r
\r
<ol>\r
- <li><strong>簡単な方法:</strong> <code>index.php</code>の複製を作り、新しいblogを表示するように変更を加えます。 この変更の詳細は、作成後に表示されます。</li>\r
- <li><strong>高度な方法:</strong> 現在のblogで使用しているスキンに<code>otherblog</code>というコードを使った記述を加えます。この方法では、同じページ内で複数のblogを展開することが可能となります。</li>\r
+ <li><?php echo _ADMIN_SIMPLE_WAY ?></li>\r
+ <li><?php echo _ADMIN_ADVANCED_WAY ?></li>\r
</ol>\r
\r
- <h3>Weblogの作成</h3>\r
+ <h3><?php echo _ADMIN_HOW_TO_CREATE ?></h3>\r
\r
<p>\r
<?php echo _EBLOG_CREATE_TEXT?>\r
$manager->notify(\r
'PreAddBlog',\r
array(\r
- 'name' => &$bname,\r
- 'shortname' => &$bshortname,\r
- 'timeoffset' => &$btimeoffset,\r
+ 'name' => &$bname,\r
+ 'shortname' => &$bshortname,\r
+ 'timeoffset' => &$btimeoffset,\r
'description' => &$bdesc,\r
'defaultskin' => &$bdefskin\r
)\r
\r
\r
// add slashes for sql queries\r
- $bname = addslashes($bname);\r
- $bshortname = addslashes($bshortname);\r
- $btimeoffset = addslashes($btimeoffset);\r
- $bdesc = addslashes($bdesc);\r
- $bdefskin = addslashes($bdefskin);\r
+ $bname = addslashes($bname);\r
+ $bshortname = addslashes($bshortname);\r
+ $btimeoffset = addslashes($btimeoffset);\r
+ $bdesc = addslashes($bdesc);\r
+ $bdefskin = addslashes($bdefskin);\r
\r
// create blog\r
$query = 'INSERT INTO '.sql_table('blog')." (bname, bshortname, bdesc, btimeoffset, bdefskin) VALUES ('$bname', '$bshortname', '$bdesc', '$btimeoffset', '$bdefskin')";\r
$blog =& $manager->getBlog($blogid);\r
\r
// create new category\r
- sql_query('INSERT INTO '.sql_table('category')." (cblog, cname, cdesc) VALUES ($blogid, 'General','Items that do not fit in other categories')");\r
+ $sql = 'INSERT INTO %s (cblog, cname, cdesc) VALUES (%d, "%s", "%s")';\r
+ sql_query(sprintf($sql, sql_table('category'), $blogid, _EBLOGDEFAULTCATEGORY_NAME, _EBLOGDEFAULTCATEGORY_DESC));\r
+// sql_query('INSERT INTO '.sql_table('category')." (cblog, cname, cdesc) VALUES ($blogid, _EBLOGDEFAULTCATEGORY_NAME, _EBLOGDEFAULTCATEGORY_DESC)");\r
$catid = mysql_insert_id();\r
\r
// set as default category\r
sql_query($query);\r
\r
\r
- $blog->additem($blog->getDefaultCategory(),'First Item','これはあなたのweblogにおける最初のアイテムです。自由に削除していただいてかまいません。','',$blogid, $memberid,$blog->getCorrectTime(),0,0,0);\r
+ $blog->additem($blog->getDefaultCategory(),_EBLOG_FIRSTITEM_TITLE,_EBLOG_FIRSTITEM_BODY,'',$blogid, $memberid,$blog->getCorrectTime(),0,0,0);\r
\r
$manager->notify(\r
'PostAddBlog',\r
$manager->notify(\r
'PostAddCategory',\r
array(\r
- 'blog' => &$blog,\r
- 'name' => 'General',\r
- 'description' => 'Items that do not fit in other categories',\r
- 'catid' => $catid\r
+ 'blog' => &$blog,\r
+ 'name' => _EBLOGDEFAULTCATEGORY_NAME,\r
+ 'description' => _EBLOGDEFAULTCATEGORY_DESC,\r
+ 'catid' => $catid\r
)\r
);\r
\r
$this->pagehead();\r
?>\r
- <h2>新しいweblogが作成されました</h2>\r
+ <h2><?php echo _BLOGCREATED_TITLE ?></h2>\r
\r
- <p>新しいweblog 「<?php echo htmlspecialchars($bname)?>」が作成されました。続けて、これにアクセスするために以下のどちらかの手順に進んでください。</p>\r
+ <p><?php echo sprintf(_BLOGCREATED_ADDEDTXT, htmlspecialchars($bname)) ?></p>\r
\r
<ol>\r
- <li><a href="#index_php">簡単な方法: 下のコードを貼付けた <code><?php echo htmlspecialchars($bshortname)?>.php</code> というファイルを作成する</a></li>\r
- <li><a href="#skins">高度な方法: 現在使用しているスキンに新しいweblogを展開させるための記述を加える</a></li>\r
+ <li><a href="#index_php"><?php echo sprintf(_BLOGCREATED_SIMPLEWAY, htmlspecialchars($bshortname)) ?></a></li>\r
+ <li><a href="#skins"><?php echo _BLOGCREATED_ADVANCEDWAY ?></a></li>\r
</ol>\r
\r
- <h3><a id="index_php">方法 1: <code><?php echo htmlspecialchars($bshortname)?>.php</code> というファイルを作成</a></h3>\r
+ <h3><a id="index_php"><?php echo sprintf(_BLOGCREATED_SIMPLEDESC1, htmlspecialchars($bshortname)) ?></a></h3>\r
\r
- <p><code><?php echo htmlspecialchars($bshortname)?>.php</code> というファイルを作成して、中身に以下のコードを貼り付ける:</p>\r
+ <p><?php echo sprintf(_BLOGCREATED_SIMPLEDESC2, htmlspecialchars($bshortname)) ?></p>\r
<pre><code><?php\r
\r
$CONF['Self'] = '<b><?php echo htmlspecialchars($bshortname)?>.php</b>';\r
\r
?></code></pre>\r
\r
- <p>すでにある<code>index.php</code>と同じディレクトリにアップロードします。</p>\r
+ <p><?php echo _BLOGCREATED_SIMPLEDESC3 ?></p>\r
\r
- <p>新しいweblogの作成を完了するためには、下にこのファイルのURLを入力してください。 (すでに用意した値で合っているとは思いますが保証はしません):</p>\r
+ <p><?php echo _BLOGCREATED_SIMPLEDESC4 ?></p>\r
\r
<form action="index.php" method="post"><div>\r
<input type="hidden" name="action" value="addnewlog2" />\r
</tr></table>\r
</div></form>\r
\r
- <h3><a id="skins">方法 2: 現在使用しているスキンに新しいweblogを展開する記述を加える</a></h3>\r
+ <h3><a id="skins"><?php echo _BLOGCREATED_ADVANCEDWAY2 ?></a></h3>\r
\r
- <p>新しいweblogの作成を完了するためには、下にURLを入力してください。 (大抵は既存blogと同じURL)</p>\r
+ <p><?php echo _BLOGCREATED_ADVANCEDWAY3 ?></p>\r
\r
<form action="index.php" method="post"><div>\r
<input type="hidden" name="action" value="addnewlog2" />\r
?>\r
</tr><tr>\r
<th colspan="2"><?php echo _TEMPLATE_CATEGORYLIST?> <?php help('templatecategorylists'); ?></th>\r
-<?php $this->_templateEditRow($template, _TEMPLATE_CATHEADER, 'CATLIST_HEADER', '', 160);\r
- $this->_templateEditRow($template, _TEMPLATE_CATITEM, 'CATLIST_LISTITEM', '', 170);\r
- $this->_templateEditRow($template, _TEMPLATE_CATFOOTER, 'CATLIST_FOOTER', '', 180);\r
+<?php $this->_templateEditRow($template, _TEMPLATE_CATHEADER, 'CATLIST_HEADER', '', 190);\r
+ $this->_templateEditRow($template, _TEMPLATE_CATITEM, 'CATLIST_LISTITEM', '', 200);\r
+ $this->_templateEditRow($template, _TEMPLATE_CATFOOTER, 'CATLIST_FOOTER', '', 210);\r
?>\r
</tr><tr>\r
<th colspan="2"><?php echo _TEMPLATE_DATETIME?></th>\r
-<?php $this->_templateEditRow($template, _TEMPLATE_DHEADER, 'DATE_HEADER', 'dateheads', 190);\r
- $this->_templateEditRow($template, _TEMPLATE_DFOOTER, 'DATE_FOOTER', 'dateheads', 200);\r
- $this->_templateEditRow($template, _TEMPLATE_DFORMAT, 'FORMAT_DATE', 'datetime', 210);\r
- $this->_templateEditRow($template, _TEMPLATE_TFORMAT, 'FORMAT_TIME', 'datetime', 220);\r
- $this->_templateEditRow($template, _TEMPLATE_LOCALE, 'LOCALE', 'locale', 230);\r
+<?php $this->_templateEditRow($template, _TEMPLATE_DHEADER, 'DATE_HEADER', 'dateheads', 220);\r
+ $this->_templateEditRow($template, _TEMPLATE_DFOOTER, 'DATE_FOOTER', 'dateheads', 230);\r
+ $this->_templateEditRow($template, _TEMPLATE_DFORMAT, 'FORMAT_DATE', 'datetime', 240);\r
+ $this->_templateEditRow($template, _TEMPLATE_TFORMAT, 'FORMAT_TIME', 'datetime', 250);\r
+ $this->_templateEditRow($template, _TEMPLATE_LOCALE, 'LOCALE', 'locale', 260);\r
?>\r
</tr><tr>\r
<th colspan="2"><?php echo _TEMPLATE_IMAGE?> <?php help('templatepopups'); ?></th>\r
-<?php $this->_templateEditRow($template, _TEMPLATE_PCODE, 'POPUP_CODE', '', 240);\r
- $this->_templateEditRow($template, _TEMPLATE_ICODE, 'IMAGE_CODE', '', 250);\r
- $this->_templateEditRow($template, _TEMPLATE_MCODE, 'MEDIA_CODE', '', 260);\r
+<?php $this->_templateEditRow($template, _TEMPLATE_PCODE, 'POPUP_CODE', '', 270);\r
+ $this->_templateEditRow($template, _TEMPLATE_ICODE, 'IMAGE_CODE', '', 280);\r
+ $this->_templateEditRow($template, _TEMPLATE_MCODE, 'MEDIA_CODE', '', 290);\r
?>\r
</tr><tr>\r
<th colspan="2"><?php echo _TEMPLATE_SEARCH?></th>\r
-<?php $this->_templateEditRow($template, _TEMPLATE_SHIGHLIGHT, 'SEARCH_HIGHLIGHT', 'highlight',270);\r
- $this->_templateEditRow($template, _TEMPLATE_SNOTFOUND, 'SEARCH_NOTHINGFOUND', 'nothingfound',280);\r
+<?php $this->_templateEditRow($template, _TEMPLATE_SHIGHLIGHT, 'SEARCH_HIGHLIGHT', 'highlight',300);\r
+ $this->_templateEditRow($template, _TEMPLATE_SNOTFOUND, 'SEARCH_NOTHINGFOUND', 'nothingfound',310);\r
+?>\r
+ </tr><tr>\r
+ <th colspan="2"><?php echo _TEMPLATE_PLUGIN_FIELDS?></th>\r
+<?php\r
+ $tab = 600;\r
+ $pluginfields = array();\r
+ $manager->notify('TemplateExtraFields',array('fields'=>&$pluginfields));\r
+\r
+ foreach ($pluginfields as $pfkey=>$pfvalue) {\r
+ echo "</tr><tr>\n";\r
+ echo '<th colspan="2">'.htmlentities($pfkey)."</th>\n";\r
+ foreach ($pfvalue as $pffield=>$pfdesc) {\r
+ $this->_templateEditRow($template, $pfdesc, $pffield, '',++$tab,0);\r
+ }\r
+ }\r
?>\r
</tr><tr>\r
<th colspan="2"><?php echo _TEMPLATE_UPDATE?></th>\r
</tr><tr>\r
<td><?php echo _TEMPLATE_UPDATE?></td>\r
<td>\r
- <input type="submit" tabindex="290" value="<?php echo _TEMPLATE_UPDATE_BTN?>" onclick="return checkSubmit();" />\r
- <input type="reset" tabindex="300" value="<?php echo _TEMPLATE_RESET_BTN?>" />\r
+ <input type="submit" tabindex="800" value="<?php echo _TEMPLATE_UPDATE_BTN?>" onclick="return checkSubmit();" />\r
+ <input type="reset" tabindex="810" value="<?php echo _TEMPLATE_RESET_BTN?>" />\r
</td>\r
</tr></table>\r
\r
*/\r
function _templateEditRow(&$template, $description, $name, $help = '', $tabindex = 0, $big = 0) {\r
static $count = 1;\r
+ if (!isset($template[$name])) $template[$name] = '';\r
?>\r
</tr><tr>\r
<td><?php echo $description?> <?php if ($help) help('template'.$help); ?></td>\r
* @todo document this\r
*/\r
function action_templateupdate() {\r
- global $member;\r
+ global $member, $manager;\r
\r
$templateid = intRequestVar('templateid');\r
\r
$this->addToTemplate($templateid, 'MEDIA_CODE', postVar('MEDIA_CODE'));\r
$this->addToTemplate($templateid, 'IMAGE_CODE', postVar('IMAGE_CODE'));\r
\r
+ $pluginfields = array();\r
+ $manager->notify('TemplateExtraFields',array('fields'=>&$pluginfields));\r
+ foreach ($pluginfields as $pfkey=>$pfvalue) {\r
+ foreach ($pfvalue as $pffield=>$pfdesc) {\r
+ $this->addToTemplate($templateid, $pffield, postVar($pffield));\r
+ }\r
+ }\r
\r
// jump back to template edit\r
$this->action_templateedit(_TEMPLATE_UPDATED);\r
\r
$query = 'INSERT INTO '.sql_table('template')." (tdesc, tpartname, tcontent) "\r
. "VALUES ($id, '$partname', '$content')";\r
- sql_query($query) or die("Query error: " . mysql_error());\r
+ sql_query($query) or exit(_ADMIN_SQLDIE_QUERYERROR . mysql_error());\r
return mysql_insert_id();\r
}\r
\r
echo helplink('skinvar-' . $current) . "$current</a>";\r
if (count($actions) != 0) echo ", ";\r
}\r
- ?>\r
- <br /><br />\r
- Short blog names:\r
- <?php $query = 'SELECT bshortname, bname FROM '.sql_table('blog');\r
+ echo '<br /><br />' . _SKINEDIT_ALLOWEDBLOGS;\r
+ $query = 'SELECT bshortname, bname FROM '.sql_table('blog');\r
showlist($query,'table',array('content'=>'shortblognames'));\r
- ?>\r
-\r
- <br />\r
- Template names:\r
- <?php $query = 'SELECT tdname as name, tddesc as description FROM '.sql_table('template_desc');\r
+ echo '<br />' . _SKINEDIT_ALLOWEDTEMPLATESS;\r
+ $query = 'SELECT tdname as name, tddesc as description FROM '.sql_table('template_desc');\r
showlist($query,'table',array('content'=>'shortnames'));\r
- ?>\r
-\r
-\r
- </div>\r
- </form>\r
-\r
-\r
- <?php $this->pagefoot();\r
+ echo '</div></form>';\r
+ $this->pagefoot();\r
}\r
\r
/**\r
</td>\r
<td><?php $this->input_yesno('DisableSite',$CONF['DisableSite'],10060); ?>\r
<br />\r
- URL: <input name="DisableSiteURL" tabindex="10070" size="40" value="<?php echo htmlspecialchars($CONF['DisableSiteURL'])?>" />\r
+ <?php echo _SETTINGS_DISABLESITEURL ?> <input name="DisableSiteURL" tabindex="10070" size="40" value="<?php echo htmlspecialchars($CONF['DisableSiteURL'])?>" />\r
</td>\r
</tr><tr>\r
<td><?php echo _SETTINGS_DIRS?></td>\r
\r
</td>\r
</tr><tr>\r
+ <td><?php echo _SETTINGS_DEBUGVARS?> <?php help('debugvars');?></td>\r
+ <td><?php\r
+\r
+ $this->input_yesno('DebugVars',$CONF['DebugVars'],10078);\r
+\r
+ ?>\r
+\r
+ </td>\r
+ </tr><tr>\r
+ <td><?php echo _SETTINGS_DEFAULTLISTSIZE?> <?php help('defaultlistsize');?></td>\r
+ <td>\r
+ <?php\r
+ if (!array_key_exists('DefaultListSize',$CONF)) {\r
+ sql_query("INSERT INTO ".sql_table('config')." VALUES ('DefaultListSize', '10')");\r
+ $CONF['DefaultListSize'] = 10;\r
+ }\r
+ ?>\r
+ <input name="DefaultListSize" tabindex="10079" size="40" value="<?php echo htmlspecialchars((intval($CONF['DefaultListSize']) < 1 ? '10' : $CONF['DefaultListSize'])) ?>" />\r
+ </td>\r
+ </tr><tr>\r
<th colspan="2"><?php echo _SETTINGS_MEDIA?> <?php help('media'); ?></th>\r
</tr><tr>\r
<td><?php echo _SETTINGS_MEDIADIR?></td>\r
$this->updateConfig('CookieSecure', postVar('CookieSecure'));\r
$this->updateConfig('URLMode', postVar('URLMode'));\r
$this->updateConfig('CookiePrefix', postVar('CookiePrefix'));\r
+ $this->updateConfig('DebugVars', postVar('DebugVars'));\r
+ $this->updateConfig('DefaultListSize', postVar('DefaultListSize'));\r
\r
// load new config and redirect (this way, the new language will be used is necessary)\r
// note that when changing cookie settings, this redirect might cause the user\r
}\r
\r
/**\r
+ * Give an overview over the used system\r
+ */\r
+ function action_systemoverview() {\r
+ global $member, $nucleus, $CONF;\r
+\r
+ $this->pagehead();\r
+\r
+ echo '<h2>' . _ADMIN_SYSTEMOVERVIEW_HEADING . "</h2>\n";\r
+\r
+ if ($member->isLoggedIn() && $member->isAdmin()) {\r
+\r
+ // Information about the used PHP and MySQL installation\r
+ echo '<h3>' . _ADMIN_SYSTEMOVERVIEW_PHPANDMYSQL . "</h3>\n";\r
+\r
+ // Version of PHP MySQL\r
+ echo "<table>\n";\r
+ echo "\t<tr>\n";\r
+ echo "\t\t" . '<th colspan="2">' . _ADMIN_SYSTEMOVERVIEW_VERSIONS . "</th>\n";\r
+ echo "\t</tr><tr>\n";\r
+ echo "\t\t" . '<td width="50%">' . _ADMIN_SYSTEMOVERVIEW_PHPVERSION . "</td>\n";\r
+ echo "\t\t" . '<td>' . phpversion() . "</td>\n";\r
+ echo "\t</tr><tr>\n";\r
+ echo "\t\t" . '<td>' . _ADMIN_SYSTEMOVERVIEW_MYSQLVERSION . "</td>\n";\r
+ echo "\t\t" . '<td>' . mysql_get_server_info() . ' (' . mysql_get_client_info() . ')' . "</td>\n";\r
+ echo "\t</tr>";\r
+ echo "</table>\n";\r
+\r
+ // Important PHP settings\r
+ echo "<table>\n";\r
+ echo "\t<tr>\n";\r
+ echo "\t\t" . '<th colspan="2">' . _ADMIN_SYSTEMOVERVIEW_SETTINGS . "</th>\n";\r
+ echo "\t</tr><tr>\n";\r
+ echo "\t\t" . '<td width="50%">magic_quotes_gpc' . "</td>\n";\r
+ $mqg = get_magic_quotes_gpc() ? 'On' : 'Off';\r
+ echo "\t\t" . '<td>' . $mqg . "</td>\n";\r
+ echo "\t</tr><tr>\n";\r
+ echo "\t\t" . '<td>magic_quotes_runtime' . "</td>\n";\r
+ $mqr = get_magic_quotes_runtime() ? 'On' : 'Off';\r
+ echo "\t\t" . '<td>' . $mqr . "</td>\n";\r
+ echo "\t</tr><tr>\n";\r
+ echo "\t\t" . '<td>register_globals' . "</td>\n";\r
+ $rg = ini_get('register_globals') ? 'On' : 'Off';\r
+ echo "\t\t" . '<td>' . $rg . "</td>\n";\r
+ echo "\t</tr>";\r
+ echo "</table>\n";\r
+\r
+ // Information about GD library\r
+ $gdinfo = gd_info();\r
+ echo "<table>\n";\r
+ echo "\t<tr>";\r
+ echo "\t\t" . '<th colspan="2">' . _ADMIN_SYSTEMOVERVIEW_GDLIBRALY . "</th>\n";\r
+ echo "\t</tr>\n";\r
+ foreach ($gdinfo as $key=>$value) {\r
+ if (is_bool($value)) {\r
+ $value = $value ? _ADMIN_SYSTEMOVERVIEW_ENABLE : _ADMIN_SYSTEMOVERVIEW_DISABLE;\r
+ } else {\r
+ $value = htmlspecialchars($value, ENT_QUOTES);\r
+ }\r
+ echo "\t<tr>";\r
+ echo "\t\t" . '<td width="50%">' . $key . "</td>\n";\r
+ echo "\t\t" . '<td>' . $value . "</td>\n";\r
+ echo "\t</tr>\n";\r
+ }\r
+ echo "</table>\n";\r
+\r
+ // Check if special modules are loaded\r
+ ob_start();\r
+ phpinfo(INFO_MODULES);\r
+ $im = ob_get_contents();\r
+ ob_clean();\r
+ echo "<table>\n";\r
+ echo "\t<tr>";\r
+ echo "\t\t" . '<th colspan="2">' . _ADMIN_SYSTEMOVERVIEW_MODULES . "</th>\n";\r
+ echo "\t</tr><tr>\n";\r
+ echo "\t\t" . '<td width="50%">mod_rewrite' . "</td>\n";\r
+ $modrewrite = (strstr($im, 'mod_rewrite') != '') ?\r
+ _ADMIN_SYSTEMOVERVIEW_ENABLE :\r
+ _ADMIN_SYSTEMOVERVIEW_DISABLE;\r
+ echo "\t\t" . '<td>' . $modrewrite . "</td>\n";\r
+ echo "\t</tr>\n";\r
+ echo "</table>\n";\r
+\r
+ // Information about the used Nucleus CMS\r
+ echo '<h3>' . _ADMIN_SYSTEMOVERVIEW_NUCLEUSSYSTEM . "</h3>\n";\r
+ global $nucleus;\r
+ $nv = getNucleusVersion() / 100 . '(' . $nucleus['version'] . ')';\r
+ $np = getNucleusPatchLevel();\r
+ echo "<table>\n";\r
+ echo "\t<tr>";\r
+ echo "\t\t" . '<th colspan="2">Nucleus CMS' . "</th>\n";\r
+ echo "\t</tr><tr>\n";\r
+ echo "\t\t" . '<td width="50%">' . _ADMIN_SYSTEMOVERVIEW_NUCLEUSVERSION . "</td>\n";\r
+ echo "\t\t" . '<td>' . $nv . "</td>\n";\r
+ echo "\t</tr><tr>\n";\r
+ echo "\t\t" . '<td width="50%">' . _ADMIN_SYSTEMOVERVIEW_NUCLEUSPATCHLEVEL . "</td>\n";\r
+ echo "\t\t" . '<td>' . $np . "</td>\n";\r
+ echo "\t</tr>\n";\r
+ echo "</table>\n";\r
+\r
+ // Important settings of the installation\r
+ echo "<table>\n";\r
+ echo "\t<tr>";\r
+ echo "\t\t" . '<th colspan="2">' . _ADMIN_SYSTEMOVERVIEW_NUCLEUSSETTINGS . "</th>\n";\r
+ echo "\t</tr><tr>\n";\r
+ echo "\t\t" . '<td width="50%">' . '$CONF[' . "'Self']</td>\n";\r
+ echo "\t\t" . '<td>' . $CONF['Self'] . "</td>\n";\r
+ echo "\t</tr><tr>\n";\r
+ echo "\t\t" . '<td width="50%">' . '$CONF[' . "'ItemURL']</td>\n";\r
+ echo "\t\t" . '<td>' . $CONF['ItemURL'] . "</td>\n";\r
+ echo "\t</tr><tr>\n";\r
+ echo "\t\t" . '<td width="50%">' . '$CONF[' . "'alertOnHeadersSent']</td>\n";\r
+ $ohs = $CONF['alertOnHeadersSent'] ?\r
+ _ADMIN_SYSTEMOVERVIEW_ENABLE :\r
+ _ADMIN_SYSTEMOVERVIEW_DISABLE;\r
+ echo "\t\t" . '<td>' . $ohs . "</td>\n";\r
+ echo "\t</tr>\n";\r
+ echo "</table>\n";\r
+\r
+ // Link to the online version test at the Nucleus CMS website\r
+ echo '<h3>' . _ADMIN_SYSTEMOVERVIEW_VERSIONCHECK . "</h3>\n";\r
+ if ($nucleus['codename'] != '') {\r
+ $codenamestring = ' "' . $nucleus['codename'] . '"';\r
+ } else {\r
+ $codenamestring = '';\r
+ }\r
+ echo _ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_TXT;\r
+ $checkURL = sprintf(_ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_URL, getNucleusVersion(), getNucleusPatchLevel());\r
+ echo '<a href="' . $checkURL . '" title="' . _ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_TITLE . '">';\r
+ echo 'Nucleus CMS ' . $nv . $codenamestring;\r
+ echo '</a>';\r
+ //echo '<br />';\r
+ }\r
+ else {\r
+ echo _ADMIN_SYSTEMOVERVIEW_NOT_ADMIN;\r
+ }\r
+\r
+ $this->pagefoot();\r
+ }\r
+\r
+ /**\r
* @todo document this\r
*/\r
function updateConfig($name, $val) {\r
\r
?>\r
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\r
- <html xmlns="http://www.w3.org/1999/xhtml">\r
+ <html <?php echo _HTML_XML_NAME_SPACE_AND_LANG_CODE; ?>>\r
<head>\r
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET ?>" />\r
<title><?php echo htmlspecialchars($CONF['SiteName'])?> - Admin</title>\r
\r
echo '<br />(';\r
\r
- // Note(JP): disabled code name description\r
-/*\r
- if ($member->isLoggedIn() && $member->isAdmin())\r
- echo '<a href="http://nucleuscms.org/version.php?v=',getNucleusVersion(),'&pl=',getNucleusPatchLevel(),'" title="Check for upgrade">Nucleus CMS ', $nucleus['version'], ' "', $nucleus['codename'], '"</a>';\r
- else\r
- echo 'Nucleus CMS ', $nucleus['version'], ' "', $nucleus['codename'], '"';\r
-*/\r
- if ($member->isLoggedIn() && $member->isAdmin())\r
- echo '<a href="http://nucleuscms.org/version.php?v=',getNucleusVersion(),'&pl=',getNucleusPatchLevel(),'" title="Check for upgrade">Nucleus CMS ', $nucleus['version'], ' </a>';\r
- else\r
- echo 'Nucleus CMS ', $nucleus['version'];\r
+ $codenamestring = ($nucleus['codename']!='')? ' "'.$nucleus['codename'].'"':'';\r
+\r
+ if ($member->isLoggedIn() && $member->isAdmin()) {\r
+ $checkURL = sprintf(_ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_URL, getNucleusVersion(), getNucleusPatchLevel());\r
+ echo '<a href="' . $checkURL . '" title="' . _ADMIN_SYSTEMOVERVIEW_VERSIONCHECK_TITLE . '">Nucleus CMS ' . $nucleus['version'] . $codenamestring . '</a>';\r
+ } else {\r
+ echo 'Nucleus CMS ' . $nucleus['version'] . $codenamestring;\r
+ }\r
echo ')';\r
echo '</div>';\r
}\r
<?php }\r
?>\r
<div class="foot">\r
- <a href="http://nucleuscms.org/">Nucleus CMS</a> © 2002-<?php echo date('Y'); ?> The Nucleus Group\r
+ <a href="<?php echo _ADMINPAGEFOOT_OFFICIALURL ?>">Nucleus CMS</a> © 2002-<?php echo date('Y') . ' ' . _ADMINPAGEFOOT_COPYRIGHT; ?>\r
-\r
- <a href="http://nucleuscms.org/donate.php">Donate!</a>\r
+ <a href="<?php echo _ADMINPAGEFOOT_DONATEURL ?>"><?php echo _ADMINPAGEFOOT_DONATE ?></a>\r
</div>\r
\r
</div><!-- content -->\r
\r
echo '<h2>' . $member->getDisplayName(). '</h2>';\r
echo '<ul>';\r
- echo '<li><a href="index.php?action=editmembersettings">',_QMENU_USER_SETTINGS,'</a></li>';\r
- echo '<li><a href="index.php?action=browseownitems">',_QMENU_USER_ITEMS,'</a></li>';\r
- echo '<li><a href="index.php?action=browseowncomments">',_QMENU_USER_COMMENTS,'</a></li>';\r
+ echo '<li><a href="index.php?action=editmembersettings">' . _QMENU_USER_SETTINGS . '</a></li>';\r
+ echo '<li><a href="index.php?action=browseownitems">' . _QMENU_USER_ITEMS . '</a></li>';\r
+ echo '<li><a href="index.php?action=browseowncomments">' . _QMENU_USER_COMMENTS . '</a></li>';\r
echo '</ul>';\r
\r
\r
echo '<h2>',_QMENU_MANAGE,'</h2>';\r
\r
echo '<ul>';\r
- echo '<li><a href="index.php?action=actionlog">',_QMENU_MANAGE_LOG,'</a></li>';\r
- echo '<li><a href="index.php?action=settingsedit">',_QMENU_MANAGE_SETTINGS,'</a></li>';\r
- echo '<li><a href="index.php?action=usermanagement">',_QMENU_MANAGE_MEMBERS,'</a></li>';\r
- echo '<li><a href="index.php?action=createnewlog">',_QMENU_MANAGE_NEWBLOG,'</a></li>';\r
- echo '<li><a href="index.php?action=backupoverview">',_QMENU_MANAGE_BACKUPS,'</a></li>';\r
- echo '<li><a href="index.php?action=pluginlist">',_QMENU_MANAGE_PLUGINS,'</a></li>';\r
+ echo '<li><a href="index.php?action=actionlog">' . _QMENU_MANAGE_LOG . '</a></li>';\r
+ echo '<li><a href="index.php?action=settingsedit">' . _QMENU_MANAGE_SETTINGS . '</a></li>';\r
+ echo '<li><a href="index.php?action=systemoverview">' . _QMENU_MANAGE_SYSTEM . '</a></li>';\r
+ echo '<li><a href="index.php?action=usermanagement">' . _QMENU_MANAGE_MEMBERS . '</a></li>';\r
+ echo '<li><a href="index.php?action=createnewlog">' . _QMENU_MANAGE_NEWBLOG . '</a></li>';\r
+ echo '<li><a href="index.php?action=backupoverview">' . _QMENU_MANAGE_BACKUPS . '</a></li>';\r
+ echo '<li><a href="index.php?action=pluginlist">' . _QMENU_MANAGE_PLUGINS . '</a></li>';\r
echo '</ul>';\r
\r
echo '<h2>',_QMENU_LAYOUT,'</h2>';\r
echo '<ul>';\r
- echo '<li><a href="index.php?action=skinoverview">',_QMENU_LAYOUT_SKINS,'</a></li>';\r
- echo '<li><a href="index.php?action=templateoverview">',_QMENU_LAYOUT_TEMPL,'</a></li>';\r
- echo '<li><a href="index.php?action=skinieoverview">',_QMENU_LAYOUT_IEXPORT,'</a></li>';\r
+ echo '<li><a href="index.php?action=skinoverview">' . _QMENU_LAYOUT_SKINS . '</a></li>';\r
+ echo '<li><a href="index.php?action=templateoverview">' . _QMENU_LAYOUT_TEMPL . '</a></li>';\r
+ echo '<li><a href="index.php?action=skinieoverview">' . _QMENU_LAYOUT_IEXPORT . '</a></li>';\r
echo '</ul>';\r
\r
}\r
// header-code stolen from phpMyAdmin\r
// REGEDIT and bookmarklet code stolen from GreyMatter\r
\r
- $sjisBlogName = getBlogNameFromID($blogid);\r
+ $sjisBlogName = sprintf(_WINREGFILE_TEXT, getBlogNameFromID($blogid));\r
$sjisBlogName = mb_convert_encoding($sjisBlogName, "SJIS", "auto");\r
\r
header('Content-Type: application/octetstream');\r
header('Expires: 0');\r
\r
echo "REGEDIT4\n";\r
- echo "[HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\MenuExt\\Post To &Nucleus (".$sjisBlogName.")]\n";\r
+ echo "[HKEY_CURRENT_USER\\Software\\Microsoft\\Internet Explorer\\MenuExt\\" . $sjisBlogName . "]\n";\r
echo '@="' . $CONF['AdminURL'] . "bookmarklet.php?action=contextmenucode&blogid=".intval($blogid)."\"\n";\r
echo '"contexts"=hex:31';\r
}\r
\r
?>\r
\r
- <h2>Bookmarklet<!-- and Right Click Menu --></h2>\r
+ <h2><?php echo _BOOKMARKLET_TITLE ?></h2>\r
\r
<p>\r
- Bookmarklet とは、クリック1回で記事の投稿ができるシステムです。 この Bookmarklet をインストールすると、ブラウザのツールバーの'add to weblog'ボタンが利用可能となり、Nucleusの新規アイテムの追加ウィンドウがポップアップします。任意のWebページを開いた状態でこのボタンを押せば、そのWebページのタイトルと、そのページへのリンクタグがすでに埋め込まれた状態でアイテム追加ウィンドウが開き、さらに、そのページ内に引用したい文を選択した状態であればその引用文も自動的に引用します。\r
+ <?php echo _BOOKMARKLET_DESC1 . _BOOKMARKLET_DESC2 . _BOOKMARKLET_DESC3 . _BOOKMARKLET_DESC4 . _BOOKMARKLET_DESC5 ?>\r
</p>\r
\r
- <h3>Bookmarklet</h3>\r
+ <h3><?php echo _BOOKMARKLET_BOOKARKLET ?></h3>\r
<p>\r
- 下のリンク部分を「お気に入り」もしくはツールバーにドラッグできます。<small>(その前にテストしてみたい場合は単純に下のリンクをクリックしてみてください)</small>\r
+ <?php echo _BOOKMARKLET_BMARKTEXT ?><small><?php echo _BOOKMARKLET_BMARKTEST ?></small>\r
<br />\r
<br />\r
- <a href="<?php echo htmlspecialchars($bm)?>">Add to <?php echo $blog->getShortName()?></a> (ほとんどのブラウザで動作します)\r
+ <?php echo '<a href="' . htmlspecialchars($bm, ENT_QUOTES) . '">' . sprintf(_BOOKMARKLET_ANCHOR, htmlspecialchars($blog->getName(), ENT_QUOTES)) . '</a>' . _BOOKMARKLET_BMARKFOLLOW; ?>\r
</p>\r
\r
- <h3>右クリックメニューにインストール (WindowsでIE使用時)</h3>\r
+ <h3><?php echo _BOOKMARKLET_RIGHTCLICK ?></h3>\r
<p>\r
<?php\r
$url = 'index.php?action=regfile&blogid=' . intval($blogid);\r
$url = $manager->addTicketToUrl($url);\r
?>\r
- あるいは<a href="<?php echo htmlspecialchars($url) ?>">右クリックメニュー</a>にインストールすることもできます (「開く」を選択すれば直接レジストリに登録します)\r
+ <?php echo _BOOKMARKLET_RIGHTTEXT1 . '<a href="' . htmlspecialchars($url, ENT_QUOTES, "SJIS") . '">' . _BOOKMARKLET_RIGHTLABEL . '</a>' . _BOOKMARKLET_RIGHTTEXT2; ?>\r
</p>\r
\r
<p>\r
- このインストールした右クリックメニューを表示するためにはIEの再起動が必要です。\r
+ <?php echo _BOOKMARKLET_RIGHTTEXT3 ?>\r
</p>\r
\r
- <h3>アンインストール</h3>\r
+ <h3><?php echo _BOOKMARKLET_UNINSTALLTT ?></h3>\r
<p>\r
- 「お気に入り」もしくはツールバーから消すには、単に削除するだけです。\r
+ <?php echo _BOOKMARKLET_DELETEBAR ?>\r
</p>\r
- \r
+\r
<p>\r
- 右クリックメニューから消したい時は、以下の手順を踏んでください:\r
+ <?php echo _BOOKMARKLET_DELETERIGHTT ?>\r
</p>\r
\r
<ol>\r
- <li>スタートメニューから「ファイルを指定して実行...」を選択</li>\r
- <li>"regedit" と入力</li>\r
- <li>"OK" ボタンを押す</li>\r
- <li>"\HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt" をツリーの中から検索</li>\r
- <li>"add to weblog" エントリを削除</li> \r
+ <li><?php echo _BOOKMARKLET_DELETERIGHT1 ?></li>\r
+ <li><?php echo _BOOKMARKLET_DELETERIGHT2 ?></li>\r
+ <li><?php echo _BOOKMARKLET_DELETERIGHT3 ?></li>\r
+ <li><?php echo _BOOKMARKLET_DELETERIGHT4 ?></li>\r
+ <li><?php echo _BOOKMARKLET_DELETERIGHT5 ?></li>\r
</ol>\r
\r
<?php\r
$member->blogAdminRights($blogid) or $this->disallow();\r
\r
$blog =& $manager->getBlog($blogid);\r
+ $banBlogName = htmlspecialchars($blog->getName(), ENT_QUOTES);\r
\r
$this->pagehead();\r
?>\r
\r
<div>\r
<input type="hidden" name="blogid" value="<?php echo $blogid?>" />\r
- <input name="allblogs" type="radio" value="0" id="allblogs_one" /><label for="allblogs_one">Only blog '<?php echo htmlspecialchars($blog->getName())?>'</label>\r
+ <input name="allblogs" type="radio" value="0" id="allblogs_one" />\r
+ <label for="allblogs_one"><?php echo sprintf(_BAN_BANBLOGNAME, $banBlogName) ?></label>\r
<br />\r
<input name="allblogs" type="radio" value="1" checked="checked" id="allblogs_all" /><label for="allblogs_all"><?php echo _BAN_ALLBLOGS?></label>\r
</div>\r
<p><?php echo _BAN_IPRANGE_TEXT?></p>\r
\r
<div class="note">\r
- <b>An example</b>: "134.58.253.193" will only block one computer, while "134.58.253" will block 256 IP addresses, including the one from the first example.\r
+ <strong><?php echo _BAN_EXAMPLE_TITLE ?></strong>\r
+ <?php echo _BAN_EXAMPLE_TEXT ?>\r
</div>\r
\r
<div>\r
- <?php if ($ip) {\r
+ <?php\r
+ if ($ip) {\r
+ $iprangeVal = htmlspecialchars($ip, ENT_QUOTES);\r
?>\r
- <input name="iprange" type="radio" value="<?php echo htmlspecialchars($ip)?>" checked="checked" id="ip_fixed" /><label for="ip_fixed"><?php echo htmlspecialchars($ip)?></label>\r
+ <input name="iprange" type="radio" value="<?php echo $iprangeVal ?>" checked="checked" id="ip_fixed" />\r
+ <label for="ip_fixed"><?php echo $iprangeVal ?></label>\r
<br />\r
- <input name="iprange" type="radio" value="custom" id="ip_custom" /><label for="ip_custom">Custom: </label><input name='customiprange' value='<?php echo htmlspecialchars($ip)?>' maxlength='15' size='15' />\r
- <?php } else {\r
+ <input name="iprange" type="radio" value="custom" id="ip_custom" />\r
+ <label for="ip_custom"><?php echo _BAN_IP_CUSTOM ?></label>\r
+ <input name='customiprange' value='<?php echo $iprangeVal ?>' maxlength='15' size='15' />\r
+ <?php\r
+ } else {\r
echo "<input name='iprange' value='custom' type='hidden' />";\r
echo "<input name='customiprange' value='' maxlength='15' size='15' />";\r
}\r
// (creating/restoring dumps might take a while)\r
@set_time_limit(1200);\r
\r
- do_backup($useGzip);\r
+ $bu = new Backup();\r
+ $bu->do_backup($useGzip);\r
exit;\r
}\r
\r
// (creating/restoring dumps might take a while)\r
@set_time_limit(1200);\r
\r
- $message = do_restore();\r
+ $bu = new Backup();\r
+ $message = $bu->do_restore();\r
if ($message != '')\r
$this->error($message);\r
\r
// uninstall plugin again...\r
$this->deleteOnePlugin($plugin->getID());\r
\r
- $this->error(_ERROR_INSREQPLUGIN . htmlspecialchars($pluginName));\r
+ $this->error(sprintf(_ERROR_INSREQPLUGIN, htmlspecialchars($pluginName, ENT_QUOTES)));\r
}\r
}\r
\r
* @todo document this\r
*/\r
function action_pluginupdate() {\r
- global $member, $manager;\r
+ global $member, $manager, $CONF;\r
\r
// check if allowed\r
$member->isAdmin() or $this->disallow();\r
}\r
}\r
\r
- $this->action_pluginlist();\r
+ redirect($CONF['AdminURL'] . '?action=pluginlist');\r
+// $this->action_pluginlist();\r
}\r
\r
/**\r
<input type="hidden" name="plugid" value="<?php echo $pid; ?>" />\r
<input type="submit" tabindex="10" value="<?php echo _DELETE_CONFIRM_BTN?>" />\r
</div></form>\r
- <?php $this->pagefoot();\r
+ <?php\r
+ $this->pagefoot();\r
}\r
\r
/**\r
* @todo document this\r
*/\r
function action_plugindeleteconfirm() {\r
- global $member, $manager;\r
+ global $member, $manager, $CONF;\r
\r
// check if allowed\r
$member->isAdmin() or $this->disallow();\r
$this->error($error);\r
}\r
\r
- $this->action_pluginlist();\r
+ redirect($CONF['AdminURL'] . '?action=pluginlist');\r
+// $this->action_pluginlist();\r
}\r
\r
/**\r
\r
$name = quickQuery('SELECT pfile as result FROM '.sql_table('plugin').' WHERE pid='.$pid);\r
\r
- // call the unInstall method of the plugin\r
+/* // call the unInstall method of the plugin\r
if ($callUninstall) {\r
$plugin =& $manager->getPlugin($name);\r
if ($plugin) $plugin->unInstall();\r
- }\r
+ }*/\r
\r
// check dependency before delete\r
$res = sql_query('SELECT pfile FROM '.sql_table('plugin'));\r
{\r
if ($name == $depName)\r
{\r
- return _ERROR_DELREQPLUGIN . $o->pfile;\r
+ return sprintf(_ERROR_DELREQPLUGIN, $o->pfile);\r
}\r
}\r
}\r
\r
$manager->notify('PreDeletePlugin', array('plugid' => $pid));\r
\r
+ // call the unInstall method of the plugin\r
+ if ($callUninstall) {\r
+ $plugin =& $manager->getPlugin($name);\r
+ if ($plugin) $plugin->unInstall();\r
+ }\r
+\r
// delete all subscriptions\r
sql_query('DELETE FROM '.sql_table('plugin_event').' WHERE pid=' . $pid);\r
\r
* @todo document this\r
*/\r
function action_pluginup() {\r
- global $member, $manager;\r
+ global $member, $manager, $CONF;\r
\r
// check if allowed\r
$member->isAdmin() or $this->disallow();\r
\r
//$this->action_pluginlist();\r
// To avoid showing ticket in the URL, redirect to pluginlist, instead.\r
- redirect('?action=pluginlist');\r
+ redirect($CONF['AdminURL'] . '?action=pluginlist');\r
}\r
\r
/**\r
* @todo document this\r
*/\r
function action_plugindown() {\r
- global $member, $manager;\r
+ global $member, $manager, $CONF;\r
\r
// check if allowed\r
$member->isAdmin() or $this->disallow();\r
\r
//$this->action_pluginlist();\r
// To avoid showing ticket in the URL, redirect to pluginlist, instead.\r
- redirect('?action=pluginlist');\r
+ redirect($CONF['AdminURL'] . '?action=pluginlist');\r
}\r
\r
/**\r
$this->error(_ERROR_NOSUCHPLUGIN);\r
\r
$extrahead = '<script type="text/javascript" src="javascript/numbercheck.js"></script>';\r
+ $pluginName = htmlspecialchars(getPluginNameFromPid($pid), ENT_QUOTES);\r
$this->pagehead($extrahead);\r
\r
?>\r
<p><a href="index.php?action=pluginlist">(<?php echo _PLUGS_BACK?>)</a></p>\r
\r
- <h2>Options for <?php echo htmlspecialchars(getPluginNameFromPid($pid))?></h2>\r
+ <h2><?php echo sprintf(_PLUGIN_OPTIONS_TITLE, $pluginName) ?></h2>\r
\r
<?php if ($message) echo $message?>\r
\r
echo '<tr><th colspan="2">Options for ', htmlspecialchars($aOption['pfile']),'</th></tr>';\r
}\r
\r
- echo '<tr>';\r
- listplug_plugOptionRow($aOption);\r
- echo '</tr>';\r
+ $meta = NucleusPlugin::getOptionMeta($aOption['typeinfo']);\r
+ if (@$meta['access'] != 'hidden') {\r
+ echo '<tr>';\r
+ listplug_plugOptionRow($aOption);\r
+ echo '</tr>';\r
+ }\r
\r
}\r
\r
if ($checkedval != $value1)\r
echo "tabindex='$tabindex' checked='checked'";\r
if ($isAdmin && $name=="canlogin")\r
- echo " disabled='true'";\r
+ echo ' disabled="disabled"';\r
echo ' id="'.$id2.'" /><label for="'.$id2.'">' . $noval . '</label>';\r
}\r
\r
} // class ADMIN\r
\r
-?>\r
+?>
\ No newline at end of file