c723f68afc79870583c77694b797a76cb2349f3a
6 * Copyright (c) 2002-2003 The SquirrelMail Project Team
7 * Licensed under the GNU GPL. For full terms see the file COPYING.
9 * Originally contrubuted by Michal Szczotka <michal@tuxy.org>
11 * miscelenous functions.
17 function calendar_header() {
18 //Add Second layer ofCalendar links to upper menu
19 global $color,$year,$day,$month;
21 echo html_tag( 'table', '', '', $color[0], 'border="0" width="100%" cellspacing="0" cellpadding="2"' ) .
23 html_tag( 'td', '', 'left', '', 'width="100%"' );
25 displayInternalLink("plugins/calendar/calendar.php?year=$year&month=$month",_("Month View"),"right");
26 echo " \n";
27 displayInternalLink("plugins/calendar/day.php?year=$year&month=$month&day=$day",_("Day View"),"right");
28 echo " \n";
29 // displayInternalLink("plugins/calendar/event_create.php?year=$year&month=$month&day=$day",_("Add Event"),"right");
30 // echo " \n";
35 function select_option_length($selected) {
45 '150' => _("2.5 hr."),
47 '210' => _("3.5 hr."),
53 while( $bar = each($eventlength)) {
54 if($selected==$bar['key']){
55 echo " <OPTION VALUE=\"".$bar['key']."\" SELECTED>".$bar['value']."</OPTION>\n";
57 echo " <OPTION VALUE=\"".$bar['key']."\">".$bar['value']."</OPTION>\n";
62 function select_option_minute($selected) {
78 while ( $bar = each($eventminute)) {
79 if ($selected==$bar['key']){
80 echo " <OPTION VALUE=\"".$bar['key']."\" SELECTED>".$bar['value']."</OPTION>\n";
82 echo " <OPTION VALUE=\"".$bar['key']."\">".$bar['value']."</OPTION>\n";
87 function select_option_hour($selected) {
89 for ($i=0;$i<24;$i++
){
90 ($i<10)?
$ih = "0" . $i : $ih = $i;
92 echo " <OPTION VALUE=\"$ih\" SELECTED>$i</OPTION>\n";
94 echo " <OPTION VALUE=\"$ih\">$i</OPTION>\n";
99 function select_option_priority($selected) {
100 $eventpriority = array(
105 while( $bar = each($eventpriority)) {
106 if($selected==$bar['key']){
107 echo " <OPTION VALUE=\"".$bar['key']."\" SELECTED>".$bar['value']."</OPTION>\n";
109 echo " <OPTION VALUE=\"".$bar['key']."\">".$bar['value']."</OPTION>\n";
114 function select_option_year($selected) {
116 for ($i=1902;$i<2038;$i++
){
118 echo " <OPTION VALUE=\"$i\" SELECTED>$i</OPTION>\n";
120 echo " <OPTION VALUE=\"$i\">$i</OPTION>\n";
125 function select_option_month($selected) {
127 for ($i=1;$i<13;$i++
){
128 $im=date('m',mktime(0,0,0,$i,1,1));
129 $is = getMonthAbrv( date('m',mktime(0,0,0,$i,1,1)) );
131 echo " <OPTION VALUE=\"$im\" SELECTED>$is</OPTION>\n";
133 echo " <OPTION VALUE=\"$im\">$is</OPTION>\n";
138 function select_option_day($selected) {
140 for ($i=1;$i<32;$i++
){
141 ($i<10)?
$ih="0".$i : $ih=$i;
143 echo " <OPTION VALUE=\"$ih\" SELECTED>$i</OPTION>\n";
145 echo " <OPTION VALUE=\"$ih\">$i</OPTION>\n";