mirror of
https://github.com/ShaYmez/FreeSTAR-Status-Engine.git
synced 2026-06-01 21:54:48 -04:00
Instalator fixes and lots and lots of other bugfixes
This commit is contained in:
+3
-2
@@ -37,7 +37,7 @@ Template::render_header(_("Dashboard"), true);
|
||||
<div class="timeline">
|
||||
<div class="line text-muted"></div>
|
||||
<h3><?php echo _("New incident");?></h3>
|
||||
<form id="new-incident" action="/admin/?new=incident" method="POST" class="clearfix">
|
||||
<form id="new-incident" action="<?php echo WEB_URL;?>/admin/?new=incident" method="POST" class="clearfix">
|
||||
<article class="panel">
|
||||
<?php if (isset($message))
|
||||
{?>
|
||||
@@ -52,11 +52,12 @@ Template::render_header(_("Dashboard"), true);
|
||||
}else{
|
||||
$post_services = array();
|
||||
}
|
||||
|
||||
foreach($services as $service){
|
||||
?>
|
||||
<div class="item clearfix">
|
||||
<div class="service"><?php if ($service->get_status()!=-1){?><input type="checkbox" name="services[]" value="<?php echo $service->get_id(); ?>" <?php echo (in_array($service->get_id(), $post_services))?"checked":'';?> id="service-<?php echo $service->get_id(); ?>"><?php } ?><label for="service-<?php echo $service->get_id(); ?>"><?php echo $service->get_name(); ?></label></div>
|
||||
<div class="status <?php echo $classes[$service->get_status()];?>"><?php echo $statuses[$service->get_status()];?></div>
|
||||
<div class="status <?php if ($service->get_status()!=-1){echo $classes[$service->get_status()];}?>"><?php if ($service->get_status()!=-1){echo $statuses[$service->get_status()];}?></div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ Template::render_header(_("Login"));
|
||||
<?php }else{?>
|
||||
<p class="alert alert-info"><?php echo _("Please login to continue.");?></p>
|
||||
<?php }?>
|
||||
<form action="/admin/" method="post">
|
||||
<form action="<?php echo WEB_URL;?>/admin/" method="post">
|
||||
<div class="form-group">
|
||||
<label for="email"><?php echo _("Email");?></label>
|
||||
<input placeholder="<?php echo _("Email");?>" class="form-control" name="email" id="email" type="email" tabindex="1" value="<?php echo htmlspecialchars((isset($_POST['email'])?$_POST['email']:''),ENT_QUOTES);?>" required>
|
||||
@@ -19,7 +19,7 @@ Template::render_header(_("Login"));
|
||||
<label for="pass"><?php echo _("Password");?></label>
|
||||
<input placeholder="<?php echo _("Password");?>" class="form-control" name="pass" id="pass" type="password" tabindex="2" required>
|
||||
<div style="padding-top: 8px; position: relative;">
|
||||
<a href="?do=lost-password" class="pull-right noselect" tabindex="5"><?php echo _("Forgotten password?");?></a>
|
||||
<a href="<?php echo WEB_URL;?>/admin/?do=lost-password" class="pull-right noselect" tabindex="5"><?php echo _("Forgotten password?");?></a>
|
||||
<input name="remember" id="remember" type="checkbox" tabindex="3"> <label class="lbl-login noselect" style="color: black;" for="remember"><?php echo _("Remember me");?></label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -13,12 +13,12 @@ Template::render_header(_("Lost password"));
|
||||
$user->change_password($_POST['token']);
|
||||
if (isset($message)){?>
|
||||
<p class="alert alert-danger"><?php echo $message?></p>
|
||||
<a href="/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{?>
|
||||
<p class="alert alert-success"><?php echo _("Password changed successfully!");?></p>
|
||||
<a href="/admin/"><?php echo _("Go back to login page");?></a>
|
||||
<a href="<?php echo WEB_URL;?>/admin/"><?php echo _("Go back to login page");?></a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -27,12 +27,12 @@ Template::render_header(_("Lost password"));
|
||||
User::password_link();
|
||||
if (isset($message)){?>
|
||||
<p class="alert alert-danger"><?php echo $message?></p>
|
||||
<a href="/admin/?do=lost-password"><?php echo _("Go back to start");?></a>
|
||||
<a href="<?php echo WEB_URL;?>/admin/?do=lost-password"><?php echo _("Go back to start");?></a>
|
||||
<?php
|
||||
}
|
||||
else{?>
|
||||
<p class="alert alert-success"><?php echo _("Email with password reset link has been sent!");?></p>
|
||||
<a href="/admin/"><?php echo _("Go back to login page");?></a>
|
||||
<a href="<?php echo WEB_URL;?>/admin/"><?php echo _("Go back to login page");?></a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,7 @@ Template::render_header(_("Lost password"));
|
||||
if (isset($message)){?>
|
||||
<p class="alert alert-danger"><?php echo $message?></p>
|
||||
<?php }?>
|
||||
<form action="/admin/?do=lost-password" method="post">
|
||||
<form action="<?php echo WEB_URL;?>/admin/?do=lost-password" method="post">
|
||||
<?php if (!isset($_GET['id'])||!isset($_GET['token'])){?>
|
||||
<label for="email"><?php echo _("Email");?>:</label>
|
||||
<div class="input-group pull-right">
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ Template::render_header(_("New user"), true); ?>
|
||||
<h2>Add new user</h2>
|
||||
</div>
|
||||
|
||||
<form action="/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
@@ -52,7 +52,7 @@ while($result = $query->fetch_assoc())
|
||||
echo "<td>".$result['name']."</td>";
|
||||
if ($user->get_rank()<=1)
|
||||
{
|
||||
echo '<td><a href="?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>";
|
||||
}?>
|
||||
@@ -63,7 +63,7 @@ while($result = $query->fetch_assoc())
|
||||
|
||||
<section>
|
||||
<h3 class="pull-left"><?php echo _("Users");?></h3>
|
||||
<?php if ($user->get_rank() == 0){?> <a href="?do=new-user" class="btn btn-success pull-right"><?php echo _("Add new user");?></a><?php }?>
|
||||
<?php if ($user->get_rank() == 0){?> <a href="<?php echo WEB_URL;?>/admin/?do=new-user" class="btn btn-success pull-right"><?php echo _("Add new user");?></a><?php }?>
|
||||
<table class="table">
|
||||
|
||||
<thead><tr><th scope="col"><?php echo _("ID");?></th><th scope="col"><?php echo _("Username");?></th><th scope="col"><?php echo _("Name");?></th><th scope="col"><?php echo _("Surname");?></th><th scope="col"><?php echo _("Email");?></th><th scope="col"><?php echo _("Role");?></th><th scope="col">Active</th></tr></thead>
|
||||
@@ -74,7 +74,7 @@ while($result = $query->fetch_assoc())
|
||||
{
|
||||
echo "<tr>";
|
||||
echo "<td>".$result['id']."</td>";
|
||||
echo "<td><a href='/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>";
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ if (isset($_GET['id']))
|
||||
try {
|
||||
$displayed_user = new User($id);
|
||||
} catch (Exception $e) {
|
||||
header("Location: /admin/?do=user");
|
||||
header("Location: ".WEB_URL."/admin/?do=user");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user