

 

         <script type="text/javascript">
  
		
		 $(document).on("click", "#managebtndelete", function()
        {
          var itemid = $(this).data('id');
		  $("#itemid1").val(itemid); 
		  
		  
		   
        });
		
		
		
    </script>  
 <div class="row">
  
   	

   	<div class="col-md-12">

  
		<div class="panel panel-default" data-collapsed="0">
        	<div class="panel-heading">
            	<div class="panel-title" id="redcolor" >
            		<i class="entypo-plus-circled"></i>
				 <span class="pull-right"> SMS  Transfer </span>
				 	  	  	  										 <a href="<?php echo base_url(). "user/viewsms"; ?>" class="btn btn-info">Go to sms window</a>

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

			
	<div class="widget-content nopadding table_holder table-responsive" >				
				<?PHP
      $mydate=date("Y-m-d H:i:s");

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

				echo $this->session->flashdata('msg'); 
								?>	
					<div class="row">
						<div class="col-md-12">
							
							<div class="panel-body">
	
	
	
	
		


				


    <!-- 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 Transfer </h4>
      </div>
      <div class="modal-body">
      
	  	

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



		
                 echo form_open('user/addsmstransfer' , 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;?>
	     								<input type="hidden" name="view" value="user/transfersms" class="form-control" required placeholder="Enter view">

    
     								<input type="hidden" name="action" value="insert" class="form-control" required placeholder="Enter invoiceno">

	      <div class="form-group">
    <label for="inputfromaccount" class="col-sm-2 control-label">From Which account?</label>
    <div class="col-sm-10">
	<select class="form-control" name="fromaccount" required>
	
	<option value=""  >---Select employee name ---</option>
	
	<?php 
	$session_data = $this->session->userdata('logged_in');

  
 	$data['id'] = $session_data['id'];
        
		 $userid = $data['id'];
		 $data['companyid'] = $session_data['companyid'];
	 $companyid = $data['companyid'];
		 $data['usertype'] = $session_data['usertype'];
	 $usertype = $data['usertype'];	

				
					 
									//	$frompeople= $this->usermodel->populatealldatanoarray('people','companyid',$companyid,'category','user');
	 						$frompeople = $this->usermodel->populatealldatanoarraythree('people', 'companyid',$companyid,'status',1,'category','user');


	
if(is_array($frompeople)) {

   foreach($frompeople as $frompeoplerow){


		?>
									<option value="<?=  $frompeoplerow->id;   ?>"><?=  $frompeoplerow->firstname ."(Available sms:". $frompeoplerow->totalsms .")" ?></option>


	<?php

}} else {
    echo 'No user available.';
}
	
?>
</select>
		

	</div>
  </div>
  
	 
	 
	 

 <div class="form-group">
    <label for="inputtoaccount" class="col-sm-2 control-label">To Employee?</label>
    <div class="col-sm-10">
	<select class="form-control" name="toaccount" required>
	
	<option value=""  >---Select employee to transfer sms to---</option>
	
	<?php 


									//$topeople= $this->usermodel->populatealldatanoarray('people','companyid',$companyid,'category','user');
	 						$topeople = $this->usermodel->populatealldatanoarraythree('people', 'companyid',$companyid,'status',1,'category','user');


	
if(is_array($topeople)) {

   foreach($topeople as $topeoplerow){


		?>
									<option value="<?=  $topeoplerow->id;   ?>"><?=  $topeoplerow->firstname ."(Available sms:". $topeoplerow->totalsms .")" ?></option>


	<?php

}} else {
    echo 'No user available.';
}
	
?>
</select>
		

	</div>
  </div>
  
	 
<div class="form-group">
    <label for="inputamount" class="col-sm-2 control-label">SMS Unit To transfer :  </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="amount" value="<?php echo set_value('amount'); ?>" class="form-control" required placeholder="Enter  SMS UNITS to transfer">

				
		<span class="text-danger"> <?php echo form_error('amount'); ?>
		
		</span>
	</div>
  </div>
  
  	<div class="form-group" style="display:none">
    <label for="inputpaiddate" class="col-sm-2 control-label">Transfer Date</label>
    <div class="col-sm-10">
	
		  		<input type="text" name="paiddate" value="<?php echo set_value('paiddate',$mydate); ?>" class="form-control" required placeholder="Enter Banking Date">
		 
				
		<span class="text-danger"> <?php echo form_error('paiddate'); ?>
		
		</span>
	</div>
  </div>
  
    
  
	<div class="form-group">
    <label for="inputdetails" class="col-sm-2 control-label">	Remarks </label>
    <div class="col-sm-10">

				<textarea name="description" value="<?php echo set_value('description'); ?>"  class="form-control"  placeholder="Enter remarks"></textarea>
			
		<span class="text-danger"> <?php echo form_error('description'); ?>
		
		</span>
	</div>
  </div>
		

	

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="sms" name="btn_smstransfer" class="btn btn-primary"> Post sms  Transfer   </button>

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

    

				</div>

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

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

 
</div>


















