function com_uninstall()
{
    $return = '';
    $return = removeBots();
    $return = removeModule() and $return;
    return $return;
}
Example #2
0
/**
* @copyright Copyright (C) 2009 Joobi Limited All rights reserved.
* @license This file is released under the GPL license (http://www.gnu.org/licenses )
* @link http://www.ijoobi.com
*/
function com_uninstall()
{
    if (defined('JPATH_ROOT')) {
        // joomla 15
        define('ACA_JPATH_ROOT', JPATH_ROOT);
    } else {
        define('ACA_JPATH_ROOT', $GLOBALS['mosConfig_absolute_path']);
    }
    //endif
    require_once ACA_JPATH_ROOT . '/components/com_acajoom/defines.php';
    $return = removeBots();
    $return = removeModule() and $return;
    return $return;
}
Example #3
0
     break;
 case 'new':
     editModule($option, 0, $client);
     break;
 case 'edit':
     editModule($option, intval($cid[0]), $client);
     break;
 case 'editA':
     editModule($option, $id, $client);
     break;
 case 'save':
 case 'apply':
     saveModule($option, $client, $task);
     break;
 case 'remove':
     removeModule($cid, $option, $client);
     break;
 case 'cancel':
     cancelModule($option, $client);
     break;
 case 'publish':
 case 'unpublish':
     publishModule($cid, $task == 'publish', $option, $client);
     break;
 case 'orderup':
 case 'orderdown':
     orderModule(intval($cid[0]), $task == 'orderup' ? -1 : 1, $option);
     break;
 case 'accesspublic':
 case 'accessregistered':
 case 'accessspecial':
Example #4
0
     $xmlRoot->appendChild(getUser($dbconn, $xmlDoc, $_REQUEST['user_id']));
     break;
 case "load_redstone_controls":
     $xmlRoot->appendChild(loadRedstoneControls($dbconn, $xmlDoc, $_REQUEST['user_id']));
     break;
 case "setRedstoneOutput":
     $xmlRoot->appendChild(setRedstoneOutput($dbconn, $xmlDoc, $_REQUEST['token'], $_REQUEST['side'], $_REQUEST['value'], $_REQUEST['val_type']));
     break;
 case "load_fluid_modules":
     $xmlRoot->appendChild(getFluidLevels($dbconn, $xmlDoc, $_REQUEST['user_id']));
     break;
 case "load_energy_modules":
     $xmlRoot->appendChild(getEnergyLevels($dbconn, $xmlDoc, $_REQUEST['user_id']));
     break;
 case "remove_module":
     $xmlRoot->appendChild(removeModule($dbconn, $xmlDoc, $_REQUEST['token']));
     break;
 case "redstone_event_dropdowns":
     $xmlRoot->appendChild(redstoneEventDropdowns($dbconn, $xmlDoc, $_REQUEST['user_id']));
     break;
 case "get_redstone_sides":
     $xmlRoot->appendChild(getRedstoneSides($dbconn, $xmlDoc, $_REQUEST['token']));
     break;
 case "create_redstone_event":
     $xmlRoot->appendChild(createRedstoneEvent($dbconn, $xmlDoc, $_REQUEST['storage_token'], $_REQUEST['redstone_token'], $_REQUEST['trigger_value'], $_REQUEST['side'], $_REQUEST['output_value'], $_REQUEST['event_type'], $_REQUEST['user_id']));
     break;
 case "load_redstone_events":
     $xmlRoot->appendChild(loadRedstoneEvents($dbconn, $xmlDoc, $_REQUEST['user_id']));
     break;
 case "remove_event":
     $xmlRoot->appendChild(removeEvent($dbconn, $xmlDoc, $_REQUEST['event_id']));
Example #5
0
function com_uninstall()
{
    if (defined('JPATH_ROOT')) {
        define('JNEWS_JPATH_ROOT', JPATH_ROOT);
    }
    if (!defined('DS')) {
        define('DS', DIRECTORY_SEPARATOR);
    }
    require_once JNEWS_JPATH_ROOT . DS . 'components' . DS . 'com_jnews' . DS . 'defines.php';
    unpublishSystemPlugin();
    $return = removeBots();
    $return = removeModule() and $return;
    return $return;
}
Example #6
0
function updateModule($name, $version, $md5, $size)
{
    $modules = getLocalList();
    foreach ($modules as $module) {
        $module = explode("|", $module);
        if ($module[0] == $name) {
            $localVersion = $module[1];
            $localDest = $module[2];
        }
    }
    removeModule($name, $localVersion, $localDest);
    installModule($name, $version, $localDest, $md5, $size);
}
Example #7
0
function delmodule()
{
    checkPerm('mod');
    require_once _base_ . '/lib/lib.form.php';
    $out =& $GLOBALS['page'];
    $out->setWorkingZone('content');
    $id_main = Get::req('id_main', DOTY_INT, 0);
    $id_module = Get::req('id_module', DOTY_INT, 0);
    $lang =& DoceboLanguage::createInstance('manmenu', 'framework');
    $menu_lang =& DoceboLanguage::createInstance('menu_course', 'lms');
    if (isset($_POST['undo'])) {
        Util::jump_to('index.php?modname=manmenu&op=manmodule&id_main=' . $id_main);
    }
    if (isset($_POST['confirm']) || isset($_GET['confirm'])) {
        $re = removeModule($id_module, $id_main, $_SESSION['idCourse']);
        Docebo::user()->loadUserSectionST();
        Docebo::user()->SaveInSession();
        Util::jump_to('index.php?modname=manmenu&op=manmodule&id_main=' . $id_main . '&result=' . ($re ? 1 : 0));
    } else {
        // Load module info
        $query_module = "\r\n\t\tSELECT default_name \r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_module \r\n\t\tWHERE idModule = '" . $id_module . "'";
        list($name_db) = sql_fetch_row(sql_query($query_module));
        $query_custom = "\r\n\t\tSELECT name \r\n\t\tFROM " . $GLOBALS['prefix_lms'] . "_menucourse_main\r\n\t\tWHERE idMain = '" . $id_main . "'";
        list($main_title) = sql_fetch_row(sql_query($query_custom));
        $name = Lang::t($name_db, 'menu_course', false, false, $name_db);
        $page_title = array('index.php?modname=manmenu&op=manmenu' => $lang->def('_TITLE_MANMENU'), 'index.php?modname=manmenu&op=manmodule&id_main=' . $id_main => $main_title, $lang->def('_DEL') . ' : ' . $name);
        $strip_name = strip_tags($name);
        $out->add(getTitleArea($page_title, 'manmenu') . '<div class="std_block">' . Form::openForm('delcustom_form', 'index.php?modname=manmenu&amp;op=delmodule') . Form::getHidden('id_main', 'id_main', $id_main) . Form::getHidden('id_module', 'id_module', $id_module) . getDeleteUi($lang->def('_AREYOUSURE'), '<span class="text_bold">' . $lang->def('_TITLE_MODULE') . ' : </span>' . $name, false, 'confirm', 'undo') . Form::closeForm() . '</div>');
    }
}
Example #8
0
function delmodule()
{
    checkPerm('mod');
    require_once _base_ . '/lib/lib.form.php';
    $out =& $GLOBALS['page'];
    $id_main = Get::req('id_main', DOTY_INT, 0);
    $id_module = Get::req('id_module', DOTY_INT, 0);
    $lang =& DoceboLanguage::createInstance('manmenu');
    $menu_lang =& DoceboLanguage::createInstance('menu_course', 'lms');
    if (isset($_POST['undo'])) {
        Util::jump_to('index.php?modname=amanmenu&op=manmodule&id_main=' . $id_main);
    }
    if (Get::req('confirm', DOTY_INT, 0) == 1) {
        $re = removeModule($id_module, $id_main, getIdCustomFromMain($id_main));
        Util::jump_to('index.php?modname=amanmenu&op=manmodule&id_main=' . $id_main . '&result=' . ($re ? 1 : 0));
    }
}