$i) { if($results['handler']) { $handler = array( 'path' => $x, 'route' => $results, 'uri' => implode('/', array_slice($xuri, count($path))), 'base' => URI.implode('/', $path) ); } else { //break; } } else { $route = $results; unset($handler); } } } if(!$route) { if($handler) { include(ROOT.'handlers/'.$handler['route']['handler'].'.php'); $route = $handler['route']; } else { //exit('404'); } } define('HURI', $handler['uri']); if($handler) { define('BASE', $handler['base']); if(HURI) { define('TOP', substr(URI, 0, strlen(URI)-strlen(HURI))); } } else { define('TOP', trim(URI, '/').'/'); define('BASE', URI); } if($route) { // get positions $q = (" select positions.name as name, modules.name as module, instances.id as instance from positions right join position_instances on fk_positions = positions.id left join instances on fk_instances = instances.id left join modules on fk_modules = modules.id "); foreach(db_read($q) as $row) { ob_start(); $file = ROOT.'modules/'.$row['module'].'/controller.php'; $data = array( 'instance' => $row['instance'] ); if(file_exists($file)) { $scope = scope_include($file, $data); //print_rf($scope); } else { exit('file not found: '.$file); } $positions[$row['name']] = $scope['output']; ob_end_clean(); } //print_rf($positions); exit; // end positions $xmodules = array(); $q = (" select content_nodes.id as node, instances.id as instance, modules.name as module, module_views.name as view from node_instances left join content_nodes on fk_content_nodes = content_nodes.id left join contents on fk_contents = contents.id left join route_contents on fk_route_contents = route_contents.id left join instances on fk_instances = instances.id left join modules on fk_modules = modules.id left join module_views on fk_module_views = module_views.id where fk_routes = ".(int)$route['id']." "); //exitf($q); foreach(db_read($q) as $row) { $xmodules[] = $row; } $q = (" select content_nodes.id as node, instances.id as instance, modules.name as module, module_views.name as view from node_instances left join content_nodes on fk_content_nodes = content_nodes.id left join contents on fk_contents = contents.id left join element_contents on fk_element_contents = element_contents.id left join instances on fk_instances = instances.id left join modules on fk_modules = modules.id left join layout_elements on element_contents.fk_elements = layout_elements.fk_elements left join layouts on fk_layouts = layouts.id left join routes on routes.fk_layouts = layouts.id left join module_views on fk_module_views = module_views.id where routes.id = ".(int)$route['id']." "); foreach(db_read($q) as $row) { $xmodules[] = $row; } foreach($xmodules as $row) { $file = 'modules/'.$row['module'].'/controller.php'; $data = array( 'instance' => $row['instance'], 'view' => $row['view'], 'node' => $row['node'], 'post' => $xpost[$row['node']], 'positions' => $positions ); $scope = scope_include($file, $data); $modules[$row['node']] = $scope['output']; } $xcontents = html_front_contents($route['id'], $route['layout_id']); //print_rf($xcontents); foreach($xcontents as $element => $contents) { foreach($contents as $x) { $elements[$element] .= html_read_contents($x, $modules); } } /* $q = (" select elements.id as id, elements.name as name from contents left join route_contents on fk_route_contents = route_contents.id left join elements on fk_elements = elements.id where fk_routes = ".(int)$route['id']." "); foreach(db_read($q) as $element) { $elements[$element['name']] = html_read($route['id'], $element['id'], $instances); } */ if($x = $route['title']) { $GLOBALS['_title'] = $x; } ob_start(); include('domain/templates/'.$route['layout_source'].'.php'); $ob = ob_get_contents(); ob_end_clean(); unset($_SESSION['notify']); if(!visit_log()) { exit('log error'); } } else { if($_GET['uri'] == '_bot') { $q = (" insert into visit_agents(agent) values (".escape($_SERVER['HTTP_USER_AGENT']).") on duplicate key update id = last_insert_id(id) "); list($id, $error) = db_create($q); if(!$id) { exit('error: '.$error); } $q = (" insert into visit_bots (fk_visit_agents) values (".(int)$id.") "); list($id, $error) = db_create($q); if(!$id) { exit('error: '.$error); } } header("HTTP/1.0 404 Not Found"); if(trim(URI, '/ ')) { header('location: /'); exit; } else { exit('De door u opgevraagde pagina kon niet worden opgehaald, onze excuses voor het ongemak. probeert u het later nog eens'); } } $GLOBALS['_scripts'][] = '/scripts/ext.js'; $GLOBALS['_onload'][] = 'ext()'; if(count($x = $GLOBALS['_scripts'])) { foreach($x as $n) { $scripts .= ''.LF; } } $params = array(); if(count($x = $GLOBALS['_onload'])) { foreach($x as $n) { $params[] = $n; } $onload = ' onload="'.implode(';', $params).'"'; } $params = array(); if(count($x = $GLOBALS['_onunload'])) { foreach($x as $n) { $params[] = $n; } $onunload = ' onunload="'.implode(';', $params).'"'; } if(count($x = $GLOBALS['_css'])) { foreach($x as $n) { $css .= ''.LF; } } if($x = $GLOBALS['_description']) { $route['description'] = $x; } if($x = $route['description']) { $description = ''.LF; } if($x = $route['keywords']) { $keywords = ''.LF; } $q = (" select value from settings where name = 'title' "); $row = db_read($q, true); if($title = $route['title']) { $title .= ' - '.$row['value']; } else { $title = $row['value']; } unset($_SESSION['success']); if(!ob_start("ob_gzhandler")) ob_start(); ?> '; } ?>
 
Sanitair, badkamer Purmerend - Klusbedrijf, badkamer Zaandam - badkamer verbouwen zaandam klusjesman purmerend klusjesman zaandam klusbedrijf hoorn klusbedrijf purmerend klusbedrijf zaandam timmerman purmerend timmerman hoorn timmerman zaandam