function osclasswizards_popular_cities($limit = 20) { View::newInstance()->_exportVariableToView('list_cities', Search::newInstance()->listCities('%%%%', '>=')); if (osc_count_list_cities() > 0) { $array = array(); while (osc_has_list_cities()) { if (osc_list_city_items() > 0) { $city_name = osc_list_city_name(); $array[$city_name] = osc_list_city_items(); } } arsort($array); return array_slice($array, 0, $limit); } else { return false; } }
?> </h2> <p><?php _e("Over", 'flatter'); ?> <strong><?php echo osc_total_active_items(); ?> <?php _e("Ads", 'flatter'); ?> </strong> <?php _e("listed in", 'flatter'); ?> <strong><?php echo osc_count_list_cities(); ?> <?php _e("Cities", 'flatter'); ?> </strong>.</p> <?php if (osc_users_enabled() || !osc_users_enabled() && !osc_reg_user_post()) { ?> <a class="btn btn-success btn-lg" href="<?php echo osc_item_post_url(); ?> "><?php _e("Publish your ad for free", 'flatter'); ?> </a>
"><strong><?php _e("See all offers", 'modern'); ?> »</strong></a></p> <?php } ?> <?php } ?> </div> </div> <div id="sidebar"> <div class="navigation"> <?php if (osc_count_list_cities() > 0) { ?> <div class="box location"> <h3><strong><?php _e("Location", 'modern'); ?> </strong></h3> <ul> <?php while (osc_has_list_cities()) { ?> <li><a href="<?php echo osc_search_url(array('sCity' => osc_list_city_name())); ?> "><?php echo osc_list_city_name();