![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 284 Pomógł: 0 Dołączył: 25.03.2007 Skąd: Globalna wioska Ostrzeżenie: (0%) ![]() ![]() |
Mam kod:
I co mam usunąć żeby pozostawić sam katalog? -------------------- |
|
|
![]()
Post
#2
|
|
![]() Grupa: Zarejestrowani Postów: 6 476 Pomógł: 1306 Dołączył: 6.08.2006 Skąd: Kraków Ostrzeżenie: (0%) ![]() ![]() |
Pomijając to, że nie wiemy jaki masz dokładnie kod: możesz utworzyć katalog na nowo po jego usunięciu.
|
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 284 Pomógł: 0 Dołączył: 25.03.2007 Skąd: Globalna wioska Ostrzeżenie: (0%) ![]() ![]() |
O to kod z pliku:
Kod <?php
// no direct access defined( '_JEXEC' ) or die( 'Restricted access' ); jimport('joomla.plugin.plugin'); class plgSystemJSecure extends JPlugin { /** * Constructor * * For php4 compatability we must not use the __constructor as a constructor for plugins * because func_get_args ( void ) returns a copy of all passed arguments NOT references. * This causes problems with cross-referencing necessary for the observer design pattern. * * @param object $subject The object to observe * @since 1.5 */ function plgSystemCanonicalization(& $subject, $config) { parent :: __construct($subject, $config); } function onAfterDispatch() { // Register the needed session variables $session =& JFactory::getSession(); $plugin =& JPluginHelper::getPlugin( 'system', 'jsecure' ); $params = new JParameter($plugin->params); $my =& JFactory::getUser(); $checkedKey = $session->get('jSecureAuthentication'); $path =''; if (empty($checkedKey)) { if((preg_match("/administrator\/*index.?\.php$/i", $_SERVER['SCRIPT_NAME']))) { if(!$my->id && $params->get('key') != $_SERVER['QUERY_STRING']) { $config =& JFactory::getConfig(); $path .= $params->get('options') == 1 ? JURI::root().$params->get('custom_path') : JURI::root(); $app =& JFactory::getApplication(); $app->redirect($path); } else { $session->set('jSecureAuthentication', 1); } } } } } -------------------- |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 10:37 |