Register for your free account! | Forgot your password?

You last visited: Today at 23:14

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

Advertisement



Vote Problem

Discussion on Vote Problem within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Nov 2012
Posts: 155
Received Thanks: 6
Exclamation Vote Problem

Hay leute, hab ein Problem mit dem Vote system. Das sind alle dateien die ich in meiner Hp installiert habe;


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>
und:
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>
was ist daran falsch, oder besser gesagt wohin muss der letzt Code?

Danke!
MrPlugin is offline  
Old 12/22/2012, 01:06   #2



 
elite*gold: 0
The Black Market: 264/0/0
Join Date: Jul 2012
Posts: 24,494
Received Thanks: 3,215
Was für ein Problem?
Sintiax is offline  
Old 12/22/2012, 03:16   #3
 
Anonyme™'s Avatar
 
elite*gold: 310
Join Date: May 2011
Posts: 1,592
Received Thanks: 105
Guten Abend,
Was für ein Problem gibt es den?
B.z.w was Funktioniert bei dem Script nicht?

MFG
Easy-Games
Anonyme™ is offline  
Old 12/23/2012, 20:11   #4
 
elite*gold: 0
Join Date: Nov 2012
Posts: 155
Received Thanks: 6
Ja also nachdem Voten wird man 1. nicht weitergeleitet, 2. der Vote komm nicht in die Top-Liste

und wohin muss der Scrip, hab den noch nicht in mein Server drinnen
MrPlugin is offline  
Old 12/23/2012, 21:48   #5
 
elite*gold: 0
Join Date: Nov 2012
Posts: 160
Received Thanks: 16
Hast du deine Daten reingeschreiben Navicat Password usw.?
.Flammini™ is offline  
Old 12/23/2012, 22:07   #6
 
elite*gold: 0
Join Date: Nov 2012
Posts: 155
Received Thanks: 6
Hab hab ich, hab nur den Scrip noch nicht im Server, und weis auch nicht wohin damit...
MrPlugin is offline  
Reply


Similar Threads Similar Threads
Vote Problem
10/09/2012 - Metin2 Private Server - 6 Replies
Hallo meine Freunde, ich habe auf einem neuen P Server angefangen und da kann man pro IP nur 1x voten. So, nun habe ich dieses midemyass da benutzt, aber wenn ich mich einloggen möchte auf der Homepage von dem Server, geht das. Dann drücke ich Vote 4 Coins, dann loggt der sich automatisch wieder aus ô.ô Dann steht da mal wieder: Das Voten steht nur angemeldeten Spielern zur verfügung... So, wie kann ich einstellen, dass er jedes mal seine IP ändert + sich ned beim Voten ausloggt? Ich...
Vote NPC Problem.
08/26/2012 - CO2 Private Server - 2 Replies
Well, I've been trying to make that npc works perfectly for hours but it doesn't.. If you click on Sure! it goes directly on Sorry but you already voted. Please wait 12 hours! without giving CPs neither opening the site. If someone can tell me what's wrong in the code, That'd help me^^ Thanks =) #region Vote npc case 4466: { switch (npcRequest.OptionID) { ...
Problem mit VOTE Button PLS HELP
04/22/2011 - Metin2 Private Server - 0 Replies
Hey Leute wollte den Vote Button auf meiner Baukasten hp machen. aber i-wie geht das nicht ich hab ein CSS design das Ultimate liegts vllt daran? wäre echt nett von euch wenn ihr mir helfen könnt.



All times are GMT +2. The time now is 23: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.