应用php查询subversion状态

本文介绍了一个使用PHP编写的文档备份系统,该系统从数据库中获取部门信息,并展示每个部门的文档备份详情,包括目录位置、最新版本号、最后提交人及时间等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

<?phprequire_once('Connections/files.php');?>

<?php

mysql_select_db($database_files,$files);

$query_Recordset1="SELECT*FROMdepartmentORDERBYdepart_idASC";

$Recordset1=mysql_query($query_Recordset1,$files)ordie(mysql_error());

$row_Recordset1=mysql_fetch_assoc($Recordset1);

$totalRows_Recordset1=mysql_num_rows($Recordset1);

?>

<!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd"
>

<html>

<head>

<metahttp-equiv="Content-Type"content="text/html;charset=utf-8">

<title></title>

<styletype="text/css">...

<!--

body
{...}{

margin-left
:0px;

margin-top
:0px;

margin-right
:0px;

margin-bottom
:0px;

background-color
:#2163AB;

}


.style2
{...}{font-size:12px}

.style7
{...}{color:#999999}

-->

</style>

</head>



<body>

<tablewidth="100%"height="100%"border="0"align="center"valign="bottom"cellpadding="0"cellspacing="0">

<tr>

<tdheight="360"valign="bottom"bgcolor="#FFFFFF"><p>&nbsp;</p>

<tablewidth="460"border="0"align="center">

<tr>

<tdwidth="100"height="226"><divalign="center">

<palign="center"><imgsrc="image/doc.png"width="87"height="100"align="middle"><br>

</p>

<p><spanclass="style2">文档备份</span><br>

</p>

</div></td>

<td><?phpif($totalRows_Recordset1>0){//Showifrecordsetnotempty?>

<tablewidth="360"border="0">

<trclass="style2">

<td><divalign="center"><strong>部门</strong></div></td>

<td><divalign="center"><strong>目录</strong></div></td>

<td><divalign="center"><strong>最新版本</strong></div></td>

<td><divalign="center"><strong>最后提交人</strong></div></td>

<td><divalign="center"><strong>最后提交时间</strong></div></td>

</tr>

<trclass="min1"background="image/line.gif">

<tdheight="3"colspan="5"><divalign="center"><imgsrc="image/line1.gif"width="98%"height="1"></div></td>

</tr>

<?phpdo{?>



<trclass="style2">

<td><divalign="center"><?phpecho$row_Recordset1['depart_name'];?></div></td>

<td><divalign="center"><?phpecho$row_Recordset1['depart_dir'];?></div></td><?php$cmd="/usr/local/bin/svnlookinfo".$row_Recordset1['depart_locate']."/".$row_Recordset1['depart_dir'];exec($cmd,$info);?>

<td><divalign="center"><?php$cmd="/usr/local/bin/svnlookyoungest".$row_Recordset1['depart_locate']."/".$row_Recordset1['depart_dir'];exec($cmd,$ver);echo$ver[0];?></div>

</td>

<td><divalign="center"><?phpecho$info[0];?>

</div></td>

<td><divalign="center"><?php$submit_date=explode('',$info[1]);if($info[0])echo$submit_date[0]."&nbsp;".$submit_date[1];unset($info);unset($ver);unset($submit_date)?>

</div></td>

</tr>

<trclass="min1"background="image/line.gif">

<tdheight="3"colspan="5"><divalign="center"><imgsrc="image/line1.gif"width="98%"height="1"></div></td>

</tr>

<?php}while($row_Recordset1=mysql_fetch_assoc($Recordset1));?>

</table>

<?php}//Showifrecordsetnotempty?></td>

</tr>

<tr>

<tdcolspan="2"><divalign="center">

<pclass="style7"><br>

<spanclass="style2"><br>

</span></p>

</div></td>

</tr>

</table></td>

</tr>

<tr>

<tdvalign="top"><tablewidth="400"border="0"align="center"cellpadding="0"cellspacing="0">

<tr>

<tdheight="80"valign="bottom"><divalign="center"><imgsrc="image/TITLE.gif"width="271"height="61"></div></td>

</tr>

</table></td>

</tr>

</table>

</body>

</html>

<?php

mysql_free_result($Recordset1);

?>

执行结果如下

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值