Beispiel #1
0
}
global $DOCUMENT_ROOT, $action, $id;
include $DOCUMENT_ROOT . '/admin/inc/menu.php';
include '../menu.php';
$manage_menu->SetActive('to-developer');
$mandev_menu->SetActive('templates');
if ($action == 'create') {
    manage_template_received_create();
}
// Printing da page
print $manage_menu->InnerHTML();
print $mandev_menu->InnerHTML();
print '${information}';
// Print created datatypes
if ($action == 'edit') {
    include 'edit.php';
} else {
    if ($action == 'save') {
        manage_template_received_update($id);
    } else {
        if ($action == 'delete') {
            manage_template_delete($id);
        }
    }
    $list = manage_template_get_list();
    if (count($list) > 0) {
        include 'list.php';
    }
    // Print the create form
    include 'create_form.php';
}
Beispiel #2
0
 function manage_template_draw_selector_for_script($name, $active = -1, $cacheable = true)
 {
     global $manage_templates_arr;
     if (!$cacheable || !$manage_templates_arr) {
         $manage_templates_arr = manage_template_get_list();
     }
     $n = count($manage_templates_arr);
     println('<select name="' . $name . '_script_selector" class="block">');
     println('  <option value="-1">Не указан</option>');
     for ($i = 0; $i < $n; $i++) {
         println('  <option value="' . $manage_templates_arr[$i]->GetID() . '"' . ($manage_templates_arr[$i]->GetID() == $active ? ' selected' : '') . '>' . $manage_templates_arr[$i]->GetName() . '</option>');
     }
     println('</select>');
 }