* (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'; if (isset($_POST["bfull"], $_POST["uuid"])) { // Starting Full backup start_full_backup($_POST["uuid"]); return; } elseif (isset($_POST["bincr"], $_POST["uuid"])) { // Starting Full backup start_incr_backup($_POST["uuid"]); return; } else { /* Form displaying */ $title = _T("Choose the backup type.", 'backuppc'); $f = new PopupForm($title, 'backupManualAction'); $f->add(new HiddenTpl("uuid"), array("value" => $_GET['objectUUID'], "hide" => True)); $f->addButton("bfull", _T('Full backup', 'backuppc')); $f->addButton("bincr", _T('Incremental backup', 'backuppc')); //$f->addCancelButton("bback"); $f->display(); }
* 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 "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')); }