".mysql_error()); while ($row4 = mysql_fetch_array($res4, MYSQL_ASSOC)){ if ($row4["cat1_D"]){ $temp_text .= $row4["cat1_D"]."<>" ; } } $sql4 = "SELECT cat2_D FROM data WHERE (cat2_A='製造カテゴリー') AND (public != 'N') " ; if ($v2){ $sql4 .= " AND (cat2_B='".$v2."') "; } if ($v3){ $sql4 .= " AND (cat2_C='".$v3."') "; } $sql4 .= " ; " ; $res4 = mysql_query($sql4, $conn) or die($sql4."
".mysql_error()); while ($row4 = mysql_fetch_array($res4, MYSQL_ASSOC)){ if ($row4["cat2_D"]){ $temp_text .= $row4["cat2_D"]."<>" ; } } $sql4 = "SELECT cat3_D FROM data WHERE (cat3_A='製造カテゴリー') AND (public != 'N') " ; if ($v2){ $sql4 .= " AND (cat3_B='".$v2."') "; } if ($v3){ $sql4 .= " AND (cat3_C='".$v3."') "; } $sql4 .= " ; " ; $res4 = mysql_query($sql4, $conn) or die($sql4."
".mysql_error()); while ($row4 = mysql_fetch_array($res4, MYSQL_ASSOC)){ if ($row4["cat3_D"]){ $temp_text .= $row4["cat3_D"]."<>" ; } } } else if ($mode=="syohin"){ $sql4 = "SELECT cat1_D FROM data WHERE (cat1_A='商品カテゴリー') AND (public != 'N') " ; if ($v2){ $sql4 .= " AND (cat1_B='".$v2."') "; } if ($v3){ $sql4 .= " AND (cat1_C='".$v3."') "; } $sql4 .= " ; " ; $res4 = mysql_query($sql4, $conn) or die($sql4."
".mysql_error()); while ($row4 = mysql_fetch_array($res4, MYSQL_ASSOC)){ if ($row4["cat1_D"]){ $temp_text .= $row4["cat1_D"]."<>" ; } } $sql4 = "SELECT cat2_D FROM data WHERE (cat2_A='商品カテゴリー') AND (public != 'N') " ; if ($v2){ $sql4 .= " AND (cat2_B='".$v2."') "; } if ($v3){ $sql4 .= " AND (cat2_C='".$v3."') "; } $sql4 .= " ; " ; $res4 = mysql_query($sql4, $conn) or die($sql4."
".mysql_error()); while ($row4 = mysql_fetch_array($res4, MYSQL_ASSOC)){ if ($row4["cat2_D"]){ $temp_text .= $row4["cat2_D"]."<>" ; } } $sql4 = "SELECT cat3_D FROM data WHERE (cat3_A='商品カテゴリー') AND (public != 'N') " ; if ($v2){ $sql4 .= " AND (cat3_B='".$v2."') "; } if ($v3){ $sql4 .= " AND (cat3_C='".$v3."') "; } $sql4 .= " ; " ; $res4 = mysql_query($sql4, $conn) or die($sql4."
".mysql_error()); while ($row4 = mysql_fetch_array($res4, MYSQL_ASSOC)){ if ($row4["cat3_D"]){ $temp_text .= $row4["cat3_D"]."<>" ; } } } else if ($mode=="sozai"){ $sql4 = "SELECT sozai1_C FROM data WHERE (public != 'N') " ; if ($v1){ $sql4 .= " WHERE (sozai1_A='".$v1."') "; } if (($v1)and($v2)){ $sql4 .= " AND (sozai1_B='".$v2."') "; } $sql4 .= " ; " ; $res4 = mysql_query($sql4, $conn) or die($sql4."
".mysql_error()); while ($row4 = mysql_fetch_array($res4, MYSQL_ASSOC)){ if ($row4["sozai1_C"]){ $temp_text .= $row4["sozai1_C"]."<>" ; } } $sql4 = "SELECT sozai2_C FROM data WHERE (public != 'N') " ; if ($v1){ $sql4 .= " WHERE (sozai2_A='".$v1."') "; } if (($v1)and($v2)){ $sql4 .= " AND (sozai2_B='".$v2."') "; } $sql4 .= " ; " ; $res4 = mysql_query($sql4, $conn) or die($sql4."
".mysql_error()); while ($row4 = mysql_fetch_array($res4, MYSQL_ASSOC)){ if ($row4["sozai2_C"]){ $temp_text .= $row4["sozai2_C"]."<>" ; } } $sql4 = "SELECT sozai3_C FROM data WHERE (public != 'N') " ; if ($v1){ $sql4 .= " WHERE (sozai3_A='".$v1."') "; } if (($v1)and($v2)){ $sql4 .= " AND (sozai3_B='".$v2."') "; } $sql4 .= " ; " ; $res4 = mysql_query($sql4, $conn) or die($sql4."
".mysql_error()); while ($row4 = mysql_fetch_array($res4, MYSQL_ASSOC)){ if ($row4["sozai3_C"]){ $temp_text .= $row4["sozai3_C"]."<>" ; } } } $temp_arr = explode("<>", $temp_text) ; $temp_arr = array_unique($temp_arr) ; $temp_arr = array_filter($temp_arr, "strlen"); // 空要素を除く $arr_cnt = count($temp_arr) ; if (($arr_cnt)and(!$v4)){ ?>
".mysql_error()); while ($row2 = mysql_fetch_array($res2, MYSQL_ASSOC)) { $selected_datasuu++ ; } $page = intval(htmlspecialchars($_GET["page"])) ; if (!$page){ $page = 0 ; } if (!$max) { $max = 12 ; } //最大表示数 //ページング $start = $page*$max ; $end = ($page+1)*$max ; if ($end > $selected_datasuu) { $end = $selected_datasuu ; } if ($max > 0){ $maisuu = ceil($selected_datasuu/$max) ; } $i = 0 ; $a = 0 ; $sql2 = "SELECT * FROM data WHERE (public != 'N') " ; if ($mode){ if (($mode=="cat")or($mode=="syohin")or(!$mode)){ if ($v1) { $sql2 .= " AND ((cat1_A = '".$v1."') or (cat2_A = '".$v1."') or (cat3_A = '".$v1."')) " ; } if (($v1)and($v2)){ $sql2 .= " AND ((cat1_B = '".$v2."') or (cat2_B = '".$v2."') or (cat3_B = '".$v2."')) " ; } if (($v1)and($v2)and($v3)){ $sql2 .= " AND ((cat1_C = '".$v3."') or (cat2_C = '".$v3."') or (cat3_C = '".$v3."')) " ; } if ($v4){ $sql2 .= " AND ((cat1_D = '".$v4."') or (cat2_D = '".$v4."') or (cat3_D = '".$v4."')) " ; } } else if ($mode=="sozai"){ if ($v1){ $sql2 .= " AND ((sozai1_A = '".$v1."') or (sozai2_A = '".$v1."') or (sozai3_A = '".$v1."')) " ; } if (($v1)and($v2)){ $sql2 .= " AND ((sozai1_B = '".$v2."') or (sozai2_B = '".$v2."') or (sozai3_B = '".$v2."')) " ; } if ($v3){ $sql2 .= " AND ((sozai1_C = '".$v3."') or (sozai2_C = '".$v3."') or (sozai3_C = '".$v3."')) " ; } } else if ($mode=="color"){ $sql2 .= " AND (color1 = '".$v1."') " ; } else if ($mode=="pref"){ $sql2 .= " AND (pref = ".intval($v1).") " ; } else if ($mode=="search"){ $sql2.= " AND ((cat1_A LIKE '%".$v1."%') or (cat1_B LIKE '%".$v1."%') or (cat1_C LIKE '%".$v1."%') or (cat1_D LIKE '%".$v1."%') or (cat2_A LIKE '%".$v1."%') or (cat2_B LIKE '%".$v1."%') or (cat2_C LIKE '%".$v1."%') or (cat2_D LIKE '%".$v1."%') or (cat3_A LIKE '%".$v1."%') or (cat3_B LIKE '%".$v1."%') or (cat3_C LIKE '%".$v1."%') or (cat3_D LIKE '%".$v1."%') or (sozai1_A LIKE '%".$v1."%') or (sozai1_B LIKE '%".$v1."%') or (sozai1_C LIKE '%".$v1."%') or (sozai2_A LIKE '%".$v1."%') or (sozai2_B LIKE '%".$v1."%') or (sozai2_C LIKE '%".$v1."%') or (sozai3_A LIKE '%".$v1."%') or (sozai3_B LIKE '%".$v1."%') or (sozai3_C LIKE '%".$v1."%') or (color1 LIKE '%".$v1."%') or (color2 LIKE '%".$v1."%') or (color3 LIKE '%".$v1."%') or (iEXP LIKE '%".$v1."%') or (iTITLE LIKE '%".$v1."%')) " ; } } $k = 0 ; if ($mode=="ranking"){ $sql2 .= " ORDER by view DESC, pubdate DESC, pubtime DESC LIMIT 0,12 ;" ; } else if ($mode=="fv"){ $sql2 .= " ORDER by good DESC, pubdate DESC, pubtime DESC LIMIT 0,12 ;" ; } else { $sql2 .= " ORDER by pubdate DESC, pubtime DESC LIMIT 0,12 ;" ; } $res2 = mysql_query($sql2, $conn) or die($sql2."
".mysql_error()); while ($row2 = mysql_fetch_array($res2, MYSQL_ASSOC)) { $k++; if ($k>3){ $k = 1 ; } if ($k == 3){ $addclass = " class=\"mr0\"" ; } else { $addclass = "" ; } $sql3= "SELECT cNAM FROM makers WHERE cID = '".$row2["cID"]."' ; " ; $res3 = mysql_query($sql3, $conn) or die($sql2."
".mysql_error()); $row3 = mysql_fetch_array($res3, MYSQL_ASSOC) ; $this_fv = $row2["iNAM"]." " ; if (strstr($fv_rireki,$this_fv)){ $fvicon = "" ; } else { $fvicon = "" ; } $pvicon = "" ; $this_number = str_replace($row2["cID"]."_","",$row2["iNAM"]) ; $sword = $v1 ; if ($v2){ $sword = $sword."/".$v2 ; } if ($v3){ $sword = $sword."/".$v3 ; } if ($v4){ $sword = $sword."/".$v4 ; } ?>