mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2026-06-01 21:54:48 -04:00
Fixed some todos & added email validation
This commit is contained in:
@@ -9,8 +9,6 @@ if(isset($_COOKIE['user'])&&!isset($_SESSION['user']))
|
||||
User::restore_session();
|
||||
}
|
||||
|
||||
//TODO: CHeck if user deactivated
|
||||
|
||||
if (!isset($_SESSION['user']))
|
||||
{
|
||||
if (isset($_GET['do']) && $_GET['do']=="lost-password")
|
||||
|
||||
@@ -13,7 +13,7 @@ Template::render_header(_("Lost password"));
|
||||
$user->change_password($_POST['token']);
|
||||
if (isset($message)){?>
|
||||
<p class="alert alert-danger"><?php echo $message?></p>
|
||||
<a href="<?php echo WEB_URL;?>/admin/?do=lost-password<?php echo "&id=".$_POST['id']."&token=".$_POST['token'];?>"><?php echo _("Go back");?> </a>
|
||||
<a href="<?php echo WEB_URL;?>/admin/?do=lost-password<?php echo "&id=".$_POST['id']."&token=".$_POST['token'];?>"><?php echo _("Go back");?> </a>
|
||||
<?php
|
||||
}
|
||||
else{?>
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ Template::render_header(_("New user"), true); ?>
|
||||
<h2>Add new user</h2>
|
||||
</div>
|
||||
|
||||
<form action="<?php echo WEB_URL;?>/admin/?do=new-user&new=user" method="POST" class="form-horizontal">
|
||||
<form action="<?php echo WEB_URL;?>/admin/?do=new-user&new=user" method="POST" class="form-horizontal">
|
||||
<?php if (isset($message))
|
||||
{?>
|
||||
<p class="alert alert-danger"><?php echo $message?></p>
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ if (isset($message)){
|
||||
<section>
|
||||
<h3 class="pull-left"><?php echo _("Services");?></h3>
|
||||
<?php if ($user->get_rank() <= 1){?>
|
||||
<form action="?do=settings&new=service" method="post">
|
||||
<form action="?do=settings&new=service" method="post">
|
||||
<div class="input-group pull-right new-service">
|
||||
<input class="form-control" name="service" placeholder="Name" type="text" value="<?php echo ((isset($_POST['service']))?htmlspecialchars($_POST['service']):''); ?>" maxlength="50" required>
|
||||
<span class="input-group-btn">
|
||||
@@ -52,7 +52,7 @@ while($result = $query->fetch_assoc())
|
||||
echo "<td>".$result['name']."</td>";
|
||||
if ($user->get_rank()<=1)
|
||||
{
|
||||
echo '<td><a href="'.WEB_URL.'/admin/?do=settings&delete='.$result['id'].'" class="pull-right delete-service"><i class="fa fa-trash"></i></a></td>';
|
||||
echo '<td><a href="'.WEB_URL.'/admin/?do=settings&delete='.$result['id'].'" class="pull-right delete-service"><i class="fa fa-trash"></i></a></td>';
|
||||
}
|
||||
echo "</tr>";
|
||||
}?>
|
||||
@@ -74,7 +74,7 @@ while($result = $query->fetch_assoc())
|
||||
{
|
||||
echo "<tr>";
|
||||
echo "<td>".$result['id']."</td>";
|
||||
echo "<td><a href='".WEB_URL."/admin/?do=user&id=".$result['id']."'>".$result['username']."</a></td>";
|
||||
echo "<td><a href='".WEB_URL."/admin/?do=user&id=".$result['id']."'>".$result['username']."</a></td>";
|
||||
echo "<td>".$result['name']."</td>";
|
||||
echo "<td>".$result['surname']."</td>";
|
||||
echo "<td><a href=\"mailto:".$result['email']."\">".$result['email']."</a></td>";
|
||||
|
||||
Reference in New Issue
Block a user