应用php查询subversion状态

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

<? php 

mysql_select_db($database_files, $files);

$query_Recordset1 = "SELECT * FROM department ORDER BY depart_id ASC";

$Recordset1 = mysql_query($query_Recordset1, $files) or die(mysql_error());

$row_Recordset1 = mysql_fetch_assoc($Recordset1);

$totalRows_Recordset1 = mysql_num_rows($Recordset1);

?>

<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

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

< html >

< head >

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

< title ></ title >

< style  type ="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 >

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

  
< tr >

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

    
< table  width ="460"  border ="0"  align ="center" >

      
< tr >

        
< td  width ="100"  height ="226" >              < div  align ="center" >

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

              
</ p >

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

          
</ p >

        
</ div ></ td >

        
< td > <? php if ($totalRows_Recordset1 > 0) { // Show if recordset not empty  ?>

          
< table  width ="360"   border ="0" >

            
< tr  class ="style2" >

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

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

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

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

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

            
</ tr >

             
< tr  class ="min1"  background ="image/line.gif" >

                
< td  height ="3"  colspan ="5" >< div  align ="center" >< img  src ="image/line1.gif"  width ="98%"  height ="1" ></ div ></ td >

             
</ tr >

            
<? php do {  ?>

             

            
< tr  class ="style2" >

                
< td >< div  align ="center" > <? php echo $row_Recordset1['depart_name'];  ?> </ div ></ td >

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

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

                
</ td >

                
< td >< div  align ="center" > <? php echo $info[0];  ?>

                  
</ div ></ td >

                
< td >< div  align ="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 >

< tr  class ="min1"  background ="image/line.gif" >

                
< td  height ="3"  colspan ="5" >< div  align ="center" >< img  src ="image/line1.gif"  width ="98%"  height ="1" ></ div ></ td >

             
</ tr >

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

            
</ table >

          
<? php } // Show if recordset not empty  ?> </ td >

      
</ tr >

      
< tr >

        
< td  colspan ="2" >< div  align ="center" >

            
< class ="style7" >< br >

                
< span  class ="style2" >< br >

                
</ span ></ p >

            
</ div ></ td >

      
</ tr >

    
</ table ></ td >

  
</ tr >

  
< tr >

    
< td  valign ="top" >< table  width ="400"  border ="0"  align ="center"  cellpadding ="0"  cellspacing ="0" >

      
< tr >

        
< td  height ="80"  valign ="bottom" >< div  align ="center" >< img  src ="image/TITLE.gif"  width ="271"  height ="61" ></ div ></ td >

        
</ tr >

    
</ table ></ td >

  
</ tr >

</ table >

</ body >

</ html >

<? php

mysql_free_result($Recordset1);

?>

 执行结果如下

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值