示例#1
0
    $parsed = $gContent->parseData($formInfo['edit'], !empty($_REQUEST['format_guid']) ? $_REQUEST['format_guid'] : (isset($gContent->mInfo['format_guid']) ? $gContent->mInfo['format_guid'] : 'tikiwiki'));
    $gBitSmarty->assign_by_ref('parsed', $parsed);
    $gContent->invokeServices('content_preview_function');
} else {
    $gContent->invokeServices('content_edit_function');
}
// Pro
if (isset($_REQUEST["fCancel"])) {
    if (!empty($gContent->mContentId)) {
        header("Location: " . $gContent->getDisplayUrl());
    } else {
        header("Location: " . CITIZEN_PKG_URL);
    }
    die;
} elseif (isset($_REQUEST["fSaveCitizen"])) {
    if ($gContent->store($_REQUEST)) {
        header("Location: " . $gContent->getDisplayUrl());
    } else {
        $formInfo = $_REQUEST;
        $formInfo['data'] =& $_REQUEST['edit'];
    }
}
// Configure quicktags list
if ($gBitSystem->isPackageActive('quicktags')) {
    include_once QUICKTAGS_PKG_PATH . 'quicktags_inc.php';
}
// WYSIWYG and Quicktag variable
$gBitSmarty->assign('textarea_id', 'editwiki');
// formInfo might be set due to a error on submit
if (empty($formInfo)) {
    $formInfo =& $gContent->mInfo;