Register for your free account! | Forgot your password?

You last visited: Today at 07:33

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

Advertisement



Vote 4 Coins

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

Reply
 
Old   #1

 
elite*gold: 0
The Black Market: 160/0/0
Join Date: May 2012
Posts: 7,283
Received Thanks: 822
Vote 4 Coins

Gute abend , liebe com..

Könnt ihr mir bitte sagen wieso das nicht funktioniert??

Ielinque is offline  
Thanks
1 User
Old 05/27/2012, 21:29   #2

 
Aze /..'s Avatar
 
elite*gold: 220
Join Date: Oct 2011
Posts: 7,369
Received Thanks: 7,610
Was genau funktioniert daran nicht?
Aze /.. is offline  
Thanks
1 User
Old 05/27/2012, 21:32   #3

 
elite*gold: 0
The Black Market: 160/0/0
Join Date: May 2012
Posts: 7,283
Received Thanks: 822
Wenn man auf vote 4 coins dann auf der xammp hp drück kommt folgendes.

#push
Ielinque is offline  
Old 05/28/2012, 09:38   #4
 
elite*gold: 0
Join Date: Mar 2012
Posts: 976
Received Thanks: 315
PHP Code:
<div id="content_top">
Vote 4 Coins
</div>
<div id="content_main">
<div style="width:480px;">
<font color="white">
<?

if(isset($_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin']>=0) {
    
    
/*
     * Vote Page
     */
    
$VotePage "http://www.topliste.****************/In/8000-darknight2-de.htm";
    
    
/*
     * Check if User can vote
     */
    
$VoteLinkClick             trim(mysql_real_escape_string(@$_REQUEST['f']));
    
$EnableVotePage            true;
    
$ShowMSG                false;
    
$SuccessMSG                "";
    
    
$CheckPlayerVotes_SQL        "SELECT * FROM account.account_votes WHERE account_id = '".$_SESSION['user_id']."'";
    
$CheckPlayerVotes_Query        mysql_query($CheckPlayerVotes_SQL);
    
$CheckPlayerVotes_Result    mysql_fetch_array($CheckPlayerVotes_Query);
    
    
/*
     * Insert Player's Vote-Log in account_votes, if non-existent
     */
    
if( $CheckPlayerVotes_Result['account_id'] != $_SESSION['user_id'] or empty($CheckPlayerVotes_Result['account_id']) ) {
        
$Account_AddVoteEntry        "INSERT INTO account.account_votes 
                                            (account_id, last_vote_at, votes_given, coins_received, new_vote_at) 
                                        VALUES 
                                            ('"
.$_SESSION['user_id']."', '0', '0', '0', '0')";
        
        @
mysql_query($Account_AddVoteEntry);
    }

    
mysql_free_result($CheckPlayerVotes_Query);
    
$CheckPlayerVotes_Query        mysql_query($CheckPlayerVotes_SQL);
    
$CheckPlayerVotes_Result    mysql_fetch_array($CheckPlayerVotes_Query);
    
    
/*
     * Check if User has an entry in our Vote-Log Table
     */
    
if( $CheckPlayerVotes_Result['account_id'] == $_SESSION['user_id'] ) {
        
        
/*
         * Initialize Voting variables
         */    
        
$Player_LastVoteAt            $CheckPlayerVotes_Result['last_vote_at'];
        
$Player_VotesGiven            $CheckPlayerVotes_Result['votes_given'];
        
$Player_CoinsReceived        $CheckPlayerVotes_Result['coins_received'];
        
$Player_NewVoteAt            $CheckPlayerVotes_Result['new_vote_at'];
        
$TimeNow                    time();
        
        
/*
         * Check if IP is already logged and can vote
         */
        
$IPCheck                    false;
        
        
$PlayerIP                    $_SERVER['REMOTE_ADDR'];
        
$PlayerIPCheck_SQL            "SELECT * FROM account.account_vote_ip WHERE ip = '$PlayerIP'";
        
$PlayerIPCheck_Query        mysql_query($PlayerIPCheck_SQL);
        
$PlayerIPCheck_Result         mysql_fetch_array($PlayerIPCheck_Query);
        
$VoteExpire                    $PlayerIPCheck_Result['vote_expire'];
        
        if( 
mysql_num_rows($PlayerIPCheck_Query) <= ) {
            
$InsertIPLogEntry_SQL    "INSERT INTO account.account_vote_ip (ip, vote_expire) VALUES ('$PlayerIP', '0')";
            
$InsertIPLogEntry_Query    mysql_query($InsertIPLogEntry_SQL);
            
$VoteExpire 0;
        } 
        
        if( 
$TimeNow >= $VoteExpire ) {
            
$IPCheck true;
        } else {
            
$IPCheck false;
        }
        
        
/*
         * Check if Player is allowed to vote
         */
        
if( $TimeNow >= $Player_NewVoteAt and $IPCheck == true ) {
            
            
/*
             * Check if User has clicked on the Link
             */
            
if( $VoteLinkClick == true and $IPCheck == true ) {
                
                
/*
                 * Initialize new Vote-Log entry
                 */
                
$VoteBonusCoins        100;
                
$NewVoteAt_Time        $TimeNow 60*60*24;
                
$LastVoteAt_Time    $TimeNow;
                
$Player_VotesGiven    += 1;
                
$NewCoinsAmount        $Player_CoinsReceived $VoteBonusCoins;
                
                
$NewVoteLog_SQL        "UPDATE account.account_votes
                                          SET last_vote_at = '
$LastVoteAt_Time',
                                                votes_given = '
$Player_VotesGiven', 
                                                coins_received = '
$NewCoinsAmount',
                                                new_vote_at = '
$NewVoteAt_Time'
                                        WHERE account_id = '"
.$_SESSION['user_id']."'";
                
                
$IPLog_SQL             "UPDATE account.account_vote_ip 
                                          SET vote_expire = '
$NewVoteAt_Time
                                        WHERE ip = '
$PlayerIP'";
                
                
/*
                 * Initialize Player Coins + Bonus for Voting
                 */
                
$GetPlayerCoins_SQL        "SELECT coins FROM account.account WHERE id = '".$_SESSION['user_id']."'";
                
$GetPlayerCoins_Query    mysql_query($GetPlayerCoins_SQL);
                
$GetPlayerCoins_Result    mysql_fetch_array($GetPlayerCoins_Query);
                
                
$PlayerCoins            $GetPlayerCoins_Result['coins'] + 500;
                
                
$PlayerNewCoins_SQL    "UPDATE account.account 
                                          SET coins = 
$PlayerCoins 
                                        WHERE id = '"
.$_SESSION['user_id']."'";
                
                
/*
                 * Update Database entries
                 */
                
mysql_query($NewVoteLog_SQL);
                
mysql_query($PlayerNewCoins_SQL);
                
mysql_query($IPLog_SQL);
                
                
$EnableVotePage        false;
                
$ShowMSG            true;
                
$SuccessMSG            .= "Du wirst in kürze deine Coins erhalten, sobald du gevoted hast.<br>";
                
                
/*
                 * Redirect User to Vote Page
                 */
?>
<script type="text/javascript" language="javascript">
<!--
window.location.href = '<? echo $VotePage?>';
//-->
</script>
<?
                
exit;
            } else {
                
$EnableVotePage     true;
            }
        } else {
            
$EnableVotePage false;
        }
    }

    if( 
$EnableVotePage == true ) {
?>

<p class="meldung">
    Für jeden Vote bekommst du eine Gutschrift von DEINE COINS Coins. <br>
    Missbrauch dieser Funktion wird ein permanenter Bann zur folge haben! <br>
</p>
<p>Um voten zu können, klicke auf dem folgenden link:</p>
<br>
<a href="<? echo $_SERVER['PHP_SELF']; ?>?s=vote&f=true"><img src="./img/vote.png" alt="Vote 4 Coins"></a>
<?
    
} else {
        if( 
$ShowMSG == true ) {
            echo 
"<p>$SuccessMSG</p>";
        } else {
            echo 
"<p>Du kannst nur alle 24 Stunden voten!</p>";
            echo 
"<br>";
            if( 
$Player_NewVoteAt ) {
                echo 
"<div align=\"center\">Du kannst wieder um "date("d.m.Y H:i:s"$Player_NewVoteAt) ." Server Zeit voten.</div>";
            }
        }
    }
} else {
    echo
'<p class="meldung">Das Voten steht nur angemeldeten Spielers zur verfügung.</p>';
}

?>
 </div>
</div>
<div id="content_footer"><br><br>
</div>
nimm das dan kommste da rein und es geht
DerMitDerSense is offline  
Thanks
1 User
Old 05/28/2012, 14:01   #5
 
DarkPlugin's Avatar
 
elite*gold: 14
Join Date: Jun 2011
Posts: 1,465
Received Thanks: 391
Quote:
Originally Posted by [ST]Hydra View Post
Gute abend , liebe com..

Könnt ihr mir bitte sagen wieso das nicht funktioniert??

PHP Code:
        'db_host'        =>    '5.5.131.100',
        
'db_user'        =>    'root', <--------
        
'db_pass'        =>    'meinpw',    <---------
        
'db_database'    =>    'account'

hast vergessen anzupassen

und musst die query noch einfügen

Code:
SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `vote`
-- ----------------------------
DROP TABLE IF EXISTS `vote`;
CREATE TABLE `vote` (
  `account` varchar(13) NOT NULL DEFAULT '0',
  `ip` varchar(30) NOT NULL DEFAULT '0',
  `times` bigint(20) unsigned NOT NULL DEFAULT '0',
  `Site0` int(11) DEFAULT NULL,
  `Site1` int(11) DEFAULT NULL,
  `Site2` int(11) DEFAULT NULL,
  `Site3` int(11) DEFAULT NULL,
  `Site4` int(11) DEFAULT NULL,
  `Site5` int(11) DEFAULT NULL,
  PRIMARY KEY (`account`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
DarkPlugin is offline  
Old 05/28/2012, 15:09   #6

 
elite*gold: 0
The Black Market: 160/0/0
Join Date: May 2012
Posts: 7,283
Received Thanks: 822

Verstehe ich nicht

Vote? --->

Geht imme noch nicht :/
Ielinque is offline  
Old 05/28/2012, 16:24   #7
 
DarkPlugin's Avatar
 
elite*gold: 14
Join Date: Jun 2011
Posts: 1,465
Received Thanks: 391
geh in navicat in die db account mach ne neue query und hau das rein :
Code:
SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `vote`
-- ----------------------------
DROP TABLE IF EXISTS `vote`;
CREATE TABLE `vote` (
  `account` varchar(13) NOT NULL DEFAULT '0',
  `ip` varchar(30) NOT NULL DEFAULT '0',
  `times` bigint(20) unsigned NOT NULL DEFAULT '0',
  `Site0` int(11) DEFAULT NULL,
  `Site1` int(11) DEFAULT NULL,
  `Site2` int(11) DEFAULT NULL,
  `Site3` int(11) DEFAULT NULL,
  `Site4` int(11) DEFAULT NULL,
  `Site5` int(11) DEFAULT NULL,
  PRIMARY KEY (`account`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
und in der vote.php musst du noch deine daten anpassen
DarkPlugin is offline  
Old 05/28/2012, 17:19   #8

 
elite*gold: 0
The Black Market: 160/0/0
Join Date: May 2012
Posts: 7,283
Received Thanks: 822
Da gibts doch keine daten zum anpassen
Ielinque is offline  
Old 05/28/2012, 18:52   #9
 
DarkPlugin's Avatar
 
elite*gold: 14
Join Date: Jun 2011
Posts: 1,465
Received Thanks: 391
doch dasda -.-

Code:
        'db_host'        =>    '5.5.131.100',
        'db_user'        =>    'root', <--------
        'db_pass'        =>    'meinpw',    <---------
        'db_database'    =>    'account',
DarkPlugin is offline  
Thanks
2 Users
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
Vote 4 Coins Help
01/31/2012 - Metin2 Private Server - 1 Replies
ich habe ein kleines problem und zwar: das kommt wen ich auf Vote drücke Notice: Undefined index: name in /var/www/web567/html/pages/vote.php on line 49 das habe ich bei zeile 49 stehen. $name = mysql_real_escape_string($_POST);
[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!
Vote for coins..
07/23/2011 - Metin2 Private Server - 9 Replies
Hey epvpers, auf manchen servern kann man ja für coins alle 24 stunden voten, hierzu also meine frage: kann man diese 24 stunden ip-sperre umgehen? wenn ja wie?



All times are GMT +2. The time now is 07:33.


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.