Beispiel #1
0
/**
 * Uninstall routine for Xmap.
 * Drops the settings table from the Joomla! database
 * @author Daniel Grothe
 * @see XmapConfig.php
 * @package Xmap_Admin
 * @version $Id: uninstall.xmap.php 32 2009-05-18 20:00:14Z guilleva $
 */
function com_uninstall()
{
    require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_xmap' . DS . 'classes' . DS . 'XmapConfig.php';
    XmapConfig::remove();
}
Beispiel #2
0
		<tr>
		    <td width="18%"><u><b>Installation Process:</b></u></td>
		    <td width="80%" rowspan="2"><b>
			<?php 
if (file_exists($pathLangFile . $tmp_lng . '.php')) {
    include_once $pathLangFile . $tmp_lng . '.php';
} else {
    include_once $pathLangFile . $tmp_lng . '.php';
}
$live_site = substr_replace(JURI::root(), "", -1, 1);
include JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_xmap' . DS . 'classes' . DS . 'XmapConfig.php';
echo '<table>';
echo '<tr><td><img src="', $live_site, '/administrator/components/com_xmap/images/logo.jpg" /></td>';
echo '<td>';
echo '<table class="adminlist" style="width:auto"><tr class="row0"><td>&rarr;</td><td>' . "\n";
XmapConfig::create();
echo '</td></tr>' . "\n";
echo "</table></td>\n";
echo "</tr>";
?>
 </b>
			<font color="green"><b>Installation completed.</b><br />
			<br> </br>
			<font color="green"><b>Xmap 1.2.7 has been installed successfully! Thank you for using Xmap! Settings can be configured in the <a href="index2.php?option=com_xmap">&rarr; component menu</a>!<br /></b><br />
			<br> </br></td>
		</tr>
	    <tr>
	      <td>&nbsp;</td>
      </tr>
		<tr>
		    <td width="100%" colspan="2">
}
$lang =& JFactory::getLanguage();
$language = $lang->getBackwardLang();
$LangPath = JPATH_COMPONENT_ADMINISTRATOR . DS . 'language' . DS;
if (file_exists($LangPath . $language . '.php')) {
    require_once $LangPath . $language . '.php';
} else {
    require_once $LangPath . 'english.php';
}
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'XmapConfig.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'XmapSitemap.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'XmapPlugins.php';
require_once JPATH_COMPONENT_ADMINISTRATOR . DS . 'classes' . DS . 'XmapCache.php';
$user =& JFactory::getUser();
global $xSitemap, $xConfig;
$xConfig = new XmapConfig();
$xConfig->load();
// This is an AJAX request to modify a item of the sitemap
if ($task == 'editElement') {
    if ($user->get('gid') != "25") {
        die('Invalid request!');
    }
    $sitemapid = JRequest::getInt('sitemap', 0);
    if ($sitemapid) {
        $sitemap = new XmapSitemap($database);
        if ($sitemap->load($sitemapid)) {
            $action = JRequest::getCmd('action', '');
            $uid = JRequest::getCmd('uid', '');
            $itemid = JRequest::getInt('itemid', '');
            switch ($action) {
                case 'toggleElement':
Beispiel #4
0
global $xmapComponentURL, $xmapSiteURL, $xmapComponentPath, $xmapAdministratorURL, $xmapLang, $xmapAdministratorPath;
$lang =& JFactory::getLanguage();
$xmapLang = strtolower($lang->getBackwardLang());
$xmapComponentPath = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_xmap';
$xmapComponentURL = $live_site . '/administrator/components/com_xmap';
$xmapAdministratorPath = JPATH_ADMINISTRATOR;
$xmapAdministratorURL = $live_site . '/administrator';
$xmapSiteURL = $live_site;
// load language file
if (file_exists($xmapComponentPath . DS . 'language' . DS . $xmapLang . '.php')) {
    require_once $xmapComponentPath . DS . 'language' . DS . $xmapLang . '.php';
} else {
    if ($task != 'ajax_request') {
        echo 'Language file [ ' . $xmapLang . ' ] not found, using default language: english<br />';
    }
    $xmapLang = 'english';
    require_once $xmapComponentPath . DS . 'language' . DS . 'english.php';
}
require_once $xmapComponentPath . DS . 'classes' . DS . 'XmapAdmin.php';
JToolBarHelper::title('Xmap', 'generic');
// load settings from database
require_once $xmapComponentPath . DS . 'classes' . DS . 'XmapConfig.php';
require_once $xmapComponentPath . DS . 'admin.xmap.html.php';
$config = new XmapConfig();
if (!$config->load()) {
    $text = _XMAP_ERR_NO_SETTINGS . "<br />\n";
    $link = 'index2.php?option=com_xmap&task=create';
    echo sprintf($text, $link);
}
$admin = new XmapAdmin();
$admin->show($config, $task, $cid);
Beispiel #5
0
    header('Content-Type: text/xml');
    @readfile($mosConfig_absolute_path . '/components/com_xmap/gss.xsl');
    exit;
}
$LangPath = $mosConfig_absolute_path . '/administrator/components/com_xmap/language/';
if (file_exists($LangPath . $mosConfig_lang . '.php')) {
    require_once $LangPath . $mosConfig_lang . '.php';
} else {
    require_once $LangPath . 'english.php';
}
require_once $mosConfig_absolute_path . '/administrator/components/com_xmap/classes/XmapConfig.php';
require_once $mosConfig_absolute_path . '/administrator/components/com_xmap/classes/XmapSitemap.php';
require_once $mosConfig_absolute_path . '/administrator/components/com_xmap/classes/XmapPlugins.php';
require_once $mosConfig_absolute_path . '/administrator/components/com_xmap/classes/XmapCache.php';
global $xSitemap, $xConfig;
$xConfig = new XmapConfig();
$xConfig->load();
$Itemid = intval(mosGetParam($_REQUEST, 'Itemid', ''));
$sitemapid = '';
// Firts lets try to get the sitemap's id from the menu's params
if ($Itemid) {
    $menu = new mosMenu($database);
    $menu->load($Itemid);
    $params = new mosParameters($menu->params);
    $sitemapid = intval($params->get('sitemap', ''));
}
if (!$sitemapid) {
    //If the is no sitemap id specificated
    $sitemapid = intval(mosGetParam($_REQUEST, 'sitemap', ''));
}
if (!$sitemapid && $xConfig->sitemap_default) {
Beispiel #6
0
             if ($plugin->store()) {
                 echo 1;
             } else {
                 echo $database->getErrorMsg();
             }
         }
     } else {
         die("Invalid Plugin ID");
     }
     break;
 case 'set_default':
     $id = intval(JRequest::getVar('sitemap', '', "REQUEST"));
     if (!$id || $id != JRequest::getVar('sitemap', '', "REQUEST")) {
         die("Invalid Sitemap ID");
     }
     $config = new XmapConfig();
     # $config->load();
     $config->sitemap_default = $id;
     if ($config->save()) {
         echo '1';
     } else {
         echo $database->getErrorMsg();
     }
     break;
 case 'change_plugin_state':
     $id = intval(JRequest::getVar('plugin', '', "REQUEST"));
     if (!$id || $id != JRequest::getVar('plugin', '', "REQUEST")) {
         die("Invalid Plugin ID");
     }
     $plugin = new XmapPlugin($database, $id);
     $plugin->published = $plugin->published ? 0 : 1;