七行プログラミング (452レス)
七行プログラミング http://medaka.5ch.net/test/read.cgi/php/1036141603/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
194: nobodyさん [] 03/12/05 06:41 ID:1VQJofzV sage機能実装。大幅に機能削ってしまったのでbranch. marge よろしく;-] use CGI":all";charset$c='EUC-JP';sub l{a{href,pop},pop}chdir G;sub e{escapeHTML param pop}$d=e(N)||'七氏';($F=e B)=~/[.\/]/?die:($u=($m=e M)=~/sage/?(stat($F)) [9]:0),open F,">>$F";flock F,2;s!\w+://.+!l$&,$&!eg,s/\n/br/eg,print F li(b($m? l$d,'mailto:'.$m:$d),localtime.p$_)if$_=e T;$t='スレ';open F;$/='';*x=*textfield; put header,start_html($F||$t),startform,h1($F||$t),$F?ol(<F>).hidden(B,$F).l$t, '?':ol(li[map{l$_,"?B=$_"}sort{-M$a<=>-M$b}<*>]).$t.x(B),br,submit,Name,x(N), Mail,x(M),br,textarea(T,'',7,80,1),endform,end_html;$u&&utime time,$u,$F http://medaka.5ch.net/test/read.cgi/php/1036141603/194
196: 195 [sage] 03/12/05 06:42 ID:??? >>194 むぅ。(w http://medaka.5ch.net/test/read.cgi/php/1036141603/196
198: nobodyさん [sage] 03/12/05 13:00 ID:??? >>194 *本当に下がる* sage 機能、無理矢理 merge 。:p URL auto link が犠牲に。 #!/usr/bin/perl use CGI":all";sub l{a{href,pop},pop}sub e($){escapeHTML param pop}($C,$B,$D,@S) =<DATA>;charset$C;chdir G;($F=e B||e S)=~m![./]!?die:open F,">>$F";flock F,2;$s =($m=e M)=~/sage/;*x=*textfield;s/\n/br/eg,print F li(b($m?l e N||$D,'mailto:'. $m:e N||$D),localtime.p$_)if$_=e T;close F;$s&&utime 1,1,$F;open F;put header, start_html(-title=>$F||$B,encoding,$C,lang,ja),style(@S),startform,h1($F||$B), $F?ol(<F>).hidden(B,$F).l Top,'?':ol(li[map{l$_,"?B=$_"}sort{-M$a<=>-M$b}<*>]). New.x(S),br,submit,Name,x(N),Mail,x(M),textarea(T,'',7,80,1),endform,end_html __DATA__ Shift_JIS 7ch 七氏 h1 {color:red; font-size:140%;} p {margin:0em; padding:0.5em; background:#EEF;} utime は FreeBSD だとファイル閉じないと効かなかったです。 Win98SE だと開いたままいぢれたけど。 http://medaka.5ch.net/test/read.cgi/php/1036141603/198
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
アボンOFF
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.021s