<?
	session_start();
	
	$GroupID = $_GET['edid'];
	
	include "../../Connections/connect_mysql.php";
	
	if($GroupID){
		$sqle=" select * from group_tb where GroupID=" . $GroupID . "; ";
		$resulte = mysql_query($sqle) or die(mysql_error());
		$recorde=mysql_fetch_array($resulte);
		$GroupName = $recorde['GroupName'];
	}
?>
<?
	mysql_close($c);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Untitled Document</title>
  
</head>

<body>
	<div class="row">
	<div class="col-md-12">
		<form id="frmcomp" class="form-inline">
        	<div class="form-group mx-sm-3 mb-2">
    			<input type="text" class="form-control" id="ugup1" placeholder=" ชื่อกลุ่ม " onBlur="javascript:chkdlgadduser(this.id);" value="<?=$GroupName?>">
  			</div>
      
            	<? if($GroupID){ ?>
					<button type="button" class="btn btn-primary" id="btneditugup" onClick="javascript:saveeditrept(<?=$GroupID?>,'ugup',1);"><i class='fa fa-pencil-square-o'></i> บันทึกแก้ไขรายการ</button>
                    <button type="button" class="btn btn-danger" id="btneditcancelugup" onClick="javascript:canceleditugup();"><i class='fa fa-reply-all'></i> ยกเลิกแก้ไขรายการ</button>
			   <? }else{ ?>
            		<button type="button" class="btn btn-primary" id="btnaddugup" onClick="javascript:addugup('ugup',1);"><i class='fa fa-plus-circle'></i> เพิ่มรายการ</button>
                <?
				}
				?>
        </form>    
    </div>
    <div class="row">
    	<div class="col-md-12">
        	<hr>
        </div>
    </div>
</div>

</body>
</html>