$fb =& CFotobox::getInstance(); $page = intval($_GET['page']); $limit = 56; $start = $page * $limit; $fotos = $fb->fotosByTags(false, false, 3, false, $start, $limit); $totalFotos = $GLOBALS['dbh']->found_rows(); $totalPages = floor($totalFotos / $limit); $showPages = 30; $pg = new CPaging($page, $showPages, $totalPages); echo '<div style="padding-top:5px; padding-bottom:5px;"><iframe name="showSelected" src="show_public_fotos.php" style="width:660px; height:80px;"></iframe></div> <div style="padding-bottom:10px;">'; if ($page - $showPages > 0) { echo $pg->getFirstPage('1') . ' ···'; } echo $pg->getPages(); if ($page < $totalPages - $showPages) { echo '··· ' . $pg->getLastPage($totalPages); } echo '</div>'; $i = 1; echo '<form name="fotos">'; foreach ($fotos as $v) { echo '<div style="float:left; padding-right:5px; padding-bottom:15px; text-align:center;"><a href="show_public_fotos.php?doId=' . $v['P_ID'] . '" target="showSelected"><img src="' . PATH_FOTO . $v['P_THUMB_PATH'] . '" /></a><br/>' . $v['P_WIDTH'] . 'x' . $v['P_HEIGHT'] . '<br/><a href="' . PATH_FOTO . $v['P_WEB_PATH'] . '" target="_blank" style="font-size:10px;">larger</a> <a href="javascript:confirmSubmit(' . $v['P_ID'] . ',' . $v['P_U_ID'] . ');" style="font-size:10px;">delete</a> <input type="checkbox" name="deletes" value="' . $v['P_ID'] . ',' . $v['P_U_ID'] . '" /></div>'; } echo ' <br clear="all"/> <div style="padding-top:10px;"><input type="button" value="Delete all checked" onclick="batchDelete();" /></form>'; echo '<br clear="all" />'; ?>
<td> You do not have an upload history. You can begin to upload fotos by clicking <a href="/?action=fotobox.upload_form">here</a>. </td> </tr> </table>'; } else { echo '<table border="0" cellpadding="0" cellspacing="0" width="545"> <tr> <td align="right"> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td>Page ' . $page . ' of ' . $total_pages . '</td> <td> | </td> <td>' . $pg->getPrevPage('<img src="images/arrow_left.gif" width="6" height="9" border="0" alt="click to view next" title="click to view next" />') . '</td> <td>' . $pg->getPages() . '</td> <td>' . $pg->getNextPage('<img src="images/arrow_right.gif" width="6" height="9" border="0" alt="click to view next" title="click to view next" />') . '</td> </tr> </table> </tr> </table>'; } $counter = 0; //foreach($foto_history as $k => $v) $keys = array_keys($foto_history); for ($i = $start; $i < $end; $i++) { $background_image = $counter % 2 == 0 ? 'images/pixel_lt_grey.gif' : 'images/spacer.gif'; $date = array('YEAR' => substr($keys[$i], 0, 2), 'MONTH' => substr($keys[$i], 2, 2), 'DAY' => substr($keys[$i], 4, 2)); if ($prefix == 'fotogroup') { $user_id = substr($keys[$i], strpos($keys[$i], '|') + 1);