SQL Code
This account database query to be sent as an F6
part login.php
part register.php
Login.php section looking at this part:
Here you need to insert your website address. for example:
Important parts of the website using GET Keep looking as bad as getelés case sent back to the main page.
How to get Dragon Coins to be allocated to the register.php to write in UPDATE SET account.account coins = '". ($ Mysql_result [2] [' coins'] [code] + 5 [/ code]).
+5 means that the existing amount of coin dragon SE + also write into
+5 +5 Dragon Coins in the present
Of the Dragon Coins +100000 +100000
Existing + be credited Dragon Coins
0 +5 = 5 5 +5 = 10 Dragon Coins Dragon Coins
Rem was understandable in the description :)
Who liked to throw in an arbitrary way as: D
By: Metin2System
Sorry for the bad translation from text
This account database query to be sent as an F6
Code:
CREATE TABLE `referer_links` ( `id` int(20) unsigned NOT NULL AUTO_INCREMENT, `acc_id` int(20) NOT NULL, `code` varchar(60) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=3221 DEFAULT CHARSET=latin1;
Code:
<?PHP
function RandomString($max){
$string = "";
$CharacterMap = array("A", "B", "C", "D", "E", "F",
"G", "H", "I", "J", "K", "L",
"M", "N", "O", "P", "Q", "R",
"S", "T", "U", "V", "W", "X",
"Y", "Z", "a", "b", "c", "d",
"e", "f", "g", "h", "i", "j",
"k", "l", "m", "n", "o", "p",
"q", "r", "s", "t", "u", "v",
"w", "x", "y", "z", "0", "1", "2",
"3", "4", "5", "6", "7", "8", "9");
for ($i = 0; $i < $max; $i++) {
$string .= $CharacterMap[array_rand($CharacterMap, 1)];
}
return $string;
}
if(isset($_GET['do']) && $_GET['do']=="aktivieren" && isset($_GET['hash']) && !empty($_GET['hash'])) {
if(strlen($_GET['hash'])==32 && $_GET['hash']!=1 && checkAnum($_GET['hash'])) {
$cmdHash = "SELECT id,web_aktiviert FROM account.account WHERE web_aktiviert='".$_GET['hash']."' AND web_aktiviert!='1' LIMIT 1;";
$qryHash = mysql_query($cmdHash,$sqlServ);
if(mysql_num_rows($qryHash)) {
$getData = mysql_fetch_object($qryHash);
$userUpdate = "UPDATE account.account SET web_aktiviert='1',status='OK' WHERE id='".$getData->id."' LIMIT 1;";
$updateQry = mysql_query($userUpdate,$sqlServ);
if($updateQry) {
echo'<p class="meldung">Ihr Account wurde erfolgreich aktiviert. Sie können sich nun einloggen.</p>';
echo'<meta http-equiv="refresh" content="1; URL=index.php?s=login"> ';
}
else {
echo'<p class="meldung">Query fehlgeschlagen. Bitte einen Admin kontaktieren!</p>';
}
}
else {
echo'<p class="meldung">Es wurde kein passender Eintrag gefunden. Aktivierung fehlgeschlagen.</p>';
}
}
else {
echo'<p class="meldung">Kein valider Hash!</p>';
}
}
if(!empty($_SESSION['user_id']))
{
$mysql_query[1] = mysql_query("SELECT * FROM account.referer_links WHERE acc_id = '".$_SESSION['user_id']."' LIMIT 1");
if(mysql_num_rows($mysql_query[1]) == 1)
{
$mysql_result[1] = mysql_fetch_assoc($mysql_query[1]);
}else{
mysql_query("INSERT INTO account.referer_links (acc_id, code) VALUES ('".$_SESSION['user_id']."', '".RandomString(60)."')");
$mysql_query[1] = mysql_query("SELECT * FROM account.referer_links WHERE acc_id = '".$_SESSION['user_id']."' LIMIT 1");
$mysql_result[1] = mysql_fetch_assoc($mysql_query[1]);
}
$cmdStats = "SELECT SUM( player.playtime ) AS ges_spielzeit, COUNT( * ) AS ges_chars, player_index.empire
FROM player.player
INNER JOIN player.player_index ON player_index.id = player.account_id
WHERE player.account_id = '".$_SESSION['user_id']."'
LIMIT 1";
$qryStats = mysql_query($cmdStats,$sqlServ);
$getStats = mysql_fetch_object($qryStats);
if(!empty($getStats->empire)) {
$reich = '<img src="http://www.elitepvpers.com/forum/images/reiche/'.$getStats->empire.'_kl.jpg" title="Reich" alt="Reich"/>';
}
echo'<table>
<tr>
<th class="topLine">User Name:</th>
<td class="tdunkel">'.$_SESSION['user_name'].'</td>
</tr>
<tr>
<th class="topLine">Empire:</th>
<td class="thell">'.$reich.'</td>
</tr>
<tr>
<th class="topLine">Character Number:</th>
<td class="tdunkel">'.$getStats->ges_chars.'</td>
</tr>
<tr>
<th class="topLine">Playtime:</th>
<td class="thell">'.$getStats->ges_spielzeit.' Perc</td>
</tr>
<tr>
<th class="topLine">Referercode:</th>
<td class="thell"><input type="text" value="http://siteexample.com/index.php?p=register&referer='.$mysql_result[1]['code'].'" /></td>
</tr>';
$sqlAcc = "SELECT account.social_id AS loeschcode, safebox.password AS lagerpw
FROM account.account
LEFT JOIN player.safebox
ON account.id=safebox.account_id
WHERE account.id='".$_SESSION['user_id']."'";
$qryAcc = mysql_query($sqlAcc) or die(mysql_error());
$getAcc = mysql_fetch_object($qryAcc);
if(empty($getAcc->lagerpw)) $getAcc->lagerpw = '000000';
echo'<tr>
<th class="topLine">loeschcode:</th>
<td class="tdunkel">'.$getAcc->loeschcode.'</td>
</tr>
</table>';
echo '';
}
else
{
?>
Code:
<p>
<?PHP
$nyitva = 'IGEN'; // Register here on and off -> Hungary IGEN vagy NEM
if ($nyitva == 'IGEN')
{
$do = mysql_real_escape_string($_POST['do']);
function valosf($account){
if ($account == "")
return false;
$engedelyezett = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
for ($i = 0; $i < strlen($account); ++$i)
if (strpos($engedelyezett, $account[$i]) === false)
return false;
return true;
}
//VALOS EMAIL
function email($email1) {
$eredmeny = TRUE;
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $email1)) {
$eredmeny = FALSE;
}
return $eredmeny;
}
if(isset($do) and $do == "do"){
$uzenet="";
$statusz = "OK";
$account = mysql_real_escape_string($_POST['account']);
$uname = mysql_real_escape_string($_POST['uname']);
$pass = mysql_real_escape_string($_POST['pass']);
$pass2 = mysql_real_escape_string($_POST['pass2']);
$email1 = mysql_real_escape_string($_POST['email']);
$email2 = mysql_real_escape_string($_POST['email2']);
$hashSF = md5($_POST['sicherheitsa']);
$sfNum = mysql_real_escape_string($_POST['sicherheitsf']);
$lcode = mysql_real_escape_string($_POST['loeschcode']);
$refcode = mysql_real_escape_string($_POST['referer']);
$regCoins = 0; // Start Dragon Coins
$laufZeit = 365; //Tage autoloot,safebox
$calcLZ = (60*60*24)*365;
$expireStamp = time()+$calcLZ;
$expireDate = date("Y-m-d H:i:s",$expireStamp);
$zuFall = rand(99999,999999999);
$aktivHash = '';
$accountStatus = 'OK';
putenv("TZ=Europe/Budapest");
$aktivalva = 'igen';
function generateRandomString($hosszusag = 8, $betu = '12345678901235678909876543210987654321456789012345345678901235678909876541234567890123567890987654321098765432145678901234534567321098765432145678901678909876543210987654321')
{
$s = '';
$betuhosszusag = strlen($betu)-1;
for($i = 0 ; $i < $hosszusag ; $i++){
$s .= $betu[rand(0, $betuhosszusag)];}
return $s;
}
$safecod = generateRandomString();
if (strlen($refcode) > 0)
{
$mysql_query[1] = mysql_query("SELECT * FROM account.referer_links WHERE code = '".$refcode."' LIMIT 1");
if(mysql_num_rows($mysql_query[1]) == 1)
{
$mysql_result[1] = mysql_fetch_assoc($mysql_query[1]);
$mysql_query[2] = mysql_query("SELECT * FROM account.account WHERE id = '".$mysql_result[1]['acc_id']."' LIMIT 1");
if(mysql_num_rows($mysql_query[2]) == 1)
{
$mysql_result[2] = mysql_fetch_assoc($mysql_query[2]);
mysql_query("UPDATE account.account SET coins = '".($mysql_result[2]['coins'] + 5)."' WHERE (id = '".$mysql_result[2]['id']."')");
}
}
}
if($statusz<>"OK"){
echo"<div style='text-color:red;'><p align=center> $uzenet</div><br/> </p><p align='center'><input type='button' value='back' onClick='history.go(-1)'><br/></p>";
}else{
$sqlCmd = "INSERT INTO account.account
(login,password,real_name,email,social_id,question1,answer1,create_time,status,coins,autoloot_expire,safebox_expire,web_aktiviert)
VALUES
('".$account."',PASSWORD('".$pass."'),'".$uname."','".$email1."','".$lcode."','".$sfNum."','".$hashSF."','".$sqlZeit."','".$accountStatus."','".$regCoins."','".$expireDate."','".$expireDate."','".$aktivHash."')";
$sqlQry = mysql_query($sqlCmd,$sqlServ);
echo "<p align='center'>Congratulations <b>$account</b>! You have successfully registered.<br></p>";
}
}else{
?>
<p>All fields are required!</p>
<form action="index.php?p=register" method="POST">
<input type="hidden" name="do" value="do" />
<input type="hidden" name="referer" value="<?php print $_GET['referer']; ?>" />
<table>
<tr>
<th class="topLine">User MName:</th>
<td class="tdunkel"><input type="text" name="account" maxlength="16" size="16"/> 4-16 </td>
</tr>
<tr>
<th class="topLine">Your name:</th>
<td class="thell"><input type="text" name="uname" maxlength="16" size="16"/> 3-20</td>
</tr>
<tr>
<th class="topLine">Password:</th>
<td class="tdunkel"><input type="password" name="pass" maxlength="16" size="16"/> 8-16 </td>
</tr>
<tr>
<th class="topLine">re-enter password:</th>
<td class="thell"><input type="password" name="pass2" maxlength="16" size="16"/></td>
</tr>
<tr>
<th class="topLine">E-Mail:</th>
<td class="tdunkel"><input type="text" name="email" maxlength="50" size="25"/> max. 40</td>
</tr>
<tr>
<th class="topLine">E-Mail again:</th>
<td class="thell"><input type="text" name="email2" maxlength="50" size="25"/></td>
</tr>
<tr>
<th class="topLine">Wiper Code:</th>
<td class="tdunkel"><input type="text" name="loeschcode" maxlength="7" size="7"/> 7 Karakter</td>
</tr>
<tr>
<th class="topLine">Security Question:</th>
<td class="thell">
<select name="sicherheitsf">
<option value="1">Parent's name?</option><option value="2">Favorite food?</option><option value="3">My favorite city?</option><option value="4">Hobbyd?</option><option value="5">Lucky Numbers?</option><option value="6">My favorite actor?</option><option value="7">Favorite movie?</option><option value="8">Favorite subject?</option>
?>
</select>
<input type="text" name="sicherheitsa" maxlength="16" size="16"/> 3-16
</td>
</tr>
<tr>
<th class="topLine">Verification Code:</th>
<td class="tdunkel"><img src="./captcha/captcha.php" title="Captcha"/> <input type="text" name="captcha" maxlength="5" size="5"/></td>
</tr>
<tr>
<th class="topLine" style="text-align:center;" colspan="2"><input type="submit" name="submit" value="Register"/> • <input type="reset" value="again"/></th>
</tr>
</table>
</form>
<?PHP
}
}else{
echo "<p align='center'>The registration is closed.</p>";
}
?>
</p>
Code:
<td class="thell"><input type="text" value="http://siteexample.com/index.php?p=register&referer='.$mysql_result[1]['code'].'" /></td>
Code:
http://metin2system.com/index.php?p=register&referer='.$mysql_result[1]['code'].'"
How to get Dragon Coins to be allocated to the register.php to write in UPDATE SET account.account coins = '". ($ Mysql_result [2] [' coins'] [code] + 5 [/ code]).
+5 means that the existing amount of coin dragon SE + also write into
+5 +5 Dragon Coins in the present
Of the Dragon Coins +100000 +100000
Existing + be credited Dragon Coins
0 +5 = 5 5 +5 = 10 Dragon Coins Dragon Coins
Rem was understandable in the description :)
Who liked to throw in an arbitrary way as: D
By: Metin2System
Sorry for the bad translation from text