/*━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
システム名:
イーアウトレット リスト
開発着手日:
2008年6月12日木曜日
開発変更日:
2010年7月14日水曜日
阪口:分類対応
2015年11月18日水曜日
奥澤:分類を10個まで追加
2015年11月30日月曜日
奥澤:並び替え部分レイアウト変更
奥澤:在庫切れにsold out表示
開発者:
有限会社ネオクリエイツ 大野
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━*/
/*━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
基本設定
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━*/
require('inq.php'); //inq読み込み
require('config.php'); //config読み込み
$db_table = 'g_goods'; //データベーステーブル名
/*━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
タイトル
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━*/
//キーワード処理
if($_POST['search_word']){
$search_word = $_POST['search_word'];
}elseif($_GET['search_word']){
$search_word = $_GET['search_word'];
}
mb_detect_order("EUC-JP,UTF-8,ASCII");
if(mb_detect_encoding($search_word) != "UTF-8"){
$search_word = mb_convert_encoding($search_word, "UTF-8", "EUC-JP");
}
if($search_word){
$page_title = "検索結果"; //タイトル
}else{
if($_GET[series]){
//シリーズ内に分類が登録されているか
$sql_select = "select g_series_select_1 from `g_series` where `g_series_code`='".$_GET['series']."'";
$res_select = mysql_query($sql_select);
$select_flag == '';
while($data_select = mysql_fetch_array($res_select)){
$data_select = output_check($data_select);
if($data_select['g_series_select_1'] != ""){
$select_flag += 1;
}
}
//シリーズ内の商品に高級素材があるか
$sql_highclass = "select g_goods_highclass,g_goods_head_flag from `".$db_table."` where `g_goods_highclass`='1' and `g_goods_series`='".$_GET['series']."' and `g_goods_head_flag`='1'";
$res_highclass = mysql_query($sql_highclass);
if(mysql_num_rows($res_highclass) > 0){
$highclass_flag = "1";
}
if($_GET['select']){
if($_GET['select'] == "1"){
$series_select_ary = $series_select1_ary;
}elseif($_GET['select'] == "2"){
$series_select_ary = $series_select2_ary;
}elseif($_GET['select'] == "3"){
$series_select_ary = $series_select3_ary;
}elseif($_GET['select'] == "4"){
$series_select_ary = $series_select4_ary;
}elseif($_GET['select'] == "5"){
$series_select_ary = $series_select5_ary;
}elseif($_GET['select'] == "6"){
$series_select_ary = $series_select6_ary;
}elseif($_GET['select'] == "7"){
$series_select_ary = $series_select7_ary;
}elseif($_GET['select'] == "8"){
$series_select_ary = $series_select8_ary;
}elseif($_GET['select'] == "9"){
$series_select_ary = $series_select9_ary;
}elseif($_GET['select'] == "10"){
$series_select_ary = $series_select10_ary;
}
$sub_title = $series_select_ary[$_GET['series']];
}elseif($_GET['highclass'] && $highclass_flag == "1"){
$sub_title = "高級素材";
}
$page_title = $series_code_ary[$_GET['series']] . " " . $sub_title; //タイトル
$page_keywords = $series_code_ary[$_GET['series']].",激安,格安,ブランド,最新作";//meta name="keywords"に入れる文字列
if($sub_title){
$page_keywords .= "," . $sub_title;
}
$page_description = "エルメス・シャネル・ルイ ヴィトンならお任せください!エルメス(バーキン・ケリー)、ルイヴィトン、シャネルは高価買取り、委託販売も!".$series_code_ary[$_GET['series']] . " " . $sub_title; //meta name="description"に入れる文字列
$page_header = "エルメス・シャネル・ルイ ヴィトンならお任せください!".$series_code_ary[$_GET['series']] . " " . $sub_title; //ヘッダーに入れる文字列
}elseif($_GET['brand']){
$page_title = $brand_code_ary[$_GET['brand']]; //タイトル
$page_keywords = $brand_code_ary[$_GET['brand']].",激安,格安,ブランド,最新作"; //meta name="keywords"に入れる文字列
$page_description = "エルメス・シャネル・ルイ ヴィトンならお任せください!".$brand_code_ary[$_GET['brand']]; //meta name="description"に入れる文字列
$page_header = "エルメス・シャネル・ルイ ヴィトンならお任せください!".$brand_code_ary[$_GET['brand']]; //ヘッダーに入れる文字列
}
}
require('header.php'); //ヘッダー読み込み
//分類絞り込み表示用
$select_ary =array(
"1" => "g_series_select_1",
"2" => "g_series_select_2",
"3" => "g_series_select_3",
"4" => "g_series_select_4",
"5" => "g_series_select_5",
"6" => "g_series_select_6",
"7" => "g_series_select_7",
"8" => "g_series_select_8",
"9" => "g_series_select_9",
"10" => "g_series_select_10"
);
//分類絞り込み後の表示用
if($_GET['select'] == "1"){
$turn_code = "g_turn_no1";
}elseif($_GET['select'] == "2"){
$turn_code = "g_turn_no2";
}elseif($_GET['select'] == "3"){
$turn_code = "g_turn_no3";
}elseif($_GET['select'] == "4"){
$turn_code = "g_turn_no4";
}elseif($_GET['select'] == "5"){
$turn_code = "g_turn_no5";
}elseif($_GET['select'] == "6"){
$turn_code = "g_turn_no6";
}elseif($_GET['select'] == "7"){
$turn_code = "g_turn_no7";
}elseif($_GET['select'] == "8"){
$turn_code = "g_turn_no8";
}elseif($_GET['select'] == "9"){
$turn_code = "g_turn_no9";
}elseif($_GET['select'] == "10"){
$turn_code = "g_turn_no10";
}else{
$turn_code = "g_turn_no1";
}
//改ページ用変数
$page_limit = 45; //1ページに表示する件数
if($_POST['page_start'] > 0){$page_start = $_POST['page_start'];}
elseif($_GET['page_start'] > 0){$page_start = $_GET['page_start'];}
else{$page_start = 0;}
/*━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
データを取得
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━*/
//データベースから商品データを得--------------------------------------
$sql = "select * from `".$db_table."` inner join `g_turn` on g_goods.`g_goods_select` = g_turn.`" . $turn_code . "` where g_goods.`g_goods_head_flag`=1";
if($_GET['brand']){
$sql .= " and g_goods.`g_goods_brand`='".$_GET['brand']."'";
$next_page_name = "brand_".$_GET['brand'];
}
if($_GET['series']){
$sql .= " and g_goods.`g_goods_series`='".$_GET['series']."'";
$next_page_name = "series_".$_GET['series'];
}
if($_GET['item']){
$sql .= " and g_goods.`g_goods_item`='".$_GET['item']."'";
$next_page_name = "item_".$_GET['item'];
}
//キーワード
$search_word = mb_convert_kana($search_word,"s");//全角スペースを半角に
if($search_word != ""){
$search_word_ary = split("\ ",$search_word);
foreach($search_word_ary as $value){
$sql .= " and (g_goods.`g_goods_keyword` like '%". $value."%' or g_goods.`g_goods_name` like '%". $value."%')";
}
}
if($_GET['select']){
$sql .= " order by g_turn.`g_turn_turn`,g_goods.`g_goods_turn`";
}elseif($_GET['highclass']){
$sql .= " order by g_goods.`g_goods_highclass` desc,g_goods.`g_goods_turn`";
}else{
$sql .= " order by g_goods.`g_goods_turn`";
}
$page_sql = $sql;
$sql .= " limit ".$page_start.",".$page_limit."" ;
$res = mysql_query($sql);
if($res == False){
$err[] = $sql . "アクセスエラー
大変申し訳ございませんが
しばらくしてから再度アクセスしてください";
}
?>
/*--ここからcontents--*/?>
/*/ヘッダーメニュー*/?>
/*--メッセージ--*/?>
if($err){
message(join("
",$err));
line();
}else{
?>
/*パン屑リンク*/?>
トップ
if($_GET['brand']){
?>
>
}
if($_GET['series']){
?> > >
}
if($_GET['item']){
?> >
}
?> |
|
/*/パン屑リンク*/?>
if($_GET['series']){
if($select_flag || $highclass_flag == "1"){
?>
|
foreach($select_ary as $select_key => $select_value){
$sql_list_series = "select * from `g_series` where `g_series_code` = '" . $_GET['series'] . "' order by `g_series_turn`";
$res_list_series = mysql_query($sql_list_series);
while($data_list_series = mysql_fetch_array($res_list_series)){
$data_list_series = output_check($data_list_series);
if($data_list_series[$select_value]){
?>|
}
}
}
if($highclass_flag == "1"){
?>高級素材|
}
?> |
}
}
?>
page();
?>
if(mysql_num_rows($res) > 0){
$i=0;
while($data = mysql_fetch_array($res)){
$data = output_check($data);
if($data['g_goods_select'] == "1"){
$series_select_ary = $series_select1_ary;
}elseif($data['g_goods_select'] == "2"){
$series_select_ary = $series_select2_ary;
}elseif($data['g_goods_select'] == "3"){
$series_select_ary = $series_select3_ary;
}elseif($data['g_goods_select'] == "4"){
$series_select_ary = $series_select4_ary;
}elseif($data['g_goods_select'] == "5"){
$series_select_ary = $series_select5_ary;
}elseif($data['g_goods_select'] == "6"){
$series_select_ary = $series_select6_ary;
}elseif($data['g_goods_select'] == "7"){
$series_select_ary = $series_select7_ary;
}elseif($data['g_goods_select'] == "8"){
$series_select_ary = $series_select8_ary;
}elseif($data['g_goods_select'] == "9"){
$series_select_ary = $series_select9_ary;
}elseif($data['g_goods_select'] == "10"){
$series_select_ary = $series_select10_ary;
}
if($_GET['select'] && ($g_goods_select != $data['g_goods_select'])){
if($data['g_goods_select'] != "0"){
$i=0;
?>
|
}else{
$i=0;
?>
|
}
}elseif($_GET['highclass'] && ($g_goods_highclass != $data['g_goods_highclass'])){
if($data['g_goods_highclass'] == "1"){
$i=0;
?>
|
}else{
$i=0;
?>
|
}
}
if($i == 0){print "";}
?>
if(is_file("photo/".$data['g_goods_code']."_1s.jpg")){
?>
}else{
?>
}
if($data['g_goods_again'] == 1){
?>
}
?>
if($data['g_goods_fixed']){
?>参考上代¥0
}
?> 販売価格¥0
if($data['g_goods_stock'] < "1" && $data['g_goods_stock2'] < "1" && $data['g_goods_stock3'] < "1" && $data['g_goods_stock4'] < "1" && $data['g_goods_stock5'] < "1"){//在庫切れの場合
?> sold out
}elseif($data['g_goods_talk_flag'] =="1"){
?> 商談中
}
?>
|
$i++;
if(($i == "3")){
?>
$i=0;
}
$g_goods_select = $data['g_goods_select'];
$g_goods_highclass = $data['g_goods_highclass'];
}
if($i != 0){
for($i = $i;$i < 3;$i++){
?> |
}
?>
}
}else{
?>現在、該当する商品がございません |
}
?>
|
page();
}
require("footer.php");
?>