case 'all': $display = '<div class="post-block-out">'; break; default: $display = '<div class="hide">'; break; } } echo $display; ?> <div class="<?php if (is_sticky($post_ID) == true) { echo 'post-block-featured'; } elseif (dazake_is_premiun($post->ID)) { echo 'post-block-premium'; } else { echo 'post-block-free'; } ?> "> <div class="post-left"> <?php if ($_COOKIE['mode'] == 'changegrid') { // echo $_COOKIE['mode']; ?>
function cp_ad_dazake_edit_image_input_fields($imagecount, $post) { $disabled = ''; // get the free $maximages = get_option('dazakefreepicnum'); if (dazake_is_premiun($post->ID)) { $pinumname = "dazake_category{$post->term_id}_pic_num"; $imagepremium = get_option($pinumname); if (!empty($imagepremium)) { $maximages = max($maximages, $imagepremium); } } if (is_sticky($post->ID)) { $imagefeature = get_option('dazakefeaturepicnum'); if (!empty($imagefeature)) { $maximages = max($maximages, $imagefeature); } } // figure out how many image upload fields we need $imageboxes = $maximages - $imagecount; // now loop through and print out the upload fields for ($i = 0; $i < $imageboxes; $i++) { $next = $i + 1; if ($i > 0) { $disabled = 'disabled="disabled"'; } ?> <li> <div class="labelwrapper"> <label><?php _e('Add Image', 'appthemes'); ?> :</label> </div> <?php echo "<input type=\"file\" name=\"image[]\" id=\"upload{$i}\" class=\"fileupload\" onchange=\"enableNextImage(this,{$next})\" {$disabled}" . ' />'; ?> <div class="clr"></div> </li> <?php } ?> <p class="small"><?php printf(__('You are allowed %s image(s) per ad.', 'appthemes'), $maximages); ?> <?php echo get_option('cp_max_image_size'); _e('KB max file size per image.', 'appthemes'); ?> <?php _e('Check the box next to each image you wish to delete.', 'appthemes'); ?> </p> <div class="clr"></div> <?php }