Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $profile->getphotos($profile->id);
- $results = $profile->rows;
- if ($results)
- {
- foreach ($results as $result)
- {
- $profile->getimage($profile->id);
- $tz = new DateTimeZone($result->timezone);
- $date = new DateTime('now');
- $date->setTimeZone($tz);
- list($name, $extension) = explode('.', $result->file);
- $file_1 = root_path.$photos_map.$name.'_1.'.$extension;
- $file_2 = root_path.$photos_map.$name.'_2.'.$extension;
- list($width, $height) = getimagesize($file_2);
- $template->newBlock('show_file');
- $template->assign(array(
- 'id' => $result->id,
- 'profileid' => $profile->id,
- 'file_height' => $height,
- 'file_small' => $file_1,
- 'file' => $file_2,
- 'image_small' => $profile->image_small,
- 'name' => $profile->name,
- 'date' => humanizeDateDiffference(strtotime($date->format('Y-m-d H:i:s')), strtotime($result->added))
- ));
- if ($result->file_text)
- {
- $template->newBlock('photo_file_text');
- $template->assign('file_text', utf8_encode($result->file_text));
- }
- $profile->getcomments($result->id);
- $aresults = $profile->aresults;
- if ($aresults)
- {
- foreach ($aresults as $aresult)
- {
- $template->newBlock('comment_list');
- $profile->getimage($aresult['fromprofileid']);
- $tz = new DateTimeZone($aresult['timezone']);
- $date = new DateTime('now');
- $date->setTimeZone($tz);
- $template->assign(array(
- 'image_small' => $profile->image_small,
- 'comment_name' => $aresult['name'],
- 'comment' => $aresult['text'],
- 'comment_data' => humanizeDateDiffference(strtotime($date->format('Y-m-d H:i:s')), strtotime($aresult['added']))
- ));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement