兵庫県障害児学校教職員組合

#!/usr/local/bin/perl #use "../KCatch" qw( execdata );__DATA__ my($homedir,$ban,@ban,$text,$sanko,$folder); $folder="shokyoso"; require '../server.ini'; $homedir=$server::homedir; open(BAN,"$homedir/$folder/top_number.txt") or die $!; @ban=; close(BAN); $ban=$ban[0]; open(IN,"$homedir/$folder/messages/$ban.shtml") or die $!; while(){ $text.=$_; } close(IN); $text=~/(.+)<\/title>/; my $title=$1; $text=~/<!--bs-->([\s\S]+)<!--be-->/; my $body=$1; if($text=~/<!--rs-->\n([\s\S]+)\n<!--re-->/){ $sanko=$1; } $body =~s/src="(.+?)"/src="\/$folder\/messages\/$1"/g; print "content-type: text/html\n\n"; print "<center><h1>$title</h1></center>\n"; print "$body\n"; if($sanko){ print "<ul>\n"; print "$sanko\n"; print "</ul>\n"; }            </td> </tr> <tr> <td width="101%" bgcolor="#00FFFF" style="border-bottom-style: solid; border-bottom-color: #0000FF"> <p><b><font color="#FF0000">■</font><a href="whatsnew.shtml">新着情報</a></b></p> </td> </tr> <tr> <td width="101%" height="18"> <table border="0" width="100%" cellspacing="1" cellpadding="1"> #!/usr/local/bin/perl use Time::Local; $newmark = '<img src="/new.gif">'; $newdates=2; $time=time; open IN,"message.idx"; print "content-type: text/html\n\n"; while(<IN>){ if ($line++==5){ last; } @fields=split(/:=:/); ($year,$mon,$day)=split(/\//,$fields[3]); $updatetime=timelocal(0,0,0,$day,$mon-1,$year); if (($time-$updatetime) > $newdates*24*60*60*2) { $newsign = ""; } else { $newsign = "$newmark"; } if(not($fields[0]=~/^\*/)){ print "<tr><td width=\"4%\" valign=\"top\"><img src=\"BD14578_.GIF\"><td width='80%'><a href=\"messages/$fields[0]\">$fields[1]</a>$newsign</td><td width=11%' valign=\"top\">$fields[2]</td></tr>\n" ; } } print "<tr><td></td><td></td><td align=\"right\"><a href=\"/FAQ/whatsnew.shtml\"><font size='2'>→続き</font><img border='0' src='garrow.gif' width='8' height='11'></a></td></tr>" ; close IN; </table> </td> </tr> <tr> <td width="101%" bgcolor="#00FFFF" style="border-bottom-style: solid; border-bottom-color: #0000FF"> <p><b><font color="#FF0000">■</font><a href="koryu/wforum.cgi">交流新着情報</a></b></p> </td> </tr> <tr> <td> <table border="0" width="100%" cellspacing="1" cellpadding="1"> #!/usr/local/bin/perl use KCatch; $logfile = './wf_log.cgi'; $new_color = "#FF3300"; $newmark = '<img src="./new.gif">'; $new_time = 48; $script = '/shokyoso/koryu/wforum.cgi'; # 時間取得 $times = time; open(IN,"$logfile") || &error("Open Error : $logfile"); $top = <IN>; while (<IN>) { local($no,$reno,$xl,$sub,$email,$url,$name,$date, $msg,$time,$h,$pw,$wrap,$oya,$smail,$res) = split(/<>/); $count{$no} = $time; $re{$no} = $reno; $d{$no} = $date; $na{$no} = $name; $no{$no} = $no; $ttl{$no} = $sub; $oya{$no} = $oya; $time{$no} = $time; } close(IN); print "content-type: text/html\n\n"; print "<table width=\"100%\">"; # ソート処理 $i=0; foreach (sort { ($count{$b} <=> $count{$a}) || ($a cmp $b)} keys(%count)) { $i++; if ($i > 10) { next; } # 所定時間以内の投稿は[NEWマーク]表示 if (($times - $time{$_}) > $new_time*3600) { $newsign = ""; } else { $newsign = "<font color=$new_color>$newmark</font>"; } if ($ttl{$_} eq '<s>投稿者削除</s>') { print "<tr><td width=\"4%\" valign=\"top\"><img src=\"BD14578_.GIF\"></td><td width=\"96%\"><font size ='3'>$ttl{$_} - <SMALL>$d{$_} <font color=$no_color>No\.$_</font> $newsign</SMALL></td></tr>\n"; } else { print "<tr><td width=\"4%\" valign=\"top\"><img src=\"BD14578_.GIF\"></td><td width=\"96%\"><font size ='3'><a href=\"$script?no=$_&reno=$re{$_}&oya=$oya{$_}&mode=msgview&list=tree\">$ttl{$_}</a> - <b>$na{$_}</b> <SMALL>$d{$_} <font color=$no_color>No\.$_</font> $newsign</SMALL></td></tr>\n"; } } print"</table>"; <tr> <td> <p align="right"> <font size="2"><a href="koryu/wforum.cgi">→</font><font size="2">続き<img border="0" src="garrow.gif" ALT="→" width="8" height="11"></font></a> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </td> </tr> </table> </div> </body> </html>