| |
سرتیتر صفحه جدید
<?php
$config['mysql_host'] = '79.127.113.223'; // MySql Hostname / IP $config['mysql_user'] = 'root'; // MySql Username $config['mysql_pass'] = 'root'; // MySql Password $config['mysql_dbname'] = 'wow'; // Database Name
$tbc = '0'; // For enabling TBC. Don't edit.
error_reporting(E_ALL ^ E_NOTICE);
session_start();
$msg = Array(); $error = Array();
function addUser(){ if (empty($_POST)) return false; global $config, $msg, $error; if (empty($_POST['login'])) $error[] = 'Error, you forgot to enter a account name!'; if (empty($_POST['password'][0]) || empty($_POST['password'][1])) $error[] = 'Error, you forgot to enter a password!'; if ($_POST['password'][0] !== $_POST['password'][1]) $error[] = 'Password does not match!'; if (!empty($error)) return false; $db = @mysql_connect($config['mysql_host'], $config['mysql_user'], $config['mysql_pass']); if (!$db) return $error[] = 'Database: '.mysql_error(); if (!@mysql_select_db($config['mysql_dbname'], $db)) return $error[] = 'Database: '.mysql_error(); $query = "SELECT `acct` FROM `accounts` WHERE `login` = '".mysql_real_escape_string($_POST['login'])."'"; $res = mysql_query($query, $db); if (!$res) return $error[] = 'Database: '.mysql_error(); if (mysql_num_rows($res) > 0) return $error[] = 'Account name already exists'; if ($_POST['flags'] == 1){$tbc = "8";} else {$tbc = "0";} // Enables TBC $query = "INSERT INTO `accounts` (`login`,`password`,`lastip`,`flags`) VALUES ('".mysql_real_escape_string($_POST['login'])."', '".mysql_real_escape_string($_POST['password'][0])."', '".$_SERVER['REMOTE_ADDR']."', '".mysql_real_escape_string($tbc)."')"; $res = mysql_query($query, $db); if (!$res) return $error[] = 'Database: '.mysql_error(); $msg[] = 'The Account <strong>'.htmlentities($_POST['login']).'</strong> has been created. You may now login!'; mysql_close($db); return true; } { addUser(); } ?>
<html> <head> <title>Elite Generation Register</title> <style> body, table { font-family: Verdana; font-size: 13px; background-color: #000000; color: #ffffff } input { font-family: Tahoma; text-align: center; padding: 2px; } input.button { font-family: Verdana; font-size: 12px; padding: 2px 25px; } div.error { border: 2px solid #FF0000; background-color: #f48987; padding: 4px; } div.msg { background-color: #9fd5b5; padding: 4px; border: 2px solid #00b159; } </style> </head>
<body>
<u><h2 align="left"><font><center><img src=img/banner.jpg></center></h2></u>
<?php
if (!empty($error)){ echo '<div class="error">'; foreach($error as $text) echo $text.'<br/>'; echo '</div>'; }; if (!empty($msg)){ echo '<div class="msg">'; foreach($msg as $text) echo $text.'<br/>'; echo '</div>'; exit('</body></html>'); }; ?>
<center><form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> <table><div align="center"><br> <b style = "color:white; font-size:8pt; font-variant: small-caps; letter-spacing:3px;"><i>A</i>ccount <i>N</i>ame:</b><br> <input type="text" name="login" size="30" maxlength="16"/> <br> <b style = "color:white; font-size:8pt; font-variant: small-caps; letter-spacing:3px;"><i>A</i>ccount <i>P</i>assword:</b><br>
<input type="password" name="password[]" size="30" maxlength="16"/> <br> <b style = "color:white; font-size:8pt; font-variant: small-caps; letter-spacing:3px;"><i>P</i>assword <i>A</i>gain:</b><br>
<input type="password" name="password[]" size="30" maxlength="16"/> <br>
<b style = "color:white; font-size:8pt; font-variant: small-caps; letter-spacing:3px;"><i>TBC</i> Enabled?</b> <input type="checkbox" name="flags" value="1" checked> <br><br>
<input type="image" src="../img/submit_on.gif" value="Submit" alt="Submit">
</table> <div align="center"> <p id="done" style="width: 220px; font-weight: bold; color: #29b503; font-family: tahoma, arial, sans; font-size: 13px;"> <font color="green">Realmlist:</font><br /><font color="white">elitegen.servegame.com<br /><br /> <font color="green">Accepted Client(s):</font><br /><font color="white">2.1.0<br /><br />
<font color="white">[</font><a href="http://bbs.elitegeneration.com/"> <font color="#29b503">Forums</font> </a><font color="white">]</font><font color="white">[</font><a href="stats.xml"> <font color="#29b503">Stats</font> </a><font color="white">]</font><br /> <br /> </div> </form> </body> </html>
| |
| |
|