| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: admin.templates.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @subpackage Templates 6 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 7 * @license GNU/GPL, see LICENSE.php 8 * Joomla! is free software. This version may have been modified pursuant to the 9 * GNU General Public License, and as distributed it includes or is derivative 10 * of works licensed under the GNU General Public License or other free or open 11 * source software licenses. See COPYRIGHT.php for copyright notices and 12 * details. 13 */ 14 15 // no direct access 16 defined('_JEXEC') or die('Restricted access'); 17 18 /* 19 * Make sure the user is authorized to view this page 20 */ 21 $user = & JFactory::getUser(); 22 if (!$user->authorize('com_templates', 'manage')) { 23 $mainframe->redirect('index.php', JText::_('ALERTNOTAUTH')); 24 } 25 26 // Set the table directory 27 JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_templates'.DS.'tables'); 28 29 // Import file dependencies 30 require_once (JPATH_COMPONENT.DS.'helpers'.DS.'template.php'); 31 require_once (JPATH_COMPONENT.DS.'controller.php'); 32 33 $task = JRequest::getCmd('task'); 34 35 $client = JRequest::getVar('client', 0, '', 'int'); 36 37 if ($client == 1) { 38 JSubMenuHelper::addEntry(JText::_('Site'), 'index.php?option=com_templates&client=0'); 39 JSubMenuHelper::addEntry(JText::_('Administrator'), 'index.php?option=com_templates&client=1', true); 40 } elseif ($client == 0 && !$task) { 41 JSubMenuHelper::addEntry(JText::_('Site'), 'index.php?option=com_templates&client=0', true); 42 JSubMenuHelper::addEntry(JText::_('Administrator'), 'index.php?option=com_templates&client=1'); 43 } else { 44 JSubMenuHelper::addEntry(JText::_('Site'), 'index.php?option=com_templates&client=0'); 45 JSubMenuHelper::addEntry(JText::_('Administrator'), 'index.php?option=com_templates&client=1'); 46 } 47 48 switch ($task) 49 { 50 case 'edit' : 51 TemplatesController::editTemplate(); 52 break; 53 54 case 'save' : 55 case 'apply' : 56 TemplatesController::saveTemplate(); 57 break; 58 59 case 'edit_source' : 60 TemplatesController::editTemplateSource(); 61 break; 62 63 case 'save_source' : 64 case 'apply_source' : 65 TemplatesController::saveTemplateSource(); 66 break; 67 68 case 'choose_css' : 69 TemplatesController::chooseTemplateCSS(); 70 break; 71 72 case 'edit_css' : 73 TemplatesController::editTemplateCSS(); 74 break; 75 76 case 'save_css' : 77 case 'apply_css' : 78 TemplatesController::saveTemplateCSS(); 79 break; 80 81 case 'publish' : 82 case 'default' : 83 TemplatesController::publishTemplate(); 84 break; 85 86 case 'cancel' : 87 TemplatesController::cancelTemplate(); 88 break; 89 90 case 'save_positions' : 91 TemplatesController::savePositions(); 92 break; 93 94 case 'preview' : 95 TemplatesController::previewTemplate(); 96 break; 97 98 default : 99 TemplatesController::viewTemplates(); 100 break; 101 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |