/*======================================================================*\
|| #################################################################### ||
|| # Polished Diamonds 2.0.0 - A Fresh Start # ||
|| #################################################################### ||
\*======================================================================*/
// ######################### REQUIRE BACK-END ############################
require_once('./_includes/common.php');
// #################### PROCESS PAGE INFORMATION #########################
$page_details = get_blog_list($_GET['page']);
// ########################## GENERATE HEADER #############################
require_once(PD_SITE_PATH . '_templates/header.html');
// ########################### OUTPUT CONTENT #############################
?>
Blog Categories |
$cate_count = 0;
if( count($page_details["categories"]) > 0 ){
foreach($page_details["categories"] as $category)
{
?>
=$category?> |
}
}
else{
?>
No Categories |
}
?>
if(count($page_details["cate_id"])>0){
if($page_details["images"] != "" ){
$items = preg_replace("/\.jpg|\.gif/", "", $page_details["images"]);
$blog_images_index = explode(",", $items);
$blog_images = explode(",", $page_details["images"]);
foreach($blog_images as $img_ind=>$blog_image){
$ext = explode(".",$blog_image);
$ext = $ext[count($ext)-1];
$ind = $blog_images_index[$img_ind];
$file_name = $ind.".".$ext;
?>
}}?>
=$page_details["content"]?>
}else{
?>
=$page_details["cate_content"]?>
Blogs
if(!$page_details['content'])
echo "No blog found!";
if(count($page_details['content'])>0){
$blog_count = 0;
foreach($page_details['content'] as $blog){
$blog_count += count($blog["title"]);
if($blog_count>0){
if($blog["category_title"]) $category_title = strtolower(str_replace(" ", "-", $blog["category_title"]));
else $category_title = strtolower(str_replace(" ", "-", $page_details["cate_title"]));
?>
-
" . $blog["title"] . ""?>
200){
echo substr($cts,0,200)."...";
print "
[Read more]";
}else{
echo $cts;
}
?>
if($blog["images"] != "" ){
$items = preg_replace("/\.jpg|\.gif/", "", $blog["images"]);
$blog_images_index = explode(",", $items);
$blog_images = explode(",", $blog["images"]);
foreach($blog_images as $img_ind=>$blog_image){
$ext = explode(".",$blog_image);
$ext = $ext[count($ext)-1];
$ind = $blog_images_index[$img_ind];
$file_name = $ind.".".$ext;
?>
}?>
}?>
=$blog["content_parsed"]?>
}else{
echo "No blog found!";
}
}
}
}
?>
// ########################## GENERATE FOOTER #############################
require_once(PD_SITE_PATH . '_templates/footer.html');
?>