Beispiel #1
0
if (isset($_REQUEST["comment"])) {
    $formInfo['comment'] = $_REQUEST["comment"];
}
$cat_type = BITPAGE_CONTENT_TYPE_GUID;
if (isset($_REQUEST["preview"])) {
    // get files from all packages that process this data further
    foreach ($gBitSystem->getPackageIntegrationFiles('form_processor_inc.php', TRUE) as $package => $file) {
        if ($gBitSystem->isPackageActive($package)) {
            include_once $file;
        }
    }
    $gBitSmarty->assign('preview', 1);
    $gBitSmarty->assign('title', $_REQUEST["title"]);
    $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');
}
function htmldecode($string)
{
    $string = strtr($string, array_flip(get_html_translation_table(HTML_ENTITIES)));
    $string = preg_replace("/&#([0-9]+);/me", "chr('\\1')", $string);
    return $string;
}
function parse_output(&$obj, &$parts, $i)
{
    if (!empty($obj->parts)) {
        for ($i = 0; $i < count($obj->parts); $i++) {
            parse_output($obj->parts[$i], $parts, $i);
        }
Beispiel #2
0
// Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
require_once '../kernel/setup_inc.php';
include_once IRLIST_PKG_PATH . 'IRList.php';
$gBitSystem->isPackageActive('irlist', TRUE);
$gContent = new IRList();
if (!empty($_REQUEST['content_id'])) {
    $gContent->load($_REQUEST['content_id']);
}
// Comments engine!
if ($gBitSystem->isFeatureActive('irlist_comments')) {
    $comments_vars = array('page');
    $comments_prefix_var = 'ir note:';
    $comments_object_var = 'page';
    $commentsParentId = $gContent->mContentId;
    $comments_return_url = IRLIST_PKG_URL . 'index.php?content_id=' . $gContent->mContentId;
    include_once LIBERTY_PKG_PATH . 'comments_inc.php';
}
$displayHash = array('perm_name' => 'bit_p_view');
$gContent->invokeServices('content_display_function', $displayHash);
$pdata = $gContent->parseData();
$gBitSmarty->assign_by_ref('parsed', $pdata);
$gBitSmarty->assign_by_ref('contentInfo', $gContent->mInfo);
if ($gContent->isValid()) {
    $gBitSystem->setBrowserTitle("Incident Reports Item");
    $gBitSystem->display('bitpackage:irlist/show_ir_item.tpl', NULL, array('display_mode' => 'display'));
} else {
    header("location: " . IRLIST_PKG_URL . "list.php");
    die;
}