Example #1
0
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
require_once "modules/backuppc/includes/xmlrpc.php";
$computer_name = $_GET['cn'];
$uuid = $_GET['objectUUID'];
// ==========================================================
// Receiving POST data for user actions
// ==========================================================
if (isset($_POST['startFullBackup'])) {
    $response = start_full_backup($_POST['host']);
    sleep(2);
} elseif (isset($_POST['startIncrBackup'])) {
    $response = start_incr_backup($_POST['host']);
    sleep(2);
} elseif (isset($_POST['stopBackup'])) {
    $response = stop_backup($_POST['host']);
    sleep(2);
}
// Check if error occured
if (isset($response)) {
    if (isXMLRPCError() || $response['err']) {
        new NotifyWidgetFailure(nl2br($response['errtext']));
    } else {
        new NotifyWidgetSuccess(_T('Action requested successfully', 'backuppc'));
    }
}
// ==========================================================
// Test if UUID is set on BackupPC Hosts DB
// ==========================================================
if (get_backupserver_for_computer($uuid) != '') {
    if (!host_exists($uuid)) {
Example #2
0
/**
 * (c) 2004-2007 Linbox / Free&ALter Soft, http://linbox.com
 * (c) 2007-2008 Mandriva, http://www.mandriva.com
 *
 * $Id$
 *
 * This file is part of Mandriva Management Console (MMC).
 *
 * MMC is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * MMC is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MMC; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 */
require_once "includes/xmlrpc.inc.php";
require_once 'modules/backuppc/includes/xmlrpc.php';
stop_backup($_POST["uuid"]);
?>
<script type="text/javascript">
    pushSearch();
    closePopup();
</script>