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

  <link href="<?php echo base_url(); ?>assets/select/chosen.min.css" rel="stylesheet" media="screen">
	
		     
	
			  <script src="<?php echo base_url(); ?>assets/select/jquery-1.7.2.min.js"></script>

		  <script src="<?php echo base_url(); ?>assets/select/chosen.jquery.min.js"></script>

				   
	
        <script>
        $(function() {
<!--             $(".datepicker").datepicker(); -->
<!--             $(".uniform_on").uniform() -->;
            $(".chzn-select").chosen();
   <!--          $('.textarea').wysihtml5(); -->

        });
        </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">Balance: <span class="btn btn-warning"> <?php echo $total_amount;?></span> </span>					                     
				   <a  id="more" target="blank" class="btn btn-info" href="<?php echo base_url();?>user/viewmyplotsms">View sent sms  </a>

	
            	
								 <a href="<?php echo base_url(); ?>admin/viewpallmyplots">Go Back</a>

				
									


		  

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

				<div class="widget-content nopadding table_holder table-responsive" >		
   	<div class="col-md-6">				
	<?PHP

	$session_data = $this->session->userdata('logged_in');
 $data['usertype'] = $session_data['usertype'];
	 $usertype = $data['usertype'];	
	 $smstype = ""	;
$data['surname'] = $session_data['surname'];
$data['id'] = $session_data['id'];
 $data['companyid'] = $session_data['companyid'];
	 $companyid = $data['companyid'];
$surname=$data['surname'];
   $userid=$data['id'];

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

			
		

    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Update  Member details </h4>
      </div>
      <div class="modal-body">
      
	  	

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



				echo $this->session->flashdata('msg1'); 
		
                 echo form_open('user/addplotsms' , 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="inputcontact" class="col-sm-2 control-label">	Receiver </label>
    <div class="col-sm-10">

	<select style ="width: 100%" class="chzn-select"  name="contact"  required>
	
	<option value=""  >---Select Landlord/Contact---</option>

	
	<?php 
					 
	


if(is_array($landlord)) {

   foreach($landlord as $landlordrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $landlordrow->phone;   ?>"><?=  $landlordrow->phone ."(". $landlordrow->firstname ." ".$landlordrow->lastname.") ".$landlordrow->idno; ?></option>



	<?php

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

	</div>
  </div>
  

<div class="form-group">
    <label for="inputmessage" class="col-sm-2 control-label">	Message</label>
    <div class="col-sm-10">
			<?php 
		
		if($smstype=="2"){
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="160" placeholder="Enter message .Maximum of 800 characters"></textarea>

            		<?php 
		
		}else{
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="800" placeholder="Enter message. Maximum of 160 characters"></textarea>

			
			<?php 
		}
		?>
			
		<span class="text-danger"> <?php echo form_error('message'); ?>
		
		</span>
	</div>
  </div>

	

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="sms" name="btn_addplotsms" class="btn btn-primary"> Add Sms   </button>

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

    

				</div>

		</div>







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

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



				echo $this->session->flashdata('msg1'); 
		
                 echo form_open('user/addplotsms' , 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="inputcontact" class="col-sm-2 control-label">	Contact </label>
    <div class="col-sm-10">
	
		  		<input type="text" name="contact" value="<?php echo set_value('contact'); ?>" class="form-control" required placeholder="Enter phone e.g  254712345678">
		 
				
		<span class="text-danger"> <?php echo form_error('contact'); ?>
		
		</span>
	</div>
  </div>
  

<div class="form-group">
    <label for="inputmessage" class="col-sm-2 control-label">	Message</label>
    <div class="col-sm-10">
			<?php 
		
		if($smstype=="2"){
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="160" placeholder="Enter message .Maximum of 800 characters"></textarea>

            		<?php 
		
		}else{
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="800" placeholder="Enter message. Maximum of 160 characters"></textarea>

			
			<?php 
		}
		?>
			
		<span class="text-danger"> <?php echo form_error('message'); ?>
		
		</span>
	</div>
  </div>

	

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="sms" name="btn_addplotsms" class="btn btn-primary"> Add Sms   </button>

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

    

				</div>

		</div>
	 









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

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



				echo $this->session->flashdata('msg1'); 
		
                 echo form_open('user/addplotsms' , 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="inputcontact" class="col-sm-2 control-label">Receiver?</label>
    <div class="col-sm-10">
	
	<select style ="width: 100%" class="chzn-select" name="contact"  required>
	
	<option value=""  >---Select Tenant/Contact---</option>

	
	<?php 
					 
	


if(is_array($tenant)) {

   foreach($tenant as $tenantrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $tenantrow->phone;   ?>"><?=  $tenantrow->phone ."(". $tenantrow->firstname ." ".$tenantrow->lastname.") ".$tenantrow->idno; ?></option>



	<?php

}} else {
    echo 'No supplier available.';
}
	
?>
</select>
		
						<span class="text-danger"><?php echo form_error('contact'); ?>

	</div>
  </div>
  

<div class="form-group">
    <label for="inputmessage" class="col-sm-2 control-label">	Message</label>
    <div class="col-sm-10">
			<?php 
		
		if($smstype=="2"){
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="160" placeholder="Enter message .Maximum of 800 characters"></textarea>

            		<?php 
		
		}else{
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="800" placeholder="Enter message. Maximum of 160 characters"></textarea>

			
			<?php 
		}
		?>
			
		<span class="text-danger"> <?php echo form_error('message'); ?>
		
		</span>
	</div>
  </div>

	

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="sms" name="btn_addplotsms" class="btn btn-primary"> Add Sms   </button>

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

    

				</div>

		</div>
	

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

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



				echo $this->session->flashdata('msg1'); 
		
                 echo form_open('user/addplotsms' , 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="inputcontact" class="col-sm-2 control-label">Receiver?</label>
    <div class="col-sm-10">
	<select style ="width: 100%" class="chzn-select" name="contact"  required>
	
	<option value=""  >---Select Agent/Contact---</option>

	
	<?php 
					 
	


if(is_array($agent)) {

   foreach($agent as $agentrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $agentrow->phone;   ?>"><?=  $agentrow->phone ."(". $agentrow->firstname ." ".$agentrow->lastname.") ".$tenantrow->idno; ?></option>



	<?php

}} else {
    echo 'No supplier available.';
}
	
?>
</select>
		
						<span class="text-danger"><?php echo form_error('contact'); ?>

	</div>
  </div>
  

<div class="form-group">
    <label for="inputmessage" class="col-sm-2 control-label">	Message</label>
    <div class="col-sm-10">
			<?php 
		
		if($smstype=="2"){
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="160" placeholder="Enter message .Maximum of 800 characters"></textarea>

            		<?php 
		
		}else{
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="800" placeholder="Enter message. Maximum of 160 characters"></textarea>

			
			<?php 
		}
		?>
			
		<span class="text-danger"> <?php echo form_error('message'); ?>
		
		</span>
	</div>
  </div>

	

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="sms" name="btn_addplotsms" class="btn btn-primary"> Add Sms   </button>

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

    

				</div>

		</div>
	  


		</div>
	  	<div class="col-md-6">	
	
    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Upload Correct contacts (CSV)</h4>
		
      </div>
      <div class="modal-body">
      
	  	

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



				echo $this->session->flashdata('msg1'); 
		
                 echo form_open('user/uploadbulksms' , 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="inputsurname" class="col-sm-2 control-label">	CSV LIST</label>
    <div class="col-sm-10">
		
			<input type="file" name="file" width="400"  value="<?php echo set_value('file') ;?>" placeholder="Select EXCELL" class="form-control" required placeholder="Enter Surname"  >

		  		
				
		<span class="text-danger"> Upload correct format of CSV File   with two columns (Contact,Message)<?php echo form_error('file'); ?>
		
		</span>
	</div>
  </div>	
  
<div class="form-group">
    <label for="inputmessage" class="col-sm-2 control-label">	Message</label>
    <div class="col-sm-10">
			<?php 
		
		if($smstype=="2"){
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="160" placeholder="Enter message .Maximum of 800 characters"></textarea>

            		<?php 
		
		}else{
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="800" placeholder="Enter message. Maximum of 160 characters"></textarea>

			
			<?php 
		}
		?>
			
		<span class="text-danger"> <?php echo form_error('message'); ?>
		
		</span>
	</div>
  </div>

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="sms" name="btn_uploadsms" class="btn btn-primary">Upload Members  </button>

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

    

				</div>

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

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



				echo $this->session->flashdata('msg1'); 
		
                 echo form_open('user/addgroumemberpsms' , 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="inputcategoryid" class="col-sm-2 control-label">Group/Category?</label>
    <div class="col-sm-10">
	<select style ="width: 100%" class="chzn-select" name="categoryid" required>
	
	<option value=""  >---Select Category---</option>

	
	<?php 
					 
			
	


if(is_array($mycategory)) {

   foreach($mycategory as $mycategoryrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $mycategoryrow->id;   ?>"><?=  $mycategoryrow->name; ?></option>



	<?php

}} else {
    echo 'No category/ group available.';
}
	
?>
</select>
		
						<span class="text-danger"><?php echo form_error('categoryid'); ?>

	</div>
  </div>
     
  
<div class="form-group">
    <label for="inputmessage" class="col-sm-2 control-label">	Message</label>
    <div class="col-sm-10">
			<?php 
		
		if($smstype=="2"){
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   id='message'  maxlength="160" placeholder="Enter message .Maximum of 800 characters"></textarea>

            		<?php 
		
		}else{
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"  id='message1'  maxlength="800" placeholder="Enter message. Maximum of 160 characters"></textarea>

			
			<?php 
		}
		?>
			
		<span class="text-danger"> <?php echo form_error('message'); ?>
		
		</span>
	</div>
  </div>

	

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="oursms" name="btn_groupaddsms" class="btn btn-primary"> Add Sms   </button>

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

    

				</div>

		</div>
	

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	

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

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



				echo $this->session->flashdata('msg1'); 
		
                 echo form_open('user/addgroupplotsms' , 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="inputcategoryid" class="col-sm-2 control-label">Group/Category?</label>
    <div class="col-sm-10">
	<select style ="width: 100%" class="chzn-select" name="categoryid" required>
	
	<option value=""  >---Select Category---</option>


	
	<?php 
					 
			
	


if(is_array($myplots)) {

   foreach($myplots as $myplotsrow){

   //echo $courserow->coursename;
    ?>
					<option value="<?=  $myplotsrow->id;   ?>"><?=  $myplotsrow->name; ?></option>



	<?php

}} else {
    echo 'No category/ group available.';
}
	
?>
</select>
		
						<span class="text-danger"><?php echo form_error('categoryid'); ?>

	</div>
  </div>
     
  
<div class="form-group">
    <label for="inputmessage" class="col-sm-2 control-label">	Message</label>
    <div class="col-sm-10">
			<?php 
		
		if($smstype=="2"){
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="160" placeholder="Enter message .Maximum of 800 characters"></textarea>

            		<?php 
		
		}else{
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="800" placeholder="Enter message. Maximum of 160 characters"></textarea>

			
			<?php 
		}
		?>
			
		<span class="text-danger"> <?php echo form_error('message'); ?>
		
		</span>
	</div>
  </div>

	

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="oursms" name="btn_groupaddplotsms" class="btn btn-primary"> Add Sms   </button>

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

    

				</div>

		</div>
	 
	
	

	
	
	
	
	


    <!-- Modal content-->
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Send Group Sms to active Members</h4>
      </div>
      <div class="modal-body">
      
	  	

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



				echo $this->session->flashdata('msg1'); 
		
                 echo form_open('user/addmygroupsms' , 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="inputcategoryid" class="col-sm-2 control-label">Group?</label>
    <div class="col-sm-10">
	<select style ="width: 100%" class="chzn-select" name="categoryid" required>
	
	<option value=""  >---Select Category---</option>
<option value="Landlords"  >All Landlords</option>
<option value="Agents"  >All Agents</option>
<option value="Tenants"  >All Tenants</option>
</select>
	
						<span class="text-danger"><?php echo form_error('categoryid'); ?>

	</div>
  </div>
     
  
<div class="form-group">
    <label for="inputmessage" class="col-sm-2 control-label">	Message</label>
    <div class="col-sm-10">
			<?php 
		
		if($smstype=="2"){
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="160" placeholder="Enter message .Maximum of 800 characters"></textarea>

            		<?php 
		
		}else{
			?>

				<textarea name="message" value="<?php echo set_value('message'); ?>"  class="form-control"   maxlength="800" placeholder="Enter message. Maximum of 160 characters"></textarea>

			
			<?php 
		}
		?>
			
		<span class="text-danger"> <?php echo form_error('message'); ?>
		
		</span>
	</div>
  </div>

	

	
	 <div class="form-group">

    <div class="col-sm-offset-2 col-sm-10">
     
	         <button type="submit"  value="oursms" name="btn_groupaddplotsms" class="btn btn-primary"> Add Sms   </button>

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

    

				</div>

		</div>
	  






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

			
			</div>
	
			
			
		
		
  

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


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


 
</div>




















