"; $WFS_contact_form_admin = "Jarand Hindenes "; $WFS_webmaster = "jarand@hindenes.org"; # NEW 2009 # Reply-to address in customer receipt $WFS_storeAdminEmailReplyTo = "Jarand Hindenes "; # Header address $WFS_ticketSale = false; $WFS_lectureSignUp = false; $WFS_Color1 = "#b2b200"; $WFS_Color2 = "#FB9815"; # ***************************************************************** # Display variables WF1.0 # # *********************** # $WFG_adminFormWidth = 760; # $WFG_adminFormBg = "F2F2F2"; # $WFG_adminTableBorder = 'style="border: 1px solid #000000;"'; # $WFG_adminTableBorderLight = 'style="border: 1px solid #CCCCCC;"'; # # ***************************************************************** # ************************************************************** # ADMIN & SITE VARIABLES WF2.0 # ************************************************************** # ************************* # *** Global Menu Variables # ************************* $WFS_menu = true; $WFS_globalMenu = true; $WFS_menuDefaultEdit = 0; # bestemmer hvilken meny som er forhåndsvalgt ved redigering # Første meny $WFS_menuName[0] = "Hoved"; $WFS_menuMaxLevel[0] = 2; # Andre meny #$WFS_menuName[1] = "Intranet"; #$WFS_menuMaxLevel[1] = 3; # ***************************** # *** Global Language Variables # ***************************** $WFS_multiLanguage = false; # enable/disable module # ***************************** # *** Global Mail Variables # ***************************** $WFS_mail = false; # NEW 2009 $WFS_mailListDefaultEdit = 0; $WFS_mailListName[0] = "Salgsmail"; $WFS_mailListName[1] = "Kursmail"; $WFS_mailPreview = "preview.php"; $WFS_mailUnsubscribe_NO_1 = 'Du mottar denne e-posten fordi. For å melde deg av vår e-postliste kan du følge denne linken'; $WFS_mailCSS = "../screen.css"; $WFS_mailMediaPath = "../wf_img_content/"; # ***************************** # *** Global RSS Variables # ***************************** $WFS_rss = true; # NEW 2009 $WFS_rss_url = "http://".$WFS_defaultBaseAddress."/rss.php"; $WFS_rssEditor = "jarand@hindenes.org"; # ********************************* # *** Global Media Banner Variables # ********************************* $WFS_banner = false; $WFS_globalBanner = true; $WFS_bannerDefaultEdit = 0; # bestemmer hvilken banner som er forhåndsvalgt ved redigering $WFS_bannerRowsSplit = 10; # hvis det er flere bilder enn dette vil de deles i 2 kolonner i admin # Første banner $WFS_bannerName[0] = "Midtbilde"; $WFS_bannerMediaNum[0] = 15; $WFS_bannerMediaX[0] = 242; $WFS_bannerMediaY[0] = 200; # Andre banner #$WFS_bannerName[1] = "test"; #$WFS_bannerMediaNum[1] = 15; #$WFS_bannerMediaX[1] = 242; #$WFS_bannerMediaY[1] = 200; # ********************************* # *** Global Link List Variables # ********************************* $WFS_linkList = true; # enable/disable module $WFS_globalLinkList = true; $WFS_linkListDefaultEdit = 0; # bestemmer hvilken lenkeliste som er forhåndsvalgt ved redigering $WFS_linkListMediaEditWidth = 100; # Første linkliste $WFS_linkListName[0] = "Lenker"; $WFS_linkListMediaWidth[0] = 120; # Andre linkliste #$WFS_linkListName[1] = "Annet"; #$WFS_linkListMediaWidth[1] = 120; # ************************************* # *** Global Category Variables # ************************************* $WFS_categories = true; $WFS_globalCategories = true; # ************************************* # *** Global Document Archive Variables # ************************************* $WFS_documents = true; # enable/disable module ALLWAYS ENABLED $WFS_document_path = "../wf_doc/"; # NYTT 2009 $WFS_document_link_path = "wf_doc/"; $WFS_globalDocuments = true; $WFS_maxUploadDocumentSize = 2097152; # Max bytes upload $WFS_documentListDefaultEdit = 0; # bestemmer hvilket dokumentarkiv som er forhåndsvalgt ved redigering # Første dokumentarkiv $WFS_documentListName[0] = "Dokumenter"; # Andre dokumentarkiv #$WFS_documentListName[1] = "Kundeblad"; # ************************************* # *** Global Newsletter Variables # ************************************* $WFS_newsletter = false; # enable/disable module ALLWAYS ENABLED $WFS_globalNewsletterDisplayX = 150; $WFS_globalNewsletterLogo = ''; $WFS_newsletter_sender = "Haugaland HMS-senter AS "; $WFS_newsletter_reply = 'firmapost@haugaland-hms.no'; $WFS_newsletterContentMax = 10; $WFS_newsletterPreview = "preview.php"; $WFS_newsletterCSS = "../screen.css"; $WFS_newsletterMediaPath = "../wf_img_content/"; # ************************************* # *** Global Media Archive Variables # ************************************* $WFS_images_content_original_path = "../wf_img_content/"; # NYTT 2009 $WFS_images_content_display_path = "../wf_img_display/"; # NYTT 2009 $WFS_images_content_thumb_path = "../wf_img_thumb/"; # NYTT 2009 $WFS_thumb_path = "../wf_img_thumb/"; # NYTT 2009 $WFS_media = true; # enable/disable module ALLWAYS ENABLED $WFS_globalMediaList = true; # added as of 15.08.2005 !!! $WFS_mediaListDefaultEdit = 0; $WFS_mediaPerPage = 15; $WFS_maxUploadMediaSize = 2097152; # max bytes upload (New as of 01.12.2005) $WFS_maxMediaDisplayX = 800; $WFS_maxMediaDisplayY = 600; $WFS_mediaArchive_imagePopUp = true; # Media on content pages links to larger version $WFS_globalMediaThumbSize = 125; $WFS_globalMediaDisplayX = 200; # Første bildearkiv $WFS_mediaListName[0] = "Diverse"; # Andre bildearkiv #$WFS_mediaListName[1] = "Arbeid"; # ******************************************** # *** Global Course/Lesson Archive Variables # ******************************************** $WFS_courses = false; # enable/disable module $WFS_globalCourses = true; $WFS_courseListDefaultEdit = 6; # Første kursarkiv $WFS_courseListName[0] = "Våren 2009"; $WFS_courseProg[0] = 31; $WFS_courseListHide[0] = 1; # Andre kursarkiv #$WFS_courseListName[1] = "Høsten 2006"; #$WFS_courseProg[1] = 2; #$WFS_courseListHide[1] = 1; # ******************************************** # *** Global News Archive Variables # ******************************************** $WFS_news = false; # enable/disable module $WFS_newsArchive = true; $WFS_globalNews = true; $WFS_newsListDefaultEdit = 0; # Første nyhetsliste $WFS_newsListName[0] = "Avisklipp"; # Andre nyhetsliste #$WFS_newsListName[1] = "Internt"; # ******************************************** # *** Global Content Variables # ******************************************** $WFS_content = true; # allways enabled $WFS_contentHTitle = false; #editable Title-tag $WFS_globalContent = true; $WFS_contentMediaMax = 1; $WFS_contentEventList = true; # Added 2009, $WFS_contentListDefaultEdit = 0; $WFS_content_showUpdate = true; # Added as of 29.11.2005 ! $WFS_content_showAuthor = false; # Added as of 29.11.2005 ! $WFS_content_hideTitle = false; $WFS_content_imagePopUp = false; $WFS_contentDateSubSort = false; # Subsort content with same date # Variables dependent on content $WFS_latestNewsMaxCount = 4; $WFS_activeNewsMaxCount = 8; # Første innholsarkiv $WFS_contentListName[0] = "Artiikler"; # Andre innholsarkiv #$WFS_contentListName[1] = "Tjenester"; # ***************************** # *** Global Customer List HHMS # ***************************** $WFS_HHMS_customerList = false; # Kun HHMS (ID = 99985-99987) # County List $WFS_customerHHMSCounty[1] = "Haugesund"; $WFS_customerHHMSCounty[2] = "Karmøy"; $WFS_customerHHMSCounty[3] = "Tysvær"; $WFS_customerHHMSCounty[4] = "Sveio"; $WFS_customerHHMSCounty[5] = "Bokn"; $WFS_customerHHMSCounty[6] = "Vindafjord"; $WFS_customerHHMSCounty[7] = "Suldal"; $WFS_customerHHMSCounty[8] = "Sauda"; $WFS_customerHHMSCounty[9] = "Etne"; $WFS_customerHHMSCounty[10] = "Stord"; $WFS_customerHHMSCounty[11] = "Bømlo"; $WFS_customerHHMSCounty[12] = "Kvinnherad"; $WFS_customerHHMSCounty[13] = "Fitjar"; # Customer Branch List $WFS_customerBranch[1] = "Maritimt/offshore relatert næring"; $WFS_customerBranch[2] = "Offentlig virksomhet"; $WFS_customerBranch[3] = "Mekanisk-, kjemisk- og plastproduksjon"; $WFS_customerBranch[4] = "Trevareproduksjon og treforedling"; $WFS_customerBranch[5] = "Bygg- og anlegg / håndtverksvirksomhet"; $WFS_customerBranch[6] = "Transport"; $WFS_customerBranch[7] = "Salg og varehandel"; $WFS_customerBranch[8] = "Tjenester"; $WFS_customerBranch[9] = "Trykkeri / media"; $WFS_customerBranch[10] = "Hotell- og spisested"; $WFS_customerBranch[11] = "Reparasjon og salg av kjøretøy/anleggsmaskiner"; $WFS_customerBranch[12] = "Renovasjon / gjenvinning"; $WFS_customerBranch[13] = "Produksjon av næringsmidler"; $WFS_customerBranch[14] = "Annet"; # ******************************* # *** Global Marquee (rulletekst) # ******************************* $WFS_marquee = false; $WFS_globalMarquee = true; $WFS_marquee_width = 744; $WFS_marquee_height = 164; $WFS_marquee_speed = 8; # Bigger = slower !!! $WFS_marquee_pause_on_mouseover = 1; # 1 = yes, 0 = no $WFS_marqueeDefaultEdit = 0; # Første rulletekst $WFS_marqueeName[0] = "Rulletekst"; # Andre fulletekst #$WFS_marqueeName[1] = "RT 2"; # **************************** # Module switches (menu-links) # **************************** $WFS_latest = true; $WFS_search = true; $WFS_store = false; # Kun ryfylkemuseet (versjon 1) $WFS_geo_map = false; # Kun Ryfylkemuseet ! $WFS_contentNews = true; $WFS_siteMap = true; $WFS_contentNewsArchive = true; $WFS_signup = false; $WFS_contact = false; $WFS_memberLogin = true; $WFS_meta = true; # Ulike modulswitcher til ulike kunder $WFS_HHMS_utstillere2006 = false; $WFS_HHMS_customerList = false; $WFS_RYFJ_contact = false; $WFS_geo_map = false; # Kun Ryfylkemuseet ! # ********************************************************** # Standard tekst på ulike språk $langText["NO"][0] = "S&olsash;k"; $langText["NO"][1] = "Lenker"; $langText["NO"][2] = "Opplev Suldal"; $langText["NO"][3] = "Nettsted kart"; # Widget heading $langText["NO"][4] = "Meny"; $langText["NO"]["WF_read_more"] = "Les mer ..."; $langText["NO"]["WF_read_more_about"] = "Les mer om"; $langText["NO"]["WF_last_update"] = "Sist oppdatert"; $langText["NO"]["WF_last_update_by"] = "av"; # WF_admin form elements $langText["NO"]["choose_content"] = "Velg innhold"; $langText["EN"]["choose_content"] = "Choose content"; $langText["GE"]["choose_content"] = "Wählen Sie Inhalt"; $langText["NO"]["choose_media"] = "Velg bilde"; $langText["EN"]["choose_media"] = "Choose picture"; $langText["GE"]["choose_media"] = "Wählen Sie Abbildung"; # WFW2 news/news_archive $langText["NO"]["WF_news"] = "Aktuelt"; $langText["EN"]["WF_news"] = "News"; $langText["GE"]["WF_news"] = "Neuigkeiten"; $langText["NO"]["WF_news_archive"] = "Nyhetsarkiv"; $langText["EN"]["WF_news_archive"] = "News archive"; $langText["GE"]["WF_news_archive"] = "Nachrichten Archiv"; # WFW2 contact_form $langText["NO"]["contact_form_title"] = "Kontaktskjema"; # Widget heading $langText["NO"]["contact_form_subtitle"] = "Her kan du sende oss spørsmål"; # Widget text $langText["NO"]["contact_form_name"] = "Navn"; # Widget text $langText["NO"]["contact_form_e-mail"] = "E-post"; # Widget text $langText["NO"]["contact_form_subject"] = "Tittel"; # Widget text $langText["NO"]["contact_form_message"] = "Melding"; # Widget text $langText["NO"]["contact_form_send"] = "Send skjema"; # Widget text $langText["NO"]["contact_form_receipt"] = "Vi har mottatt meldingen din og vil kontakte deg så fort vi kan."; # Widget text $langText["EN"]["contact_form_title"] = "Contact form"; # Widget heading $langText["EN"]["contact_form_subtitle"] = "Please send us your questions here"; # Widget text $langText["EN"]["contact_form_name"] = "Name"; # Widget text $langText["EN"]["contact_form_e-mail"] = "E-mail"; # Widget text $langText["EN"]["contact_form_subject"] = "Subject"; # Widget text $langText["EN"]["contact_form_message"] = "Message"; # Widget text $langText["EN"]["contact_form_send"] = "Send"; # Widget text $langText["EN"]["contact_form_receipt"] = "We have received your message and will answer as soon as possible."; # Widget text $langText["GE"]["contact_form_title"] = "Anfrage"; # Widget heading $langText["GE"]["contact_form_subtitle"] = "Hier kõnnen sie ihre anfrage senden"; # Widget text $langText["GE"]["contact_form_name"] = "Name"; # Widget text $langText["GE"]["contact_form_e-mail"] = "E-mail"; # Widget text $langText["GE"]["contact_form_subject"] = "Thema"; # Widget text $langText["GE"]["contact_form_message"] = "Text"; # Widget text $langText["GE"]["contact_form_send"] = "Anfrage Senden"; # Widget text $langText["GE"]["contact_form_receipt"] = "Wir haben Ihre Meldung empfangen und werden so bald wie mõglich antworten."; # Widget text $langText["EN"][0] = "Search"; $langText["EN"][1] = "Links"; $langText["EN"][2] = "Experience Suldal"; $langText["EN"][3] = "Site map"; $langText["EN"][4] = "Menu"; $langText["EN"]["WF_read_more"] = "More ..."; $langText["EN"]["WF_read_more_about"] = "Read more about"; $langText["EN"]["WF_last_update"] = "Last update"; $langText["EN"]["WF_last_update_by"] = "by"; $langText["GE"][0] = "Suche"; $langText["GE"][1] = "Lenken"; $langText["GE"][2] = "Erfahren Suldal"; $langText["GE"][3] = "Site-Karte"; $langText["GE"][4] = "Menü"; $langText["GE"]["WF_read_more"] = "Mehr ..."; $langText["GE"]["WF_read_more_about"] = "Mehr ab"; $langText["GE"]["WF_last_update"] = "Letztes aktualisiert"; $langText["GE"]["WF_last_update_by"] = ""; $langText["FR"][0] = ".Search"; $langText["FR"][1] = ".Links"; $langText["FR"][2] = ".Experience Suldal"; $langText["FR"][3] = ".Nettstad kart"; $langText["FR"][4] = ".Meny"; $langText["FR"][5] = ".Meny"; $langText["EN"]["WF_last_update"] = "Last update"; $langText["EN"]["WF_last_update_by"] = "by"; ?> '; } # ********************************* # Funksjon for å velge artikkel # 02.01.2006 (31.12.2005) # ********************************* function WF_form_contentList($field_name, $choice_heading, $selectedID = 0, $extra_choices = false, $lang = "NO", $field_class, $sort_order = "contentItems.contentID ASC") { # $fieldName = 'form element name' # $choice_heading = 'top choice for list = ID-0' # $selectedID = 'ID of content that is preselected' # $extra_choices = 'true --> displays special functions' # $lang = 'language for displaying list in' # $field_class = 'css class for display' # $sort_order = 'SQL result sort order' echo ''; } # ********************************* # Funksjon for å velge dokument # 02.01.2006 (31.12.2005) # ********************************* function WF_form_documentList($field_name, $choice_heading, $selectedID = 0, $extra_info = false, $lang = "NO", $field_class, $sort_order = "documentName ASC") { # $fieldName = 'form element name' # $choice_heading = 'top choice for list = ID-0' # $selectedID = 'ID of content that is preselected' # $extra_info = 'true --> displays special functions' # $lang = 'language for displaying list in' # $field_class = 'css class for display' # $sort_order = 'SQL result sort order' echo ''; } # ********************************* # Funksjon for å velge kurs # 22.02.2006 # ********************************* function WF_form_courseList($field_name, $choice_heading, $selectedID = 0, $lang = "NO", $field_class, $sort_order = "courseDate ASC", $onChange = "") { # $fieldName = 'form element name' # $choice_heading = 'top choice for list = ID-0' # $selectedID = 'ID of content that is preselected' # $lang = 'language for displaying list in' # $field_class = 'css class for display' # $sort_order = 'SQL result sort order' echo ''; } # ********************************* # Funksjon for å liste opp spesialfunksjoner (NB! kun liste ikke '."\n".''."\n"; global $WFS_mediaListName; foreach ($WFS_mediaListName as $key => $value) { echo ''."\n"; #echo ''; $query_mediaList ="SELECT mediaList.mediaID, mediaName, mediaCaption FROM mediaList, mediaCaption WHERE mediaList.mediaID = mediaCaption.MediaID AND mediaCaption.mediaLang = '".$lang."' AND mediaListNr = '".$key."' ORDER BY ".$sort_order.";"; $query_result_mediaList = @mysql_query($query_mediaList) or die (mysql_error()); while ($row_mediaList = @mysql_fetch_array ($query_result_mediaList)) { echo ''."\n"; } } echo ''."\n"; } # ********************************* # Funksjon for å velge språk # 02.01.2006 # ********************************* function WF_form_languageList($field_name, $selectedLangShort = "NO", $lang = "NO", $field_class) { # $field_name = 'form element name' # $selectedLangShort = 'ID of content that is preselected' # $field_class = 'css class for display' echo ''; } # *************************************************************** # Sub-Funksjon for å velge meny fra komplett menyliste (alle menyer) # 02.01.2006 # *************************************************************** function WF_form_menuElementsRecursive($main_menu_nr, $parent_menu, $selectedID = 0, $lang = "NO", $maxLevels = 2) { $query = "SELECT menuItems.menuID, menuText, menuSortNr, menuLevel FROM menuItems, menuText WHERE menuItems.menuID = menuText.menuID AND menuParentID = '".$parent_menu."' AND menuText.menuLang = '".$lang."' AND menuItems.menuNr = '".$main_menu_nr."' ORDER BY menuSortNr ASC;"; $query_result = @mysql_query($query) or die (mysql_error()); $i = 0; while ($row = @mysql_fetch_array ($query_result)) { if ($row[menuLevel] < ($maxLevels-1)) { echo ''."\n"; WF_form_menuElementsRecursive ($main_menu_nr, $row[menuID], $selectedID, $lang, $maxLevels); } $i++; } return; } # ********************************* # Funksjon for å lage en fullstendig rekursiv menyliste # 10.01.2006 # ********************************* function WF_form_menuListRecursive($field_name, $choice_heading, $menuNames, $selectedID = 0, $superID = 0, $lang = "NO", $field_class, $maxLevels = 2) { # $field_name = 'form element name' # $choice_heading = 'top choice for list = ID-0' # $menuNames = 'array of top level menu-names' # $selected ID = 'ID of content that is preselected' # $superID = 'ID of menu that is edited (needed for top-level parent-link)' # $lang = 'language for displaying list in' # $field_class = 'css class for display' echo ''; } # ********************************* # Funksjon for å velge Lenkeliste # 10.01.2006 # ********************************* function WF_form_linkListList($field_name, $choice_heading, $listNames, $selectedID = 0, $lang = "NO", $field_class) { # $field_name = 'form element name' # $choice_heading = 'top choice for list = ID-0' # $listNames = 'array of link-list-names' # $selected ID = 'ID of list that is preselected' # $lang = 'language for displaying list in' # $field_class = 'css class for display' echo ''; } # ********************************* # Funksjon for å velge NyhetsArkivListe # 10.01.2006 # ********************************* function WF_form_newsListList($field_name, $choice_heading, $listNames, $selectedID = 0, $lang = "NO", $field_class) { # $field_name = 'form element name' # $choice_heading = 'top choice for list = ID-0' # $listNames = 'array of link-list-names' # $selected ID = 'ID of list that is preselected' # $lang = 'language for displaying list in' # $field_class = 'css class for display' echo ''; } # ********************************* # Funksjon for å velge Arkivliste # 10.01.2006 # ********************************* function WF_form_archiveList($field_name, $choice_heading, $listNames, $selectedID = 0, $lang = "NO", $field_class, $autoUpdate = "") { # $field_name = 'form element name' # $choice_heading = 'top choice for list = ID-0' # $listNames = 'array of link-list-names' # $selected ID = 'ID of list that is preselected' # $lang = 'language for displaying list in' # $field_class = 'css class for display' echo ''; } # ********************************* # Funksjon for å velge Foreldremeny # 10.01.2006 # ********************************* function WF_form_menuList($field_name, $choice_heading, $selectedID = 0, $lang = "NO", $field_class, $sort_order = "menuNr ASC") { # $field_name = 'form element name' # $choice_heading = 'top choice for list = ID-0' # $selected = 'ID of content that is preselected' # $lang = 'language for displaying list in' # $field_class = 'css class for display' # $sort_order = 'SQL result sort order' echo ''; } # ********************************* # Funksjon for å velge Kategori # 10.01.2006 # ********************************* function WF_form_categoryList($field_name, $choice_heading, $selectedID = 0, $lang = "NO", $field_class) { # $field_name = 'form element name' # $choice_heading = 'top choice for list = ID-0' # $selected = 'ID of category that is preselected' # $lang = 'language for displaying list in' # $field_class = 'css class for display' echo ''; } # ********************************* # Funksjon for å velge Bildearkiv # 10.01.2006 # ********************************* function WF_form_MediaListList($field_name, $choice_heading, $listNames, $selectedID = 0, $lang = "NO", $field_class) { # $field_name = 'form element name' # $choice_heading = 'top choice for list = ID-0' # $listNames = 'array of link-list-names' # $selected ID = 'ID of list that is preselected' # $lang = 'language for displaying list in' # $field_class = 'css class for display' echo ''; } # ********************************* # Funksjon for å velge Bildearkiv # 10.01.2006 # ********************************* function WF_form_ContentListList($field_name, $choice_heading, $listNames, $selectedID = 0, $lang = "NO", $field_class) { # $field_name = 'form element name' # $choice_heading = 'top choice for list = ID-0' # $listNames = 'array of link-list-names' # $selected ID = 'ID of list that is preselected' # $lang = 'language for displaying list in' # $field_class = 'css class for display' echo ''; } # ********************************************************************************* function DateToSQLDate ($date) { # DD.MM.== --> ==-MM-DD if (strlen($date) == 10) { $day = substr($date, 0, 2); $month = substr($date, 3, 2); $year = substr($date, 6, 4); return $year."-".$month."-".$day; } else { return $date; } } function SQLDateToDate ($date) { # ==-MM-DD --> DD.MM.== if (strlen($date) == 10) { $day = substr($date, 8, 2); $month = substr($date, 5, 2); $year = substr($date, 0, 4); return $day.".".$month.".".$year; } else { return $date; } } function text_to_webtext($text) { $text = htmlspecialchars($text, ENT_QUOTES); $text = str_replace("<", "<", $text); $text = str_replace(">", ">", $text); #$text = str_replace("ae", "æ", $text); #$text = str_replace("?", "ø", $text); #$text = str_replace("a°", "å", $text); #$text = str_replace("AE", "Æ", $text); #$text = str_replace("?", "Ø", $text); #$text = str_replace("A°", "Å", $text); $text = str_replace("\n", "
", $text); # NY ENDRING AV BR 21.05.08 !!!!! $text = str_replace("\r", "", $text); $text = str_replace("\\", "", $text); $text = str_replace("", "", $text); # * V1.x --> V2.x conversion (UTF-8 til ISO 8898) $text = str_replace("Ã¥", "å", $text); $text = str_replace("ø", "ø", $text); $text = str_replace("æ¸", "æ", $text); $text = str_replace("å", "å", $text); $text = str_replace("ø", "ø", $text); $text = str_replace("æ", "æ", $text); $text = str_replace("Ã…", "Å", $text); $text = str_replace("Ø", "Ø", $text); $text = str_replace("Æ", "Æ", $text); $text = trim($text); return $text; } function correctLinks ($text) { # Correct URL links $text = str_replace('target="_blank"', "target=\"_blank\"", $text); $text = str_replace('href="', "href=\"", $text); $text = str_replace('href = "', "href=\"", $text); # Correct Image links $text = str_replace('src="', "src=\"", $text); $text = str_replace('src = "', "src =\"", $text); # Correct Alignment tags $text = str_replace('valign = "bottom"', "valign = \"bottom\"", $text); $text = str_replace('valign="bottom"', "valign=\"bottom\"", $text); $text = str_replace('valign = "middle"', "valign = \"middle\"", $text); $text = str_replace('valign="middle"', "valign=\"middle\"", $text); $text = str_replace('valign = "top"', "valign = \"top\"", $text); $text = str_replace('valign="top"', "valign=\"top\"", $text); $text = str_replace('align = "left"', "align = \"left\"", $text); $text = str_replace('align="left"', "align=\"left\"", $text); $text = str_replace('align = "center"', "align = \"center\"", $text); $text = str_replace('align="center"', "align=\"center\"", $text); $text = str_replace('align = "right"', "align = \"right\"", $text); $text = str_replace('align="right"', "align=\"right\"", $text); $text = str_replace('">', "\">", $text); $text = str_replace('" >', "\" >", $text); return $text; } function cleanTableCode ($text) { $text = str_replace('
', '
', $text); $text = str_replace('
', '', $text); $text = str_replace('
', '', $text); $text = str_replace('
', '', $text); $text = str_replace('
', '', $text); $text = str_replace('
', '', $text); $text = str_replace('
', '', $text); $text = str_replace("

', '
', $text); $text = str_replace('
', '
', $text); $text = str_replace('
", '
', $text); $text = str_replace("
", '', $text); $text = str_replace('

  • ', '
    • ', $text); $text = str_replace('

    • ', '
    • ', $text); $text = str_replace('

    ', '
', $text); $text = str_replace('
', '
', $text); $text = str_replace('
', '', $text); $text = str_replace('
', '', $text); $text = str_replace('
', '', $text); $text = str_replace('
', '', $text); $text = str_replace('
', '', $text); $text = str_replace('
', '', $text); $text = str_replace("

', '
', $text); $text = str_replace('
', '
', $text); $text = str_replace('
", '
', $text); $text = str_replace("
", '', $text); $text = str_replace('

  • ', '
    • ', $text); $text = str_replace('

    • ', '
    • ', $text); $text = str_replace('

    ', '
', $text); return $text; } function find_month($month) { if ($month == 1) { $month = "januar"; } if ($month == 2) { $month = "februar"; } if ($month == 3) { $month = "mars"; } if ($month == 4) { $month = "april"; } if ($month == 5) { $month = "mai"; } if ($month == 6) { $month = "juni"; } if ($month == 7) { $month = "juli"; } if ($month == 8) { $month = "august"; } if ($month == 9) { $month = "september"; } if ($month == 10) { $month = "oktober"; } if ($month == 11) { $month = "november"; } if ($month == 12) { $month = "desember"; } return $month; } function find_day($day) { if ($day == 0) { $day = "Søndag"; } if ($day == 1) { $day = "Måndag"; } if ($day == 2) { $day = "Tysdag"; } if ($day == 3) { $day = "Onsdag"; } if ($day == 4) { $day = "Torsdag"; } if ($day == 5) { $day = "Fredag"; } if ($day == 6) { $day = "Laurdag"; } return $day; } function dateToText($date_string) { $day = substr($date_string, 0, 2); $day = $day + 0; $month = find_month(substr($date_string, 3, 2)); $year = substr($date_string, 6, 4); return $day.". ".$month." ".$year; } function doubleDateToText($date_string, $date_string2) { $day = substr($date_string, 0, 2); $day = $day + 0; $month = find_month(substr($date_string, 3, 2)); $day2 = substr($date_string2, 0, 2); $day2 = $day2 + 0; $month2 = find_month(substr($date_string2, 3, 2)); $year = substr($date_string2, 6, 4); return $day.". ".$month." - ".$day2.". ".$month2.", ".$year; } function strip_breaks($text) { $text = str_replace("
", "\n", $text); return $text; } function mark_url($text) { $text = str_replace("http://", "", $text); $x = 0; while ($x < strlen($text) - 8) { if (substr($text, $x, 3) == "www") { # finn komplett url $xx = 0; $foundend = false; while ($xx < strlen($text)) { if ((substr($text, $x + $xx, 1) != " ") && (substr($text, $x + $xx, 1) != "<")) { $xx++; } else { $foundend = true; } if ($xx == strlen($text) - 1) { $foundend = true; } if ($foundend) { # slutten funnet - do the magic ... $foundurl = substr($text, $x, $xx); $add_len = strlen($foundurl) + 39; $nystr = str_replace($foundurl, "".$foundurl."", $text); $text = $nystr; $xx = strlen($text); $x = $x + $add_len; } } } $x++; } return $text; } # ********************************* # Funksjoner for å generere From elements # 19.10.2008 # ********************************* # TextField function formFieldText($label, $fieldID, $labelClass, $inputClass, $size, $maxlength, $value, $title) { echo ''."\n"; echo ''."\n"; } # DateField function formFieldDate($label, $fieldID, $labelClass, $inputClass, $size, $maxlength, $value, $title) { echo ''."\n"; echo ' (dd.mm.åååå)'."\n"; } # Checkbox function formFieldCheckBox($label, $fieldID, $labelClass, $inputClass, $value, $title) { $checked = ""; if($value) { $checked = "checked"; } echo ''."\n"; echo ''."\n"; } # Submit (new, update, delete) function formFieldSubmit($label, $submitClass, $nextClass, $title) { if (!$_GET[strtolower($label)."ID"]) { echo ''."\n"; } else { echo ''."\n"; echo ''."\n"; } } # ChoiceList (inkl WF-list) function formFieldChoice($label, $fieldID, $labelClass, $inputClass, $value, $WFList, $title) { global $WFS_defaultLang; echo ''."\n"; switch($WFList) { case "languageList" : { WF_form_languageList($fieldID, $value, $WFS_defaultLang, $inputClass); break; } case "mediaList" : { WF_form_mediaList($fieldID, "Velg bilde", $value, false, $WFS_defaultLang, $inputClass, "mediaID ASC"); break; } case "contentList" : { WF_form_contentList($fieldID, "Velg artikkel", $value, false, $WFS_defaultLang, $inputClass, "contentItems.contentID ASC"); break; } } } ?> Brødrene af Sand

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT' at line 1