      <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
          <h1>
            Channellimo
            <small>Preview</small>
          </h1>
          <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
            <li><a href="#">Forms</a></li>
            <li class="active">Peak Time</li>
          </ol>
        </section>
        
        <section class="content">
        	
           <div class="box">
             <div class="box-header">
               <h3 class="box-title"><a href="<?php echo site_url("admin/peaktime/add");?>">ADD Peak Time</a></h3>
             </div><!-- /.box-header -->
             <div class="box-body">
                <table id="example1" class="table table-bordered table-striped">
                    <thead>
                      <tr>
                        <th>ID</th>
                        <th>Service For</th>
                        <th>From</th>
                        <th>To</th>
                        <th>From-Time</th>
                        <th>To-Time</th>
                        <th>TypeCar</th>
                        <th>Amount</th>
                        <th>Createby</th>
                        <th>Createdate</th>
                        <th></th>
                        <th></th>
                      </tr>
                    </thead>
                    <tbody>
                    <?php 
					$i=0;

					foreach($peaktime as $v)
					{
						
				    $i++;
					$time_from  = date("g:i a", strtotime("".$v['from_time'].""));
					$time_to  = date("g:i a", strtotime("".$v['to_time'].""));
					 	echo'
						<tr>
						  <td>'.$i.'</td>
						  <td>'.$v['servicename'].'</td>
						  <td>'.$v['locationfrom'].'</td>
						  <td>'.$v['locationto'].'</td>
						  <td>'.$time_from.'</td>
						  <td>'.$time_to.'</td>
						  <td>'.$v['carname'].'</td>
						  <td>'.$v['amount'].' $</td>
						  <td>'.$v['username'].'</td>
						  <td>'.$v['createdate'].'</td>
						  <td><a href="'.site_url("admin/peaktime/edit/".$v['id']."").'"><i class="fa fa-edit"></i></a></td>
						  <td><a href="'.site_url("admin/peaktime/delete/".$v['id']."").'" class="confirmation"><i class="fa fa-remove"></i></a></td>
						</tr>
						';
					}
					?>
                      
                    </tbody>
                    <tfoot>
                      <tr>
                        <th>ID</th>
                        <th>Service For</th>
                        <th>From</th>
                        <th>To</th>
                        <th>From-Time</th>
                        <th>To-Time</th>
                        <th>TypeCar</th>
                        <th>Amount</th>
                        <th>Createby</th>
                        <th>Createdate</th>
                        <th></th>
                        <th></th>
                      </tr>
                    </tfoot>
                  </table>
                </div><!-- /.box-body -->
             </div><!-- /.box -->
            	
        </section>
        <?php 
	    //$time_in_12_hour_format  = date("g:i a", strtotime("".$v['from_time'].""));
		//$time_in_24_hour_format  = date("H:i", strtotime("1:30 PM"));
		//echo $time_in_12_hour_format;
		
	   ?>
       </div>
       
       <?php if($msg = $this->session->flashdata("message")): ?>
	   <script>
       	alert("<?php echo $msg?>");
       </script>
       <?php endif; ?>
	   
       