Register for your free account! | Forgot your password?

You last visited: Today at 20:43

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Hilfe beim voten for ap

Discussion on Hilfe beim voten for ap within the Shaiya PServer Development forum part of the Shaiya Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jul 2009
Posts: 19
Received Thanks: 1
Hilfe beim voten for ap

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>
KF-Pitbull1978 is offline  
Old 01/08/2018, 18:56   #2
 
elite*gold: 0
Join Date: Oct 2011
Posts: 78
Received Thanks: 4
Du musst die SQL seite einbinden wie es im Php-Code steht
RapSandy is offline  
Old 01/08/2018, 19:04   #3

 
{Skrillex}'s Avatar
 
elite*gold: 0
Join Date: Mar 2013
Posts: 849
Received Thanks: 407
Das Vote Script ist sowieso scheiße. Schreib mir ne PN wenn du interesse an einem Vernünfitgen Script hast.

Grüße
{Skrillex} is offline  
Reply


Similar Threads Similar Threads
Beim voten den POST-Parameter manipulieren
06/01/2013 - Metin2 Private Server - 4 Replies
Liebe Community, ich habe ein kleines Problem. Ein User hat behauptet (nachdem wir ihn darauf angesprochen hat, woher er Coins im Wert von knapp 125€ hatte), wie ihr sie bekommen hat. Natürlich hat er erst alles abgestritten, nun aber zugegeben - nachdem wir ihn auf den POST-Parameter angesprochen haben - , dass dieser änderbar ist. Nur wissen wir leider nicht, wie: vote.php (Original, wie wir sie gedownloadet haben): <?php // Einstellungen $dbhost = 'localhost'; //mySQL IP...
[Hilfe]Bräuchte Hilfe beim Metin2 Board Design erstellen
05/24/2013 - Metin2 Private Server - 1 Replies
Hey Ja ich hab ein neues Metin2 Board Design erstellt, und müsste noch ein paar kleinigkeiten anpassen. Wie zB diese Textbox. http://i.epvpimg.com/hGk6e.jpg Wie man sieht, sieht man nix :D Darum müsste ich einen Rahmen um den Kasten machen.
[HILFE]Server an / Client : Fehler beim Verbinden...Schnelle hilfe!
02/12/2013 - Metin2 Private Server - 2 Replies
Hallo , gestern kam ich noch super auf den Server aber jetzt komme ich nichtmehr per client rein , Server ist soweit on , starten tut er auch ohne fehler , kennt jemand eine lösung? Es ist ein root server.
metin2 Hilfe bitte mit voten
01/01/2013 - Metin2 Private Server - 2 Replies
hallo ich ein ein foldgende fehler meldung ich weiss nicht wie ich es hin bekomme aber ich hab auch schon nach tuts gesucht aber hilft mir grad auch nicht weiter deswegen wolte ich mal hier fragen wäre cool wenn ihr mir helfen könnt die fehler meldung ist das hier soo und das die vote php kommt jetzt auch
[Hilfe]Brauche Hilfe kann mir wer beim Tool fixxen helfen
10/12/2010 - Metin2 Private Server - 3 Replies
Hallo E*pvp Ich brauche drigend Hilfe beim Fixxen Von dem Server hack Tool Ich hoffe es ist jemand so nett und hilft mir PS: Es ist ein Root Server. Mfg Sonnylein



All times are GMT +2. The time now is 20:43.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.