|
|
## LIGHT BOARDのメイン処理
&decode;
#if ($mode eq "howto") { &howto; }
#elsif ($mode eq "find") { &find; }
#elsif ($mode eq "usr_del") { &usr_del; }
#elsif ($mode eq "msg") { ®ist; }
#&html_log;
&get_agent;
open(LOG,"$logfile") || &error("Can't open $logfile");
@lines = <LOG>;
close(LOG);
$init = $lines[0];
($head,$title,$t_color,$t_size,$t_face,$bgr,$bgc,$text,$link,
$vlink,$alink,$home,$max,$subj_color,$name_color,$mail1,$mail2)
= split(/<>/,$init);
shift(@lines);
&header;
print <<HTML;
<center><font color=$t_color size=$t_size face=$t_face>
<b>$title</b></font><hr width='90%' size=2>
[<a href=$home target=_top>トップにもどる</a>]
[<a href=$script?mode=howto>掲示板の使い方</a>]
[<a href=$script?mode=find>ワード検索</a>]
<hr width=90% size=2></center>
<form method="$method" action="$script">
<input type=hidden name=mode value="msg">
<blockquote><table border=0>
<tr><td nowrap><b>おなまえ</b></td>
<td><input type=text name=name size="$nam_wid" value="$c_name"></td></tr>
<tr><td nowrap><b>Eメール</b></td>
<td><input type=text name=email size="$nam_wid" value="$c_email"></td></tr>
<tr><td nowrap><b>題 名</b></td>
<td><input type=text name=sub size="$subj_wid" value=\"$res_sub\">
<input type=submit value="投稿する"><input type=reset value="リセット"></td></tr>
<tr><td colspan=2><b>コメント</b><br>
<TEXTAREA cols="$com_wid" rows=7 name=comment wrap="$wrap">$res_comment</TEXTAREA></td></tr>
<tr><td nowrap><b>URL</b></td>
<td><input type=text size="$url_wid" name=url value="http://$c_url"></td></tr>
<tr><td nowrap><b>削除キー</b></td>
<td><input type=password name=pwd size=8 maxlength=8 value="$c_pwd">
<small>(記事削除時に使用。英数字で8文字以内)</small></td></tr>
</table></form></blockquote><hr>
HTML
while (($key,$val) = each %FORM ) {
print "$key = $val<br>\n";
}
| |
|
|
|
|
#============#
# 設定完了 #
#============#
## LIGHT BOARDのメイン処理
&decode;
&get_agent;
open(LOG,"$logfile") || &error("Can't open $logfile");
@lines = <LOG>;
close(LOG);
$init = $lines[0];
($head,$title,$t_color,$t_size,$t_face,$bgr,$bgc,$text,$link,
$vlink,$alink,$home,$max,$subj_color,$name_color,$mail1,$mail2)
= split(/<>/,$init);
shift(@lines);
&header;
require './gamen.pl';
#=================================================
print '入力データの表示<br>' . "\n";
while (($key,$val) = each %FORM ) {
print "$key = $val<br>\n";
}
print "<hr>\n";
#=================================================
print '$lines[0]の表示<br>' . "\n";
print "$init\n";
print "<hr>\n";
#=================================================
print '中身の表示<br>' . "\n";
@work = split(/<>/,$init);
foreach $target ( @work ) {
print "$target<br>\n";
}
print "<hr>\n";
#=================================================
unshift(@lines,"$FORM{'name'}<>$FORM{'email'}<>$FORM{'sub'}<>$FORM{'comment'}<>$FORM{'url'}<>$FORM{'pwd'}<>\n");
unshift(@lines,$init);
#=================================================
open(LOG,">$logfile") || &error("Can't write $logfile");
print LOG @lines;
close(LOG);
#=================================================
print "入力データを書き込みました<br>\n";
| |
|
|
|