source: CMT/v1r14p20031120/mgr/ChangeLog.php @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

File size: 6.1 KB
Line 
1<?php
2
3$with_tables = TRUE;
4//$with_tables = FALSE;
5
6echo "
7<html>
8<body bgcolor='white'>";
9
10echo "
11<STYLE TYPE='text/css'>
12BODY
13{scrollbar-face-color: #0069B3;
14 scrollbar-shadow-color: #000000;
15 scrollbar-highlight-color: #FFFFFF;
16 scrollbar-3dlight-color: #000000;
17 scrollbar-darkshadow-color: #000000;
18 scrollbar-track-color: #0069B3;
19 scrollbar-arrow-color: #FFCC00;}
20TD.a {color:blue;
21       background-color:#FFFFFF;
22       font-color:blue;
23       font-size:11px;
24       font-family:verdana;}
25A.a {color:#FFCC00;
26       background-color:#000000;
27       foreground-color:#ffcc00;
28       font-color:#FFCC00;
29       font-size:11px;
30       font-family:verdana;}
31A.b {color:#FFCC00;
32       background-color:#0069b3;
33       foreground-color:#ffcc00;
34       text-decoration:none;
35       font-color:#FFCC00;
36       font-size:11px;
37       font-family:verdana;}
38A {
39color:#FFFFFF;
40text-decoration:none;
41}
42A:hover {
43color:#FFCC00;
44text-decoration:underline;
45}
46A.menu {
47color:#000000;
48text-decoration:underline;
49}
50A:hover.menu {
51color:#FFFF00;
52text-decoration:underline;
53}
54A.esp {
55color:#FF3333;
56text-decoration:underline;
57}
58A:hover.esp {
59color:#33FFFF;
60text-decoration:none;
61}
62
63A.div {
64color:#FFCC00;
65text-decoration:none;
66}
67A:hover.div {
68color:#FF3333;
69text-decoration:none;
70}
71TD.b {color:black;
72       background-color:white;
73       font-size:11px;
74       font-family:verdana;}
75TD.c {color:red;
76       background-color:white;
77       font-size:11px;
78       font-family:verdana;}
79P.a {
80       background-color:$res_couleur_fond_entête;
81       color:$res_couleur_texte_entête;}
82P.c {color:#FFCC00;
83       background-color:#000000;
84       font-size:11px;
85       font-family:verdana;
86}
87INPUT {color:#FFCC00;
88       background-color:#0069B3;
89       font-size:11px;
90       font-family:verdana;}
91SELECT {color:#FFCC00;background-color:#0069D2;font-size:12px;font-family:verdana;}
92TEXTAREA {color:#FFCC00;background-color:#0069B3;font-size:11px;font-family:verdana;}
93</STYLE>";
94
95if (with_tables)
96{
97  echo "
98<table border width=100%>
99  <tr>
100    <td width=70 nowrap class='a'><i><center>date</center></i></td>
101    <td width=50% class='b'><i><center>file</center></i></td>
102    <td class='c'><i><center>comment</center></i></td>
103  </tr>";
104}
105
106$started = FALSE;
107
108$fcontents = file ('ChangeLog');
109
110$date = "";
111
112while (list ($n, $line) = each ($fcontents))
113{
114  $line = str_replace ("\t", " ", $line);
115  $c = substr ($line, 0, 1);
116
117  $line = trim ($line);
118  if ($line == "") continue;
119 
120  $words = explode (" ", $line);
121  $NF = count ($words) - 1;
122
123  //echo "|<font color=red>$line</font>|". $words[0] . "|". $words[1] . "|". $words[2] . "|<br>";
124
125  $marker = strpos ("." . $line, "):");
126  if ($marker >= 1)
127    {
128    }
129  else
130    {
131      $marker = 0;
132    }
133
134  //echo "<br>date: $date<br> ladate: $ladate<br>";
135
136  if ($c != " ")
137    {
138      // <date> <who> <number>
139
140      $has_number = (strcspn ($words[$NF], "0123456789") == 0);
141
142      if ($has_number)
143        {
144          $last = $NF - 1;
145          $number = $words[$NF];
146        }
147      else
148        {
149          $last = $NF;
150          $number = "";
151        }
152
153      $who = "";
154
155      for ($i = 1; $i <= $last; $i++)
156        {
157          $who .= " ";
158          $who .= $words[$i];
159        }
160
161
162      $date = $words[0];
163      if ($date != $ladate)
164        {
165          $ladate = $date;
166        }
167      else
168        {
169          $date = "&nbsp;";
170        }
171
172      //echo "date:[" . $date . "] ladate:[" . $ladate . "] who:" . $who . " #:" . $number . " [$line]<br>" ;
173
174    }
175  else if (($words[0] == "*") || ($marker >= 1))
176    {
177      if ($started)
178        {
179          if ($with_tables) echo "</td></tr>";
180
181          $started = FALSE;
182        }
183
184      if ($marker == 0)
185        {
186          $marker = strpos ("." . $line, ":");
187        }
188      else
189        {
190          $marker++;
191        }
192
193      //echo "  ...Starting an entry... marker=$marker date=$date<br>";
194
195      if ($marker > 0)
196        {
197          $head = substr ($line, 0, $marker);
198          $line = substr ($line, $marker);
199        }
200      else
201        {
202          $head = $line;
203          $line = "";
204        }
205
206      $head = trim ($head);
207      $line = trim ($line);
208
209      //echo "[$head] [$line]<br>";
210
211      $par = strpos ("." . $head, "(");
212      if ($par > 0)
213        {
214          if ($par > 1) $file = substr ($head, 0, $par-1);
215          $info = substr ($head, $par);
216          $info = str_replace ("(", "", $info);
217          $info = str_replace (")", "", $info);
218          $info = str_replace (":", "", $info);
219        }
220      else
221        {
222          $file = $head;
223          $info = "";
224        }
225
226      $file = str_replace ("*", "", $file);
227      $file = str_replace ("(", "", $file);
228      $file = str_replace (")", "", $file);
229      $file = str_replace (":", "", $file);
230      $file = str_replace ("\\", "/", $file);
231
232      if ($with_tables) echo "<tr><td class='a' valign='top'> ";
233
234      echo "$date";
235
236      if ($with_tables) echo "</td><td class='b' valign='top'>";
237
238      echo "$file";
239
240      if (!empty ($info)) echo " (<font color='green'>$info</font>)";
241
242      //echo "</tt>";
243
244      if ($with_tables) echo "</td><td class='c' valign='top'>";
245
246      $date = "&nbsp;";
247
248      $line = trim ($line);
249
250      if (empty ($line)) $line="&nbsp;";
251
252      echo "$line";
253      if (!$with_tables) echo "<br>";
254
255      $started = TRUE;
256      $was_empty = FALSE;
257      $was_not_empty = FALSE;
258
259    }
260  else if ($started)
261    {
262      $line = trim ($line);
263      if (empty ($line))
264        {
265          if ($was_not_empty) 
266            {
267              $was_not_empty = FALSE;
268              $was_empty = TRUE;
269            }
270          $line = "&nbsp;";
271        }
272      else
273        {
274          if ($was_empty)
275            {
276              $was_empty = TRUE;
277              echo "<br>";
278            }
279          $was_not_empty = TRUE;
280        }
281      echo "$line";
282      if (!$with_tables) echo "<br>";
283    }
284}
285
286if ($with_tables) echo "</table>";
287
288echo "
289</body>
290</html>";
291
292
293?>
294
Note: See TracBrowser for help on using the repository browser.