Example #1
0
     }
     $upid = $list[$newkeys[0]]['picid'];
     $nextid = $list[$newkeys[2]]['picid'];
     $piclist = $list;
 }
 foreach ($piclist as $key => $value) {
     $value['pic'] = pic_get($value['filepath'], 'album', $value['thumb'], $value['remote']);
     $piclist[$key] = $value;
 }
 $pic['pic'] = pic_get($pic['filepath'], 'album', $pic['thumb'], $pic['remote'], 0);
 $pic['size'] = formatsize($pic['size']);
 $exifs = array();
 $allowexif = function_exists('exif_read_data');
 if (isset($_GET['exif']) && $allowexif) {
     require_once libfile('function/exif');
     $exifs = getexif($pic['pic']);
 }
 $perpage = 20;
 $perpage = mob_perpage($perpage);
 $start = ($page - 1) * $perpage;
 ckstart($start, $perpage);
 $cid = empty($_GET['cid']) ? 0 : intval($_GET['cid']);
 $siteurl = getsiteurl();
 $list = array();
 $count = C::t('home_comment')->count_by_id_idtype($pic['picid'], 'picid', $cid);
 if ($count) {
     $query = C::t('home_comment')->fetch_all_by_id_idtype($pic['picid'], 'picid', $start, $perpage, $cid);
     foreach ($query as $value) {
         $list[] = $value;
     }
 }
Example #2
0
function getattachexif($aid, $path = '')
{
    global $_G;
    $return = $filename = '';
    if (!$path) {
        if ($attach = C::t('forum_attachment_n')->fetch('aid:' . $aid, $aid, array(1, -1))) {
            if ($attach['remote']) {
                $filename = $_G['setting']['ftp']['attachurl'] . 'forum/' . $attach['attachment'];
            } else {
                $filename = $_G['setting']['attachdir'] . 'forum/' . $attach['attachment'];
            }
        }
    } else {
        $filename = $path;
    }
    if ($filename) {
        require_once libfile('function/exif');
        $exif = getexif($filename);
        $keys = array(exif_lang('Model'), exif_lang('ShutterSpeedValue'), exif_lang('ApertureValue'), exif_lang('FocalLength'), exif_lang('ExposureTime'), exif_lang('DateTimeOriginal'), exif_lang('ISOSpeedRatings'));
        foreach ($exif as $key => $value) {
            if (in_array($key, $keys)) {
                $return .= "{$key} : {$value}<br />";
            }
        }
    }
    return $return;
}