File "sub_details.php"
Full Path: /home/ichhrkpd/public_html/idcm_old/application/views/sub_details.php
File size: 5.78 KB
MIME-type: text/html
Charset: utf-8
<?php
$std_sub_data = isset($std_sub_data)?$std_sub_data:array();
$i = 1;
// $total_enrolled = count($std_data);
$msg = isset($msg)?$msg:'';
$msg_type = isset($msg_type)?$msg_type:'';
$this->session->UnsetFlashData();
$sub_info = $sub_data[0]->sub_title . ' (' . $sub_data[0]->sub_id . ')';
?>
<style>
input {
width: 50px;
}
td, th {
text-align: center;
}
</style>
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<?php $k=0;
foreach ($std_sub_data as $sd){
$k++;
}
echo $title?>
</h1>
<?php //echo $practical_found; ?>
</section>
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<h3 class="box-title"><?php echo $sub_info." Total Enrolled-".$k; echo $pos_id;?></h3>
<a href="<?php echo base_url().'admin/batch_subjects/batch_id/'.$batch_id;?>" class="btn-sm btn-info pull-right"><i class="fa fa-arrow-left" aria-hidden="true"></i> Back </a>
</div><!-- /.box-header -->
<div class="box-body">
<div class="row">
</div>
<div class="">
<table id="example" class="table table-bordered table-hover">
<thead>
<tr>
<th>SL</th>
<th>Roll No.</th>
<th>Reg. ID</th>
<th>Name</th>
<th>Theory</th>
<?php if($eng_found == 'N') { ?>
<th>MCQ</th>
<?php } ?>
<?php if($practical_found == 'Y') { ?>
<th>Practical</th>
<?php } ?>
<th>Total</th>
<th>LG</th>
<th>GP</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php $j=1;
foreach ($std_sub_data as $sd){
?>
<form action="<?php echo base_url()."admin/save_marks"?>" method="post">
<input type="hidden" name="ss_id" id="ss_id" value="<?php echo $sd->ss_id; ?>">
<input type="hidden" name="sub_id" id="sub_id" value="<?php echo $sd->sub_id; ?>">
<input type="hidden" name="batch_id" id="batch_id" value="<?php echo $batch_id; ?>">
<input type="hidden" name="year_no" id="year_no" value="<?php echo $year_no; ?>">
<input type="hidden" name="pos_id" id="pos_id" value="<?php echo $i; ?>">
<tr>
<td><?php echo $j; ?></td>
<td><?php echo $sd->std_roll; ?></td>
<td>
<?php
if($i % 10 == 0){
$pos = 'pos_'.$i;
echo "<div id='$pos'></div>";
}
echo $sd->std_reg;
?>
</td>
<td><?php echo $sd->name;?></td>
<td><input id="theory" type="text" name="theory" value="<?php echo $sd->theory; ?>"></td>
<?php if($eng_found == 'N') { ?>
<td><input id="MCQ" type="text" name="MCQ" value="<?php echo $sd->MCQ; ?>"></td>
<?php } ?>
<?php if($practical_found == 'Y') { ?>
<td><input id="practical" type="text" name="practical" value="<?php echo $sd->practical; ?>"></td>
<?php } ?>
<td><?php echo $sd->total; ?></td>
<td><?php echo $sd->LG; ?></td>
<td><?php echo $sd->GP; ?></td>
<td>
<button type="submit" name="submit" class="btn-xs btn-success"><i class="fa fa-floppy-o"></i> Save</button>
</td>
</tr>
</form>
<?php $i++; $j++;}?>
</tbody>
</table></div>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
</div>
<script src="<?php echo base_url();?>lib/bootstrap/js/jquery.dataTables.min.js"></script>
<script src="<?php echo base_url();?>lib/bootstrap/js/dataTables.bootstrap.min.js"></script>
<script>
$(document).ready(function() {
var pos_id = <?php echo $pos_id;?>;
if(pos_id > 0){
var pos_str = 'pos_' + pos_id;
$('html, body').animate({
scrollTop: $('#' + pos_str).offset().top
}, 10);
}
var toast_msg = '<?php echo $msg;?>';
var msg_type = '<?php echo $msg_type;?>';
if(toast_msg !== null && toast_msg !== '') {
var shortCutFunction = msg_type;
toastr.options = {
positionClass: 'toast-bottom-right'
};
var $toast = toastr[shortCutFunction](toast_msg);
}
} );
</script>