芝麻web文件管理V1.00
编辑当前文件:/home/asmplong/www/ancien-site-2019/site/administrator/components/com_akeeba/controllers/log.php
authorise('akeeba.download', 'com_akeeba')) { $this->setRedirect('index.php?option=com_akeeba'); return JError::raiseWarning(403, JText::_('JERROR_ALERTNOAUTHOR')); $this->redirect(); } } else { // Custom ACL for Joomla! 1.5 $aclModel = JModel::getInstance('Acl','AkeebaModel'); if(!$aclModel->authorizeUser('download')) { $this->setRedirect('index.php?option=com_akeeba'); return JError::raiseWarning(403, JText::_('Access Forbidden')); $this->redirect(); } } } /** * Display the log page * */ public function display() { AEPlatform::load_configuration(AEPlatform::get_active_profile()); parent::display(); } // Renders the contents of the log's iframe public function iframe() { AEPlatform::load_configuration(AEPlatform::get_active_profile()); parent::display(); flush(); JFactory::getApplication()->close(); } public function download() { AEPlatform::load_configuration(AEPlatform::get_active_profile()); $tag = JRequest::getCmd('tag',null); $filename = AEUtilLogger::logName($tag); @ob_end_clean(); // In case some braindead plugin spits its own HTML header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1 header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past header("Content-Description: File Transfer"); header('Content-Type: text/plain'); header('Content-Disposition: attachment; filename="Akeeba Backup Debug Log.txt"'); echo "WARNING: Do not copy and paste lines from this file!\r\n"; echo "You are supposed to ZIP and attach it in your support forum post.\r\n"; echo "If you fail to do so, your support request will receive minimal priority.\r\n"; echo "\r\n"; echo "--- START OF RAW LOG --\r\n"; @readfile($filename); // The at sign is necessary to skip showing PHP errors if the file doesn't exist or isn't readable for some reason echo "--- END OF RAW LOG ---\r\n"; flush(); JFactory::getApplication()->close(); } }