묻고답하기
게시판과 슬라이드와의 연결고리
2017.06.01 13:21
<link href="./phpApplications/contentTouchSlider/css/font-awesome.min.css" rel="stylesheet" />
<link href="./phpApplications/contentTouchSlider/css/swiper.min.css" rel="stylesheet" />
<link href="./phpApplications/contentTouchSlider/css/style.css" rel="stylesheet" />
<?php
/* connection */
require './files/config/db.config.php';
$hostName = $db_info->master_db[db_hostname];
$userId = $db_info->master_db[db_userid];
$userPw = $db_info->master_db[db_password];
$dataBase = $db_info->master_db[db_database];
mysql_connect($hostName, $userId, $userPw) or die('something wrong');
mysql_select_db($dataBase);
mysql_query('SET NAMES utf8');
/* ����� ���� */
$module_srl = 12473;
?>
<div class="contentImageSlider swiper-container">
<div class="contentSlideWrapper swiper-wrapper">
<?php
$query = "SELECT F.* FROM `xe_files` F INNER JOIN xe_document_extra_vars E ON (E.document_srl = F.upload_target_srl) WHERE F.module_srl = $module_srl AND E.value = 'ON'
ORDER BY F.upload_target_srl DESC";
$result = mysql_query($query);
$imageNumber = 0;
while($row = mysql_fetch_array($result)){
$document_srl = $row['upload_target_srl'];
$link = mysql_query("SELECT value FROM xe_document_extra_vars WHERE document_srl = $document_srl AND eid = 'link'");
$link_result = mysql_fetch_row($link);
$imageUrl = $row['uploaded_filename'];
if($link_result)
echo '<div class="image'.$imageNumber.' contentSlide swiper-slide"><a href="'.$link_result[0].'" target="_blank"><img src="'.$imageUrl.'" style="width:100%; "/></a></div>';
else
echo '<div class="image'.$imageNumber.' contentSlide swiper-slide"><img src="'.$imageUrl.'" style="width:100%;"/></div>';
$imageNumber++;
}
?>
<!--
<div class="image1 contentSlide swiper-slide"><img src="/m.layouts/firstglory_m/images/20170517m.png" style="width:100%;"/></div>
<div class="image1 contentSlide swiper-slide"><img src="/m.layouts/firstglory_m/images/20170510m.jpg" style="width:100%;"/></div>
<div class="image1 contentSlide swiper-slide"><img src="/m.layouts/firstglory_m/images/20170510_2m.jpg" style="width:100%;"/></div>
<div class="image1 contentSlide swiper-slide"><img src="/m.layouts/firstglory_m/images/fm_170207_2.jpg" style="width:100%;"/></div>
<div class="image1 contentSlide swiper-slide"><img src="/m.layouts/firstglory_m/images/fm_161229_1.jpg" style="width:100%;"/></div>
<div class="image9 contentSlide swiper-slide"><img src="/m.layouts/firstglory_m/images/mm2.png" style="width:100%;"/></div
-->
</div>
<span class="swiper-button-prev leftIndicator indicator">
</span>
<span class="swiper-button-next rightIndicator indicator">
</span>
<div class="swiper-pagination" style="display:none; position: relative; bottom: 0px; background: #fff; height: 50px; padding-top: 20px;"></div>
</div>
<script src="./phpApplications/contentTouchSlider/js/swiper.js"></script>
<script src="./phpApplications/contentTouchSlider/js/script.js"></script>
<script>
function getInternetExplorerVersion() {
var rv = -1; // Return value assumes failure.
if (navigator.appName == 'Microsoft Internet Explorer') {
var ua = navigator.userAgent;
var re = new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
if (re.exec(ua) != null)
rv = parseFloat(RegExp.$1);
}
return rv;
}
if(getInternetExplorerVersion() >= 6 && getInternetExplorerVersion() <= 9){
var swiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination',
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
paginationClickable: true,
loop: true,
spaceBetween: 30,
centeredSlides: true,
autoplay: 4200,
autoplayDisableOnInteraction: false
});
jQuery('.swiper-pagination').hide();
}
else{
var swiper = new Swiper('.swiper-container', {
pagination: '.swiper-pagination',
nextButton: '.swiper-button-next',
prevButton: '.swiper-button-prev',
paginationClickable: true,
loop: false,
spaceBetween: 30,
centeredSlides: true,
autoplay: 4200,
autoplayDisableOnInteraction: false
});
}
</script>
- [2020/12/16] 묻고답하기 footer 하단에 고정하려면 어딜 수정해야 할까요?
- [2020/01/31] 묻고답하기 2단메뉴 *2
- [2019/10/10] 묻고답하기 cafe24 XE3 STEP 3 단계에서 에러가 발생합니다. *3
- [2019/03/27] 묻고답하기 모바일에서만 '권한이 없습니다'가 나오는 이유가 궁금합니다. *1
- [2019/03/15] 포럼 웹 에이전시 디스케이션에서 레이아웃 템플릿 판매 개시했습니다. *2