コード例 #1
0
ファイル: imgboard.php プロジェクト: GlazzzN/TinyIB
                    stickyThreadByID($post['id'], intval($_GET['setsticky']));
                    threadUpdated($post['id']);
                    $text .= manageInfo('Thread No.' . $post['id'] . ' ' . (intval($_GET['setsticky']) == 1 ? 'stickied' : 'un-stickied') . '.');
                } else {
                    fancyDie("Sorry, there doesn't appear to be a thread with that ID.");
                }
            } else {
                fancyDie("Form data was lost. Please go back and try again.");
            }
        } elseif (isset($_GET["rawpost"])) {
            $onload = manageOnLoad("rawpost");
            $text .= manageRawPostForm();
        } elseif (isset($_GET["logout"])) {
            $_SESSION['tinyib'] = '';
            session_destroy();
            die('--&gt; --&gt; --&gt;<meta http-equiv="refresh" content="0;url=' . $returnlink . '?manage">');
        }
        if ($text == '') {
            $text = manageStatus();
        }
    } else {
        $onload = manageOnLoad('login');
        $text .= manageLogInForm();
    }
    echo managePage($text, $onload);
} elseif (!file_exists('index.html') || countThreads() == 0) {
    rebuildIndexes();
}
if ($redirect) {
    echo '--&gt; --&gt; --&gt;<meta http-equiv="refresh" content="' . (isset($slow_redirect) ? '3' : '0') . ';url=' . (is_string($redirect) ? $redirect : 'index.html') . '">';
}
コード例 #2
0
ファイル: status.php プロジェクト: trabisdementia/xuups
$aSortBy = array('id' => _AM_XHELP_TEXT_ID, 'description' => _AM_XHELP_TEXT_DESCRIPTION, 'state' => _AM_XHELP_TEXT_STATE);
$aOrderBy = array('ASC' => _AM_XHELP_TEXT_ASCENDING, 'DESC' => _AM_XHELP_TEXT_DESCENDING);
$aLimitBy = array('10' => 10, '15' => 15, '20' => 20, '25' => 25, '50' => 50, '100' => 100);
$op = 'default';
if (isset($_REQUEST['op'])) {
    $op = $_REQUEST['op'];
}
switch ($op) {
    case "deleteStatus":
        deleteStatus();
        break;
    case "editStatus":
        editStatus();
        break;
    case "manageStatus":
        manageStatus();
        break;
    default:
        header("Location: " . XHELP_ADMIN_URL . "/index.php");
        break;
}
function deleteStatus()
{
    if (isset($_GET['statusid'])) {
        $statusid = intval($_GET['statusid']);
    } else {
        header("Location: " . XHELP_ADMIN_URL . "/status.php?op=manageStatus");
    }
    $hTickets =& xhelpGetHandler('ticket');
    $hStatus =& xhelpGetHandler('status');
    $status =& $hStatus->get($statusid);