Hier müss ich doch nur die IP DB pw eintagen und das wars oder ?
PHP Code:
<h2>Vote4Coins</h2>
</div>
<div class="District2 text-con">
<div class="con-wrap">
<?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' => 'IP',
'db_user' => 'root',
'db_pass' => 'PW',
'db_database' => 'account',
## Wie viele Stunden müssen die Spieler warten bis sie wieder Voten können ?
'vote_int' => 12,
## Wie Viel Coins bekommt man fürs Voten ?
'vote_points' => 150,
'vote_coins' => 150
);
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);
die('<font color="#8b0000">Du kannst erst wieder in '.$hours_left.' stunden Voten!.</font>');
}
else
{
mysql_query("UPDATE `account` SET `dp` = (`dp` + ".$this->config['vote_points']."), `lastvote` = '".time()."' WHERE `login` LIKE '".$_SESSION['user_name']."' LIMIT 1") or die(mysql_error());
mysql_query("UPDATE `account` SET `coins` = (`coins` + ".$this->config['vote_coins']."), `lastvote` = '".time()."' WHERE `login` LIKE '".$_SESSION['user_name']."' LIMIT 1") or die(mysql_error());
?>
<meta http-equiv="refresh" content="2;url=http://www.topliste.****************/in/1022-district2-de.html">
<?php
echo "Sie werden jetzt zur Vote seite weitergeleitet ...";
}
}
public function vote_forms()
{
if(!isset($_POST['submit']))
{
echo "
<span style='color: red; font-weight: bold;'>Du bekommst 30 VoteCoins fuer jeden Vote! (Alle 24 Stunden)<br /><br>Das Voten mit mehreren Accounts wird mit einer Account-Sperre bestraft.<br /><br />die Coins werden erst nach dem Voten gutgeschrieben.<br></span>
<form method='post' action=''>
<input type='submit' name='submit' value='Vote!' />
</form>
";
}
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>