source: aowow/itemsets.php

Last change on this file was 170, checked in by maron, 15 years ago
  • Property svn:executable set to *
File size: 1.2 KB
Line 
1<?php
2
3require_once('includes/allitemsets.php');
4
5$smarty->config_load($conf_file);
6
7global $DB;
8global $allitems;
9global $itemset_col;
10global $AoWoWconf;
11
12if(!$itemsets = load_cache(9, 'x'))
13{
14 unset($itemsets);
15
16 $rows = $DB->select('
17 SELECT ?#
18 FROM ?_itemset
19 ORDER by name
20 {LIMIT ?d}',
21 $itemset_col[0],
22 ($AoWoWconf['limit']!=0)? $AoWoWconf['limit']: DBSIMPLE_SKIP
23 );
24
25 $itemsets = array();
26 foreach ($rows as $numRow=>$row)
27 $itemsets[] = itemsetinfo2($row);
28
29 save_cache(9, 'x', $itemsets);
30}
31$smarty->assign('itemsets', $itemsets);
32
33global $page;
34$page = array(
35 'Mapper' => false,
36 'Book' => false,
37 'Title' => $smarty->get_config_vars('Item_Sets'),
38 'tab' => 0,
39 'type' => 0,
40 'typeid' => 0,
41 'path' => '[0, 2]'
42);
43$smarty->assign('page', $page);
44
45// --Передаем данные шаблонизатору--
46// Количество MySQL запросов
47$smarty->assign('mysql', $DB->getStatistics());
48// Если хоть одна информация о вещи найдена - передаём массив с информацией о вещях шаблонизатору
49if (isset($allitems))
50 $smarty->assign('allitems',$allitems);
51// Запускаем шаблонизатор
52$smarty->display('itemsets.tpl');
53
54?>
Note: See TracBrowser for help on using the repository browser.