Improve edit title
[infodrom.org/service.infodrom.org] / src / InfoCon / stempel / edit.wml
index f0d45ee..894544f 100644 (file)
@@ -5,15 +5,11 @@
   }
 ?>
 #include <infocon.style>
+#include "common.inc"
 
 <page func=InfoCon title="Stempeluhr">
 
 <?
-  function min2hour($minutes)
-  {
-      return sprintf('%02d:%02d', $minutes/60, $minutes%60);
-  }
-
   $dbh = pg_pconnect ("<dbhost>", "<dbport>", "<dbname>")
         or die("Unable to connect to SQL server");
 
@@ -62,7 +58,11 @@ div.radio input.radio {
 </style>
 
 <?
-printf('<h3 class="bar" align="center">- %s: %s</h3>', $row['customer'], $row['task']);
+$name = load_customers();
+$cname = $name[$row['customer']];
+if (!strlen($cname)) $cname = ucfirst($row['customer']);
+
+printf('<h3 class="bar" align="center">%s: %s</h3>', $cname, substring($row['task'],0,80-strlen($cname)));
 ?>
 
 <form method=post action="update.php">