function form_newusr_post($raw,$data) { checkAccess(); if ($data['f1']!=$data['f2']) return LocalError(WGSL("perr","Password error")); $x = WGCreateUser($data['login'],$data['f1'],$data['group']); if ($x) { WGToast(WGSL("nus","User created")); updateUserList(); WGSetActivity('main'); } else LocalError(WGSL("nusc","User not created")); }
function form_change_post($dta) { $thm = $dta['lang']; if (WGChangeTheme($thm)) WGToast(WGSL('newTheme',"Theme changed")); WGSetActivity('main'); }
<? $usr = WGSessionUser(); if ($usr===false) FatalError("Access denied"); WGSetTitle(WGSL("chg","Change password").": {$usr['name']}"); ?><div class="WGWActivity" data-wgid="access"> <br><img src="<%<APPPATH>%>/icon.png" alt=""><br>Loading...<br> </div> <div class="WGWActivity" data-wgid="accessok"> <br><img src="<%<APPPATH>%>/icon.png" alt=""><br> <%<chgd_h>%>.<br> <a href="#_close()" class="WGButton" data-wgpox="-8,-8">Ok</a> </div> <div class="WGWActivity SysAppLogonErr" data-wgid="error"> <br><img src="<%<APPPATH>%>/icon.png" alt=""><br> <%<error_h>%>:<br> <%<perr_h>%>. <a href="#main" class="WGButton" data-wgpox="-8,-8"><%<retry_h>%></a> </div>
<? EWGLogout(WGSL("term","Session closed"),"Ok"); if (!WGisHTTPAuth()) { ?> <div class="WGWActivity" data-wgid="main"> <div class="sysLogout"><%<term_h>%><br><br> <a href="#_close()" class="WGButton">Ok</a></div> </div> <? } ?>