SetShowTable(TblModNewsSprTxt); //========= FIRST DEFINE PAGE LANGUAGE BEGIN =========== $ModulesPlug = new ModulesPlug(); $id_module = $ModulesPlug->GetModuleIdByPath( '/modules/mod_news/news.backend.php' ); $News = new NewsLayout(NULL, NULL, NULL, $id_module); $News->Page = $Page; if( !isset ( $_REQUEST['id'] ) ) $id = NULL; else $id = $_REQUEST['id']; if( !isset ( $_REQUEST['task'] ) ) $task = NULL; else $task = $_REQUEST['task']; if( !isset ( $_REQUEST['category'] ) ) $category = NULL; else $category = $_REQUEST['category']; // $str_cat - for mod_rewrite if( !isset( $_REQUEST['str_cat'] ) ) $str_cat = NULL; else $str_cat = $_REQUEST['str_cat']; // $str_news - for mod_rewrite if( !isset( $_REQUEST['str_news'] ) ) $str_news = NULL; else $str_news = $_REQUEST['str_news']; if( !isset ( $_REQUEST['page'] ) ) $page = 1; else $page = $_REQUEST['page']; if( isset( $_REQUEST['str_cat'] ) ){ $category = $News->GetIdCatByStrCat($str_cat); $News->category = $category; } if( isset( $_REQUEST['str_news'] ) ){ $id = $News->GetIdNewsByStrNews($str_news); $News->id = $id; } $FrontendPages = new FrontendPages(); $FrontendPages->lang_id = _LANG_ID; $FrontendPages->page=$page; $News->category = $category; $News->id = $id; $News->id_news = $id; $News->task = $task; $News->lang_id = _LANG_ID; $News->SetMetaData(); if ( empty($News->title) ) $Title = 'Новости'; else $Title = $News->title; if ( empty($News->description) ) $Description = 'Новости'; else $Description = $News->description; if ( empty($News->keywords) ) $Keywords = 'Новости'; else $Keywords = $News->keywords; /* $title = $Msg->show_text("_TXT_NEWS_TITLE"); $description = $Msg->show_text("_TXT_META_DESCRIPTION"); $keywords = $Msg->show_text("_TXT_META_KEYWORDS"); $title = $title.' | '.META_TITLE; $Description = $Description.', '.META_DESCRIPTION; $Keywords = $Keywords.', '.META_KEYWORDS; $T = trim( $News->GetTitle() ); $D = trim( $News->GetDescription() ); $K = trim( $News->GetKeywords() ); if( $T != '' ) $Title = $T.' | '.$title; else $Title = $title; if( $D != '' ) $Description = $D.'. '.$description; else $Description = $description; if( $K != '' ) $Keywords = $K.', '.$keywords; else $Keywords = $keywords; // echo "tit=".$T; */ //phpinfo(); $News->Page->SetTitle( $Title ); $News->Page->SetDescription( $Description ); $News->Page->SetKeywords( $Keywords ); // body($FrontendPages, $News); ob_start(); body(); $news_body = ob_get_clean(); $News->Page->og_image = $og_image; // супермега костиль $News->Page->WriteHeader($FrontendPages); echo $news_body; $News->Page->WriteFooter($FrontendPages); if( isset( $_REQUEST['category'] ) ) $News->fltr = ' and id_category='.$_REQUEST['category']; if( isset( $_REQUEST['id'] ) ) $News->fltr = ' and id='.$_REQUEST['id']; // =========================================================================================================== // Function : body() // Version : 1.2.0 // Date : 02.04.2007 // Parms : // Returns : true,false / Void // Description : // =========================================================================================================== // Programmer : Alex Kerest // Reason for change : Modification // Change Request Nbr: // =========================================================================================================== function body() { global $og_image; $sMsg = new ShowMsg(); $sMsg->SetShowTable(TblModNewsSprTxt); if($News->category==3) $tmp=$sMsg->show_text("_TXT_CONPANY_NEWS2"); else $tmp=$sMsg->show_text("_TXT_CONPANY_NEWS"); $poz=strpos($tmp, ' '); $s1=substr($tmp, 0, $poz); $l=strlen($tmp); $s2=substr($tmp, $poz, $l); if(!$s1){ $header=''.$s2.''; } else{ $header=''.$s1.''.$s2; } ?>

Події на часі

ShowNewsLinks(); ?>
Page->og_image; //var_dump($News->Page->og_image); } // end of function body ?>