assign("DATA", $_POST['fields']); } if($xtpl->_user['logged']){ if ($_POST['exit']){ $xtpl->editExit("/index"); } if(array_key_exists( "user_create", $xtpl->_user['rights'])){ $newDoc = $xtpl->getUserByID('0'); if ($_POST['submit']){ $msg = $newDoc->save(1); $_SESSION['err'] = $xtpl->_error["DOC_SAVED"]; $_SESSION['err'] = $_SESSION['err']."

".$_POST['fields']['login']."
"; header("Location: /auser"); exit; } } else // MENU male prava { $xtpl->assign("MESSAGE",$xtpl->_error["ACL_DENY"]); $xtpl->parse("main"); $xtpl->out("main"); exit; } } // MENU nenalogovany else { $newDoc = $xtpl->getUserByID('0'); if ($_POST['submit']){ $msg = $newDoc->save(1); if(!isset($_SESSION['err'])||$_SESSION['err'] == ""||$msg['status']==true){ $_SESSION['sess_logged_in'] = TRUE; $_SESSION['sess_user_id'] = $newDoc->m_id; $_SESSION['sess_user_login'] = $_POST['fields']['login']; $_SESSION['err'] = $xtpl->_error["LOGIN_WELCOME"]; $_SESSION['err'] = $_SESSION['err']."

".$_POST['fields']['login']."
"; //$xtpl->editExit("Location: /index"); header("Location: /index"); exit; } } } if(isset($_SESSION['err'])){ $xtpl->assign("MESSAGE", $_SESSION['err']); unset($_SESSION['err']); } $xtpl->parse("main.reg"); $xtpl->parse("main"); $xtpl->out("main"); ?>