//\r
// example:\r
// array('NP_TrackBack', 'NP_MemberGoodies')\r
-$aConfPlugsToInstall = array('NP_SkinFiles');\r
+$aConfPlugsToInstall = array('NP_SkinFiles', 'NP_SecurityEnforcer');\r
\r
\r
// array with skins to install. skins must be present under the skins/ directory with\r
_doError(_ERROR15 . ': ' . mysql_error() );\r
}\r
\r
-/*/ <add for garble measure>\r
+// <add for garble measure>\r
// 2-2. set DEFAULT CHARSET and COLLATE\r
$mySqlVer = implode('.', array_map('intval', explode('.', mysql_get_server_info($MYSQL_CONN))));\r
if ($mySqlVer >= '5.0.7' && phpversion() >= '5.2.3') {\r
if ($mysql_create == 1) {\r
$sql = 'CREATE DATABASE '\r
. $mysql_database\r
-/*/ <add for garble measure>\r
+// <add for garble measure>\r
. ' DEFAULT CHARACTER SET '\r
. $charset\r
. ' COLLATE '\r
if ($mysql_usePrefix == 1) {\r
$query = str_replace($aTableNames, $aTableNamesPrefixed, $query);\r
}\r
-/*/ <add for garble measure>\r
+// <add for garble measure>\r
if ($mysql_create != 1 && strpos($query, 'CREATE TABLE') === 0) {\r
$query .= ' DEFAULT CHARACTER SET ' . $charset . ' COLLATE ' . $collation;\r
}\r
<dd><code>BLOG</code> オブジェクト</dd>\r
<dt class="ro">timestamp</dt>\r
<dd>日付フッターのタイムスタンプ</dd>\r
- </dl></td> \r
+ </dl></td>\r
</tr> \r
<tr>\r
<td>LoginSuccess</td>\r
<td><dl>\r
<dt class="obj ref">member</dt>\r
<dd><code>MEMBER</code> オブジェクト</dd>\r
+ <dt class="ro">username</dt>\r
+ <dd>ログ印字に使用されたログイン名</dd>\r
</dl></td> \r
</tr>\r
<tr>\r
<dd>整数値。プラグイン側で外部認証に失敗した後に、Nucleus のログインを試すかどうかのフラグ。「1」が試す「0」が試さない。初期値は「1」プラグイン側でセットします。</dd>\r
</dl></td>\r
</tr>\r
+ <tr>\r
+ <td>PrePasswordSet</td>\r
+ <td>(v3.50)パスワードを設定する時に呼び出されます。パスワードの強度をプラグインで設定することが出来ます。</td>\r
+ <td><dl>\r
+ <dt class="ro">password</dt>\r
+ <dd>ユーザーが入力したパスワード文字列</dd>\r
+ <dt class="ref">errormessage</dt>\r
+ <dd>エラーメッセージ。エラーが起きない場合は空白に設定します。</dd>\r
+ <dt class="ref">valid</dt>\r
+ <dd>設定しようとしているパスワードが妥当かどうかのフラグ。デフォルトは「真」。プラグインはこの値の妥当性を審査するべきです。</dd>\r
+ </dl></td>\r
+ </tr>\r
<!--\r
<tr>\r
<td></td>\r
</div>
+<div class="page">
+<a name="skinvar-sticky" id="skinvar-sticky"><span class="invisible">skinvar-sticky</span></a>
+<h1>スキン変数:sticky</h1>
+
+<p>
+スキンにアイテムを表示します
+</p>
+
+<h2>引数</h2>
+<ul>
+ <li>必須:
+ <table summary="Skin var::sticky::Require">
+ <tr>
+ <th abbr="名前">名前</th>
+ <th abbr="値">値</th>
+ </tr>
+ <tr>
+ <td><strong>itemid</strong></td>
+ <td><a href="#if_condition">表示するアイテムのID</a></td>
+ </tr>
+ <tr>
+ <td><strong>template</strong></td>
+ <td>アイテムを表示するためのテンプレート</td>
+ </tr>
+ </table>
+ </li>
+</ul>
+
+<h2>スキンタイプ</h2>
+
+<p>
+全て
+</p>
+
+<h2>例</h2>
+
+<pre>
+<%sticky(11,default/index)%>
+</pre>
+
+</div>
+
+
<div class="page">
<a name="templatevars-overview" id="templatevars-overview"><span class="invisible">templatevars-overview</span></a>
\r
<ul>\r
<li>\r
- <strong>Nucleus v3.41 RC (March 14, 2009)</strong>\r
+ <strong>Nucleus v3.5 (SVN)</strong>\r
+ <ul>\r
+ <li>ADDED: selectSpecialSkinType() function to globalfunctions.php. (ftruscot)</li>\r
+ <li>ADDED: Check in ADMIN.php pagehead() function to display alert if newer version is available. new function, getLatestVersion() in globalfunctions.php, and new files on nucleuscms.org, version_check.php, to serve latest version. (ftruscot)</li>\r
+ <li>ADDED: skinvar for all skin types to display a sticky item from any blog anywhere. (ftruscot)</li>\r
+ <li>REMOVED: check on canlogin during forgotpassword process. See <a href="http://forum.nucleuscms.org/viewtopic.php?t=18753" title="forgotpassword">this thread</a>. Suggestion by phillip_r. (ftruscot)</li>\r
+ <li>ADDED: div with id of adminwrapper around contents of admin page for improved control of admin page look. See <a href="http://forum.nucleuscms.org/viewtopic.php?t=18551" title="adminwrapper">this thread</a>. Suggestion by monkeybrain. (ftruscot)</li>\r
+ <li>ADDED: NP_SecurityEnforcer plugin to core installation. It can be set to enforce password length and complexity rules, as well as maximum failed login attempts. Put in plugin so can be superceded later by better techniques. (ftruscot)</li>\r
+ <li>CHANGED: LoginSuccess event in globalfunctions.php to inlcude <i>username</i> in the data array to specify the login name entered by the user. (ftruscot)</li>\r
+ <li>FIXED: backup.php, _backup_dump_structure() function, to use SHOW CREATE TABLE <i>name</i>, to generate table creation SQL. Adds ENGINE, AUTO_INCREMENT, and DEFAULT CHARSET. (ftruscot)</li>\r
+ <li>ADDED: PrePasswordSet event in ADMIN.php to allow plugin to enforce any password length or complexity rules for improved security. (ftruscot)</li>\r
+ <li>CHANGED: move send update ping option override to NP_Ping</li>\r
+ <li>ADDED: Year-based archives and archivelists, adds archiveyearlist and otherarchiveyearlist skin vars (ftruscot)</li>\r
+ </ul>\r
+ </li>\r
+ <li>\r
+ <strong>Nucleus v3.41(March 14, 2009)</strong>\r
<ul>\r
<li>CHANGED: ドキュメントの文字サイズを可変に(jQuery使用)(character size of the document, variably via jQuery.) (shizuki)</li>\r
<li>FIXED: (<a href="http://nucleus-jp.sourceforge.jp/tracker/index.php?do=details&task_id=89">#89(JP)</a>): metaWeblog.newPostにおけるコメント可否. (shizuki/NKJG)</li>\r
<td><code>selectLanguage('french');</code></td>\r
<td>言語を「french」にしてページ表示する\r
(PHPエラーが出る可能性がありますので注意してください)</td>\r
+</tr><tr>\r
+ <td><code>selectSpecialSkinType('construction');</code></td>\r
+ <td>指定されたスペシャルスキンタイプを使用します (note: 指定されたスペシャルスキンタイプの内容が表示されます). 次のコードはログインしていない時のみスペシャルスキンを表示します: <pre><code>if (!$member->isLoggedIn()) {\r
+ selectSpecialSkinType('login');\r
+}</code></pre> また次のコードではサイトのトップページの時にスペシャルスキンを表示します: <pre><code>if (empty($blogid) && empty($catid) && empty($itemid)&& empty($archive) && empty($archivelist)) {\r
+ selectSpecialSkinType('welcome');\r
+}</code></pre></td>\r
</tr></table>\r
\r
<p>\r
\r
<p><strong>注意:</strong>もし、既に用意してある<code>About.html</code>を使いたい時は、ファイルを<code>skins/default/</code>ディレクトリ(デフォルトスキン使用時)に置き、スキンパーツに<code><%include(About.html)%></code>と書くだけで、その内容を取り込むことができます。そしてその内容はほぼ無制限です。</p>\r
\r
-<p>(<a href="http://www.iai.com/">ftruscot</a>より)</p>\r
+<p>(Tip from <a href="http://revcetera.com/ftruscot">ftruscot</a>)</p>\r
</div>\r
</body>\r
</html>\r
*/
/********************************************
+ * Start New for 3.50 *
+ ********************************************/
+define('_ARCHIVETYPE_YEAR', 'year');
+define('_ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TITLE', 'Newer Version Available');
+define('_ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TEXT', 'Upgrade available: v');
+
+
+/********************************************
* Start New for 3.40 *
********************************************/
define('_UPDATEDPING_PINGING', 'Pinging services, please wait...');
define('_UPDATEDPING_VIEWITEM', 'View list of recent items for ');
define('_UPDATEDPING_VISITOWNSITE', 'Visit your own site');
-define('_UPDATEDPING_GOSENDPING', 'Send Update ping');
// General category
define('_EBLOGDEFAULTCATEGORY_NAME', 'General');
*/
/********************************************
+ * Start New for 3.50 *
+ ********************************************/
+define('_ARCHIVETYPE_YEAR', 'year');
+define('_ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TITLE', 'Newer Version Available');
+define('_ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TEXT', 'Upgrade available: v');
+
+
+/********************************************
* Start New for 3.40 *
********************************************/
define('_UPDATEDPING_PINGING', 'Pinging services, please wait...');
define('_UPDATEDPING_VIEWITEM', 'View list of recent items for ');
define('_UPDATEDPING_VISITOWNSITE', 'Visit your own site');
-define('_UPDATEDPING_GOSENDPING', 'Send Update ping');
// General category
define('_EBLOGDEFAULTCATEGORY_NAME', 'General');
*/
/********************************************
+ * Start New for 3.50 *
+ ********************************************/
+define('_ARCHIVETYPE_YEAR', 'ǯ');
+define('_ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TITLE', '¿·¤·¤¤¥Ð¡¼¥¸¥ç¥ó¤¬Æþ¼ê²Äǽ¤Ç¤¹');
+define('_ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TEXT', '¥¢¥Ã¥×¥°¥ì¡¼¥É¤¬Æþ¼ê²Äǽ¤Ç¤¹¡§ v');
+
+
+/********************************************
* Start New for 3.40 *
********************************************/
*/
/********************************************
+ * Start New for 3.50 *
+ ********************************************/
+define('_ARCHIVETYPE_YEAR', '年');
+define('_ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TITLE', '新しいバージョンが入手可能です');
+define('_ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TEXT', 'アップグレードが入手可能です: v');
+
+
+/********************************************
* Start New for 3.40 *
********************************************/
define('_UPDATEDPING_PINGING', 'Pingサーバに送信中です');
define('_UPDATEDPING_VIEWITEM', '更新されたblog:');
define('_UPDATEDPING_VISITOWNSITE', 'サイトへ行ってみる');
-define('_UPDATEDPING_GOSENDPING', '更新Ping送信');
// General category
define('_EBLOGDEFAULTCATEGORY_NAME', '総合');
doError(_ERROR_NOSUCHMEMBER);
$mem = MEMBER::createFromName($membername);
- if (!$mem->canLogin())
- doError(_ERROR_NOLOGON_NOACTIVATE);
+ /* below keeps regular users from resetting passwords using forgot password feature
+ Removing for now until clear why it is required.*/
+ /*if (!$mem->canLogin())
+ doError(_ERROR_NOLOGON_NOACTIVATE);*/
// check if e-mail address is correct
if (!($mem->getEmail() == postVar('email')))
$blog->InsertJavaScriptInfo();
$this->doForm('additemform');
}
- \r
- /**\r
- * Parse skinvar addlink\r
- * A Link that allows to open a bookmarklet to add an item\r
- */\r
- function parse_addlink() {\r
- global $CONF, $member, $blog;\r
- if ($member->isLoggedIn() && $member->isTeamMember($blog->blogid) ) {\r
- echo $CONF['AdminURL'].'bookmarklet.php?blogid='.$blog->blogid;\r
- }\r
- }\r
- \r
- /**\r
- * Parse skinvar addpopupcode\r
- * Code that opens a bookmarklet in an popup window\r
- */\r
- function parse_addpopupcode() {\r
- echo "if (event && event.preventDefault) event.preventDefault();winbm=window.open(this.href,'nucleusbm','scrollbars=no,width=600,height=550,left=10,top=10,status=no,resizable=yes');winbm.focus();return false;";\r
- }\r
+
+ /**
+ * Parse skinvar addlink
+ * A Link that allows to open a bookmarklet to add an item
+ */
+ function parse_addlink() {
+ global $CONF, $member, $blog;
+ if ($member->isLoggedIn() && $member->isTeamMember($blog->blogid) ) {
+ echo $CONF['AdminURL'].'bookmarklet.php?blogid='.$blog->blogid;
+ }
+ }
+
+ /**
+ * Parse skinvar addpopupcode
+ * Code that opens a bookmarklet in an popup window
+ */
+ function parse_addpopupcode() {
+ echo "if (event && event.preventDefault) event.preventDefault();winbm=window.open(this.href,'nucleusbm','scrollbars=no,width=600,height=550,left=10,top=10,status=no,resizable=yes');winbm.focus();return false;";
+ }
/**
* Parse skinvar adminurl
array_shift($args);
// implode
$format=implode(',',$args);
- } elseif ($d == 0) {
+ } elseif ($d == 0 && $m !=0) {
$format = '%B %Y';
+ } elseif ($m == 0) {
+ $format = '%Y';
} else {
$format = '%d %B %Y';
}
- echo strftime($format,mktime(0,0,0,$m,$d?$d:1,$y));
+ echo strftime($format,mktime(0,0,0,$m?$m:1,$d?$d:1,$y));
}
/**
$this->_postBlogContent('archivelist',$blog);
}
+ function parse_archiveyearlist($template, $category = 'all', $limit = 0) {
+ global $blog;
+ if ($category == 'all') $category = '';
+ $this->_preBlogContent('archivelist',$blog);
+ $this->_setBlogCategory($blog, $category);
+ $blog->showArchiveList($template, 'year', $limit);
+ $this->_postBlogContent('archivelist',$blog);
+ }
+
/**
* Parse skinvar archivetype
*/
* Parse skinvar bloglist
* Shows a list of all blogs
* bnametype: whether 'name' or 'shortname' is used for the link text
- * orderby: order criteria\r
- * direction: order ascending or descending \r
+ * orderby: order criteria
+ * direction: order ascending or descending
*/
- function parse_bloglist($template, $bnametype = '', $orderby='number', $direction='asc') {\r
- BLOG::showBlogList($template, $bnametype, $orderby, $direction);\r
+ function parse_bloglist($template, $bnametype = '', $orderby='number', $direction='asc') {
+ BLOG::showBlogList($template, $bnametype, $orderby, $direction);
}
/**
if (stristr($destinationurl, 'action.php')) {
$args = func_get_args();
$destinationurl = $args[1];
- ACTIONLOG::add(WARNING,_ACTIONURL_NOTLONGER_PARAMATER);\r
+ ACTIONLOG::add(WARNING,_ACTIONURL_NOTLONGER_PARAMATER);
}
$actionurl = $CONF['ActionURL'];
$b->showArchiveList($template, 'month', $limit);
$this->_postBlogContent('otherarchivelist',$b);
}
-
+
+ /**
+ * Parse skinvar otherarchiveyearlist
+ */
+ function parse_otherarchiveyearlist($blogname, $template, $category = 'all', $limit = 0) {
+ global $manager;
+ if ($category == 'all') $category = '';
+ $b =& $manager->getBlog(getBlogIDFromName($blogname));
+ $this->_setBlogCategory($b, $category);
+ $this->_preBlogContent('otherarchivelist',$b);
+ $b->showArchiveList($template, 'year', $limit);
+ $this->_postBlogContent('otherarchivelist',$b);
+ }
+
/**
* Parse skinvar otherblog
*/
function parse_plugin($pluginName) {
global $manager;
- // should be already tested from the parser (PARSER.php)\r
- // only continue when the plugin is really installed\r
- /*if (!$manager->pluginInstalled('NP_' . $pluginName))\r
+ // should be already tested from the parser (PARSER.php)
+ // only continue when the plugin is really installed
+ /*if (!$manager->pluginInstalled('NP_' . $pluginName))
return;*/
$plugin =& $manager->getPlugin('NP_' . $pluginName);
echo 'Nucleus CMS ' . $nucleus['version'];
}
+ /**
+ * Parse skinvar sticky
+ */
+ function parse_sticky($itemnumber = 0, $template = '') {
+ global $manager;
+
+ $itemnumber = intval($itemnumber);
+ $itemarray = array($itemnumber);
+
+ $b =& $manager->getBlog(getBlogIDFromItemID($itemnumber));
+ $this->_preBlogContent('sticky',$b);
+ $this->amountfound = $b->readLogFromList($itemarray, $template);
+ $this->_postBlogContent('sticky',$b);
+ }
+
+
}
?>
ITEM::delete($draftid);\r
}\r
\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
$blog =& $manager->getBlog($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
+ if (!$item['draft'] && postVar('dosendping') && $item['timestamp'] <= $btimestamp) {\r
$nextAction = 'sendping';\r
} else {\r
$nextAction = 'itemlist';\r
\r
if ($password && (strlen($password) < 6))\r
$this->error(_ERROR_PASSWORDTOOSHORT);\r
+\r
+ $pwdvalid = true;\r
+ $pwderror = '';\r
+ $manager->notify('PrePasswordSet',array('password' => $password, 'errormessage' => &$pwderror, 'valid' => &$pwdvalid));\r
+ if (!pwdvalid) {\r
+ $this->error($pwderror);\r
+ }\r
}\r
\r
if (!isValidMailAddress($email))\r
if ($password && (strlen($password) < 6))\r
return $this->_showActivationPage($key, _ERROR_PASSWORDTOOSHORT);\r
\r
+ $pwdvalid = true;\r
+ $pwderror = '';\r
+ $manager->notify('PrePasswordSet',array('password' => $password, 'errormessage' => &$pwderror, 'valid' => &$pwdvalid));\r
+ if (!pwdvalid) {\r
+ return $this->_showActivationPage($key,$pwderror);\r
+ }\r
+\r
$error = '';\r
global $manager;\r
$manager->notify('ValidateForm', array('type' => 'activation', 'member' => $mem, 'error' => &$error));\r
<?php echo $extrahead?>\r
</head>\r
<body>\r
+ <div id="adminwrapper">\r
<div class="header">\r
<h1><?php echo htmlspecialchars($CONF['SiteName'])?></h1>\r
</div>\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
+ $newestVersion = getLatestVersion();\r
+ $newestCompare = str_replace('/','.',$newestVersion);\r
+ $currentVersion = str_replace(array('/','v'),array('.',''),$nucleus['version']);\r
+ if ($newestVersion && version_compare($newestCompare,$currentVersion)) {\r
+ echo '<br /><a style="color:red" href="http://nucleuscms.org/upgrade.php" title="'._ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TITLE.'">'._ADMIN_SYSTEMOVERVIEW_LATESTVERSION_TEXT.$newestVersion.'</a>';\r
+ }\r
} else {\r
echo 'Nucleus CMS ' . $nucleus['version'] . $codenamestring;\r
}\r
</div>\r
\r
<!-- content / quickmenu container -->\r
+ <div class="clear"></div> <!-- new -->\r
</div>\r
\r
-\r
+ <!-- adminwrapper --> <!-- new -->\r
+ </div> <!-- new -->\r
</body>\r
</html>\r
<?php }\r
function createNew($name, $desc, $type = 'text/html', $includeMode = 'normal', $includePrefix = '') {
global $manager;
- // <temporary hack. for 3.4x ONLY !!>\r
- global $CONF;\r
- if (!$manager && $CONF['installscript']) {\r
- include_once($DIR_LIBS . 'MANAGER.php');\r
- $manager =& MANAGER::instance();\r
- }\r
- // </temporary hack. for 3.4x ONLY !!>\r
-\r
$manager->notify(
'PreAddSkin',
array(
'sitevar',
'otherarchivelist',
'otherarchivedaylist',
+ 'otherarchiveyearlist',
'self',
'adminurl',
'todaylink',
'ifnot',
'elseifnot',
'charset',
- 'bloglist',\r
- 'addlink',\r
- 'addpopupcode'\r
+ 'bloglist',
+ 'addlink',
+ 'addpopupcode',
+ 'sticky'
);
// extra actions specific for a certain skin type
'categorylist',
'archivelist',
'archivedaylist',
+ 'archiveyearlist',
'nextlink',
'prevlink'
);
'categorylist',
'archivelist',
'archivedaylist',
+ 'archiveyearlist',
'blogsetting',
'archivedate',
'nextarchive',
$extraActions = array('blog',
'archivelist',
'archivedaylist',
+ 'archiveyearlist',
'categorylist',
'blogsetting',
);
$extraActions = array('blog',
'archivelist',
'archivedaylist',
+ 'archiveyearlist',
'categorylist',
'searchresults',
'othersearchresults',
'categorylist',
'archivelist',
'archivedaylist',
+ 'archiveyearlist',
'itemtitle',
'itemid',
'itemlink',
'categorylist',
'archivelist',
'archivedaylist',
+ 'archiveyearlist',
'nextlink',
- 'archivelist',
- 'archivedaylist',
'prevlink',
'membermailform',
'nucleusbutton'
\r
// add command to drop table on restore\r
echo "DROP TABLE IF EXISTS $tablename;\n";\r
+ $result = sql_query("SHOW CREATE TABLE $tablename");\r
+ $create = mysql_fetch_assoc($result);\r
+ echo $create['Create Table'];\r
+ echo ";\n\n";\r
+ }\r
+\r
+ /**\r
+ * Creates a dump of the table structure for one table\r
+ */\r
+/* replaced by code above in 3.5\r
+ function _backup_dump_structure($tablename) {\r
+ \r
+ // add command to drop table on restore\r
+ echo "DROP TABLE IF EXISTS $tablename;\n";\r
echo "CREATE TABLE $tablename(\n";\r
\r
//\r
\r
echo "\n);\n\n";\r
}\r
+*/\r
\r
/**\r
* Returns the field named for the given table in the \r
$startpos = intRequestVar('startpos');\r
$errormessage = '';\r
$error = '';\r
+$special = requestVar('special');\r
$virtualpath = ((getVar('virtualpath') != null) ? getVar('virtualpath') : serverVar('PATH_INFO'));\r
\r
if (!headers_sent() ) {\r
$action = $nextaction;\r
}\r
\r
- $manager->notify('LoginSuccess', array('member' => &$member) );\r
+ $manager->notify('LoginSuccess', array('member' => &$member, 'username' => $login) );\r
$errormessage = '';\r
ACTIONLOG::add(INFO, "Login successful for $login (sharedpc=$shared)");\r
} else {\r
if (!defined('_ARCHIVETYPE_MONTH') ) {\r
define('_ARCHIVETYPE_DAY', 'day');\r
define('_ARCHIVETYPE_MONTH', 'month');\r
+ define('_ARCHIVETYPE_YEAR', 'year');\r
}\r
\r
// decode path_info\r
}\r
\r
/**\r
+ * returns the latest version available for download from nucleuscms.org \r
+ * or false if unable to attain data\r
+ * format will be major.minor/patachlevel\r
+ * e.g. 3.41 or 3.41/02\r
+ */\r
+function getLatestVersion() {\r
+ if (!function_exists('curl_init')) return false;\r
+ $crl = curl_init();\r
+ $timeout = 5;\r
+ curl_setopt ($crl, CURLOPT_URL,'http://nucleuscms.org/version_check.php');\r
+ curl_setopt ($crl, CURLOPT_RETURNTRANSFER, 1);\r
+ curl_setopt ($crl, CURLOPT_CONNECTTIMEOUT, $timeout);\r
+ $ret = curl_exec($crl);\r
+ curl_close($crl);\r
+ return $ret;\r
+\r
+}\r
+\r
+/**\r
* Connects to mysql server\r
*/\r
function sql_connect() {\r
function selector() {\r
global $itemid, $blogid, $memberid, $query, $amount, $archivelist, $maxresults;\r
global $archive, $skinid, $blog, $memberinfo, $CONF, $member;\r
- global $imagepopup, $catid;\r
+ global $imagepopup, $catid, $special;\r
global $manager;\r
\r
$actionNames = array('addcomment', 'sendmessage', 'createaccount', 'forgotpassword', 'votepositive', 'votenegative', 'plugin');\r
$archivenextexists = false;\r
}\r
\r
+ } elseif ($m == 0) {\r
+ $archivetype = _ARCHIVETYPE_YEAR;\r
+ $t = mktime(0, 0, 0, 12, 31, $y - 1);\r
+ // one day before is in the previous year\r
+ $archiveprev = strftime('%Y', $t);\r
+ if ($t > $first_timestamp) {\r
+ $archiveprevexists = true;\r
+ }\r
+ else {\r
+ $archiveprevexists = false;\r
+ }\r
+\r
+ // timestamp for the next year\r
+ $t = mktime(0, 0, 0, 1, 1, $y + 1);\r
+ $archivenext = strftime('%Y', $t);\r
+ if ($t < $last_timestamp) {\r
+ $archivenextexists = true;\r
+ }\r
+ else {\r
+ $archivenextexists = false;\r
+ }\r
} else {\r
$archivetype = _ARCHIVETYPE_MONTH;\r
$t = mktime(0, 0, 0, $m, 1, $y);\r
$skinid = $blog->getDefaultSkin();\r
}\r
\r
- $special = requestVar('special');\r
+ //$special = requestVar('special'); //get at top of file as global\r
if (!empty($special) && isValidShortName($special)) {\r
$type = strtolower($special);\r
}\r
return $obj->count;\r
}\r
\r
+function selectSpecialSkinType($id) {\r
+ global $special;\r
+ $special = strtolower($id);\r
+}\r
+\r
?>
\ No newline at end of file
--- /dev/null
+<?php
+/*
+License:
+This software is published under the same license as NucleusCMS, namely
+the GNU General Public License. See http://www.gnu.org/licenses/gpl.html for
+details about the conditions of this license.
+
+In general, this program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by the Free
+Software Foundation; either version 2 of the License, or (at your option) any
+later version.
+
+This program is distributed in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+PARTICULAR PURPOSE. See the GNU General Public License for more details.
+*/
+class NP_SecurityEnforcer extends NucleusPlugin {
+
+ function getName() { return 'SecurityEnforcer'; }
+
+ function getAuthor() { return 'Frank Truscott'; }
+
+ function getURL() { return 'http://revcetera.com/ftruscot'; }
+
+ function getVersion() { return '1.0'; }
+
+ function getDescription() {
+ return _SECURITYENFORCER_DESCRIPTION;
+ }
+
+ function getMinNucleusVersion() { return 350; }
+
+ function supportsFeature($what) {
+ switch($what) {
+ case 'SqlTablePrefix':
+ return 1;
+ /*case 'HelpPage':
+ return 1;*/
+ default:
+ return 0;
+ }
+ }
+
+ function getTableList() { return array(sql_table('plug_securityenforcer')); }
+ function getEventList() { return array('QuickMenu','PrePasswordSet','CustomLogin','LoginSuccess','LoginFailed'); }
+
+ function install() {
+ global $CONF;
+
+// Need to make some options
+ $this->createOption('quickmenu', _SECURITYENFORCER_OPT_QUICKMENU, 'yesno', 'yes');
+ $this->createOption('del_uninstall_data', _SECURITYENFORCER_OPT_DEL_UNINSTALL_DATA, 'yesno','no');
+ $this->createOption('enable_security', _SECURITYENFORCER_OPT_ENABLE, 'yesno','yes');
+ $this->createOption('pwd_min_length', _SECURITYENFORCER_OPT_PWD_MIN_LENGTH, 'text','8');
+ $this->createOption('pwd_complexity', _SECURITYENFORCER_OPT_PWD_COMPLEXITY, 'select','0',_SECURITYENFORCER_OPT_SELECT_OFF_COMP.'|0|'._SECURITYENFORCER_OPT_SELECT_ONE_COMP.'|1|'._SECURITYENFORCER_OPT_SELECT_TWO_COMP.'|2|'._SECURITYENFORCER_OPT_SELECT_THREE_COMP.'|3|'._SECURITYENFORCER_OPT_SELECT_FOUR_COMP.'|4');
+ $this->createOption('max_failed_login', _SECURITYENFORCER_OPT_MAX_FAILED_LOGIN, 'text', '5');
+ $this->createOption('login_lockout', _SECURITYENFORCER_OPT_LOGIN_LOCKOUT, 'text', '15');
+
+// create needed tables
+ sql_query("CREATE TABLE IF NOT EXISTS ". sql_table('plug_securityenforcer').
+ " (
+ `login` varchar(255),
+ `fails` int(11) NOT NULL default '0',
+ `lastfail` bigint NOT NULL default '0',
+ KEY `login` (`login`)) TYPE=MyISAM");
+
+ }
+
+ function unInstall() {
+ // if requested, delete the data table
+ if ($this->getOption('del_uninstall_data') == 'yes') {
+ sql_query('DROP TABLE '.sql_table('plug_securityenforcer'));
+ }
+ }
+
+ function init() {
+ // include language file for this plugin
+ $language = ereg_replace( '[\\|/]', '', getLanguageName());
+ if (file_exists($this->getDirectory().$language.'.php'))
+ include_once($this->getDirectory().$language.'.php');
+ else
+ include_once($this->getDirectory().'english.php');
+
+ $this->enable_security = $this->getOption('enable_security');
+ $this->pwd_min_length = intval($this->getOption('pwd_min_length'));
+ $this->pwd_complexity = intval($this->getOption('pwd_complexity'));
+ $this->max_failed_login = intval($this->getOption('max_failed_login'));
+ $this->login_lockout = intval($this->getOption('login_lockout'));
+ }
+ function hasAdminArea() { return 1; }
+
+ function event_QuickMenu(&$data) {
+ // only show when option enabled
+ global $member;
+ if ($this->getOption('quickmenu') != 'yes' || !$member->isAdmin()) return;
+ global $member;
+ if (!($member->isLoggedIn())) return;
+ array_push($data['options'],
+ array('title' => 'Security Enforcer',
+ 'url' => $this->getAdminURL(),
+ 'tooltip' => _SECURITYENFORCER_ADMIN_TOOLTIP));
+ }
+
+ function event_PrePasswordSet(&$data) {
+ //password, errormessage, valid
+ if ($this->enable_security == 'yes') {
+ if (!$this->_validate_passwd($data['password'],$this->pwd_min_length, $this->pwd_complexity)) {
+ $data['errormessage'] = _SECURITYENFORCER_INSUFFICIENT_COMPLEXITY;
+ $data['errormessage'] .= _SECURITYENFORCER_MIN_PWD_LENGTH . $this->pwd_min_length;
+ $data['errormessage'] .= _SECURITYENFORCER_PWD_COMPLEXITY . $this->pwd_complexity . "<br /><br />\n";
+ $data['valid'] = false;
+ }
+ }
+ }
+
+ function event_CustomLogin(&$data) {
+ //login,password,success,allowlocal
+ if ($this->enable_security == 'yes' && $this->max_failed_login > 0) {
+ global $_SERVER;
+ $login = $data['login'];
+ $ip = $_SERVER['REMOTE_ADDR'];
+ sql_query("DELETE FROM ".sql_table('plug_securityenforcer')." WHERE lastfail < ".(time() - ($this->login_lockout * 60)));
+ $query = "SELECT fails as result FROM ".sql_table('plug_securityenforcer')." ";
+// $query .= "WHERE login='".addslashes($login)."'";
+ $query .= "WHERE login='".mysql_real_escape_string($login)."'";
+ $flogin = quickQuery($query);
+ $query = "SELECT fails as result FROM ".sql_table('plug_securityenforcer')." ";
+// $query .= "WHERE login='".addslashes($ip)."'";
+ $query .= "WHERE login='".mysql_real_escape_string($ip)."'";
+ $fip = quickQuery($query);
+ if ($flogin >= $this->max_failed_login || $fip >= $this->max_failed_login) {
+ $data['success'] = 0;
+ $data['allowlocal'] = 0;
+// ACTIONLOG::add(INFO, 'login disallowed by NP_SecurityEnforcer. login: '.htmlentities($login).', ip: '.htmlentities($ip) );
+ $info = sprintf(_SECURITYENFORCER_LOGIN_DISALLOWED, htmlspecialchars($login), htmlspecialchars($ip));
+ ACTIONLOG::add(INFO, $info);
+ }
+ }
+ }
+
+ function event_LoginSuccess(&$data) {
+ //member(obj),username
+ if ($this->enable_security == 'yes' && $this->max_failed_login > 0) {
+ global $_SERVER;
+ $login = $data['username'];
+ $ip = $_SERVER['REMOTE_ADDR'];
+// sql_query("DELETE FROM ".sql_table('plug_securityenforcer')." WHERE login='".addslashes($login)."'");
+ sql_query("DELETE FROM ".sql_table('plug_securityenforcer')." WHERE login='".mysql_real_escape_string($login)."'");
+// sql_query("DELETE FROM ".sql_table('plug_securityenforcer')." WHERE login='".addslashes($ip)."'");
+ sql_query("DELETE FROM ".sql_table('plug_securityenforcer')." WHERE login='".mysql_real_escape_string($ip)."'");
+ }
+ }
+
+ function event_LoginFailed(&$data) {
+ //username
+ if ($this->enable_security == 'yes' && $this->max_failed_login > 0) {
+ global $_SERVER;
+ $login = $data['username'];
+ $ip = $_SERVER['REMOTE_ADDR'];
+ //sql_table('plug_securityenforcer')
+// $lres = sql_query("SELECT * FROM ".sql_table('plug_securityenforcer')." WHERE login='".addslashes($login)."'");
+ $lres = sql_query("SELECT * FROM ".sql_table('plug_securityenforcer')." WHERE login='".mysql_real_escape_string($login)."'");
+ if (mysql_num_rows($lres)) {
+// sql_query("UPDATE ".sql_table('plug_securityenforcer')." SET fails=fails+1, lastfail=".time()." WHERE login='".addslashes($login)."'");
+ sql_query("UPDATE ".sql_table('plug_securityenforcer')." SET fails=fails+1, lastfail=".time()." WHERE login='".mysql_real_escape_string($login)."'");
+ }
+ else {
+// sql_query("INSERT INTO ".sql_table('plug_securityenforcer')." (login,fails,lastfail) VALUES ('".addslashes($login)."',1,".time().")");
+ sql_query("INSERT INTO ".sql_table('plug_securityenforcer')." (login,fails,lastfail) VALUES ('".mysql_real_escape_string($login)."',1,".time().")");
+ }
+ $lres = sql_query("SELECT * FROM ".sql_table('plug_securityenforcer')." WHERE login='".addslashes($ip)."'");
+ if (mysql_num_rows($lres)) {
+// sql_query("UPDATE ".sql_table('plug_securityenforcer')." SET fails=fails+1, lastfail=".time()." WHERE login='".addslashes($ip)."'");
+ sql_query("UPDATE ".sql_table('plug_securityenforcer')." SET fails=fails+1, lastfail=".time()." WHERE login='".mysql_real_escape_string($ip)."'");
+ }
+ else {
+// sql_query("INSERT INTO ".sql_table('plug_securityenforcer')." (login,fails,lastfail) VALUES ('".addslashes($ip)."',1,".time().")");
+ sql_query("INSERT INTO ".sql_table('plug_securityenforcer')." (login,fails,lastfail) VALUES ('".mysql_real_escape_string($ip)."',1,".time().")");
+ }
+ }
+ }
+
+ /* Helper Functions */
+
+ function _validate_passwd($passwd,$minlength = 6,$complexity = 0) {
+ $minlength = intval($minlength);
+ $complexity = intval($complexity);
+
+ if ($minlength < 6 ) $minlength = 6;
+ if (strlen($passwd) < $minlength) return false;
+
+ if ($complexity > 4) $complexity = 4;
+ $ucchars = "[A-Z]";
+ $lcchars = "[a-z]";
+ $numchars = "[0-9]";
+ $ochars = "[-~!@#$%^&*()_+=,.<>?:;|]";
+ $chartypes = array($ucchars, $lcchars, $numchars, $ochars);
+ $tot = array(0,0,0,0);
+ $i = 0;
+ foreach ($chartypes as $value) {
+ $tot[$i] = preg_match("/".$value."/", $passwd);
+ $i = $i + 1;
+ }
+
+ if (array_sum($tot) >= $complexity) return true;
+ else return false;
+ }
+}
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/** English language file for NP_SECURITYENFORCER Plugin\r
+*/\r
+\r
+// Plugin Options\r
+define('_SECURITYENFORCER_OPT_QUICKMENU', 'Show Admin Area in quick menu?');\r
+define('_SECURITYENFORCER_OPT_DEL_UNINSTALL_DATA', 'Delete NP_SecurityEnforcer data table on uninstall?');\r
+define('_SECURITYENFORCER_OPT_ENABLE', 'Enable NP_SecurityEnforcer password and login checks?');\r
+define('_SECURITYENFORCER_OPT_PWD_MIN_LENGTH', 'Minimum Length in characters of a user password. Integer. 8 is the default and 6 the minimum value: ');\r
+define('_SECURITYENFORCER_OPT_PWD_COMPLEXITY', 'Password Complexity Check. (How many character types should be present out of a-z, A-Z, 0-9, punctuation marks?):');\r
+define('_SECURITYENFORCER_OPT_SELECT_OFF_COMP', 'Off');\r
+define('_SECURITYENFORCER_OPT_SELECT_ONE_COMP', 'One character type');\r
+define('_SECURITYENFORCER_OPT_SELECT_TWO_COMP', 'Two character types');\r
+define('_SECURITYENFORCER_OPT_SELECT_THREE_COMP', 'Three character types');\r
+define('_SECURITYENFORCER_OPT_SELECT_FOUR_COMP', 'Four character types');\r
+define('_SECURITYENFORCER_OPT_MAX_FAILED_LOGIN', 'How many failed login attempts before locking the user account?');\r
+define('_SECURITYENFORCER_OPT_LOGIN_LOCKOUT', 'After how many minutes should a locked account be released?');\r
+\r
+\r
+//QuickMenu\r
+define('_SECURITYENFORCER_ADMIN_TOOLTIP', 'Manage NP_SecurityEnforcer Plugin');\r
+define('_SECURITYENFORCER_ADMIN_UNLOCKED', ' has been unlocked. Remember to unlock the corresponding IP or Login Name.');\r
+define('_SECURITYENFORCER_ADMIN_NONE_LOCKED', 'No Records Found.');\r
+\r
+// ERRORS\r
+define('_SECURITYENFORCER_INSUFFICIENT_COMPLEXITY', 'This password does not meet site requirements for length or complexity. <br />');\r
+define('_SECURITYENFORCER_MIN_PWD_LENGTH', '<br />Minimum password length: ');\r
+define('_SECURITYENFORCER_PWD_COMPLEXITY', '<br />Minimum number of character types ([a-z], [A-Z], [0-9], [-~!@#$%^&*()_+=,.<>?:;|]): ');\r
+\r
+//random words\r
+define('_SECURITYENFORCER_UNLOCK', 'Unlock');\r
+define('_SECURITYENFORCER_ENTITY', 'Entity');\r
+define('_SECURITYENFORCER_LOCKED_ENTITIES', 'Currently Locked Entities');\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+\r
+/*\r
+\r
+Admin area for NP_SecurityEnforcer\r
+\r
+*/\r
+\r
+ // if your 'plugin' directory is not in the default location,\r
+ // edit this variable to point to your site directory\r
+ // (where config.php is)\r
+ $strRel = '../../../';\r
+\r
+ include($strRel . 'config.php');\r
+ if (!$member->isAdmin())\r
+ doError('Insufficient Permissions.');\r
+ \r
+\r
+ include($DIR_LIBS . 'PLUGINADMIN.php');\r
+ // some functions\r
+ \r
+ function SE_unlockLogin($login) {\r
+ sql_query("DELETE FROM ".sql_table('plug_securityenforcer')." WHERE login='".addslashes($login)."'");\r
+ }\r
+ \r
+ \r
+ // checks\r
+ \r
+\r
+ \r
+ // create the admin area page\r
+ $oPluginAdmin = new PluginAdmin('SecurityEnforcer');\r
+ // add styles to the <HEAD>\r
+ $oPluginAdmin->start('');\r
+ \r
+ // if form to unlock is posted\r
+ if(postVar('action') == 'unlock') {\r
+ if (!$manager->checkTicket()) \r
+ doError('Invalid Ticket');\r
+ $logins = postVar('unlock');\r
+ $message = '';\r
+ if(is_array($logins)) {\r
+ foreach ($logins as $entity) {\r
+ SE_unlockLogin($entity);\r
+ $message .= '<br />' . $entity . _SECURITYENFORCER_ADMIN_UNLOCKED;\r
+ }\r
+ }\r
+ } \r
+ $plug =& $oPluginAdmin->plugin;\r
+\r
+ // page title\r
+ echo '<h2>Security Enforcer Administration</h2>';\r
+ \r
+ // error output\r
+ if($message) { echo "<p><strong>"; echo $message; echo "</strong></p>"; }\r
+ \r
+ // generate table from all entries in the database\r
+ echo '<h3>'._SECURITYENFORCER_LOCKED_ENTITIES.'</h3>';\r
+ echo '<form action="' . $oPluginAdmin->plugin->getAdminURL() . '" method="POST">';\r
+ echo '<input type="hidden" name="action" value="unlock" />';\r
+ $manager->addTicketHidden();\r
+ echo '<table>';\r
+ echo '<tr><th>'._SECURITYENFORCER_ENTITY.'</th><th>Unlock?</th></tr>';\r
+ echo '<tr><td colspan="2" class="submit"><input type="submit" value="'._SECURITYENFORCER_UNLOCK.'" /></td></tr>';\r
+ // do query to get all entries, loop\r
+ $result = sql_query("SELECT * FROM ".sql_table("plug_securityenforcer")." WHERE fails >= ".$plug->max_failed_login);\r
+ if(mysql_num_rows($result)) {\r
+ while($row = mysql_fetch_assoc($result)) {\r
+ echo '<tr>';\r
+ echo '<td>'.htmlspecialchars($row['login']).'</td>';\r
+ echo '<td><input type="checkbox" name="unlock[]" value="'.htmlspecialchars($row['login']).'" />'._SECURITYENFORCER_UNLOCK.'</td>';\r
+ echo '</tr>';\r
+ }\r
+ }\r
+ else {\r
+ echo '<tr><td colspan="2"><strong>'._SECURITYENFORCER_ADMIN_NONE_LOCKED.'</strong></td></tr>';\r
+ }\r
+ echo '<tr><td colspan="2" class="submit"><input type="submit" value="'._SECURITYENFORCER_UNLOCK.'" /></td></tr>';\r
+ echo '</table>';\r
+ echo '</form>';\r
+ \r
+ $oPluginAdmin->end();\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/** English language file for NP_SECURITYENFORCER Plugin\r
+*/\r
+\r
+// Plugin Options\r
+define('_SECURITYENFORCER_OPT_QUICKMENU', '¥¯¥¤¥Ã¥¯¥á¥Ë¥å¡¼¤Ëɽ¼¨¤·¤Þ¤¹¤«¡©');\r
+define('_SECURITYENFORCER_OPT_DEL_UNINSTALL_DATA', '¥¢¥ó¥¤¥ó¥¹¥È¡¼¥ë»þ¤Ë¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¥Æ¡¼¥Ö¥ë¤òºï½ü¤·¤Þ¤¹¤«¡©');\r
+define('_SECURITYENFORCER_OPT_ENABLE', '¥Ñ¥¹¥ï¡¼¥É¤Î¥Á¥§¥Ã¥¯¤È¥í¥°¥¤¥ó¥Á¥§¥Ã¥¯¤Î¤È¤¤ËSecurityEnforcer¤ò͸ú¤Ë¤·¤Þ¤¹¤«¡©');\r
+define('_SECURITYENFORCER_OPT_PWD_MIN_LENGTH', '¥Ñ¥¹¥ï¡¼¥É¤ÎºÇ¾®Ê¸»ú¿ô(¥Ç¥Õ¥©¥ë¥È¤Ï8ʸ»ú¡£6ʸ»ṳ́Ëþ¤Ë¤Ï»ØÄê¤Ç¤¤Þ¤»¤ó¡§');\r
+define('_SECURITYENFORCER_OPT_PWD_COMPLEXITY', '¥Ñ¥¹¥ï¡¼¥É¶¯Å٤ΥÁ¥§¥Ã¥¯(a-z, A-Z, 0-9, ¶çÆÉÅÀ°Ê³°¤Ë²¿¼ïÎà¤Îʸ»ú¥¿¥¤¥×¤¬Â¸ºß¤¹¤ë¤Ù¤¤Ç¤¹¤«?):');\r
+define('_SECURITYENFORCER_OPT_SELECT_OFF_COMP', 'Off');\r
+define('_SECURITYENFORCER_OPT_SELECT_ONE_COMP', '°ì¤ÄÌܤÎʸ»ú¥¿¥¤¥×');\r
+define('_SECURITYENFORCER_OPT_SELECT_TWO_COMP', 'Æó¤ÄÌܤÎʸ»ú¥¿¥¤¥×');\r
+define('_SECURITYENFORCER_OPT_SELECT_THREE_COMP', '»°¤ÄÌܤÎʸ»ú¥¿¥¤¥×');\r
+define('_SECURITYENFORCER_OPT_SELECT_FOUR_COMP', '»Í¤ÄÌܤÎʸ»ú¥¿¥¤¥×');\r
+define('_SECURITYENFORCER_OPT_MAX_FAILED_LOGIN', '²¿ÅÙÌÜ¤Î¥í¥°¥¤¥ó¼ºÇԤǥ¢¥«¥¦¥ó¥È¤ò¥í¥Ã¥¯¤·¤Þ¤¹¤«¡©');\r
+define('_SECURITYENFORCER_OPT_LOGIN_LOCKOUT', '¥¢¥«¥¦¥ó¥È¤ò¥í¥Ã¥¯¤·¤Æ¤«¤é²¿Ê¬¤Ç¥í¥Ã¥¯²ò½ü¤·¤Þ¤¹¤«¡©');\r
+\r
+\r
+// QuickMenu\r
+define('_SECURITYENFORCER_ADMIN_TOOLTIP', 'SecurityEnforcer¥×¥é¥°¥¤¥ó¤Î´ÉÍý');\r
+define('_SECURITYENFORCER_ADMIN_UNLOCKED', '¥í¥Ã¥¯²ò½ü¤µ¤ì¤Þ¤·¤¿¡£Âбþ¤¹¤ë£É£Ð¥¢¥É¥ì¥¹¡¢¤Þ¤¿¤Ï¥í¥°¥¤¥ó̾¤Î¥í¥Ã¥¯¤ò²ò½ü¤¹¤ë¤Î¤ò˺¤ì¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£');\r
+define('_SECURITYENFORCER_ADMIN_NONE_LOCKED', '³ºÅö¤Ê¤·');\r
+\r
+// ERRORS\r
+define('_SECURITYENFORCER_INSUFFICIENT_COMPLEXITY', 'ÆþÎϤµ¤ì¤¿¥Ñ¥¹¥ï¡¼¥É¤Ï¡¢¤³¤Î¥µ¥¤¥È¤ÇÍ׵ᤵ¤ì¤ëʸ»ú¿ô¡¢¤Þ¤¿¤Ï¶¯ÅÙ¤òËþ¤¿¤·¤Æ¤¤¤Þ¤»¤ó¡£<br />');\r
+define('_SECURITYENFORCER_MIN_PWD_LENGTH', '<br />¥Ñ¥¹¥ï¡¼¥É¤¬Ã»¤¹¤®¤Þ¤¹¡§');\r
+define('_SECURITYENFORCER_PWD_COMPLEXITY', '<br />ʸ»ú¥¿¥¤¥×¤¬¾¯¤Ê¤¹¤®¤Þ¤¹([a-z], [A-Z], [0-9], [-~!@#$%^&*()_+=,.<>?:;|]): ');\r
+\r
+// random words\r
+define('_SECURITYENFORCER_UNLOCK', '¥¢¥ó¥í¥Ã¥¯');\r
+define('_SECURITYENFORCER_ENTITY', '¥¨¥ó¥Æ¥£¥Æ¥£');\r
+define('_SECURITYENFORCER_LOCKED_ENTITIES', '¸½ºß¥í¥Ã¥¯Ãæ¤Î¥¨¥ó¥Æ¥£¥Æ¥£');\r
+\r
+// Plugin desc\r
+define('_SECURITYENFORCER_DESCRIPTION', '¥Ñ¥¹¥ï¡¼¥É¤ÎºÇ¾®Ê¸»ú¿ô¤ä¶¯ÅÙ¤ÎÀ©¸Â¡¢¥í¥°¥¤¥ó¼ºÇÔ²Äǽ²ó¿ô¤Ê¤É¤òÀßÄꤷ¤Þ¤¹');\r
+\r
+// Log info\r
+define('_SECURITYENFORCER_LOGIN_DISALLOWED', '¥ê¥â¡¼¥È¥Û¥¹¥È¡Ö%2$s¡×¤«¤é¤Î¥í¥°¥¤¥ó̾¡Ö%1$s¡×¤Î¥í¥°¥¤¥ó¤ÏSecurityEnforcer¥×¥é¥°¥¤¥ó¤Ë¤è¤Ã¤ÆµñÀ䤵¤ì¤Þ¤·¤¿');\r
+\r
+?>
\ No newline at end of file
--- /dev/null
+<?php\r
+/** English language file for NP_SECURITYENFORCER Plugin\r
+*/\r
+\r
+// Plugin Options\r
+define('_SECURITYENFORCER_OPT_QUICKMENU', 'クイックメニューに表示しますか?');\r
+define('_SECURITYENFORCER_OPT_DEL_UNINSTALL_DATA', 'アンインストール時にデータベースのテーブルを削除しますか?');\r
+define('_SECURITYENFORCER_OPT_ENABLE', 'パスワードのチェックとログインチェックのときにSecurityEnforcerを有効にしますか?');\r
+define('_SECURITYENFORCER_OPT_PWD_MIN_LENGTH', 'パスワードの最小文字数(デフォルトは8文字。6文字未満には指定できません:');\r
+define('_SECURITYENFORCER_OPT_PWD_COMPLEXITY', 'パスワード強度のチェック(a-z, A-Z, 0-9, 句読点以外に何種類の文字タイプが存在するべきですか?):');\r
+define('_SECURITYENFORCER_OPT_SELECT_OFF_COMP', 'Off');\r
+define('_SECURITYENFORCER_OPT_SELECT_ONE_COMP', '一つ目の文字タイプ');\r
+define('_SECURITYENFORCER_OPT_SELECT_TWO_COMP', '二つ目の文字タイプ');\r
+define('_SECURITYENFORCER_OPT_SELECT_THREE_COMP', '三つ目の文字タイプ');\r
+define('_SECURITYENFORCER_OPT_SELECT_FOUR_COMP', '四つ目の文字タイプ');\r
+define('_SECURITYENFORCER_OPT_MAX_FAILED_LOGIN', '何度目のログイン失敗でアカウントをロックしますか?');\r
+define('_SECURITYENFORCER_OPT_LOGIN_LOCKOUT', 'アカウントをロックしてから何分でロック解除しますか?');\r
+\r
+\r
+// QuickMenu\r
+define('_SECURITYENFORCER_ADMIN_TOOLTIP', 'SecurityEnforcerプラグインの管理');\r
+define('_SECURITYENFORCER_ADMIN_UNLOCKED', 'ロック解除されました。対応するIPアドレス、またはログイン名のロックを解除するのを忘れないでください。');\r
+define('_SECURITYENFORCER_ADMIN_NONE_LOCKED', '該当なし');\r
+\r
+// ERRORS\r
+define('_SECURITYENFORCER_INSUFFICIENT_COMPLEXITY', '入力されたパスワードは、このサイトで要求される文字数、または強度を満たしていません。<br />');\r
+define('_SECURITYENFORCER_MIN_PWD_LENGTH', '<br />パスワードが短すぎます:');\r
+define('_SECURITYENFORCER_PWD_COMPLEXITY', '<br />文字タイプが少なすぎます([a-z], [A-Z], [0-9], [-~!@#$%^&*()_+=,.<>?:;|]): ');\r
+\r
+// random words\r
+define('_SECURITYENFORCER_UNLOCK', 'アンロック');\r
+define('_SECURITYENFORCER_ENTITY', 'エンティティ');\r
+define('_SECURITYENFORCER_LOCKED_ENTITIES', '現在ロック中のエンティティ');\r
+\r
+// Plugin desc\r
+define('_SECURITYENFORCER_DESCRIPTION', 'パスワードの最小文字数や強度の制限、ログイン失敗可能回数などを設定します');\r
+\r
+// Log info\r
+define('_SECURITYENFORCER_LOGIN_DISALLOWED', 'リモートホスト「%2$s」からのログイン名「%1$s」のログインはSecurityEnforcerプラグインによって拒絶されました');\r
+\r
+?>
\ No newline at end of file