0byt3m1n1
Path:
/
home
/
k74ns2xygros
/
www
/
globetech
/
cms
/
subuser
/
[
Home
]
File: clients.php
<?php session_start(); include "../assets/config.php"; $comp_type = $_SESSION['type']; $cid = $_SESSION["cid"]; $x = $_REQUEST['q']; $user1 = new user(); //$user2 = new user(); //$result = $user1->list_client(); //$all = mysqli_num_rows($result); if ($x == 'showall') { $result = $user1->list_client(); } else if ($x == 'accepted') { $result = $user1->list_accepted_client('accepted'); } else if ($x == 'unaccepted') { $result = $user1->list_accepted_client('unaccepted'); } else if ($x == 'rejected') { $result = $user1->list_accepted_client('rejected'); } $result1 = $user1->list_client(); $all = mysqli_num_rows($result1); $c = 0; $d = 0; $e = 0; while ($fet1 = mysqli_fetch_assoc($result1)) { if ($fet1['application_status'] == 'accepted') { $c++; } else if ($fet1['application_status'] == 'unaccepted') { $d++; } else if ($fet1['application_status'] == 'rejected') { $e++; } } ?> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../build/js/ajax.js" type="text/javascript"></script> </head> <div class="col-md-12 filters"> <div class="links"> <label>Filter users:</label> <button href="" class="btn btn-primary" onclick="client('showall')" >All Employee (<?php echo $all; ?>) </button> <button href="" class="btn btn-success " id="show_active" onclick="client('accepted')"> Accepted Employee (<?php echo $c; ?>) </button> <button href="" class="btn btn-warning " onclick="client('unaccepted')"> Unaccepted Employee (<?php echo $d; ?>) </button> <button href="" class="btn btn-danger" onclick="client('rejected')">Rejected Employee (<?php echo $e; ?>) </button> </div> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="x_panel"> <div class="x_content" id="content" > <!--<div id="datatable-buttons"></div>--> <table id="datatable-checkbox" class="table table-striped table-bordered bulk_action result_table"> <thead> <tr> <!--<th><input type="checkbox" id="checkall" onclick="check(this.checked)"></th>--> <th>#</th> <th>Id</th> <th>Name</th> <!--<th>Email</th>--> <th>Phone</th> <th>Employee No.</th> <th>Zone</th> <th>Superitendent Engineer</th> <th>Executive Engineer</th> <th>City</th> <!--<th>Status</th>--> <th>Action</th> </tr> </thead> <tbody id="display_res"> <?php while ($row = mysqli_fetch_assoc($result)) { ?> <tr> <!--<td> <input type="checkbox" name="checkboxes" class="flat" onclick="bulk_user(this.checked)" value="<?php echo $row["cid"]; ?>"></td>--> <td></td> <td><a class="text-capitalize" href="../lists/view_employee.php?q=<?php echo $row['cid']; ?>"><?php echo $row['cid'] ?></a></td> <td><a class="text-capitalize" href="../lists/view_employee.php?q=<?php echo $row['cid']; ?>"><?php echo $row['customer_name'] ?></a></td> <!--<td><?php // echo $row['emailid'] ?></td>--> <td><?php echo $row['phone'] ?></td> <td><?php echo $row['emp_no'] ?></td> <td><?php echo $row['zone'] ?></td> <td><?php echo $row['s_engineer'] ?></td> <td><?php echo $row['ex_engineer'] ?></td> <td><?php echo $row['district'] ?></td> <!--<td><a class="text-capitalize btn btn-primary btn-sm" style="padding-bottom: 3; padding-top: 3;" href="../lists/print_employee.php?q=<?php echo $row['cid']; ?>">Accept</a></td>--> <td> <?php if (@$_SESSION['subadminview']): ?> <a class="text-capitalize btn btn-info btn-sm" style="padding-bottom: 3; padding-top: 3;" href="../subuser/view_employee.php?q=<?php echo $row['cid']; ?>">View</a> <?php endif; ?> <?php if (@$_SESSION['subadminedit']): ?> <a href="../subuser/edit_employee.php?emp_id=<?php echo $row['cid']; ?>" class="text-capitalize btn btn-primary btn-sm"> Edit</a> <?php endif; ?> <?php if ($row['application_status'] == 'accepted') { ?> <a class="text-capitalize btn btn-primary btn-sm" style="padding-bottom: 3; padding-top: 3;" href="../lists/print_employee.php?q=<?php echo $row['cid']; ?>">Print</a><?php } ?> </td> </tr> </tr> <?php } ?> </tbody> </table> </div> </div> </div> </div>