Beispiel #1
0
 * 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 "modules/samba/includes/shares.inc.php";
if (isset($_POST["bgo"])) {
    $share = $_POST["share"];
    $backuppath = sched_backup($share, $_POST["media"]);
    if (!isXMLRPCError()) {
        $str = "<h2>" . _T("Share backup") . "</h2>";
        $str .= '<p>';
        $str .= sprintf(_T("Backup of share <b>%s</b> has been launched in background."), $share);
        $str .= "</p><p>";
        $str .= sprintf(_("The files will be stored in the directory %s of the server at the end of the backup."), $backuppath);
        $str .= "</p><p>";
        $str .= _T("Please go to the status page to check the backup status.");
        $str .= "</p><p>";
        $str .= _T("This operation will last according to the amount of data to backup.");
        $str .= "</p>";
        new NotifyWidgetSuccess($str);
    } else {
        new NotifyWidgetFailure(_T("Can't launch backup"));
    }
Beispiel #2
0
?>

<h2><?php 
echo _("Backup a user's folder");
?>
</h2>

<?php 
if (isset($_GET["user"])) {
    $user = urldecode($_GET["user"]);
}
if (isset($_POST["user"])) {
    $user = $_POST["user"];
}
if (isset($_POST["bgo"])) {
    $backuppath = sched_backup($user, $_POST["media"]);
    if (!isXMLRPCError()) {
        $str = "<h2>" . _("Backup a user's home directory") . "</h2>";
        $str .= "<p>";
        $str .= sprintf(_("Backup of <b>%s</b> user's folder has been launched in background."), $user);
        $str .= "</p><p>";
        $str .= sprintf(_("The files will be stored in the directory %s of the server at the end of the backup."), $backuppath);
        $str .= "</p><p>";
        $str .= _("Please go to the status page to check the backup status.");
        $str .= "</p><p>";
        $str .= _("This operation will last according to the amount of data to backup.");
        $str .= "</p>";
        new NotifyWidgetSuccess($str);
    }
    header("Location: " . urlStrRedirect("base/users/index"));
    exit;