Ignore:
Timestamp:
Nov 23, 2007, 11:29:33 PM (17 years ago)
Author:
george
Message:

Minimanager 0.1.5b

File:
1 edited

Legend:

Unmodified
Added
Removed
  • minimanager/ahstats.php

    r19 r142  
    1717//########################################################################################################################
    1818function browse_auctions() {
    19  global $lang_auctionhouse, $lang_global, $lang_item, $output, $mangos_db, $realm_id,
     19 global $lang_auctionhouse, $lang_global, $lang_item, $output, $characters_db, $realm_id, $mangos_db,
    2020                $itemperpage, $item_datasite, $server, $user_lvl, $user_id;
    2121
     
    2626
    2727 $sql = new SQL;
    28  $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);
     28 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
    2929
    3030 $start = (isset($_GET['start'])) ? $sql->quote_smart($_GET['start']) : 0;
     
    4747 $result = $sql->query("SELECT `character`.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`,
    4848 `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
    49  FROM `character`, `item_instance`,`item_template`, `auctionhouse` LEFT JOIN `character` c2 ON `c2`.`guid`=`auctionhouse`.`buyguid`
     49 FROM `".$characters_db[$realm_id]['name']."`.`character` , `".$characters_db[$realm_id]['name']."`.`item_instance` , `".$mangos_db[$realm_id]['name']."`.`item_template` , `".$characters_db[$realm_id]['name']."`.`auctionhouse`
     50LEFT JOIN `".$characters_db[$realm_id]['name']."`.`character` c2 ON `c2`.`guid`=`auctionhouse`.`buyguid`
    5051 WHERE `auctionhouse`.`itemowner`=`character`.`guid` AND `auctionhouse`.`item_template`=`item_template`.`entry` AND `auctionhouse`.`itemguid`=`item_instance`.`guid`
    5152 $order_side ORDER BY `auctionhouse`.`$order_by` $order_dir LIMIT $start, $itemperpage");
     
    152153//########################################################################################################################
    153154function search_auctions() {
    154  global $lang_auctionhouse, $lang_global, $lang_item, $output, $mangos_db, $realm_id,
     155 global $lang_auctionhouse, $lang_global, $lang_item, $output, $characters_db, $realm_id, $mangos_db,
     156
    155157                $itemperpage, $item_datasite, $server, $user_lvl, $user_id, $sql_search_limit;
    156158
     
    161163
    162164 $sql = new SQL;
    163  $sql->connect($mangos_db[$realm_id]['addr'], $mangos_db[$realm_id]['user'], $mangos_db[$realm_id]['pass'], $mangos_db[$realm_id]['name']);
     165 $sql->connect($characters_db[$realm_id]['addr'], $characters_db[$realm_id]['user'], $characters_db[$realm_id]['pass'], $characters_db[$realm_id]['name']);
    164166
    165167 $order_by = (isset($_GET['order_by'])) ? $sql->quote_smart($_GET['order_by']) : "time";
     
    198200                if ($search_quality >= 0) $item_prefix .= "AND Quality = '$search_quality' ";
    199201               
    200                 $result = $sql->query("SELECT entry FROM item_template WHERE name LIKE '%$search_value%' $item_prefix");
     202                $result = $sql->query("SELECT entry FROM `mangos`.`item_template` WHERE name LIKE '%$search_value%' $item_prefix");
    201203                $search_filter = "AND auctionhouse.item_template IN(0";
    202204                while ($item = $sql->fetch_row($result)) $search_filter .= ", $item[0]";
     
    224226                redirect("ahstats.php?error=1");
    225227 }
    226                
    227  $result = $sql->query("SELECT `character`.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`,
     228
     229$result = $sql->query("SELECT `character`.`name` AS `seller`, `auctionhouse`.`item_template` AS `itemid`, `item_template`.`name` AS `itemname`, `auctionhouse`.`buyoutprice` AS `buyout`,
    228230 `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
    229  FROM `character`, `item_instance`,`item_template`, `auctionhouse` LEFT JOIN `character` c2 ON `c2`.`guid`=`auctionhouse`.`buyguid`
     231 FROM `".$characters_db[$realm_id]['name']."`.`character` , `".$characters_db[$realm_id]['name']."`.`item_instance` , `".$mangos_db[$realm_id]['name']."`.`item_template` , `".$characters_db[$realm_id]['name']."`.`auctionhouse` LEFT JOIN `".$characters_db[$realm_id]['name']."`.`character` c2 ON `c2`.`guid`=`auctionhouse`.`buyguid`
    230232 WHERE `auctionhouse`.`itemowner`=`character`.`guid` AND `auctionhouse`.`item_template`=`item_template`.`entry` AND `auctionhouse`.`itemguid`=`item_instance`.`guid` $search_filter
    231233 $order_side ORDER BY `auctionhouse`.`$order_by` $order_dir LIMIT $sql_search_limit");
Note: See TracChangeset for help on using the changeset viewer.