Skip to content

Commit

Permalink
student pass change
Browse files Browse the repository at this point in the history
  • Loading branch information
heapbytes committed Oct 9, 2022
1 parent 38c03cc commit 28d3f07
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions roles/admin/sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@

<li class="sidebar-item">
<a class="sidebar-link" data-bs-target="#charts-nav3" data-bs-toggle="collapse" href="#">
<i class="align-middle" data-feather="bar-chart-2"></i> <span>Requests - </span>
<i class="align-middle" data-feather="bar-chart-2"></i> <span>Requests </span>

<span class="indicator"><?php
include "../../imports/config.php";
$sql = "SELECT * FROM groups WHERE `req` = '1' and rejected='0' AND accepted = '0'";
$result = mysqli_query($conn, $sql);
if(mysqli_num_rows($result) != 0){
echo mysqli_num_rows($result) . '*';
echo ' - '. mysqli_num_rows($result) . '*';
}
else{
echo "";
Expand Down
9 changes: 6 additions & 3 deletions roles/student/changepassimp.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@
<?php
session_start();
include 'confirm.php';

$sqlconfirm = "SELECT `flog` from `login` where `uname` = '{$_SESSION["uname"]}'";
//echo "<script>alert('".$_SESSION['uname']."');</script>";
include '../../imports/config.php';
$uname = $_SESSION['uname'];
$sqlconfirm = "SELECT * from `login` where `uname` = '$uname'";
$result = mysqli_query($conn, $sqlconfirm);
$row = mysqli_fetch_assoc($result);
//echo "<script>alert('".$row['flog']."');</script>";
if ($row["flog"] == 0) {
echo "<script>alert('Password already changed, please contact admin if any issues faced.');</script>";
echo "<script>window.location.href='index.php';</script>";
Expand Down Expand Up @@ -87,7 +90,7 @@
<div class="col-12">
<label for="yourUsername" class="form-label">Roll number</label>
<div class="input-group has-validation">
<input type="text" name="uname" class="form-control" id="uname" required>
<input type="text" name="uname" value=<?php echo $_SESSION['uname']; ?> class="form-control" id="uname" required readonly>
<div class="invalid-feedback">Please enter your username.</div>
</div>
</div>
Expand Down

0 comments on commit 28d3f07

Please sign in to comment.