<?php

/*
 * UDWBase: WOWDB Web Interface
 *
 * © UDW 2009-2011
 *
 * Released under the terms and conditions of the
 * GNU General Public License (http://gnu.org).
 *
 */
// Необходима функция questinfo
require_once 'includes/allquests.php';
$smarty->config_load($conf_file, 'quests');
// Разделяем из запроса класс и подкласс квестов
point_delim($podrazdel, $Type, $ZoneOrSort);
$cache_str = (empty($Type) ? 'x' : intval($Type)) . '_' . (empty($ZoneOrSort) ? 'x' : intval($ZoneOrSort));
if (!($quests = load_cache(12, $cache_str))) {
    unset($quests);
    global $DB, $quest_class, $quest_cols;
    $rows = $DB->select('
		SELECT ?#
		FROM ?_quest_template q
		WHERE
			1 = 1
			{ AND ZoneOrSort = ? }
			{ AND ZoneOrSort IN (?a) }
		ORDER BY Title
		{LIMIT ?d}
		', $quest_cols[2], isset($ZoneOrSort) ? $ZoneOrSort : DBSIMPLE_SKIP, (!isset($ZoneOrSort) and $Type) ? $quest_class[$Type] : DBSIMPLE_SKIP, $UDWBaseconf['limit'] > 0 ? $UDWBaseconf['limit'] : DBSIMPLE_SKIP);
    $quests = array();
Ejemplo n.º 2
0
<?php

// Необходима функция creatureinfo
require 'includes/allnpcs.php';
$smarty->config_load($conf_file, 'npcs');
global $npc_cols;
// Разделяем из запроса класс и подкласс вещей
point_delim($podrazdel, $type, $family);
$cache_str = (empty($type) ? 'x' : intval($type)) . '_' . (empty($family) ? 'x' : intval($family));
if (!($npcs = load_cache(2, $cache_str))) {
    unset($npcs);
    global $AoWoWconf;
    global $DB;
    $rows = $DB->select('
		SELECT c.?#, c.entry
		{
			, l.name_loc?d as `name_loc`
			, l.subname_loc' . $_SESSION['locale'] . ' as `subname_loc`
		}
		FROM ?_factiontemplate, creature_template c
		{ LEFT JOIN (locales_creature l) ON l.entry=c.entry AND ? }
		WHERE 1=1
			{AND type=?}
			{AND family=?}
			AND factiontemplateID=faction_A
		ORDER BY minlevel DESC, name
		{LIMIT ?d}
		', $npc_cols[0], $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $type != '' ? $type : DBSIMPLE_SKIP, isset($family) ? $family : DBSIMPLE_SKIP, $AoWoWconf['limit'] != 0 ? $AoWoWconf['limit'] : DBSIMPLE_SKIP);
    $npcs = array();
    foreach ($rows as $numRow => $row) {
        $npcs[$numRow] = array();
<?php

/*
 * UDWBase: WOWDB Web Interface
 *
 * © UDW 2009-2011
 *
 * Released under the terms and conditions of the
 * GNU General Public License (http://gnu.org).
 *
 */
// Необходима функция iteminfo
require_once 'includes/allitems.php';
$smarty->config_load($conf_file, 'items');
// Разделяем из запроса класс и подкласс вещей
point_delim($podrazdel, $class, $subclass);
global $DB;
$cache_str = (!isset($class) ? 'x' : intval($class)) . '_' . (!isset($subclass) ? 'x' : intval($subclass));
if (!($items = load_cache(7, $cache_str))) {
    unset($items);
    // Составляем запрос к БД, выполняющий поиск по заданным классу и подклассу
    $rows = $DB->select('
		SELECT ?#, i.entry, maxcount
			{, l.name_loc?d AS `name_loc`}
		FROM ?_aowow_icons, ?_item_template i
			{LEFT JOIN (?_locales_item l) ON l.entry=i.entry AND ?d}
		WHERE
			id=displayid
			{ AND class=? }
			{ AND subclass=? }
			ORDER BY quality DESC, name