"; var_dump($aO); var_dump($bO); echo "
"; var_dump(is_numeric($aO)); var_dump(is_numeric($bO)); exit; */ if(is_numeric($aO) && is_numeric($bO)) { //echo "ABC"; if($orderByDESC) { return dblcmp($aO, $bO); } else { return dblcmp($bO, $aO); } } //echo "$orderByDESC:$orderBy
"; //echo $aO.":".$bO."
"; //var_dump($aO); //var_dump($bO); if(!isset($aO)) { $aO = ""; } if(!isset($bO)) { $bO = ""; } if(is_object($aO) && $aO instanceof MultiCurrencyObject && is_object($bO) && $bO instanceof MultiCurrencyObject) { $aOM = clone $aO; $bOM = clone $bO; if($orderByDESC) { return dblcmp($aOM->exchangeTo("EUR")->getSingleAmount(), $bOM->exchangeTo("EUR")->getSingleAmount()); } else { return dblcmp($bOM->exchangeTo("EUR")->getSingleAmount(), $aOM->exchangeTo("EUR")->getSingleAmount()); } } if(is_object($aO) && $aO instanceof MultiCurrencyObject) { /* @var $aOM MultiCurrencyObject */ $aOM = clone $aO; $aO = $aOM->exchangeTo("EUR")->getSingleAmount(); } if(is_object($bO) && $bO instanceof MultiCurrencyObject) { /* @var $bOM MultiCurrencyObject */ $bOM = clone $bO; $bO = $bOM->exchangeTo("EUR")->getSingleAmount(); } if(is_object($aO) || is_array($aO)) { $aO = serialize($aO); } if(is_object($bO) || is_array($bO)) { $bO = serialize($bO); } //echo $aO.":".$bO."
"; if($orderByDESC) { //echo strtolower($aO)." ($aO), ".strtolower($bO)." ($bO)=".strcmp(strtolower($aO), strtolower($bO)); return strcmp(strtolower($aO), strtolower($bO)); } else { //echo strtolower($aO)." ($aO), ".strtolower($bO)." ($bO)=".strcmp(strtolower($aO), strtolower($bO)); return strcmp(strtolower($bO), strtolower($aO)); } } abstract class BaseRenderObject { public abstract function hashCode(); public abstract function getInternalTitle(); }connect(); } function insertCMSPage($arrFields) { $sql = $this->array2SQL_Insert("CMSPage", $arrFields); return $this->query($sql); } function updateCMSPage($arrFields, $CMSPage_Code) { $arrFieldsWhere = Array("CMSPage_Code" => $CMSPage_Code); $sql = $this->array2SQL_Update("CMSPage", $arrFields, " WHERE " . $this->array2SQL_Where($arrFieldsWhere)); return $this->query($sql); } function deleteCMSPage($CMSPage_Code) { $arrFieldsWhere = Array("CMSPage_Code" => $CMSPage_Code); $sql = $this->array2SQL_Delete("CMSPage", $arrFieldsWhere); return $this->query($sql); } function getCMSPage($CMSPage_Code) { $sql = "SELECT * FROM CMSPage WHERE CMSPage_Code = " . $this->sql_strnull($CMSPage_Code); $result = $this->query($sql); $row = $this->fetch($result); return $row; } function getAllCMSPages($orderBy = 'CMSPage_Code') { $arrList = Array(); $sql = "SELECT * FROM CMSPage ORDER BY " . $orderBy; $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[] = $row; } } return $arrList; } function getAllCMSPagesWithBoxesCount($orderBy = 'CMSPage_Code') { $arrList = Array(); $sql = "SELECT * FROM CMSPage ORDER BY " . $orderBy; $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[$row["CMSPage_Code"]] = $row; } } $sql = "SELECT CMSPage.*, COUNT(CMSBox.CMSBox_ID) as _BOXES_COUNT FROM CMSPage CROSS JOIN CMSBox USING(CMSPage_Code) GROUP BY CMSPage_Code ORDER BY " . $orderBy; $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[$row["CMSPage_Code"]] = $row; } } return $arrList; } function getCMSPageRevisionsFromCMSPageCode($cmsPageCode) { $arrList = Array(); $sql = "SELECT * FROM CMSPageRevision WHERE CMSPage_Code = " . $this->sql_strnull($cmsPageCode); $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[] = $row; } } return $arrList; } function getCMSBoxesFromCMSPageCodeRevision($cmsPageCode, $revisionID) { $arrList = Array(); $sql = "SELECT * FROM CMSBox WHERE CMSPage_Code = " . $this->sql_strnull($cmsPageCode) . " AND CMSPageRevision_Revision=" . $this->sql_strnull($revisionID); $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[] = $row; } } return $arrList; } function insertOrUpdateCMSPageRevision($arrFields, $CMSPage_Code, $revisionID) { $arrFieldsWhere = Array( "CMSPage_Code" => $CMSPage_Code, "CMSPageRevision_Revision" => $revisionID ); $sql = $this->array2SQL_InsertOrUpdate("CMSPageRevision", $arrFields, " WHERE " . $this->array2SQL_Where($arrFieldsWhere)); return $this->query($sql); } function insertOrUpdateCMSBox($arrFields, $CMSBox_ID) { if(!$CMSBox_ID) { $sql = $this->array2SQL_Insert("CMSBox", $arrFields); } else { $arrFieldsWhere = Array("CMSBox_ID" => $CMSBox_ID); unset($arrFields["CMSBox_ID"]); $sql = $this->array2SQL_Update("CMSBox", $arrFields, " WHERE " . $this->array2SQL_Where($arrFieldsWhere)); } // die($sql); return $this->query($sql); } function insertCMSBox($arrFields) { $sql = $this->array2SQL_Insert("CMSBox", $arrFields); return $this->query($sql); } function updateCMSBox($arrFields, $CMSBox_ID) { $arrFieldsWhere = Array("CMSBox_ID" => $CMSBox_ID); $sql = $this->array2SQL_Update("CMSBox", $arrFields, " WHERE " . $this->array2SQL_Where($arrFieldsWhere)); return $this->query($sql); } function deleteCMSBox($CMSBox_ID) { $arrFieldsWhere = Array("CMSBox_ID" => $CMSBox_ID); $sql = $this->array2SQL_Delete("CMSBoxLanguage", $arrFieldsWhere); $this->query($sql); $sql = $this->array2SQL_Delete("CMSBox_Image", $arrFieldsWhere); $this->query($sql); $sql = $this->array2SQL_Delete("CMSBox_ArticleShopCategory", $arrFieldsWhere); $this->query($sql); $sql = $this->array2SQL_Delete("CMSBox_Article", $arrFieldsWhere); $this->query($sql); $sql = $this->array2SQL_Delete("CMSBox_CMSBox", Array("CMSBox_ID_Container" => $CMSBox_ID)); $this->query($sql); $sql = $this->array2SQL_Delete("CMSBox", $arrFieldsWhere); $this->query($sql); } function getCMSBox($CMSBox_ID) { $sql = "SELECT * FROM CMSBox WHERE CMSBox_ID = " . $this->sql_strnull($CMSBox_ID); $result = $this->query($sql); $row = $this->fetch($result); return $row; } function getAllCMSBoxs($orderBy = 'CMSBox_ID') { $arrList = Array(); $sql = "SELECT * FROM CMSBox ORDER BY " . $orderBy; $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[] = $row; } } return $arrList; } function getCMSBoxArticles($cmsBoxID) { $arrList = Array(); $sql = "SELECT * FROM CMSBox_Article WHERE CMSBox_ID = " . $this->sql_strnull($cmsBoxID); $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[] = $row; } } return $arrList; } function getCMSBoxArticleCategorys($cmsBoxID) { $arrList = Array(); $sql = "SELECT * FROM CMSBox_ArticleShopCategory WHERE CMSBox_ID = " . $this->sql_strnull($cmsBoxID); $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[] = $row; } } return $arrList; } function getCMSBoxImages($cmsBoxID) { $arrList = Array(); $sql = "SELECT * FROM CMSBox_Image WHERE CMSBox_ID = " . $this->sql_strnull($cmsBoxID); $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[] = $row; } } return $arrList; } function getCMSBoxChilds($cmsBoxID) { $arrList = Array(); $sql = "SELECT * FROM CMSBox_CMSBox WHERE CMSBox_ID_Container = " . $this->sql_strnull($cmsBoxID); $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[] = $row; } } return $arrList; } function getCMSBoxLanguages($cmsBoxID) { $arrList = Array(); $sql = "SELECT * FROM CMSBoxLanguage WHERE CMSBox_ID = " . $this->sql_strnull($cmsBoxID); $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[] = $row; } } return $arrList; } function insertDeleteCMSBoxArticles($arrArticles, $CMSBox_ID) { $arrFieldsWhere = Array("CMSBox_ID" => $CMSBox_ID); $sql = $this->array2SQL_Delete("CMSBox_Article", $arrFieldsWhere); $this->query($sql); foreach($arrArticles as $row) { $sql = $this->array2SQL_Insert("CMSBox_Article", $row); $this->query($sql); } } function insertDeleteCMSBoxArticleCategorys($arrArticleCategorys, $CMSBox_ID) { $arrFieldsWhere = Array("CMSBox_ID" => $CMSBox_ID); $sql = $this->array2SQL_Delete("CMSBox_ArticleShopCategory", $arrFieldsWhere); $this->query($sql); foreach($arrArticleCategorys as $row) { $sql = $this->array2SQL_Insert("CMSBox_ArticleShopCategory", $row); $this->query($sql); } } function insertDeleteCMSBoxImages($arrImages, $CMSBox_ID) { $arrFieldsWhere = Array("CMSBox_ID" => $CMSBox_ID); $sql = $this->array2SQL_Delete("CMSBox_Image", $arrFieldsWhere); $this->query($sql); foreach($arrImages as $row) { $sql = $this->array2SQL_Insert("CMSBox_Image", $row); $this->query($sql); } } function insertDeleteCMSBoxLanguages($arrLanguages, $CMSBox_ID) { $arrFieldsWhere = Array("CMSBox_ID" => $CMSBox_ID); $sql = $this->array2SQL_Delete("CMSBoxLanguage", $arrFieldsWhere); $this->query($sql); foreach($arrLanguages as $row) { $sql = $this->array2SQL_Insert("CMSBoxLanguage", $row); $this->query($sql); } } function getAllCMSBoxContentWithRevisions($orderBy = 'CMSBoxContent_ID') { $arrList = Array(); $sql = "SELECT CMSBoxContent_ID, MAX(CMSBoxContentRevision_Revision) as _MAX_REVISION FROM CMSBoxContentRevision"; $result = $this->query($sql); if($this->numrows($result) > 0) { while(($row = $this->fetch($result))) { $arrList[] = $row; } } return $arrList; } }