
  <div class="container-fluid">
 
 <div class="row">

  <div class="col-xs-12 col-sm-6 col-lg-12">
  
		<div class="panel panel-primary" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				
										 <span class="pull-right"> Please Enter Correct Details of the New company</span>					                   
						 <a data-toggle='modal' data-target='#addModal' class="btn btn-warning">Add new Company </a>


            	</div>
            </div>
			<div class="panel-body">

		
			<?PHP

			
 echo $this->session->flashdata('msg'); 

		$mydate=date("Y-m-d");

             ?>
					

<div id="addModal" class="modal fade" role="dialog">
  <div class="modal-dialog">

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Add new SMS Template</h4>
      </div>
      <div class="modal-body">
      
	  	

				<?PHP
//$session_data = $this->session->userdata('logged_in');



				echo $this->session->flashdata('msg'); 
		
                 echo form_open('admin/addcompany' , array('class' => 'form-horizontal form-groups-bordered validate', 'enctype' => 'multipart/form-data'));
				 if(validation_errors()):?>
<div class='alert alert-danger text-center'><?php echo validation_errors(); ?></div>
<?php endif;?>
				  		
		<div class="form-group">
    <label for="inputstartdate" class="col-sm-2 control-label">Created Date </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="startdate"  id="startdate" value="<?php echo set_value('startdate',$mydate); ?>" class="form-control" required placeholder="Enter Start Date e.g  2018-01-31">
		 
				
		<span class="text-danger">YYY-MM-DD <?php echo form_error('startdate'); ?>
		
		</span>
	</div>
  </div>
	<div class="form-group">
    <label for="inputbusinessname" class="col-sm-2 control-label">Business Name <span style="color:red;">*</span></label>
    <div class="col-sm-10">
	
		  		<input type="text" name="businessname" value="<?php echo set_value('businessname'); ?>" class="form-control" required placeholder="Enter first and last name">
		 
				
		<span class="text-danger"> <?php echo form_error('businessname'); ?>
		
		</span>
	</div>
  </div>

  
  	<div class="form-group">
    <label for="inputcontact" class="col-sm-2 control-label">	Contact <span style="color:red;">*</span></label>
    <div class="col-sm-10">
	
		  		<input type="text" name="contact" value="<?php echo set_value('contact'); ?>" class="form-control" required placeholder="Enter contact e.g 254712345678">
		 
				
		<span class="text-danger">Enter contact e.g 254712345678 <?php echo form_error('contact'); ?>
		
		</span>
	</div>
  </div>
	   	<div class="form-group">
    <label for="inputemail" class="col-sm-2 control-label">	Email </label>
    <div class="col-sm-10">
	
		  		<input type="email" name="email" value="<?php echo set_value('email'); ?>" class="form-control"  placeholder="Enter Your email">
		 
				
		<span class="text-danger"> <?php echo form_error('email'); ?>
		
		</span>
	</div>
  </div>
				 	<div class="form-group">
    <label for="inputusername" class="col-sm-2 control-label">	Campany username 	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="username" value="<?php echo set_value('username'); ?>" class="form-control"  placeholder="Enter username e.g robisearch">
		 
				
		<span class="text-danger"> e.g robisearch<?php echo form_error('username'); ?>
		
		</span>
	</div>
  </div>
			 	<div class="form-group">
    <label for="inputpassword" class="col-sm-2 control-label">	Campany Password 	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="password" value="<?php echo set_value('password'); ?>" class="form-control"  placeholder="Enter password e.g r12345">
		 
				
		<span class="text-danger"><?php echo form_error('password'); ?>
		
		</span>
	</div>
  </div>
		  			 	<div class="form-group">
    <label for="inputfrom" class="col-sm-2 control-label">	Sender ID 	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="from" value="<?php echo set_value('from'); ?>" class="form-control"  placeholder="Enter from e.g Robisearch">
		 
				
		<span class="text-danger"> e.g Robisearch<?php echo form_error('from'); ?>
		
		</span>
	</div>
  </div>
  
  		 	<div class="form-group">
    <label for="inputcode" class="col-sm-2 control-label">	Company code 	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="code" value="<?php echo set_value('code'); ?>" class="form-control"  placeholder="Enter code e.g ROBISEARCHPOS-201701">
		 
				
		<span class="text-danger"> e.g Robisearch<?php echo form_error('code'); ?>
		
		</span>
	</div>
  </div>
			  			 	<div class="form-group">
    <label for="inputapikey" class="col-sm-2 control-label">	Company apikey 	 </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="apikey" value="<?php echo set_value('apikey'); ?>" class="form-control"  placeholder="Enter apikey e.g 232434">
		 
				
		<span class="text-danger"> e.g 0763a9ef91068d1723cf54a8b95bf1c5fc003cbb3a84ebe2f24d5ae9bb8f4318<?php echo form_error('apikey'); ?>
		
		</span>
	</div>
  </div>
		

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="company" name="btn_company" class="btn btn-primary"> Update company   </button>

    </div>
  </div>
  				
	
	
  					<?php echo form_close();?>
			</div>							   
				
									
							
								
			<div class="modal-footer">

    

				</div>

		</div>
	    </div>
    </div>
 <div class="table-responsive">
 
<table id="example"  cellspacing="1" class="table  table" width="100%">
   <thead>
  <tr>

    <th>Company id</th>

    <th>Company Name</th>    

    <th>Company Code </th>    

    <th>Sender ID</th> 
	
    <th> Email</th> 
		
    <th> Contact</th> 
	   
    <th>Action</th>    

  </tr>
   </thead>
<?php 
	

if(is_array($viewcompany)) {

   foreach($viewcompany as $row){

  echo "<tr>";

    $id=$row->id;

    echo "<td>". $row->id ."</td>";

    echo "<td>". $row->businessname ."</td>";

    echo "<td>". $row->code ."</td>";
	    echo "<td>". $row->from ."</td>";
			    echo "<td>". $row->email ."</td>";
				    echo "<td>". $row->contact ."</td>";
					   
    ?><td>
	                              <a  id="more" class="btn btn-primary" href="<?php echo base_url();?>admin/viewconfigurations?randomitemidentifier=<?php   {echo  $id;}  ?>">Edit  </a>
</td>
	
	<?php

 

}} else {
    echo 'There is no any module data available.... try again.';
}

 echo "</tr>";   




?>

</table>
		
			</div>				
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
					
			
			</div>
		</div>
  
  </div>
 
</div>




















































