Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 09:30

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

Advertisement



Vote System Problem

Discussion on Vote System Problem within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2010
Posts: 37
Received Thanks: 2
Thumbs down Vote System Problem

Hello we have a Problem
We have a Vote Script 4 our Game.


So if the users vote they become an error :

Array ( [result] => Unter dieser Variable existiert kein Vote [count] => 0 )
Du hast noch nicht gevotet!

(Votefenster ausversehen geschlossen?)


We have a script like this but with other account dates :


<?php
class Vote {
var $config = array(

/////////////////////////////////////////

// BITTE HIER ALLE DATEN ANPASSEN

// Wie Viel Coins bekommt man fürs Voten ?
'coins' => 300,

// Account Daten von *******************
'id' => 'deine account id',
'email' => 'e-mail vom account',

// Vote-User Variable Info:
// Falls nicht das MT2GS CMS von hen! verwendet wird, muss nur "$_SESSION['user_id']" überall verändert werden.


/////////////////////////////////////////


);
public function do_vote() {
$url = 'http://api.*******************/API.php?ID=' . $this->config['id'] . '&email=' . $this->config['email'] . '&name=' . $_SESSION['user_id'];
$topl_curl = curl_init();
curl_setopt($topl_curl, CURLOPT_URL, $url);
curl_setopt($topl_curl, CURLOPT_HEADER, 0);
curl_setopt($topl_curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($topl_curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11');
$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 = json_decode($topl_data, true);
if ($data_json['count'] == '0') {
echo '<div class="meldung"><b>Du hast noch nicht gevotet!</b><br/><br/><small>(<a href="https://www.*******************/vote.htm?id=' . $this->config['id'] . '&name=' . $_SESSION['user_id'] . '" target="_blank">Votefenster ausversehen geschlossen?</a>)</small></div>';
} elseif ($data_json['result']['count'] == '0') {
echo '<div class="meldung"><b>Du hast noch nicht gevotet!</b><br/><br/><small>(<a href="https://www.*******************/vote.htm?id=' . $this->config['id'] . '&name=' . $_SESSION['user_id'] . '" target="_blank">Votefenster ausversehen geschlossen?</a>)</small></div>';
} elseif ($data_json['result']['status'] == '2') {
echo '<div class="meldung"><b>Du hast bereits gevotet! Du kannst nur alle 24 Stunden voten.</b></div>';
} elseif ($data_json['result']['status'] == '0') {
echo '<div class="meldung"><b>Du hast noch nicht gevotet!</b><br/><br/><small>(<a href="https://www.*******************/vote.htm?id=' . $this->config['id'] . '&name=' . $_SESSION['user_id'] . '" target="_blank">Votefenster ausversehen geschlossen?</a>)</small></div>';
} elseif ($data_json['result']['status'] == '1') {
$okurl = 'http://api.*******************/callback.php?ID=' . $this->config['id'] . '&name=' . $_SESSION['user_id'];
$oktopl_curl = curl_init();
curl_setopt($oktopl_curl, CURLOPT_URL, $okurl);
curl_setopt($oktopl_curl, CURLOPT_HEADER, 0);
curl_setopt($oktopl_curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($oktopl_curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11');
$oktopl_data = curl_exec($oktopl_curl);
$oktopl_info = curl_getinfo($oktopl_curl);
if (!curl_errno($oktopl_curl) && $oktopl_info['http_code'] == 200) {
$okdata_json = json_decode($oktopl_data, true);

if ($okdata_json['response'] == 'OK') {
echo '<div class="ok"><b>Danke fürs Voten, dir wurden ' . $this->config['coins'] . ' Coins gutgeschrieben.</b></div>';
mysql_query("UPDATE account.account SET `coins` = (`coins` + " . $this->config['coins'] . ") WHERE `id` LIKE '" . $_SESSION['user_id'] . "' LIMIT 1;");
} else {
echo '<div class="meldung"><b>Du hast bereits gevotet! Du kannst nur alle 24 Stunden voten.</b></div>';
}
} else {
echo 'Fehler: API URL kann nicht erreicht werden.';
}
}
} else {
echo 'Fehler: API URL kann nicht erreicht werden.';
}
} else {
echo 'Fehler: cURL scheint nicht installiert zu sein oder richtig zu funktionieren.';
}
curl_close($topl_curl);
curl_close($oktopl_curl);
}

public function vote_forms() {
if (!isset($_POST['submit'])) {
if (empty($_SESSION['user_id'])) {
echo '<div class="meldung"><b>Es wurde keine Vote-User Variable übergeben. Bitte wende dich an den Admin.</b></div>';
echo '<br>Powered by <a target="_blank" href="https://www.*******************">*******************</a>';
return;
}
echo '<div class="meldung" style="font-weight: bold;">Du bekommst jeden Tag Coins für deinen Vote!<br />Das Voten mit mehreren Accounts wird mit einer Account-Sperre bestraft.<br />Die Coins werden erst nach dem Voten gutgeschrieben.<br></div>
<br><form id="form" method="post" action="" onsubmit="votepopup(\'' . 'https://www.*******************/vote.htm?id=' . $this->config['id'] . '&name=' . $_SESSION['user_id'] . '\'); return false;">
<input type="submit" name="submit" id="button" value="Jetzt voten!" style="background:red;border-radius:4px;width:200px;margin:0 auto;color:#FFFFFF;font-weight:bold"/>
</form><br>Powered by <a target="_blank" href="https://www.*******************">*******************</a>';
} else {
$this->do_vote();
}
}
public function cut_str($str, $left, $right) {
$str = substr(stristr($str, $left), strlen($left));
$leftLen = strlen(stristr($str, $right));
$leftLen = $leftLen ? -($leftLen) : strlen($str);
$str = substr($str, 0, $leftLen);
return $str;
}
}

$vote = new Vote();
$vote->vote_forms();

?>
<div class="con-mid">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
function votepopup(url) {
$("#button").val("Ich bin fertig mit voten!");
$("#form").attr("onsubmit","")
fenster = window.open(url, "Vote4Coins", "width=1150,height=750,status=yes,scrollbars=yes,r esizable=yes");
fenster.focus();
}
</script>
</div>
<div class="con-bot"></div>






Can someone help me ?
mista961 is offline  
Old 09/01/2016, 21:11   #2
 
Hyukisawa's Avatar
 
elite*gold: 133
Join Date: May 2007
Posts: 506
Received Thanks: 194
Ich bin zwar nicht in dem Thema drin, was Vote4Coins und Metin2 angeht aber es scheint als würde die API dir zurück geben das "Unter dieser Variable kein Vote existiert".

Ich kann mir das mal angucken, kann dir aber nichts versprechen.

PS: Schreib mir einfach ne PN, wo wir reden können.
PPS: Du kannst auch den Besitzer der API anschreiben, die Domain steht ja im Script. Die haben auch ein Forum.
Hyukisawa is offline  
Old 09/02/2016, 14:12   #3


 
False's Avatar
 
elite*gold: 0
The Black Market: 243/0/0
Join Date: Apr 2011
Posts: 11,115
Received Thanks: 2,436
Quote:
Originally Posted by Hyukisawa View Post
Ich bin zwar nicht in dem Thema drin, was Vote4Coins und Metin2 angeht aber es scheint als würde die API dir zurück geben das "Unter dieser Variable kein Vote existiert".

Ich kann mir das mal angucken, kann dir aber nichts versprechen.

PS: Schreib mir einfach ne PN, wo wir reden können.
PPS: Du kannst auch den Besitzer der API anschreiben, die Domain steht ja im Script. Die haben auch ein Forum.
Er stellt die Frage in englisch und du antwortest in Deutsch ?

@mista
Quote:
'id' => 'deine account id',
'email' => 'e-mail vom account',
I think this is your problem
False is offline  
Old 09/02/2016, 15:34   #4
 
Hyukisawa's Avatar
 
elite*gold: 133
Join Date: May 2007
Posts: 506
Received Thanks: 194
Quote:
Originally Posted by .ƒaℓsє. View Post
Er stellt die Frage in englisch und du antwortest in Deutsch ?
Schließlich spricht er Deutsch (wenn man seine anderen posts betrachtet )

Quote:
Originally Posted by .ƒaℓsє. View Post
I think this is your problem
Quote:
Originally Posted by mista
We have a script like this but with other account dates
Ich denke mal das war auf die Account Daten bezogen :'D
aber ich befürchte auch das die Daten falsch sind die da eingesetzt worden.
Hyukisawa is offline  
Old 09/04/2016, 17:16   #5
 
elite*gold: 0
Join Date: Oct 2010
Posts: 37
Received Thanks: 2
Also die Daten die man dort eingeben muss sind im Script schon eingegeben welches ich verwende habe nur zum Schutz meiner Daten dieses Standart Script geschickt.
mista961 is offline  
Old 09/04/2016, 20:32   #6
 
elite*gold: 0
Join Date: May 2015
Posts: 700
Received Thanks: 444
Quote:
// Falls nicht das MT2GS CMS von hen! verwendet wird, muss nur "$_SESSION['user_id']" überall verändert werden.
Was ist damit? Ist $_SESSION['user_id'] entsprechend gesetzt?
algernong is offline  
Reply


Similar Threads Similar Threads
[Vote] Last Chaos - Neues System (PvE/PvP) incl. Vote & Discuss
07/04/2014 - Last Chaos - 6 Replies
Guten Abend ePvP'ers, wir spiele derzeit mit dem gedanken ein neues PvE-/PvP-System umzusetzten für einen Neuen oder Vorhanden Server, hierzu brauch ich eure Hilfe. Eure meinung ist uns Wichtig denn anhand der Abstimmung & Diskussion entscheiden wir ob wir das ganze Entwickeln und in welcher form wir das Anbieten. Das System Custom Zeug ist bei LC nichts neues und gibt es derzeit zugenügend jedoch alle in die selbe Richtung sprich Map-Editing, EQ-Editing und einige auch...
[Guide] Vote abuse for any private server with vote reward system
08/12/2011 - Off Topic - 3 Replies
I do not know if this is the right place to post this @_@ Source : http://tachael.vacau.com/Thread-Vote-abuse-for-any -private-server?pid=59#pid59 What you need: Lots of account http://fileace.com/h0l0a First step: Register accounts in the private server you want to vote abuse.



All times are GMT +2. The time now is 09:30.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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