示例#1
0
     $fromYear[$year] = $year;
     $toYearTmp[$year] = $year;
     $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';
示例#2
0
     if ($exif['DateTimeOriginal']) {
         $dateCreatedParts = explode(' ', $exif['DateTimeOriginal']);
         $dateCreatedYMD = str_replace(':', '-', $dateCreatedParts[0]);
         $dateCreatedString = "{$dateCreatedYMD} {$dateCreatedParts[1]}";
         //$dateCreated = date("Y-m-d H:m:s",filemtime($decoded_path)); // Date file was created
         //$exif['DateTimeOriginal'];
     } else {
         $dateCreatedString = '0000-00-00 00:00:00';
     }
     //date("Y-m-d H:m:s",filemtime($decoded_path))
 } else {
     $dateCreatedString = '0000-00-00 00:00:00';
 }
 //date("Y-m-d H:m:s",filemtime($decoded_path))
 if ($dateCreatedString != '0000-00-00 00:00:00') {
     $ndate = new kdate();
     $dateCreated = $ndate->formdate_to_gmt($dateCreatedString);
 } else {
     $dateCreated = $dateCreatedString;
 }
 $resolution = getimagesize($filePath);
 // Get resolution of original
 $filesize = filesize($filePath);
 // Get file size of original
 //$_SESSION['testing']['filePath'] = $filePath; // Testing
 //$_SESSION['testing']['writePath'] = $config['settings']['library_path']."/{$contr[contrFolderName]}/originals/{$cleanFileName}";
 if ($config['mediaMoveFunction']($filePath, $config['settings']['library_path'] . "/{$contr[contrFolderName]}/originals/{$cleanFileName}")) {
     @unlink($filePath);
     // Delete incoming file
     $originalSuccess = true;
 } else {
    $contributor['bio_content'] = nl2br($contributor['bio_content']);
}
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;
示例#4
0
require_once BASE_PATH . '/assets/includes/affiliate.inc.php';
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');