Jump to content
  • 0

[question]Vote reward php set up need help.


Question

Posted

exw ton parakato kwdiko alla den kserw pws na ton kanw na doulevei. mporei kapios na mou pei pws? euxaristw.

 

index.php

<?php include ('top.php'); ?>
<?php
if (empty($_SESSION['user'])) {
echo "<i>Welcome, Guest.<br>You can use the login form below in order to vote for our server and get rewarded<br>Remember, you can only vote once a day AND YOU HAVE TO BE OFFLINE.</i><br><br>";

echo "<div id='loginform'><br><form action='' method='POST'>
<table>
<tr><td>Username: </td><td><input type='text' name='username'/></td></tr>
<tr><td>Password: </td><td><input type='password' name='password'/></td></tr>
<tr><td><input type='submit' name='submit' value='Login'/></td></tr>
</table>
</form><br></div>
";
}
else {
$user = $_SESSION['user'];
header ("Location: characters.php");
}

?>
<?php

if (isset($_POST['submit'])) {
$username = $_POST['username'];
$password = $_POST['password'];

$password = base64_encode( pack( "H*", sha1( utf8_encode( $password))));

$check = mysql_num_rows(mysql_query("SELECT * FROM accounts WHERE login='".$username."' AND password='".$password."'"));

if ($check != 0) {
$_SESSION['user'] = $username;
header ("Location: index.php");
}
else {
echo "<br><i>Wrong password and username combination.</i>";
}
}
?>
<?php include ('bottom.php') ?>

 

vote.php

<?php include ('connect.php');?>
<?php

$ip = $_SERVER['REMOTE_ADDR'];
$character = $_POST['charname'];

if ($srvrid != "") {
  if ($character) {
    $page = file_get_contents('http://l2ranksite.com/application.php?id=$srvrid&ip=$ip');

$check1 = explode("<div id='ip'>", $page);
$check1 = explode("</div>", $check1[1]);
$check1 = $check1[0];

if ($check1 == 1) {
  $check2 = explode("<div id='serverid'>", $page);
  $check2 = explode("</div>", $check2[1]);
  $check2 = $check2[0];  
  
  if ($check2 == 1) {
    //
	if ($character && $itemid && $count) {

$check_one = mysql_num_rows(mysql_query("SELECT * FROM characters WHERE char_name='".$character."'"));

if ($check_one != 0) {

$check_two = mysql_num_rows(mysql_query("SELECT * FROM etcitem WHERE item_id='".$itemid."'"));

if ($check_two != 0) {

$row = mysql_fetch_assoc(mysql_query("SELECT * FROM characters WHERE char_name='".$character."'"));
$obj_id = $row[obj_Id];

mysql_query("INSERT INTO items VALUES ('".$obj_id."', '', '".$itemid."', '".$count."', '0', 'INVENTORY', '0', '0', '0', '0', '0', '-1')");
echo "<b>You have been rewarded.</b>";

}
else {
echo "<b>This item does not exist.</b>";
}

}
else {
echo "<b>This character does not exist.</b>";
}

}
	//
  }
  else {
    echo "Wrong server id.";
  }
}
else {
  echo "You have already voted.";
}
  }
  else {
    echo "A problem is occured";
  }
}
else {
echo "The server id is missing!";
}

?>

 

connect.php

<?php
$connect = mysql_connect("localhost", "root", "password");
mysql_select_db("l2jdb", $connect);


//servername

$srvrname = "l2jserver";

//your server id
// it is the name of the folder where your server is in our ranking list
$srvrid = "";

//reward
$itemid = ""
$count = "";
?>

 

character.php

<?php include ('connect.php');?>
<form action="vote.php" method="POST">
<center>
Vote For <?php echo $srvrname; ?><br><br>
<input type="text" size="6" name="usrnum"><br>
<input type="submit" value="Vote">
<input type="hidden" name="charname" value="<?php echo $_GET['usr']; ?>">
</center>
</form>

 

characters.php

<?php include ('top.php'); if (empty($_SESSION['user'])) { header ("Location: index.php"); } ?>
<?php
$query = mysql_query("SELECT * FROM characters WHERE account_name='".$_SESSION['user']."'");

if (mysql_num_rows($query) != 0) {
echo "<div id='loginform'><br><i>Characters:</i><br>";
while ($char = mysql_fetch_assoc($query)) {
  echo "<a href='character.php?usr=$char[char_name]'>$char[char_name]</a><br>";
}
echo "<br></div>";
}
else
echo "<i>You don't have any characters. In order to create one, you have to login into the game. Go <a href='index.php'>Home</a>.</i>";
?>
<?php include ('bottom.php'); ?>

 

top.php

<!doctype html>
<?php session_start(); ob_start(); include ('connect.php'); if ($_SERVER['REMOTE_ADDR'] != "85.74.73.205") { header ("Location: http://google.com"); } ?>
<html lang="en">
<head>
<style>

* {
font-family: Lucida Sans Unicode;
font-size: 13px;
color: red;
text-input: 5px;
}

body {

}

#container {
margin: 100px auto;
height: 300px;
width: 600px;
}

#bodyboxx {
height: 310px;
border: 2px solid red;
border-radius: 25px;
}

#footer {
clear: both;
margin-top: 20px;
}

#loginform {
margin-left: 20px;
border: 1px solid red;
border-radius: 25px;
width: 300px;
}

a[name="register"] {
margin-left: 40px;
}
</style>
</head>
<body>
<div id="container">


<div id="bodyboxx"><br>

 

bottom.php

<br></div>
<div id="footer">
<center><i><a href="http://l2ranksite.com">L2Ranksite.com</a></i></center>
</div>
</div>

</body>
</html>

 

4 answers to this question

Recommended Posts

  • 0
Posted

1on gia na rwtaw paei na pws den kserw kai pragmatika 8a to h8ela para polu na dw mia HLIKRINIS apantash apo kapion edw mesa, para to mono pou kanete einai na ka8este san kokoria na deite ena neo post kai amesws na riksete kapion meiwnektika, LF LOCK!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • This update resaves 25_25 from the original (with sounds) (without the cave below) Some emitter fixes (removed waterfalls with high-poly meshes) The geodata is old, but it works Everything else is unchanged Download P.S. The effect files are taken from the high client for Interlude, so if you're experiencing critical skills, use the default ones for your Version.  
    • GX-Ext Which file of the svn files should i edit to make blow skills to have 100% chance so i can add the settings in the IlExt.ini? because when im changing it from the skilldata.txt it just helps
    • 我们感谢您的 反馈 并希望让服务变得更加 优秀! 如果您使用过我们的服务并愿意分享您的体验(任何体验——积极或建设性),请在Trustpilot上留下评价,并获得$1作为感谢。 链接: https://www.trustpilot.com/review/socnet.pro 如何获得奖励: 1. 前往Trustpilot并留下您的评价 2. 向我们发送发布确认截图,以及带有与评价用户名一致的授权账户截图。 3. 指定哪个商店应收到这 $1 奖励。根据商店不同,可能需要您的用户名/电子邮箱。 您的反馈帮助我们成长,并让项目对社区中的每一位成员变得更好。感谢您与我们同行! 条款: 此活动仅适用于一个唯一用户。不允许多账号行为。 项目有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram 方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快捷且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们想向您展示当前的 促销和特别优惠列表 用于购买我们提供的产品与服务: 1. 您可在首次购买时使用优惠码:SOCNET(15% 折扣) 2. 获得 $1 商店余额或 10–20% 折扣——只需在我们网站注册后,按照模板填写您的用户名:“SEND ME BONUS, MY USERNAME IS...”并在我们的论坛主题中发布! 3. 首次启动 SMM 面板可获得 $1:只需在我们的网站(Support)提交主题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道以及 Stars 购买机器人中每周都有 Telegram Stars 抽奖! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
    • 我们感谢您的 反馈 并希望让服务变得更加 优秀! 如果您使用过我们的服务并愿意分享您的体验(任何体验——积极或建设性),请在Trustpilot上留下评价,并获得$1作为感谢。 链接: https://www.trustpilot.com/review/socnet.pro 如何获得奖励: 1. 前往Trustpilot并留下您的评价 2. 向我们发送发布确认截图,以及带有与评价用户名一致的授权账户截图。 3. 指定哪个商店应收到这 $1 奖励。根据商店不同,可能需要您的用户名/电子邮箱。 您的反馈帮助我们成长,并让项目对社区中的每一位成员变得更好。感谢您与我们同行! 条款: 此活动仅适用于一个唯一用户。不允许多账号行为。 项目有效链接: 数字商品商店(网站): 前往 商店 Telegram 机器人: 前往 – 通过 Telegram 方便访问商店。 虚拟号码服务: 前往 用于购买 Telegram Stars 的 Telegram 机器人: 前往 – 在 Telegram 中快捷且优惠地购买 Stars。 SMM 面板: 前往 – 推广您的社交媒体账户。 我们想向您展示当前的 促销和特别优惠列表 用于购买我们提供的产品与服务: 1. 您可在首次购买时使用优惠码:SOCNET(15% 折扣) 2. 获得 $1 商店余额或 10–20% 折扣——只需在我们网站注册后,按照模板填写您的用户名:“SEND ME BONUS, MY USERNAME IS...”并在我们的论坛主题中发布! 3. 首次启动 SMM 面板可获得 $1:只需在我们的网站(Support)提交主题为 “Get Trial Bonus” 的工单。 4. 我们的 Telegram 频道以及 Stars 购买机器人中每周都有 Telegram Stars 抽奖! 新闻: ➡ Telegram 频道: https://t.me/accsforyou_shop ➡ WhatsApp 频道: https://chat.whatsapp.com/K8rBy500nA73z27PxgaJUw?mode=ems_copy_t ➡ Discord 服务器: https://discord.gg/y9AStFFsrh 联系方式与支持: ➡ Telegram: https://t.me/socnet_support ➡ WhatsApp: https://wa.me/79051904467 ➡ Discord: socnet_support ➡ ✉ Email: solomonbog@socnet.store
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock