<?php defined('BASEPATH') or exit('No direct Access is Allowed'); ?>

<div class="content-wrapper">
  <!-- Content Header (Page header) -->
<?php /*?>  <section class="content-header">
    <h1>  <small>WorkPackage Master</small> </h1>
    <ol class="breadcrumb">
      <li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>
      <li><a href="#">Manage</a></li>
      <li class="active">WorkPackage Master</li>
    </ol>
  </section><?php */?>
  <!-- Main content -->
  <section class="content">
  <div class="row">
    <div class="col-xs-12">
      <div class="box">
          <div class="box-header">
			<div class="box-header with-border padding_box">
				<div class="create pu">
					<div class="col-md-2 padding_20">
						<form action="<?=site_url('admin/Adminlte/download_excel_page')?>" class="exconvert"  method="post">
							<input type="hidden" id="expo1" name="expo1">
							<input type="submit" value="Excel" class="pull-right active form-control btn-social btn-success input-sm"  />
						</form>
					 </div>
					<div class="col-md-2  padding_20">
						<?=form_open('admin/master/Faculty');?><?php if( count($list)==10 ){?><?php echo form_hidden('all','all');?><?php  } ?>
						<?php echo form_submit('All','All',['class'=>'form-control input-sm pull-right active']);?>
						<?=form_close();?>
					</div>
					<div class="col-md-2  padding_20">
						<?php echo anchor('admin/master/Faculty/create','<i class="fa fa-fw fa-plus-square"></i> Add Faculty',['class'=>'form-control input-sm pull-right active']); ?>
					</div>
				</div>
				<div class="box-tools pull-right collapse_tool">
					<!--<a class='button glyphicon glyphicon-plus button_collapse' href='#'></a>-->
						<a href="#" class="btn btn-sm btn-social btn-github pull-right button_collapse" style="margin-left:3px;">
						<i class="fa fa-fw fa-search  text-green"></i>Search</a>
				</div>
			</div>
          </div>
          <?php //echo $message;?>
          <?php echo form_hidden('my_array',['name'=>'doaction','id'=>'doaction']);?>
     <div class="box-body table-responsive no-padding" >
        <div  id="reportsummary">
        <!-- <table id="example2" class="table table-bordered table-hover  table-responsive" style="font-size: 10px;">-->

  <div id="tableContainer2" class="container-tb">
        <table>
          <thead>
            <tr>
              <th>#</th>
              <th>Category</th>
              <th>Class</th>
              <th>Subject</th>
              <th>Code</th>
              <th>Userid</th>
              <th>Faculty</th>
              <th>Email</th>
              <th>Description</th>
              <th>Created</th>
              <th>Updated</th>
              <th>Status</th>
              <th>Action</th>
            </tr>
          </thead>
          <tbody>
			<?php if( count($list) ):$sn=1;
			$count = $this->uri->segment(4);
			foreach($list as $lists ): ?>
            <tr >
              <td ><?php echo  $sn; ?></td>
              <td ><?php echo  strtoupper($lists->category);?></td>
              <td ><?php echo  strtoupper($lists->class);?></td>
                <td ><?php echo  strtoupper($lists->subject);?></td>
                 <td ><?php echo  strtoupper($lists->category_code).strtoupper($lists->class_code).strtoupper($lists->subject_code);?></td>
                  <td ><?php echo  strtoupper($lists->userid);?></td>
                  <td ><?php echo  strtoupper($lists->first_name)." ".strtoupper($lists->last_name);?></td>
                <td ><?php echo strtoupper($lists->email);?></td>
                <td ><?php echo  strtoupper($lists->description);?></td>
                <td><?php echo  strtoupper($lists->create_at);?></td>
                <td><?php echo  strtoupper($lists->update_at);?></td>
                <td><?php if($lists->status==1){echo "Active";}else{echo "Inactive";}?></td>
              <td >
					<?php echo anchor("admin/master/faculty/edit/{$lists->id}",'<i class="fa fa-edit"></i>',['title'=>'Edit faculty']); ?><?php nbs(3);?>
                    <?php echo anchor("admin/master/faculty/view/{$lists->id}",'<i class="fa fa-fw fa-eye"></i>',['title'=>'View faculty']); ?>
					<?php echo anchor("admin/master/faculty/delete/{$lists->id}",'<i class="fa fa-fw fa-scissors"></i>',['title'=>'Delete faculty',
					'onClick' =>"return confirm('Are you sure you want to delete?')"]); ?>
               </td>
            </tr>
            <?php $sn++;?>
			<?php endforeach; ?>
            <?php else : ?>
            <tr>
              <td colspan="6"><strong>No record found</strong></td>
            </tr>
            <?php endif; ?>
          </tbody>
        <?php echo form_close();?>
         <tfoot>
            <tr>
              <th>#</th>
              <th>Category</th>
              <th>Class</th>
              <th>Subject</th>
              <th>Code</th>
                    <th>Userid</th>
              <th>Faculty</th>
              <th>Description</th>
              <th>Created</th>
              <th>Updated</th>
              <th>Status</th>
              <th>Action</th>
            </tr>
          </tfoot>
        </table>
		 </div>
        </div>
        <?php $count++; //echo  $link; ?>

        </div>
    </div>
  </div>
</div>
</section>
</div>

<div class='wrap'>
	<div class='content content_pop'>
		<div class="col-md-12">
			<?=form_open('admin/master/Faculty/search');?>
				<div class="">
					<div class="col-md-2  padding_20 emp_style">
						<select id='sel_category' class="form-control input-sm" name="category">
							<option value="" >Select Category</option>
							<?php
							foreach($category as $category1){
								echo "<option value='".$category1['id']."'>".strtoupper($category1['category_code'])." | ".strtoupper($category1['category'])."</option>";
							}
							?>
						</select>
					</div>
					<div class="col-md-2  padding_20 emp_style">
						<select id='sel_class' class="form-control input-sm" name="class" >
							<option value="" >Select class</option>
						</select>
					</div>
					<div class="col-md-2 padding_20 emp_style">
						<select id='sel_subject' class="form-control input-sm" name="subject" >
							<option value="" >Select subject</option>
						</select>
					</div>

					<div class="col-md-2 padding_20">
						<?=form_dropdown('subject_code',$subject_code ,set_value('subject_code',$data_taskpo['subject_code']),['class'=>'form-control input-sm select2 select2-hidden-accessible',
						"tabindex"=>"-1","aria-hidden"=>"true","style"=>"width: 100%;"]);?>
                   </div>

					<div class="col-md-2  padding_20 emp_style">
						<?php $options=array(''=>'Search Type','and'=>'And','or'=>'OR');?>
						<?=form_dropdown('seach_term',$options,set_value('seach_term','and'),['class'=>'form-control input-sm','style'=>'']);?>
					</div>
					<div class="col-md-2  padding_20 emp_style">
						<?php $options=array(''=>'Order By','ASC'=>'Ascending','DESC'=>'Descending','RANDOM'=>'Random');?>
						<?=form_dropdown('order_by',$options,set_value('order_by','ASC'),['class'=>'form-control input-sm']);?>
					</div>

				</div>
				<div class="btn_mrgin1">

				 <?=form_submit('search','search',['class'=>'btn btn-primary btn_mrgin btn-sm']);?>
				</div>
			<?php echo form_close();?>
			</div>
	</div>
</div>
