Example #1
0
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;
    }
}
Example #2
0
                            <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();
        ?>
</a> <em>(<?php 
        echo osc_list_city_items();
        ?>
)</em></li>
                            <?php 
    }
    ?>
                            </ul>
                        </div>
                        <?php 
}
?>
                    </div>
                </div>
            </div>
            <?php 
osc_current_web_theme_path('footer.php');