function showPlugins() { $database = JFactory::getDBO(); $my = JFactory::getUser(); if (checkAccess($database, 'core.admin')) { $plugins = array(); $show_hint = false; foreach (glob(dirname(__FILE__) . '/tfu/*_plugin.php') as $filename) { $name = 'Not set'; $description = 'Not set'; $version_plugin = 'Not set'; $version_tfu = 'Not set'; $content = file_get_contents($filename); $hits = preg_match('/(Name:)([^\\n]*)(\\n)/i', $content, $treffer); if ($hits != 0) { $name = trim($treffer[2]); } $hits = preg_match('/(Description:)([^\\n]*)(\\n)/i', $content, $treffer); if ($hits != 0) { $description = trim($treffer[2]); } $hits = preg_match('/(Version Plugin:)([^\\n]*)(\\n)/i', $content, $treffer); if ($hits != 0) { $version_plugin = trim($treffer[2]); } $hits = preg_match('/(Needed flash version:)([^\\n]*)(\\n)/i', $content, $treffer); if ($hits != 0) { $version_tfu = trim($treffer[2]); if (version_compare($version_tfu, JFUHelper::getVariable($database, 'version')) == 1) { $version_tfu = 'style="color: #ff0000;"'; $show_hint = true; } else { $version_tfu = ''; } } $plugins[] = array(basename($filename), htmlentities($name), htmlentities($description), $version_plugin, $version_tfu); } $available = array("a_plugin", "move_plugin"); HTML_joomla_flash_uploader::showPlugins($plugins, $show_hint); } else { HTML_joomla_flash_uploader::errorRights(); } }
function chmod_tfu($mode) { global $mainframe; $database =& JFactory::getDBO(); $my =& JFactory::getUser(); if (checkAccess($database, $my->usertype, 'backend_access_config')) { chmod(dirname(__FILE__) . "/tfu/tfu_config.php", $mode); chmod(dirname(__FILE__) . "/tfu/tfu_login.php", $mode); chmod(dirname(__FILE__) . "/tfu/tfu_file.php", $mode); chmod(dirname(__FILE__) . "/tfu/tfu_upload.php", $mode); cleanMessageQueue(); $mainframe->redirect("index2.php?option=com_joomla_flash_uploader&act=help", JText::_('H_L_CHMOD_MES')); } else { HTML_joomla_flash_uploader::errorRights(); } }