| Line 1... |
Line 1... |
| 1 |
<?php |
1 |
<?php |
| 2 |
if (isset($last)) unset ($last); |
2 |
if (isset($last)) unset ($last); |
| 3 |
Exec("svnlook youngest /home/MLAB", $last); |
3 |
Exec("svnlook youngest /home/MLAB", $last); |
| 4 |
$last=$last[0]; // Poslední revize |
4 |
$last=$last[0]; // Poslední revize |
| 5 |
?> |
5 |
?> |
| 6 |
<h1> Commit Log </h1> |
6 |
<h1> Commit Log </h1> |
| 7 |
<?php |
7 |
<?php |
| 8 |
if (isset($x)) unset ($x); |
8 |
if (isset($x)) unset ($x); |
| 9 |
$x=@file("DynData/svn.err"); // Chybový soubor |
9 |
$x=@file("DynData/svn.err"); // Chybový soubor |
| 10 |
if ($x!="") |
10 |
if ($x!="") |
| 11 |
{ |
11 |
{ |
| 12 |
$x=preg_replace("/\n/","",$x); // Ukousni konce řádek |
12 |
$x=preg_replace("/\n/","",$x); // Ukousni konce řádek |
| 13 |
$x=implode("\n",$x); // Slož řádky |
13 |
$x=implode("\n",$x); // Slož řádky |
| 14 |
if ($x=="") |
14 |
if ($x=="") |
| 15 |
{ |
15 |
{ |
| 16 |
$x="O.K."; // Soubor existuje a je prázdný |
16 |
$x="O.K."; // Soubor existuje a je prázdný |
| 17 |
} |
17 |
} |
| 18 |
} |
18 |
} |
| 19 |
else |
19 |
else |
| 20 |
{ |
20 |
{ |
| 21 |
$x="Missing Error File"; // Pokud není chybový soubor |
21 |
$x="Missing Error File"; // Pokud není chybový soubor |
| 22 |
} |
22 |
} |
| 23 |
?> |
23 |
?> |
| 24 |
<table> |
24 |
<table> |
| 25 |
<tr> |
25 |
<tr> |
| 26 |
<th> Last Error </th> |
26 |
<th> Last Error </th> |
| 27 |
<td> <code><?php echo $x; ?> </code></td> |
27 |
<td> <code><?php echo $x; ?> </code></td> |
| 28 |
</tr> |
28 |
</tr> |
| 29 |
</table> |
29 |
</table> |
| 30 |
|
30 |
|
| 31 |
<?php |
31 |
<?php |
| 32 |
// Cyklus přes posledních několik commitů |
32 |
// Cyklus přes posledních několik commitů |
| 33 |
for($i=1; $i<=5; $i++, $last--) { |
33 |
for($i=1; $i<=5; $i++, $last--) { |
| 34 |
?> |
34 |
?> |
| 35 |
|
35 |
|
| 36 |
<h2> Revision <?php echo $last; ?> </h2> |
36 |
<h2> Revision <?php echo $last; ?> </h2> |
| 37 |
<?php |
37 |
<?php |
| 38 |
if (isset($x)) unset ($x); |
38 |
if (isset($x)) unset ($x); |
| 39 |
Exec("svnlook info /home/MLAB -r $last", $x); |
39 |
Exec("svnlook info /home/MLAB -r $last", $x); |
| 40 |
?> |
40 |
?> |
| 41 |
<table> |
41 |
<table> |
| 42 |
<tr> |
42 |
<tr> |
| 43 |
<th> Author </th> |
43 |
<th> Author </th> |
| 44 |
<td> <?php echo $x[0]; ?> </td> |
44 |
<td> <?php echo $x[0]; ?> </td> |
| 45 |
</tr> |
45 |
</tr> |
| 46 |
<tr> |
46 |
<tr> |
| 47 |
<th> Date </th> |
47 |
<th> Date </th> |
| 48 |
<td> <?php echo $x[1]; ?> </td> |
48 |
<td> <?php echo $x[1]; ?> </td> |
| 49 |
</tr> |
49 |
</tr> |
| 50 |
<tr> |
50 |
<tr> |
| 51 |
<th> Comment </th> |
51 |
<th> Comment </th> |
| 52 |
<td> <?php echo $x[3]; ?> </td> |
52 |
<td> <?php echo $x[3]; ?> </td> |
| 53 |
</tr> |
53 |
</tr> |
| 54 |
<tr> |
54 |
<tr> |
| 55 |
<td colspan=2> |
55 |
<td colspan=2> |
| 56 |
<code><?php |
56 |
<code><?php |
| 57 |
if (isset($x)) unset($x); |
57 |
if (isset($x)) unset($x); |
| 58 |
Exec("svnlook changed /home/MLAB -r $last", $x); |
58 |
Exec("svnlook changed /home/MLAB -r $last", $x); |
| 59 |
echo implode("\n", $x); ?></code> </td> |
59 |
echo implode("\n", $x); ?></code> </td> |
| 60 |
</table> |
60 |
</table> |
| 61 |
|
61 |
|
| 62 |
<?php |
62 |
<?php |
| 63 |
// Konec cyklu |
63 |
// Konec cyklu |
| 64 |
} |
64 |
} |
| 65 |
?> |
65 |
?> |