Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Fiesta Online
You last visited: Today at 11:29

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

Advertisement



hilfe bei handle.php

Discussion on hilfe bei handle.php within the Fiesta Online forum part of the MMORPGs category.

Reply
 
Old   #1

 
elite*gold: 234
Join Date: Oct 2014
Posts: 72
Received Thanks: 10
hilfe bei handle.php

ich habe einen zahlungsanbieter für mein itemshop gefunden.
allerdings weis ich nicht wie ich den in die handler.php reinbekomme.
Ich habe schon versucht die orginaldaten zu ersetzen, aber dies schlug bisher fehl.
Deswegen die frage an euch, vielleicht weis ja einer wie ich das machen muss.

Handler.php
PHP Code:
<?php
    
#Security
    
define'IN_MALL' );
    
    
#Include config
    
require_once( './config.php' );
    
    
#Include bootstrap
    
require_once( './bootstrap.php' );
    
    
#Logged In
    
if( isset( $_SESSION['userName'] ) )
    {
        
#Lel
        
if( $_SESSION['logIP'] != $_SERVER['REMOTE_ADDR'] )
        {
            
session_destroy();
            
            exit;
        }
    
        
#Trying to buy
        
if( isset( $_POST['buy'] ) )
        {
            
$Item $_POST['buy'];

            
#Numbers only
            
if( preg_match'/^[0-9][0-9]*$/' $Item ) == )
            {
                
#Get Info
                
$ItemInfo Functions::GetItemInfo$Item );
                
                
#Item doesn't exist
                
if( count$ItemInfo ) == )
                {
                    
Functions::Error'Invalid item' );
                }
                
                
#Fucking nest
                
$ItemInfo $ItemInfo[0];
                
                
#Get user points
                
$Points Functions::GetUserPoints$_SESSION['nEMID'] );
                
                
#Failed to get user points
                
if( count$Points ) == )
                {
                    
Functions::Error'Server error' );
                }
                
                
#Fucking nest
                
$Points $Points[0]['nAGPoints'];

                
#Enough points?
                
if( $ItemInfo['nPrice'] > $Points )
                {
                    
Functions::Error'You do not have enough points' );
                }
                
                
#Deduct points
                
Functions::SubtractPoints$_SESSION['nEMID'] , $ItemInfo['nPrice'] );

                
#Give item
                
Functions::AddItem$_SESSION['nEMID'] , $ItemInfo );
                
                
Functions::Error'Item bought' );
            }
            else
            {
                
Functions::Error"Invalid item" );
            }        
            
        }
        
#Coins
        
else if( isset( $_GET['coins'] ) )
        {
            
$Coins functions::GetUserPoints$_SESSION['nEMID'] );
            
            
$Coins $Coins[0]['nAGPoints'];        
            
            echo 
$Coins;
        }
        
#Specific category
        
else if( isset( $_GET['cat'] ) )
        {
            
$Cat $_GET['cat'];
        
            
#Valid sub-category?
            #Sub-Cats are number indexed
            
if( preg_match'/^[0-9][0-9]*$/' $Cat ) == )
            {
                
$Results Functions::GetCat$Cat );
                
                
#Category is real
                
if( count$Results ) > )
                {
                    
$Results $Results[0]['nCat'];
                
                    
$Items Functions::GetItemsByCat$Results );
                    
                    
#No items in category
                    
if( count$Items ) > )
                    {
                        echo 
'<ul class="thumbnails">';
                    
                        foreach( 
$Items as $Key => $Info )
                        {
                            
$Info = (object) $Info;
                            
                            
functions::PrintItem$Info );
                        }    
                        
                        echo 
'</ul>';
                    }
                    else
                    {
                        
Functions::Error'No items in this category' true );
                    }
                }
                else
                {
                    
Functions::Error'Invalid category' true );
                }
            }
            else if( 
$Cat == -)
            {
                echo 
'<iframe 
src="https://api.***********.com/api/subscription
?key=79e2eeb73688f48286d5a613826058b8
&uid=user42
&widget=p10
&email=user%40hostname.com
&sign_version=3
&sign=SIGNATURE" width="750" height="800" frameborder="0">
</iframe>'
;

            }
            else if( 
$Cat == -)
            {
                echo 
"Yo! Paypal!";
            }
            else
            {
                
Functions::Error"Invalid category" true );
            }
        }
        
#Tried to log out?
        
else if( isset( $_GET['logout'] ) )
        {
            
Functions::LogOut();
            
            
Functions::Redirect'index.php' );
        }        
        
#Default
        
else
        {
            
$Coins functions::GetUserPoints$_SESSION['nEMID'] );
            
            
$Coins $Coins[0]['nAGPoints'];
            
            echo 
'<div class="navbar">
                    <div class="navbar-inner">
                        <ul class="nav">'
;
                        
            
$i Functions::PrintCategories();
            
            echo 
'</ul><div class="btn-group" style="float:right;">
              <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
                Options
                <span class="caret"></span>
              </a>
              <ul class="dropdown-menu">
              <li><a href="#">' 
sprintf"Logged in as, <b style=\"color:red;\">%s</b>" htmlentities$_SESSION['userName'] ) ) . '</a></li>
              <li><a id="coins_lbl" href="#" onclick="updateCoins(); return false;">' 
sprintf"Coins:<b style=\"color:red;\">%s</b>" htmlentities$Coins ) ) . '</a></li>
              <li id="lbl_-1"><a href="#" onclick="loadCat(-1); return false;"><img src="./Template/img/dollar.png" alt="" /> Payment Wall</a></li>
              <!--<li><a href="#" onclick="loadCat(-2); return false;"><img src="./Template/img/dollar.png" alt="" /> Paypal</a></li>-->
              <li><a href="#" onclick="Logout(); return false;"><b>Logout<b/></a></li>
              </ul>
            </div>'
;        
            
            echo 
'</div></div>';
            
            if( 
$i == )
            {
                
Functions::Error"There are no mall items yet!" true );
            }
            else
            {
                echo 
'<script>$("#main").html(\'<div class="alert alert-info">Klicke auf eine kategorie um dir deine Items zu Kaufen! <button type="button" class="close" data-dismiss="alert">&times;</button></div>\');</script>';
            }
        }
    }
    
#Not logged in
    
else
    {
        
#Tried to log in?
        
if( isset( $_POST['username'] ) && isset( $_POST['password'] ) )
        {
            
$Username $_POST['username'];
            
            
$Password $_POST['password'];
            
            
#Validate input
            
if( strlen$Username ) < || strlen$Username ) > 15 || preg_match'/[^a-zA-Z0-9]/' $Username ) > )
            {
                
Functions::Error'3' );
            }
            elseif( 
strlen$Password ) < || strlen$Password ) > 20 )
            {
                
Functions::Error'2' );
            }
            
            
#Hash password
            
$Password Functions::MakePw$Username $Password );
            
            
#User didn't exist
            
if( $Password == null )
            {
                
Functions::Error'1' );
            }

            
#Validate login
            
$Results Functions::LoginValidate$Username $Password );
            
            if( 
count$Results ) > )
            {
                
$Results $Results[0];
            
                
Functions::SetLogin$Results );
                
                
Functions::Error'4' );
            }
            
#Invalid
            
else
            {
                
Functions::Error'1' );
            }
        }
        
#Nada
        
else
        {
            
Functions::LoggedOut();
        }
    }
?>
D@rk-€vil is offline  
Old 11/24/2014, 18:05   #2
 
elite*gold: 0
Join Date: Oct 2010
Posts: 426
Received Thanks: 97
Das kommt auf den Zahlungsanbieter an.

Bei Paypal beispielsweise leitest du den User mit bestimmten Parametern auf die Zahlungsseite weiter.
Paypal führt dann die Zahlung aus und sobald das Geld bei dir angekommen ist, schickt Paypal eine "automatische Zahlungsbestätigung" (Antwort, dass das Geld bei dir ist).
Die muss dein Server dann annehmen und kann das Guthaben in die Datenbank eintragen.

Von Paypal gibt's da auch eine schöne Grafik:




Ansonsten müsstest du mal verlauten lassen, welchen Anbieter du hast, dann könnte man sich den mal anschauen und dir erklären, wie das da gelöst wird.
DuOtto is offline  
Old 11/25/2014, 08:11   #3
 
elite*gold: 0
Join Date: May 2014
Posts: 173
Received Thanks: 59
Das Script würde ich nicht verwenden xD
0xDnFx3 is offline  
Reply


Similar Threads Similar Threads
Anyone can handle it?
01/27/2013 - Grand Theft Auto - 2 Replies
Hi guys is there anyone of you who managed to make a hack for money ? :handsdown: server: SuperParba.eu - Party Server address: play.superparba.eu:7777 mod: Realna zeme 8.1 players: X/400 I believe you can do it because you are the best :) PS: sorry my bad english :(
Attacking.Handle Help
06/10/2012 - CO2 Private Server - 3 Replies
---Exception message---- Object reference not set to an instance of an object. ----End of exception message---- ----Stack trace---- at Conquer_Online_Server.Game.Attacking.Handle.Execut e() in C:\Users\Administrator\Desktop\Death\Game\Attackin g\Handle.cs:line 1069 at Conquer_Online_Server.Game.Attacking.Handle..ctor( Attack attack, Entity attacker, Entity attacked) in C:\Users\Administrator\Desktop\Death\Game\Attackin g\Handle.cs:line 23 at...
Does anyone know how to handle this?
09/03/2010 - Mabinogi - 10 Replies
how to handle the mini game of metal conversion? Can you offer me a link or just post bellow?
[C++] Process Handle
10/27/2009 - C/C++ - 9 Replies
huhu, ich hab ein Problem den Process Handle von Diablo II zu bekommen. #include <cstdlib> #include <iostream> #include <windows.h> using namespace std;
How to handle a rb
02/16/2007 - CO2 Guides & Templates - 16 Replies
When you see a rb pking, you think usually about the guard right? especially when rbs get to 105 and have gold guard, they are usually invincible. A little trick that works for me is to poison the guard before going after the pker, the poison delays the guards lightning, giving you enough time to land a fb or rapid on the pker, however sometimes it does fail and 9/10 you die because gold guard has a ridiculously high Matk feel free to flame away and call me a noob or w/e just sharing...



All times are GMT +1. The time now is 11:29.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.