<div class="modal fade" id="edit<?php echo $idss ?>" tabindex="-1" role="form" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true"> Cancel &times;</button>
                <h4 class="modal-title" id="myModalLabel">  Group: <?php echo $names ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No. of Contacts: <?php echo $nums  ?> </h4>
            </div>
				<div class="modal-body">
			   
					<form name="contacts" data-parsley-validate class="form-horizontal form-label-left" method="post" action="">
				
					 <div class="form-group" style="display:none;" >
                        <label > First Name <span class="required"> </span> </label>
                         <div class="col-md-4 col-sm-4 col-xs-5">
                            <input type="text" id="em" name="em" value="<?php echo $idss ?>" required="required" class="form-control col-md-3 col-xs-3" />
                        </div> 
                      </div> 
					
						<p>Edit Group Name</p>
						
					
						<div class="form-group">
                            <label class="control-label col-md-5 col-sm-5 col-xs-5" for="first-name">Group Name <span class="required"> </span> </label>
                                 <div class="col-md-4 col-sm-4 col-xs-5">
                                    <input type="text" id="newname" value="<?php echo $names ?>" class="form-control col-md-3 col-xs-3" readonly >
                                </div>
                         </div>
                         <br/><br/>
                        <div class="form-group">
                            <label class="control-label col-md-5 col-sm-5 col-xs-5" for="first-name">New Name <span class="required"> </span> </label>
                                 <div class="col-md-4 col-sm-4 col-xs-5">
                                    <input type="text" id="newname" name="newname" required="required" placeholder="New Group Name" class="form-control col-md-3 col-xs-3">
                                </div>
                         </div>
                         
						<br/> <br/>
						
							<div class="form-group" style="margin-left:120px;">
								<div class="col-md-6 col-sm-6 col-xs-12 col-md-offset-3">
									<input type="submit"  class="btn btn-success" name="update" value="Update"/>
								</div>
							</div>	
					  
					</form>
					<?php
					if(isset($_POST['update'])){
						
						$gne = $_POST['em'];
						
						$sql = mysql_query("select * from airtime_groups where group_id = '$gne' and customer_id = '$session_id' ");
						$rs = mysql_fetch_array($sql);
						$gid = $rs['group_id'];
						$name = $rs['name'];
						
						$nm = $_POST['newname'];
						$sql1 = mysql_query("update airtime_groups set name = '$nm' where group_id = '$gne' and customer_id = '$session_id' ");
					
						if($sql1){
						    
						    ?>
						    	<script>
				                    	window.location="save_editlog2.php?oldnm=<?php echo $name; ?>&nwnm=<?php echo $nm; ?>";
					            </script>
						    <?php
						    
						  
						}
						
						
					}
					
					?>
					
				</div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>