4 |
david |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/***************************************************************************\
|
|
|
4 |
* SPIP, Systeme de publication pour l'internet *
|
|
|
5 |
* *
|
|
|
6 |
* Copyright (c) 2001-2005 *
|
|
|
7 |
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
|
|
|
8 |
* *
|
|
|
9 |
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
|
|
|
10 |
* Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
|
|
|
11 |
\***************************************************************************/
|
|
|
12 |
|
|
|
13 |
|
|
|
14 |
include ("inc.php3");
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
debut_page(_T('titre_admin_tech'), "administration", "base");
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
echo "<br>";
|
|
|
21 |
|
|
|
22 |
if ($options == "avancees") {
|
|
|
23 |
echo "<br><br>";
|
|
|
24 |
gros_titre(_T('titre_admin_tech'));
|
|
|
25 |
barre_onglets("administration", "sauver");
|
|
|
26 |
}
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
debut_gauche();
|
|
|
30 |
|
|
|
31 |
debut_boite_info();
|
|
|
32 |
|
|
|
33 |
echo _T('info_gauche_admin_tech');
|
|
|
34 |
|
|
|
35 |
fin_boite_info();
|
|
|
36 |
|
|
|
37 |
debut_droite();
|
|
|
38 |
|
|
|
39 |
if ($connect_statut != '0minirezo' OR !$connect_toutes_rubriques) {
|
|
|
40 |
echo _T('avis_non_acces_page');
|
|
|
41 |
fin_page();
|
|
|
42 |
exit;
|
|
|
43 |
}
|
|
|
44 |
|
|
|
45 |
|
|
|
46 |
|
|
|
47 |
//
|
|
|
48 |
// Sauvegarde de la base
|
|
|
49 |
//
|
|
|
50 |
|
|
|
51 |
debut_cadre_relief();
|
|
|
52 |
|
|
|
53 |
echo "<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=5 WIDTH=\"100%\">";
|
|
|
54 |
echo "<TR><TD BGCOLOR='$couleur_foncee' BACKGROUND=''><B>";
|
|
|
55 |
echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3 COLOR='#FFFFFF'>";
|
|
|
56 |
echo _T('texte_sauvegarde')."</FONT></B></TD></TR>";
|
|
|
57 |
|
|
|
58 |
echo "<tr><td class='serif'>";
|
|
|
59 |
|
|
|
60 |
echo "\n<FORM ACTION='export_all.php3' METHOD='get'>";
|
|
|
61 |
|
|
|
62 |
echo "\n<p align='justify'>";
|
|
|
63 |
echo http_img_pack('warning.gif', _T('info_avertissement'), "width='48' height='48' align='right'");
|
|
|
64 |
echo _T('texte_admin_tech_01');
|
|
|
65 |
|
|
|
66 |
echo "<p>"._T('texte_admin_tech_02');
|
|
|
67 |
|
|
|
68 |
if ($flag_gz) {
|
|
|
69 |
echo "\n<p align='justify'>"._T('texte_admin_tech_03')."<p>";
|
|
|
70 |
echo "\n<INPUT TYPE='radio' NAME='gz' VALUE='1' id='gz_on' CHECKED><label for='gz_on'> "._T('bouton_radio_sauvegarde_compressee')." </label><BR>\n";
|
|
|
71 |
echo "\n<INPUT TYPE='radio' NAME='gz' VALUE='0' id='gz_off'><label for='gz_off'> "._T('bouton_radio_sauvegarde_non_compressee')." </label><BR>\n";
|
|
|
72 |
}
|
|
|
73 |
else {
|
|
|
74 |
echo "\n<p align='justify'>"._T('texte_sauvegarde_compressee');
|
|
|
75 |
echo "\n<INPUT TYPE='hidden' NAME='gz' VALUE='0'>";
|
|
|
76 |
}
|
|
|
77 |
|
|
|
78 |
echo "\n<p><DIV align='right'><INPUT CLASS='fondo' TYPE='submit' NAME='valider' VALUE='"._T('texte_sauvegarde_base')."'></FORM></DIV>";
|
|
|
79 |
|
|
|
80 |
echo "</td></tr>";
|
|
|
81 |
echo "</TABLE>";
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
//
|
|
|
85 |
// Restauration de la base
|
|
|
86 |
//
|
|
|
87 |
|
|
|
88 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=8 WIDTH=\"100%\">";
|
|
|
89 |
echo "<TR><TD BGCOLOR='#EEEECC' BACKGROUND=''><B>";
|
|
|
90 |
echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3 COLOR='#000000'>";
|
|
|
91 |
echo _T('texte_restaurer_base')."</FONT></B></TD></TR>";
|
|
|
92 |
|
|
|
93 |
echo "<TR><td class='serif'>";
|
|
|
94 |
|
|
|
95 |
echo "\n<FORM ACTION='import_all.php3' METHOD='get'>";
|
|
|
96 |
|
|
|
97 |
echo "\n<p align='justify'> "._T('texte_restaurer_sauvegarde');
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
if ($flag_gz) {
|
|
|
101 |
$fichier_defaut = 'dump.xml.gz';
|
|
|
102 |
$texte_compresse = _T('texte_compresse_ou_non')." ";
|
|
|
103 |
}
|
|
|
104 |
else {
|
|
|
105 |
$fichier_defaut = 'dump.xml';
|
|
|
106 |
$texte_compresse = _T('texte_non_compresse')." ";
|
|
|
107 |
}
|
|
|
108 |
|
|
|
109 |
echo "\n<p>"._T('entree_nom_fichier', array('texte_compresse' => $texte_compresse));
|
|
|
110 |
echo "\n<p><FONT SIZE=3><ul><INPUT TYPE='text' NAME='archive' VALUE='$fichier_defaut' SIZE='30'></ul></FONT>";
|
|
|
111 |
|
|
|
112 |
echo "\n<p><DIV align='right'><INPUT CLASS='fondo' TYPE='submit' NAME='valider' VALUE='"._T('bouton_restaurer_base')."'></DIV></FORM>";
|
|
|
113 |
|
|
|
114 |
echo "</td></tr>";
|
|
|
115 |
echo "</TABLE>";
|
|
|
116 |
|
|
|
117 |
|
|
|
118 |
//
|
|
|
119 |
// Lien vers la reparation
|
|
|
120 |
//
|
|
|
121 |
|
|
|
122 |
if ($options == "avancees") {
|
|
|
123 |
$res = spip_query("SELECT version()");
|
|
|
124 |
if (($row = spip_fetch_array($res)) AND ($row[0] >= '3.23.14')) {
|
|
|
125 |
echo "<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=8 WIDTH=\"100%\">";
|
|
|
126 |
echo "<TR><TD BGCOLOR='#EEEECC' BACKGROUND=''><B>";
|
|
|
127 |
echo "<FONT FACE='Verdana,Arial,Sans,sans-serif' SIZE=3 COLOR='#000000'>";
|
|
|
128 |
echo _T('texte_recuperer_base')."</FONT></B></TD></TR>";
|
|
|
129 |
|
|
|
130 |
echo "<TR><TD class='serif'>";
|
|
|
131 |
|
|
|
132 |
echo "\n<FORM ACTION='admin_repair.php3' METHOD='get'>";
|
|
|
133 |
|
|
|
134 |
echo "\n<p align='justify'>"._T('texte_crash_base');
|
|
|
135 |
|
|
|
136 |
echo "\n<p><DIV align='right'><INPUT CLASS='fondo' TYPE='submit' NAME='valider' VALUE='"._T('bouton_tenter_recuperation')."'></DIV></FORM>";
|
|
|
137 |
|
|
|
138 |
echo "</TD></TR>";
|
|
|
139 |
echo "</TABLE>";
|
|
|
140 |
}
|
|
|
141 |
}
|
|
|
142 |
|
|
|
143 |
|
|
|
144 |
fin_cadre_relief();
|
|
|
145 |
|
|
|
146 |
echo "<BR>";
|
|
|
147 |
|
|
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
|
151 |
fin_page();
|
|
|
152 |
|
|
|
153 |
|
|
|
154 |
?>
|