first commit

This commit is contained in:
2026-04-30 14:38:11 +02:00
commit e22bbde336
1994 changed files with 613950 additions and 0 deletions

View File

@@ -0,0 +1,116 @@
<?php defined('SYSPATH') OR die('No direct access allowed.');
class Page_Controller extends Base_Front_Controller
{
public function __construct()
{
parent::__construct();
}
public function __call($method, $arguments)
{
if ($arguments) {
$method .= '/'. implode('/', $arguments);
}
return $this->show($method);
}
public function homepage()
{
return url::redirect('o-firmie');
}
public function show($name)
{
#$name = implode('/', $this->uri->argument_array());
$page_view = new View('front/page_show');
$page = ORM::factory('page')->where('name', $name)->find();
if (!$page->loaded) {
return $this->error404();
}
if ($page->title) {
$this->view->title = $page->title .' - '. $this->view->title;
}
if ($page->meta_description) {
$this->view->meta_description = $page->meta_description;
}
if ($page->meta_keywords) {
$this->view->meta_keywords = $page->meta_keywords;
}
/*
$this->view->path = array(
array('', 'Strona główna'),
array($name, $page->header)
);
*/
$page_view->page = $page;
$this->view->content = $page_view;
$this->view->render(true);
}
public function contact()
{
$page_view = new View('front/page_contact');
$page = ORM::factory('page')->where('name', 'kontakt')->find();
if (!$page->loaded) {
return $this->error404();
}
if($page->title) {
$this->view->title = $page->title .' - '. $this->view->title;
}
if ($page->meta_description) {
$this->view->meta_description = $page->meta_description;
}
if($page->meta_keywords) {
$this->view->meta_keywords = $page->meta_keywords;
}
$gmap = new Gmap('gmap', array
(
#'ScrollWheelZoom' => true,
'DoubleClickZoom' => true,
'ContinuousZoom' => true,
#'InfoWindow' => true,
));
$center = Kohana::config('application.gmaps.center');
// Set the map center point
$gmap->center($center['lat'], $center['lon'], $center['zoom'])->controls('small');
// Add a custom marker icon
/* $gmap->add_icon('tinyIcon', array
(
'image' => 'http://labs.google.com/ridefinder/images/mm_20_red.png',
'shadow' => 'http://labs.google.com/ridefinder/images/mm_20_shadow.png',
'iconSize' => array('12', '20'),
'shadowSize' => array('22', '20'),
'iconAnchor' => array('6', '20'),
'infoWindowAnchor' => array('6', '20')
));
*/
$gmap->add_icon('markerIcon', array
(
'image' => 'http://www.google.com/intl/en_ALL/mapfiles/marker.png',
'shadow' => 'http://www.google.com/intl/en_ALL/mapfiles/shadow50.png',
'iconSize' => array('20', '34'),
'shadowSize' => array('37', '34'),
'iconAnchor' => array('10', '34'),
'infoWindowAnchor' => array('10', '34')
));
$marker = Kohana::config('application.gmaps.marker');
// Add a new marker
$gmap->add_marker($marker['lat'], $marker['lon'], $marker['html'], array('icon' => 'markerIcon', 'title' => $marker['title']));
$page_view->page = $page;
$this->view->content = $page_view;
$this->view->api_url = Gmap::api_url();
$this->view->gmap = $gmap->render();
$this->view->message = $this->session->get('message');
$this->view->render(true);
}
}