}
define('META_KEYWORDS', '');
define('PAGE_ENCODING', '');
require_once BASE_PATH . '/assets/includes/header.inc.php';
require_once BASE_PATH . '/assets/includes/errors.php';
try {
    if ($id) {
        if ($publicAccess) {
            if ($contributor['avatar_status'] == 1) {
                // Avatar Status
                $contributor['avatar'] = true;
            } else {
                $contributor['avatar'] = false;
            }
            $customContributorDate = new kdate();
            $customContributorDate->setMemberSpecificDateInfo();
            $customContributorDate->distime = 0;
            //if(!$contributor['display_name']) // Set display name if none exists
            //	$contributor['display_name'] = $contributor['f_name'].' '.$contributor['l_name'];
            $contributor['useMemID'] = $useMemID;
            // Get the original member id
            $contributor['memberSince'] = $customContributorDate->showdate($contributor['signup_date']);
            $contributor['country'] = getCountryName($contributor['country']);
            $contributor['state'] = getStateName($contributor['state']);
            // Redo this so only galleries that a member should be able to see are displayed XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
            // Contributor Albums
            if ($_SESSION['galleriesData']) {
                foreach ($_SESSION['galleriesData'] as $key => $value) {
                    if ($value['owner'] == $id and $value['publicgal'] == 1) {
                        $countMediaAlbums[] = $key;
                        // Galleries to count media for
     $toYear = array_reverse($toYearTmp, true);
 }
 foreach (range(1, 12) as $month) {
     $month = zerofill($month);
     $fromMonth[$month] = $month;
     $toMonth[$month] = $month;
 }
 foreach (range(1, 31) as $day) {
     $day = zerofill($day);
     $fromDay[$day] = $day;
     $toDay[$day] = $day;
 }
 if ($_SESSION['searchForm']['searchDate']['dateRangeSearch']) {
     $searchDateObj = new kdate();
     // Setup a new kdate object to use specifically on media details
     $searchDateObj->setMemberSpecificDateInfo();
     $searchDateObj->distime = 0;
     $searchDateObj->adjust_date = 0;
     $fromDateText = $searchDateObj->showdate("{$_SESSION[searchForm][searchDate][fromYear]}-{$_SESSION[searchForm][searchDate][fromMonth]}-{$_SESSION[searchForm][searchDate][fromDay]} 00:00:00");
     $toDateText = $searchDateObj->showdate("{$_SESSION[searchForm][searchDate][toYear]}-{$_SESSION[searchForm][searchDate][toMonth]}-{$_SESSION[searchForm][searchDate][toDay]} 00:00:00");
     $smarty->assign('fromDateText', $fromDateText);
     $smarty->assign('toDateText', $toDateText);
 }
 // Default is sortnumber, id desc
 if ($_SESSION['searchForm']['hex']) {
     $searchSortByOptions['color'] = 'Color';
 }
 // [t]
 $searchSortByOptions['date_added'] = 'Date Added';
 $searchSortByOptions['media_id'] = 'ID';
 $searchSortByOptions['title'] = 'Title';
Exemple #3
0
if ($id) {
    $newsResult = mysqli_query($db, "SELECT *\tFROM {$dbinfo[pre]}news\tWHERE news_id = '{$id}'");
    $news = mysqli_fetch_assoc($newsResult);
    $news['title'] = $news['title_' . $selectedLanguage] ? $news['title_' . $selectedLanguage] : $news['title'];
    // Choose the correct language
    define('META_TITLE', $news['title']);
    // Override page title, description, keywords and page encoding here
}
//define('META_DESCRIPTION','');
//define('META_KEYWORDS','');
//define('PAGE_ENCODING','');
require_once BASE_PATH . '/assets/includes/header.inc.php';
require_once BASE_PATH . '/assets/includes/errors.php';
try {
    $customNewsDate = new kdate();
    $customNewsDate->setMemberSpecificDateInfo();
    $customNewsDate->distime = 0;
    if ($id) {
        /*
         * Grab selected news article
         */
        $news['article'] = $news['article_' . $selectedLanguage] ? $news['article_' . $selectedLanguage] : $news['article'];
        // Choose the correct language
        $news['display_date'] = $customNewsDate->showdate($news['add_date']);
        // Create a local time and date
        $smarty->assign('newsArticle', $news);
        if ($news and $news['active'] == 1 and $news['add_date'] < $nowGMT and ($news['expire_type'] == 0 or $news['expire_date'] > $nowGMT)) {
            $smarty->display('news.article.tpl');
        } else {
            $smarty->display('noaccess.tpl');
        }