Beispiel #1
0
<?php

/*
	This is Textpattern

	Copyright 2004 by Dean Allen
	www.textpattern.com
	All rights reserved

	Use of this software indicates acceptance of the Textpattern license agreement 
*/
check_privs(1, 2, 3);
$vars = array('category', 'url', 'linkname', 'linksort', 'description', 'id');
if (!$step or !function_exists($step)) {
    link_edit();
} else {
    $step();
}
// -------------------------------------------------------------
function link_list($message = "")
{
    global $step, $link_list_pageby;
    extract(get_prefs());
    $page = gps('page');
    $total = getCount('txp_link', "1");
    $limit = $link_list_pageby;
    $numPages = ceil($total / $limit);
    $page = !$page ? 1 : $page;
    $offset = ($page - 1) * $limit;
    $sort = gps('sort');
    $dir = gps('dir');
Beispiel #2
0
<?php

check_privs(1, 2, 3, 4, 5, 6);
$myprivs = fetch('privs', 'txp_users', 'name', $txp_user);
$levels = array(1 => gTxt('publisher'), 2 => gTxt('managing_editor'), 3 => gTxt('copy_editor'), 4 => gTxt('staff_writer'), 5 => gTxt('freelancer'), 6 => gTxt('designer'), 0 => gTxt('none'));
if (!$step or !function_exists($step)) {
    admin();
} else {
    $step();
}
// -------------------------------------------------------------
function admin($message = '')
{
    global $myprivs, $txp_user;
    pagetop(gTxt('site_administration'), $message);
    $themail = fetch('email', 'txp_users', 'name', $txp_user);
    echo new_pass_form();
    echo change_email_form($themail);
    echo author_list();
    echo $myprivs == 1 ? new_author_form() : '';
}
// -------------------------------------------------------------
function change_email()
{
    global $txp_user;
    $new_email = gps('new_email');
    $rs = safe_update("txp_users", "email  = '{$new_email}'", "name = '{$txp_user}'");
    if ($rs) {
        admin('email address changed to ' . $new_email);
    }
}
Beispiel #3
0
<?php

/*
	This is Textpattern

	Copyright 2004 by Dean Allen
	www.textpattern.com
	All rights reserved

	Use of this software indicates acceptance ofthe Textpattern license agreement 
*/
check_privs(1, 2, 3, 6);
if (!$step or !function_exists($step)) {
    section_list();
} else {
    $step();
}
// -------------------------------------------------------------
function section_list($message = '')
{
    pagetop(gTxt('sections'), $message);
    global $url_mode, $txpac, $wlink;
    $out[] = tr(tdcs(strong(gTxt('section_head')) . popHelp('section_category'), 3));
    $out[] = tr(tdcs(form(fInput('text', 'name', '', 'edit', '', '', 10) . fInput('submit', '', gTxt('Create'), 'smallerbox') . eInput('section') . sInput('section_create')), 3));
    $pageslist = safe_column("name", "txp_page", "1");
    $styleslist = safe_column("name", "txp_css", "1");
    $rs = safe_rows("*", "txp_section", "name!='' order by name");
    if ($rs) {
        foreach ($rs as $a) {
            extract($a);
            if ($name == 'default') {
Beispiel #4
0
<?php

/*
	This is Textpattern

	Copyright 2004 by Dean Allen
	www.textpattern.com
	All rights reserved

	Use of this software indicates acceptance of the Textpattern license agreement 
*/
check_privs(1, 2);
switch (strtolower($step)) {
    case "list":
        list_plugins();
        break;
    case "edit":
        edit_plugin();
        break;
    case "switch_status":
        switch_status();
        break;
    case "plugin_save":
        plugin_save();
        break;
    case "plugin_install":
        plugin_install();
        break;
    case "view_hilighted":
        view_hilighted();
        break;