config_dir = './conf'; $smarts -> template_dir = './skins/'.skin.'/template'; $smarts -> compile_dir = './skins/'.skin.'/cache'; $smarts -> assign('skin',skin); /* # variables initialize */ $smarts -> assign('domain',domain); /* # primary class initialize */ $connect = new connect(); $connect ->start(db_user,db_pass,db_name); $authorize = new authorize(); if (isset($_POST['registry'])){ $authorize -> newUser($_POST['username'],$_POST['name'],$_POST['surname'],$_POST['email']); } if (isset($_POST['recovery'])) { $authorize -> recPass($_POST['email']); } $authorize ->login($_POST['username'],$_POST['password']); $authorize ->logOut(); /* # content class initialize */ $menu = new menu(); #$menu -> newsMenu(); $menu -> mainMenu(); $data['menu'] = $menu -> respons(); $smarts -> assign('menu',$data['menu']); if ($data['menu']['schema'] == 0) { $smarts -> config_dir = './conf'; $smarts -> template_dir = './skins/'.skin.'/template'; $smarts -> compile_dir = './skins/'.skin.'/cache'; $smarts -> assign('skin',skin); $smarts -> assign('show','hello world!'); }else{ $smarts -> config_dir = './conf'; $smarts -> template_dir = './skins/englisch/template'; $smarts -> compile_dir = './skins/englisch/cache'; $smarts -> assign('skin','englisch'); } $save = new saveData(); $save -> saveComment(); #print_r($data['menu']['menuLeft']); $content = new content(); $content ->frontPage(); $data['content'] = $content ->respons(); $smarts -> assign('template',$data['content']['template']); $smarts -> assign('content',$data['content']); /* # przekierowania dla newslettera, wyszukiwarki i kalendarza */ if (isset($_POST['show'])) { header("Location:/calendar/".$_POST['year'].'-'.$_POST['month'].'-'.$_POST['day'].'/'); } if (isset($_GET['word'])) { header("Location:/search/".$_GET['word']); } if (isset($_POST['changeDate'])) { $perfDate = explode('/',addslashes($_POST['calendar'])); if (is_array($perfDate)) { header("Location:/calendar/".$perfDate['2']."-".$perfDate['0']."-".$perfDate['1']."/"); }else{ header("Location:/calendar/all/"); } } /* # show tpl */ if ($data['content']['index'] == false) { $smarts -> display('index.tpl'); }else{ $smarts -> display($data['content']['index']); } ob_end_flush(); ?>