query($z); $r=$GLOBALS['db']->fetchByAssoc($w); $name=$r['name']; if($_REQUEST['save'] || $_REQUEST['save1']) { $GLOBALS['db']->query("update ecmdocs_group set name='".$_POST['name']."' where id='".$_REQUEST['record']."'"); $return_id=$_REQUEST['record']; header("Location: index.php?module=EcmDocs&action=ListViewGroup"); } } else { if($_REQUEST['save'] || $_REQUEST['save1']) { $return_id=create_guid(); $GLOBALS['db']->query("insert into ecmdocs_group set id='".$return_id."',name='".$_POST['name']."'"); header("Location: index.php?module=EcmDocs&action=ListViewGroup"); } } ?>