X-Git-Url: http://lab.mitty.jp/git/?a=blobdiff_plain;f=snuploader%2Fupload.cgi;h=4c5d35b2f54c863a3b528985f408265215915a24;hb=0caa8637aa138ca19aea1e39fcc307a9b3e130a3;hp=9e8554d09889e51c3767e6d187af3922c07a7fc2;hpb=353186b91ae8246238f2188b6bd50fb37e00a23e;p=lab.git diff --git a/snuploader/upload.cgi b/snuploader/upload.cgi index 9e8554d..4c5d35b 100755 --- a/snuploader/upload.cgi +++ b/snuploader/upload.cgi @@ -167,6 +167,7 @@ unless(-e $set{'base_html'}){ &makehtml; } } if($upflag || $valueflag){ unlink("$set{'src_dir'}$random.temporary"); &error(108);} + $in{'postname'} = $FORM{'postname'}; $in{'org_pass'} = $in{'pass'} = $FORM{'pass'}; $in{'dlkey'} = $FORM{'dlkey'}; $in{'comment'} = $FORM{'comment'}; @@ -212,7 +213,7 @@ unless(-e $set{'base_html'}){ &makehtml; } if ($in{'addr'} =~ /$value/ || $in{'host'} =~ /$value/){ &error(101);} } - my @form = ($in{'comment'},$in{'orgname'},$in{'type'},$in{'dlkey'}); + my @form = ($in{'postname'},$in{'comment'},$in{'orgname'},$in{'type'},$in{'dlkey'}); foreach my $value (@form) { if (length($value) > 128) { $value = substr($value,0,128).'...'; } # $value =~ s/&/&/g; @@ -224,7 +225,7 @@ unless(-e $set{'base_html'}){ &makehtml; } $value =~ s/\t//g; $value =~ s/\0//g; } - ($in{'comment'},$in{'orgname'},$in{'type'},$in{'dlkey'}) = @form; + ($in{'postname'},$in{'comment'},$in{'orgname'},$in{'type'},$in{'dlkey'}) = @form; } @@ -321,7 +322,7 @@ if(!$in{'upfile'}){ &error(99); } # $in{'date'} = conv_date(time()); my @new; $new[0] = "$no<>$in{'addr'}<>$in{'time'}<>1\n"; - my $addlog = "$no<>$in{'ext'}<>$in{'date'}<>$in{'comment'}<>$in{'type'}<>$orgname<>$in{'addr'}<>$in{'host'}<>$in{'pass'},$userid<>$set{'file_pre'}<>$note<>1\n"; + my $addlog = "$no<>$in{'postname'}<>$in{'ext'}<>$in{'date'}<>$in{'comment'}<>$in{'type'}<>$orgname<>$in{'addr'}<>$in{'host'}<>$in{'pass'},$userid<>$set{'file_pre'}<>$note<>1\n"; $new[1] = $addlog; # open(OUT,">>./alllog.cgi"); print OUT $addlog; close(OUT); @@ -329,7 +330,7 @@ if(!$in{'upfile'}){ &error(99); } my $i = 2; foreach my $value (@log){ - my ($no,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$filepre,$note,$dummy) = split(/<>/,$value); + my ($no,$postname,$ext,$date,$comment,$mime,$orgname,$addr,$host,$pass,$filepre,$note,$dummy) = split(/<>/,$value); if(!$dummy){ $filepre = $set{'file_pre'};} $no = sprintf("%04d",$no); @@ -378,16 +379,16 @@ sub makehtml{ if($log == 1){ $log++; $init++;} my $lastpage = int(($log - 2)/$set{'pagelog'}) + 1; - $postval = ' obj.postkey.value = unescape(p[1]);' if($set{'post_flag'}); + $postval = ' obj.postkey.value = unescape(p[2]);' if($set{'post_flag'}); my $header =<<"EOM"; $set{'html_head'} \n|; + $cookiename = 'SN_UPLOAD'; $buff .= "\tkey0 = escape('$in{'postname'}'); key1 = escape('$in{'org_pass'}'); key2 = escape('$in{'postkey'}');\n";} + else{ $cookiename = 'SN_DEL'; $buff .= "\tkey0 = ''; key1 = escape('$in{'delpass'}'); key2 = '';\n"; } + $buff .= qq|\tdocument.cookie = "$cookiename="+key0+"<>"+key1+"<>"+key2+"; "+ tmp;\n}\n//-->\n\n|; } $buff .=<<"EOM";
@@ -619,7 +620,7 @@ $set{'html_head'}$set{'html_css'} EOM $buff .= leaddisp(0,1,1).'Upload Info |