Exemple #1
0
<?php

require_once 'includes/allevents.php';
require_once 'includes/allcomments.php';
require_once 'includes/allnpcs.php';
require_once 'includes/allobjects.php';
require_once 'includes/allquests.php';
$smarty->config_load($conf_file, 'event');
$id = intval($podrazdel);
$event = event_description($id);
if ($event) {
    if ($event['npcs_guid'] && ($ids = $DB->selectCol('SELECT id FROM creature WHERE guid IN (?a) GROUP BY id', $event['npcs_guid']))) {
        $event['npcs'] = array();
        foreach ($ids as $crid) {
            $event['npcs'][] = creatureinfo($crid);
        }
    }
    if ($event['objects_guid'] && ($ids = $DB->selectCol('SELECT id FROM gameobject WHERE guid IN (?a) GROUP BY id', $event['objects_guid']))) {
        $event['objects'] = array();
        foreach ($ids as $goid) {
            $event['objects'][] = objectinfo($goid);
        }
    }
    if ($event['creatures_quests_id']) {
        $event['quests'] = array();
        foreach ($event['creatures_quests_id'] as $qid) {
            $event['quests'][] = GetDBQuestInfo($qid['quest'], 0xffffff);
        }
    }
    save_cache(EVENT_PAGE, $cache_key, $achievement);
}
Exemple #2
0
$baseurl = dirname(dirname($baseurl)) . '/';
// Initialise user
if (Cookie::has('flyspray_userid') && Cookie::has('flyspray_passhash')) {
    $user = new User(Cookie::val('flyspray_userid'));
    $user->check_account_ok();
} else {
    $user = new User(0, $proj);
}
// Check permissions
if (!$user->perms('view_history')) {
    die;
}
// Load translations
load_translations();
if ($details = Get::num('details')) {
    $details = " AND h.history_id = {$details}";
} else {
    $details = null;
}
$sql = get_events(Get::num('task_id'), $details);
$histories = $db->fetchAllArray($sql);
$page = new FSTpl();
$page->setTheme($proj->prefs['theme_style']);
$page->uses('histories', 'details');
if ($details) {
    event_description($histories[0]);
    // modifies global variables
    $page->assign('details_previous', $GLOBALS['details_previous']);
    $page->assign('details_new', $GLOBALS['details_new']);
}
$page->display('details.tabs.history.callback.tpl');