Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 05:46

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Bonus Initial for Registration Page

Discussion on Bonus Initial for Registration Page within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Sep 2012
Posts: 12
Received Thanks: 1
Bonus Initial for Registration Page

Hello everyone and Happy New Year!
I can not add the initial bonus (gold_expire, silver_expire, safebox_expire, autoloot_expire, fish_mind_expire, marriage_fast_expire, money_drop_rate_expire) to this page registration:

Code:
		<div class="page-header">
			<h1>Īnregistrare</h1>
		</div>
<?php
if(isset($_SESSION['id'])) {
?>
		<div class="alert alert-warning" role="alert">
			Ca să-ți creezi un cont nou trebuie să te <a href="index.php?page=logout">deconectezi</a>.
		</div>
<?php
} else {

?>
<?php
//Verificare daca inregistrarea e dezactivata.
$rg = mysqli_query($sqlHp, "SELECT * FROM ".SQL_HP_DB.".settings WHERE id=8");
$reg = mysqli_fetch_assoc($rg);
if ($reg['value'] == 'nu') {
echo '<div class="alert alert-danger" role="alert">
			Īnregistrarea este momentan <strong>dezactivată</strong>!
		</div>'; }

else {
if(!isset($_POST['register'])) {
	?>
		<div class="alert alert-info" role="alert">
			<strong>ATENȚIE!</strong> Toate cāmpurile sunt obligatorii.<br> <strong>ATENȚIE!</strong>
			Adresa de e-mail trebuie să fie validă!
		</div>
		<div class="alert alert-danger" role="alert">
			<strong>ATENȚIE!</strong> Prin īnregistrarea pe acest server, ești de
			acord cu <a href="index.php?page=rules">regulamentul intern</a>.
		</div>
<?php } ?>


<?php
	if(isset($_POST['register']) && !isset($_POST['agreed'])) {
		echo '<div class="alert alert-danger" role="alert">
				Trebuie să fii de acord cu regulamentul jocului.
		</div>';
	}

	if(isset($_POST['register']) && !isset($_POST['captcha'])) {
		echo '<div class="alert alert-danger" role="alert">
				Trebuie să completezi codul de securitate.
		</div>';
	}

	if(isset($_POST['register']) && isset($_POST['captcha'])) {
		if($_POST['captcha']!=$_SESSION['captcha']['code'])
			echo '<div class="alert alert-danger" role="alert">
					Codul de securitate introdus este incorect.
			</div>';
	}

	if(isset($_POST['register']) && isset($_POST['agreed']) && isset($_POST['captcha']) && $_POST['captcha']==$_SESSION['captcha']['code']) {
		
		$actions = array(
				'username' => sanitize(stripInput($_POST['username'])),
				'password' => sanitize(stripInput($_POST['password'])),
				'usermail' => sanitize(stripInput($_POST['usermail'])),
				'realname' => sanitize(stripInput($_POST['realname'])),
				'socialid' => sanitize(stripInput($_POST['socialid'])),
		);
		$errors = array();
		
		$check_login = "SELECT * FROM account.account WHERE login = '{$actions['username']}'";
		$check_login = $sqlServ->query($check_login);
		$rows_login = $check_login->num_rows;

		$check_email = "SELECT * FROM account.account WHERE email = '{$actions['usermail']}'";
		$check_email = $sqlServ->query($check_email);
		$rows_email = $check_email->num_rows;
		if($rows_login >= 1) {
			echo '<div class="alert alert-danger" role="alert">';
			echo '	Acest cont este deja īnregistrat!';
			echo '</div>';
		} else if($rows_email >= 1) {
			echo '<div class="alert alert-danger" role="alert">';
			echo '	Acest e-mail este folosit deja de un alt cont!';
			echo '</div>';
		} else {
			if(filter_var($actions['usermail'], FILTER_VALIDATE_EMAIL)) {
				if($_POST['password'] == $_POST['rpassword']) {
					$query = "INSERT INTO account.account (login, password, real_name, social_id, email, create_time)
							VALUES (?, PASSWORD(?), ?, ?, ?, NOW())";
					$sanitize = array(
							':user' => $actions['username'],
							':pass' => $actions['password'],
							':mail' => $actions['usermail'],
							':name' => $actions['realname'],
							':soid' => $actions['socialid'],
					);
					$insert = $sqlServ->prepare($query);
					$insert->bind_param('sssss', $sanitize[':user'], $sanitize[':pass'], $sanitize[':name'], $sanitize[':soid'], $sanitize[':mail']);
					$insert->execute();
					echo '<div class="alert alert-success" role="alert">';
					echo '	Contul <strong>' . $actions['username'] . '</strong> a fost īnregistrat cu succes!';
					echo '</div>';
				} else {
					echo '<div class="alert alert-danger" role="alert">';
					echo '	Parolele nu corespund!';
					echo '</div>';
				}
			} else {
				echo '<div class="alert alert-success" role="alert">';
				echo '	Adresa de e-mail este invalidă!';
				echo '</div>';
			}
		}
	}
	
	require 'captcha/simple-php-captcha.php';
	$_SESSION['captcha'] = simple_php_captcha();
?>
	<div class="well">
		<div class="table-responsive">
			<form action="<?= $_SERVER['PHP_SELF'] ?>?page=register" method="post">
				<table class="table table-striped">
					<tbody>
						<tr>
							<td>Nume de utilizator:</td>
							<td><input type="text" class="form-control" name="username" pattern=".{5,16}" maxlength="16" placeholder="Numele dorit..." required title="Īntre 5 și 16 caractere permise."></td>
						</tr>
						<tr>
							<td>Parolă:</td>
							<td><input type="password" class="form-control" name="password" pattern=".{5,16}" maxlength="16" placeholder="Parolă" required title="Īntre 5 și 16 caractere permise."></td>
						</tr>
						<tr>
							<td>Repetă parola:</td>
							<td><input type="password" class="form-control" name="rpassword" pattern=".{5,16}" maxlength="16" placeholder="Repetare parolă" required title="Īntre 5 și 16 caractere permise."></td>
						</tr>
						<tr>
							<td>Adresă de e-mail:</td>
							<td><input type="email" class="form-control" name="usermail" pattern=".{7,64}" maxlength="64" placeholder="" required title="Maxim 64 caractere."></td>
						</tr>
						<tr>
							<td>Cod ștergere caracter:</td>
							<td><input type="text" AUTOCOMPLETE="off" maxlength="7" class="form-control" name="socialid" placeholder="Ștergere caracter īn joc" required></td>
						</tr>
						<tr>
							<td>Nume real:</td>
							<td><input type="text" class="form-control" name="realname" pattern=".{3,15}" maxlength="15" placeholder="Numele tău" required title="Maxim 15 caractere."></td>
						</tr>
						<tr>
							<td><?php print '<img src='.$_SESSION['captcha']['image_src'].'>'; ?></td>
							<td><input type="text" style='height:70px; width:230px; font-size: 30px;' class="form-control" name="captcha" pattern=".{4,6}" maxlength="5" placeholder="Cod securitate" required title="Maxim 15 caractere."></td>
						</tr>
						<tr>
							<td>Sunt de acord cu <a href="index.php?page=rules">regulamentul
									jocului</a> <input type="checkbox" name="agreed" checked></td>
							</td>
							<td><input type="submit" class="btn btn-s btn-success" name="register" value="Īnregistrare"></td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
	</div>
<?php }} ?>
Someone who can help me out? pls

Thanks so much
DjCanigia is offline  
Old 01/01/2017, 23:50   #2



 
Samael's Avatar
 
elite*gold: 17
Join Date: May 2014
Posts: 2,103
Received Thanks: 1,292
you can add the bonus with default settings in your DB. account -> design Account table

search the bonus -> type: datetime -> default: 2020-01-01 01:01:01


Samael is offline  
Thanks
1 User
Old 01/02/2017, 00:10   #3
 
elite*gold: 0
Join Date: Sep 2012
Posts: 12
Received Thanks: 1
Quote:
Originally Posted by xSaito View Post
you can add the bonus with default settings in your DB. account -> design Account table

search the bonus -> type: datetime -> default: 2020-01-01 01:01:01


I did not know you could directly from perfect db!

Thanks so much!
DjCanigia is offline  
Reply


Similar Threads Similar Threads
Registration bonus page
07/10/2014 - DarkOrbit - 4 Replies
Well, i'm goint to the point, here i leave the page's Darkorbit | Das Browsergame Adventure für Action im Hyperspace. Darkorbit | Das Browsergame Adventure für Action im Hyperspace. I used a few days ago, and it works, contains: 1 Month premium 1 BigBoy
Initial Minecraft registration code
03/25/2013 - Minecraft Guides & Strategies - 1 Replies
Hey. Well, as in websites Scriptures enough to start minecraft, but I tried this yesterday xauth add-on to write a web registration system. I hope you take benefit from it. I had enough but unfortunately it is still quite difficult for me to do whilpool encryption. <?php function encryptPassword($password) { $salt = substr(hash('whirlpool', uniqid(rand(), true)), 0, 12); $hash = hash('whirlpool', $salt . $password); $saltPos = (strlen($password) >= strlen($hash) ? strlen($hash) :...
Registration Page
08/13/2009 - CO2 Private Server - 0 Replies
I have a php script for a registration page, but it seems it's just missing just a few things in it. Could someone PM me or add me on msn and help me? That way we don't have to have the private conversation in the thread.
[HELP] about my registration page
07/12/2009 - CO2 Private Server - 3 Replies
ok i poned port 80 with my computer ip which is sumthing like 192.168.*** and i use my external ip to acces my reg page it works fine on my computer but it doesnt show up to others.. can anyone please tell me whats wrng? and what i have to do.
How to fix the registration page?
12/30/2008 - Dekaron Private Server - 3 Replies
nvm. Already fixed it.



All times are GMT +1. The time now is 05:47.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.