post_albumphoto.php 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * [Discuz!] (C)2001-2099 Comsenz Inc.
  4. * This is NOT a freeware, use is subject to license terms
  5. *
  6. * $Id: post_albumphoto.php 25246 2011-11-02 03:34:53Z zhangguosheng $
  7. */
  8. if (!defined('IN_DISCUZ')) {
  9. exit('Access Denied');
  10. }
  11. include_once libfile('function/home');
  12. $perpage = 8;
  13. $page = max(1, $_GET['page']);
  14. $start_limit = ($page - 1) * $perpage;
  15. $aid = intval($_GET['aid']);
  16. $photolist = array();
  17. $query = C::t('home_album')->fetch_all_by_uid($_G['uid'], false, 0, 0, $aid);
  18. $count = $query[0]['picnum'];
  19. $query = C::t('home_pic')->fetch_all_by_albumid($aid, $start_limit, $perpage, 0, 0, 1);
  20. foreach($query as $value) {
  21. $value['bigpic'] = pic_get($value['filepath'], 'album', $value['thumb'], $value['remote'], 0);
  22. $value['pic'] = pic_get($value['filepath'], 'album', $value['thumb'], $value['remote']);
  23. $value['count'] = $count;
  24. $value['url'] = (substr(strtolower($value['bigpic']), 0, 7) == 'http://' ? '' : $_G['siteurl']) . $value['bigpic'];
  25. $value['thumburl'] = (substr(strtolower($value['pic']), 0, 7) == 'http://' ? '' : $_G['siteurl']) . $value['pic'];
  26. $photolist[] = $value;
  27. }
  28. $_GET['ajaxtarget'] = 'albumphoto';
  29. $multi = multi($count, $perpage, $page, "forum.php?mod=post&action=albumphoto&aid=$aid");
  30. include template('forum/ajax_albumlist');
  31. exit;