Fotoalbum\n". " \n". " \n"; } if ($news){ $admin_navigatie .= "
  • Nieuws\n". " \n". "
  • \n"; } if ($gastenboek){ $admin_navigatie .= "
  • Gastenboek
  • \n"; } return $admin_navigatie; } function takefirstalbumID(){ global $table_alb_names; $sql = "SELECT album_id FROM $table_alb_names WHERE isactive ORDER BY volgorde"; $ra =mysql_fetch_array(query_this($sql)); return $ra['album_id']; } function isempty($var) { if (((is_null($var) || rtrim($var) == "") && $var !== false) || (is_array($var) && empty($var))) { return true; } else { return false; } } function query_this($query){ $result = mysql_query($query) or die("A fatal MySQL error occured.\n
    Query: " . $query . "
    \nError: (" . mysql_errno() . ") " . mysql_error()); return $result; } function nl2br2($string) { $string = str_replace(array("\r\n", "\r", "\n"), "
    ", $string); return $string; } //max lengte nemen van text function controleerlengte($tekst, $max_letters){ if (strlen($tekst)> $max_letters){ return substr ($tekst, 0, $max_letters)."..."; }else{ return $tekst; } } function checkmail($email){ if(eregi("^[0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\\.[a-z]{2,4}$", $email)){ return TRUE; } return FALSE; } /* old ! function leestaalmodule($lang, $defaulttaal){ if (isempty($lang)){ $lang = $_SESSION['language']->user; } if (isempty($lang)){ if(!isset($_COOKIE['spar_taal'])){ // no cookie found $lang = $defaulttaal; }else{ //found cookie of $lang is niet leeg $lang=$_COOKIE['spar_taal']; } } setcookie('spar_taal', $lang, time()+3600, '/'); $_SESSION['language']->user = $lang; $_SESSION['language']->level = 1; return $lang; } */ function leestaalmodule($lang, $defaulttaal){ if (isempty($lang)){ $lang = $_SESSION['language']->user; } if (isempty($lang)){ $lang = $defaulttaal; } $_SESSION['language']->user = $lang; $_SESSION['language']->level = 1; return $lang; } function taalkeuze($taalmodules, $url, $langg="nl"){ $firstgo = true; $string = ""; foreach ($taalmodules as $key=> $value ){ $class_lang= ($langg==$key) ? "taal_active" : "taal"; $string .= ($firstgo)? "":" | "; $string .= "$key"; $firstgo = false; } return $string; } // format MySQL DateTime (YYYY-MM-DD hh:mm:ss) using date() function datetime($syntax,$datetime) { $year = substr($datetime,0,4); $month = substr($datetime,5,2); $day = substr($datetime,8,2); $hour = substr($datetime,11,2); $min = substr($datetime,14,2); $sec = substr($datetime,17,2); return date($syntax,mktime($hour,$min,$sec,$month,$day,$year)); } function file_allow($origfilename,$file_types_array){ //$origfilename = $_FILES["filename1"]["name"]; $filename = explode(".", $_FILES["filename1"]["name"]); $filenameext = $filename[count($filename)-1]; unset($filename[count($filename)-1]); $filename = implode(".", $filename); $filename = substr($filename, 0, 50).".".$filenameext; $file_ext_allow = FALSE; for($x=0;$x taalkeuze return $taalkeuzepage; }else{ // lang / no page_id ======> mainpage nl/fr/en $sql = "SELECT page_id FROM $cms_pages WHERE defaultpage=1 and lang='$lang'"; $rs=query_this($sql); if ($raa=mysql_fetch_array($rs)){ return $raa['page_id']; }else{ //geen mainpage dus geef eerste page $rs=query_this("SELECT page_id FROM $cms_pages WHERE lang='$lang'"); if ($ra5=mysql_fetch_array($rs)){ return $ra5['page_id']; } } } } function bestaatpage($page_id){ global $cms_pages; //controleren of page_id in database voorkomt $sql = "SELECT page_id FROM $cms_pages WHERE page_id=$page_id AND archive=0"; $rs=query_this($sql); if (!mysql_fetch_array($rs)){ return false; }else{ return true; } } function plaats_icon($url,$overlib,$img){ if (isempty($url)){ $ReturnThis=<< EOD; }else{ $ReturnThis=<< EOD; } return $ReturnThis; } function plaats_html($url,$overlib,$img){ if (isempty($url)){ $ReturnThis=<< EOD; }else{ $ReturnThis=<< EOD; } return $ReturnThis; } function ScriptColorselector($content_item,$page_id,$content_id){ $ReturnThis=<< EOD; return $ReturnThis; } ?>"Click here for english version", "fr"=>"Cliquez ici pour la version fran´┐Żaise"); $taalmodules = array( "uk"=>"Click here for english version", "nl"=>"klik hier voor nederlandse versie", "de"=>"de", "fr"=>"Cliquez ici pour la version fran´┐Żaise", "es"=>"es", "pt"=>"pt", "it"=>"it"); //cookies //$taalcookies = false; //$taalkeuzepage = 0; //$cookiename="degendt_taal"; $sessionname=$prefix."85e5r241fgTH65475"; $logonlogo = "logo_cms.gif"; $logonpass = "osbinfo2009"; $logonsuperpass = "ah0IUso9QnbDRhl"; // - - -----------------------------------------------------------> enable smarty's $smartyclass = $abs_path."/lib-cms/Smarty/Smarty.class.php"; $template_dir = $abs_path."/template"; $compile_dir = $abs_path."/lib-cms/Smarty/templates_c"; $cache_dir = $abs_path."/lib-cms/Smarty/cache"; $config_dir = $abs_path."/lib-cms/Smarty/configs"; require($smartyclass); $smarty = new Smarty(); $smarty->template_dir = $template_dir; $smarty->compile_dir = $compile_dir; $smarty->cache_dir = $cache_dir; $smarty->config_dir = $config_dir; if ($_SESSION[$sessionname]->user <> '') { $smarty->caching=false; }else{ $smarty->caching=$CACHING; } // Smarty's enabled ! <--------------------------------------------------------- - - ?>