6 * Copyright (c) 2002-2005 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.
15 * @subpackage calendar
21 function calendar_header() {
22 //Add Second layer ofCalendar links to upper menu
23 global $color,$year,$day,$month;
25 echo html_tag( 'table', '', '', $color[0], 'border="0" width="100%" cellspacing="0" cellpadding="2"' ) .
27 html_tag( 'td', '', 'left', '', 'width="100%"' );
29 displayInternalLink("plugins/calendar/calendar.php?year=$year&month=$month",_("Month View"),"right");
30 echo " \n";
31 displayInternalLink("plugins/calendar/day.php?year=$year&month=$month&day=$day",_("Day View"),"right");
32 echo " \n";
33 // displayInternalLink("plugins/calendar/event_create.php?year=$year&month=$month&day=$day",_("Add Event"),"right");
34 // echo " \n";
39 function select_option_length($selected) {
49 '150' => _("2.5 hr."),
51 '210' => _("3.5 hr."),
57 while( $bar = each($eventlength)) {
58 if($selected==$bar['key']){
59 echo ' <option value="'.$bar['key'].'" selected="selected">'.$bar['value']."</option>\n";
61 echo ' <option value="'.$bar['key'].'">'.$bar['value']."</option>\n";
66 function select_option_minute($selected) {
82 while ( $bar = each($eventminute)) {
83 if ($selected==$bar['key']){
84 echo ' <option value="'.$bar['key'].'" selected="selected">'.$bar['value']."</option>\n";
86 echo ' <option value="'.$bar['key'].'">'.$bar['value']."</option>\n";
91 function select_option_hour($selected) {
93 for ($i=0;$i<24;$i++
){
94 ($i<10)?
$ih = "0" . $i : $ih = $i;
96 echo ' <option value="'.$ih.'" selected="selected">'.$i."</option>\n";
98 echo ' <option value="'.$ih.'">'.$i."</option>\n";
103 function select_option_priority($selected) {
104 $eventpriority = array(
109 while( $bar = each($eventpriority)) {
110 if($selected==$bar['key']){
111 echo ' <option value="'.$bar['key'].'" selected="selected">'.$bar['value']."</option>\n";
113 echo ' <option value="'.$bar['key'].'">'.$bar['value']."</option>\n";
118 function select_option_year($selected) {
120 for ($i=1902;$i<2038;$i++
){
122 echo ' <option value="'.$i.'" selected="selected">'.$i."</option>\n";
124 echo ' <option value="'.$i.'">'.$i."</option>\n";
129 function select_option_month($selected) {
131 for ($i=1;$i<13;$i++
){
132 $im=date('m',mktime(0,0,0,$i,1,1));
133 $is = getMonthAbrv( date('m',mktime(0,0,0,$i,1,1)) );
135 echo ' <option value="'.$im.'" selected="selected">'.$is."</option>\n";
137 echo ' <option value="'.$im.'">'.$is."</option>\n";
142 function select_option_day($selected) {
144 for ($i=1;$i<32;$i++
){
145 ($i<10)?
$ih="0".$i : $ih=$i;
147 echo ' <option value="'.$ih.'" selected="selected">'.$i."</option>\n";
149 echo ' <option value="'.$ih.'">'.$i."</option>\n";