Changeset 178 for minimanager/ahstats.php
- Timestamp:
- Dec 23, 2007, 2:55:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/ahstats.php
r142 r178 8 8 * License: GNU General Public License v2(GPL) 9 9 */ 10 10 11 11 require_once("header.php"); 12 12 valid_login(0); … … 44 44 } else $order_side = ""; 45 45 } else $order_side = ""; 46 46 47 47 $result = $sql->query("SELECT `character`.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`, 48 48 `auctionhouse`.`time`-unix_timestamp(), `c2`.`name` AS `encherisseur`, `auctionhouse`.`lastbid`, `auctionhouse`.`startbid`, SUBSTRING_INDEX(SUBSTRING_INDEX(`item_instance`.`data`, ' ',15), ' ',-1) AS qty, `character`.`race` AS seller_race, `c2`.`race` AS buyer_race … … 58 58 <input type=\"hidden\" name=\"action\" value=\"search_auctions\" /> 59 59 <input type=\"hidden\" name=\"error\" value=\"2\" /> 60 <table class=\"hidden\"> 60 <table class=\"hidden\"> 61 61 <tr><td> 62 62 <td><input type=\"text\" size=\"25\" name=\"search_value\" /></td> … … 68 68 <option value=\"buyer_name\">{$lang_auctionhouse['buyer_name']}</option> 69 69 </select></td> 70 70 71 71 <td><select name=\"search_class\"> 72 72 <option value=\"-1\">{$lang_auctionhouse['all']}</option> … … 82 82 <option value=\"15\">{$lang_item['misc_short']}</option> 83 83 </select></td> 84 84 85 85 <td><select name=\"search_quality\"> 86 86 <option value=\"-1\">{$lang_auctionhouse['all']}</option> … … 99 99 $output .= generate_pagination("ahstats.php?action=browse_auctions&order_by=$order_by&dir=".!$dir, $all_record, $itemperpage, $start); 100 100 $output .= "</td></tr></table> 101 101 102 102 <table class=\"lined\"> 103 103 <tr> … … 121 121 $value = "<b>".((!empty($rows[10])) ? "<font color=".$sidecolor[$rows[10]].">$value</font>" : "N/A")."</b>"; 122 122 break; 123 case 7: 123 case 7: 124 124 case 6: 125 125 case 3: … … 129 129 $value -= $s*100; 130 130 $c = $value; 131 $value = $g."<img src=\"./img/gold.gif\" /> ".$s."<img src=\"./img/silver.gif\" /> ".$c."<img src=\"./img/copper.gif\" /> "; 131 $value = $g."<img src=\"./img/gold.gif\" /> ".$s."<img src=\"./img/silver.gif\" /> ".$c."<img src=\"./img/copper.gif\" /> "; 132 132 break; 133 133 case 2: 134 $value = "<a href=\"$item_datasite$rows[1]\" target=\"_blank\" onmouseover=\"toolTip('".addslashes(get_item_tooltip($rows[1]))."','item_tooltip')\" onmouseout=\"toolTip()\"><img src=\"".get_icon($rows[1])."\" class=\"icon_border \" alt=\"$value\"><br/>$value".(($rows[8]>1) ? " (x$rows[8])" : "")."</img></a>";134 $value = "<a href=\"$item_datasite$rows[1]\" target=\"_blank\" onmouseover=\"toolTip('".addslashes(get_item_tooltip($rows[1]))."','item_tooltip')\" onmouseout=\"toolTip()\"><img src=\"".get_icon($rows[1])."\" class=\"icon_border_0\" alt=\"$value\"><br/>$value".(($rows[8]>1) ? " (x$rows[8])" : "")."</img></a>"; 135 135 break; 136 136 case 0: … … 143 143 } 144 144 $sql->close(); 145 145 146 146 $output .= "<tr><td colspan=\"7\" class=\"hidden\" align=\"right\">{$lang_auctionhouse['total_auctions']} : $all_record</td></tr> 147 147 </table></center>"; … … 153 153 //######################################################################################################################## 154 154 function search_auctions() { 155 global $lang_auctionhouse, $lang_global, $lang_item, $output, $characters_db, $realm_id, $mangos_db, 155 global $lang_auctionhouse, $lang_global, $lang_item, $output, $characters_db, $realm_id, $mangos_db, 156 156 157 157 $itemperpage, $item_datasite, $server, $user_lvl, $user_id, $sql_search_limit; … … 186 186 } else $order_side = ""; 187 187 } else $order_side = ""; 188 188 189 189 switch ($search_by) { 190 190 case "item_name": 191 191 192 192 if(( ($search_class >= 0) || ($search_quality >= 0))&&(!isset($search_value))){ 193 193 if ($search_class >= 0) $search_filter = " AND item_template.class = '$search_class'"; … … 199 199 if ($search_class >= 0) $item_prefix .= "AND class = '$search_class' "; 200 200 if ($search_quality >= 0) $item_prefix .= "AND Quality = '$search_quality' "; 201 201 202 202 $result = $sql->query("SELECT entry FROM `mangos`.`item_template` WHERE name LIKE '%$search_value%' $item_prefix"); 203 203 $search_filter = "AND auctionhouse.item_template IN(0"; … … 206 206 } 207 207 break; 208 208 209 209 case "item_id": 210 210 $search_filter = "AND auctionhouse.item_template = '$search_value'"; … … 241 241 <tr><td> 242 242 <input type=\"text\" size=\"30\" name=\"search_value\" /> 243 243 244 244 <select name=\"search_by\"> 245 245 <option value=\"item_name\">{$lang_auctionhouse['item_name']}</option> … … 248 248 <option value=\"buyer_name\">{$lang_auctionhouse['buyer_name']}</option> 249 249 </select></form> 250 250 251 251 <select name=\"search_class\"> 252 252 <option value=\"-1\">{$lang_auctionhouse['all']}</option> … … 262 262 <option value=\"15\">{$lang_item['misc_short']}</option> 263 263 </select> 264 264 265 265 <select name=\"search_quality\"> 266 266 <option value=\"-1\">{$lang_auctionhouse['all']}</option> … … 278 278 $output .= "</td> 279 279 </tr></table></form> 280 280 281 281 <table class=\"lined\"> 282 282 <tr> … … 300 300 $value = "<b>".((!empty($rows[10])) ? "<font color=".$sidecolor[$rows[10]].">$value</font>" : "N/A")."</b>"; 301 301 break; 302 case 7: 302 case 7: 303 303 case 6: 304 304 case 3: … … 308 308 $value -= $s*100; 309 309 $c = $value; 310 $value = $g."<img src=\"./img/gold.gif\" /> ".$s."<img src=\"./img/silver.gif\" /> ".$c."<img src=\"./img/copper.gif\" /> "; 310 $value = $g."<img src=\"./img/gold.gif\" /> ".$s."<img src=\"./img/silver.gif\" /> ".$c."<img src=\"./img/copper.gif\" /> "; 311 311 break; 312 312 case 2: 313 $value = "<a href=\"$item_datasite$rows[1]\" target=\"_blank\" onmouseover=\"toolTip('".addslashes(get_item_tooltip($rows[1]))."','item_tooltip')\" onmouseout=\"toolTip()\"><img src=\"".get_icon($rows[1])."\" class=\"icon_border \" alt=\"$value\"><br/>$value".(($rows[8]>1) ? " (x$rows[8])" : "")."</img></a>";313 $value = "<a href=\"$item_datasite$rows[1]\" target=\"_blank\" onmouseover=\"toolTip('".addslashes(get_item_tooltip($rows[1]))."','item_tooltip')\" onmouseout=\"toolTip()\"><img src=\"".get_icon($rows[1])."\" class=\"icon_border_0\" alt=\"$value\"><br/>$value".(($rows[8]>1) ? " (x$rows[8])" : "")."</img></a>"; 314 314 break; 315 315 case 0: … … 322 322 } 323 323 $sql->close(); 324 324 325 325 $output .= "<tr><td colspan=\"7\" class=\"hidden\" align=\"right\">{$lang_auctionhouse['tot_found']} : $tot_found {$lang_global['limit']} : $sql_search_limit</td></tr> 326 326 </table></center>"; … … 332 332 //######################################################################################################################## 333 333 $err = (isset($_GET['error'])) ? $_GET['error'] : NULL; 334 334 335 335 $output .= "<div class=\"top\">"; 336 336 switch ($err) { … … 349 349 350 350 switch ($action) { 351 case "browse_auctions": 351 case "browse_auctions": 352 352 browse_auctions(); 353 353 break; 354 case "search_auctions": 354 case "search_auctions": 355 355 search_auctions(); 356 356 break;
Note:
See TracChangeset
for help on using the changeset viewer.