0){ $page = $getVars[0]; } if(count($getVars)>1){ $id = $getVars[1]; } }else{ $page = 'kezdolap'; $id = ''; } }else{ if( isset($_COOKIE['admin'],$_COOKIE['adminData']) ){ $sql = "SELECT * FROM admin WHERE login='".$_COOKIE['admin']."'"; $result = mysqli_query($con,$sql); $admin = $result->fetch_assoc(); if($_COOKIE['adminData'] == md5($admin['cookieTimestamp']) ){ $page = 'kezdolap'; }else{ $page = 'karbantartas'; } }else{ $page = 'karbantartas'; } } if(is_file($_SERVER["DOCUMENT_ROOT"]."/app/pages/".$page.".php") ){ include_once($_SERVER["DOCUMENT_ROOT"]."/app/pages/".$page.".php"); // }else{ // header("Location: /kezdolap"); } ?>