Пример #1
0
<?php

require_once 'global.php';
$do = $_REQUEST['do'];
$cp->header();
switch ($do) {
    default:
        list_sections();
        break;
}
$cp->footer();
function list_sections()
{
    global $db;
    do_module_header('Sections', 'Manage all the sections of your website');
    do_table_header('Mod Sections');
    do_blank_row('<a href="Mods.php?do=add_section">Add Section</a>');
    $result = $db->Execute("SELECT id,title FROM `Obsedb_Mods_sections` ORDER BY `title`");
    while ($row = $result->FetchNextObject()) {
        do_blank_row("<b>" . stripslashes($row->TITLE) . "</b>");
        do_blank_row("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &middot; <a href='Mods.php?do=Edit+Section&id={$row->ID}'>Change the section name</a>");
        do_blank_row("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &middot; <a href='Mods.php?do=Delete+Section&id={$row->ID}'>Delete the section</a>");
    }
    do_table_footer();
    do_table_header('News Sections');
    do_blank_row('<a href="news.php?do=add_section">Add Section</a>');
    $result = $db->Execute("SELECT id,title FROM `Obsedb_news_sections` ORDER BY `title`");
    while ($row = $result->FetchNextObject()) {
        do_blank_row("<b>" . stripslashes($row->TITLE) . "</b>");
        do_blank_row("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &middot; <a href='news.php?do=Edit+Section&id={$row->ID}'>Change the section name</a>");
        do_blank_row("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &middot; <a href='news.php?do=Delete+Section&id={$row->ID}'>Delete the section</a>");
Пример #2
0
 function render_body()
 {
     dom::h3('', 'Raw SQL');
     dom::push_form('lists.php');
     dom::textarea("sql");
     dom::br();
     dom::hidden('action', 'sql');
     dom::submit();
     dom::pop();
     list_instructors();
     list_sections();
     list_books();
     list_courses();
 }