$pp = "index";
include("includes/header.php");
$__content__ = "";
$newsBarContent = "";
$resN = mysql_query("select * from news where category='5' order by postdate desc limit 0,4");
while ($rowN = mysql_fetch_array ($resN)) {
$newsBarContent .= "
";
}
$hsdata = array();
$resHs = mysql_query("select * from homesettings order by id asc");
while ($hsrow = mysql_fetch_array($resHs)) {
$hsdata[$hsrow['id']] = array('title'=>stripslashes($hsrow['title']), 'link'=>stripslashes($hsrow['link']), 'content'=>stripslashes($hsrow['content']), 'image'=>stripslashes($hsrow['image']));
}
$__content__ = "
".$hsdata[2]['title']."
".$hsdata[2]['content']."
".$hsdata[3]['title']."
".$hsdata[3]['content']."
";
/* ============= slideshow layout ============= */
$ssHtml = ""; //default
$res2 = mysql_query("select * from pages where id=3");
while ($row2 = mysql_fetch_array ($res2)) {
if (isset($_GET['ss'])) $row2['slideshow_type'] = $_GET['ss'];
if ($row2['slideshow_type'] == 1 and $row2['gallery_id']>0) {
// background slideshow
$x = 1;
$htmlimg = "";
$jsimg = "";
$htmlbull = "";
$res2 = mysql_query("select * from photos where gallery_id='".$row2['gallery_id']."' order by id asc");
while ($prow = mysql_fetch_array($res2)) {
$htmlimg .= "\n";
$jsimg .= " {
\"title\" : \"img ".$prow['id']."\",
\"image\" : \"".SITE_URL."galleriesimg/".$prow['image1']."\",
\"firstline\" : \"".str_replace(array("\r\n", "'"), array("\\\r\n", "\'"), stripslashes($prow['name']))."\"
},";
$htmlbull .= "\n";
$x++;
}
$__content__ .= "
";
$__content__ = str_replace("", "", $__content__);
$ssHtml = "
".$htmlbull."
";
} else if ($row2['slideshow_type'] == 2 and $row2['gallery_id']>0) {
//ImageFlow
$x = 1;
$htmlimg = "";
$jsimg = "";
$htmlbull = "";
$res2 = mysql_query("select * from photos where gallery_id='".$row2['gallery_id']."' order by id asc");
while ($prow = mysql_fetch_array($res2)) {
$htmlimg .= "\n";
//gia home width=\"120\" height=\"80\"
$x++;
}
$ssHtml = "
";
$__content__ .= "
";
} else if ($row2['slideshow_type'] == 3) {
// html
$ssHtml = "
".stripslashes($row2['htmlcode'])."
";
} else if ($row2['slideshow_type'] == 4 and $row2['banner_id']>0) {
// banner
$res3 = mysql_query("select * from banners where id='".$row2['banner_id']."'");
while ($brow = mysql_fetch_array($res3)) {
if ($brow['linkurl1'] != "") {
$ssHtml = "
";
} else {
$ssHtml = "
";
}
}
} else {
$ssHtml = "";
}
}
/* ============= - ============= */
$ttemplate = $template;
$ttemplate = str_replace("_____SLIDESHOW_____", $ssHtml, $ttemplate);
$ttemplate = str_replace("_____SITE_TITLE_____", HOME_TITLE, $ttemplate);
$ttemplate = str_replace("_____CONTENT_____", $__content__, $ttemplate);
echo $ttemplate;
?>