$ui_options['stylesheets'][] = 'register.css'; ui_top($ui_options); $register_suspend = cache_load('register_suspend'); if ($register_suspend == 'disabled') { echo '<h1>Registreringsfunktionen är tillfälligt avstängd</h1>' . "\n"; echo '<p>Det här händer jäkligt sällan, men nu har vi stängt av registreringen - det går inte att skapa konton på Hamsterpaj just nu. Funktionen är antagligen igång inom en timma, titta hit igen då!</p>' . "\n"; ui_bottom(); exit; } if (login_checklogin()) { echo '<h1>Du kan inte skapa en ny användare när du redan är inloggad!</h1>'; ui_bottom(); exit; } if (isset($_POST['username'])) { $data_ok = register_check($_POST); if ($data_ok !== true) { regform_header_fail(); register_form($_POST, $data_ok); } else { event_log_log('classic_reg_form_sign_up'); /* Input from user is OK, create rows in required tables */ $query = 'INSERT INTO login(username, password, regtimestamp, regip, lastlogon) '; $query .= 'VALUES ("' . $_POST['username'] . '", "' . md5(utf8_decode($_POST['password'])) . '", "'; $query .= time() . '", "' . $_SERVER['REMOTE_ADDR'] . '", "")'; mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__)); $user_id = mysql_insert_id(); $query = 'INSERT INTO userinfo (userid) VALUES ("' . $user_id . '")'; mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__)); $query = 'INSERT INTO traffa (userid) VALUES ("' . $user_id . '")'; mysql_query($query) or die(report_sql_error($query, __FILE__, __LINE__));
} exit; } $user_cfg = $MAIN_CFG['member']; if (!$user_cfg['allowuserreg']) { cpg_error(_ACTDISABLED); } if (Security::check_post()) { if (isset($_POST['op']) && $_POST['op'] == 'finish') { $pagetitle = _ACCOUNTCREATED; require_once 'header.php'; register_finish(); } else { $pagetitle = _USERFINALSTEP; require_once 'header.php'; register_check(); } } else { if (isset($_GET['activate'])) { activate(intval($_GET['activate']), Fix_Quotes($_GET['check_num'])); } else { if (!isset($_GET['agreed']) && !isset($_POST['agreed']) && $user_cfg['show_registermsg']) { $pagetitle = _MA_REGISTRATION; require_once 'header.php'; OpenTable(); echo '<table width="80%" cellspacing="2" cellpadding="2" border="0" style="margin:auto;"> <tr> <td><span class="genmed"><br />' . $user_cfg['registermsg'] . '<br /><br />' . _BOUNDREGISTRATION . '<br /><br /></span><div align="center"> <a href="' . URL::index("&file=register&agreed=1") . '" class="genmed">' . _MA_AGREE_OVER_13 . '</a><br /><br /> <a href="' . URL::index("&file=register&agreed=1&coppa=1") . '" class="genmed">' . _MA_AGREE_UNDER_13 . '</a><br /><br /> <a href="' . $mainindex . '" class="genmed">' . _MA_DO_NOT_AGREE . '</a></div><br /></td>