3 function min2hour($minutes)
5 return sprintf('%02d:%02d', $minutes/60, $minutes%60);
13 $query = "SELECT id,name FROM stempel_status ORDER BY id";
14 $sth = pg_exec ($dbh, $query);
16 while ($row = pg_fetch_array ($sth)) {
17 $a[$row['id']] = $row['name'];
22 function find_months()
27 $query = "SELECT DISTINCT substr(cast(start AS TEXT),0,8) FROM stempel ORDER BY substr(cast(start AS TEXT),0,8) DESC";
28 $sth = pg_exec ($dbh, $query);
30 while ($row = pg_fetch_array ($sth)) {
36 function load_customers()
41 $sth = pg_exec ($dbh, 'SELECT short,name FROM stempel_customer');
42 while ($row = pg_fetch_array ($sth))
43 $info[$row['short']] = $row['name'];