示例#1
0
 /**
  * Load the theme a user wants to use
  *
  * @param sfWebRequest $request
  * @return <type>
  */
 public function executeLoadUserTheme(sfWebRequest $request) {
     $tm = new ThemeManagement();
     $defaultTheme = UserSettingTable::instance()->getUserSettingById($request->getParameter('id'))->toArray();
     $tm->setContext($this->getContext());
     $data = $tm->getThemes();
     $data = $tm->checkDefault($data, $defaultTheme[0]['theme']);
     $this->renderText('({"result":'.json_encode($data).'})');
     return sfView::NONE;
 }
示例#2
0
<?php

require_once 'class/config.inc.php';
require_once 'class/class.ThemeManagement.php';
$page = new basic_page();
/*******Checking Authentication****************/
$page->auth->Checklogin();
$user = new User();
$notify = new Notification();
$theme = new ThemeManagement();
/**********************************************/
/*******Setting Page access Rules & checking Authorization****************/
$access_rule = array("Admin" => "Admin");
$page->setAccessRules($access_rule);
$page->setAccessRulesType('all');
// any or all
$page->CheckAuthorization();
/************************************************************************/
$page->setPageKeywords('');
$page->setPageDescription('');
$page->setPageTitle("THEME MANAGEMENT");
$page->setActiveButton('2');
$page->setInnerNav('');
//$page -> setImportCss1('main_style.css');
//$page -> setImportCss2('form.css'); // each page should have it's own .css sheet.  Link mulitple sheets here and below
$page->SetDynamicCSS_1('main_style.php');
$page->SetDynamicCSS_2('form.php');
$page->setImportCss3('css/JTip.css');
$page->setImportCss4('');
$page->setImportCss5('');
$page->setExtJavaScripts2('<script language="javascript" SRC="js/jtip.js"></script>');