mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-11 15:45:07 +02:00
Add Monstra from HG Commit 683dcb70c4cc
This commit is contained in:
26
plugins/box/users/views/frontend/edit.view.php
Normal file
26
plugins/box/users/views/frontend/edit.view.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<h3><?php echo __('Edit profile', 'users') ?></h3>
|
||||
<hr>
|
||||
|
||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
<?php if (Notification::get('error')) Alert::success(Notification::get('error')); ?>
|
||||
|
||||
<form method="post">
|
||||
<?php
|
||||
echo (
|
||||
Form::hidden('csrf', Security::token()).
|
||||
Form::hidden('user_id', $user['id'])
|
||||
);
|
||||
?>
|
||||
<table>
|
||||
<?php if (isset($_SESSION['user_role']) && in_array($_SESSION['user_role'], array('admin'))) { ?>
|
||||
<label><?php echo __('Username', 'users'); ?></label><input type="text" value="<?php echo $user['login']; ?>" name="login">
|
||||
<?php } else { echo Form::hidden('login', $user['login']); } ?>
|
||||
<label><?php echo __('Firstname', 'users'); ?></label><input type="text" value="<?php echo $user['firstname']; ?>" name="firstname">
|
||||
<label><?php echo __('Lastname', 'users'); ?></label><input type="text" value="<?php echo $user['lastname']; ?>" name="lastname">
|
||||
<label><?php echo __('Email', 'users'); ?></label><input type="text" value="<?php echo $user['email']; ?>" name="email">
|
||||
<label><?php echo __('Twitter', 'users'); ?></label><input type="text" value="<?php echo $user['twitter']; ?>" name="twitter">
|
||||
<label><?php echo __('Skype', 'users'); ?></label><input type="text" value="<?php echo $user['skype']; ?>" name="skype">
|
||||
<label><?php echo __('New Password', 'users'); ?></label><input type="text" name="new_password">
|
||||
<br/><input type="submit" class="btn" value="<?php echo __('Save', 'users'); ?>" name="edit_profile">
|
||||
</table>
|
||||
</form>
|
14
plugins/box/users/views/frontend/index.view.php
Normal file
14
plugins/box/users/views/frontend/index.view.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<h3><?php echo __('Users', 'users'); ?></h3>
|
||||
<hr>
|
||||
<table>
|
||||
<tr>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php foreach ($users as $user) { ?>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="<?php echo Site::url(); ?>users/<?php echo $user['id']; ?>"><?php echo $user['login']; ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</table>
|
10
plugins/box/users/views/frontend/login.view.php
Normal file
10
plugins/box/users/views/frontend/login.view.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<h3><?php echo __('Login', 'users'); ?></h3>
|
||||
<hr>
|
||||
<?php if (Notification::get('error')) Alert::error(Notification::get('error')); ?>
|
||||
<form method="post">
|
||||
<?php echo Form::hidden('csrf', Security::token()); ?>
|
||||
<label><?php echo __('Username', 'users'); ?></label><input name="username" type="text" />
|
||||
<label><?php echo __('Password', 'users'); ?></label><input name="password" type="password" />
|
||||
<br /><input name="login_submit" class="btn" type="submit" value="<?php echo __('Enter', 'users'); ?>" /> <a class="small-grey-text reset-password-btn" href="<?php echo Option::get('siteurl').'users/password-reset'; ?>"><?php echo __('Forgot your password?', 'users');?></a></td></tr>
|
||||
</form>
|
||||
|
25
plugins/box/users/views/frontend/password_reset.view.php
Normal file
25
plugins/box/users/views/frontend/password_reset.view.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<h3><?php echo __('Reset Password', 'users') ?></h3>
|
||||
<hr>
|
||||
|
||||
<?php if (Notification::get('success')) Alert::success(Notification::get('success')); ?>
|
||||
<?php if (Notification::get('error')) Alert::success(Notification::get('error')); ?>
|
||||
|
||||
<form method="post">
|
||||
<?php
|
||||
echo (Form::hidden('csrf', Security::token()));
|
||||
?>
|
||||
|
||||
<label><?php echo __('Username', 'users'); ?></label><input type="text" value="<?php echo $user_login; ?>" name="login">
|
||||
<?php
|
||||
if (isset($errors['users_user_doesnt_exists'])) echo Html::nbsp(3).'<span class="error">'.$errors['users_user_doesnt_exists'].'</span>';
|
||||
if (isset($errors['users_empty_field'])) echo Html::nbsp(3).'<span class="error">'.$errors['users_empty_field'].'</span>';
|
||||
?>
|
||||
|
||||
<?php if (Option::get('captcha_installed') == 'true') { ?>
|
||||
<label><?php echo __('Captcha'); ?><label>
|
||||
<input type="text" name="answer"><?php if (isset($errors['users_captcha_wrong'])) echo Html::nbsp(3).'<span class="error">'.$errors['users_captcha_wrong'].'</span>'; ?>
|
||||
<?php CryptCaptcha::draw(); ?>
|
||||
<?php } ?>
|
||||
|
||||
<br /><input type="submit" class="btn" value="<?php echo __('Send New Password', 'users'); ?>" name="reset_password_submit">
|
||||
</form>
|
19
plugins/box/users/views/frontend/profile.view.php
Normal file
19
plugins/box/users/views/frontend/profile.view.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<h3><?php echo __('Profile', 'users'); ?></h3>
|
||||
<hr>
|
||||
<?php if ($user) { ?>
|
||||
<table>
|
||||
<tr><td><?php echo __('Username', 'users'); ?></td><td><?php echo $user['login']; ?></td></tr>
|
||||
<tr><td><?php echo __('Firstname', 'users'); ?></td><td><?php echo Html::toText($user['firstname']); ?></td></tr>
|
||||
<tr><td><?php echo __('Lastname', 'users'); ?></td><td><?php echo Html::toText($user['lastname']); ?></td></tr>
|
||||
<tr><td><?php echo __('Email', 'users'); ?></td><td><?php echo Html::toText($user['email']); ?></td></tr>
|
||||
<tr><td><?php echo __('Registered', 'users'); ?></td><td><?php echo Date::format($user['date_registered']); ?></td></tr>
|
||||
<tr><td><?php echo __('Skype', 'users'); ?></td><td><?php echo Html::toText($user['skype']); ?></td></tr>
|
||||
<tr><td><?php echo __('Twitter', 'users'); ?></td><td><?php echo Html::toText($user['twitter']); ?></td></tr>
|
||||
</table>
|
||||
<br />
|
||||
<?php if (Users::isLoged()) { ?>
|
||||
<a href="<?php echo Site::url(); ?>users/<?php echo $user['id']; ?>/edit"><?php echo __('Edit profile', 'users'); ?></a> /
|
||||
<?php if(in_array(Session::get('user_role'), array('admin', 'editor'))) { ?> <a href="<?php echo Site::url(); ?>admin"><?php echo __('Administration', 'system'); ?></a> / <?php } ?>
|
||||
<a href="<?php echo Site::url(); ?>users/logout"><?php echo __('Logout', 'users'); ?></a>
|
||||
<?php } ?>
|
||||
<?php } else { echo __('This users doesnt exists', 'users'); } ?>
|
30
plugins/box/users/views/frontend/registration.view.php
Normal file
30
plugins/box/users/views/frontend/registration.view.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<h3><?php echo __('Registration', 'users'); ?></h3>
|
||||
<hr>
|
||||
<form method="post">
|
||||
<?php
|
||||
echo (Form::hidden('csrf', Security::token()));
|
||||
?>
|
||||
|
||||
<label><?php echo __('Username', 'users'); ?></label><input type="text" value="<?php echo $user_login; ?>" name="login">
|
||||
<?php
|
||||
if (isset($errors['users_this_user_alredy_exists'])) echo Html::nbsp(3).'<span class="error">'.$errors['users_this_user_alredy_exists'].'</span>';
|
||||
if (isset($errors['users_empty_login'])) echo Html::nbsp(3).'<span class="error">'.$errors['users_empty_login'].'</span>';
|
||||
?>
|
||||
<label><?php echo __('Password', 'users'); ?></label><input type="password" value="<?php echo $user_password; ?>" name="password">
|
||||
<?php
|
||||
if (isset($errors['users_empty_password'])) echo Html::nbsp(3).'<span class="error">'.$errors['users_empty_password'].'</span>';
|
||||
?>
|
||||
<label><?php echo __('Email', 'users'); ?></label><input type="text" value="<?php echo $user_email; ?>" name="email">
|
||||
<?php
|
||||
if (isset($errors['users_this_email_alredy_exists'])) echo Html::nbsp(3).'<span class="error">'.$errors['users_this_email_alredy_exists'].'</span>';
|
||||
if (isset($errors['users_empty_email'])) echo Html::nbsp(3).'<span class="error">'.$errors['users_empty_email'].'</span>';
|
||||
if (isset($errors['users_invalid_email'])) echo Html::nbsp(3).'<span class="error">'.$errors['users_invalid_email'].'</span>';
|
||||
?>
|
||||
<?php if (Option::get('captcha_installed') == 'true') { ?>
|
||||
<label><?php echo __('Captcha'); ?><label>
|
||||
<input type="text" name="answer"><?php if (isset($errors['users_captcha_wrong'])) echo Html::nbsp(3).'<span class="error">'.$errors['users_captcha_wrong'].'</span>'; ?>
|
||||
<?php CryptCaptcha::draw(); ?>
|
||||
<?php } ?>
|
||||
|
||||
<br /><input type="submit" class="btn" value="<?php echo __('Register', 'users'); ?>" name="register">
|
||||
</form>
|
13
plugins/box/users/views/frontend/userspanel.view.php
Normal file
13
plugins/box/users/views/frontend/userspanel.view.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<div style="float:right">
|
||||
<?php if (Session::get('user_id')) { ?>
|
||||
<?php echo __('Welcome', 'users'); ?>,
|
||||
<a href="<?php echo Site::url(); ?>users/<?php echo Session::get('user_id'); ?>"><?php echo Session::get('user_login'); ?></a> /
|
||||
<?php if(in_array(Session::get('user_role'), array('admin', 'editor'))) { ?>
|
||||
<a href="<?php echo Site::url(); ?>admin"><?php echo __('Administration', 'system'); ?></a> /
|
||||
<?php } ?>
|
||||
<a href="<?php echo Site::url(); ?>users/logout"><?php echo __('Logout', 'users'); ?></a>
|
||||
<?php } else { ?>
|
||||
<a href="<?php echo Site::url(); ?>users/login"><?php echo __('Login', 'users'); ?></a> /
|
||||
<a href="<?php echo Site::url(); ?>users/registration"><?php echo __('Registration', 'users'); ?></a>
|
||||
<?php } ?>
|
||||
</div>
|
Reference in New Issue
Block a user