Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilkeshava authored Apr 12, 2021
1 parent 7a80ab8 commit 225af8d
Show file tree
Hide file tree
Showing 52 changed files with 33,241 additions and 0 deletions.
97 changes: 97 additions & 0 deletions admin/activitity.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?php
include("./includes/db.php");

?>

<div class="row" style="padding-top: 10vh;">
<div class="col-xl-3 col-lg-6 col-md-6 col-sm-6">
<div class="card card-stats">
<div class="card-header card-header-warning card-header-icon">
<div class="card-icon">
<i class="material-icons">content_copy</i>
</div>
<p class="card-category">Total users</p>
<h3 class="card-title">
<?php $query = "SELECT user_id FROM user_info";
$result = mysqli_query($con, $query);
if ($result)
{
// it return number of rows in the table.
$row = mysqli_num_rows($result);

printf(" " . $row);

// close the result.
} ?>
</h3>
</div>

</div>
</div>
<div class="col-xl-3 col-lg-6 col-md-6 col-sm-6">
<div class="card card-stats">
<div class="card-header card-header-success card-header-icon">
<div class="card-icon">
<i class="material-icons">store</i>
</div>
<p class="card-category">Total Catagories</p>
<h3 class="card-title"> <?php $query = "SELECT cat_id FROM categories";
$result = mysqli_query($con, $query);
if ($result)
{
// it return number of rows in the table.
$row = mysqli_num_rows($result);

printf(" " . $row);

// close the result.
} ?></h3>
</div>

</div>
</div>
<div class="col-xl-3 col-lg-6 col-md-6 col-sm-6">
<div class="card card-stats">
<div class="card-header card-header-danger card-header-icon">
<div class="card-icon">
<i class="material-icons">info_outline</i>
</div>
<p class="card-category">Total sellers</p>
<h3 class="card-title"><?php $query = "SELECT id FROM sup_info";
$result = mysqli_query($con, $query);
if ($result)
{
// it return number of rows in the table.
$row = mysqli_num_rows($result);

printf(" " . $row);

// close the result.
} ?></h3>
</div>

</div>
</div>
<div class="col-xl-3 col-lg-6 col-md-6 col-sm-6">
<div class="card card-stats">
<div class="card-header card-header-info card-header-icon">
<div class="card-icon">
<i class="fa fa-twitter"></i>
</div>
<p class="card-category">Total Orders</p>
<h3 class="card-title"><?php $query = "SELECT order_id FROM orders_info";
$result = mysqli_query($con, $query);
if ($result)
{
// it return number of rows in the table.
$row = mysqli_num_rows($result);

printf(" " . $row);

// close the result.
} ?></h3>
</div>

</div>
</div>
</div>
104 changes: 104 additions & 0 deletions admin/activity.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@

<?php
session_start();
include("./includes/db.php");

error_reporting(0);
if(isset($_GET['action']) && $_GET['action']!="" && $_GET['action']=='delete')
{
$order_id=$_GET['order_id'];

/*this is delet query*/
mysqli_query($con,"delete from orders where order_id='$order_id'")or die("delete query is incorrect...");
}

///pagination
$page=$_GET['page'];

if($page=="" || $page=="1")
{
$page1=0;
}
else
{
$page1=($page*10)-10;
}

include "sidenav.php";
include "topheader.php";

?>
<!-- End Navbar -->
<div class="content">
<div class="container-fluid">
<!-- your content here -->
<div class="col-md-14">
<div class="card ">
<div class="card-header card-header-primary">
<h4 class="card-title">Activity / Page <?php echo $page;?> </h4>
</div>
<div class="card-body">
<div class="table-responsive ps">
<table class="table table-hover tablesorter " id="">
<thead class=" text-primary">
<tr><th>User_id</th><th>User_Email</th><th>Mobile</th><th>Logged_in</th><th>Logout</th><th></th>
</tr></thead>
<tbody>
<?php
$result=mysqli_query($con,"select user_id, email,mobile,last_login,last_logout from user_info Limit $page1,10")or die ("query 1 incorrect.....");

while(list($user_id,$email,$mobile,$last_login,$last_logout)=mysqli_fetch_array($result))
{
echo "<tr><td>$user_id</td><td>$email</td><td>$mobile</td><td>$last_login</td><td>$last_logout</td>
</tr>";
}
?>
</tbody>
</table >


<div class="ps__rail-x" style="left: 0px; bottom: 0px;"><div class="ps__thumb-x" tabindex="0" style="left: 0px; width: 0px;"></div></div><div class="ps__rail-y" style="top: 0px; right: 0px;"><div class="ps__thumb-y" tabindex="0" style="top: 0px; height: 0px;"></div></div></div>
</div>

</div>
</div>
<div class="col-md-14">
<div class="card ">
<div class="card-header card-header-primary">
<h4 class="card-title">Activity / Supplier</h4>
</div>
<div class="card-body">
<div class="table-responsive ps">
<table class="table table-hover tablesorter " id="">
<thead class=" text-primary">
<tr><th>User_id</th><th>User_Email</th><th>Mobile</th><th>Logged_in</th><th>Logout</th><th></th>
</tr></thead>
<tbody>
<?php
$result=mysqli_query($con,"select id, email,mobile,login_time,logout_time from sup_info Limit $page1,10")or die ("query 1 incorrect.....");

while(list($user_id,$email,$mobile,$last_login,$last_logout)=mysqli_fetch_array($result))
{
echo "<tr><td>$user_id</td><td>$email</td><td>$mobile</td><td>$last_login</td><td>$last_logout</td>
</tr>";
}
?>
</tbody>
</table >


<div class="ps__rail-x" style="left: 0px; bottom: 0px;"><div class="ps__thumb-x" tabindex="0" style="left: 0px; width: 0px;"></div></div><div class="ps__rail-y" style="top: 0px; right: 0px;"><div class="ps__thumb-y" tabindex="0" style="top: 0px; height: 0px;"></div></div></div>
</div>

</div>
</div>


</div>
</div>

<?php
include "footer.php";
?>
100 changes: 100 additions & 0 deletions admin/addsuppliers.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<?php
session_start();
include("./includes/db.php");
include "sidenav.php";
include "topheader.php";
if(isset($_POST['btn_save']))
{
$first_name=$_POST['first_name'];
$last_name=$_POST['last_name'];
$email=$_POST['email'];
$user_password=$_POST['password'];
$mobile=$_POST['phone'];
$address1=$_POST['city'];
$address2=$_POST['country'];

mysqli_query($con,"insert into sup_info(first_name, last_name,email,password,mobile,address1,address2) values ('$first_name','$last_name','$email','$user_password','$mobile','$address1','$address2')")
or die ("Query 1 is inncorrect........");
mysqli_close($con);
}


?>
<!-- End Navbar -->
<div class="content">
<div class="container-fluid">
<!-- your content here -->
<div class="col-md-12">
<div class="card">
<div class="card-header card-header-primary">
<h4 class="card-title">Add Suppliers</h4>
<p class="card-category">profile</p>
</div>
<div class="card-body">
<form action="" method="post" name="form" enctype="multipart/form-data">
<div class="row">

<div class="col-md-3">
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">First Name</label>
<input type="text" id="first_name" name="first_name" class="form-control" required>
</div>
</div>
<div class="col-md-4">
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">Last Name</label>
<input type="text" name="last_name" id="last_name" class="form-control" required>
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">Email</label>
<input type="email" name="email" id="email" class="form-control" required>
</div>
</div>
<div class="col-md-6">
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">Password</label>
<input type="password" id="password" name="password" class="form-control" required>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">phone number</label>
<input type="text" id="phone" name="phone" class="form-control" required>
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">City</label>
<input type="text" name="city" id="city" class="form-control" required>
</div>
</div>
<div class="col-md-4">
<div class="form-group bmd-form-group">
<label class="bmd-label-floating">Address</label>
<input type="text" name="country" id="country" class="form-control" required>
</div>
</div>

</div>

<button type="submit" name="btn_save" id="btn_save" class="btn btn-primary pull-right">Add</button>

</form>
</div>
</div>
</div>
</div>
</div>


<?php
include "footer.php";
?>
Loading

0 comments on commit 225af8d

Please sign in to comment.