Am urmatorul quest/php , si vreau ca in loc de MD (coins) sa foloseasca yang (gold).
**Ex: Pun itemul in casuta asta >
> se creeaza in baza >
, dar am nevoie ca acel script PHP sa-mi citeasca in loc de COINS > GOLD (yang)
Cod: Selectaţi tot
<h2>Auction</h2>
<?php
if(isset($_SESSION['user_admin']) && checkInt($_SESSION['user_admin']) && $_SESSION['user_admin'] >= 0)
{
?>
<p><a href="?s=aukcia">Browse Auction</a> • <a href="?s=aukcia_pridat">Add Item</a> • <a href="?s=aukcia_moje">List Your Offers</a></p>
<!--<p>Zoznam itemov v aukcii.</p>-->
<?php
if($_GET["id"] and $_GET["vnum"])
{
$kontrola = mysql_query("SELECT * FROM ".SQL_HP_DB.".auction_system WHERE id='".mysql_real_escape_string($_GET['id'])."' AND vnum='".mysql_real_escape_string($_GET['vnum'])."'");
if(mysql_num_rows($kontrola) >= 1)
{
$sqlItem = "SELECT * FROM ".SQL_HP_DB.".auction_system WHERE id='".mysql_real_escape_string($_GET['id'])."' AND vnum='".mysql_real_escape_string($_GET['vnum'])."'";
$sqlQry = mysql_query($sqlItem);
?>
<table>
<tr>
<th class="topLine">Name</th>
<th class="topLine">Owner</th>
<th class="topLine">Price</th>
<th class="topLine">Action</th>
</tr>
<?PHP
$x=0;
while($getItems=mysql_fetch_object($sqlQry)) {
$zF=($x%2==0) ? "tdunkel" : "thell";
$getName = compareItems($getItems->vnum);
$owner_id = mysql_real_escape_string($getItems->owner_id);
$test10 = mysql_query("SELECT name FROM player.player WHERE account_id='".mysql_real_escape_string($owner_id)."'");
$fetch10 = mysql_fetch_object($test10);
echo'<tr>';
echo'<td class="'.$zF.'">'.mysql_real_escape_string($getName['item']).'</td>
<td class="'.$zF.'">'.mysql_real_escape_string($fetch10->name).'</td>
<td class="'.$zF.'"><b><font color="green">'.mysql_real_escape_string($getItems->cena).'</font></b> coins</td>
<td class="'.$zF.'" width="50">';
if($_SESSION['user_coins'] >= $getItems->cena)
{
echo'<center><a href="?s=aukcia_kupit&id='.mysql_real_escape_string($getItems->id).'&vnum='.mysql_real_escape_string($getItems->vnum).'">
<img src="img/buy0.png" onmouseover="javascript:this.src=\'img/buy1.png\'" onmouseout="javascript:this.src=\'img/buy0.png\'" title="Kúpiť">
</a>';
}
else
{
echo'You do not have enough coins.';
}
echo'</td>
</tr>';
$x++;
}
echo'</table>';
$sqlCmd = "SELECT * FROM ".SQL_HP_DB.".auction_system WHERE id='".mysql_real_escape_string($_GET['id'])."' AND vnum='".mysql_real_escape_string($_GET['vnum'])."'";
$sqlQry = mysql_query($sqlCmd,$sqlServ);
echo"<table class=\"itemlist\">\n<tr>\n";
echo"<th class=\"topLine\">ID</th>\n";
echo"<th class=\"topLine\">Item name</th>\n";
echo"<th class=\"topLine\">Count</th>";
echo"<th class=\"topLine\">Stones</th>\n";
echo"<th class=\"topLine\">Bonuses</th>\n</tr>\n";
$x=0;
while($getItems=mysql_fetch_object($sqlQry)) {
if(($x%2)==0)
{
$zF="tdunkel";
}
else
{
$zF="tdunkel";
}
$getName = compareItems($getItems->vnum);
echo'<tr>';
echo'<td class="'.$zF.'">'.mysql_real_escape_string($getItems->id).'</td>';
echo'<td class="'.$zF.'">'.mysql_real_escape_string($getName['item']).'</td>';
echo'<td class="'.$zF.'">'.mysql_real_escape_string($getItems->count).'</td>';
echo'<td class="'.$zF.'">';
for($i=0;$i<6;$i++) {
if($i==0) { $akSocket = $getItems->socket0; }
if($i==1) { $akSocket = $getItems->socket1; }
if($i==2) { $akSocket = $getItems->socket2; }
if($i==3) { $akSocket = $getItems->socket3; }
if($i==4) { $akSocket = $getItems->socket4; }
if($i==5) { $akSocket = $getItems->socket5; }
echo'#'.($i+1).' ';
if(isset($itemSteine[$akSocket])) {
echo $itemSteine[$akSocket];
}
else {
echo $akSocket;
}
echo'<br/>';
}
echo'</td>';
echo'<td class="'.$zF.'">';
for($i=0;$i<7;$i++) {
if($i==0) { $akBoni = $getItems->attrtype0; $akWert = $getItems->attrvalue0; }
if($i==1) { $akBoni = $getItems->attrtype1; $akWert = $getItems->attrvalue1; }
if($i==2) { $akBoni = $getItems->attrtype2; $akWert = $getItems->attrvalue2; }
if($i==3) { $akBoni = $getItems->attrtype3; $akWert = $getItems->attrvalue3; }
if($i==4) { $akBoni = $getItems->attrtype4; $akWert = $getItems->attrvalue4; }
if($i==5) { $akBoni = $getItems->attrtype5; $akWert = $getItems->attrvalue5; }
if($i==6) { $akBoni = $getItems->attrtype6; $akWert = $getItems->attrvalue6; }
echo'#'.($i+1).' ';
if(isset($itemBoni[$akBoni])) {
echo $itemBoni[$akBoni];
}
else {
echo $akBoni;
}
echo': '.$akWert;
echo'<br/>';
}
echo'</td>';
echo'</tr>';
$x++;
}
echo'</table>';
echo'<p><a href="?s=aukcia">Back</a>';
}
else
{
echo'<p>This ID does not exist.</p>';
}
}
else
{
$sqlItem = mysql_query("SELECT * FROM ".SQL_HP_DB.".auction_system");
if(mysql_num_rows($sqlItem) >= 1)
{
echo'<table>
<tr>
<th class="topLine">Name</th>
<th class="topLine">Owner</th>
<th class="topLine">Price</th>
<!-- <th class="topLine">ID Majiteľa</th> -->
<th class="topLine">Action</th>
</tr>';
$x=0;
while($aukcia=mysql_fetch_object($sqlItem))
{
$owner_id = mysql_real_escape_string($aukcia->owner_id);
$test10 = mysql_query("SELECT name FROM player.player WHERE account_id='".mysql_real_escape_string($owner_id)."'");
$fetch10 = mysql_fetch_object($test10);
$getName = compareItems($aukcia->vnum);
$zF=($x%2==0) ? "tdunkel" : "thell";
echo'<tr>
<td class="'.$zF.'">'.mysql_real_escape_string($getName['item']).'</td>
<td class="'.$zF.'">'.mysql_real_escape_string($fetch10->name).'</td>
<td class="'.$zF.'"><b><font color="green">'.mysql_real_escape_string($aukcia->cena).' </font></b>Coins</td>
<!-- <td class="'.$zF.'">'.mysql_real_escape_string($aukcia->owner_id).'</td> -->
<td class="'.$zF.'">';
echo'<center><a href="?s=aukcia&id='.mysql_real_escape_string($aukcia->id).'&vnum='.mysql_real_escape_string($aukcia->vnum).'">More Info</a></center>';
echo'</td>
</tr>';
$x++;
}
echo'</table>';
}
else
{
echo'<br><p>The auctions are currently no items.</p>';
}
}
}
else
{
echo'<p class="meldung">You must be logged in for this area.</p>';
}
?>

