#!/usr/local/bin/perl # # 日記CGI nicky! Support Script # # 定義部 $ieditVer="2008/07/07"; # #タイトルリスト(iMODE用) # sub PutTitleListIMODE { my($par)=@_; my($yr, $mn, $pcnt, $flag, $m); my($opt, $gfn, $sts, $mdstr, $ppage); local($str); #1ページ内に表示する件数 if( !$num ){ $num=16; } $pcnt=0; $sts=&ReqJcode(); # nicky.cgiで設定したiMODE用ヘッダを有効にしたい場合を以下を有効にする # &NickyGetHead(); # if( $sts ) # { # &jcode'euc2sjis(\$iHead); # } # print $iHead; if( $par eq "edit" ){ $m="編集する記事をクリック
"; }elsif( $par eq "del" ){ $m="削除する記事をクリック
"; } if( $sts ){ &jcode'euc2sjis(\$m); } &PutHTMLheaderSJIS(); print "$m"; # if( $TitleListSort eq "UP" ){ # $opt="r"; # }else{ # $opt="tr"; # } $opt="r"; for $gfn( &GetNickyList($opt) ){ $pcnt++; next if( $scnt >= $pcnt ); $NickyFname=$$gfn[0]; &GetDateFromFname(); &GetNickyFile("$vDir/$NickyFname"); $mdstr=""; if( $mn != $month ){ $str="$year$TLyear$month$TLmonth
"; print &zenkakuhankaku($str); $mn=$month; } $str="$mdstr$day$TLday
$Title
"; print &zenkakuhankaku($str); last if( $pcnt >= $num+$scnt ); } $numstr="\?num=$num" if( $num != 16 ); if( $scnt ){ $ppage=$scnt-$num; print "\<\;prev"; } if( $pcnt >= $num+$scnt ){ print "/" if( $scnt ); print "next>"; } # print $iFoot; print "\n"; } # # S.Kano # local($str, $arg, $val); my($newline, $a); binmode(STDIN); binmode(STDOUT); require("./nicky.cgi"); &ReadSetup(); &initial2nd(); $flag=0; $Admin=0; split(/\?/, $ENV{'QUERY_STRING'}); for $str(@_){ ($arg, $val)=split(/=/, $str); $val =~ s/\+/ /g; $val =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/ego; &NickySetValue(); } print "Content-type: text/html\n\n"; $flag_type=1; if( ($arg eq "edit") || ($arg eq "del") ){ &PutTitleListIMODE($arg); }else{ print <<_END; Ver $ieditVer
edit
del _END } #end of script