/** * puts out a row in the edit album table * * @param object $album is the album being emitted * @param bool $show_thumb set to false to show thumb standin image rather than album thumb * @param object $owner the parent album (or NULL for gallery) * * */ function printAlbumEditRow($album, $show_thumb, $owner) { global $_zp_current_admin_obj; $enableEdit = $album->subRights() & MANAGED_OBJECT_RIGHTS_EDIT; if (is_object($owner)) { $owner = $owner->name; } ?> <div class='page-list_row'> <div class="page-list_albumthumb"> <?php if ($show_thumb) { $thumbimage = $album->getAlbumThumbImage(); $thumb = getAdminThumb($thumbimage, 'small'); } else { $thumb = 'images/thumb_standin.png'; } if ($enableEdit) { ?> <a href="?page=edit&album=<?php echo html_encode(pathurlencode($album->name)); ?> " title="<?php echo sprintf(gettext('Edit this album: %s'), $album->name); ?> "> <?php } ?> <img src="<?php echo html_encode(pathurlencode($thumb)); ?> " width="<?php echo ADMIN_THUMB_SMALL; ?> " height="<?php echo ADMIN_THUMB_SMALL; ?> " alt="" title="album thumb" /> <?php if ($enableEdit) { ?> </a> <?php } ?> </div> <div class="page-list_albumtitle"> <?php if ($enableEdit) { ?> <a href="?page=edit&album=<?php echo html_encode(pathurlencode($album->name)); ?> " title="<?php echo sprintf(gettext('Edit this album: %s'), $album->name); ?> "> <?php } echo html_encode(getBare($album->getTitle())); if ($enableEdit) { ?> </a> <?php } ?> </div> <?php if ($album->isDynamic()) { $imgi = '<img src="images/pictures_dn.png" alt="" title="' . gettext('images') . '" />'; $imga = '<img src="images/folder_picture_dn.png" alt="" title="' . gettext('albums') . '" />'; } else { $imgi = '<img src="images/pictures.png" alt="" title="' . gettext('images') . '" />'; $imga = '<img src="images/folder_picture.png" alt="" title="' . gettext('albums') . '" />'; } $ci = count($album->getImages()); $si = sprintf('%1$s <span>(%2$u)</span>', $imgi, $ci); if ($ci > 0 && !$album->isDynamic()) { $si = '<a href="?page=edit&album=' . html_encode(pathurlencode($album->name)) . '&tab=imageinfo" title="' . gettext('Subalbum List') . '">' . $si . '</a>'; } $ca = $album->getNumAlbums(); $sa = sprintf('%1$s <span>(%2$u)</span>', $imga, $ca); if ($ca > 0 && !$album->isDynamic()) { $sa = '<a href="?page=edit&album=' . html_encode(pathurlencode($album->name)) . '&tab=subalbuminfo" title="' . gettext('Subalbum List') . '">' . $sa . '</a>'; } ?> <div class="page-list_extra"> <?php echo $sa; ?> </div> <div class="page-list_extra"> <?php echo $si; ?> </div> <?php $wide = '40px'; ?> <div class="page-list_iconwrapperalbum"> <div class="page-list_icon"> <?php $pwd = $album->getPassword(); if (!empty($pwd)) { echo '<a title="' . gettext('Password protected') . '"><img src="images/lock.png" style="border: 0px;" alt="" title="' . gettext('Password protected') . '" /></a>'; } ?> </div> <div class="page-list_icon"> <?php echo linkPickerIcon($album); ?> </div> <div class="page-list_icon"> <?php if ($album->getShow()) { if ($enableEdit) { ?> <a href="?action=publish&value=0&album=<?php echo html_encode(pathurlencode($album->name)); ?> &return=*<?php echo html_encode(pathurlencode($owner)); ?> &XSRFToken=<?php echo getXSRFToken('albumedit'); ?> " title="<?php echo sprintf(gettext('Un-publish the album %s'), $album->name); ?> " > <?php } ?> <img src="images/pass.png" style="border: 0px;" alt="" title="<?php echo gettext('Published'); ?> " /> <?php if ($enableEdit) { ?> </a> <?php } } else { if ($enableEdit) { ?> <a href="?action=publish&value=1&album=<?php echo html_encode(pathurlencode($album->name)); ?> &return=*<?php echo html_encode(pathurlencode($owner)); ?> &XSRFToken=<?php echo getXSRFToken('albumedit'); ?> " title="<?php echo sprintf(gettext('Publish the album %s'), $album->name); ?> "> <?php } if ($album->getPublishDate() > date('Y-m-d H:i:s')) { ?> <img src="images/clock.png" alt="<?php echo gettext("Un-published"); ?> " title= "<?php echo gettext("Publish (override scheduling)"); ?> " /> <?php } else { ?> <img src="images/action.png" style="border: 0px;" alt="" title="<?php echo sprintf(gettext('Unpublished'), $album->name); ?> " /> <?php } if ($enableEdit) { ?> </a> <?php } } ?> </div> <div class="page-list_icon"> <?php if ($album->getCommentsAllowed()) { if ($enableEdit) { ?> <a href="?action=comments&commentson=0&album=<?php echo html_encode($album->getFileName()); ?> &return=*<?php echo html_encode(pathurlencode($owner)); ?> &XSRFToken=<?php echo getXSRFToken('albumedit'); ?> " title="<?php echo gettext('Disable comments'); ?> "> <?php } ?> <img src="images/comments-on.png" alt="" title="<?php echo gettext("Comments on"); ?> " style="border: 0px;"/> <?php if ($enableEdit) { ?> </a> <?php } } else { if ($enableEdit) { ?> <a href="?action=comments&commentson=1&album=<?php echo html_encode($album->getFileName()); ?> &return=*<?php echo html_encode(pathurlencode($owner)); ?> &XSRFToken=<?php echo getXSRFToken('albumedit'); ?> " title="<?php echo gettext('Enable comments'); ?> "> <?php } ?> <img src="images/comments-off.png" alt="" title="<?php echo gettext("Comments off"); ?> " style="border: 0px;"/> <?php if ($enableEdit) { ?> </a> <?php } } ?> </div> <div class="page-list_icon"> <a href="<?php echo WEBPATH; ?> /index.php?album=<?php echo html_encode(pathurlencode($album->name)); ?> " title="<?php echo gettext("View album"); ?> "> <img src="images/view.png" style="border: 0px;" alt="" title="<?php echo sprintf(gettext('View album %s'), $album->name); ?> " /> </a> </div> <div class="page-list_icon"> <?php if ($album->isDynamic() || !$enableEdit) { ?> <img src="images/icon_inactive.png" style="border: 0px;" alt="" title="<?php echo gettext('unavailable'); ?> " /> <?php } else { ?> <a class="warn" href="admin-refresh-metadata.php?page=edit&album=<?php echo html_encode(pathurlencode($album->name)); ?> &return=*<?php echo html_encode(pathurlencode($owner)); ?> &XSRFToken=<?php echo getXSRFToken('refresh'); ?> " title="<?php echo sprintf(gettext('Refresh metadata for the album %s'), $album->name); ?> "> <img src="images/refresh.png" style="border: 0px;" alt="" title="<?php echo sprintf(gettext('Refresh metadata in the album %s'), $album->name); ?> " /> </a> <?php } ?> </div> <?php if (extensionEnabled('hitcounter')) { ?> <div class="page-list_icon"> <?php if (!$enableEdit) { ?> <img src="images/icon_inactive.png" style="border: 0px;" alt="" title="<?php echo gettext('unavailable'); ?> " /> <?php } else { ?> <a class="reset" href="?action=reset_hitcounters&albumid=<?php echo $album->getID(); ?> &album=<?php echo html_encode(pathurlencode($album->name)); ?> &subalbum=true&return=*<?php echo html_encode(pathurlencode($owner)); ?> &XSRFToken=<?php echo getXSRFToken('hitcounter'); ?> " title="<?php echo sprintf(gettext('Reset hit counters for album %s'), $album->name); ?> "> <img src="images/reset.png" style="border: 0px;" alt="" title="<?php echo sprintf(gettext('Reset hit counters for the album %s'), $album->name); ?> " /> </a> <?php } ?> </div> <?php } ?> <div class="page-list_icon"> <?php $myalbum = $_zp_current_admin_obj->getAlbum(); $supress = !zp_loggedin(MANAGE_ALL_ALBUM_RIGHTS) && $myalbum && $album->getID() == $myalbum->getID(); if (!$enableEdit || $supress) { ?> <img src="images/icon_inactive.png" style="border: 0px;" alt="" title="<?php echo gettext('unavailable'); ?> " /> <?php } else { ?> <a class="delete" href="javascript:confirmDeleteAlbum('?page=edit&action=deletealbum&album=<?php echo urlencode(pathurlencode($album->name)); ?> &return=<?php echo html_encode(pathurlencode($owner)); ?> &XSRFToken=<?php echo getXSRFToken('delete'); ?> ');" title="<?php echo sprintf(gettext("Delete the album %s"), js_encode($album->name)); ?> "> <img src="images/fail.png" style="border: 0px;" alt="" title="<?php echo sprintf(gettext('Delete the album %s'), js_encode($album->name)); ?> " /> </a> <?php } ?> </div> <?php if ($enableEdit) { ?> <div class="page-list_icon"> <input class="checkbox" type="checkbox" name="ids[]" value="<?php echo $album->getFileName(); ?> " onclick="triggerAllBox(this.form, 'ids[]', this.form.allbox);" <?php if ($supress) { echo ' disabled="disabled"'; } ?> /> </div> <?php } ?> </div> </div> <?php }
<?php } // if article for categories } // if !category end ?> </td> </tr> <?php if (!$result->transient) { ?> <tr> <td> <?php echo linkPickerIcon($result, 'pick_link'); ?> </td> <td class="middlecolumn"> <?php echo linkPickerItem($result, 'pick_link'); ?> </td> </tr> <?php } ?> <tr id="titlelinkrow" style="display:none"> <td><?php echo gettext("TitleLink:");
?> </td> <td> <?php printExpired($article); ?> </td> <td class="page-list_icon"> <?php if ($article->inProtectedCategory()) { echo '<img src="../../images/lock.png" style="border: 0px;" alt="' . gettext('Password protected') . '" title="' . gettext('Password protected') . '" />'; } ?> </td> <td><?php echo linkPickerIcon($article); ?> </td> <?php $option = getNewsAdminOptionPath(getNewsAdminOption(NULL)); if (empty($option)) { $divider = '?'; } else { $divider = '&'; } if (checkIfLocked($article)) { ?> <td class="page-list_icon"> <?php printPublishIconLink($article, $option); ?>
<div class = "page-list_icon"> <input class = "checkbox" type = "checkbox" name = "ids[]" value="<?php echo $image->getFileName(); ?> " onclick="triggerAllBox(this.form, 'ids[]', this.for m.allbox);" /> </div> <?php } ?> </td> </tr> <tr> <td align="left" valign="top"> <?php echo linkPickerIcon($image, 'image_link-' . $currentimage); ?> <td style="width:100%;"> <?php echo linkPickerItem($image, 'image_link-' . $currentimage); ?> </td> </tr> <tr> <td align="left" valign="top"><?php echo gettext("Description:"); ?> </td> <td><?php print_language_string_list($image->getDesc('all'), $currentimage . '-desc', true, NULL, 'texteditor', '100%');
</a> <?php if (isImagePhoto($image)) { ?> <a href="<?php echo html_encode(pathurlencode($image->getFullImageURL())); ?> " class="colorbox" title="zoom"> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/magnify.png" alt=""> </a> <?php } linkPickerIcon($image); ?> </p> <?php } ?> </li> </ul> <br class="clearall" /> <div> <input type="hidden" id="sortableList" name="sortableList" value="" /> <p class="buttons"> <a href="<?php echo WEBPATH . '/' . ZENFOLDER . '/admin-edit.php?page=edit' . $parent; ?>
/** * Prints the list entry of a single category for the sortable list * * @param array $cat Array storing the db info of the category * @param string $flag If the category is protected * @return string */ function printCategoryListSortableTable($cat, $flag) { global $_zp_CMS; if ($flag) { $img = '../../images/drag_handle_flag.png'; } else { $img = '../../images/drag_handle.png'; } $count = count($cat->getArticles(0, false)); if ($cat->getTitle()) { $cattitle = $cat->getTitle(); } else { $cattitle = "<span style='color:red; font-weight: bold'> <strong>*</strong>" . $cat->getTitlelink() . "*</span>"; } ?> <div class='page-list_row'> <div class='page-list_title' > <?php echo "<a href='admin-edit.php?newscategory&titlelink=" . $cat->getTitlelink() . "' title='" . gettext('Edit this category') . "'>" . $cattitle . "</a>" . checkHitcounterDisplay($cat->getHitcounter()); ?> </div> <div class="page-list_extra"> <?php echo $count; ?> <?php echo gettext("articles"); ?> </div> <div class="page-list_iconwrapper"> <div class="page-list_icon"><?php $password = $cat->getPassword(); if (!empty($password)) { echo '<img src="../../images/lock.png" style="border: 0px;" alt="' . gettext('Password protected') . '" title="' . gettext('Password protected') . '" />'; } ?> </div> <div class="page-list_icon"> <?php echo linkPickerIcon($cat); ?> </div> <div class="page-list_icon"> <?php if ($cat->getShow()) { $title = gettext("Un-publish"); ?> <a href="?publish=0&titlelink=<?php echo html_encode($cat->getTitlelink()); ?> &XSRFToken=<?php echo getXSRFToken('update'); ?> " title="<?php echo $title; ?> "> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/pass.png" alt="<?php gettext("Scheduled for publishing"); ?> " title="<?php echo $title; ?> " /></a> <?php } else { $title = gettext("Publish"); ?> <a href="?publish=1&titlelink=<?php echo html_encode($cat->getTitlelink()); ?> &XSRFToken=<?php echo getXSRFToken('update'); ?> " title="<?php echo $title; ?> "> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/action.png" alt="<?php echo gettext("Un-published"); ?> " title="<?php echo $title; ?> " /></a> <?php } ?> </div> <div class="page-list_icon"> <?php if ($count == 0) { ?> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/icon_inactive.png" alt="<?php gettext('locked'); ?> " /> <?php } else { ?> <a href="../../../index.php?p=news&category=<?php echo js_encode($cat->getTitlelink()); ?> " title="<?php echo gettext("View category"); ?> "> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/view.png" alt="view" /> </a> <?php } ?> </div> <?php if (extensionEnabled('hitcounter')) { ?> <div class="page-list_icon"><a href="?hitcounter=1&id=<?php echo $cat->getID(); ?> &tab=categories&XSRFToken=<?php echo getXSRFToken('hitcounter'); ?> " title="<?php echo gettext("Reset hitcounter"); ?> "> <img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/reset.png" alt="<?php echo gettext("Reset hitcounter"); ?> " /> </a> </div> <?php } ?> <div class="page-list_icon"> <a href="javascript:confirmDelete('admin-categories.php?delete=<?php echo js_encode($cat->getTitlelink()); ?> &tab=categories&XSRFToken=<?php echo getXSRFToken('delete_category'); ?> ',deleteCategory)" title="<?php echo gettext("Delete Category"); ?> "><img src="<?php echo WEBPATH . '/' . ZENFOLDER; ?> /images/fail.png" alt="<?php echo gettext("Delete"); ?> " title="<?php echo gettext("Delete Category"); ?> " /></a> </div> <div class="page-list_icon"> <?php echo linkPickerIcon($cat, 'link_source_' . $cat->getID()); ?> </div> <div class="page-list_icon"><input class="checkbox" type="checkbox" name="ids[]" value="<?php echo $cat->getTitlelink(); ?> " onclick="triggerAllBox(this.form, 'ids[]', this.form.allbox);" /> </div> </div> </div> <?php }
if (empty($current)) { echo ' selected="selected"'; } ?> style="background-color:LightGray"><?php echo gettext('none'); ?> </option> <?php generateListFromArray(array($current), $watermarks, false, false); ?> </select> <br /> <?php if (!$pasteobj) { echo linkPickerIcon($imageobj, 'imageURI', "+'&pick[picture]=' + \$('#imageURI').val().replaceAll('&', ':')"); } echo linkPickerItem($imageobj, 'imageURI'); ?> </p> <p class="buttons"> <button type="reset" onclick="resetButton();" > <img src="../images/fail.png" alt="" /><strong><?php echo gettext("Reset"); ?> </strong> </button> <?php if (!$pasteobj) { ?> <button type="submit" id="submit" name="submit" value="<?php