1
0
mirror of https://github.com/monstra-cms/monstra.git synced 2025-08-13 16:44:53 +02:00

Add Monstra from HG Commit 683dcb70c4cc

This commit is contained in:
Awilum
2012-09-25 19:09:50 +03:00
parent d2db42b2bb
commit 4a5fea5f5b
251 changed files with 35026 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
<?php
Navigation::add(__('Information', 'information'), 'system', 'information', 5);
class InformationAdmin extends Backend {
/**
* Information main function
*/
public static function main() {
// Display view
View::factory('box/information/views/backend/index')->display();
}
}

View File

@@ -0,0 +1,31 @@
<?php
/**
* Information plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012 Romanenko Sergey / Awilum
* @version 1.0.0
*
*/
// Register plugin
Plugin::register( __FILE__,
__('Information', 'information'),
__('Information plugin', 'information'),
'1.0.0',
'Awilum',
'http://monstra.org/',
null,
'box');
if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) {
// Include Information Admin
Plugin::Admin('information', 'box');
}

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<root>
<plugin_location>plugins/box/information/information.plugin.php</plugin_location>
<plugin_status>active</plugin_status>
<plugin_priority>7</plugin_priority>
<plugin_name>Information</plugin_name>
<plugin_description>Information plugin</plugin_description>
<plugin_version>1.0.0</plugin_version>
<plugin_author>Awilum</plugin_author>
<plugin_author_uri>http://awilum.webdevart.ru/</plugin_author_uri>
</root>

View File

@@ -0,0 +1,27 @@
<?php
return array(
'information' => array(
'Information' => 'Information',
'Debuging' => 'Debuging',
'Name' => 'Name',
'Value' => 'Value',
'Security' => 'Security',
'System' => 'System',
'on' => 'on',
'off'=> 'off',
'System version' => 'System version',
'System version ID' => 'System version ID',
'Security check results' => 'Security check results',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.',
'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>
'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod -R a-w :path</code>',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>',
'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.',
'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.',
)
);

View File

@@ -0,0 +1,27 @@
<?php
return array(
'information' => array(
'Information' => 'Информация',
'Debuging' => 'Дебагинг',
'Name' => 'Название',
'Value' => 'Значение',
'Security' => 'Безопасность',
'System' => 'Система',
'on' => 'включен',
'off'=> 'выключен',
'System version' => 'Версия системы',
'System version ID' => 'Версия системы ID',
'Security check results' => 'Результаты проверки безопасности',
'The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.' =>
'Конфигурационный файл доступен для записи. Мы рекомендуем вам удалить права записи на файл defines.php на живом сайте.',
'The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod -R a-w :path</code>' =>
'Директория Monstra (":path") доступна для записи. Мы рекомендуем вам удалить права записи на директорию (":path") на живом сайте. <br/> Вы можете сделать это на UNIX системах так: <code>chmod -R a-w :path</code>',
'The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>
'Главный .htaccess доступен для записи. Мы рекомендуем вам удалить права записи на главный .htaccess файл. <br/> Вы можете сделать это на UNIX системах так: <code>chmod -R a-w :path</code>',
'The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>' =>
'Главный index.php файл доступен для записи. Мы рекомендуем вам удалить права записи на главный index.php файл. <br/> Вы можете сделать это на UNIX системах так: <code>chmod -R a-w :path</code>',
'Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.' =>
'Система работает в режиме Core::DEVELOPMENT Мы рекомендуем вам установить режим Core::PRODUCTION на живом сайте.',
)
);

View File

@@ -0,0 +1,89 @@
<h2><?php echo __('Information', 'information'); ?></h2>
<br />
<div class="tabbable">
<ul class="nav nav-tabs">
<li class="active"><a href="#system" data-toggle="tab"><?php echo __('System', 'information'); ?></a></li>
<li><a href="#security" data-toggle="tab"><?php echo __('Security', 'information'); ?></a></li>
</ul>
<div class="tab-content">
<div class="tab-pane active" id="system">
<table class="table table-bordered">
<thead>
<tr>
<td><?php echo __('Name', 'information'); ?></td>
<td><?php echo __('Value', 'information'); ?></td>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo __('System version', 'information'); ?></td>
<td><?php echo MONSTRA_VERSION; ?></td>
</tr>
<tr>
<td><?php echo __('System version ID', 'information'); ?></td>
<td><?php echo MONSTRA_VERSION_ID; ?></td>
</tr>
<tr>
<td><?php echo __('GZIP', 'information'); ?></td>
<td><?php if (MONSTRA_GZIP) { echo __('on', 'information'); } else { echo __('off', 'information'); } ?></td>
</tr>
<tr>
<td><?php echo __('Debuging', 'information'); ?></td>
<td><?php if (Core::$environment == Core::DEVELOPMENT) { echo __('on', 'information'); } else { echo __('off', 'information'); } ?></td>
</tr>
</tbody>
</table>
</div>
<div class="tab-pane" id="security">
<?php clearstatcache(); ?>
<table class="table table-bordered">
<thead>
<tr>
<td colspan="2"><?php echo __('Security check results', 'information'); ?></td>
</tr>
</thead>
<tbody>
<?php if (File::writable(BOOT . DS . 'defines.php')) { ?>
<tr>
<td><span class="badge badge-error" style="padding-left:5px; padding-right:5px;"><b>!</b></span> </td>
<td><?php echo __('The configuration file has been found to be writable. We would advise you to remove all write permissions on defines.php on production systems.', 'information'); ?></td>
</tr>
<?php } ?>
<?php if (File::writable(MONSTRA . DS)) { ?>
<tr>
<td><span class="badge badge-error" style="padding-left:5px; padding-right:5px;"><b>!</b></span> </td>
<td><?php echo __('The Monstra core directory (":path") and/or files underneath it has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod -R a-w :path</code>', 'information', array(':path' => MONSTRA . DS)); ?></td>
</tr>
<?php } ?>
<?php if (File::writable(ROOT . DS . '.htaccess')) { ?>
<tr>
<td><span class="badge badge-error" style="padding-left:5px; padding-right:5px;"><b>!</b></span> </td>
<td><?php echo __('The Monstra .htaccess file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>', 'information', array(':path' => ROOT . DS . '.htaccess')); ?></td>
</tr>
<?php } ?>
<?php if (File::writable(ROOT . DS . 'index.php')) { ?>
<tr>
<td><span class="badge badge-error" style="padding-left:5px; padding-right:5px;"><b>!</b></span> </td>
<td><?php echo __('The Monstra index.php file has been found to be writable. We would advise you to remove all write permissions. <br/>You can do this on unix systems with: <code>chmod a-w :path</code>', 'information', array(':path' => ROOT . DS . 'index.php')); ?></td>
</tr>
<?php } ?>
<?php if (Core::$environment == Core::DEVELOPMENT) { ?>
<tr>
<td><span class="badge badge-warning" style="padding-left:5px; padding-right:5px;"><b>!</b></span> </td>
<td><?php echo __('Due to the type and amount of information an error might give intruders when Core::$environment = Core::DEVELOPMENT, we strongly advise setting Core::PRODUCTION in production systems.', 'information'); ?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>