Ejemplo n.º 1
0
<?php

require_once 'includes/allitemsets.php';
$smarty->config_load($conf_file, 'itemset');
$cache_key = cache_key();
if (!($itemsets = load_cache(ITEMSET_LISTING, $cache_key))) {
    unset($itemsets);
    $rows = $DB->select('
		SELECT ?#
		FROM ?_itemset
		ORDER by name_loc' . $_SESSION['locale'] . '
		{LIMIT ?d}', $itemset_col[0], $AoWoWconf['limit'] != 0 ? $AoWoWconf['limit'] : DBSIMPLE_SKIP);
    $itemsets = array();
    foreach ($rows as $row) {
        $itemsets[] = itemsetinfo2($row);
    }
    save_cache(ITEMSET_LISTING, $cache_key, $itemsets);
}
$smarty->assign('itemsets', $itemsets);
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => $smarty->get_config_vars('Item_Sets'), 'tab' => 0, 'type' => 0, 'typeid' => 0, 'path' => '[0, 2]');
$smarty->assign('page', $page);
// --Передаем данные шаблонизатору--
// Количество MySQL запросов
$smarty->assign('mysql', $DB->getStatistics());
// Запускаем шаблонизатор
$smarty->display('itemsets.tpl');
Ejemplo n.º 2
0
		WHERE Title LIKE ? {OR q.entry IN (?a)}
	', $m ? $_SESSION['locale'] : DBSIMPLE_SKIP, $m ? 1 : DBSIMPLE_SKIP, $nsearch, $m ? $m : DBSIMPLE_SKIP);
unset($m);
unset($t);
unset($tmp);
foreach ($rows as $numRow => $row) {
    $found['quest'][] = GetQuestInfo($row, 0xffffff);
}
// Ищем наборы вещей
$rows = $DB->select('
		SELECT *
		FROM ?_itemset
		WHERE name LIKE ?
	', $nsearch);
foreach ($rows as $numRow => $row) {
    $found['itemset'][] = itemsetinfo2($row);
}
// Ищем спеллы
$rows = $DB->select('
		SELECT ?#, spellID
		FROM ?_spell s, ?_spellicons i
		WHERE
			s.spellname like ?
			AND i.id = s.spellicon
	', $spell_cols[2], $nsearch);
foreach ($rows as $numRow => $row) {
    $found['spell'][] = spellinfo2($row);
}
$keys = array_keys($found);
if (count($found) == 1 and count($found[$keys[0]]) == 1) {
    header("Location: ?" . $keys[0] . '=' . $found[$keys[0]][0]['entry']);
Ejemplo n.º 3
0
            $spell['usedbyitem'] = array();
            foreach ($usedbyitem as $i => $row) {
                $spell['usedbyitem'][] = iteminfo2($row, 0);
            }
            unset($usedbyitem);
        }
        // Используется наборами вещей:
        $usedbyitemset = $DB->select('
			SELECT *
			FROM ?_itemset
			WHERE spell1 = ?d OR spell2 = ?d OR spell3 = ?d OR spell4 = ?d OR spell5 = ?d OR spell6 = ?d OR spell7 = ?d OR spell8 = ?d
			', $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry']);
        if ($usedbyitemset) {
            $spell['usedbyitemset'] = array();
            foreach ($usedbyitemset as $i => $row) {
                $spell['usedbyitemset'][] = itemsetinfo2($row);
            }
            unset($usedbyitemset);
        }
        // Спелл - награда за квест
        $questreward = $DB->select('
			SELECT c.?#
			{ , Title_loc?d AS Title_loc }
			FROM quest_template c
			{ LEFT JOIN (locales_quest l) ON c.entry = l.entry AND ? }
			WHERE
				RewSpell = ?d
				OR RewSpellCast = ?d
			', $quest_cols[2], $_SESSION['locale'] > 0 ? $_SESSION['locale'] : DBSIMPLE_SKIP, $_SESSION['locale'] > 0 ? 1 : DBSIMPLE_SKIP, $spell['entry'], $spell['entry']);
        if ($questreward) {
            $spell['questreward'] = array();