Exemplo n.º 1
0
?> 
<?php if($rows>0){ ?>
<h1>This book is available to the following member(s)</h1>
<div class="contentEm">
<div class="bg1">
<?php while($r = mysql_fetch_assoc($rs)){ ?>
	<?php echo $r['title'] . " " . $r['firstnames'] . " " . $r['surname'] . " (" . $r['type'] . ")" ?><br>
	Reserved:&nbsp;<strong><?php echo $r['dt_start']; ?></strong>&nbsp;&nbsp;<?php if(($_SESSION['CurrentUser']['login_type']=="ADMIN") || ($_SESSION['CurrentUser']['login_type']=="LIBSTAFF") || ($_SESSION['CurrentUser']['mid']==$r['mid'])){ ?><a href='reservations_book.php?do=cancel&rid=<?php echo $r['rid']; ?>'>Cancel Reservation</a><?php } ?><br>
	The book with Access No:&nbsp;<strong><?php echo $r['access_no']; ?></strong>&nbsp;is available. Offer expires on:&nbsp;<strong><?php echo $r['dt_end']; ?></strong><br>
<?php } ?>
</div>
<?php } ?>

<?php 	
	$re = new Reservations;
	$rs = $re->GetReservationsBy_bid_status($_REQUEST['ID'],"Active");
	$rows = mysql_num_rows($rs);	
?> 
<?php if($rows>0){ ?>
<h1>Following&nbsp;<?php echo $rows; ?>&nbsp;member(s) have active reservations for this book</h1>
<div class="contentEm">
<div class="bg1">
<?php while($r = mysql_fetch_assoc($rs)){ ?>
	<strong><?php echo $r['dt_start']; ?></strong>&nbsp;<?php echo $r['title'] . " " . $r['firstnames'] . " " . $r['surname'] . " (" . $r['type'] . ")" ?>&nbsp;
	<?php if(($_SESSION['CurrentUser']['login_type']=="ADMIN") || ($_SESSION['CurrentUser']['login_type']=="LIBSTAFF") || ($_SESSION['CurrentUser']['mid']==$r['mid'])){ ?><a href='reservations_book.php?do=cancel&rid=<?php echo $r['rid']; ?>'>Cancel</a><?php } ?><br>
<?php } ?>
</div>
<?php } ?>

</div>
</td>