<?
$dbh = pg_pconnect ("<dbconnstring>")
or die("Unable to connect to SQL server");
- pg_exec($dbh, "SET DateStyle='ISO'") or die ("Cannot set datestyle");
pg_exec ($dbh, "SET DateStyle = 'ISO'") or die("Datenbank-Abfrage!");
'oid' => $row['oid'],
'peroid' => $row['peroid']);
}
+
+ $columns = '';
+ $empty = true;
+ reset ($ltdays);
+ while (list($date,$day) = each ($ltdays)) {
+ if (strlen ($frag[$date]) > 0) {
+ $columns .= sprintf ($f_row_day, $frag[$date]);
+ $empty = false;
+ } else {
+ $columns .= sprintf ($f_row_day, " ");
+ }
+ }
+
+ if (!$empty) {
?>
# Basically, this table is a copy of a single line from jobs
printf ($f_row_head, "<cold>", "edit_job", $id, $title);
- reset ($ltdays);
- while (list($date,$day) = each ($ltdays)) {
- if (strlen ($frag[$date]) > 0) {
- printf ($f_row_day, $frag[$date]);
- } else {
- printf ($f_row_day, " ");
- }
- }
+ echo $columns;
+
echo ($f_row_tail);
?>
</table>
<hr>
<?
+ } else {
+ printf ("<br><a href=\"edit_job.php3?id=%d\">Edit</a>", $id);
+ }
function display_supporters ($dbh, $date, $start, $end, $fragment)
{