焼酎
#!/usr/local/bin/perl
# Copyright (C) 2015 All right reserved by HITz Total System
require "cgi-lib.pl";
&ReadParse;
while(($key,$val) = each(%in)) {
$$key = $val;
}
# 検索ページの表示
$cnt = 0;
$i = 0;
undef @clm_kbn;
undef @clm_00;
undef @clm_01;
undef @clm_02;
undef @clm_03;
undef @clm_04;
undef @clm_07;
undef @clm_11;
undef @clm_22;
undef @clm_47;
if(open(IFILE,"shohin.csv")) {
while() {
chomp();
@column = split(/,/);
if($ct == 0){
$bk_kbn = substr($column[1], 0, 1);
if($column[4] == 1 && $bk_kbn eq $kbn){
$cnt ++;
$clm_kbn[$cnt] = substr($column[1], 0, 1);
$clm_00[$cnt] = $column[0];
$clm_01[$cnt] = $column[1];
$clm_02[$cnt] = $column[2];
$clm_03[$cnt] = $column[3];
$clm_04[$cnt] = $column[4];
$clm_07[$cnt] = $column[7];
$clm_11[$cnt] = $column[11];
$clm_22[$cnt] = $column[22];
$clm_47[$cnt] = $column[47];
}
}elsif($ct == 1){
$bk_kbn = substr($column[1], 0, 4);
if($column[4] == 1 && $bk_kbn eq $kbn){
$cnt ++;
$clm_kbn[$cnt] = substr($column[1], 0, 1);
$clm_00[$cnt] = $column[0];
$clm_01[$cnt] = $column[1];
$clm_02[$cnt] = $column[2];
$clm_03[$cnt] = $column[3];
$clm_04[$cnt] = $column[4];
$clm_07[$cnt] = $column[7];
$clm_11[$cnt] = $column[11];
$clm_22[$cnt] = $column[22];
$clm_47[$cnt] = $column[47];
}
}else{
if($column[4] == 1 && $column[22] == 1){
$cnt ++;
$clm_kbn[$cnt] = substr($column[1], 0, 1);
$clm_00[$cnt] = $column[0];
$clm_01[$cnt] = $column[1];
$clm_02[$cnt] = $column[2];
$clm_03[$cnt] = $column[3];
$clm_04[$cnt] = $column[4];
$clm_07[$cnt] = $column[7];
$clm_11[$cnt] = $column[11];
$clm_22[$cnt] = $column[22];
$clm_47[$cnt] = $column[47];
}
}
}
close(IFILE);
}
if($cnt > 0){
for ( $i=1; $i<=$cnt; $i++) {
print qq!
!;
}
}
$clm_02[$i]
価格: $clm_11[$i]円 (税込) !; if($clm_kbn[$i] eq "E"){ print qq! 産地: $clm_07[$i] !; } print qq! 在庫: |