<?php /*--------------------*/ /* GALLERY */ /*--------------------*/ $count_gallery = count_gallery(); $latest_gallery_order = get_order_gallery(); $gallery_id = $_POST['gallery_id']; if (isset($_POST['btn-index-gallery'])) { if ($_POST['btn-index-gallery'] == "Save Changes") { /* -- GALLERY -- */ foreach ($gallery_id as $gallery_id) { $get_gallery = get_gallery($gallery_id); $gallery_order = $get_gallery['order']; $gallery_flag = $_POST['gallery_flag_' . $gallery_id]; if (!empty($_FILES['upload_gallery_' . $gallery_id]['name'])) { $uploads_dir_gallery = 'files/uploads/gallery/'; $userfile_name_gallery = str_replace(array('(', ')', ' '), '_', $_FILES['upload_gallery_' . $gallery_id]['name']); $userfile_tmp_gallery = $_FILES['upload_gallery_' . $gallery_id]['tmp_name']; $prefix_gallery = 'gallery-' . $gallery_id . "-"; $prod_img_gallery = $uploads_dir_gallery . $prefix_gallery . $userfile_name_gallery; move_uploaded_file($userfile_tmp_gallery, $prod_img_gallery); $gallery_image = $prefix_gallery . $userfile_name_gallery; $filename_gallery = $uploads_dir_gallery . $gallery_image; if (!empty($get_gallery['flag'])) { $unlink_gallery = $get_gallery['flag']; } else { $unlink_gallery = $filename_gallery; } if (!empty($get_gallery['filename']) and $get_gallery['filename'] != $get_gallery['flag'] and file_exists($get_gallery['flag'])) { unlink($get_gallery['flag']);
<div class="meta"><?php echo $months[$q_config['language']][(int) get_the_time('m') - 1]; ?> <?php the_time('Y'); ?> </div> <h2><?php the_title(); ?> </h2> <?php the_content(); ?> <?php $gallery = get_gallery(get_the_ID()); ?> <?php if ($gallery) { ?> <div class="gallery"> <?php $is_first = true; ?> <?php foreach ($gallery as $pic) { ?> <a rel="gallery-<?php echo $var; ?> " <?php
<?php wp_reset_postdata(); $post_id = is_home() ? get_site_option('featured_webseries') : $post->ID; ?> <section id="gallery"> <h2>Photo Gallery</h2> <?php $gallery = get_gallery($post_id); ?> <?php for ($i = 0; $i < count($gallery); $i++) { ?> <?php if ($i % 2 == 0) { ?> <div class="row"> <?php } ?> <div class="small-6 large-6 column"> <a href="#photo" class="photo"> <figure> <img id="photo-<?php echo $i; ?> " src="<?php echo $gallery[$i]['photo']; ?>
?> <?php if ($queryover->have_posts()) { while ($queryover->have_posts()) { $queryover->the_post(); ?> <article class=\"galLeft\"> <!-- video principal-->; <div><p><?php the_content(); ?> </p></div> </article> <article class='galRight'> <?php get_gallery(); ?> </article> <?php } } ?> <?php wp_reset_postdata(); ?> </section> <!--DISQUS--> <?php comments_template(); ?>
$photoCount = $query_data[0]; $lastpage = ceil($photoCount / $pageLimit); $limit = 'LIMIT ' . ($page - 1) * $pageLimit . ',' . $pageLimit; $query = mysql_query("SELECT photo.*,person.fullname,person.gender,person.age,person.city FROM person_photos photo JOIN person person on person.id = photo.person_id ORDER BY created DESC {$limit}") or die(mysql_error()); while ($row = mysql_fetch_assoc($query)) { $gallery[] = array_map('stripslashes', $row); } return $gallery; } if (isset($_GET['p'])) { global $lastpage; $page = $_GET['p']; $pages = array(); $title = msg('Photos'); $pageLimit = 9; $gallery = get_gallery($pageLimit, $page); if ($page > 1) { $previousPage = $page - 1; } else { $previousPage = 1; } if ($page < $lastpage) { $nextPage = $page + 1; } else { $nextPage = $lastpage; } for ($p = $page - 3; $p < $page + 4; $p++) { if ($p > 0 && $p < $lastpage + 1) { $pages[] = $p; } }
?> <script> <?php /* $all_gallery = get_galleries(); $all_gallery_id = $all_gallery['id']; foreach($all_gallery as $all_gallery){ if($all_gallery['filename']){ } } */ for ($i = 2; $i < $limit_gallery; $i++) { $get_gallery = get_gallery($i); if (empty($get_gallery['filename'])) { ?> $("#upload-gallery-<?php echo $i + 1; ?> ").hide(); $("#galleries-<?php echo $i + 1; ?> ").hide(); <?php } } //foreach ?>