📄 admin.easygallery.php
字号:
<?php/*** @package EasyGallery* @copyright (C) 2006 Joomla-addons.org* @author Adam van Dongen* @version $Id: admin.easygallery.php 4 2007-06-16 14:22:19Z websmurf $* * --------------------------------------------------------------------------------* All rights reserved. Easy Gallery Component for Joomla!** This program is free software; you can redistribute it and/or* modify it under the terms of the Joomla-addons Free Software License * See LICENSE.php for more information.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * --------------------------------------------------------------------------------**/defined( '_VALID_MOS' ) or die( 'Restricted access' );require_once($mainframe->getPath('class'));require_once($mainframe->getPath('admin_html'));$task = mosGetParam($_REQUEST, 'task');$act = mosGetParam($_REQUEST, 'act');$cid = mosGetParam($_REQUEST, 'cid', array(0));if(!is_array($cid)){ $cid = array($cid);}switch ($act){ case 'categories': swCategories($task, $cid); break; case 'photos': swPhotos($task, $cid); break; case 'configuration': swConfiguration($task, $cid); break; case 'xajaxServer': $xajax->processRequests(); exit; case 'updates': echo $xajax->getJavascript($mainframe->getCfg('live_site') . '/administrator/components/com_easygallery/xajax'); update::show(); break; default: HTML_easygallery::showCredits(); break;}/** * Switch for photos * * @param string $task * @param array $cid */function swPhotos($task, $cid){ global $option; switch ($task){ case 'new': photos::upload(); break; case 'edit': photos::edit($cid[0]); break; case 'apply': case 'save': photos::save(); break; case 'remove': photos::remove($cid); break; case 'cancel': mosRedirect('index2.php?option=' . $option . '&act=photos'); break; case 'orderup': photos::reorder($cid[0], -1); break; case 'orderdown': photos::reorder($cid[0], 1); break; case 'saveorder': photos::saveOrder($cid); break; case 'publish': photos::setState($cid, 1); break; case 'unpublish': photos::setState($cid, 0); break; case 'upload': photos::handleUpload(); break; default: photos::show(); break; }}/** * Switch for categories * * @param string $task * @param array $cid */function swCategories($task, $cid){ global $option; switch ($task){ case 'new': categories::edit(0); break; case 'edit': categories::edit($cid[0]); break; case 'apply': case 'save': categories::save(); break; case 'remove': categories::remove($cid); break; case 'cancel': mosRedirect('index2.php?option=' . $option . '&act=categories'); break; case 'orderup': categories::reorder($cid[0], -1); break; case 'orderdown': categories::reorder($cid[0], 1); break; case 'saveorder': categories::saveOrder($cid); break; case 'publish': categories::setState($cid[0], 1); break; case 'unpublish': categories::setState($cid[0], 0); break; default: categories::show(); break; }}function swConfiguration($task){ global $option; switch ($task){ case 'save': case 'apply': saveConfiguration(); break; case 'cancel': mosRedirect('index2.php?option=' . $option); break; default: HTML_easygallery::showConfiguration(); break; }}?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -