
Results 1 to 4 of 4
Thread: Phentom CMS
Threaded View
-
27-11-14, 04:00 AM #2Dr.CoreGuest
Own Update...
Adding new register and Core module...
TrnityCore V6 (Batle.net Version)
Example...
PHP Code:<?php//Refuses direct accessif (!defined("PhentomCMS")){ exit; }
//Trinity Tables
//Auth$account_table = 'battlenet_accounts';$account_access = 'account_access';$account_banned_table = 'battlenet_account_bans';$realmlist_table = 'realmlist';$uptime_table = 'uptime';
//Characters$characters_table = 'characters';$gm_tickets_table = 'gm_tickets';$guild_table = 'guild';$mail_table = 'mail';$mail_items_table = 'mail_items';
//World
?>
PHP Code:<?php//Refuses direct accessif (!defined("PhentomCMS")){ exit; }
$username = $_POST['username'];$password = sha_password($username,$_POST['password']);
$mysqli -> select_db($acc_db);
$check_account = $mysqli -> query("SELECT * FROM `battlenet_accounts` WHERE email='$email' and sha_pass_hash='$password'") or die( $mysqli -> error );$count = $check_account -> num_rows; if ($count > 0){ $_SESSION['username'] = $username; header("Location: index.php");}else{ echo "<div class='fail'>Wrong User/Password</div>";}?>
PHP Code:<?php//Refuse direct accessif(!defined("PhentomCMS")){ exit; }
if (isset($_POST['remail']) and isset($_POST['rpassword'])){ if ($_POST['rpassword'] == $_POST['vpassword']){ $email = $_POST['remail']; $password = sha_password($email,$_POST['rpassword']); $mysqli -> select_db($acc_db); $check = $mysqli -> query("SELECT id FROM `battlenet_accounts` WHERE email='$email'") or die($mysqli -> error); $count = $check -> num_rows; if ($count > 0){ echo "<p class='fail'>Username already exists.</p>"; } else{ $mysqli -> query("INSERT INTO `battlenet_accounts` (email, sha_pass_hash) VALUES ('$email', '$password')") or die($mysqli -> error); header("Location: ?page=register_success"); } } else{ echo "<p class='fail'>Password missmatch.</p>"; }}