Skocz do zawartości

Dołącz do społeczności!

👋 Witaj na MPCForum!

Przeglądasz forum jako gość, co oznacza, że wiele świetnych funkcji jest jeszcze przed Tobą! 😎

  • ✅ Pełny dostęp do działów i ukrytych treści
  • ✅ Możliwość pisania i odpowiadania w tematach
  • ✅ System prywatnych wiadomości
  • ✅ Zbieranie reputacji i rozwijanie swojego profilu
  • ✅ Członkostwo w jednej z największych społeczności graczy

👉 Dołączenie zajmie Ci mniej niż minutę – a zyskasz znacznie więcej!

Zarejestruj się teraz

[Problem] Strona i ItemShop

Rekomendowane odpowiedzi

Opublikowano

Witam , używam ItemShopa z tego tematu :

 

http://www.mpcforum.pl/topic/153441-tut-sms-shop-item-shop-100-dzialajacy/

 

Teraz Moje pytanie niby wszystko wgrałem poprawnie ale wyskakuję taki error

 

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/mrdagger/domains/metinayt2.pl/public_html/itemshop/default.php on line 178

 

Czym to jest spowodowane? Proszę o Pomoc :( .

Opublikowano

Daj zawartość tego pliku default.php do code

Szukam grafików, questerów Metin2, koderów www, skrypterów, programistów visual c++, c++.
Techników od bazy danych, systemów linuksowych( głównie FreeBSD).

[email protected] - > Pisać - > Rozpatrzę propozycje :)

Opublikowano
  • Autor

Soory nie zauważyłem posta :P. Sprawdzę to Twoje a tu Macie Defaulta :

 

 

<?php
session_start();
require_once("config.php");
                       mysql_select_db("player");
?>
<?php
function DeCode($string,$operation,$key='')
   {
       $key=md5($key);
       $key_length=strlen($key);
       $string=$operation=='D'?base64_decode($string):substr(md5($string.$key),0,8).$string;
       $string_length=strlen($string);
       $rndkey=$box=array();
       $result='';
       for($i=0;$i<=255;$i++)
       {
           $rndkey[$i]=ord($key[$i%$key_length]);
           $box[$i]=$i;
       }
       for($j=$i=0;$i<256;$i++)
       {
           $j=($j+$box[$i]+$rndkey[$i])%256;
           $tmp=$box[$i];
           $box[$i]=$box[$j];
           $box[$j]=$tmp;
       }
       for($a=$j=$i=0;$i<$string_length;$i++)
       {
           $a=($a+1)%256;
           $j=($j+$box[$a])%256;
           $tmp=$box[$a];
           $box[$a]=$box[$j];
           $box[$j]=$tmp;
           $result.=chr(ord($string[$i])^($box[($box[$a]+$box[$j])%256]));
       }
       if($operation=='D')
       {
           if(substr($result,0,8)==substr(md5(substr($result,8).$key),0,8))
           {
               return substr($result,8);
           }
           else
           {
               return'';
           }
       }
       else
       {
           return str_replace('=','',base64_encode($result));
       }
   }

?>
<STYLE type=text/css>
td img {display: block;}body,td,th {
       font-family: Tahoma, ËÎĚĺ;
       font-size: 12px;
       color: #000000;
}
body {
       margin-left: 0px;
       margin-top: 0px;
       margin-right: 0px;
       margin-bottom: 0px;
       background-image: url(../images/Page-BgTexture.jpg);
       background-repeat: repeat;
}
a:link {
       color: #A8031E;
       text-decoration: none;
}
a:visited {
       text-decoration: none;
       color: #A8031E;
}
a:hover {
       text-decoration: none;
       color: #A8031E;
}
a:active {
       text-decoration: none;
       color: #A8031E;
}
.style1 {
font-size: 12px;
}

table#itemshop {
border: 1px solid #CFCFCF;
  border-collapse: collapse;

}

table#itemshop td {
  border: 1px solid #CFCFCF;
   padding: 5px;
background-color:#EFEFEF;
}

img {
border:0;
}
</style>
<!DOCTYPE html 
       PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
 <meta name="Description" content="Tu wpisz opis zawarto?i strony" />
 <meta name="Keywords" content="Tu wpisz wyrazy kluczowe rozdzielone przecinkami" />
 <title>Eldorado Shop</title>
   <link rel="shortcut icon" href="pliki/favicon0.bmp" type="image/x-icon" />
</head>
<body style="background: url(images/tlo.jpg);">


<Center>
<table id="calosc" border="0px" cellspacing="0px">
<tr>
<td>
<a href="http://5.87.32.39/itemshop/index.php"><img src="enter/img/header.png" width="586" height="125"></a>
</td>
</tr>
<tr>
<td>
      <center> <a href="enter/" class="link"><B><blink>KUP KAMIENIE</blink></b></a></center>
                                       <p class=wiadomosc><?php
               $exec_class="select classid,classname from shop_class order by classid  desc";
                       $result_class=mysql_query($exec_class);
                       while($rs_class=mysql_fetch_array($result_class)){

}
?></p>
                                               <table border="1">
                       <?php
                                                                                 if(isset($_SESSION["UserID"]) && strlen($_SESSION["UserID"])>1){
                                                                                 shop();
                                                                                 }else{login();}
                                                                                 function login(){
                                                                                 ?>
Nie jestes zalogowany! <a href="index.php" class="link"><b>Zaloguj sie</b></a>, a jezeli nie masz konta w grze <A href="include/rejestracja/index.php"><b>Zarejestruj sie</b></a>
<?php 
                                                                               }
                                                                               function shop(){
                                                                               echo "<font color=#000000><b>Nazwa Konta:</font>  ".$_SESSION["UserID"]."<br/><font color=#000000><b>Kamienie:</font>  ".$_SESSION["cash"]."  <Br/><a href=\"Loginout.php\" class=link>Wyloguj</a></p>";
                                                                               ?>


                                       <?php
                                                                               $classid=$_GET["classid"];
                                                                               if($classid<0 || $classid=="" || is_numeric($classid)==false){$classid=0;}
                                                                               if($classid>0){
                                                                               $exec="select count(*) from item_proto where vnum in (select vnum from item_proto_shop where classid=$classid)";
                                                                               }else{
                                                                               $exec="select count(*) from item_proto where vnum in (select vnum from item_proto_shop)";
                                                                               }
               mysql_query("set names gb2312 ");
               mysql_query("set CHARACTER  gb2312 ");
                       $result=mysql_query($exec);
                       $rs=mysql_fetch_array($result);
                       $num=$rs[0];
                       if(empty($_GET['page'])){
                               $page=0;
                       }else{
                               $page=$_GET['page'];
                               if($page<0)$page=0;
                               if($page>=ceil($num/3))$page=ceil($num/3)-1;
                       }
                       if($classid>0){
                       $exec="select item_proto.vnum,item_proto.gb2312name,item_proto_shop.img,item_proto_shop.prices,item_proto_shop.content from item_proto,item_proto_shop where item_proto.vnum =item_proto_shop.vnum and  item_proto_shop.classid=$classid order by item_proto.vnum  desc limit ".($page*3).",3";
                       }else{
                       $exec="select item_proto.vnum,item_proto.gb2312name,item_proto_shop.img,item_proto_shop.prices,item_proto_shop.content from item_proto,item_proto_shop where item_proto.vnum =item_proto_shop.vnum  order by item_proto.vnum  desc limit ".($page*3).",3";
                       }


                       $result=mysql_query($exec);
                       while($rs=mysql_fetch_array($result)){
                       $i+=1;
                 ?>


<table border="0" id="itemshop">
 <tr>
   <td width="80" rowspan="3" align="center">

<div><img src="<?=urldecode($rs["img"])?>" border="0" height="83" width="83" /></div></a>

   </td>
   <td class="header" width="30%"><div align="left"><?=$rs["gb2312name"]?></div></td>
   <td class="header" width="300px"><div align="right"><b>Cena:</b> <?=$rs["prices"]?> Kamieni</div></td>
 </tr>
 <tr>
   <td colspan="2" align="right"> <a href="player.php?id=<?=$rs["vnum"]?>" title="Kup Teraz<?=$rs["prices"]?>Kup Teraz" ><img src="przycisk.png"></a></from></td>
   </tr>
</table>  

                                                                               <?
                                                                               }
                                                                               ?>         
                                                                               <center> <a href="?classid=<?=$_GET["classid"]?>&page=<?=($page-1)?>" class="link">Poprzednia</a> | 
<a href="?classid=<?=$_GET["classid"]?>&page=<?=($page+1)?>" class="link">Nastepna</a> </center><br/>                     
<?php
}
?>


</td>
     </tr>
   </table>
        		 <Br/>
</td>
</tr>
</table>
</center>
</body>
</html>

 

 

Edit :

 

Dodałem to Twoje i Mam :

 

 

Warning: require_once() [function.require-once]: Unable to access ../config.php in /home/mrdagger/domains/metinayt2.pl/public_html/itemshop/default.php on line 3

Warning: require_once(../config.php) [function.require-once]: failed to open stream: No such file or directory in /home/mrdagger/domains/metinayt2.pl/public_html/itemshop/default.php on line 3

Fatal error: require_once() [function.require]: Failed opening required '../config.php' (include_path='.:/usr/local/lib/php') in /home/mrdagger/domains/metinayt2.pl/public_html/itemshop/default.php on line 3

 

Edytowane przez OstryJohny

Opublikowano

@Up

 

No to to w tym wklej.to to własnie default.

 

Bo ty nie podałeś ;p

 

@edit

Spoko loozik ;d

Edytowane przez Mastick

ex

Opublikowano

ItemShop zapewne pod pliki 2010 czy tam 2011 więc nie masz w item_proto gb2312name tylko locale_name :)

 

 

 

<?php
session_start();
require_once("config.php");
                       mysql_select_db("player");
?>
<?php
function DeCode($string,$operation,$key='')
   {
       $key=md5($key);
       $key_length=strlen($key);
       $string=$operation=='D'?base64_decode($string):substr(md5($string.$key),0,8).$string;
       $string_length=strlen($string);
       $rndkey=$box=array();
       $result='';
       for($i=0;$i<=255;$i++)
       {
           $rndkey[$i]=ord($key[$i%$key_length]);
           $box[$i]=$i;
       }
       for($j=$i=0;$i<256;$i++)
       {
           $j=($j+$box[$i]+$rndkey[$i])%256;
           $tmp=$box[$i];
           $box[$i]=$box[$j];
           $box[$j]=$tmp;
       }
       for($a=$j=$i=0;$i<$string_length;$i++)
       {
           $a=($a+1)%256;
           $j=($j+$box[$a])%256;
           $tmp=$box[$a];
           $box[$a]=$box[$j];
           $box[$j]=$tmp;
           $result.=chr(ord($string[$i])^($box[($box[$a]+$box[$j])%256]));
       }
       if($operation=='D')
       {
           if(substr($result,0,8)==substr(md5(substr($result,8).$key),0,8))
           {
               return substr($result,8);
           }
           else
           {
               return'';
           }
       }
       else
       {
           return str_replace('=','',base64_encode($result));
       }
   }

?>
<STYLE type=text/css>
td img {display: block;}body,td,th {
       font-family: Tahoma, ËÎĚĺ;
       font-size: 12px;
       color: #000000;
}
body {
       margin-left: 0px;
       margin-top: 0px;
       margin-right: 0px;
       margin-bottom: 0px;
       background-image: url(../images/Page-BgTexture.jpg);
       background-repeat: repeat;
}
a:link {
       color: #A8031E;
       text-decoration: none;
}
a:visited {
       text-decoration: none;
       color: #A8031E;
}
a:hover {
       text-decoration: none;
       color: #A8031E;
}
a:active {
       text-decoration: none;
       color: #A8031E;
}
.style1 {
font-size: 12px;
}

table#itemshop {
border: 1px solid #CFCFCF;
  border-collapse: collapse;

}

table#itemshop td {
  border: 1px solid #CFCFCF;
   padding: 5px;
background-color:#EFEFEF;
}

img {
border:0;
}
</style>
<!DOCTYPE html 
       PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
 <meta name="Description" content="Tu wpisz opis zawarto?i strony" />
 <meta name="Keywords" content="Tu wpisz wyrazy kluczowe rozdzielone przecinkami" />
 <title>Eldorado Shop</title>
   <link rel="shortcut icon" href="pliki/favicon0.bmp" type="image/x-icon" />
</head>
<body style="background: url(images/tlo.jpg);">


<Center>
<table id="calosc" border="0px" cellspacing="0px">
<tr>
<td>
<a href="http://5.87.32.39/itemshop/index.php"><img src="enter/img/header.png" width="586" height="125"></a>
</td>
</tr>
<tr>
<td>
      <center> <a href="enter/" class="link"><B><blink>KUP KAMIENIE</blink></b></a></center>
                                       <p class=wiadomosc><?php
               $exec_class="select classid,classname from shop_class order by classid  desc";
                       $result_class=mysql_query($exec_class);
                       while($rs_class=mysql_fetch_array($result_class)){

}
?></p>
                                               <table border="1">
                       <?php
                                                                                 if(isset($_SESSION["UserID"]) && strlen($_SESSION["UserID"])>1){
                                                                                 shop();
                                                                                 }else{login();}
                                                                                 function login(){
                                                                                 ?>
Nie jestes zalogowany! <a href="index.php" class="link"><b>Zaloguj sie</b></a>, a jezeli nie masz konta w grze <A href="include/rejestracja/index.php"><b>Zarejestruj sie</b></a>
<?php 
                                                                               }
                                                                               function shop(){
                                                                               echo "<font color=#000000><b>Nazwa Konta:</font>  ".$_SESSION["UserID"]."<br/><font color=#000000><b>Kamienie:</font>  ".$_SESSION["cash"]."  <Br/><a href=\"Loginout.php\" class=link>Wyloguj</a></p>";
                                                                               ?>


                                       <?php
                                                                               $classid=$_GET["classid"];
                                                                               if($classid<0 || $classid=="" || is_numeric($classid)==false){$classid=0;}
                                                                               if($classid>0){
                                                                               $exec="select count(*) from item_proto where vnum in (select vnum from item_proto_shop where classid=$classid)";
                                                                               }else{
                                                                               $exec="select count(*) from item_proto where vnum in (select vnum from item_proto_shop)";
                                                                               }
               mysql_query("SET NAMES 'utf8'");
                       $result=mysql_query($exec);
                       $rs=mysql_fetch_array($result);
                       $num=$rs[0];
                       if(empty($_GET['page'])){
                               $page=0;
                       }else{
                               $page=$_GET['page'];
                               if($page<0)$page=0;
                               if($page>=ceil($num/3))$page=ceil($num/3)-1;
                       }
                       if($classid>0){
                       $exec="select item_proto.vnum,item_proto.locale_name,item_proto_shop.img,item_proto_shop.prices,item_proto_shop.content from item_proto,item_proto_shop where item_proto.vnum =item_proto_shop.vnum and  item_proto_shop.classid=$classid order by item_proto.vnum  desc limit ".($page*3).",3";
                       }else{
                       $exec="select item_proto.vnum,item_proto.locale_name,item_proto_shop.img,item_proto_shop.prices,item_proto_shop.content from item_proto,item_proto_shop where item_proto.vnum =item_proto_shop.vnum  order by item_proto.vnum  desc limit ".($page*3).",3";
                       }


                       $result=mysql_query($exec);
                       while($rs=mysql_fetch_array($result)){
                       $i+=1;
                 ?>


<table border="0" id="itemshop">
 <tr>
   <td width="80" rowspan="3" align="center">

<div><img src="<?=urldecode($rs["img"])?>" border="0" height="83" width="83" /></div></a>

   </td>
   <td class="header" width="30%"><div align="left"><?=$rs["locale_name"]?></div></td>
   <td class="header" width="300px"><div align="right"><b>Cena:</b> <?=$rs["prices"]?> Kamieni</div></td>
 </tr>
 <tr>
   <td colspan="2" align="right"> <a href="player.php?id=<?=$rs["vnum"]?>" title="Kup Teraz<?=$rs["prices"]?>Kup Teraz" ><img src="przycisk.png"></a></from></td>
   </tr>
</table>  

                                                                               <?
                                                                               }
                                                                               ?>         
                                                                               <center> <a href="?classid=<?=$_GET["classid"]?>&page=<?=($page-1)?>" class="link">Poprzednia</a> | 
<a href="?classid=<?=$_GET["classid"]?>&page=<?=($page+1)?>" class="link">Nastepna</a> </center><br/>                     
<?php
}
?>


</td>
     </tr>
   </table>
                        <Br/>
</td>
</tr>
</table>
</center>
</body>
</html>

 

 

Szukam grafików, questerów Metin2, koderów www, skrypterów, programistów visual c++, c++.
Techników od bazy danych, systemów linuksowych( głównie FreeBSD).

[email protected] - > Pisać - > Rozpatrzę propozycje :)

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.

Ostatnio przeglądający 0

  • Brak zarejestrowanych użytkowników przeglądających tę stronę.

Konto

Nawigacja

Skonfiguruj powiadomienia push w przeglądarce

Chrome (Android)
  1. Stuknij ikonę kłódki obok paska adresu.
  2. Stuknij Uprawnienia → Powiadomienia.
  3. Dostosuj swoje ustawienie.
Chrome (Komputer)
  1. Kliknij ikonę kłódki na pasku adresu.
  2. Wybierz Ustawienia witryny.
  3. Znajdź Powiadomienia i dostosuj swoje ustawienie.