<?
defined( '_JEXEC' ) or die( 'Restricted access' ); 
//error_reporting(E_ALL);
include_once (JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_jxplorer'.DS.'jxplorer.functions.php');
include_once (JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_jxplorer'.DS.'joomlaequipment.config.php');

function com_install() {
    $database =& JFactory::getDBO();
    
    @mkdir(JPATH_ROOT.DS.'images/jxplorer_thumbnails');
    @mkdir(JPATH_ROOT.DS.'uploads');
    
    $path = str_replace("\\", '/', JPATH_ROOT.DS);
    $database -> setQuery("UPDATE #__je_config SET `selected` = '{$path}' WHERE `name` = 'homedir' AND `section` = 'general'");
    $database -> query();
    
     $path = str_replace("\\", '/',JPATH_ROOT.DS);
    $database -> setQuery("UPDATE #__je_config SET `selected` = '{$path}uploads/' WHERE `name` = 'upload_dir' AND `section` = 'general'");
    $database -> query();
    
     $path = str_replace("\\", '/',JPATH_ROOT.DS);
    $database -> setQuery("UPDATE #__je_config SET `selected` = '{$path}images/jxplorer_thumbnails/' WHERE `name` = 'tumb_path' AND `section` = 'general'");
    $database -> query();
    
    $database -> setQuery("UPDATE #__components SET admin_menu_link = '' WHERE name = 'JXplorer'");
    $database -> query();
}

?>