18 lines
465 B
PHP
18 lines
465 B
PHP
<?php
|
|
|
|
class Controller_map extends Cana_Controller {
|
|
public function init() {
|
|
|
|
if (c::getPagePiece(1)) {
|
|
$community = Community::permalink(c::getPagePiece(1));
|
|
Cana::view()->restaurants = $community->restaurantByLoc();
|
|
|
|
} else {
|
|
Cana::view()->restaurants = Restaurant::q('select * from restaurant where active=1 and loc_lat');
|
|
}
|
|
|
|
Cana::view()->layout('layout/blank');
|
|
Cana::view()->useFilter(false);
|
|
Cana::view()->display('map/index');
|
|
}
|
|
} |