示例#1
0
	www.textpattern.com
	All rights reserved
	Use of this software indicates acceptance of the Textpattern license agreement
$HeadURL$
$LastChangedRevision$
*/
if (!defined('txpinterface')) {
    die('txpinterface is undefined.');
}
if ($event == 'link') {
    require_privs('link');
    global $vars;
    $vars = array('category', 'url', 'linkname', 'linksort', 'description', 'id');
    global $all_link_cats, $all_link_authors;
    $all_link_cats = getTree('root', 'link');
    $all_link_authors = the_privileged('link.edit.own');
    $available_steps = array('link_list' => false, 'link_edit' => false, 'link_save' => true, 'link_change_pageby' => true, 'link_multi_edit' => true);
    if ($step && bouncer($step, $available_steps)) {
        $step();
    } else {
        link_list();
    }
}
// -------------------------------------------------------------
function link_list($message = '')
{
    global $event, $step, $link_list_pageby, $txp_user;
    pagetop(gTxt('tab_link'), $message);
    extract(gpsa(array('page', 'sort', 'dir', 'crit', 'search_method')));
    if ($sort === '') {
        $sort = get_pref('link_sort_column', 'name');
示例#2
0
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Textpattern. If not, see <http://www.gnu.org/licenses/>.
 */
if (!defined('txpinterface')) {
    die('txpinterface is undefined.');
}
$levels = array(1 => gTxt('private'), 0 => gTxt('public'));
global $file_statuses;
$file_statuses = status_list(true, array(STATUS_DRAFT, STATUS_STICKY));
if ($event == 'file') {
    require_privs('file');
    global $all_file_cats, $all_file_authors;
    $all_file_cats = getTree('root', 'file');
    $all_file_authors = the_privileged('file.edit.own');
    $available_steps = array('file_change_pageby' => true, 'file_multi_edit' => true, 'file_edit' => false, 'file_insert' => true, 'file_list' => false, 'file_replace' => true, 'file_save' => true, 'file_create' => true);
    if ($step && bouncer($step, $available_steps)) {
        $step();
    } else {
        file_list();
    }
}
// -------------------------------------------------------------
function file_list($message = '')
{
    global $file_base_path, $file_statuses, $file_list_pageby, $txp_user, $event;
    pagetop(gTxt('tab_file'), $message);
    extract(gpsa(array('page', 'sort', 'dir', 'crit', 'search_method')));
    if ($sort === '') {
        $sort = get_pref('file_sort_column', 'filename');
示例#3
0
 *
 * @package Admin\List
 */
use Textpattern\Validator\CategoryConstraint;
use Textpattern\Validator\SectionConstraint;
use Textpattern\Validator\Validator;
use Textpattern\Search\Filter;
if (!defined('txpinterface')) {
    die('txpinterface is undefined.');
}
if ($event == 'list') {
    global $statuses, $all_cats, $all_authors, $all_sections;
    require_privs('article');
    $statuses = status_list();
    $all_cats = getTree('root', 'article');
    $all_authors = the_privileged('article.edit.own');
    $all_sections = safe_column("name", 'txp_section', "name != 'default'");
    $available_steps = array('list_list' => false, 'list_change_pageby' => true, 'list_multi_edit' => true);
    if ($step && bouncer($step, $available_steps)) {
        $step();
    } else {
        list_list();
    }
}
/**
 * The main panel listing all articles.
 *
 * @param  string|array $message The activity message
 * @param  string       $post    Not used
 */
function list_list($message = '', $post = '')
示例#4
0
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Textpattern. If not, see <http://www.gnu.org/licenses/>.
 */
if (!defined('txpinterface')) {
    die('txpinterface is undefined.');
}
global $extensions;
$extensions = get_safe_image_types();
include txpath . '/lib/class.thumb.php';
if ($event == 'image') {
    require_privs('image');
    global $all_image_cats, $all_image_authors;
    $all_image_cats = getTree('root', 'image');
    $all_image_authors = the_privileged('image.edit.own');
    $available_steps = array('image_list' => false, 'image_edit' => false, 'image_insert' => true, 'image_replace' => true, 'image_save' => true, 'thumbnail_insert' => true, 'image_change_pageby' => true, 'thumbnail_create' => true, 'thumbnail_delete' => true, 'image_multi_edit' => true);
    if ($step && bouncer($step, $available_steps)) {
        $step();
    } else {
        image_list();
    }
}
// -------------------------------------------------------------
function image_list($message = '')
{
    global $txpcfg, $extensions, $img_dir, $file_max_upload_size, $image_list_pageby, $txp_user, $event;
    pagetop(gTxt('tab_image'), $message);
    extract($txpcfg);
    extract(gpsa(array('page', 'sort', 'dir', 'crit', 'search_method')));
    if ($sort === '') {