Ejemplo n.º 1
0
    die;
}
//end GET=a
//If still alive here, assume $_GET['t'] is set.
if ($_GET['t'] == "g") {
    if ($_POST) {
        rebuild_config($_POST);
        //hope
        header("Location: " . THurl . "admin.php?rebuild");
        //f*****g hack >:[
        die;
    }
    header("Location: " . THurl . "admin.php?a=g");
    die;
} elseif ($_GET['t'] == "bl") {
    $db->insertBCW(THbcw_blotter, $_POST['post'], $_POST['postto']);
    $actionstring = "Blotter post";
    writelog($actionstring, "admin");
    header("Location: " . THurl . "admin.php?a=bl");
} elseif ($_GET['t'] == "ble") {
    $blotter = $db->fetchBCW(THbcw_blotter);
    foreach ($blotter as $blot) {
        if ($_POST['del' . $blot['id']]) {
            $db->deleteBCW(THbcw_blotter, $blot['id']);
            $actionstring = "Blotter delete\tid:" . $blot['id'];
            writelog($actionstring, "admin");
        } else {
            $blotter_entry = array('id' => (int) $_POST['id' . $blot['id']], 'text' => $db->escape_string($_POST['post' . $blot['id']]), 'board' => $db->escape_string($_POST['postto' . $blot['id']]));
            $db->updateBCW(THbcw_blotter, $blotter_entry['id'], $blotter_entry['text'], $blotter_entry['board']);
        }
    }