Logfile-Status in der vhost-liste anzeigen
bernd

bernd commited on 2007-12-01 16:02:15
Zeige 2 geänderte Dateien mit 21 Einfügungen und 8 Löschungen.


git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@827 87cf0b9e-d624-0410-a070-f6ee81989793
... ...
@@ -10,7 +10,7 @@ require_once('class/domain.php');
10 10
 function list_vhosts()
11 11
 {
12 12
   $uid = (int) $_SESSION['userinfo']['uid'];
13
-  $result = db_query("SELECT id,fqdn,docroot,docroot_is_default,php,options FROM vhosts.v_vhost WHERE uid={$uid} ORDER BY domain,hostname");
13
+  $result = db_query("SELECT id,fqdn,docroot,docroot_is_default,php,options,logtype,errorlog FROM vhosts.v_vhost WHERE uid={$uid} ORDER BY domain,hostname");
14 14
   $ret = array();
15 15
   while ($item = mysql_fetch_assoc($result))
16 16
     array_push($ret, $item);
... ...
@@ -21,7 +21,7 @@ $vhosts = list_vhosts();
21 21
 
22 22
 if (count($vhosts) > 0)
23 23
 {
24
-  output("<table><tr><th>(Sub-)Domain</th><th></th><th>Zusätzliche Alias-Namen</th><th>Lokaler Pfad<sup>*</sup></th><th>PHP</th></tr>");
24
+  output("<table><tr><th>(Sub-)Domain</th><th></th><th>Zusätzliche Alias-Namen</th><th>PHP</th><th>Logfiles</th><th>Lokaler Pfad<sup>*</sup></th></tr>");
25 25
 
26 26
   foreach ($vhosts as $vhost)
27 27
   {
... ...
@@ -34,10 +34,6 @@ if (count($vhosts) > 0)
34 34
     }
35 35
     output(internal_link('aliases.php', 'Aliase verwalten', 'vhost='.$vhost['id']));
36 36
     output('</td>');
37
-    if ($vhost['docroot_is_default'] == 1)
38
-      output("<td><span style=\"color:#777;\">{$vhost['docroot']}</span></td>");
39
-    else
40
-      output("<td><strong>{$vhost['docroot']}</strong></td>");
41 37
     $php = $vhost['php'];
42 38
     switch ($php)
43 39
     {
... ...
@@ -51,8 +47,25 @@ if (count($vhosts) > 0)
51 47
         $php = 'FastCGI';
52 48
         break;
53 49
     }
54
-    output("<td>{$php}</td>
55
-    </tr>");
50
+    output("<td>{$php}</td>");
51
+    $logfiles = 'keine';
52
+    if ($vhost['logtype'] == 'default')
53
+      $logfiles = 'normal';
54
+    elseif ($vhost['logtype'] == 'anonymous')
55
+      $logfiles = 'anonym';
56
+    if ($vhost['errorlog'] == 1)
57
+    {
58
+      if ($logfiles == 'keine')
59
+        $logfiles = 'nur Fehler';
60
+      else
61
+        $logfiles .= ', Fehler';
62
+    }
63
+    output("<td>{$logfiles}</td>");
64
+    if ($vhost['docroot_is_default'] == 1)
65
+      output("<td><span style=\"color:#777;\">{$vhost['docroot']}</span></td>");
66
+    else
67
+      output("<td><strong>{$vhost['docroot']}</strong></td>");
68
+    output("</tr>");
56 69
   }
57 70
   output('</table>');
58 71
   output('<p><sup>*</sup>)&#160;schwach geschriebene Pfadangaben bezeichnen die Standardeinstellung. Ist ein Pfad fett dargestellt, so haben Sie einen davon abweichenden Wert eingegeben.</p>');
59 72