5 * Copyright (c) 2001 Michal Szczotka <michal@tuxy.org>
6 * Licensed under the GNU GPL. For full terms see the file COPYING.
8 * miscelenous functions.
14 function calendar_header() {
15 //Add Second layer ofCalendar links to upper menu
16 global $color,$year,$day,$month;
18 echo "<TABLE BGCOLOR=\"$color[0]\" BORDER=0 WIDTH=\"100%\" CELLSPACING=0 CELLPADDING=2>".
19 "<TR><TD ALIGN=left WIDTH=\"100%\">";
21 displayInternalLink("plugins/calendar/calendar.php?year=$year&month=$month",_("Month View"),"right");
23 displayInternalLink("plugins/calendar/day.php?year=$year&month=$month&day=$day",_("Day View"),"right");
25 // displayInternalLink("plugins/calendar/event_create.php?year=$year&month=$month&day=$day",_("Add Event"),"right");
26 // echo "  \n";
31 function select_option_length($selected) {
41 "150" => _("2.5 hr."),
43 "210" => _("3.5 hr."),
49 while( $bar = each($eventlength)) {
50 if($selected==$bar[key
]){
51 echo " <OPTION VALUE=\"".$bar[key
]."\" SELECTED>".$bar[value
]."</OPTION>\n";
53 echo " <OPTION VALUE=\"".$bar[key
]."\">".$bar[value
]."</OPTION>\n";
58 function select_option_minute($selected) {
74 while ( $bar = each($eventminute)) {
75 if ($selected==$bar[key
]){
76 echo " <OPTION VALUE=\"".$bar[key
]."\" SELECTED>".$bar[value
]."</OPTION>\n";
78 echo " <OPTION VALUE=\"".$bar[key
]."\">".$bar[value
]."</OPTION>\n";
83 function select_option_hour($selected) {
85 for ($i=0;$i<24;$i++
){
86 ($i<10)?
$ih = "0" . $i : $ih = $i;
88 echo " <OPTION VALUE=\"$ih\" SELECTED>$i</OPTION>\n";
90 echo " <OPTION VALUE=\"$ih\">$i</OPTION>\n";
95 function select_option_priority($selected) {
96 $eventpriority = array(
101 while( $bar = each($eventpriority)) {
102 if($selected==$bar[key
]){
103 echo " <OPTION VALUE=\"".$bar[key
]."\" SELECTED>".$bar[value
]."</OPTION>\n";
105 echo " <OPTION VALUE=\"".$bar[key
]."\">".$bar[value
]."</OPTION>\n";
110 function select_option_year($selected) {
112 for ($i=1902;$i<2038;$i++
){
114 echo " <OPTION VALUE=\"$i\" SELECTED>$i</OPTION>\n";
116 echo " <OPTION VALUE=\"$i\">$i</OPTION>\n";
121 function select_option_month($selected) {
123 for ($i=1;$i<13;$i++
){
124 $im=date('m',mktime(0,0,0,$i,1,1));
125 $is = substr( _( date('F',mktime(0,0,0,$i,1,1)) ), 0, 3 );
127 echo " <OPTION VALUE=\"$im\" SELECTED>$is</OPTION>\n";
129 echo " <OPTION VALUE=\"$im\">$is</OPTION>\n";
134 function select_option_day($selected) {
136 for ($i=1;$i<32;$i++
){
137 ($i<10)?
$ih="0".$i : $ih=$i;
139 echo " <OPTION VALUE=\"$ih\" SELECTED>$i</OPTION>\n";
141 echo " <OPTION VALUE=\"$ih\">$i</OPTION>\n";