]> git.datanom.net - webcal.git/blob - include/menu.inc.php
Initial upload
[webcal.git] / include / menu.inc.php
1 <?php
2 /* $Id$ */
3 require_once 'config.inc.php';
4 require_once 'helper.php';
5
6 $pwd = WEB_ROOT;
7 if ($pwd[strlen($pwd)-1] == '/')
8 $pwd = substr($pwd, 0, -1);
9 $pix = $pwd.'/pixmaps';
10
11 $history = $_SERVER['PHP_SELF'];
12 $query = construct_URL($_SERVER['QUERY_STRING'], array('etag', 'referer', 'cal'));
13 if (count($query) > 0) {
14 $part = '';
15 foreach ($query as $key => $value) {
16 if (strcasecmp($key, 'referer') === 0)
17 continue;
18 $part .= "&$key=$value";
19 }
20 //$history .= substr($part, 0, -1);
21 $history .= $part;
22 }
23 //print $history;
24 //exit;
25 $menu = <<<_MENU
26 <div id="menu">
27 <table>
28 <tr>
29 <td><a href="$pwd/events/new_event.php?referer=$history">
30 <img src="$pix/add-event.png" width="21" height="19" alt="new event" />New</a></td>
31 <td><a href="$pwd/events/edit_event.php?referer=$history">
32 <img src="$pix/edit-event.png" width="21" height="19"
33 alt="Edit event" />Edit</a></td>
34 <td><a href="$pwd/events/delete_event.php?referer=$history">
35 <img src="$pix/delete-event.png" width="21" height="19"
36 alt="Delete event" />Delete</a></td>
37 <td colspan="2"></td>
38 <td></td>
39 <td><a href="$pwd/navigate/goto_today.php"><img src="$pix/goto-today.png" width="21" height="19" alt="Goto today" />Today</a></td>
40 <td><a href="$pwd/navigate/show_day.php"><img src="$pix/day.png" width="21" height="19" alt="Show one day" />Day</a></td>
41 <td><a href="$pwd/navigate/show_week.php"><img src="$pix/week.png" width="21" height="19" alt="Show one week" />Week</a></td>
42 <td><a href="$pwd/navigate/show_month.php"><img src="$pix/month.png" width="21" height="19" alt="Show one month" />Month</a></td>
43 <td></td>
44 <td colspan="2"></td>
45 <td><a href="$pwd/utils/print.php" onclick="javascript: alert('Printing not available'); return false;">
46 <img src="$pix/print.png" width="21" height="19" alt="Print" />Print</a></td>
47 <td><a href="$pwd/events/update.php?referer=$history">
48 <img src="$pix/reload.png" width="21" height="19"
49 alt="Update events" />Update</a></td>
50 <td><a href="$pwd/utils/configure.php"><img src="$pix/configuration.png" width="21" height="19" alt="Configure Web Calendar" />Config</a></td>
51 </tr>
52 </table>
53 </div>
54 _MENU;
55
56 //file_put_contents('/tmp/davical.log', $menu, FILE_APPEND);
57 print $menu;
58
This page took 0.066231 seconds and 6 git commands to generate.