Viewing file: portfolio.php (12.16 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<? include 'index_Include.php'; $_SESSION['page'] = 'portfolio.php';
if (isset($_GET[portfolio_id])&&trim($_GET[portfolio_id])) { $portfolio_id = trim($_GET[portfolio_id]); $portfolio_SL = " SELECT * FROM portfolio WHERE portfolio_id = '$portfolio_id'"; $portfolio_QR = mysqli_query($con,$portfolio_SL); $portfolio = mysqli_fetch_array($portfolio_QR); $portfolio_name = $portfolio[portfolio_name]; ?> <!DOCTYPE html> <html lang='en'> <head> <title> <? echo $portfolio[portfolio_name]; ?> </title> <meta name="keywords" content=" <? echo $portfolio[portfolio_name]; ?>"> <meta name="description" content=" <? echo $portfolio[portfolio_detail]; ?> "> <meta name="author" content=" <? echo $portfolio[portfolio_name]; ?>"> <? include 'index_head.php'; ?>
<meta property="og:image" content="http://<? echo $fixed[fixed_website]; ?>/Files/portfolio_photo/<? echo $portfolio[portfolio_photo]; ?>" /> <meta property="og:title" content="<? echo $portfolio[portfolio_name]; ?>" /> <meta property="og:description"content="<? echo $portfolio[portfolio_detail]; ?>"/> </head> <body> <? include 'index_navbar.php'; ?> <div style="background-color: #f0f0f0;"> <div class="container between20"> <div class="row"> <div class="col-md-12 text-center"> <span class="page-topic color1 "> <? echo $portfolio[portfolio_name]; ?> </span> </div> </div> </div> </div> <div class="container between20"> <div class="row"> <div class="col-md-8"> <div class="row margintop15"> <div class="col-md-12"> <img class="full " src="Files/portfolio_photo/<?php echo $portfolio[portfolio_photo]; ?>" > <p class="page-topic color1 margintop15"> <? echo $portfolio[portfolio_detail]; ?> </p> <? $salesteam_SL = " SELECT * FROM salesteam WHERE salesteam_id = '$portfolio[salesteam_id]'"; $salesteam_QR = mysqli_query($con,$salesteam_SL); $salesteam = mysqli_fetch_array($salesteam_QR); if (!isset($salesteam[salesteam_id])||$salesteam[salesteam_id]=='') { ?>
<? } else{ ?> <p class="page-topic color2 margintop15"> <? echo "ผลงานของ : "; echo $salesteam[salesteam_name]; ?> </p> <? } ?> </div> </div>
<div class="row"> <div class="col-md-12 Review"> <?php echo $portfolio[portfolio_review]; ?> </div> </div> <div class="row "> <div class="col-md-12 top-margin3"> <? $Specification_SL = " SELECT * FROM Specification WHERE SpecificationCode = 'portfolio_id$portfolio[portfolio_id]' ORDER BY SpecificationID ASC"; $Specification_QR = mysqli_query($con,$Specification_SL); while ($Specification = mysqli_fetch_array($Specification_QR)) { ?> <? if (isset($Specification[SpecificationPhoto])&&trim($Specification[SpecificationPhoto])!='') { ?> <div class="margintop30"> <img src="Files/SpecificationPhoto/<?php echo $Specification[SpecificationPhoto]; ?>" class="full" /> </div> <? } ?> <? if (isset($Specification[SpecificationReview])&&trim($Specification[SpecificationReview])!='') { ?> <div class="margintop30"> <?php echo $Specification[SpecificationReview]; ?> </div> <? } ?> <? if (isset($Specification[SpecificationYoutube])&&trim($Specification[SpecificationYoutube])!='') { ?> <div class="margintop30"> <div class="embed-responsive embed-responsive-16by9"> <iframe src="<?php echo $Specification['SpecificationYoutube']; ?>?rel=0&controls=0&showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe> </div> </div> <? } ?> <? if (isset($Specification[SpecificationFacebook])&&trim($Specification[SpecificationFacebook])!='') { ?> <div class="margintop30"> <div class="embed-responsive embed-responsive-16by9"> <iframe src="https://www.facebook.com/plugins/video.php?href=<?php echo $Specification['SpecificationFacebook']; ?>&show_text=0&width=269" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true" allowFullScreen="true"></iframe> </div> </div> <? } ?> <? } ?> </div> </div> <div class="row "> <? $portfolio_picture_SL = " SELECT * FROM portfolio_picture WHERE portfolio_id = '$_SESSION[portfolio_id]' ORDER BY portfolio_picture_id ASC"; $portfolio_picture_QR = mysqli_query($con,$portfolio_picture_SL); $portfolio_picture_Row = mysqli_num_rows($portfolio_picture_QR);
if (isset($portfolio_picture_Row)&&$portfolio_picture_Row!=0) {
$portfolio_picture_SL = " SELECT * FROM portfolio_picture WHERE portfolio_id = '$_SESSION[portfolio_id]' ORDER BY portfolio_picture_id ASC"; $portfolio_picture_QR = mysqli_query($con,$portfolio_picture_SL); $Ac_i=1; $portfolio_pictureActive = 1; while ($portfolio_picture = mysqli_fetch_array($portfolio_picture_QR)) { ?> <div class="col-md-12 margintop30"> <img class="full" src="Files/portfolio_picture_photo/<?php echo $portfolio_picture[portfolio_picture_photo]; ?>" > </div> <? } } ?> </div>
<div class="margintop15"> <div class="row"> <div class="col-md-12"> <p class="page-topic"> ผลงานอื่นๆ </p> </div> </div> <? $portfolio_SL = " SELECT * FROM portfolio WHERE portfolio_id != '$portfolio_id' ORDER BY RAND() LIMIT 2"; $portfolio_QR = mysqli_query($con,$portfolio_SL); $Ac_i=1; while ($portfolio = mysqli_fetch_array($portfolio_QR)) { if ($Ac_i==1) { ?> <div class="row"> <? } ?> <div class="col-md-8"> <? include 'index_panel_portfolio.php'; ?> </div> <? if ($Ac_i==1) { $Ac_i=0; ?> </div> <? } $Ac_i++; } if ($Ac_i!=1) { echo "</div>"; } ?> </div>
</div> <!-- 9 --> <div class="col-md-4"> <div class="row"> <div class="col-md-12"> <div class="row"> <div class="col-md-12 paddingbottom15"> <div class="col-md-12 boxsha"> <p class="font1 size20 margintop15"> สนใจสอบถามรายละเอียด </p> <? $social_SL = " SELECT * FROM social ORDER BY social_id ASC "; $social_QR = mysqli_query($con,$social_SL); while ($social = mysqli_fetch_array($social_QR)) { ?> <p class="hide1" title="<?php echo $social[social_name]; ?>"> <? if (isset($social[social_link])&&$social[social_link]!='') {
if ($social[social_type]=='Tel') { ?> <a style="text-align: left;" class="padding5 size17 text-black" href="tel:<?php echo $social[social_link]; ?>" target="_blank"> <? if (isset($social[social_photo])&&$social[social_photo]!='') { ?> <img style="max-height:28px;" src="Files/social_photo/<?php echo $social[social_photo]; ?>" /> <? } else{ echo $social[social_type]." : "; } ?> <?php echo $social[social_name]; ?> </a> <? } else{ ?> <a style="text-align: left;" class="padding5 size17 text-black" href="http://<?php echo $social[social_link]; ?>" target="_blank"> <? if (isset($social[social_photo])&&$social[social_photo]!='') { ?> <img style="max-height:28px;" src="Files/social_photo/<?php echo $social[social_photo]; ?>" /> <? } else{ echo $social[social_type]." : "; } ?> <?php echo $social[social_name]; ?> </a> <? } } else{ ?> <a style="text-align: left;" class="padding5 size17 text-black"> <? if (isset($social[social_photo])&&$social[social_photo]!='') { ?> <img style="max-height:28px;" src="Files/social_photo/<?php echo $social[social_photo]; ?>" /> <? } else{ echo $social[social_type]." : "; } ?> <?php echo $social[social_name]; ?> </a> <? } ?> </p> <? } ?> </div> </div> </div> </div> </div> </div> </div> <div class="row hidden-sm hidden-xs" > <div class="col-md-4"> <ul class="breadcrumb no-radius" style="margin-bottom: 0px;"> <li><a href="index.php">หน้าแรก</a></li> <li><a href="portfolio.php"> ผลงาน </a></li> <li class="active"> <?php echo $portfolio_name; ?> </li> </ul> </div> </div> </div> <!-- container --> <? include 'index_footer.php'; ?> </body> </html> <?
} else{
$Q = 1; $Row = "SELECT * FROM portfolio ";
$RowQuery = mysqli_query($con,$Row); $Num_Rows = mysqli_num_rows($RowQuery);
$Per_page = 20; $page = $_GET["page"]; if(!$_GET["page"]){ $page=1; } $Prev_page = $page-1; $Next_page = $page+1; $page_Start = (($Per_page*$page)-$Per_page); if($Num_Rows<=$Per_page){ $Num_pages =1; } else if(($Num_Rows % $Per_page)==0){ $Num_pages =($Num_Rows/$Per_page) ; } else{ $Num_pages =($Num_Rows/$Per_page)+1; $Num_pages = (int)$Num_pages; }
$i=$page_Start+1;
$portfolio_SL = $Row . " ORDER BY portfolio_id DESC LIMIT $page_Start , $Per_page "; $portfolio_QR = mysqli_query($con,$portfolio_SL); ?>
<!DOCTYPE html> <html lang='en'> <head> <title> ผลงาน | <? echo $fixed[fixed_topic]; ?> | <? echo $fixed[fixed_website]; ?> </title> <meta name="description" content="<? echo $fixed[fixed_company]; ?> <? echo $fixed[fixed_topic]; ?>"> <meta name="keywords" content="ผลงาน - <? echo $fixed[fixed_topic]; ?>"> <meta name="author" content="<? echo $fixed[fixed_topic]; ?>"> <? include 'index_head.php'; ?> </head> <body> <? include 'index_navbar.php'; ?> <div style="background-color: #f0f0f0;"> <div class="container between20"> <div class="row"> <div class="col-md-12 text-center"> <span class="page-topic color1 "> ผลงาน <? if ($Num_Rows=='0') { echo " (ไม่พบข้อมูล)"; } else{ ?> <span class="size16 text-muted"> <? echo number_format($Num_Rows); ?> รายการ </span> <? } ?> </span> </div> </div> </div> </div> <div class="container between20"> <? $Ac_i = 1; while ($portfolio = mysqli_fetch_array($portfolio_QR)) { if ($Ac_i==1) { ?> <div class="row"> <?php } ?> <div class="col-md-6 col-xs-6"> <? include 'index_panel_portfolio.php'; ?> </div> <?php if ($Ac_i==2) { $Ac_i=0; ?> </div> <? } $Ac_i++; } if ($Ac_i!=1) { echo "</div>"; } ?> <div class="row"> <div class="col-md-12 text-center"> <? include 'index_pagenum.php'; ?> </div> </div> <div class="row hidden-sm hidden-xs margintop30" > <div class="col-md-4"> <ul class="breadcrumb no-radius" style="margin-bottom: 0px;"> <li><a href="index.php">หน้าแรก</a></li> <li> <a onclick="goBack();" href="#"> กลับ </a> </li> <li class="active"> ผลงาน </li> </ul> </div> </div> </div> <? include 'index_footer.php'; ?> </body> </html> <? } ?>
|