• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Simple Premium Points Manager

chojrak

Banned User
Joined
Oct 25, 2008
Messages
5,832
Solutions
2
Reaction score
160
Orginal Idea: http://otland.net/f295/gesior-acc-add-points-form-39693/

Code:
<?
	// points manager by chojrak ;p
	session_start();

	// connection info
	mysql_connect("localhost", "root", "password");
	mysql_select_db("otserv");

	// manager config
	$login = "r00t";
	$password = "p4ss";

	$content = "<center>";
	if ($_POST)
	{
		if (!isSet($_SESSION['access']))
		{
			if ($_POST['l'] == $login && $_POST['p'] == $password)
			{
				$content .= "You are successfully logged in.<br/>Please click <a href='./points.php'>here</a>.";
				$_SESSION['access'] = true;
			}
			else
				$content .= "<img src='http://steynian.files.wordpress.com/2008/08/access_denied.gif'/>";
		}
		else
		{
			$player = $_POST['player'];
			$points = $_POST['points'];
			$p_query = mysql_query("SELECT * FROM `players` WHERE `name` = '".$player."';");
			$p_data = mysql_fetch_array($p_query);
			mysql_query("UPDATE `accounts` SET `premium_points` = `premium_points` + '".$points."' WHERE `id` = '".$p_data['account_id']."'");
			$content .= $points." of premium points added to account of player ".$player.".";
		}
	}
	else
	{
		if (!isSet($_SESSION['access']))
		{
			$content .= "<form method='post' action='points.php'>
						<table width='250' cellspacing='0' border='1'>
						<tr>
							<td align='left'>Access Panel</td>
						</tr>
						<tr>
							<td align='center'>
								Login:
								<br/>
								<input type='password' name='l'/>
								<br/><br/>
								Password:
								<br/>
								<input type='password' name='p'/>
								<br/><br/>
								<input type='submit' name='access_account' value='Access account.'/>
							</td>
						</tr>
						</table>
					</form>";
		}
		else
		{
			$content .= "<form method='post' action='points.php'>
						<table width='250' cellspacing='0' border='1'>
						<tr>
							<td align='left'>Add Points</td>
						</tr>
						<tr>
							<td align='center'>
								Player name:
								<br/>
								<input type='text' name='player'/>
								<br/><br/>
								Points:
								<br/>
								<input type='text' name='points'/>
								<br/><br/>
								<input type='submit' name='add_points' value='Give points.'/>
							</td>
						</tr>
						</table>
					</form>";
		}
	}
	$content .= "</center>";
	echo $content;
?>

Nothing more to write. ;P
 
mAN GOD WORK BUT I HAVE oNE PROBLEM, can any person Help me pleasE?

When I Install Xamp Apache doesn't work, says me that The Port 80 445 SSL are in use failed to install I get one Page that help, But It don't helped me :( please Why Apache says Busy? and doesn't work I need Help please!

http://otland.net/f258/port-80-blocked-use-another-one-25870/

Thats Page that I visit! HELP PLEASE i give rep++
 
maby router? and firewall? firewall for install and if u got router u need do a virtual server to open the port to u sameone, i had to do it so if u need help ask
 
You have to create file called 'points.php', then paste my code there.
 
Back
Top