mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-07-31 18:30:20 +02:00
Add Monstra from HG Commit 683dcb70c4cc
This commit is contained in:
153
admin/index.php
Normal file
153
admin/index.php
Normal file
@@ -0,0 +1,153 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Admin module
|
||||
*
|
||||
* @package Monstra
|
||||
* @author Romanenko Sergey / Awilum [awilum@msn.com]
|
||||
* @copyright 2012 Romanenko Sergey / Awilum
|
||||
* @version $Id$
|
||||
* @since 1.0.0
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* Monstra is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYING.txt for copyright notices and details.
|
||||
*/
|
||||
|
||||
|
||||
// Main engine defines
|
||||
define('DS', DIRECTORY_SEPARATOR);
|
||||
define('ROOT', rtrim(str_replace(array('admin'), array(''), dirname(__FILE__)), '\\/'));
|
||||
define('BACKEND', true);
|
||||
define('MONSTRA_ACCESS', true);
|
||||
|
||||
// Load bootstrap file
|
||||
require_once(ROOT . DS . 'monstra' . DS . 'bootstrap.php');
|
||||
|
||||
// Errors var when users login failed
|
||||
$login_error = '';
|
||||
|
||||
// Admin login
|
||||
if (Request::post('login_submit')) {
|
||||
|
||||
// Sleep MONSTRA_LOGIN_SLEEP seconds for blocking Brute Force Attacks
|
||||
sleep(MONSTRA_LOGIN_SLEEP);
|
||||
|
||||
// Get users Table
|
||||
$users = new Table('users');
|
||||
$user = $users->select("[login='" . trim(Request::post('login')) . "']", null);
|
||||
if (count($user) !== 0) {
|
||||
if ($user['login'] == Request::post('login')) {
|
||||
if (trim($user['password']) == Security::encryptPassword(Request::post('password'))) {
|
||||
if ($user['role'] == 'admin' || $user['role'] == 'editor') {
|
||||
Session::set('admin', true);
|
||||
Session::set('user_id', (int)$user['id']);
|
||||
Session::set('user_login', (string)$user['login']);
|
||||
Session::set('user_role', (string)$user['role']);
|
||||
Request::redirect('index.php');
|
||||
}
|
||||
} else {
|
||||
$login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$login_error = __('Wrong <b>username</b> or <b>password</b>', 'users');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Errors
|
||||
$errors = array();
|
||||
|
||||
// Reset password
|
||||
if (Request::post('reset_password_submit')) {
|
||||
|
||||
// Get users Table
|
||||
$users = new Table('users');
|
||||
|
||||
// Get user
|
||||
$user = $users->select("[login='" . trim(Request::post('login')) . "']", null);
|
||||
|
||||
// Check
|
||||
if (count($user) == 0) $errors['users_doesnt_exist'] = __('This user does not exist', 'users');
|
||||
if (Option::get('captcha_installed') == 'true' && ! CryptCaptcha::check(Request::post('answer'))) $errors['users_captcha_wrong'] = __('Captcha code is wrong', 'captcha');
|
||||
|
||||
// If Errors Count is 0
|
||||
if (count($errors) == 0) {
|
||||
|
||||
// Generate new password
|
||||
$new_password = Text::random('alnum', 6);
|
||||
|
||||
// Update user profile
|
||||
$users->updateWhere("[login='" . trim(Request::post('login')) . "']", array('password' => Security::encryptPassword($new_password)));
|
||||
|
||||
// Message
|
||||
$message = "Login: {$user['login']}\nNew Password: {$new_password}";
|
||||
|
||||
// Send
|
||||
@mail($user['email'], 'MonstraPasswordReset', $message);
|
||||
|
||||
}
|
||||
|
||||
Notification::setNow('reset_password_error', 'reset_password_error');
|
||||
}
|
||||
|
||||
// If admin user is login = true then set is_admin = true
|
||||
if (Session::exists('admin')) {
|
||||
if (Session::get('admin') == true) {
|
||||
$is_admin = true;
|
||||
}
|
||||
} else {
|
||||
$is_admin = false;
|
||||
}
|
||||
|
||||
// Logout user from system
|
||||
if (Request::get('logout') && Request::get('logout') == 'do') {
|
||||
Session::destroy();
|
||||
}
|
||||
|
||||
// If is admin then load admin area
|
||||
if ($is_admin) {
|
||||
// If id is empty then redirect to default plugin PAGES
|
||||
if (Request::get('id')) {
|
||||
if (Request::get('sub_id')) {
|
||||
$area = Request::get('sub_id');
|
||||
} else {
|
||||
$area = Request::get('id');
|
||||
}
|
||||
} else {
|
||||
Request::redirect('index.php?id=pages');
|
||||
}
|
||||
|
||||
$plugins_registered = Plugin::$plugins;
|
||||
foreach ($plugins_registered as $plugin) {
|
||||
$plugins_registered_areas[] = $plugin['id'];
|
||||
}
|
||||
|
||||
// Show plugins admin area only for registered plugins
|
||||
if (in_array($area, $plugins_registered_areas)) {
|
||||
$plugin_admin_area = true;
|
||||
} else {
|
||||
$plugin_admin_area = false;
|
||||
}
|
||||
|
||||
// Backend pre render
|
||||
Action::run('admin_pre_render');
|
||||
|
||||
// Display admin template
|
||||
require('themes' . DS . Option::get('theme_admin_name') . DS . 'index.template.php');
|
||||
|
||||
// Backend post render
|
||||
Action::run('admin_post_render');
|
||||
|
||||
} else {
|
||||
|
||||
// Display login template
|
||||
require('themes' . DS . Option::get('theme_admin_name') . DS . 'login.template.php');
|
||||
|
||||
}
|
||||
|
||||
// Flush (send) the output buffer and turn off output buffering
|
||||
ob_end_flush();
|
445
admin/themes/default/css/default.css
Normal file
445
admin/themes/default/css/default.css
Normal file
@@ -0,0 +1,445 @@
|
||||
/************************************
|
||||
Monstra
|
||||
http://monstra.org
|
||||
styles.css, v1.0.0
|
||||
12 Septemper 2012
|
||||
*************************************
|
||||
CONTENTS
|
||||
1. GENERAL
|
||||
2. HEADER
|
||||
3. CONTENT
|
||||
4. LEFT MENU
|
||||
5. AUTHORIZATION
|
||||
6. TABLE
|
||||
7. BUTTONS
|
||||
8. TABS
|
||||
9. MISC
|
||||
|
||||
|
||||
*************************************
|
||||
1. GENERAL
|
||||
*************************************/
|
||||
|
||||
body {
|
||||
padding-top: 60px;
|
||||
margin: 0;
|
||||
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
line-height: 18px;
|
||||
color: #333333;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin: 0;
|
||||
font-family: inherit;
|
||||
font-weight: bold;
|
||||
color: inherit;
|
||||
text-rendering: optimizelegibility;
|
||||
}
|
||||
h1 small,
|
||||
h2 small,
|
||||
h3 small,
|
||||
h4 small,
|
||||
h5 small,
|
||||
h6 small {
|
||||
font-weight: normal;
|
||||
color: #999999;
|
||||
}
|
||||
h1 {
|
||||
font-size: 30px;
|
||||
line-height: 36px;
|
||||
}
|
||||
h1 small {
|
||||
font-size: 18px;
|
||||
}
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
line-height: 36px;
|
||||
}
|
||||
h2 small {
|
||||
font-size: 18px;
|
||||
}
|
||||
h3 {
|
||||
line-height: 27px;
|
||||
font-size: 16px;
|
||||
}
|
||||
h3 small {
|
||||
font-size: 14px;
|
||||
}
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
line-height: 18px;
|
||||
}
|
||||
h4 {
|
||||
font-size: 14px;
|
||||
}
|
||||
h4 small {
|
||||
font-size: 12px;
|
||||
}
|
||||
h5 {
|
||||
font-size: 12px;
|
||||
}
|
||||
h6 {
|
||||
font-size: 11px;
|
||||
color: #999999;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
/**************************************
|
||||
2. HEADER
|
||||
*************************************/
|
||||
|
||||
.monstra-header {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin-top:-60px;
|
||||
position: relative;
|
||||
z-index:999;
|
||||
}
|
||||
.monstra-header h3 a:hover, .monstra-header .brand:hover, .monstra-header ul .active > a {
|
||||
color: #ffffff;
|
||||
text-decoration: none;
|
||||
}
|
||||
.monstra-header h3 {
|
||||
position: relative;
|
||||
}
|
||||
.monstra-header h3 a, .monstra-header .brand {
|
||||
float: left;
|
||||
display: block;
|
||||
padding-top:6px;
|
||||
padding-left:1px;
|
||||
margin-left: 0px;
|
||||
color: #fdfdfd;
|
||||
font-family: arial;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
font-size: 24px;
|
||||
text-shadow: 0 1px 2px rgba(0,0,0,.5);
|
||||
width:188px;
|
||||
}
|
||||
.monstra-header p {
|
||||
margin: 0;
|
||||
line-height: 60px;
|
||||
}
|
||||
|
||||
.monstra-header-inner, .topbar .fill {
|
||||
background-color: #ccc;
|
||||
background: url('@theme_admin_url/img/header.png');
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
/*************************************
|
||||
3. CONTENT
|
||||
*************************************/
|
||||
|
||||
.monstra-content {
|
||||
padding-top:20px;
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
4. LEFT MENU
|
||||
*************************************/
|
||||
|
||||
.monstra-menu-category-separator {
|
||||
border: 0;
|
||||
border-bottom: 1px solid #ccc;
|
||||
margin-top:5px;
|
||||
margin-bottom:8px;
|
||||
}
|
||||
|
||||
.monstra-menu-sidebar {
|
||||
background: url('@theme_admin_url/img/sidebar_bg.png');
|
||||
background-color:#ccc;
|
||||
max-width:192px!important;
|
||||
min-width:136px!important;
|
||||
margin-bottom: 20px;
|
||||
padding: 19px;
|
||||
border-bottom:2px solid #ccc;
|
||||
}
|
||||
|
||||
.monstra-menu-sidebar ul {
|
||||
clear: both;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-family: 'lucida grande','Lucida Sans Unicode', Tahoma, sans-serif;
|
||||
}
|
||||
|
||||
.monstra-menu-sidebar li {
|
||||
list-style: none;
|
||||
margin: 0 0 0 -22px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.monstra-menu-sidebar li a {
|
||||
width:97%;
|
||||
color: #333;
|
||||
padding-left: 23px;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
.monstra-menu-sidebar li a.current {
|
||||
color: #000;
|
||||
padding-top:3px;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
background-color: #e6e6e6;
|
||||
background-repeat: no-repeat;
|
||||
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
|
||||
background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
|
||||
background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
|
||||
background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
|
||||
background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
|
||||
background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
|
||||
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
||||
line-height: normal;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom-color: #bbb;
|
||||
border-right:2px solid #ccc;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||
-webkit-transition: 0.1s linear all;
|
||||
-moz-transition: 0.1s linear all;
|
||||
-ms-transition: 0.1s linear all;
|
||||
-o-transition: 0.1s linear all;
|
||||
transition: 0.1s linear all;
|
||||
}
|
||||
|
||||
.monstra-menu-sidebar li a:hover {
|
||||
color: #000;
|
||||
background:#fff;
|
||||
}
|
||||
|
||||
.nav-list > .active > a,
|
||||
.nav-list > .active > a:hover {
|
||||
color: #ffffff;
|
||||
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
|
||||
background-color: #0088cc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************
|
||||
5. AUTHORIZATION
|
||||
*************************************/
|
||||
|
||||
.authorization-block {
|
||||
margin: 0 auto;
|
||||
float: none!important;
|
||||
}
|
||||
|
||||
.authorization-block-footer {
|
||||
margin: 0 auto;
|
||||
float: none!important;
|
||||
margin-top:10px;
|
||||
margin-bottom:10px;
|
||||
}
|
||||
|
||||
.login-body {
|
||||
background:#F2F2F2;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
6. TABLE
|
||||
*************************************/
|
||||
|
||||
table {
|
||||
max-width: 100%;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
background-color: transparent;
|
||||
}
|
||||
.table {
|
||||
width: 100%;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
.table th,
|
||||
.table td {
|
||||
padding: 8px;
|
||||
line-height: 18px;
|
||||
text-align: left;
|
||||
border-top: 1px solid #dddddd;
|
||||
}
|
||||
.table th {
|
||||
font-weight: bold;
|
||||
}
|
||||
.table thead th {
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.table colgroup + thead tr:first-child th,
|
||||
.table colgroup + thead tr:first-child td,
|
||||
.table thead:first-child tr:first-child th,
|
||||
.table thead:first-child tr:first-child td {
|
||||
border-top: 0;
|
||||
}
|
||||
.table tbody + tbody {
|
||||
border-top: 2px solid #dddddd;
|
||||
}
|
||||
.table-condensed th,
|
||||
.table-condensed td {
|
||||
padding: 4px 5px;
|
||||
}
|
||||
.table-bordered {
|
||||
border: 1px solid #dddddd;
|
||||
border-left: 0;
|
||||
border-collapse: separate;
|
||||
*border-collapse: collapsed;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.table-bordered th:first-child,
|
||||
.table-bordered td:first-child {
|
||||
border-left: 1px solid #dddddd;
|
||||
}
|
||||
|
||||
.table-bordered td:first-child {
|
||||
padding-left:15px;
|
||||
}
|
||||
|
||||
.table-bordered thead:first-child tr:first-child th,
|
||||
.table-bordered tbody:first-child tr:first-child th,
|
||||
.table-bordered tbody:first-child tr:first-child td {
|
||||
border-top: 0;
|
||||
}
|
||||
.table-bordered thead:first-child tr:first-child th:first-child,
|
||||
.table-bordered tbody:first-child tr:first-child td:first-child {
|
||||
-webkit-border-radius: 4px 0 0 0;
|
||||
-moz-border-radius: 4px 0 0 0;
|
||||
border-radius: 4px 0 0 0;
|
||||
}
|
||||
.table-bordered thead:first-child tr:first-child th:last-child,
|
||||
.table-bordered tbody:first-child tr:first-child td:last-child {
|
||||
-webkit-border-radius: 0 4px 0 0;
|
||||
-moz-border-radius: 0 4px 0 0;
|
||||
border-radius: 0 4px 0 0;
|
||||
}
|
||||
.table-bordered thead:last-child tr:last-child th:first-child,
|
||||
.table-bordered tbody:last-child tr:last-child td:first-child {
|
||||
-webkit-border-radius: 0 0 0 4px;
|
||||
-moz-border-radius: 0 0 0 4px;
|
||||
border-radius: 0 0 0 4px;
|
||||
}
|
||||
|
||||
.table-bordered thead tr td {
|
||||
font-weight:bold;
|
||||
background-color: #f5f5f5;
|
||||
background-repeat: repeat-x;
|
||||
background-image: -khtml-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5));
|
||||
background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
|
||||
background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5);
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ffffff), color-stop(100%, #f5f5f5));
|
||||
background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
|
||||
background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
|
||||
background-image: linear-gradient(top, #ffffff, #f5f5f5);
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);
|
||||
border-top: 1px solid #fff;
|
||||
}
|
||||
|
||||
.table-bordered thead:last-child tr:last-child th:last-child,
|
||||
.table-bordered tbody:last-child tr:last-child td:last-child {
|
||||
-webkit-border-radius: 0 0 4px 0;
|
||||
-moz-border-radius: 0 0 4px 0;
|
||||
border-radius: 0 0 4px 0;
|
||||
}
|
||||
.table-striped tbody tr:nth-child(odd) td,
|
||||
.table-striped tbody tr:nth-child(odd) th {
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.table tbody tr:hover td,
|
||||
.table tbody tr:hover th {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.table-bordered th, .table-bordered td {
|
||||
border-left: none;
|
||||
}
|
||||
|
||||
|
||||
td, th {
|
||||
display: table-cell;
|
||||
vertical-align: inherit!important;
|
||||
}
|
||||
|
||||
/*************************************
|
||||
7. BUTTONS
|
||||
*************************************/
|
||||
|
||||
.btn-toolbar {
|
||||
margin:0;
|
||||
}
|
||||
|
||||
.btn-group .btn {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.btn-actions-default {
|
||||
-webkit-border-top-left-radius: 4px!important;
|
||||
-moz-border-radius-topleft: 4px!important;
|
||||
border-top-left-radius: 4px!important;
|
||||
-webkit-border-bottom-left-radius: 4px!important;
|
||||
-moz-border-radius-bottomleft: 4px!important;
|
||||
border-bottom-left-radius: 4px!important;
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
8. TABS
|
||||
*************************************/
|
||||
|
||||
.tab-pane > table {
|
||||
margin-top:-18px;
|
||||
}
|
||||
|
||||
.tab-pane > table {
|
||||
border-top:none!important;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
|
||||
/*************************************
|
||||
9. MISC
|
||||
*************************************/
|
||||
|
||||
.small-grey-text {
|
||||
color:#333;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.small-grey-text:hover {
|
||||
color:#000;
|
||||
}
|
||||
|
||||
.small-white-text {
|
||||
color:#fff;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.small-white-text:hover {
|
||||
color:#fdfdfd;
|
||||
}
|
||||
|
||||
.error-none {display:none;}
|
||||
.error {color:red;}
|
||||
.container-fluid {padding-left:0px;}
|
||||
img {max-width:none;}
|
||||
|
BIN
admin/themes/default/img/header.png
Normal file
BIN
admin/themes/default/img/header.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 162 B |
BIN
admin/themes/default/img/overlay.png
Normal file
BIN
admin/themes/default/img/overlay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 70 B |
BIN
admin/themes/default/img/sidebar_bg.png
Normal file
BIN
admin/themes/default/img/sidebar_bg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 183 B |
106
admin/themes/default/index.template.php
Normal file
106
admin/themes/default/index.template.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php if ( ! defined('MONSTRA_ACCESS')) exit('No direct script access allowed'); ?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Monstra :: <?php echo __('Administration', 'system'); ?></title>
|
||||
<meta name="description" content="Monstra admin area" />
|
||||
<link rel="icon" href="<?php echo Option::get('siteurl'); ?>favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="<?php echo Option::get('siteurl'); ?>favicon.ico" type="image/x-icon" />
|
||||
|
||||
<!-- Styles -->
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap.css', 'backend', 1); ?>
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap-responsive.css', 'backend', 2); ?>
|
||||
<?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 3); ?>
|
||||
<?php Stylesheet::load(); ?>
|
||||
|
||||
<!-- JavaScripts -->
|
||||
<?php Javascript::add('public/assets/js/jquery.js', 'backend', 1); ?>
|
||||
<?php Javascript::add('public/assets/js/bootstrap.js', 'backend', 2); ?>
|
||||
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 3); ?>
|
||||
<?php Javascript::load(); ?>
|
||||
|
||||
<?php Action::run('admin_header'); ?>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<link rel="stylesheet" href="css/ie.css" type="text/css" media="screen" />
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Block_topbar -->
|
||||
<div class="monstra-header">
|
||||
<div class="monstra-header-inner">
|
||||
<div class="container-fluid">
|
||||
<a class="brand" href="<?php echo Option::get('siteurl'); ?>admin"><img src="<?php echo Option::get('siteurl'); ?>public/assets/img/monstra-logo-black.png" height="44" width="191"></a>
|
||||
<p class="pull-right">
|
||||
<?php Navigation::draw('top', Navigation::TOP); ?>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /Block_topbar -->
|
||||
|
||||
<!-- Block_container -->
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
<!-- Block_sidebar -->
|
||||
<div class="span2 monstra-menu-sidebar">
|
||||
<h3><?php echo __('Content', 'pages'); ?></h3>
|
||||
<ul>
|
||||
<?php Navigation::draw('content'); ?>
|
||||
</ul>
|
||||
<div class="monstra-menu-category-separator"></div>
|
||||
<?php if (Session::exists('user_role') && in_array(Session::get('user_role'), array('admin'))) { ?>
|
||||
<h3><?php echo __('Extends', 'system'); ?></h3>
|
||||
<ul>
|
||||
<?php Navigation::draw('extends'); ?>
|
||||
</ul>
|
||||
<div class="monstra-menu-category-separator"></div>
|
||||
<?php } ?>
|
||||
<h3><?php echo __('System', 'system'); ?></h3>
|
||||
<ul>
|
||||
<?php Navigation::draw('system'); ?>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- /Block_sidebar -->
|
||||
|
||||
<!-- Block_content -->
|
||||
<div class="span10 monstra-content">
|
||||
|
||||
<div id="update-monstra"></div>
|
||||
<div><?php Action::run('admin_pre_template'); ?></div>
|
||||
<div>
|
||||
<?php
|
||||
if ($plugin_admin_area) {
|
||||
if (is_callable(ucfirst(Plugin::$plugins[$area]['id']).'Admin::main')) {
|
||||
call_user_func(ucfirst(Plugin::$plugins[$area]['id']).'Admin::main');
|
||||
} else {
|
||||
echo '<div class="message-error">'.__('Plugin main admin function does not exist', 'system').'</div>';
|
||||
}
|
||||
} else {
|
||||
echo '<div class="message-error">'.__('Plugin does not exist', 'system').'</div>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<div><?php Action::run('admin_post_template'); ?></div>
|
||||
|
||||
</div>
|
||||
<!-- /Block_content -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Block_footer -->
|
||||
<footer>
|
||||
<p align="right"><span class="badge"><span class="small-white-text">© 2012 <a href="http://monstra.org" class="small-white-text" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo MONSTRA_VERSION; ?></span></span></p>
|
||||
</footer>
|
||||
<!-- /Block_footer -->
|
||||
|
||||
</div>
|
||||
<!-- /Block_container -->
|
||||
|
||||
</body>
|
||||
</html>
|
19
admin/themes/default/js/default.js
Normal file
19
admin/themes/default/js/default.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/**
|
||||
* Monstra JS module
|
||||
* @package Monstra
|
||||
* @author Romanenko Sergey / Awilum
|
||||
* @copyright 2012 Romanenko Sergey / Awilum
|
||||
* @version $Id$
|
||||
* @since 1.0.0
|
||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||
* Monstra is free software. This version may have been modified pursuant
|
||||
* to the GNU General Public License, and as distributed it includes or
|
||||
* is derivative of works licensed under the GNU General Public License or
|
||||
* other free or open source software licenses.
|
||||
* See COPYING.txt for copyright notices and details.
|
||||
* @filesource
|
||||
*/
|
||||
|
||||
|
||||
/* Confirm delete */
|
||||
function confirmDelete(msg){var data=confirm(msg+" ?"); return data;}
|
120
admin/themes/default/login.template.php
Normal file
120
admin/themes/default/login.template.php
Normal file
@@ -0,0 +1,120 @@
|
||||
<?php if ( ! defined('MONSTRA_ACCESS')) exit('No direct script access allowed'); ?><!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Monstra :: <?php echo __('Administration', 'system'); ?></title>
|
||||
<meta name="description" content="Monstra Admin Area">
|
||||
<link rel="icon" href="<?php echo Option::get('siteurl'); ?>favicon.ico" type="image/x-icon" />
|
||||
<link rel="shortcut icon" href="<?php echo Option::get('siteurl'); ?>favicon.ico" type="image/x-icon" />
|
||||
|
||||
<!-- Styles -->
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap.css', 'backend', 1); ?>
|
||||
<?php Stylesheet::add('public/assets/css/bootstrap-responsive.css', 'backend', 2); ?>
|
||||
<?php Stylesheet::add('admin/themes/default/css/default.css', 'backend', 3); ?>
|
||||
<?php Stylesheet::load(); ?>
|
||||
|
||||
<!-- JavaScripts -->
|
||||
<?php Javascript::add('public/assets/js/jquery.js', 'backend', 1); ?>
|
||||
<?php Javascript::add('public/assets/js/bootstrap.js', 'backend', 2); ?>
|
||||
<?php Javascript::add('admin/themes/default/js/default.js', 'backend', 3); ?>
|
||||
<?php Javascript::load(); ?>
|
||||
<script type="text/javascript">
|
||||
$().ready(function () {
|
||||
<?php if (Notification::get('reset_password_error') == 'reset_password_error') { ?>
|
||||
$('.reset-password-area, .administration-btn').show();
|
||||
$('.administration-area, .reset-password-btn').hide();
|
||||
<?php } else { ?>
|
||||
$('.reset-password-area, .administration-btn').hide();
|
||||
$('.administration-area, .reset-password-btn').show();
|
||||
<?php } ?>
|
||||
|
||||
$('.reset-password-btn').click(function() {
|
||||
$('.reset-password-area, .administration-btn').show();
|
||||
$('.administration-area, .reset-password-btn').hide();
|
||||
});
|
||||
|
||||
$('.administration-btn').click(function() {
|
||||
$('.reset-password-area, .administration-btn').hide();
|
||||
$('.administration-area, .reset-password-btn').show();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<?php Action::run('admin_header'); ?>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<link rel="stylesheet" href="css/ie.css" type="text/css" media="screen" />
|
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
<body class="login-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="well span3 authorization-block">
|
||||
<div style="text-align:center;"><a class="brand" href="<?php echo Option::get('siteurl'); ?>admin"><img src="<?php echo Option::get('siteurl'); ?>public/assets/img/monstra-logo-black.png" height="44" width="191"></a></div>
|
||||
<div class="administration-area">
|
||||
<hr>
|
||||
<div>
|
||||
<h2 style="text-align:center;"><?php echo __('Administration', 'system'); ?></h2><br />
|
||||
<form method="post">
|
||||
<label><?php echo __('Username', 'users'); ?></label>
|
||||
<input class="span3" name="login" type="text" />
|
||||
|
||||
<label><?php echo __('Password', 'users'); ?></label>
|
||||
<input class="span3" name="password" type="password" />
|
||||
<br />
|
||||
<?php if (isset($login_error) && $login_error !== '') { ?><div class="alert alert-error"><?php echo $login_error; ?></div><?php } ?>
|
||||
<input type="submit" name="login_submit" class="btn" value="<?php echo __('Enter', 'users'); ?>" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="reset-password-area">
|
||||
<hr>
|
||||
<div>
|
||||
<h2 style="text-align:center;"><?php echo __('Reset Password', 'users'); ?></h2><br />
|
||||
<form method="post">
|
||||
<label><?php echo __('Username', 'users'); ?></label>
|
||||
<input name="login" class="span3" type="text" />
|
||||
|
||||
<?php if (Option::get('captcha_installed') == 'true') { ?>
|
||||
<label><?php echo __('Captcha'); ?><label>
|
||||
<input type="text" name="answer" class="span3">
|
||||
<?php CryptCaptcha::draw(); ?>
|
||||
<?php } ?>
|
||||
<br>
|
||||
<?php
|
||||
if (count($errors) > 0) {
|
||||
foreach($errors as $error) {
|
||||
Alert::error($error);
|
||||
}
|
||||
}
|
||||
?>
|
||||
<input type="submit" name="reset_password_submit" class="btn" value="<?php echo __('Send New Password', 'users')?>" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div>
|
||||
<div style="text-align:center;">
|
||||
<a class="small-grey-text" href="<?php echo Option::get('siteurl'); ?>"><?php echo __('< Back to Website', 'system');?></a> -
|
||||
<a class="small-grey-text reset-password-btn" href="javascript:;"><?php echo __('Forgot your password? >', 'system');?></a>
|
||||
<a class="small-grey-text administration-btn" href="javascript:;"><?php echo __('Administration >', 'system');?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="span4 authorization-block-footer">
|
||||
<div style="text-align:center">
|
||||
<span class="small-grey-text">© 2012 <a href="http://monstra.org" class="small-grey-text" target="_blank">Monstra</a> – <?php echo __('Version', 'system'); ?> <?php echo MONSTRA_VERSION; ?></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user