Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 11:14

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

Advertisement



Hilfe bei Vote script

Discussion on Hilfe bei Vote script within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
Resqu's Avatar
 
elite*gold: 110
Join Date: Jun 2015
Posts: 85
Received Thanks: 22
Hilfe bei Vote script

Hallo habe ein Problemm wenn ich voten will steht bei mir immer andauert

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /var/customers/webs/w259453453/hp/pages/vote4us.php on line 32
versuche ganze zeit zu fixxen aber irgenwie krieg ich es nicht hin könnt ihr mir bitte
helfen der vote script ist hier
hier vote4us
PHP Code:
<?php

/**
 * Vote 4 Coins Script for topliste.*****************
 *
 * Coded by 'ChuckNorris
 *
 * Changelog:
 * 25.07.2014 Add time limit (stop flooding with vote links in skype)
 *
 * @copyright 'ChuckNorris 2014 All rights reserved
 */
 
$DELAY 60 60 24;// Time Limit / f.e. 60 Sekunden * 60 Minuten * 24 Stunden = 24 Stunden (in Sekunden)
$hpDB 'homepage';     

?>
<div style="margin-top: 70px;" class="box">
    <div class="top"></div>
    <div class="middle">
        <h3>Vote4Us</h3>
        <div class="big-line"></div>
        <?
        date_default_timezone_set
('Europe/Berlin'); 
        
$VoteLink "http://www.topliste.*****************/in/2012-test-de.html"// Edit VoteLink
        
$VotePage $VoteLink "?vuid=" $_SESSION['user_id'];        
        
$VoteBonusCoins    2000;

        
        
$CheckVoteLog_SQL "SELECT UNIX_TIMESTAMP(`lastVote`) as lastVote FROM `" $hpDB "`.`v4c` WHERE `aid`='" $vuid "'";
        
$result mysql_query($CheckVoteLog_SQL$sqlHp);
        if(!empty(
$_SESSION["user_id"]) && mysql_num_rows($result) > && mysql_result($result0"lastVote") < time() - $DELAY) {
        
?>
        
        <p class="meldung">
            Du hast bereits gevotet. Du kannst das nächste mal um <? echo date("G:i:s"mysql_result($result0"lastVote") + $DELAY)?> voten. 
        </p>
        
        <?
        
} else if(!empty($_SESSION["user_id"])) {
        
?>

        <p class="meldung">
            Pro Vote erh&aumlltst du <?php echo $VoteBonusCoins;?> Vote-Coins! 
            Missbrauch oder Bugusing wird mit<br>
            einem Bann von allen Account's bestraft!<br />
            <b>Nachdem du gevotet hast kann es bis zu 2 Minuten dauern bis du deine Coins erhälst!</b>
        </p>
        <br>
        <p>Um voten zu können, klicke auf dem folgenden Link: 
            <a href="<?php echo $VotePage?>"><font color="red">Vote!</font></a></p>

        <? } else { ?>
            <p><font color="red">ACHTUNG:</font> Du bekommst nur Vote-Coins, wenn du auch eingeloggt bist!<br>
            <a href="<?php echo $VoteLink;?>"><img style="border: 0px;" src="http://www.topliste.*****************/buttons/vote_8_0.png"/></a></p>
        <?php ?>
    </div>
    <div class="bottom"></div>
</div>
und hier Backend.php

PHP Code:
 <?php

/**
 * Vote 4 Coins Script for topliste.*****************
 *
 * Coded by 'ChuckNorris
 *
 * Changelog:
 * 25.07.2014 Add time limit (stop flooding with vote links in skype)
 *
 * @copyright 'ChuckNorris 2014 All rights reserved
 */

//******************** CONFIGURATION AREA ********************//
 
$DELAY 60 60 24;// Time Limit / f.e. 60 Sekunden * 60 Minuten * 24 Stunden = 24 Stunden (in Sekunden)
$ID='2012';        // Enter side id here
$API_KEY='490a83c23424c1a9684b';   // Enter api key here
$VoteCoins='2000';    // Enter coins to get here

$sqlServ mysql_connect("000000000""root""0000000");
$hpDB 'homepage';      

//****************** END CONFIGURATION AREA *******************//




//***************** DO NOT CHANGE CODE HERE *******************//

$REQUEST='votes';
     
$topl_curl=curl_init();
curl_setopt($topl_curlCURLOPT_URL,
    
'http://www.topliste.*****************/api?id=' urlencode($ID) . '&request=' urlencode($REQUEST) . '&vuid=9999');
curl_setopt($topl_curlCURLOPT_HEADER0);
curl_setopt($topl_curlCURLOPT_RETURNTRANSFER1);
curl_setopt($topl_curlCURLOPT_HTTPHEADER, array('X_APIKEY: ' $API_KEY));
     
$topl_data=curl_exec($topl_curl);
$topl_info=curl_getinfo($topl_curl);
     
if (!
curl_errno($topl_curl))
{
    if (
$topl_info['http_code'] == 200)
    {
        
$Data=json_decode($topl_datatrue);
        foreach(
$Data as $vuid)
        {
            
$CheckVoteLog_SQL "SELECT UNIX_TIMESTAMP(`lastVote`) as lastVote FROM `" $hpDB "`.`v4c` WHERE `aid`='" $vuid "'";
            
$result mysql_query($CheckVoteLog_SQL$sqlServ);
            echo 
mysql_error();
            
$lastVoteTime 0;
            if(
mysql_num_rows($result) == 0) {
                
$AddVoteLog_SQL "INSERT INTO `" $hpDB "`.`v4c`(`aid`, `lastVote`) VALUES('" $vuid "', NOW())";
                
mysql_query($AddVoteLog_SQL);
            } else {
                
$UpdateVoteLog_SQL "UPDATE `" $hpDB "`.`v4c` SET `lastVote`=NOW() WHERE `aid`='" $vuid "'";
                
mysql_query($UpdateVoteLog_SQL);
                
$lastVoteTime mysql_result($result0"lastVote");
            }
                
            if(
$lastVoteTime time() - $DELAY) {
                
$PlayerNewCoins_SQL "UPDATE account.account 
                               SET coins = coins + "
.$VoteCoins.
                               WHERE id = '"
.$vuid."'";
                
mysql_query($PlayerNewCoins_SQL$sqlServ);
            }
        }
    }
}
else
{
    echo 
'Curl error: ' curl_error($topl_curl);
}
curl_close($topl_curl);
?>
Resqu is offline  
Old 10/30/2015, 08:52   #2
 
ChilleXx's Avatar
 
elite*gold: 94
Join Date: Jul 2015
Posts: 91
Received Thanks: 21
hast du den user in der datenbank angelegt und ihm die nötigen rechte gegeben ?
ChilleXx is offline  
Old 10/30/2015, 11:53   #3
 
Fydes's Avatar
 
elite*gold: 534
Join Date: Mar 2014
Posts: 1,614
Received Thanks: 983
Die Tabelle fehlt.
Fydes is offline  
Old 10/30/2015, 23:52   #4
 
Resqu's Avatar
 
elite*gold: 110
Join Date: Jun 2015
Posts: 85
Received Thanks: 22
und wo soll ich es genau anelegen und was denn genau angelegen hab ya diese query Aneglegt

PHP Code:
CREATE TABLE `v4c` (
  `
idint(14NOT NULL AUTO_INCREMENT,
  `
aidint(14) DEFAULT NULL,
  `
lastVotedatetime DEFAULT NULL,
  
PRIMARY KEY (`id`)
); 
hab sogar kategorie angelegt mit v4c und da auch query anegelgt
Resqu is offline  
Old 11/03/2015, 00:10   #5
 
Resqu's Avatar
 
elite*gold: 110
Join Date: Jun 2015
Posts: 85
Received Thanks: 22
Push
Resqu is offline  
Old 11/03/2015, 08:51   #6
 
ChilleXx's Avatar
 
elite*gold: 94
Join Date: Jul 2015
Posts: 91
Received Thanks: 21
schau mal in der tabelle erste zeile wie die liste bei dir heißt und ob sie so heißt wie im script also user_id und ob die datenbank die rechte hat zum schreiben dann die query nochmal ausführen
ChilleXx is offline  
Reply


Similar Threads Similar Threads
Hilfe bitte mit vote script
03/27/2015 - Metin2 Private Server - 9 Replies
Hallo kann mir helfen das umzuschreiben wenn man votet bekommt man item ins lager das soll aber coins auf konto gutschreiben der code ist public function __construct() { $connect = mysql_connect($this->config, $this->config, $this->config); if(!$connect) die(mysql_error()); $db = mysql_select_db($this->config, $connect); if(!$db)
Hilfe bitte bei vote script
03/26/2015 - Metin2 Private Server - 2 Replies
Hilfe bitte mit vote script Hallo kann mir helfen das umzuschreiben wenn man votet bekommt man item ins lager das soll aber coins auf konto gutschreiben der code ist public function __construct() { $connect = mysql_connect($this->config, $this->config, $this->config); if(!$connect)
[HILFE]Vote Script von .Tobias
05/19/2014 - Metin2 Private Server - 1 Replies
Hey ich habe mir dieses Vote script geholt: http://www.elitepvpers.com/forum/metin2-pserver-g uides-strategies/2499487-release-vote4coins-mit-pr -fung.html und alles eingestellt (APi key usw.) aber immer wenn ich auf voten gehe, steht auf meiner Homepage, dass ich nicht eingeloggt bin
Vote Script [Hilfe]
08/20/2013 - Web Development - 7 Replies
Hallo Com, ich bin heute schon den ganzen Tag am Zweifeln meiner Künste in PHP. Mein Vote Script klappt nicht. Ich hab ehrlich gesagt auch momentan keine Ahnung wie ich das eigentlich realisieren soll, aber hab ma was geschrieben. Wo liegt der Fehler ? :D 1.php
[Metin2] Vote Script (Hilfe)
02/17/2013 - Metin2 Private Server - 8 Replies
Haiho broo :D Habe gestern ein Vote Script bekommen für mein Server. Nur habe echt 0 Plan wie ich den rein machen soll ? Die 3 Daten sind in den Ornder drine : http://img4.fotos-hochladen.net/uploads/ggggggggg gg49m1b2ws0u.png Die Vote.php is klar soll ins webspace in page ornder. und die anderen datin wohin ? :O



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