68 lines
2.7 KiB
PHP
68 lines
2.7 KiB
PHP
<?php header('Content-type: text/html; charset=utf-8');
|
|
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/mailservices/includes/');
|
|
include(PATHTOINCLUDES."base.php");
|
|
$em="";
|
|
$_SESSION["user_uri"]="/admin/usermgr/group_edit.php";
|
|
$_SESSION["pagename"]="Edit Group";
|
|
$_SESSION["the_section_location"] = "/admin/usermgr/group_edit.php";
|
|
$_SESSION["the_section_container"]="section_content";
|
|
$_SESSION["the_tab"]="six";
|
|
$dbcon=dbconnect2();
|
|
//set defaults for form fields
|
|
if(isset($_GET["gid"])){$_SESSION["group_gid"]=$_GET["gid"];}
|
|
$sql="SELECT
|
|
`groups`.`gid`,
|
|
`groups`.`group`,
|
|
`groups`.`rights`,
|
|
`groups`.`description`,
|
|
`groups`.`cdate`,
|
|
`groups`.`updatedby`,
|
|
`groups`.`lastupdate`
|
|
FROM
|
|
`groups`
|
|
WHERE `groups`.`gid` = ".$_SESSION["group_gid"];
|
|
$query=mysql_query($sql) or $em=$em.mysql_error();
|
|
$g=mysql_fetch_assoc($query);
|
|
?>
|
|
<div id="group_edit" class="standard-form">
|
|
<div class="form-container">
|
|
<form method="post" name="frmupgroup" id="frmupgroup" action="#" onsubmit="return false;">
|
|
<fieldset>
|
|
<legend>
|
|
<h1>Edit <?php echo $g["group"]; ?></h1>
|
|
</legend>
|
|
<div id="cgroup" class="iholder">
|
|
<label for="group">Group Name:</label>
|
|
<input name="group" id="group" type="text" size="24" class="text" required pattern="^([a-zA-Z0-9,'-_=\+]*)$"
|
|
value="<?php echo $g["group"]; ?>" maxlength="100"
|
|
onblur="submit_form_item('group','section_content','/admin/usermgr/update_group_field.php','groups','Please enter a name for the group!','N');" />
|
|
<span class="frmrequired">(*required)</span>
|
|
<span class="errormsg" id="e_group">Please enter a name for the group!</span>
|
|
</div>
|
|
<div id="cdescription" class="iholder">
|
|
<label for="description">Description:</label>
|
|
<textarea name="description" id="description" class="expand0-200 text"
|
|
cols="38" rows="10" style="padding:0px 5px 0 px;"
|
|
onblur="submit_form_item('description','section_content','/admin/usermgr/update_group_field.php','groups','','N');"><?php echo $g["description"];?></textarea>
|
|
<span class="errormsg" id="e_description"></span>
|
|
</div>
|
|
<div id="cedit" class="submit-button" style="position:relative;">
|
|
<label for="add"> </label>
|
|
<input type="button" name="edit"
|
|
id="edit" tabindex="13"
|
|
value="Update <?php echo $g["group"]; ?> Group"
|
|
class="redbutton submit-btn" onclick="submit_form('frmupgroup','/admin/usermgr/group_edit_act.php')" />
|
|
|
|
|
|
<div id="submit_message"></div>
|
|
|
|
</div>
|
|
<input type="hidden" name="o_group" id="o_group"
|
|
value="<?php echo $g["group"] ?>" />
|
|
<input type="hidden" name="o_description" id="o_description"
|
|
value="<?php echo $g["description"];?>" />
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
</div>
|