Example #1
0
<?php

//session_start();
require_once "includes/application-top.php";
date_default_timezone_set('UTC');
$dbObj = new DB();
$dbObj->fun_db_connect();
$catObj = new Category();
$linkObj = new Links();
$listObj = new Listing();
$newsObj = new News();
$googObj = new Googlead();
$siteObj = new SitePages();
$arr6 = $catObj->funGetActivatorsCategory8();
$arr7 = $catObj->funGetActivatorsCategory8();
$rsgoog = $googObj->fun_getGoogleadMain();
$rowgoogle = mysql_fetch_array($rsgoog);
$getH7Page = $siteObj->funGetSitePagesInfo('14');
$getH7CorporatePage = $siteObj->funGetSitePagesInfo('127');
$getH7latestPage = $siteObj->funGetSitePagesInfo('124');
$sqlsnap = "select * from " . TABLE_EVENT_PHOTO . " order by updated_on desc limit 0,1 ";
$rssnap = mysql_query($sqlsnap) or die(mysql_error());
$snapshot = mysql_fetch_array($rssnap);
$sqlsnap1 = "select * from h7_image where status=1 and approve=1 order by image_last_update desc limit 0,1 ";
$rssnap1 = mysql_query($sqlsnap1) or die(mysql_error());
$snapshot1 = mysql_fetch_array($rssnap1);
if (strtotime($snapshot['updated_on']) > strtotime($snapshot1['image_last_update'])) {
    $showimage = $snapshot['photo_url'];
    $showcat = $snapshot['main_cat_id'];
} else {
    $showimage = $snapshot1['photo_url'];