public function userOverviewSimple($statement, $userHandle, $galleries = false) { $words = new MOD_words(); $Gallery = new GalleryController(); $callbackId = $Gallery->updateGalleryProcess(); $vars =& PPostHandler::getVars($callbackId); if (!isset($vars['errors'])) { $vars['errors'] = array(); } $type = 'images'; $galleries = $this->_model->getUserGalleries(); echo ' <form method="post" action="gallery/show/user/' . $userHandle . '/pictures" name="mod-images" class="def-form"> <input type="hidden" name="' . $callbackId . '" value="1"/> '; if (in_array('gallery', $vars['errors'])) { echo '<span class="error">' . $words->get('GalleryErrorsPhotosets') . '</span>'; } if (in_array('images', $vars['errors'])) { echo '<span class="error">' . $words->get('GalleryErrorsImages') . '</span>'; } require 'templates/overview.php'; require 'templates/user_controls.php'; echo '</form>'; }
<?php $request = PRequest::get()->request; $Gallery = new GalleryController(); $callbackId = $Gallery->updateGalleryProcess(); $vars = PPostHandler::getVars($callbackId); $words = $this->getWords(); $layoutbits = new MOD_layoutbits(); $thumbsize = $this->thumbsize; echo $words->flushBuffer(); if ($statement) { $requestStr = implode('/', $request); $matches = array(); if (preg_match('%/=page(\\d+)%', $requestStr, $matches)) { $page = $matches[1]; $requestStr = preg_replace('%/=page(\\d+)%', '', $requestStr); } else { $page = 1; } if (!isset($itemsPerPage)) { $itemsPerPage = 12; } $p = PFunctions::paginate($statement, $page, $itemsPerPage); $statement = $p[0]; foreach ($statement as $d) { $title_short = strlen($d->title) >= 26 ? substr($d->title, 0, 25) . '...' : $d->title; $d->HTML = ' <div class="img thumb" style="width: 244px;"> <a href="gallery/show/image/' . $d->id . '" id="image_link_' . $d->id . '"><img class="framed" src="gallery/thumbimg?id=' . $d->id . ($thumbsize ? '&t=' . $thumbsize : '') . '" alt="image" style="margin: 5px 0; float:none;" /></a>'; $d->HTML .= '<h4 class="floatbox">'; if ($this->loggedInMember && $this->loggedInMember->Username == $d->user_handle) {