Hilfe beim voten for ap

06/26/2013 05:53 KF-Pitbull1978#1
Moin zusammen


ich habe volgendes problehm . Und zwar wenn ich für meinen Server voten möchte beckomme ich keine 12h ip Spere das heißt ich kann jede minute voten und beckome dafür auch ap kann mir da einer helfen das zu ändern ??

PHP Code:
        //---------------------------------------------------------- 
        // Give X coins
        // Dont forget to change this in votenow.php
        
$Point 1;
        
        
// Yout website after vote was successfull
        // Add http:// in your list
        
$votesite "http://topofgames.com/index.php?do=votes&id=36301";
        
        
// Time needed to vote again
        // You need to remove 1 minut from the time
        // 720 should be 12hours
        // Dont forget to change this in votenow.php
        
$time_needed "720"// in mintutes
        
        
        // Insert your MSSQL info here 


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);
        
error_reporting(0);
        
        
// for gedimazs
        
        
include ("config.php");
        
                        
        
//---DO NOT EDIT ANYTHING BELOW HERE UNLESS YOU KNOW WHAT YOU ARE DOING!! ---
        
        
function clean($str){
            return 
is_array($str) ? array_map('clean'$str) : str_replace("\\""\\\\"htmlspecialchars((get_magic_quotes_gpc() ? stripslashes($str) : $str), ENT_QUOTES));
        }

          
        
$mslink mssql_connect($mssql['host'],$mssql['user'],$mssql['pass']);
        
$ip $_SERVER['REMOTE_ADDR'] ;
        
$UserID clean($_POST['UserID']);
        
$date date("Y-m-d G:i");
        
        if (empty(
$UserID)){
        
            echo 
'<SCRIPT LANGUAGE="JavaScript">alert("Du hast keinen Account Namen angegeben! \n Bitte versuche es erneut.")</script>';
            echo 
"<script type='text/javascript'>window.location='votenow.php';</script>";
            exit();

            
        } elseif(!
preg_match("/[0-9a-zA-Z]?/"$UserID)) {
        
            echo 
'<SCRIPT LANGUAGE="JavaScript">alert("Falsches Format des Account Namen. \n Bitte versuche es erneut.")</script>';
            echo 
"<script type='text/javascript'>window.location='votenow.php';</script>";
            exit();

            
        } else {
            
            
$result1 mssql_query("SELECT * FROM PS_UserData.dbo.Users_Master WHERE UserID= '".$UserID."' ",$mslink);
            
$count1 mssql_num_rows($result1);
            
$row1 mssql_fetch_row($result1);
            
            
            
            if(
$count1 == '0') {
            
                echo 
'<SCRIPT LANGUAGE="JavaScript">alert("Account nicht Gefunden. \n Bitte versuche es erneut.")</script>';
                echo 
"<script type='text/javascript'>window.location='votenow.php';</script>";
                exit();


            } else {
            
            
            
                
                    
// he visted the dshop.. contiue
                    // found account found in votes, get his info
                    
$result2 mssql_query("SELECT * FROM PS_UserData.dbo.USER_VOTES WHERE UserID = '".$UserID."' ",$mslink);
                    
$row2 mssql_fetch_row($result2);
                    
$count2 mssql_num_rows($result2);
                    
                    
                    
$voted_ip $row2[2];
                    
$voted_date $row2[3];
                    
$voted_id $row2[0];
                    
$voted_UserID $row2[1];
                    
$to_time strtotime($voted_date);
                    
$from_time strtotime($date);
                    
                    
//
                    
if($count2 == 1){
                    
//i found account in votes
                    
                    
                        // check if time has expired
                        
if (round(abs($to_time $from_time) / 60,2) > $time_needed) {
                        
// time expired,delete his info and add new one
                            
$Point $Point;    
                            
                            
mssql_query("DELETE FROM PS_UserData.dbo.user_votes WHERE UserID = '".$row1[1]."'",$mslink);
                            
mssql_query("INSERT INTO PS_UserData.dbo.user_votes (UserID,ip,date) VALUES ('".$UserID."','".$ip."','".$date."' ) ",$mslink);        
                            
mssql_query("UPDATE PS_UserData.dbo.Users_Master SET Point = Point+".$Point." WHERE UserID = '".$row1[2]."'",$mslink);    
                            echo 
'<SCRIPT LANGUAGE="JavaScript">alert("Danke für dein Vote bei xxx-xxxx!")</script>';
                            echo 
"<script type='text/javascript'>window.location='$votesite';</script>";
                            exit();
                        
                        } else { 
                        
// time not expired
                            
echo '<SCRIPT LANGUAGE="JavaScript">alert("Du kannst nicht mehr Voten! \n Voting Zeit noch nicht abgelaufen. \n Bitte Versuche es später noch einmal.")</script>';
                            echo 
"<script type='text/javascript'>window.location='votenow.php';</script>";
                            exit();
                            
                        }
                            
                            
                            
                    } else {
                    
                        
// check is new account have voted IP
                        
$result3 mssql_query("SELECT * FROM PS_UserData.dbo.user_votes WHERE ip = '".$ip."' ",$mslink);
                        
$count3 mssql_num_rows($result3);
                    
                        
                        if(
$count3 == 1){
                            
                            echo 
'<SCRIPT LANGUAGE="JavaScript">alert("Du kannst mit dieser IP nicht mehr Voten! \n Bitte warte bis die Zeit abgelaufen ist.")</script>';
                            echo 
"<script type='text/javascript'>window.location='votenow.php';</script>";
                            exit();

                        } else {
                            
                            
$Point $Point;    
                            
mssql_query("INSERT INTO PS_UserData.dbo.user_votes (UserID,ip,date) VALUES ('".$UserID."','".$ip."','".$date."' ) ",$mslink);
                            
mssql_query("UPDATE PS_UserData.dbo.Users_Master SET Point = Point+".$Point." WHERE UserID = '".$UserID."'",$mslink);            
                            echo 
'<SCRIPT LANGUAGE="JavaScript">alert("Danke für dein Vote bei xxxx-xxxx!")</script>';
                            echo 
"<script type='text/javascript'>window.location='$votesite';</script>";
                            exit();
                            
                        }
                        
                        
                    }
                }
            }
        
        
mssql_close($mslink);
        
?>
    </body>
</html>
01/08/2018 18:56 RapSandy#2
Du musst die SQL seite einbinden wie es im Php-Code steht :)
01/08/2018 19:04 {Skrillex}#3
Das Vote Script ist sowieso scheiße. Schreib mir ne PN wenn du interesse an einem Vernünfitgen Script hast.

Grüße