Code Search for Developers
 
 
  

admin.php from ECP (EliteCore Project) at Krugle


Show admin.php syntax highlighted

<?php
$currentModule->object->showMenu();

$rights = $currentModule->getRights(User :: $profile->group);

if ($rights->write) {

	switch ($_GET['op']) {
		case "save_changes" :
			$TA = new TA();
			$TA->addQuery(TA :: UPDATE, "xcs_engine_config");
			$TA->addParam("value", TA :: STRING, $_POST['pagetitle']);
			$TA->WHERE("`name`='pagetitle'");
			$TA->LIMIT(1);
			$TA->addQuery(TA :: UPDATE, "xcs_engine_config");
			$TA->addParam("value", TA :: STRING, $_POST['description']);
			$TA->WHERE("`name`='description'");
			$TA->LIMIT(1);
			$TA->addQuery(TA :: UPDATE, "xcs_engine_config");
			$TA->addParam("value", TA :: STRING, $_POST['keywords']);
			$TA->WHERE("`name`='keywords'");
			$TA->LIMIT(1);
			if (isset ($_POST['theme'])) {
				$TA->addQuery(TA :: UPDATE, "xcs_engine_config");
				$TA->addParam("value", TA :: STRING, $_POST['theme']);
				$TA->WHERE("`name`='theme'");
				$TA->LIMIT(1);
			}
			if (isset ($_POST['admin_theme'])) {
				$TA->addQuery(TA :: UPDATE, "xcs_engine_config");
				$TA->addParam("value", TA :: STRING, $_POST['admin_theme']);
				$TA->WHERE("`name`='admin_theme'");
				$TA->LIMIT(1);
			}
			$TA->addQuery(TA :: UPDATE, "xcs_engine_config");
			$TA->addParam("value", TA :: STRING, $_POST['adminThemeMode']);
			$TA->WHERE("`name`='admin_theme_mode'");
			$TA->LIMIT(1);
			$TA->Execute();
			$TA->End();
			Engine :: Redirect("index.php?file=admin");
			break;
		default :
			$TA = new TA();
			$TA->addQuery(TA :: SELECT, "xcs_engine_config", "pagetitle");
			$TA->addParam("value");
			$TA->WHERE("`name`='pagetitle'");
			$TA->LIMIT(1);
			$TA->addQuery(TA :: SELECT, "xcs_engine_config", "description");
			$TA->addParam("value");
			$TA->WHERE("`name`='description'");
			$TA->LIMIT(1);
			$TA->addQuery(TA :: SELECT, "xcs_engine_config", "keywords");
			$TA->addParam("value");
			$TA->WHERE("`name`='keywords'");
			$TA->LIMIT(1);
			$TA->Execute();

			$pagetitle = '';
			$object = $TA->Result("pagetitle")->FetchObject();
			if (isset ($object->value))
				$pagetitle = $object->value;

			$description = '';
			$object = $TA->Result("description")->FetchObject();
			if (isset ($object->value))
				$description = $object->value;

			$keywords = '';
			$object = $TA->Result("keywords")->FetchObject();
			if (isset ($object->value))
				$keywords = $object->value;

			$TA->End();
			$themes = $XCS->loadModule("themes");
			$currentModule->addContent("sys_admin.php");
			$currentModule->registerVariable($pagetitle, "pagetitle");
			$currentModule->registerVariable($description, "description");
			$currentModule->registerVariable($keywords, "keywords");
			if ($themes) {
				$admin_themes = $themes->object->getAdminThemes();
				$themes = $themes->object->getThemes();
				$currentModule->registerVariable($admin_themes, "admin_themes");
				$currentModule->registerVariable($themes, "themes");
			}
	}
}
?>



See more files for this project here

ECP (EliteCore Project)

EliteCore Project is a PHP5.1/Javascript/AJAX/XHTML/CSS framework for creating WEB 2.0 applications and services.The basic open-source instalation can be also used as an interactive personal page or BLOG.This project uses the latest features available.

Project homepage: http://sourceforge.net/projects/elitecore
Programming language(s): JavaScript,PHP,XML
License: cpl

  language/
    czech.xml
    english.xml
  templates/
    default/
      images/
        bg.png
        down.jpg
        up.jpg
      content.php
      content_admin.php
      main.css
      modules_hidden_menu.php
      modules_menu.php
      sys_admin.php
      welcome.php
  admin.php
  config.xml
  modules_hidden_menu.php
  modules_menu.php
  subroutines.php