Display expanded customer name
[infodrom.org/service.infodrom.org] / src / InfoCon / stempel / common.inc
index 9d10db0..bcfa427 100644 (file)
@@ -1,4 +1,4 @@
-<?
+<?php
 
   function min2hour($minutes)
   {
     return $a;
   }
 
+  function load_customers()
+  {
+    global $dbh;
+    $info = array();
+
+    $sth = pg_exec ($dbh, 'SELECT short,name FROM stempel_customer');
+    while ($row = pg_fetch_array ($sth))
+      $info[$row['short']] = $row['name'];
+
+    return $info;
+  }
+
 ?>