예제 #1
0
 doAuth();
 // individual user prefs
 $prefs = get_user_prefs() + $prefs;
 build_element_list($elements_main);
 if ($elements_aux) {
     build_element_list($elements_aux);
 }
 load_elements('init');
 register_element_tabs();
 $event = gps('event') ? gps('event') : 'article';
 $step = gps('step');
 if (!$dbversion or $dbversion != $thisversion or $txp_using_svn) {
     define('TXP_UPDATE', 1);
     include txpath . '/update/_update.php';
 }
 load_elements($event);
 register_element_tabs();
 if (!empty($admin_side_plugins) and gps('event') != 'plugin') {
     load_plugins(1);
 }
 include txpath . '/lib/txplib_head.php';
 // ugly hack, for the people that don't update their admin_config.php
 // Get rid of this when we completely remove admin_config and move privs to db
 if ($event == 'list') {
     require_privs('article');
 } else {
     require_privs($event);
 }
 callback_event($event, $step, 1);
 // let elements override older /include/txp_foo.php admin pages
 if (!controller_name($event)) {
예제 #2
0
    $event = 'pub_css';
} elseif (gps('rss') or gps('atom')) {
    $event = 'pub_feed';
} elseif ($s == 'file_download') {
    $event = 'pub_file';
} elseif (gps('parentid') && gps('submit')) {
    $event = 'pub_comment';
    $step = 'submit';
} elseif (gps('parentid') and $comments_mode == 1) {
    $event = 'pub_comment';
    $step = 'popup';
} else {
    $event = 'pub_page';
}
// FIXME: not sure if this is the best place
load_elements($event, $step);
callback_event($event, $step);
// Now that everything is initialized, we can crank down error reporting
set_error_level($production_status);
if (gps('parentid') && gps('submit')) {
    saveComment();
} elseif (gps('parentid') and $comments_mode == 1) {
    // popup comments?
    header("Content-type: text/html; charset=utf-8");
    exit(popComments(gps('parentid')));
}
handle_lastmod();
log_hit($status);
// -------------------------------------------------------------
function preText($s, $prefs)
{