示例#1
0
 * 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
 *
 * @package citizen
 * @subpackage functions
 */
/**
 * required setup
 */
require_once '../kernel/setup_inc.php';
$gBitSystem->verifyPackage('citizen');
$gBitSystem->verifyPermission('p_citizen_update');
include_once CITIZEN_PKG_PATH . 'Citizen.php';
$gContent = new Citizen();
if (!empty($_REQUEST['content_id'])) {
    $gContent->load($_REQUEST['content_id']);
}
// Get plugins with descriptions
global $gLibertySystem;
if (!empty($gContent->mInfo)) {
    $formInfo = $gContent->mInfo;
    $formInfo['edit'] = !empty($gContent->mInfo['data']) ? $gContent->mInfo['data'] : '';
}
$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;
        }
    }
示例#2
0
 * Copyright (c) 2006 bitweaver.org
 * 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.
 *
 * @package citizen
 * @subpackage functions
 */
/**
 * required setup
 */
require_once '../kernel/setup_inc.php';
include_once CITIZEN_PKG_PATH . 'Citizen.php';
$gBitSystem->isPackageActive('citizen', TRUE);
if (!empty($_REQUEST['content_id'])) {
    $gCitizen = new Citizen(null, $_REQUEST['content_id']);
    $gCitizen->load();
    $gCitizen->loadXrefList();
} else {
    $gCitizen = new Citizen();
}
// Comments engine!
if ($gBitSystem->isFeatureActive('feature_citizen_comments')) {
    $comments_vars = array('page');
    $comments_prefix_var = 'citizen note:';
    $comments_object_var = 'page';
    $commentsParentId = $gContent->mContentId;
    $comments_return_url = CITIZEN_PKG_URL . 'index.php?content_id=' . $gCitizen->mContentId;
    include_once LIBERTY_PKG_PATH . 'comments_inc.php';
}
$gBitSmarty->assign_by_ref('citizenInfo', $gCitizen->mInfo);
if ($gCitizen->isValid()) {