コード例 #1
0
ファイル: XmapAdmin.php プロジェクト: omarmm/MangLuoiBDS
 /** Parses input parameters and calls appropriate function */
 function show(&$config, &$task, &$cid)
 {
     $this->config =& $config;
     global $xmapComponentPath;
     switch ($task) {
         case 'save':
             $this->saveOptions($config);
             break;
         case 'cancel':
             global $mainframe;
             $mainframe->redirect('index2.php');
             break;
         case 'uploadfile':
             xmapUploadPlugin();
             break;
         case 'installfromdir':
             xmapInstallPluginFromDirectory();
             break;
         case 'ajax_request':
             include $xmapComponentPath . '/ajaxResponse.php';
             exit;
             break;
         case 'navigator':
             xmapShowNavigator($this->config);
             break;
         case 'navigator-links':
             xmapShowNavigatorLinks($this->config);
             break;
         default:
             $success = JRequest::getVar('success', '', "REQUEST");
             $this->showSettingsDialog($success);
             break;
     }
 }
コード例 #2
0
                    }
                    break;
            }
        }
    }
    header('Content-Type: text/xml');
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
    echo "<response>\n";
    echo " <result>OK</result>\n";
    echo " <state>" . $state . "</state>\n";
    echo "</response>\n";
    exit;
} elseif ($task == 'navigator') {
    require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'admin.xmap.html.php';
    require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'XmapAdmin.php';
    xmapShowNavigator($xConfig);
    return;
} elseif ($task == 'navigator-links') {
    require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'admin.xmap.html.php';
    require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'XmapAdmin.php';
    xmapShowNavigatorLinks($xConfig);
    return;
}
$Itemid = intval(JRequest::getVar('Itemid', '', "REQUEST"));
$sitemapid = '';
// Firts lets try to get the sitemap's id from the menu's params
if ($Itemid) {
    $menu = JTable::getInstance('Menu');
    $menu->load($Itemid);
    $params = new JParameter($menu->params);
    $sitemapid = intval($params->get('sitemap', ''));