示例#1
0
     create_forum($user, $team);
 } else {
     if ($cmd == 'edit_action') {
         $user = get_logged_in_user();
         require_founder_login($user, $team);
         check_tokens($user->authenticator);
         $forum = BoincForum::lookup("parent_type=1 and category={$teamid}");
         if (!$forum) {
             error_page("No forum");
         }
         edit_action($forum);
     } else {
         if ($cmd == "remove_confirm") {
             $user = get_logged_in_user();
             require_founder_login($user, $team);
             remove_confirm($user, $team);
         } else {
             if ($cmd == "remove") {
                 $user = get_logged_in_user();
                 require_founder_login($user, $team);
                 remove($team);
             } else {
                 if ($cmd != "") {
                     error_page("unknown command {$cmd}");
                 } else {
                     show_forum($team);
                 }
             }
         }
     }
 }
// deleting of a row is confirmed
if (isset($_POST['confirm_yes'])) {
    if (preg_match('/row([0-9]+)/', $_POST['confirm_subject'], $matches)) {
        $instance = $matches[1];
        $sql = $s_confirmations['row'][$instance]['sql'];
        @fbird_query($dbhandle, $sql) or $ib_error = fbird_errmsg();
        remove_confirm($instance);
        // cleanup the watchtable output buffer
        $s_watch_buffer = '';
    }
}
// deleting a subject is canceled
if (isset($_POST['confirm_no'])) {
    if (preg_match('/row([0-9]+)/', $_POST['confirm_subject'], $matches)) {
        $instance = $matches[1];
        remove_confirm($instance);
    }
}
if (!empty($s_wt['table'])) {
    $js_stack .= js_markable_table();
    if (!empty($s_wt['fks'])) {
        $js_stack .= js_request_fk();
    }
}
// remove the confirm panel
function remove_confirm($instance)
{
    global $s_confirmations, $s_delete_idx;
    $panels_arrayname = get_panel_array($_SERVER['SCRIPT_NAME']);
    $name = 'dt_delete' . $instance;
    $idx = get_panel_index($GLOBALS[$panels_arrayname], $name);