(.*?)<\/title>/is', $content, $title); $metatags['title']= $title[1]; $title=$title[1]; $tpl->load_template('tv.tpl'); $tpl->set('{content}', $content); $tpl->compile('content'); $tpl->clear(); //exit; } } */ if ($content=='') { set_time_limit(0); ////поддючаем шаблоны/// $maintpl=file_get_contents('engine/modules/tvprogram/tpl/maino-ru.tpl'); $kanalrus1=file_get_contents('engine/modules/tvprogram/tpl/kanalruso1.tpl'); $kanalua1=file_get_contents('engine/modules/tvprogram/tpl/kanaluao1.tpl'); $bleklist = file_get_contents('engine/modules/tvprogram/txt/config/blakru.txt'); $bleklist1 = file_get_contents('engine/modules/tvprogram/txt/config/blakua.txt'); $bleklist2 = file_get_contents('engine/modules/tvprogram/txt/config/blakall.txt'); preg_match_all( '/(.*?)<\/id>/is',$bleklist, $blek); preg_match_all( '/(.*?)<\/id>/is',$bleklist1, $blek1); preg_match_all( '/(.*?)<\/id>/is',$bleklist2, $blek2); $blek[1]=array_merge($blek[1],$blek1[1]); $blek[1]=array_merge($blek[1],$blek2[1]); /////переводчик////////// include_once 'Yandex_Translate.php'; include_once 'Big_Text_Translate.php'; header('Content-Type: text/html; charset=win-1251'); function GTR($str,$in1,$in2) { $translator = new Yandex_Translate(); $bigText = $str; $textArray = Big_Text_Translate::toBigPieces($bigText); $numberOfTextItems = count($textArray); foreach ($textArray as $key=>$textItem){ $translatedItem = $translator->yandexTranslate($in1, $in2, $textItem); $translatedArray[$key] = $translatedItem; } $translatedBigText = Big_Text_Translate::fromBigPieces($translatedArray); return $translatedBigText; } # Комбинации перевода: #[0] => en-ru,[1] => ru-en,[2] => ru-uk,[3] => uk-ru,[4] => pl-ru, #[5] => ru-pl,[6] => tr-ru,[7] => ru-tr,[8] => de-ru,[9] => ru-de, #[10] => fr-ru,[11] => ru-fr,[12] => it-ru,[13] => es-ru,[14] => ru-es #include_once 'Yandex_Translate.php'; #$pairs = $translator->yandexGetLangsPairs(); #print_r($pairs); # Запрос к функции на перевод. /////переводчик////////// /* $text=iconv('windows-1251','utf-8//IGNORE',"Привет"); $text=iconv('utf-8','windows-1251//IGNORE',GTR($text,'ru','uk')); $content=$text;*/ if ($_GET['p']=='1') { $ch = curl_init(); //GET запрос указывается в строке URL curl_setopt($ch, CURLOPT_URL, 'http://kinoplaneta.net/partner/view/tvru/tv_channel.html'); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($ch, CURLOPT_REFERER, 'http://kinoplaneta.net/'); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2'); $data = curl_exec($ch); curl_close($ch); preg_match_all( '/Российские телеканалы<\/b>:<\/td><\/tr><\/table>(.*?)
Украинские телеканалы<\/b>/is', $data, $rkanal); preg_match_all( '/
Украинские телеканалы<\/b>:(.*?)Зарубежные телеканалы<\/b>:/is', $data, $ukanal); preg_match_all( '/Зарубежные телеканалы<\/b>:(.*?)<\/div>/is', $data, $dkanal); preg_match_all( '/(.*?)<\/a>/is', $rkanal[1][1], $rkanal1); preg_match_all( '/(.*?)<\/a>/is', $ukanal[1][1], $ukanal1); preg_match_all( '/(.*?)<\/a>/is', $dkanal[1][1], $dkanal1); //// список каналов ///// $html=array(); for ($l = 0; $l < count($rkanal1[1]); $l++) { $rkanal1[1][$l]=str_replace('.html','',$rkanal1[1][$l]); //$RUSkanal=$RUSkanal.' '.$rkanal1[2][$l].'
'; $status=0; for ($s = 0; $s < count($blek[1]); $s++) if($blek[1][$s]==$rkanal1[1][$l])$status=1; if($status==1) { }else{ //$RUSkanal=$RUSkanal.' '.$rkanal1[2][$l].'
'; $RUSkanal=$RUSkanal.'

'.$rkanal1[2][$l].'

'; } } ///////////// for ($l = 0; $l < count($ukanal1[1]); $l++) { $ukanal1[1][$l]=str_replace('.html','',$ukanal1[1][$l]); $status=0; for ($s = 0; $s < count($blek[1]); $s++) if($blek[1][$s]==$ukanal1[1][$l])$status=1; if($status==1) { }else{ $UAkanal=$UAkanal.'

'.$ukanal1[2][$l].'

'; } } ///////////////////// for ($l = 0; $l < count($dkanal1[1]); $l++) { $dkanal1[1][$l]=str_replace('.html','',$dkanal1[1][$l]); $status=0; for ($s = 0; $s < count($blek[1]); $s++) if($blek[1][$s]==$dkanal1[1][$l])$status=1; if($status==1) { }else{ $DRkanal=$DRkanal.'

'.$dkanal1[2][$l].'

'; } } //// список каналов ///// ////перевод////////перевод////////перевод////////перевод////////перевод//// if ($_GET['l']=='ukr') { $RUSkanal=iconv('windows-1251','utf-8//IGNORE',$RUSkanal); $RUSkanal=iconv('utf-8','windows-1251//IGNORE',GTR($RUSkanal,'ru','uk')); $UAkanal=iconv('windows-1251','utf-8//IGNORE',$UAkanal); $UAkanal=iconv('utf-8','windows-1251//IGNORE',GTR($UAkanal,'ru','uk')); $DRkanal=iconv('windows-1251','utf-8//IGNORE',$DRkanal); $DRkanal=iconv('utf-8','windows-1251//IGNORE',GTR($DRkanal,'ru','uk')); $DRkanal=str_replace('
','
NICKELODEON
',$DRkanal); $DRkanal=str_replace('href="/tv/','href="/tvu/',$DRkanal); $DRkanal=str_replace('/onlain-tv/','/onlain-tvu/',$DRkanal); $UAkanal=str_replace('/onlain-tv/','/onlain-tvu/',$UAkanal); $RUSkanal=str_replace('/onlain-tv/','/onlain-tvu/',$RUSkanal); } ////перевод////////перевод////////перевод////////перевод//// $title='Телепрограмма ТВ'; if ($_GET['l']=='ukr') { $content=file_get_contents('engine/modules/tvprogram/tpl/maino-ua.tpl'); }else{ $content=$maintpl;} $content=str_replace('{title}','Телепрограмма ТВ',$content); $content=str_replace('{kanalru}',$RUSkanal,$content); $content=str_replace('{kanalua}',$UAkanal,$content); $content=str_replace('{all}',$DRkanal,$content); $content=str_replace('
.','',$content); $content=str_replace('\"','"',$content); } if (isset($_GET['id'])) { $ch = curl_init(); //GET запрос указывается в строке URL curl_setopt($ch, CURLOPT_URL, 'http://kinoplaneta.net/partner/view/tvru/'.$_GET['id'].'.html'); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); //curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30); curl_setopt($ch, CURLOPT_REFERER, 'http://kinoplaneta.net/'); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.1; rv:6.0.2) Gecko/20100101 Firefox/6.0.2'); $data = curl_exec($ch); curl_close($ch); preg_match_all('/

(.*?)<\/h2>/is', $data, $title1); $title=$title1[1][0]; preg_match_all('/

(.*?)<\/tr><\/table><\/td><\/tr><\/table>/is', $data, $dey); preg_match_all('/

(.*?)<\/p><\/td>

(.*?)<\/td>/is',$dey[1][0],$dey1); preg_match_all('/

(.*?)<\/p><\/td>

(.*?)<\/td>/is',$dey[1][1],$dey2); preg_match_all('/

(.*?)<\/p><\/td>

(.*?)<\/td>/is',$dey[1][2],$dey3); preg_match_all('/

(.*?)<\/p><\/td>

(.*?)<\/td>/is',$dey[1][3],$dey4); preg_match_all('/

(.*?)<\/p><\/td>

(.*?)<\/td>/is',$dey[1][4],$dey5); preg_match_all('/

(.*?)<\/p><\/td>

(.*?)<\/td>/is',$dey[1][5],$dey6); preg_match_all('/

(.*?)<\/p><\/td>

(.*?)<\/td>/is',$dey[1][6],$dey7); $main_str=$data; //искомый текст $my_str='

Понедельник (Мегаспорт)

'; $pos = strpos($main_str, $my_str); if ($pos === false) { }else{ $dey7=$dey6; $dey6=$dey5; $dey5=$dey4; $dey4=$dey5; $dey3=$dey2; $dey2=$dey1; $dey1=$array = array( "1" => "", ); } //print $dey1[1][0].'

'; for ($l = 0; $l <= count($dey1[1]); $l++) { $pn=$pn.' '.$dey1[2][$l].' - '.$dey1[3][$l].'
'; } for ($l = 0; $l <= count($dey2[1]); $l++) { $vt=$vt.' '.$dey2[2][$l].' - '.$dey2[3][$l].'
'; } for ($l = 0; $l <= count($dey3[1]); $l++) { $sr=$sr.' '.$dey3[2][$l].' - '.$dey3[3][$l].'
'; } for ($l = 0; $l <= count($dey4[1]); $l++) { $ct=$ct.' '.$dey4[2][$l].' - '.$dey4[3][$l].'
'; } for ($l = 0; $l <= count($dey5[1]); $l++) { $pt=$pt.' '.$dey5[2][$l].' - '.$dey5[3][$l].'
'; } for ($l = 0; $l <= count($dey6[1]); $l++) { $sb=$sb.' '.$dey6[2][$l].' - '.$dey6[3][$l].'
'; } for ($l = 0; $l <= count($dey7[1]); $l++) { $nd=$nd.' '.$dey7[2][$l].' - '.$dey7[3][$l].'
'; } $pn=str_replace('background-color:#E6E6E6; border:1px solid #C0C0C0; padding:1px; width:45px; white-space:nowrap;','color:bleak;font-weight:bold;',$pn); $pn=str_replace('background-color:#F1BF20; border:1px solid #B99217; color:#FFFFFF; padding:1px; width:45px; white-space:nowrap;','color:red;font-weight:bold;',$pn); $pn=str_replace('
-
','',$pn); $pn=str_replace('','',$pn); $vt=str_replace('background-color:#E6E6E6; border:1px solid #C0C0C0; padding:1px; width:45px; white-space:nowrap;','color:bleak;font-weight:bold;', $vt); $vt=str_replace('background-color:#F1BF20; border:1px solid #B99217; color:#FFFFFF; padding:1px; width:45px; white-space:nowrap;','color:red;font-weight:bold;', $vt); $vt=str_replace('
-
','', $vt); $vt=str_replace('','', $vt); $sr=str_replace('background-color:#E6E6E6; border:1px solid #C0C0C0; padding:1px; width:45px; white-space:nowrap;','color:bleak;font-weight:bold;', $sr); $sr=str_replace('background-color:#F1BF20; border:1px solid #B99217; color:#FFFFFF; padding:1px; width:45px; white-space:nowrap;','color:red;font-weight:bold;', $sr); $sr=str_replace('
-
','', $sr); $sr=str_replace('','', $sr); $ct=str_replace('background-color:#E6E6E6; border:1px solid #C0C0C0; padding:1px; width:45px; white-space:nowrap;','color:bleak;font-weight:bold;', $ct); $ct=str_replace('background-color:#F1BF20; border:1px solid #B99217; color:#FFFFFF; padding:1px; width:45px; white-space:nowrap;','color:red;font-weight:bold;', $ct); $ct=str_replace('
-
','', $ct); $ct=str_replace('','', $ct); $pt=str_replace('background-color:#E6E6E6; border:1px solid #C0C0C0; padding:1px; width:45px; white-space:nowrap;','color:bleak;font-weight:bold;', $pt); $pt=str_replace('background-color:#F1BF20; border:1px solid #B99217; color:#FFFFFF; padding:1px; width:45px; white-space:nowrap;','color:red;font-weight:bold;', $pt); $pt=str_replace('
-
','', $pt); $pt=str_replace('','', $pt); $sb=str_replace('background-color:#E6E6E6; border:1px solid #C0C0C0; padding:1px; width:45px; white-space:nowrap;','color:bleak;font-weight:bold;', $sb); $sb=str_replace('background-color:#F1BF20; border:1px solid #B99217; color:#FFFFFF; padding:1px; width:45px; white-space:nowrap;','color:red;font-weight:bold;', $sb); $sb=str_replace('
-
','', $sb); $sb=str_replace('','', $sb); $nd=str_replace('background-color:#E6E6E6; border:1px solid #C0C0C0; padding:1px; width:45px; white-space:nowrap;','color:bleak;font-weight:bold;', $nd); $nd=str_replace('background-color:#F1BF20; border:1px solid #B99217; color:#FFFFFF; padding:1px; width:45px; white-space:nowrap;','color:red;font-weight:bold;', $nd); $nd=str_replace('
-
','', $nd); $nd=str_replace('','', $nd); ////перевод////////перевод////////перевод////////перевод////////перевод//// $titlek=$title; $title=str_replace('Телепрограмма ','Смотреть онлайн ',$title); if ($_GET['l']=='ukr') { $pn=iconv('windows-1251','utf-8//IGNORE',$pn); $pn=iconv('utf-8','windows-1251//IGNORE',GTR($pn,'ru','uk')); $vt=iconv('windows-1251','utf-8//IGNORE',$vt); $vt=iconv('utf-8','windows-1251//IGNORE',GTR($vt,'ru','uk')); $sr=iconv('windows-1251','utf-8//IGNORE',$sr); $sr=iconv('utf-8','windows-1251//IGNORE',GTR($sr,'ru','uk')); $ct=iconv('windows-1251','utf-8//IGNORE',$ct); $ct=iconv('utf-8','windows-1251//IGNORE',GTR($ct,'ru','uk')); $pt=iconv('windows-1251','utf-8//IGNORE',$pt); $pt=iconv('utf-8','windows-1251//IGNORE',GTR($pt,'ru','uk')); $sb=iconv('windows-1251','utf-8//IGNORE',$sb); $sb=iconv('utf-8','windows-1251//IGNORE',GTR($sb,'ru','uk')); $nd=iconv('windows-1251','utf-8//IGNORE',$nd); $nd=iconv('utf-8','windows-1251//IGNORE',GTR($nd,'ru','uk')); $title=iconv('windows-1251','utf-8//IGNORE',$title); $title=iconv('utf-8','windows-1251//IGNORE',GTR($title,'ru','uk')); } ////перевод////////перевод////////перевод////////перевод//// if ($_GET['l']=='ukr') { $content=$kanalua1; }else{ $content=$kanalrus1; } if (date(w)==1){ $content=str_replace('{kn}',$pn,$content); $content=str_replace('{title}',$title,$content); $content=str_replace('{id}',$_GET['id'],$content); if ($_GET['l']=='ukr') { $content=str_replace('{day}','Понеділок',$content); }else{ $content=str_replace('{day}','Понедельник',$content); } } if (date(w)==2){ $content=str_replace('{kn}',$vt,$content); $content=str_replace('{title}',$title,$content); $content=str_replace('{id}',$_GET['id'],$content); if ($_GET['l']=='ukr') { $content=str_replace('{day}','Вівторок',$content); }else{ $content=str_replace('{day}','Вторник',$content); } } if (date(w)==3){ $content=str_replace('{kn}',$sr,$content); $content=str_replace('{title}',$title,$content); $content=str_replace('{id}',$_GET['id'],$content); if ($_GET['l']=='ukr') { $content=str_replace('{day}','Середа',$content); }else{ $content=str_replace('{day}','Среда',$content); } } if (date(w)==4){ $content=str_replace('{kn}',$ct,$content); $content=str_replace('{title}',$title,$content); $content=str_replace('{id}',$_GET['id'],$content); if ($_GET['l']=='ukr') { $content=str_replace('{day}','Четвер',$content); }else{ $content=str_replace('{day}','Четверг',$content); } } if (date(w)==5){ $content=str_replace('{kn}',$pt,$content); $content=str_replace('{title}',$title,$content); $content=str_replace('{id}',$_GET['id'],$content); if ($_GET['l']=='ukr') { $content=str_replace('{day}','П’ятниця',$content); }else{ $content=str_replace('{day}','Пятница',$content); } } if (date(w)==6){ $content=str_replace('{kn}',$sb,$content); $content=str_replace('{title}',$title,$content); $content=str_replace('{id}',$_GET['id'],$content); if ($_GET['l']=='ukr') { $content=str_replace('{day}','Субота',$content); }else{ $content=str_replace('{day}','Субота',$content); } } if (date(w)==0){ $content=str_replace('{kn}',$nd,$content); $content=str_replace('{title}',$title,$content); $content=str_replace('{id}',$_GET['id'],$content); if ($_GET['l']=='ukr') { $content=str_replace('{day}','Неділя',$content); }else{ $content=str_replace('{day}','Воскресенье',$content); } } if ($_GET['play']=='1') { $play=file_get_contents('engine/modules/tvprogram/txt/'.$_GET['id'].'-1.txt'); } if ($_GET['play']=='2') { $play=file_get_contents('engine/modules/tvprogram/txt/'.$_GET['id'].'-2.txt'); } if ($_GET['play']=='') { $play=file_get_contents('engine/modules/tvprogram/txt/'.$_GET['id'].'.txt'); } $strl=strlen($play); if($strl<10){ $play=file_get_contents('engine/modules/tvprogram/txt/default.txt'); } $selURL=selfURL(); if (isset($_POST['error1'])) { $titlek=str_replace('Телепрограмма ','',$titlek); $db->query("INSERT IGNORE INTO `DLE_TVERROR2` (`Name`, `Url` ) VALUES ('".$titlek."','".$selURL."')"); $play=$play.'

Спасибо, ваше сообщение отправлено!

'; } $content=str_replace('{selURL}',$selURL,$content); $content=str_replace('{play}',$play,$content); $content=str_replace('{width}',$width,$content); $content=str_replace('{height}',$height,$content); $content=str_replace('\"','"',$content); $content=str_replace('background-color:#E6E6E6; border:1px solid #C0C0C0; padding:1px; width:45px; white-space:nowrap;','color:bleak;font-weight:bold;',$content); $content=str_replace('background-color:#F1BF20; border:1px solid #B99217; color:#FFFFFF; padding:1px; width:45px; white-space:nowrap;','color:red;font-weight:bold;',$content); $content=str_replace('
-
','',$content); $content=str_replace('','',$content); if ($filmpar==0){ $content=preg_replace('','',$content); $content=str_replace('
','
',$content); $content=str_replace('<>','',$content); } } $metatags['title']=$title; $tpl->load_template('tv.tpl'); $tpl->set('{content}', $content); $tpl->compile('content'); $tpl->clear(); } /* if ( $cache_content === false ) { $cache_content = $content; ob_end_clean(); $fp = @fopen($cache_file, "w"); if ( $fp ) { @fwrite($fp, $cache_content); @fclose($fp); } }*/ ?> BLOGIG.ORG - скачать бесплатно новые игры, фильмы на комп, музыку, программы, игры для консоли бесплатно без регистрации