有限会社住宅設備

Construction Case施工事例

屋根・外壁・外構リフォーム
#!/usr/bin/perl ## ݒ # ̃t@C $self = 'job.cgi'; $self2 = 'whats_new/user/search2.cgi'; # ʐ^ꍇ̉摜 $nophoto = '../photo/printing.gif'; # ev[giꗗ\ʁj $html1 = '../html/list3.html'; # ev[giڍו\ʁj $html2 = '../html/details.html'; ## Cũ[h require '../lib/jcode.pl'; require '../lib/stdio.pl'; require '../lib/sub.pl'; require '../lib/setup.pl'; &setup; &get_date; ## f[^擾inbVɊi[j %param = (); @keys = stdio::getFormData(\%param, "", "SJIS", ";", ""); ## JeSڕ\ @cate_viewname = &cate_viewname(); #************************************************************************************************** [h (Ȃ) if(!$param{'mode'}){ ## f[^t@CI[v @dbdatafile = &fileopen($data_file); ## ̏ stdio::trString(\$param{'ps1'}, "", 1, 1); $param{'ps1'} =~ s/\D//g; stdio::trString(\$param{'ps2'}, "", 1, 1); $param{'ps2'} =~ s/\D//g; stdio::trString(\$param{'madori'}, "", 1, 1); ## foreach(@dbdatafile){ if($_ eq $dbdatafile[0]){ next; } chomp; @dbdata1 = split(/<>/); # fڋ if($dbdata1[19] ne 1){ next; } # JeSP if($param{'category1'}){ @cate1 = split(/;/, $param{'category1'}); $cate1flag = ''; foreach(@cate1){ if($dbdata1[1] eq $_){ $cate1flag = 1; } } if(!$cate1flag){ next; } } # V if($param{'new'}){ if($dbdata1[17] ne '1'){ next; } } # [h if($param{'word'}){ $word = $_; stdio::trString(\$word, "", 1); # ׂ̈ɏɒu stdio::trString(\$param{'word'}, "", 1); # ׂ̈ɏɒu if(!stdio::searchString($word, $param{'word'})){ next; } } if($dbdata1[22] eq ""){ $dbdata1[22] = 0; }else{ $dbdata1[22] = $dbdata1[22]; } # $sorthash{$dbdata1[22],$dbdata1[0]} = $_; } ## \[g foreach $key (sort {$a cmp $b} (keys %sorthash)) { push(@searchdata,$sorthash{$key}); } ## e[uo if($searchdata[0] ne ''){ $p = $param{'p'}; $p2 = $param{'p'} + 1; if($p > 0){ $ppg = "?p=$p"; }else{ $ppg = ""; } foreach(1 .. 100){ if(!$searchdata[$p]){ next; } @dbdata2 = split(/<>/, $searchdata[$p]); $dbdata2[16] =~ s/<//g; $dbdata2[45] =~ s/<//g; $mojisu = length($dbdata2[21]); $mojisu2 = length($dbdata2[16]); $mojisu2 = length($dbdata2[45]); $mojisu_max = $title_seigen; if($mojisu > $mojisu_max){ $seigen2 = substr($dbdata2[21], 0,$title_seigen).'...'; }else{ $seigen2 = $dbdata2[21]; } if($mojisu2 > $kiji_seigen){ $seigen3 = substr($dbdata2[16], 0,$kiji_seigen).'...@@@ǂ'; }else{ $seigen3 = $dbdata2[16]; } $td_color = $td_color eq $td_color1? $td_color2: $td_color1; # ʐ^PCQCR $photo1j = $photo_dir.$dbdata2[0]."_1.jpg"; $photo2j = $photo_dir.$dbdata2[0]."_2.jpg"; $photo1j2 = $photo_dir2.$dbdata2[0]."_1.jpg"; $photo2j2 = $photo_dir2.$dbdata2[0]."_2.jpg"; if(-e $photo1j2){ $phototag1 = qq||; } else{ $phototag1 = qq||; } if(-e $photo2j2){ $phototag2 = qq||; } else{ $phototag2 = qq||; } if($dbdata2[45] eq ""){ $table .= qq|
$dbdata2[21]
$dbdata2[16]
$phototag1
$phototag2
|; }else{ $table .= qq| $dbdata2[21] $dbdata2[16] $dbdata2[45] |; } $p++; } } else{ $table = qq| f[^͌‚܂łB |; } ## N foreach(@keys){ if($_ eq 'p'){ next; } else{ push(@param,"$_=$param{$_}"); } } $param = join("&", @param); if($param{'p'}){ $mae = $param{'p'} - $max_cnt; $link_tmp1 = qq|O$max_cnt|; push(@link, $link_tmp1); } if($p < $#searchdata + 1){ $ato = $param{'p'} + $max_cnt; $link_tmp2 = qq|$max_cnt|; push(@link, $link_tmp2); } $link = join("@", @link); ## ev[gI[v @datafile = &fileopen($html1); ## chb^Ou $kensuu = $#searchdata + 1; foreach(@datafile){ s/_%key1%_/$setdata[3]/g; s/_%key2%_/$setdata[4]/g; s/_%table%_/$table/g; s/_%copyright%_/$copyright/g; s/_%table_width%_/$table_width/g; s/_%category_viewname1%_/$cate_viewname[1]/g; s/_%link%_/$link/g; s/_%img_dir%_/$img_dir/g; $htmlfile .= $_; } ## gslko $htmlfile = jcode::utf8($htmlfile); print <<"EOF"; Content-type: text/html $htmlfile EOF exit; } # [h (wȂ) ܂ #************************************************************************************************** [h (view) if($param{'mode'} eq 'view'){ ## ڃf[^t@CI[v @setdata = &fileopen($setdata); ## f[^t@CI[v @dbdatafile = &fileopen($data_file); ## f[^Zbg foreach(@dbdatafile){ if($_ eq $dbdatafile[0]){ next; } @dbdata1 = split(/<>/); if($dbdata1[0] eq $param{'num'}){ last; } } # ʐ^PCQCR $photo1j = $photo_dir.$dbdata1[0]."_1.jpg"; $photo1g = $photo_dir.$dbdata1[0]."_1.gif"; $photo2j = $photo_dir.$dbdata1[0]."_2.jpg"; $photo2g = $photo_dir.$dbdata1[0]."_2.gif"; $photo3j = $photo_dir.$dbdata1[0]."_3.jpg"; $photo3g = $photo_dir.$dbdata1[0]."_3.gif"; $photo1j2 = $photo_dir2.$dbdata1[0]."_1.jpg"; $photo1g2 = $photo_dir2.$dbdata1[0]."_1.gif"; $photo2j2 = $photo_dir2.$dbdata1[0]."_2.jpg"; $photo2g2 = $photo_dir2.$dbdata1[0]."_2.gif"; $photo3j2 = $photo_dir2.$dbdata1[0]."_3.jpg"; $photo3g2 = $photo_dir2.$dbdata1[0]."_3.gif"; if(-e $photo1j2){ $phototag1 = qq||; } elsif(-e $photo1g2){ $phototag1 = qq||; } else{ $phototag1 = qq||; } if(-e $photo2j2){ $phototag2 = qq||; } elsif(-e $photo2g2){ $phototag2 = qq||; } else{ $phototag2 = qq||; } if(-e $photo3j2){ $phototag3 = qq||; } elsif(-e $photo3g2){ $phototag3 = qq||; } else{ $phototag3 = qq||; } ## ev[gI[v @datafile = &fileopen($html2); ## chb^Ou foreach(@datafile){ $tmp = $_; foreach(1 .. 20){ $tmp2 = $_ + 3; $tmp3 = $_ + 19; $val = $dbdata1[$tmp3]; #$val = stdio::setComma($val); $tmp =~ s/_%key$_%_/$setdata[$tmp2]/g; $tmp =~ s/_%val$_%_/$val/g; } $_ = $tmp; s/_%photo_dir%_/$photo_dir/g; s/_%num%_/$dbdata1[0]/g; s/_%category1%_/$dbdata1[1]/g; s/_%note1%_/$dbdata1[16]/g; s/_%phototag1%_/$phototag1/g; s/_%phototag2%_/$phototag2/g; s/_%phototag3%_/$phototag3/g; s/_%copyright%_/$copyright/g; $tmp = $_; foreach(1 .. 24){ $tmp =~ s/_%setsubi_name$_%_/$setsubi_name[$_]/g; } $_ = $tmp; s/_%category_viewname1%_/$cate_viewname[1]/g; s/_%date%_/$year/g; s/_%img_dir%_/$img_dir/g; $htmlfile .= $_; } ## gslko $htmlfile = jcode::utf8($htmlfile); print <<"EOF"; Content-type: text/html $htmlfile EOF exit; } # [h (view) ܂
内装リフォーム
#!/usr/bin/perl ## ݒ # ̃t@C $self = 'job.cgi'; $self2 = 'whats_new/user/search2.cgi'; # ʐ^ꍇ̉摜 $nophoto = '../photo/printing.gif'; # ev[giꗗ\ʁj $html1 = '../html/list3.html'; # ev[giڍו\ʁj $html2 = '../html/details.html'; ## Cũ[h require '../lib/jcode.pl'; require '../lib/stdio.pl'; require '../lib/sub.pl'; require '../lib/setup.pl'; &setup; &get_date; ## f[^擾inbVɊi[j %param = (); @keys = stdio::getFormData(\%param, "", "SJIS", ";", ""); ## JeSڕ\ @cate_viewname = &cate_viewname(); #************************************************************************************************** [h (Ȃ) if(!$param{'mode'}){ ## f[^t@CI[v @dbdatafile = &fileopen($data_file); ## ̏ stdio::trString(\$param{'ps1'}, "", 1, 1); $param{'ps1'} =~ s/\D//g; stdio::trString(\$param{'ps2'}, "", 1, 1); $param{'ps2'} =~ s/\D//g; stdio::trString(\$param{'madori'}, "", 1, 1); ## foreach(@dbdatafile){ if($_ eq $dbdatafile[0]){ next; } chomp; @dbdata1 = split(/<>/); # fڋ if($dbdata1[19] ne 1){ next; } # JeSP if($param{'category1'}){ @cate1 = split(/;/, $param{'category1'}); $cate1flag = ''; foreach(@cate1){ if($dbdata1[1] eq $_){ $cate1flag = 1; } } if(!$cate1flag){ next; } } # V if($param{'new'}){ if($dbdata1[17] ne '1'){ next; } } # [h if($param{'word'}){ $word = $_; stdio::trString(\$word, "", 1); # ׂ̈ɏɒu stdio::trString(\$param{'word'}, "", 1); # ׂ̈ɏɒu if(!stdio::searchString($word, $param{'word'})){ next; } } if($dbdata1[22] eq ""){ $dbdata1[22] = 0; }else{ $dbdata1[22] = $dbdata1[22]; } # $sorthash{$dbdata1[22],$dbdata1[0]} = $_; } ## \[g foreach $key (sort {$a cmp $b} (keys %sorthash)) { push(@searchdata,$sorthash{$key}); } ## e[uo if($searchdata[0] ne ''){ $p = $param{'p'}; $p2 = $param{'p'} + 1; if($p > 0){ $ppg = "?p=$p"; }else{ $ppg = ""; } foreach(1 .. 100){ if(!$searchdata[$p]){ next; } @dbdata2 = split(/<>/, $searchdata[$p]); $dbdata2[16] =~ s/<//g; $dbdata2[45] =~ s/<//g; $mojisu = length($dbdata2[21]); $mojisu2 = length($dbdata2[16]); $mojisu2 = length($dbdata2[45]); $mojisu_max = $title_seigen; if($mojisu > $mojisu_max){ $seigen2 = substr($dbdata2[21], 0,$title_seigen).'...'; }else{ $seigen2 = $dbdata2[21]; } if($mojisu2 > $kiji_seigen){ $seigen3 = substr($dbdata2[16], 0,$kiji_seigen).'...@@@ǂ'; }else{ $seigen3 = $dbdata2[16]; } $td_color = $td_color eq $td_color1? $td_color2: $td_color1; # ʐ^PCQCR $photo1j = $photo_dir.$dbdata2[0]."_1.jpg"; $photo2j = $photo_dir.$dbdata2[0]."_2.jpg"; $photo1j2 = $photo_dir2.$dbdata2[0]."_1.jpg"; $photo2j2 = $photo_dir2.$dbdata2[0]."_2.jpg"; if(-e $photo1j2){ $phototag1 = qq||; } else{ $phototag1 = qq||; } if(-e $photo2j2){ $phototag2 = qq||; } else{ $phototag2 = qq||; } if($dbdata2[45] eq ""){ $table .= qq|
$dbdata2[21]
$dbdata2[16]
$phototag1
$phototag2
|; }else{ $table .= qq| $dbdata2[21] $dbdata2[16] $dbdata2[45] |; } $p++; } } else{ $table = qq| f[^͌‚܂łB |; } ## N foreach(@keys){ if($_ eq 'p'){ next; } else{ push(@param,"$_=$param{$_}"); } } $param = join("&", @param); if($param{'p'}){ $mae = $param{'p'} - $max_cnt; $link_tmp1 = qq|O$max_cnt|; push(@link, $link_tmp1); } if($p < $#searchdata + 1){ $ato = $param{'p'} + $max_cnt; $link_tmp2 = qq|$max_cnt|; push(@link, $link_tmp2); } $link = join("@", @link); ## ev[gI[v @datafile = &fileopen($html1); ## chb^Ou $kensuu = $#searchdata + 1; foreach(@datafile){ s/_%key1%_/$setdata[3]/g; s/_%key2%_/$setdata[4]/g; s/_%table%_/$table/g; s/_%copyright%_/$copyright/g; s/_%table_width%_/$table_width/g; s/_%category_viewname1%_/$cate_viewname[1]/g; s/_%link%_/$link/g; s/_%img_dir%_/$img_dir/g; $htmlfile .= $_; } ## gslko $htmlfile = jcode::utf8($htmlfile); print <<"EOF"; Content-type: text/html $htmlfile EOF exit; } # [h (wȂ) ܂ #************************************************************************************************** [h (view) if($param{'mode'} eq 'view'){ ## ڃf[^t@CI[v @setdata = &fileopen($setdata); ## f[^t@CI[v @dbdatafile = &fileopen($data_file); ## f[^Zbg foreach(@dbdatafile){ if($_ eq $dbdatafile[0]){ next; } @dbdata1 = split(/<>/); if($dbdata1[0] eq $param{'num'}){ last; } } # ʐ^PCQCR $photo1j = $photo_dir.$dbdata1[0]."_1.jpg"; $photo1g = $photo_dir.$dbdata1[0]."_1.gif"; $photo2j = $photo_dir.$dbdata1[0]."_2.jpg"; $photo2g = $photo_dir.$dbdata1[0]."_2.gif"; $photo3j = $photo_dir.$dbdata1[0]."_3.jpg"; $photo3g = $photo_dir.$dbdata1[0]."_3.gif"; $photo1j2 = $photo_dir2.$dbdata1[0]."_1.jpg"; $photo1g2 = $photo_dir2.$dbdata1[0]."_1.gif"; $photo2j2 = $photo_dir2.$dbdata1[0]."_2.jpg"; $photo2g2 = $photo_dir2.$dbdata1[0]."_2.gif"; $photo3j2 = $photo_dir2.$dbdata1[0]."_3.jpg"; $photo3g2 = $photo_dir2.$dbdata1[0]."_3.gif"; if(-e $photo1j2){ $phototag1 = qq||; } elsif(-e $photo1g2){ $phototag1 = qq||; } else{ $phototag1 = qq||; } if(-e $photo2j2){ $phototag2 = qq||; } elsif(-e $photo2g2){ $phototag2 = qq||; } else{ $phototag2 = qq||; } if(-e $photo3j2){ $phototag3 = qq||; } elsif(-e $photo3g2){ $phototag3 = qq||; } else{ $phototag3 = qq||; } ## ev[gI[v @datafile = &fileopen($html2); ## chb^Ou foreach(@datafile){ $tmp = $_; foreach(1 .. 20){ $tmp2 = $_ + 3; $tmp3 = $_ + 19; $val = $dbdata1[$tmp3]; #$val = stdio::setComma($val); $tmp =~ s/_%key$_%_/$setdata[$tmp2]/g; $tmp =~ s/_%val$_%_/$val/g; } $_ = $tmp; s/_%photo_dir%_/$photo_dir/g; s/_%num%_/$dbdata1[0]/g; s/_%category1%_/$dbdata1[1]/g; s/_%note1%_/$dbdata1[16]/g; s/_%phototag1%_/$phototag1/g; s/_%phototag2%_/$phototag2/g; s/_%phototag3%_/$phototag3/g; s/_%copyright%_/$copyright/g; $tmp = $_; foreach(1 .. 24){ $tmp =~ s/_%setsubi_name$_%_/$setsubi_name[$_]/g; } $_ = $tmp; s/_%category_viewname1%_/$cate_viewname[1]/g; s/_%date%_/$year/g; s/_%img_dir%_/$img_dir/g; $htmlfile .= $_; } ## gslko $htmlfile = jcode::utf8($htmlfile); print <<"EOF"; Content-type: text/html $htmlfile EOF exit; } # [h (view) ܂
水廻りリフォーム
#!/usr/bin/perl ## ݒ # ̃t@C $self = 'job.cgi'; $self2 = 'whats_new/user/search2.cgi'; # ʐ^ꍇ̉摜 $nophoto = '../photo/printing.gif'; # ev[giꗗ\ʁj $html1 = '../html/list3.html'; # ev[giڍו\ʁj $html2 = '../html/details.html'; ## Cũ[h require '../lib/jcode.pl'; require '../lib/stdio.pl'; require '../lib/sub.pl'; require '../lib/setup.pl'; &setup; &get_date; ## f[^擾inbVɊi[j %param = (); @keys = stdio::getFormData(\%param, "", "SJIS", ";", ""); ## JeSڕ\ @cate_viewname = &cate_viewname(); #************************************************************************************************** [h (Ȃ) if(!$param{'mode'}){ ## f[^t@CI[v @dbdatafile = &fileopen($data_file); ## ̏ stdio::trString(\$param{'ps1'}, "", 1, 1); $param{'ps1'} =~ s/\D//g; stdio::trString(\$param{'ps2'}, "", 1, 1); $param{'ps2'} =~ s/\D//g; stdio::trString(\$param{'madori'}, "", 1, 1); ## foreach(@dbdatafile){ if($_ eq $dbdatafile[0]){ next; } chomp; @dbdata1 = split(/<>/); # fڋ if($dbdata1[19] ne 1){ next; } # JeSP if($param{'category1'}){ @cate1 = split(/;/, $param{'category1'}); $cate1flag = ''; foreach(@cate1){ if($dbdata1[1] eq $_){ $cate1flag = 1; } } if(!$cate1flag){ next; } } # V if($param{'new'}){ if($dbdata1[17] ne '1'){ next; } } # [h if($param{'word'}){ $word = $_; stdio::trString(\$word, "", 1); # ׂ̈ɏɒu stdio::trString(\$param{'word'}, "", 1); # ׂ̈ɏɒu if(!stdio::searchString($word, $param{'word'})){ next; } } if($dbdata1[22] eq ""){ $dbdata1[22] = 0; }else{ $dbdata1[22] = $dbdata1[22]; } # $sorthash{$dbdata1[22],$dbdata1[0]} = $_; } ## \[g foreach $key (sort {$a cmp $b} (keys %sorthash)) { push(@searchdata,$sorthash{$key}); } ## e[uo if($searchdata[0] ne ''){ $p = $param{'p'}; $p2 = $param{'p'} + 1; if($p > 0){ $ppg = "?p=$p"; }else{ $ppg = ""; } foreach(1 .. 100){ if(!$searchdata[$p]){ next; } @dbdata2 = split(/<>/, $searchdata[$p]); $dbdata2[16] =~ s/<//g; $dbdata2[45] =~ s/<//g; $mojisu = length($dbdata2[21]); $mojisu2 = length($dbdata2[16]); $mojisu2 = length($dbdata2[45]); $mojisu_max = $title_seigen; if($mojisu > $mojisu_max){ $seigen2 = substr($dbdata2[21], 0,$title_seigen).'...'; }else{ $seigen2 = $dbdata2[21]; } if($mojisu2 > $kiji_seigen){ $seigen3 = substr($dbdata2[16], 0,$kiji_seigen).'...@@@ǂ'; }else{ $seigen3 = $dbdata2[16]; } $td_color = $td_color eq $td_color1? $td_color2: $td_color1; # ʐ^PCQCR $photo1j = $photo_dir.$dbdata2[0]."_1.jpg"; $photo2j = $photo_dir.$dbdata2[0]."_2.jpg"; $photo1j2 = $photo_dir2.$dbdata2[0]."_1.jpg"; $photo2j2 = $photo_dir2.$dbdata2[0]."_2.jpg"; if(-e $photo1j2){ $phototag1 = qq||; } else{ $phototag1 = qq||; } if(-e $photo2j2){ $phototag2 = qq||; } else{ $phototag2 = qq||; } if($dbdata2[45] eq ""){ $table .= qq|
$dbdata2[21]
$dbdata2[16]
$phototag1
$phototag2
|; }else{ $table .= qq| $dbdata2[21] $dbdata2[16] $dbdata2[45] |; } $p++; } } else{ $table = qq| f[^͌‚܂łB |; } ## N foreach(@keys){ if($_ eq 'p'){ next; } else{ push(@param,"$_=$param{$_}"); } } $param = join("&", @param); if($param{'p'}){ $mae = $param{'p'} - $max_cnt; $link_tmp1 = qq|O$max_cnt|; push(@link, $link_tmp1); } if($p < $#searchdata + 1){ $ato = $param{'p'} + $max_cnt; $link_tmp2 = qq|$max_cnt|; push(@link, $link_tmp2); } $link = join("@", @link); ## ev[gI[v @datafile = &fileopen($html1); ## chb^Ou $kensuu = $#searchdata + 1; foreach(@datafile){ s/_%key1%_/$setdata[3]/g; s/_%key2%_/$setdata[4]/g; s/_%table%_/$table/g; s/_%copyright%_/$copyright/g; s/_%table_width%_/$table_width/g; s/_%category_viewname1%_/$cate_viewname[1]/g; s/_%link%_/$link/g; s/_%img_dir%_/$img_dir/g; $htmlfile .= $_; } ## gslko $htmlfile = jcode::utf8($htmlfile); print <<"EOF"; Content-type: text/html $htmlfile EOF exit; } # [h (wȂ) ܂ #************************************************************************************************** [h (view) if($param{'mode'} eq 'view'){ ## ڃf[^t@CI[v @setdata = &fileopen($setdata); ## f[^t@CI[v @dbdatafile = &fileopen($data_file); ## f[^Zbg foreach(@dbdatafile){ if($_ eq $dbdatafile[0]){ next; } @dbdata1 = split(/<>/); if($dbdata1[0] eq $param{'num'}){ last; } } # ʐ^PCQCR $photo1j = $photo_dir.$dbdata1[0]."_1.jpg"; $photo1g = $photo_dir.$dbdata1[0]."_1.gif"; $photo2j = $photo_dir.$dbdata1[0]."_2.jpg"; $photo2g = $photo_dir.$dbdata1[0]."_2.gif"; $photo3j = $photo_dir.$dbdata1[0]."_3.jpg"; $photo3g = $photo_dir.$dbdata1[0]."_3.gif"; $photo1j2 = $photo_dir2.$dbdata1[0]."_1.jpg"; $photo1g2 = $photo_dir2.$dbdata1[0]."_1.gif"; $photo2j2 = $photo_dir2.$dbdata1[0]."_2.jpg"; $photo2g2 = $photo_dir2.$dbdata1[0]."_2.gif"; $photo3j2 = $photo_dir2.$dbdata1[0]."_3.jpg"; $photo3g2 = $photo_dir2.$dbdata1[0]."_3.gif"; if(-e $photo1j2){ $phototag1 = qq||; } elsif(-e $photo1g2){ $phototag1 = qq||; } else{ $phototag1 = qq||; } if(-e $photo2j2){ $phototag2 = qq||; } elsif(-e $photo2g2){ $phototag2 = qq||; } else{ $phototag2 = qq||; } if(-e $photo3j2){ $phototag3 = qq||; } elsif(-e $photo3g2){ $phototag3 = qq||; } else{ $phototag3 = qq||; } ## ev[gI[v @datafile = &fileopen($html2); ## chb^Ou foreach(@datafile){ $tmp = $_; foreach(1 .. 20){ $tmp2 = $_ + 3; $tmp3 = $_ + 19; $val = $dbdata1[$tmp3]; #$val = stdio::setComma($val); $tmp =~ s/_%key$_%_/$setdata[$tmp2]/g; $tmp =~ s/_%val$_%_/$val/g; } $_ = $tmp; s/_%photo_dir%_/$photo_dir/g; s/_%num%_/$dbdata1[0]/g; s/_%category1%_/$dbdata1[1]/g; s/_%note1%_/$dbdata1[16]/g; s/_%phototag1%_/$phototag1/g; s/_%phototag2%_/$phototag2/g; s/_%phototag3%_/$phototag3/g; s/_%copyright%_/$copyright/g; $tmp = $_; foreach(1 .. 24){ $tmp =~ s/_%setsubi_name$_%_/$setsubi_name[$_]/g; } $_ = $tmp; s/_%category_viewname1%_/$cate_viewname[1]/g; s/_%date%_/$year/g; s/_%img_dir%_/$img_dir/g; $htmlfile .= $_; } ## gslko $htmlfile = jcode::utf8($htmlfile); print <<"EOF"; Content-type: text/html $htmlfile EOF exit; } # [h (view) ܂
店舗改修
#!/usr/bin/perl ## ݒ # ̃t@C $self = 'job.cgi'; $self2 = 'whats_new/user/search2.cgi'; # ʐ^ꍇ̉摜 $nophoto = '../photo/printing.gif'; # ev[giꗗ\ʁj $html1 = '../html/list3.html'; # ev[giڍו\ʁj $html2 = '../html/details.html'; ## Cũ[h require '../lib/jcode.pl'; require '../lib/stdio.pl'; require '../lib/sub.pl'; require '../lib/setup.pl'; &setup; &get_date; ## f[^擾inbVɊi[j %param = (); @keys = stdio::getFormData(\%param, "", "SJIS", ";", ""); ## JeSڕ\ @cate_viewname = &cate_viewname(); #************************************************************************************************** [h (Ȃ) if(!$param{'mode'}){ ## f[^t@CI[v @dbdatafile = &fileopen($data_file); ## ̏ stdio::trString(\$param{'ps1'}, "", 1, 1); $param{'ps1'} =~ s/\D//g; stdio::trString(\$param{'ps2'}, "", 1, 1); $param{'ps2'} =~ s/\D//g; stdio::trString(\$param{'madori'}, "", 1, 1); ## foreach(@dbdatafile){ if($_ eq $dbdatafile[0]){ next; } chomp; @dbdata1 = split(/<>/); # fڋ if($dbdata1[19] ne 1){ next; } # JeSP if($param{'category1'}){ @cate1 = split(/;/, $param{'category1'}); $cate1flag = ''; foreach(@cate1){ if($dbdata1[1] eq $_){ $cate1flag = 1; } } if(!$cate1flag){ next; } } # V if($param{'new'}){ if($dbdata1[17] ne '1'){ next; } } # [h if($param{'word'}){ $word = $_; stdio::trString(\$word, "", 1); # ׂ̈ɏɒu stdio::trString(\$param{'word'}, "", 1); # ׂ̈ɏɒu if(!stdio::searchString($word, $param{'word'})){ next; } } if($dbdata1[22] eq ""){ $dbdata1[22] = 0; }else{ $dbdata1[22] = $dbdata1[22]; } # $sorthash{$dbdata1[22],$dbdata1[0]} = $_; } ## \[g foreach $key (sort {$a cmp $b} (keys %sorthash)) { push(@searchdata,$sorthash{$key}); } ## e[uo if($searchdata[0] ne ''){ $p = $param{'p'}; $p2 = $param{'p'} + 1; if($p > 0){ $ppg = "?p=$p"; }else{ $ppg = ""; } foreach(1 .. 100){ if(!$searchdata[$p]){ next; } @dbdata2 = split(/<>/, $searchdata[$p]); $dbdata2[16] =~ s/<//g; $dbdata2[45] =~ s/<//g; $mojisu = length($dbdata2[21]); $mojisu2 = length($dbdata2[16]); $mojisu2 = length($dbdata2[45]); $mojisu_max = $title_seigen; if($mojisu > $mojisu_max){ $seigen2 = substr($dbdata2[21], 0,$title_seigen).'...'; }else{ $seigen2 = $dbdata2[21]; } if($mojisu2 > $kiji_seigen){ $seigen3 = substr($dbdata2[16], 0,$kiji_seigen).'...@@@ǂ'; }else{ $seigen3 = $dbdata2[16]; } $td_color = $td_color eq $td_color1? $td_color2: $td_color1; # ʐ^PCQCR $photo1j = $photo_dir.$dbdata2[0]."_1.jpg"; $photo2j = $photo_dir.$dbdata2[0]."_2.jpg"; $photo1j2 = $photo_dir2.$dbdata2[0]."_1.jpg"; $photo2j2 = $photo_dir2.$dbdata2[0]."_2.jpg"; if(-e $photo1j2){ $phototag1 = qq||; } else{ $phototag1 = qq||; } if(-e $photo2j2){ $phototag2 = qq||; } else{ $phototag2 = qq||; } if($dbdata2[45] eq ""){ $table .= qq|
$dbdata2[21]
$dbdata2[16]
$phototag1
$phototag2
|; }else{ $table .= qq| $dbdata2[21] $dbdata2[16] $dbdata2[45] |; } $p++; } } else{ $table = qq| f[^͌‚܂łB |; } ## N foreach(@keys){ if($_ eq 'p'){ next; } else{ push(@param,"$_=$param{$_}"); } } $param = join("&", @param); if($param{'p'}){ $mae = $param{'p'} - $max_cnt; $link_tmp1 = qq|O$max_cnt|; push(@link, $link_tmp1); } if($p < $#searchdata + 1){ $ato = $param{'p'} + $max_cnt; $link_tmp2 = qq|$max_cnt|; push(@link, $link_tmp2); } $link = join("@", @link); ## ev[gI[v @datafile = &fileopen($html1); ## chb^Ou $kensuu = $#searchdata + 1; foreach(@datafile){ s/_%key1%_/$setdata[3]/g; s/_%key2%_/$setdata[4]/g; s/_%table%_/$table/g; s/_%copyright%_/$copyright/g; s/_%table_width%_/$table_width/g; s/_%category_viewname1%_/$cate_viewname[1]/g; s/_%link%_/$link/g; s/_%img_dir%_/$img_dir/g; $htmlfile .= $_; } ## gslko $htmlfile = jcode::utf8($htmlfile); print <<"EOF"; Content-type: text/html $htmlfile EOF exit; } # [h (wȂ) ܂ #************************************************************************************************** [h (view) if($param{'mode'} eq 'view'){ ## ڃf[^t@CI[v @setdata = &fileopen($setdata); ## f[^t@CI[v @dbdatafile = &fileopen($data_file); ## f[^Zbg foreach(@dbdatafile){ if($_ eq $dbdatafile[0]){ next; } @dbdata1 = split(/<>/); if($dbdata1[0] eq $param{'num'}){ last; } } # ʐ^PCQCR $photo1j = $photo_dir.$dbdata1[0]."_1.jpg"; $photo1g = $photo_dir.$dbdata1[0]."_1.gif"; $photo2j = $photo_dir.$dbdata1[0]."_2.jpg"; $photo2g = $photo_dir.$dbdata1[0]."_2.gif"; $photo3j = $photo_dir.$dbdata1[0]."_3.jpg"; $photo3g = $photo_dir.$dbdata1[0]."_3.gif"; $photo1j2 = $photo_dir2.$dbdata1[0]."_1.jpg"; $photo1g2 = $photo_dir2.$dbdata1[0]."_1.gif"; $photo2j2 = $photo_dir2.$dbdata1[0]."_2.jpg"; $photo2g2 = $photo_dir2.$dbdata1[0]."_2.gif"; $photo3j2 = $photo_dir2.$dbdata1[0]."_3.jpg"; $photo3g2 = $photo_dir2.$dbdata1[0]."_3.gif"; if(-e $photo1j2){ $phototag1 = qq||; } elsif(-e $photo1g2){ $phototag1 = qq||; } else{ $phototag1 = qq||; } if(-e $photo2j2){ $phototag2 = qq||; } elsif(-e $photo2g2){ $phototag2 = qq||; } else{ $phototag2 = qq||; } if(-e $photo3j2){ $phototag3 = qq||; } elsif(-e $photo3g2){ $phototag3 = qq||; } else{ $phototag3 = qq||; } ## ev[gI[v @datafile = &fileopen($html2); ## chb^Ou foreach(@datafile){ $tmp = $_; foreach(1 .. 20){ $tmp2 = $_ + 3; $tmp3 = $_ + 19; $val = $dbdata1[$tmp3]; #$val = stdio::setComma($val); $tmp =~ s/_%key$_%_/$setdata[$tmp2]/g; $tmp =~ s/_%val$_%_/$val/g; } $_ = $tmp; s/_%photo_dir%_/$photo_dir/g; s/_%num%_/$dbdata1[0]/g; s/_%category1%_/$dbdata1[1]/g; s/_%note1%_/$dbdata1[16]/g; s/_%phototag1%_/$phototag1/g; s/_%phototag2%_/$phototag2/g; s/_%phototag3%_/$phototag3/g; s/_%copyright%_/$copyright/g; $tmp = $_; foreach(1 .. 24){ $tmp =~ s/_%setsubi_name$_%_/$setsubi_name[$_]/g; } $_ = $tmp; s/_%category_viewname1%_/$cate_viewname[1]/g; s/_%date%_/$year/g; s/_%img_dir%_/$img_dir/g; $htmlfile .= $_; } ## gslko $htmlfile = jcode::utf8($htmlfile); print <<"EOF"; Content-type: text/html $htmlfile EOF exit; } # [h (view) ܂

ご不明点はお気軽にお問い合わせ下さい。

ご不明な点はお気軽にお問い合わせ下さい。