예제 #1
0
 function displayMenu()
 {
     global $roster;
     if (defined('ROSTER_MENU_INC')) {
         // Create the mini update pop-up
         // Include update lib
         require_once ROSTER_LIB . 'update.lib.php';
         $mini_update = new update();
         // Fetch addon data
         $mini_update->fetchAddonData();
         // Create the file fields
         $mini_update->makeFileFields('mini_file_fields');
         unset($mini_update);
         //$roster->tpl->set_handle('roster_menu', 'menu.html');
         //$roster->tpl->display('roster_menu');
     }
 }
예제 #2
0
파일: update.php 프로젝트: Sajaki/wowroster
    $messages .= $update->processFiles();
    $errors = $update->getErrors();
    // Normal upload results
    if (!$update->textmode) {
        $roster->tpl->assign_var('S_RESPONSE', true);
        // print the error messages
        if (!empty($errors)) {
            // We have errors
            $roster->tpl->assign_vars(array('S_RESPONSE_ERROR' => true, 'RESPONSE_ERROR' => $errors, 'RESPONSE_ERROR_LOG' => htmlspecialchars(stripAllHtml($errors))));
        }
        $roster->tpl->assign_vars(array('RESPONSE' => $messages, 'RESPONSE_POST' => htmlspecialchars(stripAllHtml($messages))));
        $roster->tpl->set_handle('body', 'update.html');
        $roster->tpl->display('body');
    } else {
        // No-HTML result page for UU
        echo stripAllHtml($messages);
        $roster->output['show_header'] = false;
        $roster->output['show_menu'] = false;
        $roster->output['show_footer'] = false;
    }
} else {
    // No data uploaded, so return upload form
    $update->makeFileFields();
    if ($roster->auth->getAuthorized($roster->config['gp_user_level']) && $roster->auth->getAuthorized($roster->config['cp_user_level']) && $roster->auth->getAuthorized($roster->config['lua_user_level'])) {
        $roster->tpl->assign_var('S_PASS', false);
    }
    $messages = $update->getErrors();
    $roster->tpl->assign_var('MESSAGES', $messages);
    $roster->tpl->set_handle('body', 'update.html');
    $roster->tpl->display('body');
}