<commit_before><?php //var_dump($rooms); ?>
<section class="content rooms">
	<div class="row">
		<div class="col-md-10">
			<?php echo $this->session->flashdata('success_message'); ?>
		</div>
		<div class="col-md-10">
			<div class="box box-danger">
				<div class="box-body">
					<!-- Room table -->
					<table id="pending-request" class="table table-condensed table-striped table-bordered" >
						<thead>
							<tr>
								<th>#</th>
								<th>Room No.</th>
								<th>Purpose</th>
								<th>Reservation Date</th>
								<th>Time Start</th>
								<th>Time End</th>
								<th>Date Filed</th>
								<th>Reserved by</th>
								<?php if ($this->session->userdata('user_type') == 'admin'): ?>
									<th></th>
									<th></th>
								<?php endif; ?>
							</tr>
						</thead>
						<tbody>
							<?php $counter = 1; ?>
							<?php foreach($rooms as $row): ?>
								<tr>
									<td><?php echo $counter ?></td>
									<td><?php echo $row->room_no ?></td>
									<td><?php echo $row->purpose ?></td>
									<td><?php echo date('m/d/Y', strtotime($row->date_reserved)) ?></td>
									<td><?php echo $row->time_start ?></td>
									<td><?php echo $row->time_end ?></td>
									<td><?php echo date('m/d/Y H:i:s', strtotime($row->date_filed)) ?></td>
									<td><?php echo $row->fullname ?></td>
									<?php if ($this->session->userdata('user_type') == 'admin'): ?>
										<td>
											<a href="<?php echo base_url('index.php/admin/approved_request/') . $row->id ?>">
												<button class="btn btn-flat btn-success">Approve <i class="fa fa-check" aria-hidden="true"></i></button>
											</a>
										</td>
										<td>
											<a href="<?php echo base_url('index.php/admin/display_disapproved_form/') . $row->id ?>" >	
												<button class="btn btn-flat btn-danger">Disapprove <i class="fa fa-times" aria-hidden="true"></i></button>
											</a>
										</td>
									<?php endif; ?>
								</tr>
								<?php $counter++; ?>
							<?php endforeach; ?>
						</tbody>
					</table><!-- End of table -->
				</div>
			</div>
		</div>	
	</div>
</section>
<script type="text/javascript">
	$(document).ready(function() {<commit_msg>Add button to cancel request<commit_after><?php //var_dump($rooms); ?>
<section class="content rooms">
	<div class="row">
		<div class="col-md-10">
			<?php echo $this->session->flashdata('success_message'); ?>
		</div>
		<div class="col-md-10">
			<div class="box box-danger">
				<div class="box-body">
					<!-- Room table -->
					<table id="pending-request" class="table table-condensed table-striped table-bordered" >
						<thead>
							<tr>
								<th>#</th>
								<th>Room No.</th>
								<th>Purpose</th>
								<th>Reservation Date</th>
								<th>Time Start</th>
								<th>Time End</th>
								<th>Date Filed</th>
								<th>Reserved by</th>
								<?php if ($this->session->userdata('user_type') == 'admin'): ?>
									<th></th>
									<th></th>
								<?php endif; ?>
								<th></th>
							</tr>
						</thead>
						<tbody>
							<?php $counter = 1; ?>
							<?php foreach($rooms as $row): ?>
								<tr>
									<td><?php echo $counter ?></td>
									<td><?php echo $row->room_no ?></td>
									<td><?php echo $row->purpose ?></td>
									<td><?php echo date('m/d/Y', strtotime($row->date_reserved)) ?></td>
									<td><?php echo $row->time_start ?></td>
									<td><?php echo $row->time_end ?></td>
									<td><?php echo date('m/d/Y H:i:s', strtotime($row->date_filed)) ?></td>
									<td><?php echo $row->fullname ?></td>
									<?php if ($this->session->userdata('user_type') == 'admin'): ?>
										<td>
											<a href="<?php echo base_url('index.php/admin/approved_request/') . $row->id ?>">
												<button class="btn btn-flat btn-success">Approve <i class="fa fa-check" aria-hidden="true"></i></button>
											</a>
										</td>
										<td>
											<a href="<?php echo base_url('index.php/admin/display_disapproved_form/') . $row->id ?>" >	
												<button class="btn btn-flat btn-danger">Disapprove <i class="fa fa-times" aria-hidden="true"></i></button>
											</a>
										</td>
									<?php endif; ?>
									<td>
										<a href="<?php echo base_url('index.php/admin/cancel_request/') . $row->id ?>">
											<button class="btn btn-flat btn-warning">Cancel <i class="fa fa-times" aria-hidden="true"></i></button>
										</a>
									</td>
								</tr>
								<?php $counter++; ?>
							<?php endforeach; ?>
						</tbody>
					</table><!-- End of table -->
				</div>
			</div>
		</div>	
	</div>
</section>
<script type="text/javascript">
	$(document).ready(function() {
{'fraction_non_alphanumeric': 0.2224829351535836, 'fraction_numerical': 0.0021331058020477816, 'mean_word_length': 2.146979865771812, 'pattern_counts': {'":': 0, '<': 208, '<?xml version=': 0, '>': 239, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '521052', 'n_tokens_mistral': 2370, 'n_tokens_neox': 1612, 'n_words': 329}