Display expanded customer name
[infodrom.org/service.infodrom.org] / src / InfoCon / stempel / index.wml
index 5006347..0ab3996 100644 (file)
@@ -27,6 +27,8 @@
 <page func=InfoCon title="Stempeluhr">
 
 <?
+  $name = load_customers();
+
   $table_head = '<h3 class="bar">Kunde: %s</h3>
 <table class="smallfont border" width="100%%" cellpadding=0 cellspacing=1>
 <tr class="head">
@@ -54,7 +56,9 @@
        printf($table_sum, $color, min2hour($sum));
         echo($table_foot);
       }
-      printf($table_head, $row['customer']);
+      $cname = $name[$row['customer']];
+      if (!strlen($cname)) $cname = ucfirst($row['customer']);
+      printf($table_head, $cname);
       $customer = $row['customer'];
       $sum = 0;
       $color = 0;