/** * Prints the table part of a single page item for the sortable pages list * * @param object $page The array containing the single page * @param bool $flag set to true to flag the element as having a problem with nesting level */ function printPagesListTable($page, $flag) { if ($flag) { $img = '../../images/drag_handle_flag.png'; } else { $img = '../../images/drag_handle.png'; } ?> <div class='page-list_row'> <div class="page-list_title"> <?php if (checkIfLockedPage($page)) { echo "<a href='admin-edit.php?page&titlelink=" . urlencode($page->getTitlelink()) . "'> "; checkForEmptyTitle($page->getTitle(), "page"); echo "</a>" . checkHitcounterDisplay($page->getHitcounter()); } else { checkForEmptyTitle($page->getTitle(), "page"); checkHitcounterDisplay($page->getShow()); } ?> </div> <div class="page-list_extra"> <?php checkIfScheduled($page); checkIfExpires($page); ?> </div> <div class="page-list_extra"> <?php echo html_encode($page->getAuthor()); ?> </div> <div class="page-list_iconwrapper"> <div class="page-list_icon"> <?php if ($page->isProtected() && GALLERY_SECURITY != 'private') { echo '<img src="../../images/lock.png" style="border: 0px;" alt="' . gettext('Password protected') . '" title="' . gettext('Password protected') . '" />'; } ?> </div> <?php if (checkIfLockedPage($page)) { ?> <div class="page-list_icon"> <?php printPublishIconLink($page, "page"); ?> </div> <div class="page-list_icon"> <?php if ($page->getCommentsAllowed()) { ?> <a href="?commentson=0&titlelink=<?php echo html_encode($page->getTitlelink()); ?> &XSRFToken=<?php echo getXSRFToken('update'); ?> " title="<?php echo gettext('Disable comments'); ?> "> <img src="../../images/comments-on.png" alt="" title="<?php echo gettext("Comments on"); ?> " style="border: 0px;"/> </a> <?php } else { ?> <a href="?commentson=1&titlelink=<?php echo html_encode($page->getTitlelink()); ?> &XSRFToken=<?php echo getXSRFToken('update'); ?> " title="<?php echo gettext('Enable comments'); ?> "> <img src="../../images/comments-off.png" alt="" title="<?php echo gettext("Comments off"); ?> " style="border: 0px;"/> </a> <?php } ?> </div> <?php } else { ?> <div class="page-list_icon"> <img src="../../images/icon_inactive.png" alt="" title="<?php gettext('locked'); ?> " /> </div> <div class="page-list_icon"> <img src="../../images/icon_inactive.png" alt="" title="<?php gettext('locked'); ?> " /> </div> <?php } ?> <div class="page-list_icon"> <a href="../../../index.php?p=pages&title=<?php echo js_encode($page->getTitlelink()); ?> " title="<?php echo gettext("View page"); ?> "> <img src="images/view.png" alt="" title="view" /> </a> </div> <?php if (checkIfLockedPage($page)) { ?> <div class="page-list_icon"> <a href="?hitcounter=1&titlelink=<?php echo html_encode($page->getTitlelink()); ?> &add&XSRFToken=<?php echo getXSRFToken('hitcounter'); ?> " title="<?php echo gettext("Reset hitcounter"); ?> "> <img src="../../images/reset.png" alt="" title="<?php echo gettext("Reset hitcounter"); ?> " /></a> </div> <div class="page-list_icon"> <a href="javascript:confirmDelete('admin-pages.php?delete=<?php echo $page->getTitlelink(); ?> &add&XSRFToken=<?php echo getXSRFToken('delete'); ?> ',deletePage)" title="<?php echo gettext("Delete page"); ?> "> <img src="../../images/fail.png" alt="" title="delete" /></a> </div> <div class="page-list_icon"> <input class="checkbox" type="checkbox" name="ids[]" value="<?php echo $page->getTitlelink(); ?> " onclick="triggerAllBox(this.form, 'ids[]', this.form.allbox);" /> </div> <?php } else { ?> <div class="page-list_icon"> <img src="../../images/icon_inactive.png" alt="" title="<?php gettext('locked'); ?> " /> </div> <div class="page-list_icon"> <img src="../../images/icon_inactive.png" alt="" title="<?php gettext('locked'); ?> " /> </div> <div class="page-list_icon"> <img src="../../images/icon_inactive.png" alt="" title="<?php gettext('locked'); ?> " /> </div> <?php } ?> </div><!-- icon wrapper end --> </div> <?php }
<td> <?php if (checkIfLockedNews($article)) { echo '<a href="admin-edit.php?newsarticle&titlelink=' . urlencode($article->getTitlelink()) . '&pagenr=' . $_zp_zenpage->getCurrentAdminNewsPage() . '">'; checkForEmptyTitle($article->getTitle(), "news"); echo '</a>' . checkHitcounterDisplay($article->getHitcounter()); } else { echo checkForEmptyTitle($article->getTitle(), "news") . '</a>' . checkHitcounterDisplay($article->getHitcounter()); } ?> </td> <td> <?php checkIfScheduled($article); checkIfExpires($article); ?> </td> <td> <?php printArticleCategories($article); ?> <br /> </td> <td> <?php echo html_encode($article->getAuthor()); ?> </td> <td class="icons"> <?php