Files
Testing/mailservices/admin/usermgr/group_edit_act.php
sean 343b4a3f3f
Some checks failed
deploy-testing / deploy (push) Has been cancelled
Initial testing snapshot
2026-11-19 18:32:17 -05:00

20 lines
757 B
PHP

<?php header('Content-type: application/json; charset=utf-8');
$em="";
if ( !defined('PATHTOINCLUDES') ) define('PATHTOINCLUDES', $_SERVER["DOCUMENT_ROOT"] . '/mailservices/includes/');
include(PATHTOINCLUDES."base.php");
$dconn=dbconnect2();
$desc = $_POST["description"];
$thegroup = $_POST["group"];
if(!do_reg($thegroup,"/^([a-zA-Z0-9,'-_=\+]*)$/")){
$em="Please enter a group name!";
$arr = array ('error'=>$em);
echo json_encode($arr);
exit();
}
$sql="UPDATE `groups` SET `groups`.`group` = ".GetSQLValueString($thegroup, 'text').", `groups`.`description` = ".GetSQLValueString($desc,'text')." WHERE gid = ".$_SESSION["group_gid"];
$query=mysql_query($sql) or $em=$em.mysql_error();
$arr = array ('error'=>$em);
echo json_encode($arr);
exit();
?>