"; echo "document.location='login.php'"; echo ""; exit; } $microtime = microtime(); $delen = explode(" ", $microtime); $precies = $delen[0]; $seconden = date("U"); $bgtm = $precies + $seconden; if (!isset ($_GET['bestand'])){ $bestand = $_GET['bestand']; $datum = date("d-m-y"); $selecr = mysql_query("SELECT ip FROM hits WHERE dag = '".$datum."'"); $tel = @mysql_num_rows($selecr); if ($tel == 0) { mysql_query("INSERT INTO hits (dag, uniek, hits, ip) VALUES ('".$datum."','1','1','".$_SERVER['REMOTE_ADDR']." ,')"); } else { while ($zi = mysql_fetch_object($selecr)) { $ips2 = $zi->ip; } $uit = explode(" ,",$ips2); if (in_array($_SERVER['REMOTE_ADDR'],$uit)) { mysql_query("UPDATE hits SET hits = (hits+1) WHERE dag = '".$datum."'"); } else { $fg = mysql_query("SELECT ip FROM hits WHERE dag = '".$datum."'"); while ($zu6 = mysql_fetch_object($fg)) { $ips3 = "".$zu6->ip."".$_SERVER['REMOTE_ADDR']." ,"; } mysql_query("UPDATE hits SET ip = '".$ips3."' , hits = (hits+1) , uniek = (uniek+1) WHERE dag = '".$datum."'"); } } }else{ $bestand = ''; } $urlstyle = "".$datadir."/styles/".$stylesheet."/"; // Template systeem van Anthony Arents : http://www.anthonyarends.be include('functies.php'); function basiccontent() { global $datadir; global $stylesheet ; // This function is in charge of the skinsystem, it basically fetches the page from the skin and // returns the pagecontents to the "normal" file... Now also loads all mods ;) // Variable for the page (file). $contents = ""; // Now we go get that file... if(file_exists("./".$datadir."/styles/".$stylesheet."/".$stylesheet.".tpl")) { // Open file and save the contents to $contents $file = fopen("./".$datadir."/styles/".$stylesheet."/".$stylesheet.".tpl","r"); $contents = fread($file,filesize("./data/styles/".$stylesheet."/".$stylesheet.".tpl")); fclose($file); } // Return the filecontents return $contents; } if(!file_exists("./".$datadir."/styles/".$stylesheet."/".$stylesheet.".tpl")){ echo "Er is een fout opgetreden bij het laden van de template"; exit(); } //Deze functie is een voorbeeld van een functie, let erop dat deze geen uitvoer doet, hij slaat alles op in een variabele en returnt deze function menu(){ if($_SESSION['diehaghe'] >= '0'){ global $datadir ; $dir =$datadir."/content"; // de directory die hij uit moet lezen $exten = 'html'; // de extensie die hij weer moet geven $aSql="SELECT name,menu_id FROM pgbconsult_menu where topmenu_id = '0'"; $auitslag = mysql_query($aSql) or die(mysql_error()) ; $aantal = mysql_num_rows($auitslag); while ($obj = mysql_fetch_object($auitslag)){ $uitvoer .= ""; } /* if ($handle = @opendir($dir)) { while (false !== ($file = @readdir($handle))) { $bestand = $dir ."/". $file ; $ext = pathinfo($bestand); if($ext['extension'] == $exten) { $uitvoer .= "
  • ". basename($file,".html") ."
  • " ; } } @closedir($handle); } */ /*start menu bij modification date $handle=opendir($dir); while ($file = readdir($handle)) { if($file=='.'||$file=='..') continue; if (preg_match("/\.(html)$/", $file)){ $filetlist [$file] = filemtime ($dir.'/'.$file); } } asort($filetlist); while (list ($key, $val) = each ($filetlist)) { $uitvoer .= "
  • ". basename($key,".html") ."
  • " ; } einde menu bij modification date*/ } return $uitvoer; } function copyright() { global $uw_naam ; $jaar = date("Y"); $footer = '

    AA Zorgconsultancy | Lisserweg 696 2165 AV Lisserbroek | Tel: 0252-421128 | E-mail: info@aazorg.nl

     

    ' ; return $footer ; } function laden() { return $laden; } function sidebar(){ $side = '
    Login'; if(isset($_SESSION['diehaghe'])){ $query = "SELECT voornaam, achternaam, tussen FROM pgbconsult_contact WHERE contact_id = '".$_SESSION['lid']."'"; $resultaat = mysql_query($query) or die ("fout in Leden systeem , probeer het later nog eens"); $mo = date('m'); $ja = date('Y'); $da = date('d'); // hier kun je de pagina neer zetten. als de pagina alleen html is kun je while($obj = mysql_fetch_object($resultaat)){ $Tussenvoegsel=$obj->tussen; $Achternaam =$obj->achternaam; $admin =$obj->admin ; $id =$obj->id; $naam =$obj->voornaam; } $side .= '
    U bent ingelogd als
    '.$naam.' '.$Tussenvoegsel.''.$Achternaam.'.

    '; $side .='
    '; } return $side; } //Template openen en data aanpassen. $inhoud = $inhoud = basiccontent(); if($_GET[bestand] == 30){ $inhoud = str_replace("",'',$inhoud); } function content() { $uivoer_content = ""; If($_GET[bestand] == "" or $_GET[bestand] == "log" ){ $bestand = "13"; }else{ $bestand=$_GET[bestand]; } $query="SELECT page_id,url FROM pgbconsult_menu WHERE menu_id='".$bestand."' "; $resultaat = mysql_query($query) or die ("Fout $Sql, mysql_error()"); $aantal = mysql_num_rows($resultaat); if($aantal == 1){ while ($obj = mysql_fetch_object($resultaat)){ $url= $obj->url; if($obj->url == ""){ If($obj->page_id == "0"){ $obj->page_id = "404"; } $file = "data/content/".$obj->page_id.".html"; $uitvoer_content .= file_get_contents($file); //als er geen pagina word gevraagd dan word Home.html weergegeven }else{ include("modules/$obj->url"); } $url= $obj->url; } } else{ $uitvoer_content .= 'Fout de pagina bestand met menu id'.$bestand.' - bestaat niet | Error the page don\'t exist'; } return $uitvoer_content ; } //$inhoud = str_replace("{berichten}",berichtenbalk(),$inhoud); $inhoud = str_replace("{sidebar}", sidebar(),$inhoud); $inhoud = str_replace("{title}",$site_titel,$inhoud); $inhoud = str_replace("{urlstyle}",$urlstyle,$inhoud); $inhoud = str_replace("{copy}",copyright(),$inhoud); $inhoud = str_replace("{title}",$title,$inhoud); $inhoud = str_replace("{description}",$description,$inhoud); $inhoud = str_replace("{keywords}",$keywords,$inhoud); $inhoud = str_replace("{owner}",$owner,$inhoud); $inhoud = str_replace("{author}",$owner,$inhoud); $inhoud = str_replace("
    ",'
    ',$inhoud); $inhoud = str_replace("{pagetitle}",'',$inhoud); $inhoud = str_replace("{menu}",menu(),$inhoud); $inhoud = str_replace("{laden}",laden(),$inhoud); //en nu kan je deze oproepen global $inhoud ; $inhoud = str_replace("{content}",content(),$inhoud); $inhoud = str_replace("{zoek}",'',$inhoud); print($inhoud);/*hier wordt alles weergegeven eindelijk. $micro_end = microtime(); $delen = explode(" ", $micro_end); $precies_end = $delen[0]; $seconden_end = date("U"); $edtm = $precies_end + $seconden_end; $difference = $edtm - $bgtm; $difference = round($difference,5); // afronden op 5 getallen achter de komma echo "Laadtijd van de pagina: ".$difference." sec."; */ ?>