sys_data.htm
8.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $cfg_soft_lang; ?>">
<title>数据库维护</title>
<link href='css/base.css' rel='stylesheet' type='text/css'>
<script language="javascript" src="../include/js/dedeajax2.js"></script>
<script language="javascript">
var myajax;
var newobj;
var posLeft = 200;
var posTop = 150;
function LoadUrl(surl){
newobj = document.getElementById('_mydatainfo');
if(!newobj){
newobj = document.createElement("DIV");
newobj.id = '_mydatainfo';
newobj.style.position='absolute';
newobj.className = "dlg";
newobj.style.top = posTop;
newobj.style.left = posLeft;
document.body.appendChild(newobj);
}else{
newobj.style.display = "block";
}
myajax = new DedeAjax(newobj);
myajax.SendGet("sys_data.php?"+surl);
}
function HideObj(objname){
var obj = document.getElementById(objname);
obj.style.display = "none";
}
//获得选中文件的数据表
function getCheckboxItem(){
var myform = document.form1;
var allSel="";
if(myform.tables.value) return myform.tables.value;
for(i=0;i<myform.tables.length;i++)
{
if(myform.tables[i].checked){
if(allSel=="")
allSel=myform.tables[i].value;
else
allSel=allSel+","+myform.tables[i].value;
}
}
return allSel;
}
//反选
function ReSel(){
var myform = document.form1;
for(i=0;i<myform.tables.length;i++){
if(myform.tables[i].checked) myform.tables[i].checked = false;
else myform.tables[i].checked = true;
}
}
//全选
function SelAll(){
var myform = document.form1;
for(i=0;i<myform.tables.length;i++){
myform.tables[i].checked = true;
}
}
//取消
function NoneSel(){
var myform = document.form1;
for(i=0;i<myform.tables.length;i++){
myform.tables[i].checked = false;
}
}
function checkSubmit()
{
var myform = document.form1;
myform.tablearr.value = getCheckboxItem();
return true;
}
</script>
</head>
<body background='images/allbg.gif' leftmargin='8' topmargin='8'>
<table width="99%" border="0" cellpadding="3" cellspacing="1" bgcolor="#D6D6D6">
<tr>
<td height="19" colspan="8" background="images/tbg.gif" bgcolor="#E7E7E7">
<table width="96%" border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="24%" style="padding-left:10px;"><strong>数据库管理</strong></td>
<td width="76%" align="right">
<b><a href="sys_data_revert.php"><u>数据还原</u></a></b> |
<b><a href="sys_sql_query.php"><u>SQL命令行工具</u></a></b>
</td>
</tr>
</table>
</td>
</tr>
<form name="form1" onSubmit="checkSubmit()" action="sys_data_done.php?dopost=bak" method="post" target="stafrm">
<input type='hidden' name='tablearr' value='' />
<tr bgcolor="#F7F8ED">
<td height="24" colspan="8"><strong>DedeCMS默认系统表:</strong></td>
</tr>
<tr bgcolor="#FBFCE2" align="center">
<td height="24" width="5%">选择</td>
<td width="20%">表名</td>
<td width="8%">记录数</td>
<td width="17%">操作</td>
<td width="5%">选择</td>
<td width="20%">表名</td>
<td width="8%">记录数</td>
<td width="17%">操作</td>
</tr>
<?php
for($i=0; isset($dedeSysTables[$i]); $i++)
{
$t = $dedeSysTables[$i];
echo "<tr align='center' bgcolor='#FFFFFF' height='24'>\r\n";
?>
<td>
<input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np" checked />
</td>
<td>
<?php echo $t; ?>
</td>
<td>
<?php echo TjCount($t,$dsql); ?>
</td>
<td>
<a href="#" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');">优化</a> |
<a href="#" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');">修复</a> |
<a href="#" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');">结构</a>
</td>
<?php
$i++;
if(isset($dedeSysTables[$i])) {
$t = $dedeSysTables[$i];
?>
<td>
<input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np" checked />
</td>
<td>
<?php echo $t; ?>
</td>
<td>
<?php echo TjCount($t,$dsql); ?>
</td>
<td>
<a href="#" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');">优化</a> |
<a href="#" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');">修复</a> |
<a href="#" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');">结构</a>
</td>
<?php
}
else
{
echo "<td></td><td></td><td></td><td></td>\r\n";
}
echo "</tr>\r\n";
}
?>
<tr bgcolor="#F9FCEF">
<td height="24" colspan="8"><strong>其它数据表:</strong></td>
</tr>
<tr bgcolor="#FBFCE2" align="center">
<td height="24" width="5%">选择</td>
<td width="20%">表名</td>
<td width="8%">记录数</td>
<td width="17%">操作</td>
<td width="5%">选择</td>
<td width="20%">表名</td>
<td width="8%">记录数</td>
<td width="17%">操作</td>
</tr>
<?php
for($i=0; isset($otherTables[$i]); $i++)
{
$t = $otherTables[$i];
echo "<tr align='center' bgcolor='#FFFFFF' height='24'>\r\n";
?>
<td>
<input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np" />
</td>
<td>
<?php echo $t; ?>
</td>
<td>
<?php echo TjCount($t,$dsql); ?>
</td>
<td>
<a href="#" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');">优化</a> |
<a href="#" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');">修复</a> |
<a href="#" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');">结构</a>
</td>
<?php
$i++;
if(isset($otherTables[$i])) {
$t = $otherTables[$i];
?>
<td>
<input type="checkbox" name="tables" value="<?php echo $t; ?>" class="np" />
</td>
<td>
<?php echo $t; ?>
</td>
<td>
<?php echo TjCount($t,$dsql); ?>
</td>
<td>
<a href="#" onClick="LoadUrl('dopost=opimize&tablename=<?php echo $t; ?>');">优化</a> |
<a href="#" onClick="LoadUrl('dopost=repair&tablename=<?php echo $t; ?>');">修复</a> |
<a href="#" onClick="LoadUrl('dopost=viewinfo&tablename=<?php echo $t; ?>');">结构</a>
</td>
<?php
}else{
echo "<td></td><td></td><td></td><td></td>\r\n";
}
echo "</tr>\r\n";
}
?>
<tr bgcolor="#ffffff">
<td height="24" colspan="8">
<input name="b1" type="button" id="b1" class="coolbg np" onClick="SelAll()" value="全选" />
<input name="b2" type="button" id="b2" class="coolbg np" onClick="ReSel()" value="反选" />
<input name="b3" type="button" id="b3" class="coolbg np" onClick="NoneSel()" value="取消" />
</td>
</tr>
<tr bgcolor="#F9FCEF">
<td height="24" colspan="8"><strong>数据备份选项:</strong></td>
</tr>
<tr align="center" bgcolor="#FFFFFF">
<td height="50" colspan="8">
<table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30">当前数据库版本: <?php echo $mysql_version?></td>
</tr>
<tr>
<td height="30">
指定备份数据格式:
<input name="datatype" type="radio" class="np" value="4.0"<?php if($mysql_version<4.1) echo " checked='1'";?> />
MySQL3.x/4.0.x 版本
<input type="radio" name="datatype" value="4.1" class="np"<?php if($mysql_version>=4.1) echo " checked='1'";?> />
MySQL4.1.x/5.x 版本
</td>
</tr>
<tr>
<td height="30">
分卷大小:
<input name="fsize" type="text" id="fsize" value="2048" size="6" />
K ,
<input name="isstruct" type="checkbox" class="np" id="isstruct" value="1" checked='1' />
备份表结构信息
<?php if(@function_exists('gzcompress') && false) { ?>
<input name="iszip" type="checkbox" class="np" id="iszip" value="1" checked='1' />
完成后压缩成ZIP
<?php } ?>
<input type="submit" name="Submit" value="提交" class="coolbg np" />
</td>
</tr>
</table>
</td>
</tr>
</form>
<tr bgcolor="#F9FCEF">
<td height="24" colspan="8"><strong>进行状态:</strong></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="180" colspan="8">
<iframe name="stafrm" frameborder="0" id="stafrm" width="100%" height="100%"></iframe>
</td>
</tr>
</table>
</body>
</html>