Register for your free account! | Forgot your password?

You last visited: Today at 06:14

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

Advertisement



Vote 4 coins bug?

Discussion on Vote 4 coins bug? within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: May 2012
Posts: 300
Received Thanks: 34
Vote 4 coins bug?

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?
abcdosentee is offline  
Old 08/04/2013, 20:43   #2
 
elite*gold: 0
Join Date: Nov 2009
Posts: 3,260
Received Thanks: 1,023
Ich würde dir es nicht empfehlen da dies mysql Lücken hat.
RandomName42 is offline  
Old 08/04/2013, 20:53   #3

 
elite*gold: 0
The Black Market: 160/0/0
Join Date: May 2012
Posts: 7,283
Received Thanks: 822
Nimm ein Standart Vote 4 Coins System von irgendeiner anderen Homepage.
Ielinque is offline  
Old 08/04/2013, 21:09   #4
 
elite*gold: 0
Join Date: May 2012
Posts: 300
Received Thanks: 34
Quote:
Originally Posted by iBecquerel View Post
Nimm ein Standart Vote 4 Coins System von irgendeiner anderen Homepage.
woher bekommt man das o: ?
abcdosentee is offline  
Old 08/04/2013, 21:11   #5

 
elite*gold: 0
The Black Market: 160/0/0
Join Date: May 2012
Posts: 7,283
Received Thanks: 822
Lad dir irgendeine HP runter. Dabei findest du ein Vote 4 Coins Script, bei den meisten jedenfalls, wenn nicht dann benutz einfach die SUFU.
Ielinque is offline  
Old 08/04/2013, 21:12   #6
 
elite*gold: 0
Join Date: May 2012
Posts: 300
Received Thanks: 34
Quote:
Originally Posted by iBecquerel View Post
Lad dir irgendeine HP runter. Dabei findest du ein Vote 4 Coins Script, bei den meisten jedenfalls, wenn nicht dann benutz einfach die SUFU.
sufu finde ich nichts... kannst du mir eins empfehlen?
abcdosentee is offline  
Old 08/04/2013, 21:16   #7

 
elite*gold: 0
The Black Market: 160/0/0
Join Date: May 2012
Posts: 7,283
Received Thanks: 822
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!! --- 
         
        
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']); 
        
$mylink mysql_Connect($mysql['host'], $mysql['user'], $mysql['pass']); 
        
mysql_select_db($mysql['db'],$mylink);  
        
$ip getenv("REMOTE_ADDR"); 
        
$httpref getenv ("HTTP_REFERER"); 
        
$httpagent getenv ("HTTP_USER_AGENT"); 
        
$account clean($_POST['account']); 
        
$date date("Y-m-d G:i"); 
         
        if (empty(
$account)){ 
         
            echo 
'<SCRIPT LANGUAGE="JavaScript">alert("You didnt enter a account name! \n Please try again.")</script>'
            echo 
"<script type='text/javascript'>window.location='votenow.php';</script>"

             
        } elseif(!
preg_match("/[0-9a-zA-Z]?/"$account)) { 
         
            echo 
'<SCRIPT LANGUAGE="JavaScript">alert("Incorrect account name format. \n Please try again.")</script>'
            echo 
"<script type='text/javascript'>window.location='votenow.php';</script>"

             
        } else { 
             
            
$result1 mssql_query("SELECT * FROM account.dbo.user_profile WHERE user_id = '".$account."'",$mslink); 
            
$count1 mssql_num_rows($result1); 
            
$row1 mssql_fetch_row($result1); 
             
            if(
$count1 == '0') { 
             
                echo 
'<SCRIPT LANGUAGE="JavaScript">alert("Account not found. \n Please try again.")</script>'
                echo 
"<script type='text/javascript'>window.location='votenow.php';</script>"

                 
            } else {  

                
$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(
$count2 == 1){ 
                             
                        
$voted_ip $row2[2]; 
                        
$voted_date $row2[3]; 
                        
$voted_id $row2[0]; 
                        
$voted_account $row2[1]; 
                        
$to_time strtotime($voted_date); 
                        
$from_time strtotime($date); 
                     
                        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>"
                                         
                        } else { 
                         
                            echo 
'<SCRIPT LANGUAGE="JavaScript">alert("You cant vote anymore! \n Please try again later.")</script>'
                            echo 
"<script type='text/javascript'>window.location='votenow.php';</script>"

                        } 
                         
                    } else { 
                        
$amount $coins;     
                        
$sql4 mysql_query("INSERT INTO users (account,ip,date) VALUES ('".$account."','".$ip."','".$date."' ) "); 
                        
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>";
     
                    } 
                }     
            } 
        } 
        
mysql_close($mylink); 
        
mssql_close($mslink); 
        
?> 
    </body> 
</html>
votenow.php :
PHP Code:
<html
    <
head
        <
meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
        <
titlevote for coins</title
        <
style type="text/css"
            
div#container 
            

               
width350px
               
positionrelative
               
margin-top0px
               
margin-leftauto
               
margin-rightauto
               
text-alignleft
            } 
            
body 
            

               
text-aligncenter
               
margin0
            } 
        </
style
    </
head
    <
body bgcolor="#202020" text="#FFD700"
        <
div id="wb_Text1" style="position:absolute;left:10px;top:120px;width:240px;height:14px;z-index:0;" align="left"
            <
font style="font-size:11px" color="#ffffff" face="Arial">You can vote every 12 hours1 vote 25 coins</font
        </
div
                        <
img src="http://www.xtremeTop100.com/votenew.jpg" border="0" alt="Dekaron Servers" style="position:absolute;left:250px;top:34px; > 
        <div id="
container"> 
            <div id="
wb_Form1" style="position:absolute;left:0px;top:0px;width:239px;height:135px;z-index:3;" align="left"> 
                   <form name="
Form1" method="post" action="vote.php" id="Form1"> 
                        <div id="
wb_Text1" style="position:absolute;left:10px;top:15px;width:78px;height:14px;z-index:0;" align="left"> 
                            <font style="
font-size:11px" color="#FFD700" face="Arial">Account name:</font></div> 
                        
<input type="text" id="Editbox1" style="position:absolute;left:10px;top:34px;width:200px;font-family:Courier New;font-size:16px;z-index:1" name="account" value=""
                        <
input type="submit" id="Button1" name="Button1" value="Vote" style="position:absolute;left:10px;top:65px;width:96px;height:25px;font-family:Arial;font-size:13px;z-index:2"
                    </
form
                </
div
            </
div
        </
div
    </
body
</
html
vote.sql :
PHP Code:
SET FOREIGN_KEY_CHECKS=0

SET FOREIGN_KEY_CHECKS=0
DROP TABLE IF EXISTS `users`; 
CREATE TABLE `users` ( 
  `
idbigint(11NOT NULL auto_increment
  `
accountvarchar(30) default NULL
  `
ipvarchar(30) default NULL
  `
datedatetime default NULL
  
PRIMARY KEY  (`id`) 
ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=latin1
Ielinque is offline  
Thanks
1 User
Old 08/04/2013, 21:18   #8
 
elite*gold: 0
Join Date: May 2012
Posts: 300
Received Thanks: 34
Quote:
Originally Posted by iBecquerel View Post
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!! --- 
         
        
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']); 
        
$mylink mysql_Connect($mysql['host'], $mysql['user'], $mysql['pass']); 
        
mysql_select_db($mysql['db'],$mylink);  
        
$ip getenv("REMOTE_ADDR"); 
        
$httpref getenv ("HTTP_REFERER"); 
        
$httpagent getenv ("HTTP_USER_AGENT"); 
        
$account clean($_POST['account']); 
        
$date date("Y-m-d G:i"); 
         
        if (empty(
$account)){ 
         
            echo 
'<SCRIPT LANGUAGE="JavaScript">alert("You didnt enter a account name! \n Please try again.")</script>'
            echo 
"<script type='text/javascript'>window.location='votenow.php';</script>"

             
        } elseif(!
preg_match("/[0-9a-zA-Z]?/"$account)) { 
         
            echo 
'<SCRIPT LANGUAGE="JavaScript">alert("Incorrect account name format. \n Please try again.")</script>'
            echo 
"<script type='text/javascript'>window.location='votenow.php';</script>"

             
        } else { 
             
            
$result1 mssql_query("SELECT * FROM account.dbo.user_profile WHERE user_id = '".$account."'",$mslink); 
            
$count1 mssql_num_rows($result1); 
            
$row1 mssql_fetch_row($result1); 
             
            if(
$count1 == '0') { 
             
                echo 
'<SCRIPT LANGUAGE="JavaScript">alert("Account not found. \n Please try again.")</script>'
                echo 
"<script type='text/javascript'>window.location='votenow.php';</script>"

                 
            } else {  

                
$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(
$count2 == 1){ 
                             
                        
$voted_ip $row2[2]; 
                        
$voted_date $row2[3]; 
                        
$voted_id $row2[0]; 
                        
$voted_account $row2[1]; 
                        
$to_time strtotime($voted_date); 
                        
$from_time strtotime($date); 
                     
                        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>"
                                         
                        } else { 
                         
                            echo 
'<SCRIPT LANGUAGE="JavaScript">alert("You cant vote anymore! \n Please try again later.")</script>'
                            echo 
"<script type='text/javascript'>window.location='votenow.php';</script>"

                        } 
                         
                    } else { 
                        
$amount $coins;     
                        
$sql4 mysql_query("INSERT INTO users (account,ip,date) VALUES ('".$account."','".$ip."','".$date."' ) "); 
                        
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>";
     
                    } 
                }     
            } 
        } 
        
mysql_close($mylink); 
        
mssql_close($mslink); 
        
?> 
    </body> 
</html>
votenow.php :
PHP Code:
<html
    <
head
        <
meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
        <
titlevote for coins</title
        <
style type="text/css"
            
div#container 
            

               
width350px
               
positionrelative
               
margin-top0px
               
margin-leftauto
               
margin-rightauto
               
text-alignleft
            } 
            
body 
            

               
text-aligncenter
               
margin0
            } 
        </
style
    </
head
    <
body bgcolor="#202020" text="#FFD700"
        <
div id="wb_Text1" style="position:absolute;left:10px;top:120px;width:240px;height:14px;z-index:0;" align="left"
            <
font style="font-size:11px" color="#ffffff" face="Arial">You can vote every 12 hours1 vote 25 coins</font
        </
div
                        <
img src="http://www.xtremeTop100.com/votenew.jpg" border="0" alt="Dekaron Servers" style="position:absolute;left:250px;top:34px; > 
        <div id="
container"> 
            <div id="
wb_Form1" style="position:absolute;left:0px;top:0px;width:239px;height:135px;z-index:3;" align="left"> 
                   <form name="
Form1" method="post" action="vote.php" id="Form1"> 
                        <div id="
wb_Text1" style="position:absolute;left:10px;top:15px;width:78px;height:14px;z-index:0;" align="left"> 
                            <font style="
font-size:11px" color="#FFD700" face="Arial">Account name:</font></div> 
                        
<input type="text" id="Editbox1" style="position:absolute;left:10px;top:34px;width:200px;font-family:Courier New;font-size:16px;z-index:1" name="account" value=""
                        <
input type="submit" id="Button1" name="Button1" value="Vote" style="position:absolute;left:10px;top:65px;width:96px;height:25px;font-family:Arial;font-size:13px;z-index:2"
                    </
form
                </
div
            </
div
        </
div
    </
body
</
html
vote.sql :
PHP Code:
SET FOREIGN_KEY_CHECKS=0

SET FOREIGN_KEY_CHECKS=0
DROP TABLE IF EXISTS `users`; 
CREATE TABLE `users` ( 
  `
idbigint(11NOT NULL auto_increment
  `
accountvarchar(30) default NULL
  `
ipvarchar(30) default NULL
  `
datedatetime default NULL
  
PRIMARY KEY  (`id`) 
ENGINE=MyISAM AUTO_INCREMENT=33 DEFAULT CHARSET=latin1
danke thanks hast du haue es dann mal rein ._.
abcdosentee is offline  
Old 08/04/2013, 21:27   #9

 
elite*gold: 0
The Black Market: 160/0/0
Join Date: May 2012
Posts: 7,283
Received Thanks: 822
Quote:
Originally Posted by abcdosentee View Post
danke thanks hast du haue es dann mal rein ._.
Okay Viel glück.
Ielinque is offline  
Old 08/05/2013, 02:54   #10
 
elite*gold: 1
Join Date: Jan 2013
Posts: 318
Received Thanks: 165
Ich hatte nun keine Lust die anderen Kommentare durchzulesen & antworte dir
nun mal "Frei-Schnauze" - Nimm ein Standart bzw. ein anderes Vote System!

Eines, wo man sich sicher sein kann das es zu 100% Funktionstüchtig ist.
Bookmark_ is offline  
Reply


Similar Threads Similar Threads
[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!



All times are GMT +2. The time now is 06:14.


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.