‘S‘‰·òƒT[ƒ`

‰·ò‚Ù‚¢‚Ù‚¢


ZŠ –¼‘O

ZŠA–¼‘OAòŽ¿AŒø”\‚©‚猟õ‚Å‚«‚Ü‚·B

"; exit; } $rtn = mysql_query("SET NAMES utf8" , $my_con); mysql_select_db("hsu0266",$my_con); if($result=mysql_query("select * from onsen where names like '%$kate%' and jusyo like '$area%' and jusyo like '%$jusyo%' and names like '%$keyword%' and kounou like '%$kounou%'")){ $num = mysql_num_rows($result); if ($next){ mysql_data_seek($result,$next); } else { $next = 0; } $p_vew = $num - $next; if ($p_vew > 20){ $p_vew = $next + 20; } else { $p_vew = $next + $p_vew; } # if ($num - $next)$p_vew = $next if ($num){ $s_vew = (${next}+1); if ($s_vew < $p_vew){ # print "
${num}Œ’†".(${next}+1)."`${p_vew}Œ–ڂ̃f[ƒ^‚ð•\\Ž¦‚µ‚Ä‚¢‚Ü‚·B

\n"; print "${num}Œ’†${s_vew}`${p_vew}Œ–ڂ̃f[ƒ^‚ð•\Ž¦‚µ‚Ä‚¢‚Ü‚·B

\n"; } else { print "${num}Œ’†${p_vew}Œ–ڂ̃f[ƒ^‚ð•\Ž¦‚µ‚Ä‚¢‚Ü‚·B

\n"; } } else { print "ŠY“–‚·‚éƒf[ƒ^‚Í‚ ‚è‚Ü‚¹‚ñB

\n"; } print "
\n"; print "\n"; # if ($next){ mysql_data_seek($result,$next); } # while($row=mysql_fetch_array($result)){ for ($i = 0;$i < 20;$i++){ $row=mysql_fetch_array($result); if ($row){ # $row["kounou"] = Exec("echo $row[kounou] | nkf -s"); # $row["jusyo"] = Exec("echo $row[jusyo] | nkf -s"); # $row["names"] = Exec("echo $row[names] | nkf -s"); # $row["ondo"] = Exec("echo $row[ondo] | nkf -s"); # $row["syokai"] = Exec("echo $row[syokai] | nkf -s"); $row["kounou"] = mb_convert_encoding($row[kounou], "SJIS", "UTF-8"); $row["jusyo"] = mb_convert_encoding($row[jusyo], "SJIS", "UTF-8"); $row["names"] = mb_convert_encoding( $row[names], "SJIS", "UTF-8"); $row["ondo"] = mb_convert_encoding($row[ondo], "SJIS", "UTF-8"); $row["syokai"] = mb_convert_encoding($row[syokai], "SJIS", "UTF-8"); $row["names"] = ereg_replace (" ","
",$row["names"]); $row["tel"] = ereg_replace ("\(Tel","",$row["tel"]); $row["tel"] = ereg_replace ("\)","",$row["tel"]); # $row["kounou"] = ereg_replace ("\[","",$row["kounou"]); # $row["kounou"] = ereg_replace ("\]","",$row["kounou"]); $row["syokai"] = ereg_replace ("\n","",$row["syokai"]); # if ($i == 10){ print "

\n"; } if ($i == 0 || $i == 10){ print "\n"; } print ""; print "\n"; } } $next = $next + 20; } if (!$result){ print ""; } $date = date("Y/m/d H:i:s"); $log = fopen("onsen.log","a"); flock($log,2); fwrite($log,"$kate $area $jusyo $kounou $keyword\t$date\n"); flock($log,3); fclose($log); #} else { # print ""; } print "
‰·ò–¼òŽ¿‰·“xZŠTELŒø”\
"; print $row["jusyo"]; print " target=_blank>"; # print $row["no"]; # print ""; print $row["names"]; print ""; # print ""; print $row["ondo"]; print ""; print $row["jusyo"]; print ""; print $row["tel"]; if ($row["syokai"] != ''){ print "("; print $row["syokai"]; print ")"; } print ""; # print substr($row["zi"],0,3); # print "$keyword"; # print "-"; # print substr($row["zi"],3,4); print ""; print $row["kounou"]; # print ""; print "
ŠY“–‚·‚éƒf[ƒ^‚Í‚ ‚è‚Ü‚¹‚ñB
ðŒ‚ð•Ï‚¦‚ÄŒŸõ‚µ‚Ă݂ĉº‚³‚¢B
f—ÉȖڂƓs“¹•{Œ§‚Í•K{‚Å‚·B
"; print "

"; # $kate = Exec("echo $kate | nkf -s"); # $area = Exec("echo $area | nkf -s"); # $jusyo = Exec("echo $jusyo | nkf -s"); # $kounou = Exec("echo $kounou | nkf -s"); # $keyword = Exec("echo $keyword | nkf -s"); $keyword = mb_convert_encoding($keyword, "SJIS" , "UTF-8"); $kate = mb_convert_encoding($kate, "SJIS" , "UTF-8"); $area = mb_convert_encoding($area, "SJIS" , "UTF-8"); $jusyo = mb_convert_encoding($jusyo, "SJIS" , "UTF-8"); $kounou = mb_convert_encoding($kounou, "SJIS" , "UTF-8"); if($next < $num){ $n_set = ($num - $next); $p_set = ($next - 40); print "

"; if($p_set >= 0){ print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; # print " \n"; } if ($n_set > 21){ $n_set = 20; } print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
"; } ?>

Onsen hoihoi PHP by ‚±‚Þ