?
Path : /home/admin/public_html/modules/users/ |
Current File : /home/admin/public_html/modules/users/com_edit_category.php |
<? require_once('../../../config.php'); require_once('../../../libs/MySql.php'); $db=new MySql; $cat_id=$_GET['group_id']; $parent=$_GET['parent']; $data=$db->getDataOneRow('usertype',$cat_id,'usertype_id'); $cat_name=$data['usertype_name']; $access=$data['usertype_level']; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML xmlns="http://www.w3.org/1999/xhtml"> <HEAD> <TITLE><?echo $cfg['site_name'];?></TITLE> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <META content="" name=Keywords> <META content="<?echo $cfg['site_name'];?>" name="Description"> <META content="<?echo $cfg['site_name'];?>" name="Author"> <META content="<?echo $cfg['site_name'];?>" name="Copyright"> <LINK href="../../css/backend_style2.css" type="text/css" rel="stylesheet"> <script> function delGroup(){ var obj=document.webForm; obj.action='edit_group_do.php?ac=del&group_id=<?=$cat_id;?>'; window.parent.frames[1].location ='edit_group_do.php?ac=del&group_id=<?=$cat_id;?>'; } </script> <br> <table width="99%" class="table_data"><tr><td><br> <form method="POST" action="edit_group_do.php" name="webForm"> <input type="hidden" name="group_id" value="<?=$cat_id?>"> <table width="340" height="300"> <? if($_GET['parent']){ $data2=$db->getDataOneRow('usertype',$_GET['parent'],'usertype_id'); ?> <tr> <td width="127" height="24">กลุ่มหลัก</td> <td width="266" height="24"><?=$data2['usertype_name']?> </td> </tr> <? } ?> <tr> <td width="127" height="24">หมวดหมู่</td> <td width="266" height="24"><input type="text" name="name" size="35" maxlength="150" class="backend_inputbox" value="<?=$cat_name?>" <? if ($_GET['group_id']==1){echo "disabled";}?> ></td> </tr> <tr> <td width="127" height="22">รายละเอียด</td> <td width="266" height="22"><input type="text" name="detail" size="35" maxlength="150" class="backend_inputbox" value="<?=$access?>" <? if ($_GET['group_id']==1){echo "disabled";}?>></td> </tr> <tr> <td width="127" height="22">กำหนดสิทธ์</td> <td width="266" height="22"> <? $i = 0; $access=Array(); while ($i < count($cfg['module'])) { if($_GET['group_id']==1){ echo "<input class=\"backend_inputbox\" type=\"checkbox\" name=\"checkbox[$i]\" id=\"checkbox_$i\" checked value=\"".$cfg['module'][$i]."\" disabled>".$cfg['module'][$i]."<br>"; }else{ $count=$db->count_data($table='modules',$condition="WHERE module_name='".$cfg['module'][$i]."' AND usertype_access_id='".$_GET['group_id']."'"); if($count){ echo "<input class=\"backend_inputbox\" type=\"checkbox\" name=\"checkbox[$i]\" id=\"checkbox_$i\" checked value=\"".$cfg['module'][$i]."\">".$cfg['module'][$i]."<br>"; }else{ echo "<input class=\"backend_inputbox\" type=\"checkbox\" name=\"checkbox[$i]\" id=\"checkbox_$i\" value=\"".$cfg['module'][$i]."\">".$cfg['module'][$i]."<br>"; } } $i++; } ?></td> </tr> <tr> <td width="127" height="5"></td> <td width="266" height="5"></td> </tr> <tr> <td width="127" height="33"> </td> <td width="266" height="33"> <input type="submit" value=" บันทึก " name="submit"><input type="button" value=" ลบกลุ่ม " onclick="javascript:if(confirm(unescape('ยืนยันลบข้อมูลที่เลือกไว้'))){delGroup();}"></td> </tr> <tr> <td width="127" height="13"></td> <td width="266" height="13"> </td> </tr> </table> </form> </td></tr></table>