Skip to content

Commit

Permalink
check in
Browse files Browse the repository at this point in the history
  • Loading branch information
NilakanthBajaniya committed Mar 24, 2019
2 parents df12640 + 6ccbdf2 commit 1840f4a
Show file tree
Hide file tree
Showing 12 changed files with 857 additions and 139 deletions.
471 changes: 470 additions & 1 deletion .idea/workspace.xml

Large diffs are not rendered by default.

101 changes: 101 additions & 0 deletions Admin/AddUser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@

<?php include "header.php" ?>
<div class="container">
<div class="row">
<div class="col-md-12">
<form method="post"
action="userController.php" class="form-horizontal login_validator" id="form_block_validator">
<div class="form-group row">
<div class="col-lg-3 text-lg-right">
<label for="required2" class="form-control-label">First Name</label>
</div>
<div class="col-lg-3">
<input type="text" id="required2" name="fname"
class="form-control" required>
</div>
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">Last Name</label>
</div>
<div class="col-lg-3">

<input type="text" class="form-control" id="textArea" name="lname" required></input>

</div>
</div>
<div class="form-group row">
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">Email</label>
</div>
<div class="col-lg-3">

<input type="text" class="form-control" id="textArea" name="Email" required></input>

</div>
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">Mobile Number</label>
</div>
<div class="col-lg-3">

<input type="text" class="form-control" id="textArea" name="MobileNumber" required></input>

</div>
</div>

<div class="form-group row">
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">Address</label>
</div>
<div class="col-lg-3">

<input type="textarea" class="form-control" id="textArea" name="Address" required></input>

</div>
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">User Type</label>
</div>
<div class="col-lg-3">
<select name="UserType" class="form-control">
<?php
$q=$d->select("usertype","","");
while ($data=mysqli_fetch_array($q)) {
?>


<option value="<?php echo $data['UserTypeId']?>"><?php echo $data['Description']?></option>

<?php }?>
</select>
</div>
</div>
<div class="form-group row">
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">Password</label>
</div>
<div class="col-lg-3">

<input type="textarea" class="form-control" id="textArea" name="Password" required></input>

</div>
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">Is Active</label>
</div>
<div class="col-lg-3">
<select name="IsActive" class="form-control">
<option value="1">Yes</option>
<option value="0">No</option>
</select>
</div>
</div>

<div class="form-actions form-group row"></div>
<div class="form-actions form-group row">
<div class="col-lg-6 push-lg-4 pull-right">
<button type="submit"
name="add_user" class="btn btn-primary" value="Validate" >Add User</button>

</div>
</div>
</form>
</div>
</div>
</div>
89 changes: 75 additions & 14 deletions Admin/EditUser.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<div class="row">
<div class="col-md-12">
<form method="post"
action="areacontroller.php" class="form-horizontal login_validator" id="form_block_validator">
action="userController.php" class="form-horizontal login_validator" id="form_block_validator">
<div class="form-group row">
<div class="col-lg-4 text-lg-right">
<label for="required2" class="form-control-label">Fname *</label>
<div class="col-lg-3 text-lg-right">
<label for="required2" class="form-control-label">First Name</label>
</div>
<?php
$i=1;
Expand All @@ -16,34 +16,95 @@

$q=$d->select("user","UserId=$n","");
while ($data=mysqli_fetch_array($q)) {
?>
$TypeId=$data['UserType'];
$IsActive=$data['IsActive'];
//echo $IsActive;
?>

<div class="col-lg-4">
<div class="col-lg-3">
<input type="text" id="required2" name="fname"
class="form-control"
value="<?php echo $data['FirstName']; ?> "required>
</div>
</div>
<div class="form-group row">
<div class="col-lg-4 text-lg-right">
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">Last Name</label>
</div>
<div class="col-lg-4">
<div class="col-lg-3">

<input type="text" class="form-control" id="textArea" name="lname" value="<?php echo $data['LastName']; ?>" required></input>

</div>
</div>
<div class="form-actions form-group row">
<div class="col-lg-4 push-lg-4">
<input type="hidden" name="area_id" value="<?php echo $data['UserId']; } ?>">

<div class="form-group row">
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">Email</label>
</div>
<div class="col-lg-3">

<input type="text" class="form-control" id="textArea" name="Email" value="<?php echo $data['Email']; ?>" required></input>

</div>
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">Mobile Number</label>
</div>
<div class="col-lg-3">

<input type="text" class="form-control" id="textArea" name="MobileNumber" value="<?php echo $data['MobileNumber']; ?>" required></input>

</div>
</div>

<div class="form-group row">
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">Address</label>
</div>
<div class="col-lg-3">

<input type="textarea" class="form-control" id="textArea" name="Address" value="<?php echo $data['Address']; ?>" required></input>

</div>
<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">User Type</label>
</div>
<div class="col-lg-3">
<select name="UserType" class="form-control">
<?php
$q=$d->select("usertype","","");
while ($data1=mysqli_fetch_array($q)) {
?>


<button type="submit"
name="update_user" class="btn btn-primary" value="Validate" >Update User</button>
<option value="<?php echo $data1['UserTypeId']?>" <?php if($TypeId==$data1['UserTypeId']) echo 'selected="selected"'?>><?php echo $data1['Description']?></option>

<?php }?>
</select>
</div>
</div>
<div class="form-group row">

<div class="col-lg-3 text-lg-right">
<label for="email2" class="form-control-label">Is Active</label>
</div>
<div class="col-lg-3">
<select name="IsActive" class="form-control">
<option value="1" <?php if($IsActive=1) echo 'selected="selected"' ?>>Yes</option>
<option value="0" <?php if($IsActive=0) echo 'selected="selected"' ?>>No</option>
</select>
</div>
</div>

<div class="form-actions form-group row"></div>
<div class="form-actions form-group row">
<div class="col-lg-6 push-lg-4 pull-right">
<input type="hidden" name="userId" value="<?php echo $data['UserId']; } ?>">
<button type="submit"
name="update_user" class="btn btn-primary" value="Validate" >Update User</button>

</div>
</div>


</form>
</div>
</div>
Expand Down
106 changes: 32 additions & 74 deletions Admin/Index.php
Original file line number Diff line number Diff line change
@@ -1,82 +1,40 @@

<?php include "header.php" ?>
<section class="table-responsive">
<?php

?>

<!-- BEGIN EXAMPLE1 TABLE PORTLET-->
<div class="card">
<div class="card-header bg-white"><div class="animate fadeInRightBig"><div class="col-md-9 col-md-offset-2 col-sm-offset-3">

<h1 style="background: white" class="login-page"><i class="fa fa-table"> Manage User</i></h1></div>
<div class="row">
<div class="col-md-6 ">
<!-- Primary Panel -->
<div class="panel panel-info">
<div class="panel-heading">
<h3 class="panel-title">User</h3>
</div>
<div class="card-block p-t-25">
<div class="">
<div class="pull-sm-right">
<div class="tools pull-sm-right"></div>
</div>
</div><div class="animate fadeInLeftBig">
<table class="table table-striped table-bordered table-hover" id="sample_1">

<thead>
<tr>
<th>Sr.No</th>
<th>First Name</th>
<th>Last Name</th>
<th>Phone </th>
<th>Email</th>
<th>Action</th>

</tr>
</thead>
<tbody>
<?php
$i=1;
$q=$d->select("user","","");
while ($data=mysqli_fetch_array($q)) {


?>
<tr>
<td><?php echo $i++; ?></td>
<td><?php echo $data['FirstName']; ?></td>
<td><?php echo $data['LastName']; ?></td>
<td><?php echo $data['MobileNumber']; ?></td>
<td><?php echo $data['Email']; ?></td>
<td><?php echo $data['UserId']; ?></td>
<td class="center" style="width: 150px">

<form style="float: left; margin-right: 3px;" action="areacontroller.php" method="post">
<input type="hidden" name="area_id" value="<?php echo $data['UserId']; ?>">
<button class="btn btn-danger"
name="DeleteUser">Delete</button></form>

<form action="EditUser.php" method="post">
<input type="hidden" name="UserId" value="<?php echo $data['UserId']; ?>">
<button class="btn btn-primary"
name="User_Id">Edit</button>
</form>
</td>
</tr>
<?php } ?>
</tbody>

</table>
</div>
<div class="panel-body" >
<span class="fa-stack fa-lg">
<i class="fa fa-square-o fa-stack-2x"></i>
<i class="fa fa-user fa-stack-1x"></i>
</span>
<?php
$q=$d->count_data("UserId","user","");
$r=mysqli_fetch_assoc($q);
?>
<span>Number Of User</span> <span type="span" class="label label-info"><?php echo $r['total']; ?></span>

<br>
<span class="fa-stack fa-lg">
<i class="fa fa-square-o fa-stack-2x"></i>
<i class="fa fa-user fa-stack-1x"></i>
</span><br\>
<?php
$q=$d->count_data("UserId","user","IsActive=1");
$r=mysqli_fetch_assoc($q);
?>
<br\><span>Number Of Active User</span> <span type="span" class="label label-info"><?php echo $r['total']; ?></span>
<br><a class="btn-block" href="ManageUser.Php" style="margin: 5px;margin-right:15px "><i class="fa fa-external-link"> Manage User</i></a>
</div>


</div>
</div>





<?php include "footer.php" ?>






</div>
<!-- End Primary Panel -->
</div>
Loading

0 comments on commit 1840f4a

Please sign in to comment.