Alternc  latest
Alternc logiel libre pour l'hébergement
sql_dobck.php
Go to the documentation of this file.
1 <?php
2 /*
3  ----------------------------------------------------------------------
4  LICENSE
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License (GPL)
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  To read the license please visit http://www.gnu.org/copyleft/gpl.html
17  ----------------------------------------------------------------------
18 */
19 
20 /**
21  * Receive the post for the management of the Backup
22  * of MySQL database
23  *
24  * @copyright AlternC-Team 2000-2017 https://alternc.com/
25  */
26 
27 require_once("../class/config.php");
28 
29 if ( ! variable_get('sql_allow_users_backups') ) {
30  include_once('head.php');
31  echo "<p class=\"alert alert-warning\">"._("You aren't allowed to access this page. Contact your administrator if you want to.")."</p>";
32  include_once('foot.php');
33  exit;
34 }
35 
36 
37 $fields = array (
38  "id" => array ("post", "string", ""),
39  "bck_mode" => array ("post", "integer", 0),
40  "bck_history" => array ("post", "integer", 7),
41  "bck_gzip" => array ("post", "integer", 0),
42  "bck_dir" => array ("post", "string", "/"),
43 
44 );
46 
47 
48 $mysql->put_mysql_backup($id,$bck_mode,$bck_history,$bck_gzip,$bck_dir);
49 
50 if ($msg->has_msgs("ERROR")) {
51  include("sql_bck.php");
52  exit();
53 } else {
54  $msg->raise("INFO", "mysql", _("Your backup parameters has been successfully changed."));
55 }
56 include("sql_list.php");
57 ?>
exit
Definition: adm_doadd.php:70
$msg
Definition: bootstrap.php:75
variable_get($name, $default=null, $createit_comment=null)
Return a persistent variable.
Definition: variables.php:85
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
Definition: functions.php:688
if(! variable_get('sql_allow_users_backups')) $fields
Receive the post for the management of the Backup of MySQL database.
Definition: sql_dobck.php:37
if(!isset($is_include)) if(! $key &&! $crt) $id