$config[CID],'CMD'=>'FooterMenuSelect','StringSelectValue'=>$StringSelectValue); $FooterMenu = selectfootermenu($FooterMenuSelect); $FooterMenuArray = $FooterMenu;*/ /*---------------footer menu details------------------*/ //***************************************** POST SHORTEN **************************************** function shorten_string($string, $wordsreturned) /* Returns the first $wordsreturned out of $string. If string contains fewer words than $wordsreturned, the entire string is returned. */ { $retval = $string; // Just in case of a problem $array = explode(" ", $string); if (count($array)<=$wordsreturned) /* Already short enough, return the whole thing */ { $retval = $string; } else /* Need to chop of some words */ { array_splice($array, $wordsreturned); $retval = implode(" ", $array)." ..."; } return $retval; } // ******************************* Section to display CATEGORY or Not *********************************** $DispCatCond = "`CID`='$CID'"; $CatOptDetails = $Db->detailsgeneral('sc_blog_option_settings',$DispCatCond); $DispCat = $CatOptDetails[display_categories]; $DispFullPost = $CatOptDetails[full_post]; $DispPostOrder = $CatOptDetails[post_order]; $DispRating = $CatOptDetails[display_rating]; $DispShare = $CatOptDetails[include_social_media]; $DispFblike = $CatOptDetails[fb_like]; $DispBlogDesc = $CatOptDetails[include_blog_description]; $DispBlogSearch = $CatOptDetails[search_field]; $blog_description = stripslashes($CatOptDetails[blog_description]); $MetaTitle = stripslashes($CatOptDetails[meta_title]); $MetaDesc = stripslashes($CatOptDetails[meta_description]); $PostPerPage = $CatOptDetails[post_per_page]; $CatLabel = stripslashes($CatOptDetails[category_label]); $ArcLabel = stripslashes($CatOptDetails[archive_label]); $SearchLabel = stripslashes($CatOptDetails[search_label]); $BlogdescLabel = stripslashes($CatOptDetails[blogdesc_label]); $RecentpostLabel = stripslashes($CatOptDetails[recentpost_label]); $Display_Sidebar = stripslashes($CatOptDetails[Display_Sidebar]); $DispBlogSubscriber = $CatOptDetails[include_Subscribe_Blog]; $SubsBlogLabel = stripslashes($CatOptDetails[Subscribe_to_Blog_label]); if($DispPostOrder == 'Y') $tok = 'desc'; if($DispPostOrder == 'N') $tok = 'asc'; /* ----------------------- PAGINATION Section start ------------------------------------------------ */ include_once("include/pagenation.php"); $page_url = $_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]; $pager = new Pagerf(); $referer = $_SERVER['HTTP_REFERER']; $referer = base64_encode($referer); /* ----------------------- ------------------------------------------------ */ if(!isset($PostPerPage)) { $PostPerPage=3; } $limit = $PostPerPage; $start = $pager->findStart($limit); if(is_numeric($_REQUEST[page])) { if(!isset($_REQUEST[page]) || $_REQUEST[page]=='') { $page =1; }else { $page = $_REQUEST[page]; } }else{ $page =1; } $PagenationBlogArray=array('CID'=>$config[CID],'start'=>$start,'limit'=>$limit,'CMD'=>'BlogPosts'); //$PagenationBlogList=BlogPosts($PagenationBlogArray); $PagePostsCond = "`CID`='$CID' && `status`='Y' ORDER BY `publish_date`"; $PostsList = $Db->listgeneral('sc_blog_post',$PagePostsCond); if(is_array($PostsList)) $num = count($PostsList); if(!$num) $num = 1; $totpage = $pager->findPages($num, $limit); $page1 = ""; $pagenation = $pager->pageList($page,$totpage); $page1 .= $pagenation; $page1 .="
".LANG_PAGE." $_GET[page] ".LANG_OF." ".ceil($num/$limit)."
"; /* ----------------------- PAGINATION Section end ------------------------------------------------ */ $GeneralSettingArray = array('CID' => $config[CID],'CMD'=>'generalSetting'); $GeneralSetting = generalsetting($GeneralSettingArray); /* --------------------------------------- STAR RATING COLOR ---------------------------------- */ $StarCond = "`CID`='$config[CID]'"; $StarDetails = $Db->listgeneral('sc_general_setting',$StarCond); $StarColor = $StarDetails[0][StarColor]; $NeedPagination = $StarDetails[0][need_pagenation]; //echo $StarColor; /* -------------------------------------------------------------------------------------------- */ $pagetitle = $MetaTitle; $item_type = 'BLOG'; $item_id = ''; ?> <?=stripslashes($MetaTitle)?>
listgeneral('sc_blog_categories',$GeneralCond); //echo "
";
//print_r($CatDetails);
/*echo '
';
print_r($HeaderImageBlog);*/

?>

listgeneral('sc_blog_post',$AllPostsCond); $i=0; if(is_array($AllPostsDetails)) { while($AllPostsDetails[$i]) { $pubDate = $AllPostsDetails[$i][publish_date]; $pieces = explode(" ", $pubDate); $DateMonthYear = $pieces[0]; $time = $pieces[1]; $date_explode = explode("-", $DateMonthYear); $year = $date_explode[0]; $month = $date_explode[1]; $date = $date_explode[2]; if($month == '01') $month_full = 'January'; if($month == '02') $month_full = 'February'; if($month == '03') $month_full = 'March'; if($month == '04') $month_full = 'April'; if($month == '05') $month_full = 'May'; if($month == '06') $month_full = 'June'; if($month == '07') $month_full = 'July'; if($month == '08') $month_full = 'August'; if($month == '09') $month_full = 'September'; if($month == '10') $month_full = 'October'; if($month == '11') $month_full = 'November'; if($month == '12') $month_full = 'December'; if($GeneralSetting[webpage_url] == 'with_html') $posturl = 'posts/'.$AllPostsDetails[$i][post_url].'.html'; else $posturl = 'posts/'.$AllPostsDetails[$i][post_url]; ?>
Posted on   by 
listgeneral('sc_blog_comments',$RatCond); $totRat = 0; $avgRating = 0; $r=0; if(is_array($RatDetails)) { $PersonCommented = count($RatDetails); while($RatDetails[$r]) { $totRat = $totRat + $RatDetails[$r][rating]; $r++; } $avgRating = $totRat/$PersonCommented; } //echo $avgRating; display_decimal_star_big($avgRating,$StarColor); /*} */ ?>
out of 5 stars
Read more
Share this:
Leave a comment