Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitmaur07 authored Apr 9, 2022
1 parent 13c839d commit 188e320
Show file tree
Hide file tree
Showing 14 changed files with 2,130 additions and 0 deletions.
59 changes: 59 additions & 0 deletions arpit/about.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!doctype html>
<html lang="en">

<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">

<title>about</title>
</head>

<body>
<?php
require 'partials/_nav.php'; ?>

<div class="container">
<h2>This is the page where you know about this website.</h2>
<h4>This page is made by Arpit ... </h4>
<h5>If you facing any problem in this site contact me!</h5>

<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempora asperiores cupiditate aperiam velit in
placeat aliquid culpa! Velit ad reprehenderit illo maxime eligendi! Nulla, quos enim error cumque vitae ea
veniam modi, impedit distinctio reprehenderit molestias iure ipsam deserunt porro voluptate, asperiores in.
Eos ipsa, assumenda adipisci repellendus nisi molestias odio sequi, magni eveniet architecto illum mollitia
deleniti incidunt, aut doloribus fugiat inventore et minus in. Modi non accusantium eius, odit, voluptatem
expedita laudantium, incidunt temporibus quisquam aliquid perspiciatis. Eveniet a sint tempore optio qui
odio voluptates cupiditate, iusto provident dicta aut quibusdam doloremque accusantium dolores. Neque
voluptatum dicta nemo, porro modi tempore qui quos blanditiis adipisci nisi. Blanditiis at nesciunt, ad
eveniet enim nulla voluptates necessitatibus esse ipsum aspernatur, nihil alias! Minima, commodi sequi?
Expedita tempore consequatur omnis praesentium? Blanditiis, beatae, omnis voluptas impedit fugiat nam, error
numquam dicta ipsa deleniti ut quae provident aut praesentium sunt voluptate necessitatibus corporis
pariatur minus. Sunt maxime dolores repellat, possimus a nostrum debitis! Tenetur est ratione hic, numquam
repellat nisi ipsum excepturi laborum? Dolor saepe velit iste aliquam fugit id consectetur cupiditate
voluptates quos quo magnam, officia doloribus dolores blanditiis dicta, exercitationem magni excepturi quasi
repudiandae deserunt at! Expedita voluptatibus dignissimos possimus. </p>
</div>




<!-- Optional JavaScript; choose one of the two! -->

<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js"
integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous">
</script>

<!-- Option 2: Separate Popper and Bootstrap JS -->
<!--
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js" integrity="sha384-eMNCOe7tC1doHpGoWe/6oMVemdAVTMs2xqW4mwXrXsW0L84Iytr2wi5v2QjrP/xp" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.min.js" integrity="sha384-cn7l7gDp0eyniUwwAZgrzD06kc/tftFf19TOAs2zVinnD/C7E91j9yyk5//jjpt/" crossorigin="anonymous"></script>
-->
</body>

</html>
306 changes: 306 additions & 0 deletions arpit/admin.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,306 @@
<?php
$show=false;
$alert=false;

session_start();
if (!isset($_SESSION['ownerloggedin']) || $_SESSION['ownerloggedin']!=true) {
header("location: oLogin.php");
exit();
}else{




// connecting to database
require'partials/_dbconnect.php';









// to displaY the user sno from db
if ($_SERVER['REQUEST_METHOD'] == 'POST'){
$srno = $_POST['srno'];
$sql = "SELECT * FROM `users` where `sno`=$srno";
$result = mysqli_query($conn, $sql);
$num = mysqli_num_rows($result);

if ($num > 0) {
$show=true;
}
else {
$alert = true;
}
}

}






?>




<!doctype html>
<html lang="en">

<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">

<link rel="stylesheet" href="//cdn.datatables.net/1.10.25/css/jquery.dataTables.min.css">


<title>Welcome - <?php echo $_SESSION['ownername'] ?></title>

</head>

<body>
<?php
require'partials/_nav.php';
if($alert){
echo "<div class='alert alert-danger alert-dismissible fade show' role='alert'>
<strong>Sorry!</strong> The Given Data is not found in Database
<button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button>
</div>";}?>





<div class="container my-4">
<div class="alert alert-success" role="alert">
<h4 class="alert-heading">Welcome Owner-<?php echo $_SESSION['ownername'] ?> </h4>
<p>Aww yeah, you successfully read this important alert message. This example text is going to run a bit
longer
so that you can see how spacing within an alert works with this kind of content.</p>
<hr>
<p class="mb-0">Whenever you need, you can logout <a href="/arpit/logout.php">using this link</a>
.</p>
</div>

</div>
















<div class="container text-center">
<a class="btn btn-primary btn-lg mb-4 col-md-5 " href="/arpit/signup.php" role="button">REGISTER
AN USER</a>
<a class="btn btn-primary btn-lg mb-4 col-md-5 " href="/arpit/oSignup.php" role="button">REGISTER NEW
OWNER </a>









<form action="/arpit/admin.php" method="post">
<div class="mb-3 ">
<label for="exampleInputEmail1" class="form-label ">Enter the User Id</label>
<input type="text" class="form-control " id="srno" name="srno" ia-describedby=" emailHelp">
<div id="textHelp" class="form-text ">Enter Unque User Id to Search</div>

<button type="submit" class="btn btn-primary col">Search</button>
</form>

</div>




<div class="container my-4">




<table class="table" id="myTable">
<thead>
<tr>
<th scope="col">S.No</th>
<th scope="col">Uder Id</th>
<th scope="col">Username</th>
<th scope="col">Password</th>
<th scope="col">No of Data</th>
<th scope="col">Action</th>

</tr>
</thead>
<tbody>



<?php

// here you write code to fetch the data from db a partical user


if($show){
$sql="SELECT * FROM `users` where `sno`=$srno ";
$result=mysqli_query($conn,$sql);
$sno=0;

while($row= mysqli_fetch_assoc($result)){
$sno = $sno +1;
$id=$row['sno'];


echo"<tr>
<th scope='row'>". $sno."</th>
<td>". $row['sno']."</td>
<td><a href='opened.php?UserId=". $id."' class='card-title'>". $row['username']."</a></td>
<td>". $row['password']."</td>
<td><a href='opened.php?UserId=". $id."' class='open btn btn-sm btn-primary mb-1'>OPEN</a></td>
</tr>";
}
}else{
$sql="SELECT * FROM `users` ";
$result=mysqli_query($conn,$sql);
$sno=0;




while($row= mysqli_fetch_assoc($result)){
$sno = $sno +1;
$id=$row['sno'];




echo"<tr>
<th scope='row'>". $sno."</th>
<td>". $row['sno']."</td>
<td><a href='opened.php?UserId=". $id."' class='card-title'>". $row['username']."</a></td>
<td>". $row['password']."</td>
<td><span class='badge bg-danger rounded-pill'>14</span></td>
<td><a href='opened.php?UserId=". $id."' class='open btn btn-sm btn-primary mb-1'>OPEN</a></td>
</tr>";
}

}



?>









</div>
<hr>
























<!-- Button trigger modal -->
<!-- <button type="button" class="btn btn-primary" data-bs-toggle="modal" data-bs-target="#editModal">
Edit Modal
</button> -->

<!-- Modal -->













<!-- Optional JavaScript; choose one of the two! -->

<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.bundle.min.js"
integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous">
</script>



<!-- Option 2: Separate Popper and Bootstrap JS -->

<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.3/dist/umd/popper.min.js"
integrity="sha384-eMNCOe7tC1doHpGoWe/6oMVemdAVTMs2xqW4mwXrXsW0L84Iytr2wi5v2QjrP/xp" crossorigin="anonymous">
</script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/js/bootstrap.min.js"
integrity="sha384-cn7l7gDp0eyniUwwAZgrzD06kc/tftFf19TOAs2zVinnD/C7E91j9yyk5//jjpt/" crossorigin="anonymous">
</script>
<script src="https://code.jquery.com/jquery-2.2.4.js"
integrity="sha256-iT6Q9iMJYuQiMWNd9lDyBUStIq/8PuOW33aOqmvFpqI=" crossorigin="anonymous"></script>
<script src="//cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js">

</script>

</script>








</body>

</html>
Loading

0 comments on commit 188e320

Please sign in to comment.