26 require_once(
"../class/config.php");
27 include_once(
"head.php");
30 <h3
class=
"backup"><?php
__(
"MySQL Databases - Configure backups"); ?></h3>
36 echo
"<p class=\"alert alert-danger\">"._(
"You aren't allowed to access this page. Contact your administrator if you want to.").
"</p>";
37 include_once(
'foot.php');
42 "id" => array (
"request",
"string",
""),
43 "bck_mode" => array (
"post",
"integer", 0),
44 "bck_history" => array (
"post",
"integer", 7),
45 "bck_gzip" => array (
"post",
"integer", 0),
46 "bck_dir" => array (
"post",
"string",
"/"),
51 $r=$mysql->get_mysql_details(
$id);
53 echo
$msg->msg_html_all();
57 <h3><?php printf(_(
"Manage the SQL backup for database %s"),
$r[
"db"]); ?></h3>
59 <form action=
"sql_dobck.php" method=
"post" id=
"main" name=
"main">
63 <th><label><?php
__(
"Do MySQL backup?"); ?></label></th>
65 <input type=
"hidden" name=
"id" value=
"<?php ehe($id); ?>" />
66 <input type=
"radio" class=
"inc" id=
"bck_mode0" name=
"bck_mode" value=
"0"<?php
cbox(
$r[
"bck"]==0); ?>/><label
for=
"bck_mode0"><?php
__(
"No backup"); ?></label><br />
67 <input type=
"radio" class=
"inc" id=
"bck_mode1" name=
"bck_mode" value=
"1"<?php
cbox(
$r[
"bck"]==1); ?>/><label
for=
"bck_mode1"><?php
__(
"Weekly backup"); ?></label><br />
68 <input type=
"radio" class=
"inc" id=
"bck_mode2" name=
"bck_mode" value=
"2"<?php
cbox(
$r[
"bck"]==2); ?>/><label
for=
"bck_mode2"><?php
__(
"Daily backup"); ?></label><br />
72 <th><label
for=
"bck_history"><?php
__(
"How many backups should be kept?"); ?></label></th>
73 <td><select
class=
"inl" name=
"bck_history" id=
"bck_history">
77 if (
$r[
"history"]==
$i) echo
" selected=\"selected\"";
84 <th><label><?php
__(
"Compress the backups? (gzip)"); ?></label></th>
87 <input type=
"radio" class=
"inc" id=
"bck_gzip0" name=
"bck_gzip" value=
"0"<?php
cbox(
$r[
"gzip"]==0); ?>/><label
for=
"bck_gzip0"><?php
__(
"No"); ?></label><br />
88 <input type=
"radio" class=
"inc" id=
"bck_gzip1" name=
"bck_gzip" value=
"1"<?php
cbox(
$r[
"gzip"]==1); ?>/><label
for=
"bck_gzip1"><?php
__(
"Yes"); ?></label><br />
93 <th><label
for=
"bck_dir"><?php
__(
"In which folder do you want to store the backups?"); ?></label></th>
94 <td><input type=
"text" class=
"int" name=
"bck_dir" id=
"bck_dir" size=
"30" maxlength=
"255" value=
"<?php ehe($r["dir
"]); ?>" />
99 <tr
class=
"trbtn"><td colspan=
"2">
100 <input
class=
"inb ok" type=
"submit" name=
"submit" value=
"<?php __("Change the MySQL backup parameters
"); ?>" />
101 <input type=
"button" class=
"inb cancel" name=
"cancel" value=
"<?php __("Cancel
"); ?>" onclick=
"document.location='sql_list.php'"/>
106 $mem->show_help(
"sql_bck");
109 __(
"You currently have no database defined");
113 <?php include_once(
"foot.php"); ?>
variable_get($name, $default=null, $createit_comment=null)
Return a persistent variable.
display_browser($dir="", $caller="main.dir", $width=350, $height=450)
Show a button to select a folder on the server.
cbox($test, $echo=true)
ECHOes checked="checked" only if the parameter is true useful for checkboxes and radio buttons.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
if(! variable_get('sql_allow_users_backups')) $fields
if(!isset($is_include)) if(! $key &&! $crt) $id