9404803 发表于 2017-3-26 09:39:32

应用php查询subversion状态

<?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;?></div>

</td>

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

</div></td>

<td><divalign="center"><?php$submit_date=explode('',$info);if($info)echo$submit_date."&nbsp;".$submit_date;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);

?>



  执行结果如下
页: [1]
查看完整版本: 应用php查询subversion状态