$TitlePage=__("Новости");
function actionStart() {
global $PHPShopInterface;
$PHPShopInterface->size="630,550";
$PHPShopInterface->link="news/adm_newsID.php";
$PHPShopInterface->setCaption(array("Дата","10%"),array("Заголовок","45%"),array("Краткая информация","45%"));
if(!empty($_GET['search']))
$where=array('title'=>" LIKE '%".$_GET['search']."%'",
'description'=>" LIKE '%".$_GET['search']."%'",
'content'=>" LIKE '%".$_GET['search']."%'",
'id'=>"='".$_GET['search']."'",
'date'=>"='".$_GET['search']."'"
);
else $where=false;
// SQL
$PHPShopOrm = new PHPShopOrm($GLOBALS['SysValue']['base']['table_name8']);
$PHPShopOrm->Option['where']=' or ';
$PHPShopOrm->debug=false;
$data = $PHPShopOrm->select(array('*'),$where,array('order'=>'id DESC'),array('limit'=>1000));
if(is_array($data))
foreach($data as $row) {
$PHPShopInterface->setRow($row[id],$row[date],$row[title],substr(strip_tags($row[description]),0,150)."...");
}
$PHPShopInterface->setAddItem('news/adm_news_new.php');
$PHPShopInterface->setSearch();
$PHPShopInterface->Compile();
}
$dom_name=iconv("windows-1251", "UTF-8", $name_rf);
require_once './lib/convert/idna_convert.class.php';
$IDN = new idna_convert();
$name=$IDN->encode($dom_name);