/** * LazyestAdminFolder::imagesbox() * The manage images box * * @since 1.1.0 * @return void */ function imagesbox() { global $lg_gallery; $paged = isset($_REQUEST['lg_paged']) ? (int) $_REQUEST['lg_paged'] : 1; $list = 'list'; $list_style = 'listview'; if (isset($_REQUEST['mode'])) { $list_style = 'excerpt' == $_REQUEST['mode'] ? 'editview' : 'listview'; $list = $_REQUEST['mode']; } $this->load('thumbs'); $lg_gallery->sortit['images'] = 'MANUAL' == $lg_gallery->get_option('sort_alphabetically') && $this->can_save(); $pagination = $lg_gallery->pagination('aimages', $this->list); ?> <ul id="lg_context" title="<?php echo urlencode($this->curdir); ?> " class="contextMenu"><li><!-- will be loaded by ajax --></li></ul> <div id="imagesbox" class="postbox"> <div class="inside"> <div class="tablenav"> <?php if (!$lg_gallery->sortit['images'] && 20 < $this->thiscount) { echo $pagination; } ?> <?php $this->view_switcher($list); ?> </div> </div> <div id="sortimages" class="<?php echo $list_style; ?> "> <?php $imagetable = new LazyestImageTable($this->list); $imagetable->page('lg_paged'); $imagetable->display(); unset($imagetable); ?> </div> <?php if (!$lg_gallery->sortit['images'] && 20 < $this->thiscount) { ?> <div class="inside"> <div class="tablenav"> <?php echo $pagination; ?> </div> </div> <?php } if (10 < $this->thiscount && $this->can_save() && $this->user_can('editor')) { // add an extra update button if more than 10 images ?> <div id="below_images" class="inside"> <div id="second-publishing-actions"> <div id="publishing-second"> <input type="submit" class="button button-highlighted button-primary" name="update_folder-s" value="<?php esc_html_e('Update Folder', 'lazyest-gallery'); ?> " /> </div> <div class="clear"></div> </div> </div> <?php } ?> </div> <?php }
/** * lg_refresh_folder() * refresh image table in folder edit screen when upload thickbox closes * @since 1.1.0 * @return void */ function lg_refresh_folder() { global $lg_paged, $lg_gallery; if (isset($_POST['folder'])) { $lg_paged = isset($_POST['lg_paged']) ? $_POST['lg_paged'] : 1; $path = utf8_decode(rawurldecode($_POST['folder'])); $folder = new LazyestFolder($path); $folder->open(); $folder->load('thumbs'); $imagetable = new LazyestImageTable($folder->list); $imagetable->page('lg_paged'); $imagetable->display(); } die; }