Active+ Member Mutulic 615 Posted December 9, 2023 Active+ Member Share Posted December 9, 2023 (edited) Basic homepage to register and download client. Functions: Register Top 10 players Download Statistics Homepage developed by me in 2 hours This is the hidden content, please Sign In or Sign Up This is the hidden content, please Sign In or Sign Up 05.08.2024 - header.php updated: <?php header('Cache-control: private'); include 'config.php'; $server_offline = 0; require_once("database.php"); $database = new Connection(SERVER_IP, SERVER_ID, SERVER_PW, array(PDO::ATTR_TIMEOUT => 5, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); if (isset($_POST['username'], $_POST['password'], $_POST['rpassword'], $_POST['email'], $_POST['delete'])) { $username = htmlspecialchars(trim($_POST['username'])); $password = trim($_POST['password']); $rpassword = trim($_POST['rpassword']); $email = filter_var(trim($_POST['email']), FILTER_SANITIZE_EMAIL); $delete = intval($_POST['delete']); if ($password !== $rpassword) { $register_message = '<div class="alert alert-danger">Passwords do not match.</div>'; } elseif (!filter_var($email, FILTER_VALIDATE_EMAIL)) { $register_message = '<div class="alert alert-danger">Invalid email format.</div>'; } elseif (Register::Uniq($username)) { $hash_pw = sha1(sha1($password,true)); $password_hash = '*'.strtoupper($hash_pw); $safebox_password = "000000"; $status = "OK"; $safebox_size = 1; try { $database->beginTransaction(); $register_account = $database->prepare(" INSERT INTO account (login, password, social_id, email, create_time, status) VALUES (:login, :password, :social_id, :email, NOW(), :status) "); $register_account->bindParam(":login", $username); $register_account->bindParam(":password", $password_hash); $register_account->bindParam(":social_id", $delete); $register_account->bindParam(":email", $email); $register_account->bindParam(":status", $status); if ($register_account->execute()) { $lastID = $database->lastInsertId(); $safebox = $database->prepare(" INSERT INTO safebox (account_id, size, password) VALUES (:account_id, :size, :password) "); $safebox->bindParam(":account_id", $lastID, PDO::PARAM_INT); $safebox->bindParam(":size", $safebox_size, PDO::PARAM_INT); $safebox->bindParam(":password", $safebox_password, PDO::PARAM_STR); if ($safebox->execute()) { $database->commit(); $register_message = '<div class="alert alert-success">Successfully registered!</div>'; } else { $database->rollBack(); $register_message = '<div class="alert alert-danger">Failed to create safebox.</div>'; } } else { $database->rollBack(); $register_message = '<div class="alert alert-danger">Failed to register account.</div>'; } } catch (Exception $e) { $database->rollBack(); error_log($e->getMessage()); $register_message = '<div class="alert alert-danger">An error occurred during registration. Please try again later.</div>'; } } else { $register_message = '<div class="alert alert-danger">This username already exists!</div>'; } } ?> Edited August 5, 2024 by Mutulic Core X - External 2 Internal 86 2 31 5 54 Link to comment https://metin2.dev/topic/31882-simple-homepage-2024/ Share on other sites More sharing options...
longxiao 1 Posted February 14, 2024 Share Posted February 14, 2024 brother. How can I modify its encoding. I want to translate it into the language of other countries, but every time after translation, the website is garbled. Link to comment https://metin2.dev/topic/31882-simple-homepage-2024/#findComment-163175 Share on other sites More sharing options...
Active+ Member Mutulic 615 Posted February 14, 2024 Author Active+ Member Share Posted February 14, 2024 6 hours ago, longxiao said: brother. How can I modify its encoding. I want to translate it into the language of other countries, but every time after translation, the website is garbled. Can you explain? Link to comment https://metin2.dev/topic/31882-simple-homepage-2024/#findComment-163178 Share on other sites More sharing options...
Amiruziii 2 Posted February 14, 2024 Share Posted February 14, 2024 On 12/10/2023 at 12:55 AM, Mutulic said: Basic homepage to register and download client. Functions: Register Top 10 players Download Statistics Homepage developed by me in 2 hours Hidden Content Give reaction to this post to see the hidden content. Hidden Content Give reaction to this post to see the hidden content. Nice 2 Link to comment https://metin2.dev/topic/31882-simple-homepage-2024/#findComment-163181 Share on other sites More sharing options...
longxiao 1 Posted March 1, 2024 Share Posted March 1, 2024 On 2/14/2024 at 7:20 PM, Mutulic said: 你能解释一下吗? Player rankings cannot be displayed in languages other than English. The registration button is garbled On 2/14/2024 at 7:20 PM, Mutulic said: Can you explain? 1 Link to comment https://metin2.dev/topic/31882-simple-homepage-2024/#findComment-163531 Share on other sites More sharing options...
Active+ Member Mutulic 615 Posted March 4, 2024 Author Active+ Member Share Posted March 4, 2024 On 3/1/2024 at 9:52 AM, longxiao said: Player rankings cannot be displayed in languages other than English. The registration button is garbled for custom work add me on discord Link to comment https://metin2.dev/topic/31882-simple-homepage-2024/#findComment-163608 Share on other sites More sharing options...
Active+ Member Mutulic 615 Posted August 5, 2024 Author Active+ Member Share Posted August 5, 2024 header.php updated today - 05.08.2024 1 Link to comment https://metin2.dev/topic/31882-simple-homepage-2024/#findComment-166417 Share on other sites More sharing options...
Recommended Posts
Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/