Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 07:41

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

Advertisement



Problem mit der Shop.php

Discussion on Problem mit der Shop.php within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
.Seriously's Avatar
 
elite*gold: 54
Join Date: Jun 2012
Posts: 753
Received Thanks: 194
Problem mit der Shop.php

hallo
irgendwie werden mir net die dm abgezogen wenn ich ein item kaufen und wenn ich zuwenig dm habe komnmt keine meldung das ich zuwenig habe kann mir jemand das da einbauen.


vielen dank

PHP Code:
<?php
    
if(isset($_SESSION['account'])) {
        if(!empty(
$_GET['kat'])) {
        if(!empty(
$_GET['buy'])) {
    
?>
            <div style="padding: 10px; margin:10px;" class="fui">
                    <p style="margin:7px 0px; background:url(images/ui/fui.png); -moz-border-radius:5px; padding:5px; ">
                    <b><font color="#990000">Item Kaufen</font></b></p>
<?php
            $login     
$_SESSION['account'];
            
$checkuser mysql_query("SELECT * FROM account.account WHERE login = '$login'");
            
$array     mysql_fetch_array($checkuser);
            
$itemid    $_GET['buy'];
            
$user      $_SESSION['account'];
            
$dp           $array['dp'];
            
$dm           $array['dm'];
            
$query     mysql_query("SELECT * FROM account.is_items WHERE value = '$itemid'");
            
$array2    mysql_fetch_array($query);
            
$rescash   $dp-$array2['preis_dp'];
            
$rescash   $dm-$array2['preis_dm'];
            
$posQr     mysql_query("SELECT * FROM player.item WHERE owner_id = ".$array['id']." AND window = 'MALL' ORDER BY pos DESC LIMIT 1");
               while(
$pos1 mysql_fetch_object($posQr)){
                if (
$pos1->pos == '42'){ 
                
                    
$pos '1'
                    
                } else { 
                
                    
$pos $pos1->pos 1
                }
            }
                        
        if(
$rescash 0) {
            
$i 0;    
            
$giveitem "INSERT INTO player.item SET 
            owner_id = "
.$array['id'].", window = 'MALL', pos = '$pos', 
            count = '1', vnum = '
$itemid', socket0 = '0', socket1 = '0', socket2 = '0'";
            
$re mysql_query($giveitem);
            
            if(
$re) {
                    
                    
$cashresult $dm-$array2['preis_dm'];
                    
$coins "UPDATE account.account SET dm = dm-'".$array2['preis_dm']."' WHERE login = '$login'";
                    
                    
$cashresult $dp-$array2['preis_dp'];
                    
$coins "UPDATE account.account SET dp = dp-'".$array2['preis_dp']."' WHERE login = '$login'";
                    
                    
$coinsresult mysql_query($coins);
                        
                    if(
$coinsresult) {
                    
                    echo 
'
                    Du hast erfolgreich ein/e '
.$array2['item_name'].' gekauft!';
                
                    } else { echo 
"Kaufen fehlgeschlagen."; }
                
            } else { echo 
"Deine Drachenmünzen genügen nicht."; }
            
            
        } else { echo 
"Kaufen fehlgeschlagen."; }
    
?>
    </div>
<?php
}
?>
<?php
        $cat 
"SELECT * FROM account.is_items WHERE kat = ".$_GET['kat']."";
        
$catQry  mysql_query($cat);
        while(
$row2 mysql_fetch_object($catQry)) {
            
$size GetImageSize ("images/is_img/".$row2->value.".png");
            echo 
'<div style="padding: 10px; margin:10px;" class="fui"><table width="100%" border="0">
            <td width="10%">
            <img src="images/is_img/'
.$row2->value.'.png" width="'.$size[0].'" height="'.$size[1].'" />
            </td>
                <td width="70%">
                <p style="font-size:9px; background:url(images/ui/fui.png); -moz-border-radius:5px; padding:5px; ">
                <b>'
.$row2->item_name.'</b></p><br>
                    '
.$row2->item_info.'
                </td>
                <td width="3%">
                </td>
                <td width="30%">
                Preis:  '
.$row2->preis_dp.' DR<br>
                Preis:  '
.$row2->preis_dm.' DM<br>
                (<a href="index.php?src=shop&kat='
.$_GET['kat'].'&buy='.$row2->value.'">Item Kaufen</a>)
                </td>
                </table>
            </div>
            '
;
        }
} else {
    include(
'function/home.php');
}
    } else {
        echo 
'Du musst dich Einloggen um diese Funktionen zu nutzen';
    }
?>
.Seriously is offline  
Reply


Similar Threads Similar Threads
Shop problem, plz help
08/21/2012 - Rappelz Private Server - 0 Replies
Could not find stored procedure 'dbo.smp_read_purchase_item_list' (DB COM ERROR in GS) Any ideas? Help plz Have a solution now. #close
Problem mit Shop
11/02/2011 - Metin2 Private Server - 12 Replies
abend com habe ein problem mit meinem schop habe items eingefuegt aber die erscheinen nicht im schop die items sind neu und denke das die nicht im schop zu verkaufen sind preise habe ich eingestelt kauf und verkaufspreis alles richtig eingetragen aber erscheinen nicht wo liegt der fehler ??? mfg nostradame
Problem mit Shop
07/30/2011 - Metin2 Private Server - 4 Replies
Hey Leute Ich habe bei meinem P-Server einen neuen NPC erstellt, der heißt Firsurenshop. Wenn man nun draufklickt kommen 4 Felder: Krieger, Sura, Ninja und Shamane. Wenn ich auf Krieger klicke kommt mein Shop mit den ganzen Krieger Frisuren, wenn man auf Sura klickt die Sura Frisuren. Doch wenn man auf Ninja oder Shamane klickt dann kommt zwar der Shop aber dort ist nichts drin, ich habe alles genau so gemacht wie bei den anderen Fächern. Ich bitte um Hilfe. Teamviewer: ID: 790 563...
Shop Problem
08/21/2010 - Metin2 Private Server - 0 Replies
Hey com. Also ich habe heute einen neuen Server erstellt. Naja habe kaum ahnung wie man irgendwas richtig macht . Also ich habe in den Waffenhändler in der Table Players->Shop_Item bei nr1(Waffenhändler) alles was er verkauft z.B. 19 (Schwert+9) in 9039 (Breitschwert der schwarz) verändert. (Also mit mehreren komplett neuen Waffen.) Und dann habe ich abgespeichert , bin auf X gegangen und dann den Server rebootet und gestartet. Und jezt lässt sich der Waffenhändler nichtmehr anklicken....
[HELP] problem in D-shop
06/28/2009 - Dekaron Private Server - 4 Replies
Hello friends I'm the problem with D-shop of my dekaron private server if someone can help look at the pictures and if possible a solution.Tanks http://img197.imageshack.us/img197/1821/dshop.png http://img145.imageshack.us/img145/1553/imagem1jb c.png



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


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.