<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[沧海一粟]]></title> 
<link>http://www.dzhope.com/index.php</link> 
<description><![CDATA[Web系统架构与服务器运维,php开发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[沧海一粟]]></copyright>
<item>
<link>http://www.dzhope.com/post/340/</link>
<title><![CDATA[一个比较好用的php备份mysql数据库]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[代码编程]]></category>
<pubDate>Mon, 27 Aug 2007 09:30:26 +0000</pubDate> 
<guid>http://www.dzhope.com/post/340/</guid> 
<description>
<![CDATA[ 
	<div class="code"><br/>&lt;?<br/> &nbsp; include &quot;inc/admincheckLogin.php&quot;;<br/> &nbsp; include &quot;../inc/config.php&quot;;<br/> &nbsp; $PWARRAY=mysql_fetch_array(mysql_query(&quot;SELECT * FROM shm_siteadmin WHERE user=&#039;&quot;.$power_user.&quot;&#039;&quot;));<br/> &nbsp; $name=$PWARRAY&#91;name&#93;;$right=$PWARRAY&#91;adright&#93;;$state=$PWARRAY&#91;state&#93;;<br/> &nbsp; function get_image_size($pix_path,$w,$h)&#123;<br/> &nbsp; $size=getimagesize($pix_path);<br/> &nbsp; $ow=$size&#91;1&#93;;<br/> &nbsp; $oh=$size&#91;0&#93;;<br/> &nbsp; $w=($oh&gt;$h and $ow&lt;=$w and $oh&gt;$ow)?($ow*$h/$oh):$w;<br/> &nbsp; $h=($oh&lt;=$h and $ow&gt;$w and $oh&lt;$ow)?($oh*$w/$ow):$h;<br/> &nbsp; $w=($oh&gt;$h and $ow&gt;$w and $oh&gt;=$ow)?($ow*$h/$oh):$w;<br/> &nbsp; $h=($oh&gt;$h and $ow&gt;$w and $oh&lt;=$ow)?($oh*$w/$ow):$h;<br/> &nbsp; $b_size&#91;1&#93;=$w;<br/> &nbsp; $b_size&#91;0&#93;=$h;<br/> &nbsp; if($oh&lt;=$h and $ow&lt;=$w)&#123;<br/> &nbsp; &nbsp; &nbsp;$b_size&#91;1&#93;=$ow;<br/>&nbsp;&nbsp; &nbsp;$b_size&#91;0&#93;=$oh;<br/> &nbsp; &#125;<br/> &nbsp; return $b_size;<br/>&#125;<br/>DEFINE (&quot;DEBUG&quot;, 0);<br/>?&gt;<br/>&lt;?<br/>function create_table_sql_string($tablename)&#123;<br/>&nbsp;&nbsp;$sql_string = &quot;CREATE TABLE $tablename&quot;;<br/>&nbsp;&nbsp;$result = mysql_query(&quot;DESCRIBE $tablename&quot;);<br/>&nbsp;&nbsp;if (DEBUG) echo &quot;field_info&#92;n&#92;n&quot;;<br/>&nbsp;&nbsp;$field_string = &quot;&quot;;<br/>&nbsp;&nbsp;while ($field_info = mysql_fetch_array($result)) &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$field_name = $field_info&#91;0&#93;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$field_type = $field_info&#91;1&#93;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$field_not_null = ($field_info&#91;2&#93; == &quot;YES&quot;) ? &quot;&quot; : &quot; NOT NULL&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$field_default = ($field_info&#91;4&#93; == NULL) ? &quot;&quot; : sprintf(&quot; default &#039;%s&#039;&quot;, $field_info&#91;4&#93;);;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$field_auto_increment = ($field_info&#91;5&#93; == NULL) ? &quot;&quot; : sprintf(&quot; %s&quot;, $field_info&#91;5&#93;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$field_string = sprintf(&quot;%s, %s %s%s%s%s&quot;, $field_string, $field_name, $field_type, $field_not_null, $field_auto_increment, $field_default);<br/>&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;$result = mysql_query(&quot;SHOW INDEX FROM $tablename&quot;);<br/>&nbsp;&nbsp;if (DEBUG) echo &quot;&#92;nindex_info&#92;n&#92;n&quot;;<br/>&nbsp;&nbsp;$index_string = &quot;&quot;;<br/>&nbsp;&nbsp;while ($index_info = mysql_fetch_array($result)) &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$index_name = $index_info&#91;2&#93;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$index_unique = $index_info&#91;1&#93;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$index_field_name = $index_info&#91;4&#93;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$index_type = $index_info&#91;10&#93;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;if ($index_name == &quot;PRIMARY&quot;) $index_name = &quot;PRIMARY KEY&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;if ($index_unique == &quot;1&quot; &amp;&amp; $index_type != &quot;FULLTEXT&quot;) $index_name = sprintf(&quot;KEY %s&quot;, $index_name);<br/>&nbsp;&nbsp;&nbsp;&nbsp;if ($index_unique == &quot;0&quot; &amp;&amp; $index_name != &quot;PRIMARY KEY&quot;) $index_name = sprintf(&quot;UNIQUE KEY %s&quot;, $index_name);<br/>&nbsp;&nbsp;&nbsp;&nbsp;if ($index_type == &quot;FULLTEXT&quot;) $index_name = sprintf(&quot;FULLTEXT KEY %s&quot;, $index_name);<br/>&nbsp;&nbsp;&nbsp;&nbsp;$index_string = sprintf(&quot;%s, %s (%s)&quot;, $index_string, $index_name, $index_field_name);<br/>&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;<br/>&nbsp;&nbsp;$result = mysql_query(&quot;SHOW TABLE STATUS&quot;);<br/>&nbsp;&nbsp;if (DEBUG) echo &quot;&#92;nstatus_info&#92;n&#92;n&quot;;<br/>&nbsp;&nbsp;while ($status_info = mysql_fetch_array($result)) &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;for ($i = 0; $i &lt; count($status_info); $i++) &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (DEBUG) echo &quot;$i: $status_info&#91;$i&#93;&#92;n&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($status_info&#91;0&#93; == $tablename) $table_type = sprintf(&quot;TYPE=%s&quot;, $status_info&#91;1&#93;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;$field_string = substr($field_string, 2);<br/>&nbsp;&nbsp;$field_string = sprintf(&quot;%s%s&quot;, $field_string, $index_string);<br/>&nbsp;&nbsp;$field_string = sprintf(&quot;(%s)&quot;, $field_string);<br/>&nbsp;&nbsp;$sql_string = sprintf(&quot;%s %s %s&quot;, $sql_string, $field_string, $table_type);<br/>&nbsp;&nbsp;return $sql_string.&quot;;&quot;;<br/>&#125;<br/><br/>function create_data_sql_string($tablename)<br/>&#123;<br/>&nbsp;&nbsp;$sql_string = &quot;&quot;;<br/>&nbsp;&nbsp;$result = mysql_query(&quot;SELECT * FROM $tablename&quot;);<br/>&nbsp;&nbsp;while ($row = mysql_fetch_row($result)) &#123;<br/>&nbsp;&nbsp; &nbsp; $data_string = &quot;&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;for ($i = 0; $i &lt; mysql_num_fields($result); $i++) &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$data_string = sprintf(&quot;%s, &#039;%s&#039;&quot;, $data_string, mysql_escape_string($row&#91;$i&#93;));<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$data_string = substr($data_string, 2);<br/>&nbsp;&nbsp;&nbsp;&nbsp;$data_string = sprintf(&quot;VALUES (%s)&quot;, $data_string).&quot;;&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;$sql_string = sprintf(&quot;%sINSERT INTO %s %s&#92;n&quot;, $sql_string, $tablename, $data_string);<br/>&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;return $sql_string;<br/>&#125;<br/>?&gt;<br/>&lt;?php<br/>if(isset($act) and $act==&quot;bakup&quot;)&#123; &nbsp;<br/> &nbsp;$dir=date(&quot;Y_m_d&quot;);<br/> &nbsp;if(!file_exists(&quot;data/&quot;.$dir)) &nbsp;$r=mkdir(&quot;data/&quot;.$dir,0700);<br/> &nbsp;for($i=0;$i&lt;12;$i++)&#123;<br/>&nbsp;&nbsp; &nbsp;$table = $GLOBALS&#91;&quot;ch&quot;.$i&#93;;<br/>&nbsp;&nbsp; &nbsp;if($table!=&quot;&quot;)&#123;<br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;if($bukcon==&quot;all&quot;)&#123;<br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $datable = create_table_sql_string($table); <br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $data = create_data_sql_string($table);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $txt=$datable.&quot;&#92;n&quot;.$data;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;if($bukcon==&quot;record&quot;) $txt = create_data_sql_string($table);<br/>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;if($bukcon==&quot;struct&quot;) $txt = create_table_sql_string($table); <br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$filename=$table.&quot;_&quot;.$bukcon.date(&#039;_H_m&#039;).&#039;_&#039;.&#039;nb315&#039;.&#039;.sql&#039;;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$fp=fopen(&quot;data/&quot;.$dir.&quot;/&quot;.$filename,&quot;w+&quot;);<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(fputs($fp,$txt))$out=&quot;数据表&quot;.$table.&quot;已成功备份在 data/$dir/目录下--文件名是$filename&quot;.&quot;&#92;&#92;n&#92;&#92;n&quot;.$out;<br/> &nbsp; &nbsp; &nbsp; &#125;<br/> &nbsp; &nbsp;&#125;<br/> &nbsp; &nbsp;echo &quot;&lt;script&gt;alert(&#039;$out&#039;);&lt;/script&gt;&quot;;<br/>&#125;<br/>?&gt; <br/>&lt;?<br/> &nbsp; function check_dir($dir)&#123;<br/>&nbsp;&nbsp; $temp=opendir($dir);<br/>&nbsp;&nbsp; while($tempfile=readdir($temp))&#123;<br/>&nbsp;&nbsp; &nbsp; &nbsp;if(($tempfile!=&quot;.&quot;)&amp;&amp;($tempfile!=&quot;..&quot;)&amp;&amp;($tempfile!=&quot;&quot;))&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; return $tempfile;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp; &nbsp;&#125;<br/>&nbsp;&nbsp; &nbsp;closedir($temp);<br/>&nbsp;&nbsp; &nbsp;return 0;<br/> &nbsp; &#125;<br/> &nbsp; <br/> &nbsp; if(isset($button) and $button==&quot;删除&quot;)&#123;<br/> &nbsp; &nbsp; for($i=0;$i&lt;$filelength;$i++)&#123;<br/>&nbsp;&nbsp; &nbsp; &nbsp;$list= $GLOBALS&#91;&quot;f&quot;.$i&#93;;<br/>&nbsp;&nbsp; &nbsp; &nbsp;if($list!=&quot;&quot;)&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if(!is_dir($dir.$list)) unlink($dir.$list);<br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; else&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; if(check_dir($dir.$list)) echo &quot;&lt;script&gt;alert(&#039;文件夹 &quot;.$dir.$list.&quot; 不是空的，不能删除！&#039;);&lt;/script&gt;&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;else rmdir($dir.$list);<br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &#125;<br/>&nbsp;&nbsp; &nbsp; &nbsp;&#125;<br/>&nbsp;&nbsp; &#125;<br/> &nbsp; &#125;<br/>?&gt;<br/><br/>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;&gt;<br/>&lt;HTML&gt;&lt;HEAD&gt;<br/>&lt;META http-equiv=Content-Type content=&quot;text/html; charset=gbk&quot;&gt;<br/>&lt;STYLE type=text/css&gt;A &#123;<br/>&nbsp;&nbsp;COLOR: #003366; TEXT-DECORATION: none<br/>&#125;<br/>A:hover &#123;<br/>&nbsp;&nbsp;TEXT-DECORATION: underline<br/>&#125;<br/>BODY &#123;<br/>&nbsp;&nbsp;FONT-SIZE: 12px; SCROLLBAR-ARROW-COLOR: #698cc3; SCROLLBAR-BASE-COLOR: #f8f8f8; BACKGROUND-COLOR: #9eb6d8<br/>&#125;<br/>TABLE &#123;<br/>&nbsp;&nbsp;FONT: 12px Tahoma, Verdana; COLOR: #000000<br/>&#125;<br/>INPUT &#123;<br/>&nbsp;&nbsp;FONT: 11px Tahoma, Verdana; COLOR: #000000; BACKGROUND-COLOR: #f8f8f8<br/>&#125;<br/>SELECT &#123;<br/>&nbsp;&nbsp;FONT: 11px Tahoma, Verdana; COLOR: #000000; BACKGROUND-COLOR: #f8f8f8<br/>&#125;<br/>TEXTAREA &#123;<br/>&nbsp;&nbsp;FONT: 11px Tahoma, Verdana; COLOR: #000000; BACKGROUND-COLOR: #f8f8f8<br/>&#125;<br/>FORM &#123;<br/>&nbsp;&nbsp;PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px<br/>&#125;<br/>SELECT &#123;<br/>&nbsp;&nbsp;FONT: 11px Arial, Tahoma; COLOR: #000000; BACKGROUND-COLOR: #f8f8f8<br/>&#125;<br/>.nav &#123;<br/>&nbsp;&nbsp;FONT: bold 12px Tahoma, Verdana; COLOR: #000000<br/>&#125;<br/>.nav A &#123;<br/>&nbsp;&nbsp;COLOR: #000000<br/>&#125;<br/>.header &#123;<br/>&nbsp;&nbsp;FONT: bold 11px Tahoma, Verdana; COLOR: #ffffff; BACKGROUND-COLOR: #698cc3<br/>&#125;<br/>.header A &#123;<br/>&nbsp;&nbsp;COLOR: #ffffff<br/>&#125;<br/>.category &#123;<br/>&nbsp;&nbsp;FONT: 11px Arial, Tahoma; COLOR: #000000; BACKGROUND-COLOR: #efefef<br/>&#125;<br/>.tableborder &#123;<br/>&nbsp;&nbsp;BORDER-RIGHT: #698cc3 1px solid; BORDER-TOP: #698cc3 1px solid; BACKGROUND: #d6e0ef; BORDER-LEFT: #698cc3 1px solid; BORDER-BOTTOM: #698cc3 1px solid<br/>&#125;<br/>.singleborder &#123;<br/>&nbsp;&nbsp;PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 0px; PADDING-BOTTOM: 0px; LINE-HEIGHT: 1px; PADDING-TOP: 0px; BACKGROUND-COLOR: #f8f8f8<br/>&#125;<br/>.smalltxt &#123;<br/>&nbsp;&nbsp;FONT: 11px Arial, Tahoma<br/>&#125;<br/>.outertxt &#123;<br/>&nbsp;&nbsp;FONT: 12px Tahoma, Verdana; COLOR: #000000<br/>&#125;<br/>.outertxt A &#123;<br/>&nbsp;&nbsp;COLOR: #000000<br/>&#125;<br/>.bold &#123;<br/>&nbsp;&nbsp;FONT-WEIGHT: bold<br/>&#125;<br/>.altbg1 &#123;<br/>&nbsp;&nbsp;BACKGROUND: #f8f8f8<br/>&#125;<br/>.altbg2 &#123;<br/>&nbsp;&nbsp;BACKGROUND: #ffffff<br/>&#125;<br/>.maintable &#123;<br/>&nbsp;&nbsp;WIDTH: 98%; BACKGROUND-COLOR: #ffffff<br/>&#125;<br/>&lt;/STYLE&gt;<br/><br/>&lt;SCRIPT language=JavaScript src=&quot;admincp(2).files/common.js&quot;&gt;&lt;/SCRIPT&gt;<br/><br/>&lt;SCRIPT language=JavaScript&gt;<br/>function checkalloption(form, value) &#123;<br/>&nbsp;&nbsp;for(var i = 0; i &lt; form.elements.length; i++) &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;var e = form.elements&#91;i&#93;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;if(e.value == value &amp;&amp; e.type == &#039;radio&#039; &amp;&amp; e.disabled != true) &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.checked = true;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&#125;<br/>&#125;<br/><br/>function zoomtextarea(objname, zoom) &#123;<br/>&nbsp;&nbsp;zoomsize = zoom ? 10 : -10;<br/>&nbsp;&nbsp;obj = findobj(objname);<br/>&nbsp;&nbsp;if(obj.rows + zoomsize &gt; 0 &amp;&amp; obj.cols + zoomsize * 3 &gt; 0) &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;obj.rows += zoomsize;<br/>&nbsp;&nbsp;&nbsp;&nbsp;obj.cols += zoomsize * 3;<br/>&nbsp;&nbsp;&#125;<br/>&#125;<br/><br/>function redirect(url) &#123;<br/>&nbsp;&nbsp;window.location.replace(url);<br/>&#125;<br/>&lt;/SCRIPT&gt;<br/> &nbsp; &lt;script language=&quot;JavaScript&quot;&gt;<br/>function CheckAll(form) &#123;<br/>&nbsp;&nbsp;for (var i=0;i&lt;form.elements.length;i++) &#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;var e = form.elements&#91;i&#93;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;if (e.name != &#039;chkall&#039; &amp;&amp; e.type==&#039;checkbox&#039;)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;e.checked = form.chkall.checked;<br/>&nbsp;&nbsp;&#125;<br/>&#125;<br/><br/>function check()&#123;<br/>&nbsp;&nbsp;var bSelected = false ;<br/>&nbsp;&nbsp;for ( i = 0 ; i &lt; document.form1.elements.length ; i ++ )&#123;<br/>&nbsp;&nbsp; if ( document.form1.elements&#91;i&#93;.type == &quot;checkbox&quot;)&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;if ( document.form1.elements&#91;i&#93;.checked )&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;bSelected = true ;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp; &nbsp;&#125;<br/>&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;if ( ! bSelected )&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;alert ( &quot;请选择一个数据表&quot; ) ;<br/>&nbsp;&nbsp;&nbsp;&nbsp;document.form1.chkall.focus();<br/>&nbsp;&nbsp;&nbsp;&nbsp;return false;<br/>&nbsp;&nbsp;&#125;<br/>&#125;<br/>&lt;/script&gt;<br/><br/>&lt;META content=&quot;MSHTML 6.00.2900.3020&quot; name=GENERATOR&gt;&lt;/HEAD&gt;<br/>&lt;BODY text=#000000 topMargin=10 #9EB6D8 background-color:&gt;&lt;BR&gt;<br/>&lt;TABLE class=tableborder cellSpacing=1 cellPadding=4 width=&quot;85%&quot; align=center&gt;<br/> &nbsp;&lt;TBODY&gt;<br/> &nbsp;&lt;TR class=header&gt;<br/> &nbsp; &nbsp;&lt;TD&gt;友情提示&lt;/TD&gt;&lt;/TR&gt;<br/> &nbsp;&lt;TR bgColor=#f8f8f8&gt;<br/> &nbsp; &nbsp;&lt;TD&gt;&lt;BR&gt;<br/> &nbsp; &nbsp; &nbsp;&lt;UL&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp;&lt;LI&gt;&lt;font class=&quot;midwhite&quot;&gt;警告：本系统将对数据表结构和数据记录完全备份,但不对数据库之外的任何文件进行备份,请自行备份文件&lt;/font&gt;。&lt;/LI&gt;&lt;/UL&gt;<br/> &nbsp; &nbsp; &nbsp;&lt;UL&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp;&lt;LI&gt;备份文件自动保存在服务器data目录下，请自行保存在本地电脑上，以防止意外。&lt;/LI&gt;<br/> &nbsp; &nbsp; &nbsp;&lt;/UL&gt;<br/> &nbsp; &nbsp; &nbsp;&lt;UL&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp;&lt;LI&gt;选择“数据结构＋数据记录”，将保存数据库所有内容，选择“数据结构”或者“数据记录”，将只保存选择的部分。&lt;/LI&gt;&lt;/UL&gt;<br/> &nbsp; &nbsp; &nbsp;&lt;UL&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp;&lt;LI&gt;请定期备份！&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR&gt;&lt;BR&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&lt;? if(!isset($need) or $need!=&quot;viewfile&quot; or !isset($dir) or $dir==&quot;&quot;)&#123; ?&gt;<br/>&lt;TABLE class=tableborder cellSpacing=1 cellPadding=4 width=&quot;85%&quot; align=center&gt;<br/>&lt;tr&gt;<br/> &nbsp;&lt;td width=&quot;84%&quot; valign=&quot;top&quot;&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;button&quot; name=&quot;Submit2&quot; value=&quot;选择备份数据库&quot; onClick=&quot;window.location=&#039;sysdata.php&#039;&quot;&gt;&amp;nbsp;&amp;nbsp;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;button&quot; name=&quot;Submit22&quot; value=&quot;查看备份文件&quot; onClick=&quot;window.location=&#039;?need=viewfile&amp;dir=data/&#039;&quot;&gt;<br/> &nbsp;&lt;/td&gt;<br/> &nbsp;&lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;td width=&quot;84%&quot; valign=&quot;top&quot;&gt;&lt;form name=&quot;form1&quot; method=&quot;post&quot; action=&quot;&quot; onsubmit=&quot;return check()&quot;&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;table width=&quot;100%&quot; border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;4&quot;&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td &nbsp;align=&quot;right&quot; class=header&gt; 全选<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input type=&quot;checkbox&quot; name=&quot;chkall&quot; value=&quot;on&quot; onclick=&quot;CheckAll(this.form)&quot; title=&quot;点击可全选本页的所有选项&quot;&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td class=header&gt;数据库名&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td class=header&gt;数据库用途&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td width=&quot;18%&quot; bgcolor=&quot;#FFFFFF&quot; align=&quot;right&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch0&quot; value=&quot;shm_advertisement&quot;&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td width=&quot;36%&quot; bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot;&gt;shm_advertisement&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td width=&quot;46%&quot; bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot;&gt;存放客户广告&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; &nbsp;align=&quot;right&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch1&quot; value=&quot;shm_advice&quot;&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot; &gt;shm_advice&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot; &gt;存放客户意见&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; &nbsp; align=&quot;right&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch2&quot; value=&quot;shm_bulletin&quot;&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot; &gt;shm_bulletin&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot; &gt;存放网站公告&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; &nbsp;align=&quot;right&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch3&quot; value=&quot;shm_certify&quot;&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot; &gt;shm_certify&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot; &gt;会员认证&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td height=&quot;27&quot; &nbsp;bgcolor=&quot;#FFFFFF&quot; align=&quot;right&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch4&quot; value=&quot;forum_message&quot;&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td &nbsp;bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot;&gt;forum_message&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td &nbsp;bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot;&gt;文章评论&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; &nbsp;align=&quot;right&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch5&quot; value=&quot;shm_friendship&quot;&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot; &gt;shm_friendship&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot; &gt;会员间关系如商友&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; &nbsp;align=&quot;right&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch6&quot; value=&quot;shm_message&quot;&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot; &gt;shm_message&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot; &gt;会员留言&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; &nbsp;align=&quot;right&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch7&quot; value=&quot;shm_productlist&quot;&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot; &gt;shm_productlist&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot; &gt;供求信息&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; &nbsp; align=&quot;right&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch8&quot; value=&quot;shm_siteadmin&quot;&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot; &gt;shm_siteadmin&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot; &gt;网站管理员&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; &nbsp;align=&quot;right&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch9&quot; value=&quot;txt_bizinfo&quot;&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot; &gt;txt_bizinfo&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot; &gt;行业资讯，商务指南&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; align=&quot;right&quot; &gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch10&quot; value=&quot;shm_userlist&quot;&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot; &gt;shm_userlist&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot; &gt;会员列表&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; align=&quot;right&quot; &gt;&lt;input type=&quot;checkbox&quot; name=&quot;ch11&quot; value=&quot;shm_vacation&quot;&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;midback&quot; &gt;shm_vacation&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td bgcolor=&quot;#FFFFFF&quot; class=&quot;smallback&quot; &gt;行业名称&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td &nbsp;bgcolor=&quot;#FFFFFF&quot; class=midback align=right&gt;选择备份内容&lt;/td&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&lt;td colspan=&quot;2&quot; bgcolor=&quot;#FFFFFF&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;select name=&quot;bukcon&quot; style=&quot;background-color: #FF0000;border: #3366CC;color: #ffffff;font-weight: bold;&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&lt;option selected value=&quot;all&quot;&gt;数据库结构+数据库记录&lt;/option&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;option value=&quot;record&quot;&gt;数据库记录&lt;/option&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;struct&quot;&gt;数据库结构&lt;/option&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/select&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/td&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td colspan=&quot;3&quot; bgcolor=&quot;#FFFFFF&quot;&gt;&lt;input type=&quot;hidden&quot; name=&quot;act&quot; value=&quot;bakup&quot;&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;input name=&quot;Submit&quot; type=&quot;submit&quot; class=&quot;deletebutton&quot; value=&quot;立即对选定数据表进行备份&quot;&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&lt;/table&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &lt;/form&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/>&lt;/table&gt;&lt;BR&gt;&lt;BR&gt;<br/>&nbsp;&nbsp; &lt;? &#125;else&#123; ?&gt;<br/>&lt;TABLE class=tableborder cellSpacing=1 cellPadding=4 width=&quot;85%&quot; align=center&gt;<br/> &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &lt;td height=&quot;26&quot; valign=&quot;top&quot;&gt;&lt;input type=&quot;button&quot; name=&quot;Submit23&quot; value=&quot;选择备份数据库&quot; onClick=&quot;window.location=&#039;sysdata.php&#039;&quot;&gt;&amp;nbsp;&amp;nbsp;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&quot;button&quot; name=&quot;Submit222&quot; value=&quot;查看备份文件&quot; onClick=&quot;window.location=&#039;?need=viewfile&amp;dir=data/&#039;&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &lt;td height=&quot;26&quot; class=header&gt;当前目录：&lt;? echo $dir ?&gt;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &lt;td valign=&quot;top&quot;&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;form name=&quot;form2&quot; method=&quot;post&quot; action=&quot;&quot;&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;table width=&quot;100%&quot; border=&quot;1&quot; cellspacing=&quot;0&quot; cellpadding=&quot;2&quot;&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td width=&quot;8%&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;chkall&quot; value=&quot;on&quot; onclick=&quot;CheckAll(this.form)&quot; &gt;全选<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td width=&quot;92%&quot; class=midback&gt;文件或文件夹名&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;?<br/>&nbsp;&nbsp;&nbsp;&nbsp; $opendir=opendir($dir);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$num=0;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;while($file_name=readdir($opendir))&#123;<br/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(($file_name!=&quot;.&quot;) and ($file_name!=&quot;..&quot;))&#123;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; $temp= &quot;&lt;tr&gt;&lt;td &gt;&lt;input type=checkbox name=f$num value=$file_name&gt;&lt;/td&gt;&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; if(!is_dir($dir.$file_name)) &nbsp;$temp=$temp.&quot;&lt;td&gt; &lt;a href=opentxt.php?fid=$dir$file_name target=blank&gt;&lt;img src=images/listfile.gif border=0&gt;$file_name&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; else $temp=$temp.&quot;&lt;td&gt; &lt;a href=?need=viewfile&amp;dir=$dir$file_name/&gt;&lt;img src=images/fold.gif border=0&gt;$file_name&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; $num=$num+1;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;echo $temp;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br/>&nbsp;&nbsp;&nbsp;&nbsp;closedir($opendir);<br/>&nbsp;&nbsp;&nbsp;&nbsp;clearstatcache();<br/>&nbsp;&nbsp;&nbsp;&nbsp;if($num==0) echo &quot;&lt;tr&gt; &lt;td colspan=2 class=smallred&gt;此目录是空的，没有文件&lt;/td&gt;&lt;/tr&gt;&quot;;<br/>&nbsp;&nbsp;&nbsp;&nbsp; ?&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;td colspan=&quot;2&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &lt;? &nbsp;if($PWARRAY&#91;adright&#93;==1)&#123; ?&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=hidden name=filelength value=&lt;? echo $num ?&gt;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input name=&quot;button&quot; type=&quot;submit&quot; class=&quot;deletebutton&quot; value=&quot;删除&quot; onclick=&quot;return confirm(&#039;确定删除此操作？&#039;);&quot;&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;? &#125;else&#123; ?&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input name=&quot;button&quot; type=&quot;submit&quot; disabled class=&quot;deletebutton&quot; value=&quot;删除&quot; onclick=&quot;return confirm(&#039;确定删除此记录？&#039;);&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;? &#125; ?&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;? if($dir==&quot;data/&quot;)&#123; ?&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&quot;submit&quot; name=&quot;button&quot; value=&quot;返回&quot; disabled&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;? &#125;else&#123; ?&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&quot;button&quot; name=&quot;button&quot; value=&quot;返回&quot; onclick=&quot;window.location=&#039;?need=viewfile&amp;dir=data/&#039;&quot;&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;? &#125; ?&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/table&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&lt;/form&gt;<br/> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/td&gt;<br/> &nbsp; &nbsp; &nbsp; &lt;/tr&gt;<br/> &nbsp; &nbsp; &lt;/table&gt;<br/>&nbsp;&nbsp; &lt;? &#125; ?&gt;<br/>&nbsp;&nbsp; &lt;BR&gt;&lt;BR&gt;<br/>&lt;HR width=&quot;80%&quot; color=#698cc3 noShade SIZE=0&gt;<br/><br/>&lt;CENTER&gt;&lt;FONT <br/>style=&quot;FONT-SIZE: 11px; FONT-FAMILY: Tahoma, Verdana, Arial&quot;&gt;Powered by &lt;A <br/>style=&quot;COLOR: #000000&quot; href=&quot;http://www.foodmate.com/&quot; <br/>target=_blank&gt;&lt;B&gt;foodmate.com&lt;/B&gt;&lt;/A&gt; &amp;nbsp;&amp;copy; 2001-2008, &lt;B&gt;foodmate.com <br/>Inc.&lt;/B&gt;&lt;/FONT&gt; &lt;/CENTER&gt;&lt;/BODY&gt;&lt;/HTML&gt;<br/><br/></div>
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post/340/#blogcomment3007</link>
<title><![CDATA[[评论] 一个比较好用的php备份mysql数据库]]></title> 
<author>的 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Tue, 22 Apr 2008 04:38:34 +0000</pubDate> 
<guid>http://www.dzhope.com/post/340/#blogcomment3007</guid> 
<description>
<![CDATA[ 
	靠&nbsp;&nbsp; 代码不全的都发
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post/340/#blogcomment9154</link>
<title><![CDATA[[评论] 一个比较好用的php备份mysql数据库]]></title> 
<author>操 &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Mon, 01 Dec 2008 07:37:33 +0000</pubDate> 
<guid>http://www.dzhope.com/post/340/#blogcomment9154</guid> 
<description>
<![CDATA[ 
	我日，整理好了再发不行啊
]]>
</description>
</item>
</channel>
</rss>