/Quản lý website tin tức bóng đá PHP/code_bongdaso/an.php
https://gitlab.com/phamngsinh/baitaplon_sinhvien · PHP · 130 lines · 114 code · 6 blank · 10 comment · 10 complexity · ab82d9d0be67277ec4c40ac320a7abc8 MD5 · raw file
- <?php
- if($_GET['xem']='')
- {
- if($_GET['id']=='')
- {
- $xem=1;
- $urlsn="http://www.bongdaso.com/_ComingMatches.aspx?Odd=".$xem."&LExp=0&CExp=0&PExp=0&LeagueID=-1&SeasonID=-1&AT=1/";
- $raw_document = file_get_contents($urlsn);
- $str = $raw_document;
- $string = $str;
- $patterns[0] = "/Fix_/";
- $replacements[2] = "./?id=";
- $view= preg_replace($patterns, $replacements, $string);
- $template -> assign_vars(array(
- 'result'=> $view,
- ));
- }
- elseif(isset($_GET['id']) && $_GET['id']!='')
- {
- $content= $_GET['id'];
- //$content = "10832.aspx?LeagueID=-1";
- preg_match_all('@(.*?).aspx?@',$content, $match,PREG_SET_ORDER);
-
- $id= $match[0][1];
- //http://bongdaso.com/Fix_10832.aspx?LeagueID=-1&SeasonID=19&Data=Odds
- $tiep = "http://www.bongdaso.com/_CastingInfo.aspx?FixtureID=".$id."&Status=FullTime";
- $tiep_document = file_get_contents($tiep);
- $template -> assign_vars(array(
- 'result'=> $tiep_document,
- ));
- }
- }
- else
- {
- if($_GET['id']=='')
- {
- $xem=$_GET['xem'];
- $urlsn="http://www.bongdaso.com/_ComingMatches.aspx?Odd=".$xem."&LExp=0&CExp=0&PExp=0&LeagueID=-1&SeasonID=-1&AT=1/";
- $raw_document = file_get_contents($urlsn);
- $str =$raw_document;
- $string = $str;
- $patterns[0] = "/Fix_/";
- $replacements[2] = "./?id=";
- $view= preg_replace($patterns, $replacements, $string);
- $template -> assign_vars(array(
- 'result'=> $view,
- ));
- }
- elseif(isset($_GET['id']) && $_GET['id']!='')
- {
- $content= $_GET['id'];
- //$content = "10832.aspx?LeagueID=-1";
- preg_match_all('@(.*?).aspx?@',$content, $match,PREG_SET_ORDER);
-
- $id= $match[0][1];
- //http://bongdaso.com/Fix_10832.aspx?LeagueID=-1&SeasonID=19&Data=Odds
- $tiep = "http://www.bongdaso.com/_CastingInfo.aspx?FixtureID=".$id."&Status=FullTime";
- $tiep_document = file_get_contents($tiep);
- $template -> assign_vars(array(
- 'result'=> $tiep_document,
- ));
- }
- }
- //tran da dau
- if($_GET['dau']=='')
- {
- if($_GET['id2']=='')
- {
- $dau=2;
- $urlsn="http://www.bongdaso.com/_PlayedMatches.aspx?Odd=1&Week=".$dau."&LExp=0&CExp=0&PExp=0&LeagueID=-1&SeasonID=-1&AT=1/";
- $raw_document = file_get_contents($urlsn);
- $str = $raw_document;
- $string = $str;
- $patterns[0] = "/Fix_/";
- $replacements[2] = "./?id2=";
- $viewdau= preg_replace($patterns, $replacements, $string);
- $template -> assign_vars(array(
- 'resultdau'=> $viewdau,
- ));
- }
- elseif(isset($_GET['id2']) && $_GET['id2']!='')
- {
- $content= $_GET['id2'];
- //$content = "10832.aspx?LeagueID=-1";
- preg_match_all('@(.*?).aspx?@',$content, $match,PREG_SET_ORDER);
-
- $id2= $match[0][1];
- //http://bongdaso.com/Fix_10832.aspx?LeagueID=-1&SeasonID=19&Data=Odds
- $tiep = "http://www.bongdaso.com/_CastingInfo.aspx?FixtureID=".$id2."&Status=FullTime";
- $tiep_documentdau = file_get_contents($tiep);
- $template -> assign_vars(array(
- 'resultdau'=> $tiep_documentdau,
- ));
- }
- }
- else
- {
- if($_GET['id2']=='')
- {
- $dau=$_GET['dau'];
- $urlsn="http://www.bongdaso.com/_PlayedMatches.aspx?Odd=1&Week=".$dau."&LExp=0&CExp=0&PExp=0&LeagueID=-1&SeasonID=-1&AT=1/";
- $raw_document = file_get_contents($urlsn);
- $str = $raw_document;
- $string = $str;
- $patterns[0] = "/Fix_/";
- $replacements[2] = "./?id2=";
- $viewdau= preg_replace($patterns, $replacements, $string);
- $template -> assign_vars(array(
- 'resultdau'=> $viewdau,
- ));
- }
- elseif(isset($_GET['id2']) && $_GET['id2']!='')
- {
- $content= $_GET['id2'];
- //$content = "10832.aspx?LeagueID=-1";
- preg_match_all('@(.*?).aspx?@',$content, $match,PREG_SET_ORDER);
-
- $id2= $match[0][1];
- //http://bongdaso.com/Fix_10832.aspx?LeagueID=-1&SeasonID=19&Data=Odds
- $tiep = "http://www.bongdaso.com/_CastingInfo.aspx?FixtureID=".$id2."&Status=FullTime";
- $tiep_documentdau = file_get_contents($tiep);
- $template -> assign_vars(array(
- 'resultdau'=> $tiep_documentdau,
- ));
- }
- }
- //******************************
- ?>