function initForm()
 {
     global $db, $cp;
     $this->phrase = $cp->getPhrases('adminCustomFields');
     $cp->header();
     $links = '<a href="customfields.php?do=add">Add Field</a>';
     do_module_header($this->phrase['module_header'], $links);
     switch ($_REQUEST['do']) {
         case 'add':
             $this->add();
             break;
         case 'add_confirm':
             $this->add_confirm();
             break;
         case 'Delete Field':
             $this->delete();
             break;
         case 'Edit Field':
             $this->edit();
             break;
         case 'edit_confirm':
             $this->edit_confirm();
             break;
         default:
             $this->main();
             break;
     }
     $cp->footer();
 }
Exemplo n.º 2
0
 function initForm()
 {
     global $db, $cp;
     $cp->header();
     $links = '<a href="dbtools.php?do=query">Query Tool</a> | ';
     $links .= '<a href="dbtools.php?do=stats">Database Statistics</a>';
     do_module_header("Database Tools", $links);
     switch ($_REQUEST['do']) {
         case 'query':
             $this->sql_query();
             break;
         case 'run_query':
             $this->run_query();
             break;
         case 'stats':
             $this->viewStatistics();
             break;
     }
     $cp->footer();
 }
Exemplo n.º 3
0
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>");
    }
    do_table_footer();
    do_table_header('Previews Sections');
    do_blank_row('<a href="previews.php?do=add_section">Add Section</a>');
    $result = $db->Execute("SELECT id,title FROM `Obsedb_previews_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='previews.php?do=Edit+Section&id={$row->ID}'>Change the section name</a>");
        do_blank_row("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &middot; <a href='previews.php?do=Delete+Section&id={$row->ID}'>Delete the section</a>");
    }
    do_table_footer();
    do_table_header('Reviews Sections');
    do_blank_row('<a href="reviews.php?do=add_section">Add Section</a>');
    $result = $db->Execute("SELECT id,title FROM `Obsedb_reviews_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='reviews.php?do=Edit+Section&id={$row->ID}'>Change the section name</a>");
        do_blank_row("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &middot; <a href='reviews.php?do=Delete+Section&id={$row->ID}'>Delete the section</a>");
    }
    do_table_footer();
}
Exemplo n.º 4
0
 function header()
 {
     $links = "<a href=cheats.php>" . $this->phrase['manage_cheats'] . "</a> | ";
     $links .= "<a href=\"cheats.php?do=add\">" . $this->phrase['add_cheat'] . "</a>";
     do_module_header($this->phrase['cheats_header'], $links);
 }
Exemplo n.º 5
0
        $refresh = "Mods.php";
        break;
    case 'edit_section_confirm':
        $refresh = "Mods.php";
        break;
    case 'View Matrix':
        $refresh = "rcm_matrix.php?do=viewmatrix&type=Mods&id={$_REQUEST['id']}";
        break;
}
require_once 'global.php';
require_once '../sources/userModsClass.php';
require_once '../language/default/user_Mods.php';
$cp->header();
/*** ModS MODULE LINKS ***/
$links = '<a href=Mods.php?do=add_section>Add Section</a> | ' . '<a href=Mods.php?do=manage_sections>Manage Sections</a> | ' . '<a href=Mods.php?do=add_Mod>Add Mod</a> | ' . '<a href=Mods.php?do=add_quick>Quick Add Mod</a> | ' . '<a href=Mods.php>Manage Mods</a>';
do_module_header('Mods Manager', $links, 'doc_Mods', 'Mods.php?do=settings', 'Mods.php?do=search');
$module = new Module();
switch ($_REQUEST['do']) {
    case 'add_quick':
        $module->add_quick();
        break;
    case 'add_quick_confirm':
        $module->add_quick_confirm();
        break;
    case 'Delete Mod':
        $module->delete_Mod();
        break;
    case 'Delete Section':
        $module->delete_section();
        break;
    case 'View Matrix':
Exemplo n.º 6
0
<?php

include "global.php";
$cp->header();
define('Obsedb_LOADED', true);
do_module_header('Plugin Manager');
do_table_header('Installed Plugins');
foreach (glob("../sources/admin_plugins/*.plugin") as $filename) {
    include "{$filename}";
    ?>

		<tr>
			<td class="formlabel">
			<a href="loadplugin.php?load=<?php 
    echo $plugin_filename;
    ?>
"><b><?php 
    echo $plugin_title;
    ?>
</b></a>
			</td>
		</tr>

	<?php 
}
do_table_footer();
$cp->footer();
Exemplo n.º 7
0
<?php

error_reporting(E_ALL ^ E_NOTICE);
include "global.php";
$cp->header();
$links = "<a href=links.php?do=add_section>Add Section</a> | " . "<a href=links.php?do=manage_sections>Manage Sections</a> | " . "<a href=links.php?do=add_link>Add Link</a> | " . "<a href=links.php>Manage Links</a>";
do_module_header('Link Manager', $links);
if (!isset($_REQUEST['do'])) {
    // Fetch array of sections
    $sections = $db->Execute("SELECT * FROM `Obsedb_links_sections` ORDER BY `id`");
    $spSections = array();
    while ($row = $sections->FetchNextObject()) {
        $spSections["{$row->ID}"] = $row->TITLE;
    }
    do_form_header('links.php');
    do_table_header('Latest Links');
    if (isset($_REQUEST['s'])) {
        $latestLink = $db->Execute("SELECT id,title,section FROM `Obsedb_links` WHERE `section` = '{$_REQUEST['s']}' ORDER BY `id` DESC");
    } else {
        $latestLink = $db->Execute("SELECT id,title,section FROM `Obsedb_links` ORDER BY `id` DESC LIMIT 20");
    }
    while ($row = $latestLink->FetchNextObject()) {
        $bgcolor = $bgcolor == "#ECECFF" ? "#FFFFFF" : "#ECECFF";
        echo '<tr>
				<td bgcolor="' . $bgcolor . '"><input type="radio" name="id" value="' . $row->ID . '"> ' . $row->TITLE . '</td>
				<td bgcolor="' . $bgcolor . '">' . $spSections["{$row->SECTION}"] . '</td>
			  </tr>';
    }
    echo '<tr>
			<td colspan="2">
				<input type="submit" name="do" value="Edit Link">
Exemplo n.º 8
0
 function header()
 {
     $links = "<a href=downloads.php>Manage Downloads</a> | " . "<a href=\"downloads.php?do=add\">Add Download</a>";
     do_module_header('Downloads', $links);
 }
Exemplo n.º 9
0
<?php

error_reporting(E_ALL ^ E_NOTICE);
include_once "global.php";
include_once "../sources/adminPollsClass.php";
$cp->header();
$module = new Module();
$links = '<a href="polls.php?do=add_poll">Add Poll</a> | ' . '<a href="polls.php">Manage Polls</a>';
do_module_header('Poll Manager', $links);
switch ($_REQUEST['do']) {
    case 'add_poll':
        $module->add_poll();
        break;
    case 'add_poll_confirm':
        $module->add_poll_confirm();
        break;
    case 'Delete Poll':
        $module->delete();
        break;
    case 'Add Options':
        $module->add_options();
        break;
    case 'add_options_confirm':
        $module->add_options_confirm();
        break;
}
if (!isset($_REQUEST['do'])) {
    $result = $db->Execute("SELECT id,title\n\t\t\t\t\t\t\tFROM Obsedb_polls\n\t\t\t\t\t\t\tORDER BY `id` DESC");
    do_form_header('polls.php');
    do_table_header('Polls');
    while ($row = $result->FetchNextObject()) {
Exemplo n.º 10
0
<?php

/**
*	Obsedb CMS
*	Copyright 2004-2005 Josh Kimbrel
**/
error_reporting(E_ALL ^ E_NOTICE);
if ($_REQUEST['do'] == 'View Matrix') {
    $refresh = "rcm_matrix.php?do=viewmatrix&type=previews&id={$_REQUEST['id']}";
}
require_once 'global.php';
require_once '../sources/adminReviewsClass.php';
$cp->header();
$links = "<a href=reviews.php?do=add_section>Add Section</a> | " . "<a href=reviews.php?do=manage_sections>Manage Sections</a> | " . "<a href=reviews.php?do=add_review>Add Review</a> | " . "<a href=reviews.php>Manage Reviews</a>";
do_module_header('Review Manager', $links);
$module = new Module();
switch ($_REQUEST['do']) {
    case 'add_news':
        $module->addReview();
        break;
    case 'add_review':
        $module->addReview();
        break;
    case 'add_section':
        $module->addSection();
        break;
    case 'add_section_confirm':
        $module->insertSection();
        break;
    case 'add_news_confirm':
        $module->insertReview();
Exemplo n.º 11
0
 function header()
 {
     global $db;
     $links = '<a href="companies.php">' . $this->phrase['manage_companies'] . '</a> | ' . '<a href="companies.php?do=add_company">Add Company</a>';
     do_module_header('Companies', $links, 'Companies');
 }
Exemplo n.º 12
0
<?php

error_reporting(E_ALL ^ E_NOTICE);
include "global.php";
$cp->header();
$links = '<a href="mailbag.php?do=add_mailbag">Add New Letter</a> | ' . '<a href="mailbag.php">Manage Letters</a>';
do_module_header('Mailbag', $links);
if (empty($_REQUEST['do'])) {
    do_form_header('mailbag.php');
    do_table_header('Latest Letters');
    $latestLetter = $db->Execute("SELECT id,title FROM `Obsedb_mailbag` ORDER BY `id` DESC LIMIT 20");
    while ($row = $latestLetter->FetchNextObject()) {
        $bgcolor = $bgcolor == "#ECECFF" ? "#FFFFFF" : "#ECECFF";
        echo '<tr>
				<td bgcolor="' . $bgcolor . '"><input type="radio" name="id" value="' . $row->ID . '"> ' . stripslashes($row->TITLE) . '</td>
			  </tr>';
    }
    echo '<tr>
			<td colspan="2">
				<input type="submit" name="do" value="Edit Letter">
				<input type="submit" name="do" value="Delete Letter">
			</td>
		  </tr>';
    do_table_footer();
    echo '</form>';
}
if ($_REQUEST['do'] == 'Edit Letter') {
    $mailbag = $db->Execute("SELECT * FROM `Obsedb_mailbag` WHERE `id` = '{$_REQUEST['id']}';");
    do_form_header('mailbag.php');
    do_table_header('Edit Letter');
    do_text_row('Title', 'title', clean($mailbag->fields['title']));
Exemplo n.º 13
0
<?php

error_reporting(E_ALL ^ E_NOTICE);
include "global.php";
include "../sources/userMatrixClass.php";
$cp->header();
$links = '<a href="rcm_matrix.php?do=search">Search</a>';
do_module_header('Relational Content Matrix', $links);
switch ($_REQUEST['do']) {
    case 'search':
        search_content();
        break;
    case 'search2':
        search2();
        break;
    case 'viewmatrix':
        viewmatrix();
        break;
    case 'create':
        create_new();
        break;
    case 'create2':
        create_confirm();
        break;
    case 'delete_resource':
        delete_resource();
        break;
}
function viewmatrix()
{
    global $db;
Exemplo n.º 14
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');
 function header()
 {
     global $lang, $cp;
     $links = '<a href="administrators.php?do=add_user">' . $this->phrase['add_user'] . '</a> | ' . '<a href="administrators.php">' . $this->phrase['manage_users'] . '</a>';
     do_module_header($this->phrase['administrators'], $links);
 }
Exemplo n.º 16
0
<?php

/**
*	Obsedb CMS
*	Copyright 2004-2005 Josh Kimbrel
**/
error_reporting(E_ALL ^ E_NOTICE);
if ($_REQUEST['do'] == 'View Matrix') {
    $refresh = "rcm_matrix.php?do=viewmatrix&type=news&id={$_REQUEST['id']}";
}
require_once 'global.php';
require_once '../sources/adminNewsClass.php';
$cp->header();
$links = "<a href=news.php?do=add_section>Add Section</a> | " . "<a href=news.php?do=manage_sections>Manage Sections</a> | " . "<a href=news.php?do=add_news>Post Article</a> | " . "<a href=news.php>Manage Articles</a>";
do_module_header('News Manager', $links);
if ($_REQUEST['do'] == 'View Matrix') {
    SPMessage("Loading content matrix...", "rcm_matrix.php?do=viewmatrix&type=news&id={$_REQUEST['id']}");
}
if (empty($_REQUEST['do'])) {
    // Fetch array of sections
    $sections = $db->Execute("SELECT * FROM `Obsedb_news_sections` ORDER BY `id`");
    $spSections = array();
    while ($row = $sections->FetchNextObject()) {
        $spSections["{$row->ID}"] = $row->TITLE;
    }
    do_form_header('news.php');
    do_table_header('Latest News');
    if (isset($_REQUEST['s'])) {
        $latestNews = $db->Execute("SELECT id,title,section FROM `Obsedb_news` WHERE `section` = '{$_REQUEST['s']}' ORDER BY `id` DESC");
    } else {
        $latestNews = $db->Execute("SELECT id,title,section FROM `Obsedb_news` ORDER BY `id` DESC LIMIT 20");
Exemplo n.º 17
0
<?php

do_module_header('Sample Plugin Page', 'This is simply an example of how to code a plugin.');
do_table_header('Sample Plugin');
do_blank_row('This is a sample plugin.');
do_table_footer();
Exemplo n.º 18
0
 function header()
 {
     global $db;
     $links = '<a href="screenshots.php?do=add_section">Add Section</a> | ' . '<a href="screenshots.php?do=manage_sections">Manage Sections</a> | ' . '<a href="screenshots.php?do=add_screenshot">Add Screenshot</a> | ' . '<a href="screenshots.php?">Manage Screenshots</a>';
     do_module_header('Screenshots', $links);
 }
 function printHeader()
 {
     global $cp;
     do_module_header($this->phrase['module_header'], $this->phrase['module_header_links']);
     do_form_header('configuration.php');
     do_table_header($this->phrase['setting']);
     $options = array('global' => 'Site Settings', 'controlpanel' => 'Control Panel Settings', 'Mods' => 'Mods Module', 'screenshots' => 'Screenshots Module', 'adminAdministratorPhrases' => 'Administrator Module Phrases', 'adminCheatsPhrases' => 'Cheats Module Phrases', 'adminCompaniesPhrases' => 'Companies Module Phrases', 'adminConfigurationPhrases' => 'Configuration Module Phrases', 'adminContentPhrases' => 'Content Module Phrases', 'adminIndexPhrases' => 'Control Panel Index Phrases', 'adminCustomFieldsPhrases' => 'Custom Fields Module Phrases', 'adminDatabasePhrases' => 'Database Module Phrases', 'adminDownloadsPhrases' => 'Downloads Module Phrases', 'adminModsPhrases' => 'Mods Module Phrases', 'adminMailbagPhrases' => 'Mailbag Module Phrases', 'adminMenuPhrases' => 'Menu Manager Phrases', 'adminModulePhrases' => 'Module Manager Phrases', 'adminNewsPhrases' => 'News Module Phrases', 'adminPagesPhrases' => 'Pages Module Phrases', 'adminPluginsPhrases' => 'Plugins Module Phrases', 'adminPollsPhrases' => 'Polls Module Phrases', 'adminPreviewsPhrases' => 'Previews Module Phrases', 'adminProfilePhrases' => 'Profile Editor Phrases', 'adminMatrixPhrases' => 'Related Content Manager Phrases', 'adminReviewsPhrases' => 'Reviews Module Phrases', 'adminScreenshotsPhrases' => 'Screenshots Module Phrases', 'adminSectionsPhrases' => 'Sections Module Phrases', 'adminTemplatesPhrases' => 'Template Editor Phrases', 'adminUsersPhrases' => 'User Manager Phrases');
     $setting = $cp->getParam('setting');
     do_select_row('Settings and Phrases Quick Jump', 'setting', $options, $setting);
     do_submit_row('Edit Settings');
     do_table_footer();
     do_form_footer();
 }
Exemplo n.º 20
0
<?php

/***
* Obsedb CMS
* Copyright 2004-2006 Josh Kimbrel
***/
/*** Set error reporting level ***/
error_reporting(E_ALL ^ E_NOTICE);
/*** Include Necessary Files ***/
require_once 'global.php';
require_once '../sources/version.inc.php';
/*** Output Header HTML ***/
$cp->header();
do_module_header('Obsedb CMS Updates', 'Download updates and addons for Obsedb CMS');
/*** URL to updates page ***/
$url = 'http://obsedb.co.cc/updates/';
echo '<b>Current Version: ' . $patchid . '</b>';
?>
<iframe width='100%' height='400' style="border: 1px solid #404040;" src='<?php 
echo $url;
?>
'></iframe>


<?php 
$cp->footer();
Exemplo n.º 21
0
<?php

// Get required files
require "global.php";
// Print control panel header
$cp->header();
// Links for module header
$links = '<a href="modules.php?do=install">Install Module</a>';
// Print module header
do_module_header('Module Manager', $links);
// Variables used by module
$do = $cp->getParam('do');
$id = $cp->getParam('id');
if (!isset($_REQUEST['do'])) {
    $result = $db->Execute("SELECT *\n\t\t\t\t\t\t\tFROM Obsedb_modules\n\t\t\t\t\t\t\tORDER BY `title`;");
    while ($row = $result->FetchNextObject()) {
        if ($row->ACTIVE == '1') {
            $status = "Enabled";
        } else {
            $status = "Disabled";
        }
        do_table_header("<b>" . stripslashes($row->TITLE) . "</b>");
        do_blank_row("&nbsp;&nbsp;&nbsp;&nbsp; Status: {$status}");
        if ($row->ACTIVE == '1') {
            do_blank_row("&nbsp;&nbsp;&nbsp;&nbsp; <a href='modules.php?do=unpublish&id={$row->ID}'>Disable this module</a>");
        } else {
            do_blank_row("&nbsp;&nbsp;&nbsp;&nbsp; <a href='modules.php?do=publish&id={$row->ID}'>Enable this module</a>");
        }
        do_blank_row("&nbsp;&nbsp;&nbsp;&nbsp; <a href='modules.php?do=edit&id={$row->ID}'>Edit module configuration</a>");
        do_table_footer();
    }
Exemplo n.º 22
0
 function header()
 {
     global $db;
     $links = '<!-- No Links -->';
     do_module_header($this->phrase['module_header'], $links, 'content');
 }
Exemplo n.º 23
0
    function mainForm()
    {
        global $db, $pwzlogin, $spconfig;
        $links = '<a href="index2.php?do=add">Post Announcement</a>';
        do_module_header($this->phrase['welcome'] . $_SESSION['pwzlogin'], $links);
        do_table_header($this->phrase['announcements']);
        $result = $db->Execute("SELECT * FROM `Obsedb_announcements` ORDER BY `date` DESC;");
        if ($result->RecordCount() == 0) {
            do_blank_row($this->phrase['no_announcements']);
        }
        while ($row = $result->FetchNextObject()) {
            echo "<tr><td class='formlabel'><b>" . stripslashes($row->TITLE) . "</b><br />";
            echo "Posted by " . stripslashes($row->USER) . " on " . stripslashes($row->DATE);
            echo "<tr><td class='formlabel2'>" . html_entity_decode($row->TEXT) . "<br />";
            echo "<font style='font-size: 11px; color: blue;'>";
            echo "<a href=index2.php?do=edit&id={$row->ID}>Edit Announcement</a> | ";
            echo "<a href=index2.php?do=delete&id={$row->ID}>Delete Announcement</a></td></tr>";
        }
        do_table_footer();
        /**
         *	Recent Mods Table
         **/
        $cphome_recent_Mods = $spconfig['cphome_recent_Mods'];
        do_table_header($this->phrase['recent_Mods']);
        $Mods = $db->Execute("SELECT id,title FROM `Obsedb_Mods` ORDER BY `id` DESC LIMIT 0,{$cphome_recent_Mods}");
        while ($row = $Mods->FetchNextObject()) {
            echo '
			    <tr>
				    <td class="formlabel" style="font-size: 11px;">
				    <a href="Mods.php?do=Edit Mod&id=', $row->ID, '">', stripslashes($row->TITLE), '</a>
				    </td>
			    </tr>';
        }
        if ($Mods->RecordCount() == 0) {
            do_blank_row($this->phrase['no_content']);
        }
        do_table_footer();
        /**
         *	Recent News Table
         **/
        do_table_header($this->phrase['recent_news']);
        $news = $db->Execute("SELECT id,title FROM `Obsedb_news` ORDER BY `id` DESC LIMIT 0,5");
        while ($row = $news->FetchNextObject()) {
            echo '
			    <tr>
				    <td class="formlabel" style="font-size: 11px;">
				    <a href="news.php?do=Edit News&id=', $row->ID, '">', stripslashes($row->TITLE), '</a>
				    </td>
			    </tr>';
        }
        if ($news->RecordCount() == 0) {
            do_blank_row($this->phrase['no_content']);
        }
        do_table_footer();
        /**
         *	Recent Previews Table
         **/
        do_table_header($this->phrase['recent_previews']);
        $previews = $db->Execute("SELECT id,title FROM `Obsedb_previews` ORDER BY `id` DESC LIMIT 0,5");
        while ($row = $previews->FetchNextObject()) {
            echo '
			    <tr>
				    <td class="formlabel" style="font-size: 11px;">
				    <a href="previews.php?do=Edit Preview&id=', $row->ID, '">', stripslashes($row->TITLE), '</a>
				    </td>
			    </tr>';
        }
        if ($previews->RecordCount() == 0) {
            do_blank_row($this->phrase['no_content']);
        }
        do_table_footer();
        /**
         * Recent Reviews Table
         **/
        do_table_header($this->phrase['recent_previews']);
        $reviews = $db->Execute("SELECT id,title FROM `Obsedb_reviews` ORDER BY `id` DESC LIMIT 0,5");
        while ($row = $reviews->FetchNextObject()) {
            echo '
			    <tr>
				    <td class="formlabel" style="font-size: 11px;">
				    <a href="reviews.php?do=Edit Review&id=', $row->ID, '">', stripslashes($row->TITLE), '</a>
				    </td>
			    </tr>';
        }
        if ($reviews->RecordCount() == 0) {
            do_blank_row($this->phrase['no_content']);
        }
        do_table_footer();
    }
Exemplo n.º 24
0
<?php

error_reporting(E_ALL ^ E_NOTICE);
include "global.php";
$cp->header();
$links = '<a href="menu_manager.php?do=add_link">Add Item</a> | ' . '<a href="menu_manager.php">Manage Items</a>';
do_module_header('Menu Manager', $links, 'configuration.php?setting=menu');
if (empty($_REQUEST['do'])) {
    do_form_header('menu_manager.php');
    do_table_header("Left Menu");
    $result = $db->Execute("SELECT * FROM `Obsedb_menu_items` WHERE `location` = 'left' ORDER BY `ordering`");
    while ($row = $result->FetchNextObject()) {
        $bgcolor = $bgcolor == "#ECECFF" ? "#FFFFFF" : "#ECECFF";
        echo '<tr>' . '<td bgcolor="' . $bgcolor . '"><input type="radio" name="id" value="' . $row->ID . '"> ' . stripslashes($row->TITLE) . '</td>' . '<td bgcolor="' . $bgcolor . '">' . stripslashes($row->URL) . '</td>' . '</tr>';
    }
    if ($result->RecordCount() == 0) {
        echo '<tr><td colspan="2" class="formlabel">There are currently no menu items to display.</td></tr>';
    }
    echo '<tr>
         <td colspan="2" class="formlabel">
            <input type="submit" name="do" value="Edit Link">
            <input type="submit" name="do" value="Delete Link">
         </td>
        </tr>';
    do_table_footer();
    echo '</form>';
    do_form_header('menu_manager.php');
    do_table_header("Right Menu");
    $result = $db->Execute("SELECT * FROM `Obsedb_menu_items` WHERE `location` = 'right' ORDER BY `ordering`");
    while ($row = $result->FetchNextObject()) {
        $bgcolor = $bgcolor == "#ECECFF" ? "#FFFFFF" : "#ECECFF";