예제 #1
0
    $display = "";
    $display .= COM_siteHeader('menu', $MESSAGE[30]);
    $display .= COM_startBlock($MESSAGE[30], '', COM_getBlockTemplate('_msg_block', 'header'));
    $display .= $MESSAGE[35];
    $display .= COM_endBlock(COM_getBlockTemplate('_msg_block', 'footer'));
    $display .= COM_siteFooter();
    // Log attempt to error.log
    COM_accessLog("User {$_USER['username']} tried to illegally access admin/plugins/assist/configback.php ");
    echo $display;
    exit;
}
//MAIN
//**************
$pi_name = "assist";
//$pi_name="databox";
//$pi_name="";
//**************
$action = "";
if (isset($_REQUEST['action'])) {
    $action = COM_applyFilter($_REQUEST['action'], false);
}
echo "piname=" . $pi_name . "<br>";
$display = "";
if ($action == "") {
    $display = LIB_Disply($pi_name);
} elseif ($action == "submit") {
    $display = LIB_Backupconfig($pi_name);
} else {
    $display = "cancel!";
}
echo $display;
예제 #2
0
if (isset($_REQUEST['msg'])) {
    $display .= COM_showMessage(COM_applyFilter($_REQUEST['msg'], true), $pi_name);
}
switch ($action) {
    case $LANG_USERBOX_ADMIN['config_init']:
        $dummy = LIB_Deleteconfig($pi_name, $config);
        $dummy = LIB_Initializeconfig($pi_name);
        echo COM_refresh($_CONF['site_admin_url'] . '/plugins/userbox/backuprestore.php');
        exit;
        break;
    case $LANG_USERBOX_ADMIN['config_backup']:
        $display .= LIB_Backupconfig($pi_name);
        break;
    case $LANG_USERBOX_ADMIN['config_restore']:
        $display .= LIB_Restoreconfig($pi_name, $config);
        break;
    case $LANG_USERBOX_ADMIN['config_update']:
        $dummy = LIB_Backupconfig($pi_name, "update");
        $dummy = LIB_Deleteconfig($pi_name, $config);
        $dummy = LIB_Initializeconfig($pi_name);
        $dummy = LIB_Restoreconfig($pi_name, $config, "update");
        echo COM_refresh($_CONF['site_admin_url'] . '/plugins/userbox/backuprestore.php');
        exit;
        break;
    default:
}
$display .= fncMenu($pi_name);
$display .= fncDisply($pi_name);
$display = COM_startBlock($LANG_USERBOX_ADMIN['piname'], '', COM_getBlockTemplate('_admin_block', 'header')) . $display . COM_endBlock(COM_getBlockTemplate('_admin_block', 'footer'));
$display = DATABOX_displaypage($pi_name, '_admin', $display, $information);
COM_output($display);
예제 #3
0
if (isset($_REQUEST['msg'])) {
    $display .= COM_showMessage(COM_applyFilter($_REQUEST['msg'], true), $pi_name);
}
switch ($action) {
    case $LANG_ASSIST_ADMIN['config_init']:
        $display .= LIB_Deleteconfig($pi_name, $config);
        $display .= LIB_Initializeconfig($pi_name);
        break;
    case $LANG_ASSIST_ADMIN['config_backup']:
        $display .= LIB_Backupconfig($pi_name);
        break;
    case $LANG_ASSIST_ADMIN['config_restore']:
        $display .= LIB_Restoreconfig($pi_name, $config);
        break;
    case $LANG_ASSIST_ADMIN['config_update']:
        $display .= LIB_Backupconfig($pi_name, "update");
        $display .= LIB_Deleteconfig($pi_name, $config);
        $display .= LIB_Initializeconfig($pi_name);
        $display .= LIB_Restoreconfig($pi_name, $config, "update");
        break;
    default:
}
$display .= fncDisply($pi_name);
//FOR GL2.0.0
if (COM_versionCompare(VERSION, "2.0.0", '>=')) {
    $display = COM_createHTMLDocument($display, $information);
} else {
    $display = COM_siteHeader($information['what'], $information['pagetitle']) . $display;
    $display .= COM_siteFooter($information['rightblock']);
}
COM_output($display);