hey leute ich habe dieses hier und anfangs läuft auch immer alles perfect nur nach einer gewissen zeit können die user immer auf vote klicken und bekommen coins und coins dh ohne wartezeit kann mir einer sagen wie ich das beheben kann?
Instructions:
- create new db called "vote"
- import "vote.sql"
- edit "vote.php" and fill in mssql and mysql
- edit "vote.php" to change values to your own wishes
- Upload vote.php and votenow.php
- go to yousite/votenow.php
Update:
- Total re-write of vote.php
- re-write of time difference
- added anti sql inject
- added java messages
- removed log from mysql
- added check for dshop
- changed date(); format
vote.php :
PHP Code:
<html> <head> <title>Vote Now!</title> <style> body { background-color: #202020; color: yellow; } </style> </head> <body> <?php // Report all PHP errors (see changelog) error_reporting(E_ALL);
//---------------------------------------------------------- // Give X coins $coins = 25;
// Yout website after vote was successfull // Add http:// in your list $webpage = "http://www.google.com";
// Time needed to vote again // You need to remove 1 minut from the time // 720 should be 12hours $time_needed = "719"; // in mintutes
// Insert your MSSQL info here $mssql = array( 'host' => "YOUR HOST", 'user' => "YOUR USER", 'pass' => "YOUR PASS" );
// Insert your MYSQL info here $mysql = array( 'host' => "YOUR HOST", 'user' => "YOUR USER", 'pass' => "YOUR PASS", 'db' => "vote" // Do not change it the DB is vote );
//---DO NOT EDIT ANYTHING BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING!! ---
$result2 = mssql_query("SELECT * FROM cash.dbo.user_cash WHERE user_no = '".$row1[0]."'",$mslink); $count_coins = mssql_num_rows($result2);
if($count_coins == '0') {
echo '<SCRIPT LANGUAGE="JavaScript">alert("This account didnt visit the D-shop yet. \n You cannot recive your coins. \n Please login into the server, and visit the D-shop.")</script>'; echo "<script type='text/javascript'>window.location='votenow.php';</script>";
} else {
$result2 = mysql_query("SELECT * FROM users WHERE account = '".$account."' "); $row2 = mysql_fetch_row($result2); $count2 = mysql_num_rows($result2);
if (round(abs($to_time - $from_time) / 60,2) > $time_needed) {
$amount = $coins; mysql_query("UPDATE users SET date = '".$date."' WHERE account = '".$account."' "); mssql_query("UPDATE cash.dbo.user_cash SET amount = amount+".$amount." WHERE user_no = '".$row1[0]."'",$mslink); echo '<SCRIPT LANGUAGE="JavaScript">alert("Thank you for you vote!")</script>'; echo "<script type='text/javascript'>window.location='$webpage';</script>";
Instructions:
- create new db called "vote"
- import "vote.sql"
- edit "vote.php" and fill in mssql and mysql
- edit "vote.php" to change values to your own wishes
- Upload vote.php and votenow.php
- go to yousite/votenow.php
Update:
- Total re-write of vote.php
- re-write of time difference
- added anti sql inject
- added java messages
- removed log from mysql
- added check for dshop
- changed date(); format
vote.php :
PHP Code:
<html>
<head>
<title>Vote Now!</title>
<style>
body { background-color: #202020;
color: yellow;
}
</style>
</head>
<body>
<?php
// Report all PHP errors (see changelog)
error_reporting(E_ALL);
//----------------------------------------------------------
// Give X coins
$coins = 25;
// Yout website after vote was successfull
// Add http:// in your list
$webpage = "http://www.google.com";
// Time needed to vote again
// You need to remove 1 minut from the time
// 720 should be 12hours
$time_needed = "719"; // in mintutes
// Insert your MSSQL info here
$mssql = array(
'host' => "YOUR HOST",
'user' => "YOUR USER",
'pass' => "YOUR PASS"
);
// Insert your MYSQL info here
$mysql = array(
'host' => "YOUR HOST",
'user' => "YOUR USER",
'pass' => "YOUR PASS",
'db' => "vote" // Do not change it the DB is vote
);
//---DO NOT EDIT ANYTHING BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING!! ---
$result2 = mssql_query("SELECT * FROM cash.dbo.user_cash WHERE user_no = '".$row1[0]."'",$mslink);
$count_coins = mssql_num_rows($result2);
if($count_coins == '0') {
echo '<SCRIPT LANGUAGE="JavaScript">alert("This account didnt visit the D-shop yet. \n You cannot recive your coins. \n Please login into the server, and visit the D-shop.")</script>';
echo "<script type='text/javascript'>window.location='votenow.php';</script>";
} else {
$result2 = mysql_query("SELECT * FROM users WHERE account = '".$account."' ");
$row2 = mysql_fetch_row($result2);
$count2 = mysql_num_rows($result2);
if (round(abs($to_time - $from_time) / 60,2) > $time_needed) {
$amount = $coins;
mysql_query("UPDATE users SET date = '".$date."' WHERE account = '".$account."' ");
mssql_query("UPDATE cash.dbo.user_cash SET amount = amount+".$amount." WHERE user_no = '".$row1[0]."'",$mslink);
echo '<SCRIPT LANGUAGE="JavaScript">alert("Thank you for you vote!")</script>';
echo "<script type='text/javascript'>window.location='$webpage';</script>";
[Release] Vote 4 Coins (Besseres) (Extern) up to 5 Vote-Sites! 05/12/2020 - Metin2 PServer Guides & Strategies - 83 Replies Liebe Gemeinde, da von Akaja mein Vote 4 Coins Script damals verbotener Weise hier veröffentlicht wurde, werde ich nun meine neue Version direkt publizieren.
Ich weise darauf hin das ich das Script nur anpasse oder Supporte wenn es bei mir gekauft wurde. Sonst habt ihr meinerseits auf keinen Support zu zählen.
Demo
http://bloody-marry.de/test.html
Features
IP Kontrolle
[B] Vote 4 Coins Script (IP & Account Abfrage) bis zu 5 Vote Seiten! (Eigenständig) 10/11/2011 - Metin2 Trading - 2 Replies Ich habe ein Vote System programmiert, bei dem Spieler für Coins voten können. Bis zu 5 Seiten können eingetragen werden (Kann ich beliebig erweitern)
Es wird in einer Datenbank die IP & AccountID gespeichert, somit kann man mit einer IP auch nur einmal Voten und pro Account auch nur einmal auch wenn man die IP resetten sollte.
Somit ist ein Betrug vollkommen ausgeschlossen.
Das Script ist eigenständig und passt somit zu jeder Website!