/[debian]/quickappoint/trunk/overview.php
ViewVC logotype

Contents of /quickappoint/trunk/overview.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 142 - (show annotations)
Sat Feb 25 17:48:35 2006 UTC (15 years, 5 months ago) by gregoa
File size: 2684 byte(s)
[svn-inject] Forking quickappoint source to Trunk
1 <?php
2 require_once(dirname(__FILE__) . '/lib/prepend.php');
3 require_once(dirname(__FILE__) . '/lib/dblogic.php');
4 require_once(dirname(__FILE__) . '/lib/html.php');
5
6 $personid = $_SESSION['person']['id'];
7
8 $personright = getPersonRights($personid);
9
10 ?>
11 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
12
13 <html>
14 <head>
15 <title>QuickAppoint</title>
16 <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
17 <meta name="Author" content="Toastfreeware">
18 <link rel="stylesheet" type="text/css" href="css/default.css">
19 <!-- <link rel="icon" href="icons/icon.png" type="image/png"> -->
20 </head>
21 <body>
22
23 <?php
24 if (isset($_SESSION['editdbmsg'])) echo html_element('p', array('class'=>'hint'), $_SESSION['editdbmsg']);
25 unset($_SESSION['editdbmsg']);
26 ?>
27
28 <h1><?php echo htmlspecialchars(_("Overview")) ?></h1>
29
30 <?php
31 $appointments = getAppointments($personid);
32 if (!empty($appointments)) {
33 ?>
34
35 <h2><?php echo htmlspecialchars(_("Available appointments")); ?></h2>
36
37 <ul>
38
39 <?php
40 foreach ($appointments as $appointment) { ?>
41 <li><a href="appointment.php?id=<?php echo $appointment['id'];?>"><?php echo htmlspecialchars($appointment['title']), '</a>';
42 if ($appointment['expire_date']) echo ' (', htmlspecialchars(_('expire date: ')), $appointment['expire_date'], ')'; ?></li>
43 <?php } ?>
44 </ul>
45
46 <?php } else { ?>
47 <em><?php echo htmlspecialchars(_('There are no appointments at the moment!')); ?></em>
48 <?php } ?>
49
50
51
52 <?php
53 $appointments = getAppointments($personid, TRUE);
54 if (count($appointments) > 0 || $personright['addappointment'])
55 { ?>
56
57 <h2><?php echo _("Manage appointments"); ?></h2>
58
59 <?php }
60 $columns = array(
61 new DiHidden('id:'),
62 new DiTextEdit('title', _('title'), 32, 20),
63 new DiTextareaEdit('description', _('description'), 20, 4),
64 new DiTextEdit('location', _('location'), 128, 20),
65 new DiTextEdit('minvalue', _('min value'), NULL, 5),
66 new DiTextEdit('maxvalue', _('max value'), NULL, 5),
67 new DiBoolEdit('approvaldesc', _('approval desc')),
68 new DiTextEdit('cssname', _('css name'), 256, 20),
69 new DiTextEdit('expire_date', _('expire date'), 10, 10),
70 new DiHidden('creator_personid', $_SESSION['person']['id'])
71 );
72
73 echo html_createEditForm(
74 'cgi-bin/editdb.php',
75 basename($_SERVER['REQUEST_URI']),
76 'appointment',
77 $columns,
78 $appointments, // Array of rows, that are again arrays of columns
79 $personright['addappointment'], TRUE, TRUE);
80
81 ?>
82
83 <p><a href="person.php">
84 <?php if ($personright['manageperson'])
85 echo _("Manage Persons");
86 else echo _("Manage personal data");
87 ?>
88 </a></p>
89 <p><a href="login.php?logout"><?php echo htmlspecialchars(_('Logout')); ?></a></p>
90
91 </body>
92 </html>

  ViewVC Help
Powered by ViewVC 1.1.26