wenn ich vote will er im spiel von mir ein Item haben wo ich rechts klick mache
und das item ausführe damit ich die coins gutgeschrieben bekommen und das will ich net haben will es so haben sobald es erfolg reich gevotet ist das man dann die coins bekommt ich schreib euch mal denn script hier rein hoffe ihr könnt mir helfen wer es hin bekommt bekommt ein THX
PHP Code:
<div id="content">
<div class="con-welcome">Vote4Coins System:</div>
<div class="con-main">
<div class="textbox">
<?PHP
if(isset($_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) {
?>
<?php
class Vote
{
## Edit the info to your liking
var $config = array(
'db_host' => '???.???.???.???',
'db_user' => '????',
'db_pass' => '??????',
'db_database' => '??????',
## Wie viele Stunden müssen die Spieler warten bis sie wieder Voten können ?
'vote_int' => 18,
);
public function __construct()
{
$connect = mysql_connect($this->config['db_host'], $this->config['db_user'], $this->config['db_pass']);
if(!$connect)
die(mysql_error());
$db = mysql_select_db($this->config['db_database'], $connect);
if(!$db)
die(mysql_error());
}
public function do_vote()
{
// $name = mysql_real_escape_string($_POST['name']);
$fetch = mysql_query("SELECT * FROM `account` WHERE `login` LIKE '".$_SESSION['user_name']."'" . "LIMIT 1") or die(mysql_error());
$get = mysql_fetch_array($fetch);
if((time() - $get['lastvote']) < (3600 * $this->config['vote_int']) && $get['lastvote'] != 0)
{
$hours_left = round((((($get['lastvote'] + (3600 * $this->config['vote_int'])) - time()) / 3600)), 0);
echo ('<center><b>Du kannst erst wieder in '.$hours_left.' Stunden Voten!.<center></b>');
}
else
{
mysql_query("UPDATE `account` SET `lastvote` = '".time()."' WHERE `login` LIKE '".$_SESSION['user_name']."' LIMIT 1") or die(mysql_error());
$sqlItem = "INSERT INTO player.item_award (login, vnum , count , why, mall )
VALUES ('".$_SESSION['user_name']."', '90006', '1', 'voten2', '1')";
$qryItem=mysql_query($sqlItem) or die(mysql_error());
?>
<meta http-equiv="refresh" content="1;url=http://www.topliste.*****************/in/1001-deliciouse2-com.html">
<?php
echo "<center>Sie werden jetzt zur Vote seite weitergeleitet ...<center>";
}
}
public function vote_forms()
{
if(!isset($_POST['submit']))
{
echo "
Du kannst aller 18 Stunden für unseren Server Voten,<br>
bedenke das sämtliche Vote's geloggt werden.<br><br>
Für das Voten erhälst du eine Vote Schein,diese befindet<br>
sich dann in deinem Itemshoplager bis du sie abholst!<br><br>
Sollte eine manipulation des System festgestellt werden,<br>
führt dies zum permanenten Auschluß aus der Spielwelt von<br>
<center><b>Deliciouse2-Reloaded</b>.</center><br>
<center><form method='post' action=''>
<input type='submit' name='submit' value='Jetzt für D2R voten!' />
</form></center><br>";
}
else
{
$this->do_vote();
}
}
}
?>
<?php
$vote = new Vote();
$vote->vote_forms();
?>
<?php
$str = 'PHA+IDxwPg==';
echo base64_decode($str);
?>
<?PHP
}
else { echo'<p class="meldung">Sie müssen für diesen Bereich angemeldet sein.</p>';
}
?>
</div>
</div>
<div class="con-foot"></div>







