THE WELBECK GALLERY

CONTROLHOMETHE WELBECK GALLERYDIARYPRODUCTSSHOPPING CONTACT


'.$ls.' '; if ($br == "") { $sql = "SELECT * FROM blog WHERE bl_elements = '$ls' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574' ORDER BY bl_date DESC"; $url = 'life_style.php?ls='.$enc_ls; } else { $sql = "SELECT * FROM blog WHERE bl_elements = '$ls' AND bl_brand = '$br' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574' ORDER BY bl_date DESC"; $url = 'life_style.php?ls='.$enc_ls.'&br='.$enc_br; } $result = $db->query($sql); $allcnt = $result->numrows(); if ($os > 0) { $bos = $os - $limit; print 'BACK'; } else { print 'BACK'; } $nowos = $os / $limit + 1; $maxos = ceil($allcnt / $limit); print ' < '.$nowos.'/'.$maxos.' >'; if ($allcnt > $os + $limit) { $nos = $os + $limit; print 'NEXT'; } else { print 'NEXT'; } print '


BRAND:
'; $sql = "SELECT bl_brand FROM blog WHERE bl_brand != '' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574' GROUP BY bl_brand ORDER BY lower(bl_brand)"; $result = $db->query($sql); while($row = $result->fetchrow()) { $bl_brand = $row[0]; $sql = "SELECT bl_elements FROM blog WHERE bl_brand = '$bl_brand' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574'"; $result2 = $db->query($sql); $ct = $result2->numrows(); print ''.$row[0].'('.$ct.')
'; } print '
LIFE STYLE ELEMENTS:
'; $sql = "SELECT bl_elements FROM blog WHERE bl_elements != '' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574' GROUP BY bl_elements ORDER BY bl_elements"; $result = $db->query($sql); while($row = $result->fetchrow()) { $bl_elements = $row[0]; $sql = "SELECT bl_brand FROM blog WHERE bl_elements = '$bl_elements' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574'"; $result2 = $db->query($sql); $ct = $result2->numrows(); print ''.$row[0].'('.$ct.')
'; if ($bl_elements == $ls) { // ブランド一覧 $sql = "SELECT bl_brand FROM blog WHERE bl_elements = '$bl_elements' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574' GROUP BY bl_brand ORDER BY bl_brand"; $result2 = $db->query($sql); while($row2 = $result2->fetchrow()) { $bl_brand = $row2[0]; $sql = "SELECT bl_brand FROM blog WHERE bl_elements = '$bl_elements' AND bl_brand = '$bl_brand' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574'"; $result3 = $db->query($sql); $ct2 = $result3->numrows(); print '└'.$bl_brand.'('.$ct2.')
'; } } } print '



GOVERNORの商品説明追記

'; // 最新FEEDBACK写真3件 $sql = "SELECT fb_title,fb_id,bl_id FROM feedback ORDER BY fb_date DESC"; $result = $db->query($sql); $c = 0; while($row = $result->fetchrow()) { $fb_title = $row[0]; $fb_id = $row[1]; $bl_id = $row[2]; $imagefile = "fb_img/".$fb_id.".1.jpg"; if (file_exists($imagefile)) { $size = GetImageSize($imagefile); $width = $size[0]; $height = $size[1]; if ($width > 180) { $height = (int)(180 / $width * $height); $width = 180; } print '
'.$fb_title.'


'; $c ++; } if ($c == 3) { break; } } print '
'.$ls.'
'; // ブランド一覧 $sql = "SELECT bl_brand FROM blog WHERE bl_elements = '$ls' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574' GROUP BY bl_brand ORDER BY bl_brand"; $result2 = $db->query($sql); while($row2 = $result2->fetchrow()) { $bl_brand = $row2[0]; $sql = "SELECT bl_brand FROM blog WHERE bl_elements = '$ls' AND bl_brand = '$bl_brand' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574'"; $result3 = $db->query($sql); $ct2 = $result3->numrows(); print '└'.$bl_brand.'('.$ct2.') '; } print '
'; // 5件まで表示 if ($br == "") { $sql = "SELECT * FROM blog WHERE bl_elements = '$ls' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574' ORDER BY bl_date DESC LIMIT $limit OFFSET $os"; } else { $sql = "SELECT * FROM blog WHERE bl_elements = '$ls' AND bl_brand = '$br' AND bl_ct_id = 'd71bd8a0b6a6aa54edba64547c91a574' ORDER BY bl_date DESC LIMIT $limit OFFSET $os"; } $result = $db->query($sql); while($row = $result->fetchrow()) { $bl_id = $row[0]; $bl_brand = $row[3]; $bl_title = $row[5]; $bl_text = $row[6]; print '

'; $imagefile = "../blog/blog_img/".$bl_id.".jpg"; if (file_exists($imagefile)) { $size = GetImageSize($imagefile); $width = $size[0]; $height = $size[1]; if ($width > 180) { $height = (int)(180 / $width * $height); $width = 180; } print ''; } print ' '.ereg_replace("\r\n|\r|\n" , "
" , mb_substr($bl_text , 0 ,100)).'
.....商品詳細ページ



'; } print '
'; if ($os > 0) { $bos = $os - $limit; print 'BACK'; } else { print 'BACK'; } $nowos = $os / $limit + 1; $maxos = ceil($allcnt / $limit); print ' < '.$nowos.'/'.$maxos.' >'; if ($allcnt > $os + $limit) { $nos = $os + $limit; print 'NEXT'; } else { print 'NEXT'; } print '
'; ?>