예제 #1
0
<?php

// $Header$
require_once '../../kernel/setup_inc.php';
$gBitSystem->verifyPermission('p_admin');
include_once QUICKTAGS_PKG_PATH . 'Quicktags.php';
$gQuicktags = new QuickTags();
// send users to guid selection page if we don't know what format
if (!isset($_REQUEST['format_guid'])) {
    header("Location: " . QUICKTAGS_PKG_URL . "admin/index.php");
    die;
}
// process form
if (!empty($_REQUEST["tag_id"])) {
    $gBitSmarty->assign('info', $gQuicktags->getQuicktag($_REQUEST["tag_id"]));
}
if (isset($_REQUEST["remove"])) {
    $gQuicktags->expunge($_REQUEST["remove"]);
}
if (isset($_REQUEST["save"])) {
    $gQuicktags->store($_REQUEST);
}
// get list of quicktags
$listHash = $_REQUEST;
$quicktags = $gQuicktags->getList($listHash);
$gBitSmarty->assign('quicktags', $quicktags[$_REQUEST['format_guid']]);
$gBitSmarty->assign('listInfo', $listHash['listInfo']);
// preview the saved settings
$previewList['sort_mode'] = 'tagpos_asc';
$previewList['max_records'] = -1;
$quicktags_preview = $gQuicktags->getList($previewList);
예제 #2
0
<?php

/**
* quicktags package
*
* @author   
* @version  $Revision$
* @package  quicktags
* @subpackage  functions
*/
/**
 * required include
 */
global $gBitSmarty;
include_once QUICKTAGS_PKG_PATH . 'Quicktags.php';
$gQuicktags = new QuickTags();
$listHash = array('max_records' => -1, 'sort_mode' => 'tagpos_asc');
$quicktags = $gQuicktags->getList($listHash);
$_smarty_tpl->tpl_vars['quicktags'] = new Smarty_variable($quicktags);