mirror of
https://github.com/fruithost/Panel.git
synced 2026-12-04 22:31:44 +09:00
Adding user deletion and some fixes
This commit is contained in:
5 files changed
+187
-18
No files matched your search
+21
-1
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
use fruithost\Auth;
|
||||
use fruithost\Session;
|
||||
use fruithost\I18N;
|
||||
|
||||
$template->header();
|
||||
@@ -19,6 +20,20 @@
|
||||
<header class="page-header d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
|
||||
<h1 class="h2">
|
||||
<a class="active" href="<?php print $this->url('/admin/users'); ?>"><?php I18N::__('Users'); ?></a>
|
||||
<?php
|
||||
if(is_numeric($tab) && $tab > 0) {
|
||||
?>
|
||||
<i class="material-icons">arrow_right</i>
|
||||
<a class="active" href="<?php print $this->url('/admin/users/' . $user->getID()); ?>"><?php printf('%s %s', I18N::get('edit'), $user->getUsername()); ?></a>
|
||||
<?php
|
||||
} else if($tab == 'create') {
|
||||
?>
|
||||
<i class="material-icons">arrow_right</i>
|
||||
<a class="active" href="<?php print $this->url('/admin/users/create'); ?>"><?php I18N::__('create User'); ?></a>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
</h1>
|
||||
<div class="btn-toolbar mb-2 mb-md-0">
|
||||
<?php
|
||||
@@ -55,7 +70,12 @@
|
||||
</div>
|
||||
</header>
|
||||
<?php
|
||||
if(!is_numeric($tab)) {
|
||||
if(Session::has('success')) {
|
||||
?>
|
||||
<div class="alert alert-success mt-4" role="alert"><?php print Session::get('success'); ?></div>
|
||||
<?php
|
||||
Session::remove('success');
|
||||
} else if(!is_numeric($tab) && $tab !== 'create') {
|
||||
if(isset($error)) {
|
||||
?>
|
||||
<div class="alert alert-danger mt-4" role="alert"><?php (is_array($error) ? var_dump($error) : print $error); ?></div>
|
||||
|
||||
@@ -1 +1,53 @@
|
||||
CREATE
|
||||
<?php
|
||||
use fruithost\Auth;
|
||||
use fruithost\I18N;
|
||||
$template->header();
|
||||
?>
|
||||
|
||||
<?php
|
||||
if(isset($error)) {
|
||||
?>
|
||||
<div class="alert alert-danger mt-4" role="alert"><?php (is_array($error) ? var_dump($error) : print $error); ?></div>
|
||||
<?php
|
||||
} else if(isset($success)) {
|
||||
?>
|
||||
<div class="alert alert-success mt-4" role="alert"><?php (is_array($success) ? var_dump($success) : print $success); ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div class="container">
|
||||
<div class="form-group row">
|
||||
<label for="username" class="col-sm-2 col-form-label"><?php I18N::__('Username'); ?>:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="username" name="username" value="<?php print (!empty($username) ? $username : ''); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="email" class="col-sm-2 col-form-label"><?php I18N::__('E-Mail Adresss'); ?>:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control" id="email" name="email" value="<?php print (!empty($email) ? $email : ''); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="mb-4" />
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="password_new" class="col-sm-2 col-form-label"><?php I18N::__('New Password'); ?>:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" id="password_new" name="password_new" value="" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="password_repeated" class="col-sm-2 col-form-label"><?php I18N::__('Password Confirmation'); ?>:</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" id="password_repeated" name="password_repeated" value="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" name="action" value="create" class="btn btn-outline-primary"><?php I18N::__('Create'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
$template->footer();
|
||||
?>
|
||||
Reference in new issue
Block a user