コード例 #1
0
ファイル: allevents.php プロジェクト: Kheros/tc_aowow
function event_description($entry)
{
    global $DB;
    $result = event_infoline(array(array('eventEntry' => $entry)));
    if (is_array($result) && count($result) > 0) {
        $result = reset($result);
    } else {
        return NULL;
    }
    $result['period'] = sec_to_time(intval($result['occurence']) * 60);
    $result['npcs_guid'] = $DB->selectCol('SELECT guid FROM game_event_creature WHERE eventEntry=?d OR eventEntry=?d', $entry, -$entry);
    $result['objects_guid'] = $DB->selectCol('SELECT guid FROM game_event_gameobject WHERE eventEntry=?d OR eventEntry=?d', $entry, -$entry);
    $result['creatures_quests_id'] = $DB->select('SELECT id AS creature, quest FROM game_event_creature_quest WHERE eventEntry=?d OR eventEntry=?d GROUP BY quest', $entry, -$entry);
    return $result;
}
コード例 #2
0
ファイル: allevents.php プロジェクト: wow4all/OpenRepack
function event_description($entry)
{
    global $DB;
    $result = event_infoline(array(array('eventEntry' => $entry)));
    if (is_array($result) && count($result) > 0) {
        $result = reset($result);
    } else {
        return NULL;
    }
    $result['period'] = sec_to_time(intval($result['occurence']) * 60);
    $result['npcs_guid'] = $DB->selectCol('SELECT guid FROM game_event_creature WHERE eventEntry=?d OR eventEntry=?d', $entry, -$entry);
    $result['objects_guid'] = $DB->selectCol('SELECT guid FROM game_event_gameobject WHERE eventEntry=?d OR eventEntry=?d', $entry, -$entry);
    $result['creatures_quests_id'] = $DB->select('SELECT id AS creature, quest FROM game_event_creature_quest WHERE eventEntry=?d OR eventEntry=?d GROUP BY quest', $entry, -$entry);
    $result['exdesc'] = $DB->selectCell('SELECT name_loc?d FROM aowow_events WHERE id=?d', $_SESSION['locale'], $entry);
    $result['exdescimg'] = $DB->selectCell('SELECT img FROM aowow_events WHERE id=?d', $entry);
    $icon = $DB->selectCell('SELECT icon FROM aowow_events WHERE id=?d', $entry);
    $result['icon'] = '/images/events/' . $icon;
    return $result;
}
コード例 #3
0
ファイル: events.php プロジェクト: wow4all/OpenRepack
<?php

require_once 'includes/allevents.php';
require_once 'includes/allreputation.php';
$smarty->config_load($conf_file, 'event');
@(list($category) = extract_values($podrazdel));
$events = array();
$events['data'] = event_infoline(event_find());
//save_cache(EVENTS_LISTING, $cache_key, $events);
global $page;
$page = array('Mapper' => false, 'Book' => false, 'Title' => ($events['category'] ? $events['category'] . ' - ' : '') . $smarty->get_config_vars('Events'), 'tab' => 0, 'type' => 11, 'typeid' => 0, 'username' => $_SESSION['username'], 'path' => path(0, 11));
$smarty->assign('page', $page);
// Статистика выполнения mysql запросов
$smarty->assign('mysql', $DB->getStatistics());
$smarty->assign('reputation', getreputation($page['username']));
$smarty->assign('events', $events);
// Загружаем страницу
$smarty->display('events.tpl');