| Server IP : 172.67.206.42 / Your IP : 104.23.243.50 Web Server : Apache System : Linux server.localhost.com 6.8.0-85-generic #85-Ubuntu SMP PREEMPT_DYNAMIC Thu Sep 18 15:26:59 UTC 2025 x86_64 User : pahana ( 1029) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /home/pahana/public_html/ |
Upload File : |
<?php
include "php/connect-mysql.php";
include "php/functions.php";
include "php/header.php";
?>
<div class="contents">
<div class="custom-container">
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<ol class="breadcrumb">
<li><a href="<?=$siteUrlMain;?>">Home</a></li>
<?php
if(isset($_GET['id']) && $_GET['id']!=""){
$sqlNwsNv = mysqli_query($conn,"select title,categoryID FROM news WHERE urlPage='".$_GET['id']."' ");
$numRowNwsNv = mysqli_num_rows($sqlNwsNv);
if($numRowNwsNv>0){
$rowsNwsNv = mysqli_fetch_array($sqlNwsNv);
echo '<li><a href="'.categoryURL($rowsNwsNv['categoryID']).'">'.categoryNm($rowsNwsNv['categoryID']).'</a> </li>
<li class="active">'.$rowsNwsNv['title'].'</li>';
}else{
echo '<li class="active">News</li>';
}
}else{
echo '<li class="active">News</li>';
}
?>
</ol>
</div>
<div class="col-lg-9 col-md-12 col-sm-12 col-xs-12 equalcol conentsection">
<div class="clearfix"></div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="margin:20px 0 00">
<?=advertmentSingle(6);?>
</div>
</div>
<div class="blogdetail sections pageTxt">
<?php
$sqlNws = mysqli_query($conn,"select * from news where urlPage='".$_GET['id']."' ");
$numRowNws = mysqli_num_rows($sqlNws);
if($numRowNws>0){
$rows = mysqli_fetch_array($sqlNws);
$sqlCondton = "WHERE id<>".$rows['id']."";
echo '<div class="bootstrap-carousel">';
if($rows['youtubeID']!=""){
echo '<iframe class="embed-responsive-item" width="100%" height="400" src="http://www.youtube.com/embed/'.$rows['youtubeID'].'"></iframe> ';
}else{
$sqlNwsImg = mysqli_query($conn,"select * from news_gallery where newsID='".$rows['id']."' order by id asc");
$numRowNwsImg = mysqli_num_rows($sqlNwsImg);
if($numRowNwsImg>0){
$sno=0;
$itemData = "";
while($rowNwsImg = mysqli_fetch_array($sqlNwsImg)){
$sno++;
$liData.= '<li data-slide-to="'.$sno.'" data-target="#carousel-example-captions" class=""></li>';
$itemData.='<div class="item"><img src="'.$siteUrlMain.'php/timthumb.php?src='.$siteUrlMain.'img/'.(($rowNwsImg['newImg']!="")?$rowNwsImg['newImg']:'noImg.jpg').'&h=330&w=816&zc=1" alt="img" /></div>';
}
echo '<div data-ride="carousel" class="carousel slide" id="carousel-example-captions">
<ol class="carousel-indicators">
<li data-slide-to="0" data-target="#carousel-example-captions" class="active"></li>
'.$liData.'
</ol>
<div class="carousel-inner">
<div class="item active"><img src="'.$siteUrlMain.'php/timthumb.php?src='.$siteUrlMain.'img/'.(($rows['newsImg']!="")?$rows['newsImg']:'noImg.jpg').'&h=330&w=816&zc=1" alt="img" /></div>
'.$itemData.'
</div>
<a data-slide="prev" href="#carousel-example-captions" class="left carousel-control">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a data-slide="next" href="#carousel-example-captions" class="right carousel-control">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>';
}else{
echo '<img src="'.$siteUrlMain.'php/timthumb.php?src='.$siteUrlMain.'img/'.(($rows['newsImg']!="")?$rows['newsImg']:'noImg.jpg').'&h=330&w=816&zc=1" alt="img" />';
}
}
echo '</div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="blogtext">
<h2 class="heading">'.$rows['title'].'</h2>
<div class="clearfix"></div>
<div class="blogmetas">
<ul>
<li><i class="fa fa-calendar"></i>'.date('d M, Y', strtotime($rows['createdDate'])).'</li>
<li>
<i class="fa fa-align-justify"></i>
<a href="'.categoryURL($rows['categoryID']).'">'.categoryNm($rows['categoryID']).'</a>
</li>
</ul>
<div class="clearfix"></div>
</div>
<div class="descInfo">'.$rows['description'].'</div>
<div class="clearfix"></div>
<div class="blogmetas">
<ul>
<li><i class="fa fa-share"></i> Share On </li>
<li>
<a target="_blank" data-title="'.$rowsPro['productName'].'" href="https://www.facebook.com/sharer/sharer.php?u='.newsUrl($rows['id']).'&title='.$rows['title'].'"><i class="fa fa-facebook"></i>Facebook</a>
<a target="_blank" href="https://twitter.com/intent/tweet?url='.newsUrl($rows['id']).'"><i class="fa fa-twitter"></i>Twitter</a>
<a target="_blank" href="https://plus.google.com/share?url='.newsUrl($rows['id']).'"><i class="fa fa-google-plus"></i>Google Plus</a>
</li>
</ul>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>';
}else{
echo '<p>No data found.</p>';
}
?>
</div>
<div class="clearfix"></div>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="margin:20px 0 00">
<?=advertmentSingle(7);?>
</div>
</div>
<div class="clearfix"></div>
<div class="sections">
<h2 class="heading">Related News</h2>
<div class="clearfix"></div>
<div class="row">
<?php
$sqlRelPst = mysqli_query($conn,"select id,title,categoryID,newsThumb,createdDate from news ".$sqlCondton." order by id desc LIMIT 6");
$numRowRP = mysqli_num_rows($sqlRelPst);
if($numRowRP>0){
while($rowRelPst = mysqli_fetch_array($sqlRelPst)){
echo '<div class="col-lg-4 col-md-6 col-sm-6 col-xs-12">
<div class="blogposttwo">
<figure>
<a href="'.newsUrl($rowRelPst['id']).'">
<img src="'.$siteUrlMain.'php/timthumb.php?src='.$siteUrlMain.'img/'.(($rowRelPst['newsThumb']!="")?$rowRelPst['newsThumb']:'noImg.jpg').'&h=174&w=260&zc=1" class="img-responsive hovereffect" alt="'.$rowNewsPst['title'].'" />
</a>
</figure>
<div class="text">
<h4><a href="'.newsUrl($rowRelPst['id']).'">'.$rowRelPst['title'].'</a></h4>
<ul>
<li><i class="fa fa-calendar"></i>'.date('d M, Y', strtotime($rowRelPst['createdDate'])).'</li>
<li>
<i class="fa fa-align-justify"></i>
<a href="'.categoryURL($rowRelPst['categoryID']).'">'.categoryNm($rowRelPst['categoryID']).'</a>
</li>
</ul>
<a href="'.newsUrl($rowRelPst['id']).'" class="btn btn-primary btn-xs backcolor">Read More</a>
</div>
</div>
<div class="clearfix"></div>
</div>';
}
}
?>
</div>
</div>
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 text-center"><br />
<a href="<?=categoryURL($rows['categoryID']);?>" class="btn btn-primary btn-xs backcolor">View More</a>
</div>
<div class="clearfix"></div>
</div>
<?php include "php/sideBar.php";?>
</div>
</div>
</div>
<?php include "php/footer.php";?>