Пример #1
0
/**
* Used for editing templates: Either shows show_templates(), edit_template(), save_template() or
* create_template()
*
* @see show_templates(), edit_template(), save_template(), create_template()
*/
function templates()
{
    global $Pivot_Vars;
    PageHeader(lang('adminbar', 'templates_title'), 1);
    PageAnkeiler(lang('userbar', 'admin') . ' » ' . lang('adminbar', 'templates_title'));
    // if there is an 'action' to do
    if (isset($Pivot_Vars['doaction'])) {
        files_action($Pivot_Vars['action'], $Pivot_Vars['check']);
    }
    if (isset($Pivot_Vars['edit']) && !isset($Pivot_Vars['template'])) {
        edit_template();
    } else {
        if (isset($Pivot_Vars['template'])) {
            save_template();
        } else {
            if (isset($Pivot_Vars['create'])) {
                create_template();
            } else {
                show_templates();
            }
        }
    }
}
Пример #2
0
switch ($action) {
    //echo 'should get templates';
    case 'deletetemplate':
        delete_template();
        break;
    case 'get_assignments':
        get_assignments();
        break;
    case 'get_entry_framework':
        get_survey_display_framework();
        break;
    case 'get_survey':
        get_survey();
        break;
    case 'savetemplate':
        save_template();
        break;
    case 'saveresponse':
        save_response();
        break;
    case 'get_surveys':
        get_surveys();
        break;
    case 'gettemplatedetail':
        get_template_detail();
        break;
    case 'markcomplete':
        mark_complete();
        break;
    case 'get_templates':
        get_templates();
Пример #3
0
<?php

include "global.php";
$cp->header();
do_module_header('Template Editor', '<a href="templates.php">List Templates</a>');
switch ($_REQUEST["do"]) {
    case 'edit':
        edit_template($_REQUEST["title"]);
        break;
    case 'save':
        save_template($_REQUEST[title], $_REQUEST[html]);
        edit_template($_REQUEST[title]);
        break;
    default:
        list_templates();
        break;
}
$cp->footer();
function list_templates()
{
    do_table_header("Manage Templates");
    do_blank_row("<b>Default Template</b>");
    do_blank_row("\n    \n                  <ul><b>Global Templates</b>\n                    <li><a href=\"templates.php?do=edit&title=header\">header</a>\n                    <li><a href=\"templates.php?do=edit&title=footer\">footer</a>\n                    <li><a href='templates.php?do=edit&title=stylesheet'>stylesheet</a>\n                  </ul>\n                  <ul>\n                    <b>Cheats Templates</b>\n                    <li><a href='templates.php?do=edit&title=cheats_header'>cheats_header</a>\n                  </ul>\n                  <ul>\n                    <b>Company List Templates</b>\n                    <li><a href='templates.php?do=edit&title=company_list'>company_list</a>\n                  </ul>\n                  <ul>\n                    <b>Company Profile Templates</b>\n                    <li><a href='templates.php?do=edit&title=company_profile'>company_profile</a>\n                    <li><a href='templates.php?do=edit&title=company_profile_devlinks'>company_profile_devlinks</a>\n                    <li><a href='templates.php?do=edit&title=company_profile_publinks'>company_profile_publinks</a>\n                  </ul>\n                  <ul>\n                    <b>Downloads Module Templates</b>\n                    <li><a href='templates.php?do=edit&title=downloads_header'>downloads_header</a>\n                    <li><a href='templates.php?do=edit&title=downloads_footer'>downloads_footer</a>\n                  </ul>\n                  <ul>\n                    <b>Frontpage Templates</b>\n                    <li><a href='templates.php?do=edit&title=frontpage_latest_Mods'>frontpage_latest_Mods</a>\n                    <li><a href='templates.php?do=edit&title=frontpage_popular_Mods'>frontpage_popular_Mods</a>\n                  </ul>\n                  <ul>\n                    <b>Mod List Templates</b>\n                    <li><a href=\"templates.php?do=edit&title=Modlist_footer\">Modlist_footer</a>\n                    <li><a href='templates.php?do=edit&title=Modlist_header'>Modlist_header</a>\n                    <li><a href='templates.php?do=edit&title=Modlist_row'>Modlist_row</a>\n                  </ul>\n                  <ul>\n                    <b>Mod Profile Templates</b>\n                    <li><a href='templates.php?do=edit&title=Mod_profile'>Mod_profile</a>\n                  </ul>\n                  <ul><b>Menu Templates</b>\n                    <li><a href=\"templates.php?do=edit&title=log_in_box\">log_in_box</a>\n                    <li><a href=\"templates.php?do=edit&title=logged_in_box\">logged_in_box</a>\n                  </ul>\n                  ");
    do_table_footer();
}
function edit_template($title)
{
    global $db;
    do_table_header("Manage Templates");
    $result = $db->Execute("SELECT * FROM Obsedb_templates WHERE `title` = '{$title}';");
    do_form_header('templates.php');