- <!DOCTYPE html>
- <html>
- <?php
- /**
- * Made by: MoltenX!!!
- * Please do not re-release without giving credits. If you do it I will be really really .... really...... really................................... sad! :(!
- */
- class reg
- {
- function __construct()
- {
- error_reporting(0);
- $this->config->db->host = "localhost"; //DB Host
- $this->config->db->user = "root"; //DB Username
- $this->config->db->pass = "ascent"; //DB Password
- $this->config->db->logon = "logon"; //Accounts DB Name
- $this->config->server->name = "Example Server"; //Server's Name
- $this->config->server->realmlist = "logon.example.com"; //Realmlist
- $this->config->emulator->type = "ArcEmu"; // Server's emulator
- /*
- List of emulators:
- -> ArcEmu !! Each version support it!
- -> TrinityCore !! Only Version 1.3+ support it!
- -> SkyFire [SOON]
- -> MaNGoS [SOON]
- -> ArkCore [SOON]
- */
- /* DON'T TOUCH ! */
- $this->loadHeader($this->config->server);
- $this->visitor->ip = $_SERVER['REMOTE_ADDR'];
- if ($this->checkIP($this->visitor->ip, $this->config->db, $this->config->emulator)) {
- $this->loadBody(false, false, true, false);
- } elseif (isset($_POST['login']) && isset($_POST['password']) && isset($_POST['email']) && isset($_POST['password2'])) {
- $this->loadBody(false, $_POST, false, $this->config);
- } else {
- $this->loadBody(true, false, false, $this->config->server);
- }
- }
- public function loadHeader($conf)
- {
- ?>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title><?php echo $conf->name; ?></title>
- <style type="text/css">
- body {
- color: #fff;
- font-family: verdana;
- font-size: 15px;
- }
- #box {
- margin-top: 140px;
- width: 600px;
- height: 240px;
- border-radius: 17px;
- border: solid 1px #fff;
- background: #333333;
- background: -moz-linear-gradient(-45deg, #333333 0%, #1f1f1f 100%);
- background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,#333333), color-stop(100%,#1f1f1f));
- background: -webkit-linear-gradient(-45deg, #333333 0%,#1f1f1f 100%);
- background: -o-linear-gradient(-45deg, #333333 0%,#1f1f1f 100%);
- background: -ms-linear-gradient(-45deg, #333333 0%,#1f1f1f 100%);
- background: linear-gradient(135deg, #333333 0%,#1f1f1f 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#333333', endColorstr='#1f1f1f',GradientType=1 );
- padding-top: 30px;
- }
- #fbottom {
- margin-top: 40px;
- width: 600px;
- position: fixed;
- font-size: 17px;
- height: 30px;
- border-top: solid 1px #fff;
- }
- #button {
- transition: all 800ms;
- background: #939393;
- background: -moz-linear-gradient(left, #939393 0%, #727272 100%);
- background: -webkit-gradient(linear, left top, right top, color-stop(0%,#939393), color-stop(100%,#727272));
- background: -webkit-linear-gradient(left, #939393 0%,#727272 100%);
- background: -o-linear-gradient(left, #939393 0%,#727272 100%);
- background: -ms-linear-gradient(left, #939393 0%,#727272 100%);
- background: linear-gradient(to right, #939393 0%,#727272 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#939393', endColorstr='#727272',GradientType=1 );
- border-radius: 7px;
- border: 1.5px solid #939393;
- }
- #button:hover {
- transition: all 800ms;
- border: 1.5px solid #3472C9;
- }
- #button:active {
- transition: all 800ms;
- background: #7f7f7f;
- background: -moz-linear-gradient(left, #7f7f7f 0%, #515151 100%);
- background: -webkit-gradient(linear, left top, right top, color-stop(0%,#7f7f7f), color-stop(100%,#515151));
- background: -webkit-linear-gradient(left, #7f7f7f 0%,#515151 100%);
- background: -o-linear-gradient(left, #7f7f7f 0%,#515151 100%);
- background: -ms-linear-gradient(left, #7f7f7f 0%,#515151 100%);
- background: linear-gradient(to right, #7f7f7f 0%,#515151 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7f7f7f', endColorstr='#515151',GradientType=1 );
- }
- input {
- border-radius: 7px;
- width: 180px;
- padding: 5px;
- }
- input:focus {
- background: #7f7f7f;
- background: -moz-linear-gradient(left, #7f7f7f 0%, #515151 100%);
- background: -webkit-gradient(linear, left top, right top, color-stop(0%,#7f7f7f), color-stop(100%,#515151));
- background: -webkit-linear-gradient(left, #7f7f7f 0%,#515151 100%);
- background: -o-linear-gradient(left, #7f7f7f 0%,#515151 100%);
- background: -ms-linear-gradient(left, #7f7f7f 0%,#515151 100%);
- background: linear-gradient(to right, #7f7f7f 0%,#515151 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7f7f7f', endColorstr='#515151',GradientType=1 );
- color: #fff;
- }
- #theme {
- bottom: 0;
- right: 0;
- position: fixed;
- height: 130px;
- width: 130px;
- background: -moz-linear-gradient(-45deg, rgba(0,0,0,0) 0%, rgba(158,158,158,0) 62%, rgba(255,255,255,0.65) 100%);
- background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(0,0,0,0)), color-stop(62%,rgba(158,158,158,0)), color-stop(100%,rgba(255,255,255,0.65)));
- background: -webkit-linear-gradient(-45deg, rgba(0,0,0,0) 0%,rgba(158,158,158,0) 62%,rgba(255,255,255,0.65) 100%);
- background: -o-linear-gradient(-45deg, rgba(0,0,0,0) 0%,rgba(158,158,158,0) 62%,rgba(255,255,255,0.65) 100%);
- background: -ms-linear-gradient(-45deg, rgba(0,0,0,0) 0%,rgba(158,158,158,0) 62%,rgba(255,255,255,0.65) 100%);
- background: linear-gradient(135deg, rgba(0,0,0,0) 0%,rgba(158,158,158,0) 62%,rgba(255,255,255,0.65) 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#a6ffffff',GradientType=1 );
- }
- #theme1 {
- display: none;
- bottom: 0;
- left: 0;
- right: left;
- position: fixed;
- height: 130px;
- width: 130px;
- background: -moz-linear-gradient(45deg, rgba(0,0,0,0.65) 0%, rgba(0,0,0,0) 44%, rgba(0,0,0,0) 100%);
- background: -webkit-gradient(linear, left bottom, right top, color-stop(0%,rgba(0,0,0,0.65)), color-stop(44%,rgba(0,0,0,0)), color-stop(100%,rgba(0,0,0,0)));
- background: -webkit-linear-gradient(45deg, rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 44%,rgba(0,0,0,0) 100%);
- background: -o-linear-gradient(45deg, rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 44%,rgba(0,0,0,0) 100%);
- background: -ms-linear-gradient(45deg, rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 44%,rgba(0,0,0,0) 100%);
- background: linear-gradient(45deg, rgba(0,0,0,0.65) 0%,rgba(0,0,0,0) 44%,rgba(0,0,0,0) 100%);
- filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#a6000000', endColorstr='#00000000',GradientType=1 );
- }
- </style>
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js">
- </script>
- <script>
- $(document).ready(function(){
- $("#theme").click(function(){
- $("body").css({"background-color":"#CCCCCC", "transition":"all 800ms", "color":"#333333"});
- $("#theme").css({"display":"none", "transition":"all 800ms"});
- $("#theme1").css({"display":"block", "transition":"all 800ms"});
- $("#box").css({"background":"rgb(216,216,216)", "background":"-moz-linear-gradient(-45deg, rgb(216,216,216) 0%, rgba(255,255,255,1) 100%)", "border":"solid 1px #000", "background":"-webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(216,216,216,1)), color-stop(100%,rgba(255,255,255,1)))", "background":"-webkit-linear-gradient(-45deg, rgba(216,216,216,1) 0%,rgba(255,255,255,1) 100%)", "background":"-o-linear-gradient(-45deg, rgba(216,216,216,1) 0%,rgba(255,255,255,1) 100%)", "background":"-ms-linear-gradient(-45deg, rgba(216,216,216,1) 0%,rgba(255,255,255,1) 100%)", "background":"linear-gradient(135deg, rgba(216,216,216,1) 0%,rgba(255,255,255,1) 100%)", "filter":"progid:DXImageTransform.Microsoft.gradient( startColorstr='#d8d8d8', endColorstr='#ffffff',GradientType=1 )"});
- $("#fbottom").css("border-top","solid 1px #000");
- });
- $("#theme1").click(function(){
- $("body").css({"background-color":"#333333", "transition":"all 800ms", "color":"#CCCCCC"});
- $("#theme").css({"display":"block", "transition":"all 800ms"});
- $("#theme1").css({"display":"none", "transition":"all 800ms"});
- $("#fbottom").css("border-top","solid 1px #fff");
- $("#box").css({"background":"#333333", "background":"-moz-linear-gradient(-45deg, #333333 0%, #1f1f1f 100%)", "border":"solid 1px #000", "border":"solid 1px #fff", "background":"-webkit-gradient(linear, left top, right bottom, color-stop(0%,#333333), color-stop(100%,#1f1f1f))", "background":"-webkit-linear-gradient(-45deg, #333333 0%,#1f1f1f 100%)", "background":"-o-linear-gradient(-45deg, #333333 0%,#1f1f1f 100%)", "background":"-ms-linear-gradient(-45deg, #333333 0%,#1f1f1f 100%)", "background":"linear-gradient(135deg, #333333 0%,#1f1f1f 100%)", "filter":"progid:DXImageTransform.Microsoft.gradient( startColorstr='#333333', endColorstr='#1f1f1f',GradientType=1 )"});
- });
- });
- </script>
- </head>
- <body style="background-color:#333333; color:#CCCCCC;">
- <?php
- }
- public function loadBody($form, $reg, $ipcheck, $conf)
- {
- if ($ipcheck) {
- print("<center><h3 id='box'>You are already registered! Don't try to re-register!</h3></center><div id='theme'></div>
- <div id='theme1'></div>");
- $this->loadFooter();
- return false;
- }
- elseif ($form)
- {
- $this->form($conf);
- $this->loadFooter();
- return false;
- }
- elseif ($reg)
- {
- $this->username = $this->clean($reg['login']);
- $this->password = $this->clean($reg['password']);
- $this->password2 = $this->clean($reg['password2']);
- $this->email = $this->clean($reg['email']);
- if ($this->password !== $this->password2) {
- echo "<center><h3 id='box'>The passwords doesn't match!<br /><a href='./'>Try again →</a></h3></center><div id='theme'></div>
- <div id='theme1'></div>";
- return false;
- }
- mysql_connect($conf->db->host, $conf->db->user, $conf->db->pass);
- mysql_select_db($conf->db->logon);
- $chck = mysql_query("SELECT * FROM accounts WHERE username = '{$this->username}' OR email = '{$this->email}'");
- if (mysql_num_rows($chck) >= 1) {
- print("<center><h3 id='box'>Ther is already a user with same username or same email!</h3></center><div id='theme'></div>
- <div id='theme1'></div>");
- $this->loadFooter();
- return false;
- }
- else
- {
- switch ($conf->emulator->type) {
- case 'ArcEmu':
- mysql_query("INSERT INTO accounts (login, password, email) VALUES ('{$this->username}', '{$this->password}', '{$this->email}');") or die("<center><h3 id='box'>There was an error : ".mysql_error()."</h3></center>");
- break;
- case 'TrinityCore':
- $this->new->password = sha1($this->username.':'.$this->password);
- mysql_query("INSERT INTO account (username, sha_pass_hash, email) VALUES ('{$this->username}', '{$this->new->password}', '{$this->email}'") or die("<center><h3 id='box'>There was an error : ".mysql_error()."</h3></center>");
- break;
- default:
- die("Wrong emultor specified!");
- break;
- }
- echo "<center><h3 id='box'>Congratulations! You can set your realmlist to:<br />set realmlist '{$conf->server->realmlist}'</h3></center>
- <div id='theme'></div>
- <div id='theme1'></div>";
- $this->loadFooter();
- }
- }
- }
- public function loadFooter()
- {
- ?>
- </body>
- </html>
- <?php
- }
- public function form($conf)
- {
- ?>
- <center>
- <form method="post" id='box'>
- <table>
- <tr><td><label for='login'>Username :</label></td><td><input name="login" type="text" style="border:none; background-color:#CCCCCC;" placeholder='Username' required/></td></tr><tr></tr><tr></tr>
- <tr><td><label for ='password'>Password :</label></td><td><input name="password" type="password" style="border:none;background-color:#CCCCCC;" placeholder='Password' required/></td></tr><tr></tr><tr></tr>
- <tr><td><label for ='password'>Password :</label></td><td><input name="password2" type="password" style="border:none;background-color:#CCCCCC;" placeholder='Repeat password' required/></td></tr><tr></tr><tr></tr>
- <tr><td><label for='email'>Email :</label></td><td><input name="email" type="email" style="border:none;background-color:#CCCCCC;" placeholder='[email protected]' required/></td></tr><tr></tr><tr></tr>
- <tr><td colspan="2" align="center"><input type="submit" id='button' value="Register →" /></td></tr>
- </table>
- <div id='fbottom'><center>set realmlist <?php echo $conf->realmlist; ?></center></div>
- </form>
- </center>
- <div id='theme'></div>
- <div id='theme1'></div>
- <?php
- }
- public function checkIP($ip, $conf, $emu)
- {
- mysql_connect($conf->host, $conf->user, $conf->pass);
- mysql_select_db($conf->logon);
- switch ($emu->type) {
- case 'ArcEmu':
- $get = mysql_query("SELECT * FROM accounts WHERE lastip = '{$ip}';");
- break;
- case 'TrinityCore':
- $get = mysql_query("SELECT * FROM account WHERE last_ip = '{$ip}';");
- break;
- default:
- die("Wrong emulator specified!");
- break;
- }
- if(mysql_num_rows($get) >= 1)
- {
- $this->return = true;
- return $this->return;
- }
- else
- {
- $this->return = false;
- return $this->return;
- }
- }
- public function clean($string)
- {
- $this->ret = mysql_real_escape_string(htmlspecialchars($string));
- return $tihs->ret;
- }
- }
- $reg = new reg;
- /*
- GOOD LUCK IN USING IT !!!
- */
- ?>
Version 1.3.2 << Some changes in the theme changer!