f('lang').LANG_PREFIX.'/main'); $p_name = ''; $p_fname = ''; $p_login = ''; $p_pwd = ''; $created = false; $err = ''; if (!empty($_POST['create'])) { $con = new connection($ses->f('db_user'),$ses->f('db_pass'), $ses->f('db_host'),$ses->f('db_name')); $blog = new blog($con,$ses->f('db_prefix'),NULL); $p_name = $_POST['p_name']; $p_fname = $_POST['p_fname']; $p_login = $_POST['p_login']; $p_pwd = $_POST['p_pwd']; if ($blog->addUser($p_login,9,$p_pwd,$p_name,$p_fname,'','', 'wiki',10,1,$ses->f('lang'),0) === false) { $err = $blog->error(1,0); } else { $created = true; $ses->reg('user_id',$p_login); $ses->reg('user_pwd',$p_pwd); $ses->reg('step',6); } $con->close(); } require dirname(__FILE__).'/__top.php'; echo '
'.__('You are about to create the first user of your blog. This user '. 'will be administrator.').'
'; if ($err != '') { echo ''.__('Error(s)').' :
'. $err.'