File:  [LON-CAPA] / loncom / interface / lonannounce.pm
Revision 1.31: download - view: text, annotated - select for diffs
Fri Aug 27 21:41:39 2004 UTC (19 years, 9 months ago) by albertel
Branches: MAIN
CVS tags: version_1_2_X, version_1_2_1, version_1_2_0, HEAD
- filter out parmaeters that don't effect me

    1: # The LearningOnline Network
    2: # Announce
    3: #
    4: # $Id: lonannounce.pm,v 1.31 2004/08/27 21:41:39 albertel Exp $
    5: #
    6: # Copyright Michigan State University Board of Trustees
    7: #
    8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
    9: #
   10: # LON-CAPA is free software; you can redistribute it and/or modify
   11: # it under the terms of the GNU General Public License as published by
   12: # the Free Software Foundation; either version 2 of the License, or
   13: # (at your option) any later version.
   14: #
   15: # LON-CAPA is distributed in the hope that it will be useful,
   16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
   17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18: # GNU General Public License for more details.
   19: #
   20: # You should have received a copy of the GNU General Public License
   21: # along with LON-CAPA; if not, write to the Free Software
   22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   23: #
   24: # /home/httpd/html/adm/gpl.txt
   25: #
   26: # http://www.lon-capa.org/
   27: #
   28: 
   29: package Apache::lonannounce;
   30: 
   31: use strict;
   32: use Apache::Constants qw(:common);
   33: use Apache::loncommon;
   34: use Apache::lonhtmlcommon();
   35: use Apache::lonlocal;
   36: use HTML::Entities();
   37: 
   38: my %todayhash;
   39: my %showedcheck;
   40: 
   41: sub editfield {
   42:     my ($r,$start,$end,$text)=@_;
   43:     # Deal with date forms
   44:     my $startdateform = &Apache::lonhtmlcommon::date_setter('anno',
   45:                                                             'startdate',
   46:                                                             $start);
   47:     my $enddateform = &Apache::lonhtmlcommon::date_setter('anno',
   48:                                                           'enddate',
   49:                                                           $end);
   50:     my $help=&Apache::loncommon::help_open_menu('','Calendar Add Announcement','Calendar_Add_Announcement','',274,'Communication Tools');
   51:     $r->print(<<ENDFORM);
   52: $help
   53: <form name="anno" method="post">
   54: <input type="hidden" value=''          name="action"      >
   55: <table><tr><td>Starting date:</td><td>$startdateform</td></tr>
   56: <tr><td>Ending date:</td><td>$enddateform</td></tr></table>
   57: <textarea name="msg" rows="4" cols="60">$text</textarea>
   58: <input type="button" onClick="trysubmit()" value="Post Announcement"><hr />
   59: ENDFORM
   60: }
   61: 
   62: sub readcalendar {
   63:     my $courseid=shift;
   64:     my $coursenum=$ENV{'course.'.$courseid.'.num'};
   65:     my $coursedom=$ENV{'course.'.$courseid.'.domain'};
   66:     my %thiscal=&Apache::lonnet::dump('calendar',$coursedom,$coursenum);
   67:     my %returnhash=();
   68:     foreach (keys %thiscal) {
   69:         unless (($_=~/^error\:/) || ($thiscal{$_}=~/^error\:/)) {
   70: 	   $returnhash{$courseid.'@'.$_}=$thiscal{$_};
   71:         }
   72:     }
   73:     if ($courseid eq $ENV{'request.course.id'}) {
   74: 	my %resourcedata=
   75: 	    &Apache::lonnet::dump('resourcedata',$coursedom,$coursenum);
   76: 	foreach my $thiskey (sort keys %resourcedata) {
   77: 	    if ($resourcedata{$thiskey.'.type'}=~/^date/) {
   78: 		my ($course,$middle,$part,$name)=
   79: 		    ($thiskey=~/^(\w+)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/);
   80: 		my $section=&mt('All Students');
   81: 		if ($middle=~/^\[(.*)\]\./) {
   82: 		    my $sec=$1;
   83: 		    # if we have a section don't show ones that aren't ours
   84: 		    if ($ENV{'request.course.sec'} &&
   85: 			$ENV{'request.course.sec'} ne $sec) { next; }
   86: 		    # if a student without a section don't show any section ones
   87: 		    if (!$ENV{'request.role.adv'} &&
   88: 			!$ENV{'request.course.sec'}) { next; }
   89: 		    $section=&mt('Group/Section').': '.$1;
   90: 		    $middle=~s/^\[(.*)\]\.//;
   91: 		}
   92: 		$middle=~s/\.$//;
   93: 		my $realm=&mt('All Resources');
   94: 		if ($middle=~/^(.+)\_\_\_\(all\)$/) {
   95: 		    $realm=&mt('Folder/Map').': '.&Apache::lonnet::gettitle($1);
   96: 		} elsif ($middle) {
   97: 		    $realm=&mt('Resource').': '.&Apache::lonnet::gettitle($middle);
   98: 		}
   99: 		my $datetype='';
  100: 		if ($name eq 'duedate') { 
  101: 		    $datetype=&mt('Due'); 
  102: # see if accidentally answerdate is before duedate
  103: 		    my $answerkey=$thiskey;
  104: 		    $answerkey=~s/duedate$/answerdate/;
  105: 		    if ($resourcedata{$thiskey}>$resourcedata{$answerkey}) {
  106: 			$datetype='Due and Answer Available';
  107: 		    }
  108: 		}
  109: 		if ($name eq 'opendate') { $datetype=&mt('Opening'); }
  110: 		if ($name eq 'answerdate') {
  111: # see if accidentally answerdate is before duedate
  112: 		    my $duekey=$thiskey;
  113: 		    $duekey=~s/answerdate$/duedate/;
  114: 		    if ($resourcedata{$duekey}>$resourcedata{$thiskey}) {
  115: # forget it
  116: 			next;
  117: 		    } 
  118: 		    $datetype=&mt('Answer Available'); 
  119: 		}
  120: 		$returnhash{$courseid.'@'.$resourcedata{$thiskey}.'_'.
  121: 			    $resourcedata{$thiskey}}=
  122: 			    'INTERNAL:'.$datetype.': '.$realm.' ('.$section.')';
  123: 	    }
  124: 	}
  125:     }
  126:     return %returnhash;
  127: }
  128: 
  129: sub emptycell {
  130:     return '<td bgcolor="#AAAAAA">&nbsp;</td>';
  131: }
  132: 
  133: sub normalcell {
  134:     my ($day,$month,$year,$text)=@_;
  135:     my $output='';
  136:     foreach (split(/\_\_\_\&\&\&\_\_\_/,$text)) {
  137:         if ($_) {
  138: 	    my $internalflag=0;
  139: 	    my ($courseid,$start,$end,@msg)=split(/\@/,$_);
  140:             my $msg=join('@',@msg);
  141: 	    if ($msg=~/INTERNAL\:/) {
  142: 		$msg=~s/INTERNAL\://gs;
  143: 		$internalflag=1;
  144: 	    }
  145:             my $fullmsg=$ENV{'course.'.$courseid.'.description'}.
  146: 		', '.&Apache::lonlocal::locallocaltime($start);
  147: 	    if ($start!=$end) {
  148: 		$fullmsg.=' - '.&Apache::lonlocal::locallocaltime($end);
  149: 	    }
  150: 	    $fullmsg.=': '.$msg;
  151:             if ($courseid eq $ENV{'request.course.id'}) {
  152:               if ((&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))
  153:                && (!$showedcheck{$start.'_'.$end})
  154: 	       && ($ENV{'form.pickdate'} ne 'yes')
  155: 	       && (!$internalflag)) {
  156:                $output.='<input type="checkbox" name="remove_'.$start.'_'.
  157: 		   $end.'">';
  158:                $showedcheck{$start.'_'.$end}=1;
  159: 	      }
  160: 	    }
  161:             $fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\'');
  162:             $fullmsg=~s/&/\\&/g;
  163:             $output.='<a href="javascript:alert('."'$fullmsg'".')">'.
  164: 	       substr($msg,0,20).'...</a><br />';
  165:        }
  166:     }
  167:     return '<td valign="top"'.
  168: 	((($day eq $todayhash{'day'}) &&
  169:           ($month eq $todayhash{'month'}) &&
  170:           ($year eq $todayhash{'year'}))?' bgcolor="#FFFF00"':'').
  171:            '>'.&tfont('<b>'.&picklink($day,$day,$month,$year).'</b><br />'.$output).'</td>';
  172: }
  173: 
  174: sub plaincell {
  175:     my ($text)=@_;
  176:     my $output='';
  177:     foreach (split(/\_\_\_\&\&\&\_\_\_/,$text)) {
  178:         if ($_) {
  179: 	    my ($courseid,$start,$end,@msg)=split(/\@/,$_);
  180:             my $msg=join('@',@msg);
  181:             my $fullmsg=$ENV{'course.'.$courseid.'.description'}.
  182: 		', '.&Apache::lonlocal::locallocaltime($start);
  183: 	    if ($start!=$end) {
  184: 		$fullmsg.=' - '.&Apache::lonlocal::locallocaltime($end);
  185: 	    }
  186: 	    $msg=~s/INTERNAL\://gs;
  187: 	    $fullmsg.=': '.$msg;
  188:             $fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\'');
  189:             $fullmsg=~s/&/\\&/g;
  190:             $output.='<a href="javascript:alert('."'$fullmsg'".')">'.
  191: 	       substr($msg,0,40).'...</a><br />';
  192:        }
  193:     }
  194:     return $output;
  195: }
  196: 
  197: sub listcell {
  198:     my ($text)=@_;
  199:     my $output='';
  200:     foreach (split(/\_\_\_\&\&\&\_\_\_/,$text)) {
  201:         if ($_) {
  202: 	    my ($courseid,$start,$end,@msg)=split(/\@/,$_);
  203:             my $msg=join('@',@msg);
  204: 	    $msg=~s/INTERNAL\://gs;
  205:             my $fullmsg=&Apache::lonlocal::locallocaltime($start);
  206: 	    if ($start!=$end) {
  207: 		$fullmsg.=&mt(' to ').
  208: 		    &Apache::lonlocal::locallocaltime($end);
  209: 	    }
  210:             $fullmsg.=':<br /><b>'.
  211:                $msg.'</b>';
  212:             $output.='<li>'.$fullmsg.'</li>';
  213:        }
  214:     }
  215:     return $output;
  216: }
  217: 
  218: sub nextday {
  219:     my %th=@_;
  220:     $th{'day'}++;
  221:     return (&Apache::loncommon::maketime(%th),$th{'month'});
  222: }
  223: 
  224: sub showday {
  225:     my ($tk,$mode,%allcal)=@_;
  226:     my %th=&Apache::loncommon::timehash($tk);
  227:     my ($nextday,$nextmonth)=&nextday(%th);
  228:     my $outp='';
  229:     if ($mode) {
  230: 	my $oneday=24*3600;
  231: 	$tk-=$oneday;
  232: 	$nextday+=$oneday;
  233:     }
  234:     foreach (keys %allcal) {
  235: 	my ($course,$startdate,$enddate)=($_=~/^(\w+)\@(\d+)\_(\d+)$/);
  236:         if (($startdate<$nextday) && ($enddate>$tk))  {
  237: 	    $outp.='___&&&___'.$course.'@'.$startdate.'@'.$enddate.'@'.
  238:             $allcal{$_};
  239:         }
  240:     }
  241:     unless ($mode) {
  242:        return ($nextday,$nextmonth,&normalcell(
  243:                $th{'day'},$th{'month'},$th{'year'},$outp));
  244:    } elsif ($outp) {
  245:        if ($mode==1) {
  246:           return '<br />'.&plaincell($outp);
  247:       } else {
  248:           return '<ul>'.&listcell($outp).'</ul>';
  249:       }
  250:    } else {
  251:        return '';
  252:    }
  253: }
  254: 
  255: sub tfont {
  256:     my $text=shift;
  257:     if ($ENV{'form.pickdate'} eq 'yes') {
  258: 	return '<font size="1">'.$text.'</font>';
  259:     } else {
  260: 	return $text;
  261:     }
  262: }
  263: 
  264: sub picklink {
  265:     my ($text,$day,$month,$year)=@_;
  266:     if ($ENV{'form.pickdate'} eq 'yes') {
  267: 	return '<a href="javascript:dialin('.$day.','.$month.','.$year.')">'.
  268: 	    $text.'</a>';
  269:     } else {
  270: 	return $text;
  271:     }
  272: }
  273: 
  274: sub dialscript {
  275:     return (<<ENDDIA);
  276: <script language="Javascript">
  277: function dialin(day,month,year) {
  278: 	opener.document.$ENV{'form.formname'}.$ENV{'form.element'}\_year.value=year;
  279:     var slct=opener.document.$ENV{'form.formname'}.$ENV{'form.element'}\_month;
  280:     var i;
  281:     for (i=0;i<slct.length;i++) {
  282:         if (slct.options[i].value==month) { slct.selectedIndex=i; }
  283:     }
  284:     opener.document.$ENV{'form.formname'}.$ENV{'form.element'}\_day.value=day;
  285:     opener.$ENV{'form.element'}\_checkday();
  286:     self.close();
  287: }
  288: </script>
  289: ENDDIA
  290: }
  291: 
  292: sub handler {
  293:     my $r = shift;
  294:     &Apache::loncommon::content_type($r,'text/html');
  295:     $r->send_http_header;
  296:     return OK if $r->header_only;
  297: 
  298: # ---------------------------------------------------------- Get time right now
  299:     my $today=time;
  300:     %todayhash=&Apache::loncommon::timehash($today);
  301: # ----------------------------------------------------------------- Check marks
  302:     %showedcheck=();
  303:     undef %showedcheck;
  304: # ---------------------------------------------------------- Get month and year
  305:     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
  306:                              ['month','year','pickdate','formname','element']);
  307: # --------------------------------------------------- Decide what month to show
  308:     my $year=$todayhash{'year'};
  309:     if ($ENV{'form.year'}) { $year=$ENV{'form.year'}; }
  310:     my $month=$todayhash{'month'};
  311:     if ($ENV{'form.month'}) { $month=$ENV{'form.month'}; }
  312: 
  313: # ---------------------------------------------- See if we are in pickdate mode
  314:     my $pickdatemode=($ENV{'form.pickdate'} eq 'yes');
  315:     my $pickinfo='&pickdate=yes&formname='.$ENV{'form.formname'}.
  316: 	'&element='.$ENV{'form.element'};
  317: # --------------------------------------------- Find out first day of the month
  318: 
  319:     my %firstday=&Apache::loncommon::timehash(
  320:        &Apache::loncommon::maketime( 'day' => 1, 'month'=> $month,
  321:                                      'year' => $year, 'hours' => 0,
  322: 				     'minutes' => 0, 'seconds' => 0,
  323:                                      'dlsav' => -1 ));
  324:     my $weekday=$firstday{'weekday'};
  325: # ------------------------------------------------------------ Print the screen
  326: 
  327:     $r->print(<<ENDDOCUMENT);
  328: <html>
  329: <head>
  330: <title>The LearningOnline Network with CAPA</title>
  331: <script>
  332: 
  333:     function trysubmit() {
  334:         document.anno.action.value="new";
  335: 	document.anno.submit();
  336:     }
  337: 
  338:     function removesub() {
  339:         document.anno.action.value="del";
  340: 	document.anno.submit();
  341:     }
  342: </script>
  343: </head>
  344: ENDDOCUMENT
  345:     if ($pickdatemode) {
  346: # no big header in pickdate mode
  347: 	$r->print(&Apache::loncommon::bodytag("Pick a Date",'','',1).
  348: 		  &dialscript().
  349: 		  '<font size="1">');
  350:     } else {
  351:        $r->print(&Apache::loncommon::bodytag("Announcements and Calendar"));
  352:     }
  353: # does this user have privileges to post, etc?
  354:     my $allowed=0;
  355:     if ($ENV{'request.course.id'}) {
  356:        $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'});
  357:     }
  358: # does this user have privileges to post to servers?
  359:     my $serverpost=0;
  360:     if ($ENV{'request.role.domain'}) {
  361: 	$serverpost=&Apache::lonnet::allowed('psa',
  362: 					     $ENV{'request.role.domain'});
  363:     } else {
  364: 	$serverpost=&Apache::lonnet::allowed('psa','/');
  365:     }
  366: # -------------------------------- BUT: do no fancy stuff when in pickdate mode
  367:     if ($pickdatemode) { 
  368: 	$serverpost=0; 
  369: 	$allowed=0;
  370:     }
  371: # ------------------------------------------------------------ Process commands
  372:     if ($serverpost) {
  373: 	if ($ENV{'form.serveraction'}) {
  374: 	    foreach (keys %ENV) {
  375: 		if ($_=~/^form\.postto\_(\w+)/) {
  376: 		    $r->print( 
  377: 			'<br />Posting '.$1.': '.&Apache::lonnet::postannounce
  378: 			($1,$ENV{'form.serverannnounce'}));
  379: 		}
  380: 	    }
  381: 	}
  382: 	$r->print(<<SERVERANNOUNCE);
  383: <form name="serveranno" method="post">
  384: <h3>Post Server Announcements</h3>
  385: Post announcements to the system login and roles screen<br />
  386: <i>(leave blank to delete announcement)</i><br />
  387: <textarea name="serverannnounce" cols="60" rows="5"></textarea><br />
  388: Check machines:<br />
  389: SERVERANNOUNCE
  390: # list servers
  391:     foreach (sort keys %Apache::lonnet::hostname) {
  392: 	if (&Apache::lonnet::allowed('psa',$Apache::lonnet::hostdom{$_})) {
  393: 	    $r->print ('<br /><input type="checkbox" name="postto_'.$_.'" /> '.
  394: 		       $_.' <tt>'.$Apache::lonnet::hostname{$_}.'</tt> '.
  395: 		       '<a href="http://'.$Apache::lonnet::hostname{$_}.
  396: 		       '/announcement.txt" target="annowin">current</a>');
  397: 	}
  398:     }
  399:     $r->print(
  400:   '<br /><input type="submit" name="serveraction" value="Post"></form><hr />');
  401:     }
  402:     if ($allowed) {
  403:         my $coursenum=$ENV{'course.'.$ENV{'request.course.id'}.'.num'};
  404:         my $coursedom=$ENV{'course.'.$ENV{'request.course.id'}.'.domain'};
  405: # ----------------------------------------------------- Store new submitted one
  406:         if ($ENV{'form.action'} eq 'new') {
  407: 	    my $startdate = 
  408: 		&Apache::lonhtmlcommon::get_date_from_form('startdate');
  409: 	    my $enddate   = 
  410: 		&Apache::lonhtmlcommon::get_date_from_form('enddate');
  411: 	    unless ($startdate=~/^\d+$/) { $startdate=time; }
  412:             unless ($enddate=~/^\d+$/) { $enddate=$startdate+1; }
  413:             if ($startdate>$enddate) {
  414: 		my $buffer=$startdate;
  415: 		$startdate=$enddate;
  416: 		$enddate=$buffer;
  417:             }
  418: 	    &Apache::lonnet::put('calendar',{ 
  419: 		$startdate.'_'.$enddate => 
  420: 		    $ENV{'form.msg'} },$coursedom,$coursenum);
  421:         }
  422: # ---------------------------------------------------------------- Remove items
  423:         if ($ENV{'form.action'} eq 'del') {
  424: 	    my @delwhich=();
  425:             foreach (keys %ENV) {
  426: 		if ($_=~/^form\.remove\_(.+)$/) {
  427: 		    push(@delwhich,$1);
  428:                 }
  429:             }
  430:             &Apache::lonnet::del('calendar',\@delwhich,$coursedom,$coursenum);
  431:         }
  432: # -------------------------------------------------------- Form to post new one
  433:         my %tomorrowhash=%todayhash;
  434:         $tomorrowhash{'day'}++;
  435:         my $tomorrow=&Apache::loncommon::maketime(%tomorrowhash);
  436:         
  437:         &editfield($r,$today,$tomorrow,'');
  438:     }
  439: # ----------------------------------------------------- Summarize all calendars
  440:     my %allcal=();
  441:     foreach (&Apache::loncommon::findallcourses()) {
  442: 	%allcal=(%allcal,&readcalendar($_));
  443:     }
  444: 
  445: # ------------------------------- Initialize table and forward backward buttons
  446:     my ($pm,$py,$fm,$fy)=($month-1,$year,$month+1,$year);
  447:     if ($pm<1) { ($pm,$py)=(12,$year-1); }
  448:     if ($fm>12){ ($fm,$fy)=(1,$year+1); }
  449: 
  450:     $r->print('<h1>'.('',&mt('January'),&mt('February'),&mt('March'),
  451: 		      &mt('April'),&mt('May'),
  452: 		      &mt('June'),&mt('July'),&mt('August'),
  453:                       &mt('September'),&mt('October'),
  454:                       &mt('November'),&mt('December'))[$month].' '.
  455: 	              $year.'</h1>');
  456: # Reached the end of times, give up
  457:     if (($year<1970) || ($year>2037)) {
  458: 	$r->print('<h3>No calendar available for this date.</h3>'.
  459:  '<a href="/adm/announcements?month='.$todayhash{'month'}.
  460:  '&year='.$todayhash{'year'}.'">Current Month</a></body></html>');
  461: 	return OK;
  462:     }
  463:     $r->print(
  464:  '<a href="/adm/announcements?month='.$pm.'&year='.$py.
  465:  ($pickdatemode?$pickinfo:'').'">'.&mt('Previous Month').'</a> '.
  466:  '<a href="/adm/announcements?month='.$fm.'&year='.$fy.
  467:  ($pickdatemode?$pickinfo:'').'">'.&mt('Next Month').'</a>'.
  468:  '&nbsp;&nbsp;&nbsp;<a href="/adm/announcements?month='.$todayhash{'month'}.
  469:  '&year='.$todayhash{'year'}.
  470:  ($pickdatemode?$pickinfo:'').'">'.&mt('Current Month').'</a><p>'.
  471:         '<table border="2" cols="7" rows="5"><tr><th>'.
  472: &tfont(&mt('Sun'))
  473: .'</th><th>'.
  474: &tfont(&mt('Mon'))
  475: .'</th><th>'.
  476: &tfont(&mt('Tue'))
  477: .'</th><th>'.
  478: &tfont(&mt('Wed'))
  479: .'</th><th>'.
  480: &tfont(&mt('Thu'))
  481: .'</th><th>'.
  482: &tfont(&mt('Fri'))
  483: .'</th><th>'.
  484: &tfont(&mt('Sat'))
  485: .'</th></tr>');
  486: 
  487:     my $tk=&Apache::loncommon::maketime(%firstday);
  488:     my $outp;
  489:     my $nm;
  490: 
  491: # ---------------------------------------------------------------- Actual table
  492:     $r->print('<tr>');
  493:     for (my $i=0;$i<$weekday;$i++) { $r->print(&emptycell); }
  494:     for (my $i=$weekday;$i<=6;$i++) { 
  495:         ($tk,$nm,$outp)=&showday($tk,0,%allcal);
  496:         $r->print($outp);
  497:     }
  498:     $r->print('</tr>');
  499: 
  500:     for (my $k=0;$k<=4;$k++) {
  501:         $r->print('<tr>');
  502:         for (my $i=0;$i<=6;$i++) {
  503:             ($tk,$nm,$outp)=&showday($tk,0,%allcal);
  504:             if ($month!=$nm) { $outp=&emptycell; }
  505:             $r->print($outp);
  506:         }
  507:         $r->print('</tr>');
  508:     }
  509: # ------------------------------------------------------------------- End table
  510:     $r->print('</table>');
  511: # ----------------------------------------------------------------- Check marks
  512:     %showedcheck=();
  513:     undef %showedcheck;
  514: # --------------------------------------------------------------- Remove button
  515:     if ($allowed) { $r->print('<input type="button" onClick="removesub()" value="Remove Checked Entries">'.
  516: 			      &Apache::loncommon::help_open_topic('Calendar_Remove_Announcement').'</form>'); }
  517:     $r->print('<p>'.
  518:  '<a href="/adm/announcements?month='.$pm.'&year='.$py.
  519:  ($pickdatemode?$pickinfo:'').'">'.&mt('Previous Month').'</a> '.
  520:  '<a href="/adm/announcements?month='.$fm.'&year='.$fy.
  521:  ($pickdatemode?$pickinfo:'').'">'.&mt('Next Month').'</a>'.
  522:  '&nbsp;&nbsp;&nbsp;<a href="/adm/announcements?month='.$todayhash{'month'}.
  523:  '&year='.$todayhash{'year'}.
  524:  ($pickdatemode?$pickinfo:'').'">'.&mt('Current Month').'</a></p>'.
  525:  ($pickdatemode?'</font>':'').
  526:  '</body></html>');
  527:     return OK;
  528: } 
  529: 
  530: 1;
  531: __END__

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>