Code:
<?php
// Einstellungen
$dbhost = '25.169.**.100'; //mySQL IP
$dbuser = 'root'; //mySQL Username
$dbpassword = 'admin****'; //mySQL Passwort
$database = 'account'; //mySQL Datenbank
$coins = '1000'; //Menge an Coins pro Vote
$wartezeit = '18'; //Wartezeit in Stunden
$s1 = 'http://www.topliste.****************/in/770-25-169-74-120.html'; //Vote Seite 1
// Einstellungen Ende
//Ab hier NICHTS mehr verändern!
$conn = mysql_connect($dbhost, $dbuser, $dbpassword) or die ('mySQL Connecting Error');
mysql_select_db($database);
$ip = $_SERVER['REMOTE_ADDR'];
$site = $_POST['site'];
$website = array(1, $s1,);
if($site) {
$wartezeit = $wartezeit * 3600;
$time = time();
$earnedpoints = false;
$account = $_POST['name'];
$account = mysql_real_escape_string($account);
if ($account == "") {
echo 'Enter your AccountID!';
exit();
}
$query = mysql_query("SELECT *, SUM(`times`) as amount FROM vote WHERE account='$account' OR ip='$ip'");
$lasttime = mysql_fetch_array($query);
$amount = $lasttime['amount'];
$insertnew = false;
if ($amount == "") {
$insertnew = true;
}
$timecalc = $time - $lasttime['Site' . $site];
if (!$insertnew) {
if ($timecalc < $wartezeit) {
echo '<html>
<head>
<title>Vote for Coins</title>
</head>
<body background="bg.jpg" text="grey" link="#0000CC" vlink="#000066" alink="#000000">
<h1>Vote for Us!</h1>';
echo ' Hallo '. $account .' Du hast bereits mit diesem Account: ('. $account .') oder deiner IP: ('. $ip .') in den letzten ' . $wartezeit / 3600 . ' Stunden bereits gevotet.!';
echo ' <br><br>Letzter Vote am: '. date('M d\, h:i:s A', $lasttime['Site' . $site]) .'';
echo '<html>';
echo '<head>';
echo '</head>';
echo '<body>';
echo '</body>';
echo '</html>';
exit();
} else {
$update = mysql_query("UPDATE vote SET account='$account', Site" . $site . "='$time', times=times+1 WHERE ip='$ip'");
if (!$update) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $update;
die($message);
} else {
$earnedpoints = true;
}
}
} else {
$success = mysql_query("INSERT INTO vote (`account`, `ip`, `Site" . $site . "`, `times`) VALUES ('$account', '$ip', '$time', 1)");
if (!$success) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $success;
die($message);
} else {
$earnedpoints = true;
}
}
if ($earnedpoints) {
$points = mysql_query("UPDATE account.account SET coins = coins + " . $coins . " WHERE login='$account'");
if (!$points) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}
mysql_close($conn);
header("Location: http://" . $website[$site] . "");
exit();
} else {
echo 'There was an error processing your request.';
exit();
}
}
?>
<html>
<head>
<title>Vote for Coins</title>
</head>
<body background="bg.jpg" text="grey" link="#0000CC" vlink="#000066" alink="#000000">
<h1>Vote for Us!</h1>
<center>
<font color="grey"><i>Du bekommst Pro Vote: <?php echo $coins; ?> Coins und du kannst alle <?php echo $wartezeit;?> Stunden voten.<br>
<br>Bitte klicke "Vote 1" bevor du Votest. </i><br /> </font>
<form action="" method="POST">
<table cellspacing=1 cellpadding=5>
<td class=list><input type="radio" name="site" value="1"> Vote 1</td>
</tr>
</table>
<table cellspacing=1 cellpadding=5>
<td class=list align=right><font size="5"><b>AccountID:</b></font></td><td class=list><input type=text name=name maxlength="15"></td></tr>
<tr><td class=listtitle align=center colspan=2><input type="image" src="vote.png" alt="Absenden"></td></tr>
</form>
</table>
</center>
</body>
</html>
Code:
<a href="#" onClick="NewWindow=window.open('http://bloody-marry.de/vote.php', 'Vote for Coins', 'toolbar=yes,location=no,directories=no,status=no,menubar=yes,scrollbars=no,resizable=yes,width=620,height=450,left=22,top=22'); return false; ">Vote for Coins</a>
Danke!






