be12a0d7290e1f797fa529d448ed2f17c7135690
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 html_tag( 'table', '', '', $color[0], 'border="0" width="100%" cellspacing="0" cellpadding="2"' ) .
20 html_tag( 'td', '', 'left', '', 'width="100%"' );
22 displayInternalLink("plugins/calendar/calendar.php?year=$year&month=$month",_("Month View"),"right");
24 displayInternalLink("plugins/calendar/day.php?year=$year&month=$month&day=$day",_("Day View"),"right");
26 // displayInternalLink("plugins/calendar/event_create.php?year=$year&month=$month&day=$day",_("Add Event"),"right");
27 // echo "  \n";
32 function select_option_length($selected) {
42 "150" => _("2.5 hr."),
44 "210" => _("3.5 hr."),
50 while( $bar = each($eventlength)) {
51 if($selected==$bar[key
]){
52 echo " <OPTION VALUE=\"".$bar[key
]."\" SELECTED>".$bar[value
]."</OPTION>\n";
54 echo " <OPTION VALUE=\"".$bar[key
]."\">".$bar[value
]."</OPTION>\n";
59 function select_option_minute($selected) {
75 while ( $bar = each($eventminute)) {
76 if ($selected==$bar[key
]){
77 echo " <OPTION VALUE=\"".$bar[key
]."\" SELECTED>".$bar[value
]."</OPTION>\n";
79 echo " <OPTION VALUE=\"".$bar[key
]."\">".$bar[value
]."</OPTION>\n";
84 function select_option_hour($selected) {
86 for ($i=0;$i<24;$i++
){
87 ($i<10)?
$ih = "0" . $i : $ih = $i;
89 echo " <OPTION VALUE=\"$ih\" SELECTED>$i</OPTION>\n";
91 echo " <OPTION VALUE=\"$ih\">$i</OPTION>\n";
96 function select_option_priority($selected) {
97 $eventpriority = array(
102 while( $bar = each($eventpriority)) {
103 if($selected==$bar[key
]){
104 echo " <OPTION VALUE=\"".$bar[key
]."\" SELECTED>".$bar[value
]."</OPTION>\n";
106 echo " <OPTION VALUE=\"".$bar[key
]."\">".$bar[value
]."</OPTION>\n";
111 function select_option_year($selected) {
113 for ($i=1902;$i<2038;$i++
){
115 echo " <OPTION VALUE=\"$i\" SELECTED>$i</OPTION>\n";
117 echo " <OPTION VALUE=\"$i\">$i</OPTION>\n";
122 function select_option_month($selected) {
124 for ($i=1;$i<13;$i++
){
125 $im=date('m',mktime(0,0,0,$i,1,1));
126 $is = substr( _( date('F',mktime(0,0,0,$i,1,1)) ), 0, 3 );
128 echo " <OPTION VALUE=\"$im\" SELECTED>$is</OPTION>\n";
130 echo " <OPTION VALUE=\"$im\">$is</OPTION>\n";
135 function select_option_day($selected) {
137 for ($i=1;$i<32;$i++
){
138 ($i<10)?
$ih="0".$i : $ih=$i;
140 echo " <OPTION VALUE=\"$ih\" SELECTED>$i</OPTION>\n";
142 echo " <OPTION VALUE=\"$ih\">$i</OPTION>\n";