Diff for /capa/capa51/Discuss/Ver1.3/Attic/capadiscuss between versions 1.6 and 1.7

version 1.6, 2000/01/05 21:11:15 version 1.7, 2000/01/31 18:34:12
Line 172  if($debug) {$BenchmarkTb = new Benchmark Line 172  if($debug) {$BenchmarkTb = new Benchmark
 }  }
   
 sub ViewSet {  sub ViewSet {
     local($hidden);
   if ($debug) {print "InsideViewSet<BR>";$BenchmarkTa = new Benchmark;}    if ($debug) {print "InsideViewSet<BR>";$BenchmarkTa = new Benchmark;}
   &Log("ViewSet");    &Log("ViewSet");
   &CheckAdmin;    &CheckAdmin;
Line 215  if($debug) {$BenchmarkTb = new Benchmark Line 216  if($debug) {$BenchmarkTb = new Benchmark
   
   $col = 1;    $col = 1;
   for($probnum=1; $probnum<=$maxprobs; $probnum++) {    for($probnum=1; $probnum<=$maxprobs; $probnum++) {
       $hidden=0;
     if($col eq "1" && $probnum > $col1size && $bigtable eq "yes") {      if($col eq "1" && $probnum > $col1size && $bigtable eq "yes") {
       $col = 2;        $col = 2;
       &ViewSetEndColHTML;        &ViewSetEndColHTML;
Line 226  if($debug) {$BenchmarkTb = new Benchmark Line 228  if($debug) {$BenchmarkTb = new Benchmark
       closedir(MSG);        closedir(MSG);
       foreach $msg(@msgs) {        foreach $msg(@msgs) {
         if(&RemZero(substr($msg,0,6)) eq $probnum) {          if(&RemZero(substr($msg,0,6)) eq $probnum) {
           push(@good,$msg);            &OpenMsg("$capadir/$class/discussion/$setid/$msg");
             if(!($status eq "hidden" && $validadmin ne "yes")) { 
               push(@good,$msg); 
             } else { $hidden++; }
         }          }
       }        }
         $posts = $found[$probnum]-$hidden;
       &OpenMsg("$capadir/$class/discussion/$setid/$good[$#good]");        if ($posts >0) {
       $lastpost = "$date at $time";           &OpenMsg("$capadir/$class/discussion/$setid/$good[$#good]");
       $posts = $found[$probnum];           $lastpost = "$date at $time";
         } else {
            $lastpost = "--";
         }
     }      }
     else {      else {
       $lastpost = "--";        $lastpost = "--";
Line 585  sub WriteMsg { Line 593  sub WriteMsg {
   # add sr to grab e-mail address of user    # add sr to grab e-mail address of user
   
       
   # <B> <I> <P> <A> <LI> <OL> <UL> <EM> <BR> <TT> <STRONG> <BLOCKQUOTE> <DIV .*> <DIV> <P .    # <B> <I> <P> <A> <LI> <OL> <UL> <EM> <BR> <TT> <STRONG> <BLOCKQUOTE> <DIV .*> <DIV> <IMG>
   %html=(B=>1, I=>1, P=>1, A=>1, LI=>1, OL=>1, UL=>1, EM=>1, BR=>1, TT=>1, STRONG=>1,    %html=(B=>1, I=>1, P=>1, A=>1, LI=>1, OL=>1, UL=>1, EM=>1, BR=>1, TT=>1, STRONG=>1,
  BLOCKQUOTE=>1, DIV=>1, IMG=>1);   BLOCKQUOTE=>1, DIV=>1, IMG=>1);
   
Line 660  sub CheckAdmin { Line 668  sub CheckAdmin {
  last;   last;
       }        }
     }      }
    if ($debug) { print "Admin Sections: ".$adminsection;}
     @adminsections = split(/\,/,$adminsection);      @adminsections = split(/\,/,$adminsection);
     for ($asection=0; $asection <= $#adminsections; $asection++) {      for ($asection=0; $asection <= $#adminsections; $asection++) {
       $adminsections[$asection]=&RemZero($adminsections[$asection])        $adminsections[$asection]=&RemZero($adminsections[$asection])
Line 671  sub CheckAdmin { Line 680  sub CheckAdmin {
           
     $snum =~ tr/a-z/A-Z/;      $snum =~ tr/a-z/A-Z/;
     LINE: foreach $line(@classl) {      LINE: foreach $line(@classl) {
       ($course,$coursenum,$section,$stunum,$a) = split(/\ +/,$line);        $section= substr $line, 10, 3;
         $stunum= substr $line, 14, 9;
       $stunum =~ tr/a-z/A-Z/;        $stunum =~ tr/a-z/A-Z/;
       if ( $stunum ne $snum ) { next LINE;}        if ( $stunum ne $snum ) { next LINE;}
       $section = &RemZero($section);        $section = &RemZero($section);
    if ($debug) {print "<BR>".$stunum."Is in section:".$section."<BR>";}
       foreach $asection(@adminsections) {        foreach $asection(@adminsections) {
  if($section eq $asection ) {   if($section eq $asection ) {
   $validadmin = "yes";    $validadmin = "yes";
Line 827  sub GetDateTime  { Line 838  sub GetDateTime  {
   ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime (time);    ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime (time);
   $mon++;    $mon++;
   
     $year=$year+1900;
   
   if ($hour < 12) {    if ($hour < 12) {
   $AMPM = "AM";    $AMPM = "AM";
   }    }

Removed from v.1.6  
changed lines
  Added in v.1.7


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