0byt3m1n1
Path:
C:
/
wamp64
/
www
/
cpms_new
/
ADMIN
/
[
Home
]
File: search_user_ctrl.php
<?php require_once "../lib/config.php"; //require_once BASE_DIR."/lib/db/DBconnection.php"; require_once BASE_DIR."/lib/db/connection.php"; $servername = "localhost"; $username = "root"; $password = ""; $dbname = "cpms"; $con = mysqli_connect($servername, $username, $password, $dbname); class UserSearch { public static function printUserDetails($sql1) { global $con; // Make $con available inside the function $sql = mysqli_query($con, $sql1); if (mysqli_affected_rows($con) > 0) {//14 ?> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="x_panel"> <div class="x_title"> <h2>User Details</h2> <div class="clearfix"></div> </div> <div class="x_content"> <table class="table"> <thead> <tr> <th>#</th> <th>Name</th> <th>Username</th> <th>Designation</th> <th>Photo</th> <th>Password</th> <th>Edit</th> </tr> </thead> <tbody> <?php while($row=mysql_fetch_array($sql)) {//32 ?> <tr> <td><?php @$_SESSION['sl_no']=@$_SESSION['sl_no']+1; echo @$_SESSION['sl_no']; ?></td> <td><?php echo ucwords($row['salutation'].' '.$row['name']); ?></td> <td><?php echo $row['user_name']; ?></td> <td><?php echo $row['designation']; ?></td> <td><?php echo "<img src=' ".$row['photo']."' width='30%' />" ?></td> <!-- <td><?php echo $row['email']; ?></td> --> <td></a> <?php echo $row['passwd']; ?></td> <td><a href="../ADMIN/edit_user.php?id=<?php echo $row['user_id']; ?>"><img src="../images/business_user_edit.png" alt="edit" width="25" height="25" /></a><a href="../../ADMIN/edit_user.php?id=<?php echo $row['user_id']; ?>&name=<?php echo $row['user_name'];?>"></a><a href="../../ADMIN/edit_user.php?id=<?php echo $row['user_id']; ?>&name=<?php echo $row['user_name'];?>"></a></td> </tr> <?php }//32 ?> </tbody> </table> </div> </div> </div> <?php }//14 else {//14 ?><font color="#CC0000"><b><?php echo "No User to display"; ?></b></font><?php }//14 }//10 }//7 ?>