0) { if (SingleResult("SELECT `Status` FROM `wwbestelinfo` WHERE `OrderId`=\"" . $_POST['OrderId'] . "\"")==0) { $OrderId = $_POST['OrderId']; } else $OrderId = CalcNewOrderId(); } else $OrderId = $_POST['OrderId']; } elseif (isset($_GET['OrderId'])) { if (SingleResult("SELECT COUNT(*) FROM `wwbestelinfo` WHERE `OrderId`=\"" . $_GET['OrderId'] . "\"")>0) { if (SingleResult("SELECT `Status` FROM `wwbestelinfo` WHERE `OrderId`=\"" . $_GET['OrderId'] . "\"")==0) { $OrderId = $_GET['OrderId']; } else $OrderId = CalcNewOrderId(); } else $OrderId = $_GET['OrderId']; } else { $OrderId = CalcNewOrderId(); } ?>GetDefaultLanguage(); if (isset($_GET['lId'])) { setcookie('LanguageId', $_GET['lId'], time()+60*60*24*365); $this->currentLanguageId = $_GET['lId']; } elseif (!isset($_COOKIE['LanguageId'])) { setcookie('LanguageId', $this->defaultLanguageId, time()+60*60*24*365); $this->currentLanguageId = $this->defaultLanguageId; } elseif (isset($_COOKIE['LanguageId'])) { $this->currentLanguageId = $_COOKIE['LanguageId']; if (SingleResult("SELECT `Active` FROM `global_languages` WHERE `LanguageId`=" . $this->currentLanguageId) == 0) $this->currentLanguageId = $this->defaultLanguageId; } } // Get default language function GetDefaultLanguage() { $this->defaultLanguageId = SingleResult("SELECT `LanguageId` FROM `global_languages` WHERE `Default`>0"); } /*********************************************************************************************/ /* */ /* Description */ /* */ /*********************************************************************************************/ // Get max Id function GetMaxDescriptionId() { if (SingleResult("SELECT COUNT(*) FROM `global_txt_descriptions`") == 0) return 0; else return SingleResult("SELECT MAX(`DescriptionId`) FROM `global_txt_descriptions`"); } // Get Nr of descriptions by Id and LanguageId function GetNrOfDescriptions($id, $languageId) { return SingleResult("SELECT COUNT(*) FROM `global_txt_descriptions` WHERE `DescriptionId`=" . $id . " AND `LanguageId`=" . $languageId); } // Get description by Id and LanguageId function GetDescription($id, $languageId) { if (SingleResult("SELECT COUNT(*) FROM `global_txt_descriptions` WHERE `DescriptionId`=" . $id . " AND `LanguageId`=" . $languageId) == 0) return ''; else return SingleResult("SELECT `Text` FROM `global_txt_descriptions` WHERE `DescriptionId`=" . $id . " AND `LanguageId`=" . $languageId); } // Update description function UpdateDescription($id, $languageId, $text) { RunQuery("UPDATE `global_txt_descriptions` SET `Text`=\"" . $text . "\", `ModifiedBy`=\"" . $_SESSION['UserName'] . "\", `ModifyDate`=\"" . date("Y-m-d H:i:s") . "\"" . " WHERE `DescriptionId`=" . $id . " AND `LanguageId`=" . $languageId) or die("Het opslaan van de gegevens is niet gelukt in tabel [global_txt_descriptions], neem contact op met Cox IT Producties.\n"); } // Insert description function InsertDescription($id, $languageId, $text) { RunQuery("INSERT INTO `global_txt_descriptions` (`LanguageId`, `DescriptionId`, `Text`, `CreatedBy`, `CreateDate`, `ModifiedBy`, `ModifyDate`) VALUES (" . $languageId . ", " . $id . ", \"" . $text . "\", \"" . $_SESSION['UserName'] . "\", \"" . date("Y-m-d H:i:s") . "\", \"" . $_SESSION['UserName'] . "\", \"" . date("Y-m-d H:i:s") . "\")") or die("Het opslaan van de gegevens is niet gelukt in tabel [global_txt_descriptions], neem contact op met Cox IT Producties.\n"); } // Insert description function SaveDescription($id, $languageId, $text) { $maxDescriptionId = $this->GetMaxDescriptionId(); if ($id == 0) $id = ($maxDescriptionId + 1); if ($this->GetNrOfDescriptions($id, $languageId) > 0) $this->UpdateDescription($id, $languageId, $text); else { $this->InsertDescription($id, $languageId, $text); } return $id; } /*********************************************************************************************/ /* */ /* Texts */ /* */ /*********************************************************************************************/ // Get max Id function GetMaxTextId() { if (SingleResult("SELECT COUNT(*) FROM `global_txt_texts`") == 0) return 0; else return SingleResult("SELECT MAX(`ContentId`) FROM `global_txt_texts`"); } // Get Nr of texts by Id and LanguageId function GetNrOfTexts($id, $languageId) { return SingleResult("SELECT COUNT(*) FROM `global_txt_texts` WHERE `ContentId`=" . $id . " AND `LanguageId`=" . $languageId); } // Get description by Id and LanguageId function GetText($id, $languageId) { if (SingleResult("SELECT COUNT(*) FROM `global_txt_texts` WHERE `ContentId`=" . $id . " AND `LanguageId`=" . $languageId) == 0) return ''; else return SingleResult("SELECT `Text` FROM `global_txt_texts` WHERE `ContentId`=" . $id . " AND `LanguageId`=" . $languageId); } // Update text function UpdateText($id, $languageId, $text) { RunQuery("UPDATE `global_txt_texts` SET `Text`=\"" . $text . "\", `ModifiedBy`=\"" . $_SESSION['UserName'] . "\", `ModifyDate`=\"" . date("Y-m-d H:i:s") . "\"" . " WHERE `ContentId`=" . $id . " AND `LanguageId`=" . $languageId) or die("Het opslaan van de gegevens is niet gelukt in tabel [global_txt_texts], neem contact op met Cox IT Producties.\n"); } // Insert text function InsertText($id, $languageId, $text) { RunQuery("INSERT INTO `global_txt_texts` (`LanguageId`, `ContentId`, `Text`, `CreatedBy`, `CreateDate`, `ModifiedBy`, `ModifyDate`) VALUES (" . $languageId . ", " . $id . ", \"" . $text . "\", \"" . $_SESSION['UserName'] . "\", \"" . date("Y-m-d H:i:s") . "\", \"" . $_SESSION['UserName'] . "\", \"" . date("Y-m-d H:i:s") . "\")") or die("Het opslaan van de gegevens is niet gelukt in tabel [global_txt_texts], neem contact op met Cox IT Producties.\n"); } // Insert text function SaveText($id, $languageId, $text) { $maxTextId = $this->GetMaxTextId(); if ($id == 0) $id = ($maxTextId + 1); if ($this->GetNrOfTexts($id, $languageId) > 0) $this->UpdateText($id, $languageId, $text); else { $this->InsertText($id, $languageId, $text); } return $id; } /*********************************************************************************************/ /* */ /* rteSafe voor Rich Text Editor */ /* */ /*********************************************************************************************/ function rteSafe($strText) { //returns safe code for preloading in the RTE $tmpString = $strText; //convert all types of single quotes $tmpString = str_replace(chr(145), chr(39), $tmpString); $tmpString = str_replace(chr(146), chr(39), $tmpString); $tmpString = str_replace("'", "'", $tmpString); //convert all types of double quotes $tmpString = str_replace(chr(147), chr(34), $tmpString); $tmpString = str_replace(chr(148), chr(34), $tmpString); // $tmpString = str_replace("\"", "\"", $tmpString); //replace carriage returns & line feeds $tmpString = str_replace(chr(10), " ", $tmpString); $tmpString = str_replace(chr(13), " ", $tmpString); return $tmpString; } } ?>
Fatal error: Class 'cTexts' not found in /home/vhosting/ab/vhost0025493/domains/stefmani.com/htdocs/www/index.php on line 17