Вывод имени аукционбота.)
[cswow.git] / module / auction / auctionhouse.php
blob954943f5f23edbfed7fc5b412416add94f09f2b9
1 <?php
2 include_once("conf.php");
3 include_once("include/functions.php");
4 $page = intval(@$_REQUEST['page']);
5 $type = @$_REQUEST['auction'];
7 switch ($type)
9 case "Alliance":
10 $houseid="(houseid=1 or houseid=2 or houseid=3)";
11 break;
12 case "Horde":
13 $houseid="(houseid=4 or houseid=5 or houseid=6)";
14 break;
15 default:
16 $type="Blackwater";
17 $houseid="(houseid=7)";
18 break;
21 $rows = $cDB->selectPage($number,
22 "SELECT
23 `auction`.`id`,
24 `auction`.`itemguid`,
25 `auction`.`item_template`,
26 `auction`.`itemowner`,
27 `auction`.`buyoutprice`,
28 `auction`.`time`,
29 `auction`.`buyguid`,
30 `auction`.`lastbid`,
31 `auction`.`startbid`,
32 `auction`.`deposit`,
33 `auction`.`houseid`,
35 (SUBSTRING_INDEX( SUBSTRING_INDEX(`item_instance`.`data` , ' ' , ?d) , ' ' , -1 )+0) AS `itementry`,
36 `item_instance`.`data`,
37 `item_instance`.`owner_guid`
38 FROM
39 `auction`
40 left join
41 `item_instance`
42 ON `auction`.`itemguid` = `item_instance`.`guid`
43 WHERE
44 $houseid
45 LIMIT ?d, ?d",
46 ITEM_FIELD_ENTRY+1,
47 getPageOffset($page), $config['fade_limit']);
48 echo "<table class=report width=500>";
49 echo "<tbody>";
50 echo "<tr><td colspan=4 class=head>";
51 echo "<img src=\"images/gold.gif\">";
52 echo "<a href=\"?auction=Alliance\" style=\"Text-decoration: none; color:gold;\">&nbsp;$lang[Alliance]&nbsp;</a>";
53 echo "<img src=\"images/gold.gif\">";
54 echo "<a href=\"?auction=Horde\" style=\"Text-decoration: none; color:gold;\">&nbsp;$lang[Horde]&nbsp;</a>";
55 echo "<img src=\"images/gold.gif\">";
56 echo "<a href=\"?auction=Blackwater\" style=\"Text-decoration: none; color:gold;\">&nbsp;$lang[Blackwater]&nbsp;</a>";
57 echo "<img src=\"images/gold.gif\">";
58 echo "</td></tr>";
60 if ($rows)
62 echo "<tr><td colspan=4 class=head>$number $lang[items]</td></tr>";
63 echo "<tr>";
64 echo "<th width=1px></th>";
65 echo "<th width=50%>".$lang['auction_seller']."</th>";
66 echo "<th width=25%>".$lang['auction_cost']."</th>";
67 echo "<th width=25%>".$lang['auction_bye']."</th>";
68 echo "</tr>\n";
69 foreach ($rows as $auc_data)
71 $item_data = explode(' ', $auc_data['data']);
72 echo "<tr>";
73 echo "<td>"; show_item_by_data($item_data, 'auction'); echo "</td>";
74 if ($auc_data['itemowner'] == 0)
75 echo "<td align=center><font color=#ff0000>".$lang['auctionbot']."</font></td>";
76 else
77 echo "<td><a href=?player=$auc_data[itemowner]>".getCharacterName($auc_data['itemowner'])."</a></td>";
78 echo "<td align=center>".money($auc_data['startbid'])."</td>";
79 echo "<td align=center>".money($auc_data['buyoutprice'])."</td>";
80 echo "</tr>\n";
82 generatePage($number, $page, "<a href=\"?auction=$type&page=%d\">%d </a>", 4);
84 else
85 echo "<tr><td colspan=4 align=center>$lang[empty]</td></tr>";
86 echo "</tbody></table>";