GOOGLE
<?php include('header.php'); ?>
<?php include('navbar_user.php');
$user_querys=mysql_query("select * from `registration` where `id`='".$_SESSION['user_id']."'")or die(mysql_error());
$rows=mysql_fetch_array($user_querys); ?>
<div class="container">
<div class="margin-top">
<div class="row">
<div class="span2">
<ul class="nav nav-tabs nav-stacked">
<li>
<?php if($rows['image']==""){?>
<a href="#add_user" data-toggle="modal" ><i class="icon-plus icon-large"></i> <strong>Add Profile Image</strong></a>
<?php }else{ ?>
<a href="#edit_user" data-toggle="modal" ><i class="icon-plus icon-large"></i> <strong>Edit Profile Image</strong></a>
<?php } ?>
</li>
<br/>
<li>
<img src="../<?php echo $rows['image'];?>" width="150">
</li>
</ul>
<ul class="nav nav-tabs nav-stacked">
<li>
<a href="#changePassword" data-toggle="modal" ><i class="icon-plus icon-large"></i> <strong>Change Password</strong></a>
</li>
</ul>
<!-- Modal add user -->
<?php include('modal_add_user.php'); ?>
</div>
<div class="span10">
<br/>
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong><i class="icon-user icon-large"></i> My Profile</strong><b><span style="float: right;">WELCOME : <?php echo $rows['name'];?> <?php echo $rows['lname'];?></span></b>
</div>
<div style="overflow-x:auto;">
<table cellpadding="0" cellspacing="0" class="table table-striped w-auto" style="border: 1px !important">
<thead>
<tr>
<th style="background-color: orange;">Name</th>
<th style="background-color: orange;">Mobile</th>
<th style="background-color: orange;">Email Id</th>
<th style="background-color: orange;">Address</th>
<th style="background-color: orange;">City</th>
<th style="background-color: orange;">State</th>
<th style="background-color: orange;">Edit Profile</th>
</tr>
</thead>
<tbody>
<?php
$cities = mysql_query("SELECT * FROM `cities` WHERE `id`='".$rows['city']."'");
$selCity = mysql_fetch_array($cities);
$states = mysql_query("SELECT * FROM `states` WHERE `id`='".$rows['state']."'");
$selstates = mysql_fetch_array($states);
$id=$rows['user_id']; ?>
<tr class="del<?php echo $id ?>">
<td><?php echo $rows['name']; ?> <?php echo $rows['lname']; ?></td>
<td><?php echo $rows['mobile_no']; ?></td>
<td><?php echo $rows['email_id']; ?></td>
<td><?php echo $rows['address']; ?></td>
<td><?php echo $selCity['name']; ?></td>
<td><?php echo $selstates['name']; ?></td>
<td width="100">
<a href="edit_student.php" class="btn btn-success"><i class="icon-pencil icon-large"></i></a>
<?php //include('modal_edit_user.php'); ?>
</td>
<?php include('toolttip_edit_delete.php'); ?>
<!-- Modal edit user -->
</tr>
</tbody>
</table>
</div>
</div>
<hr/>
<h3><b style="color: red;">My Last Transaction</b></h3>
<div style="overflow-x:auto;">
<!--Table-->
<table class="table table-striped w-auto" border="1">
<!--Table head-->
<thead>
<tr>
<th style="background-color:green; color: white;">Sr. No.</th>
<th style="background-color:green; color: white;">Book Title</th>
<th style="background-color:green; color: white;">Borrow on</th>
<th style="background-color:green; color: white;">Due on</th>
<th style="background-color:green; color: white;">Over Due Days</th>
<th style="background-color:green; color: white;">Penalty</th>
<th style="background-color:green; color: white;">Status</th>
</tr>
</thead>
<?php
$bookteken = mysql_query("SELECT * FROM `borrowdetails` WHERE `member_id`='".$_SESSION['user_id']."' AND `borrow_status`='borrow'");
$i=1;
while($seltakenBook = mysql_fetch_array($bookteken)){
$borrow = mysql_query("SELECT * FROM `borrow` WHERE `borrow_id`='".$seltakenBook['borrow_id']."'");
$selBorrow = mysql_fetch_array($borrow);
$bookteken1 = mysql_query("SELECT * FROM `book` WHERE `book_id`='".$seltakenBook['book_id']."'");
$seltakenBook1 = mysql_fetch_array($bookteken1);
?>
<tbody>
<tr class="table-info">
<th scope="row"><?php echo $i;?></th>
<td><?php echo $seltakenBook1['book_title']; ?></td>
<td><?php echo $selBorrow ['date_borrow']; ?> </td>
<td><?php echo $selBorrow['due_date']; ?> </td>
<td>
<?php $startTimeStamp = strtotime($selBorrow['due_date']);
$dates = date("Y-m-d");
$endTimeStamp = strtotime($dates);
$timeDiff = abs($endTimeStamp - $startTimeStamp);
$numberDays = $timeDiff/86400; // 86400 seconds in one day
if($selBorrow['due_date']<=$dates){
// and you might want to convert to integer
echo $numberDays = intval($numberDays);
}?>
</td>
<td><b style="color: red;"> <?php if($selBorrow['due_date']<=$dates){echo $numberDays*10; }?></b></td>
<td width=""><?php echo $seltakenBook['borrow_status']; ?></td>
</tr>
<?php $i++; } ?>
</tbody>
<!--Table body-->
</table>
</div>
</div>
</div>
</div>
<!--Table-->
<script type="text/javascript">
/* $(document).ready( function() {
$('.btn-danger').click( function() {
var id = $(this).attr("id");
if(confirm("Are you sure you want to delete this Data?")){
$.ajax({
type: "POST",
url: "delete_user.php",
data: ({id: id}),
cache: false,
success: function(html){
$(".del"+id).fadeOut('slow');
}
});
}else{
return false;}
});
}); */
</script>
<style>
table {
border-collapse: collapse;
border-spacing: 0;
width: 100%;
border: 1px solid #ddd;
}
th, td {
text-align: left;
padding: 8px;
}
tr:nth-child(even){background-color: #f2f2f2}
</style>
</div>
</div>
</div>
</div>
<?php include('footer.php') ?>
Copyright © 1945 -