<?php $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" />'; ?>
$viewer = 'groupfotoviewer'; } else { $f =& CFotobox::getInstance(); $foto_history = $f->history($_USER_ID); $fotos_url_part = 'fotobox_myfotos'; $group_url_suffix = ''; $viewer = 'fotoviewer'; } $cnt_history = count($foto_history); $page = isset($_GET['page']) ? (int) $_GET['page'] : 1; $pages_to_display = 16; $per_page = 6; $total_pages = ceil($cnt_history / $per_page); $start = $page * $per_page - $per_page; $end = $start + $per_page < $cnt_history ? $start + $per_page : $cnt_history; $pg = new CPaging($page, $pages_to_display, $total_pages); if ($cnt_history == 0) { echo '<table border="0" cellpadding="0" cellspacing="0" width="545"> <tr> <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>