| Server IP : 103.48.194.25 / Your IP : 216.73.217.33 Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33 System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64 User : sieuthimay ( 1016) PHP Version : 8.2.20 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/thegioimaycongnghiep.vn/public_html/site/helpers/ |
Upload File : |
<?
function mkmenu()
{
$list_brand = get_category() ;
$menu = '';
foreach ($list_brand as $rs):
$menu .= '<li><a href="'.site_url('sanpham/category/'.$rs->catid.'/'.kodau($rs->cat_name).'.html').'">'.$rs->cat_name.'</a></li>' ;
endforeach ;
return $menu ;
}
function get_category()
{
$ci =& get_instance();
$ci->db->where('parent_id', 0) ;
$ci->db->where('bl_active', 1) ;
$ci->db->order_by('nb_order','ASC');
$query = $ci->db->get('category') ;
return $query->result();
}
function get_banner_doitac()
{
$ci =& get_instance();
$ci->db->where('bl_active',1);
//$ci->db->where('kind',$kind);
return $ci->db->get('banner')->result();
}
function show_youtube($links='')
{
//https://www.youtube.com/watch?v=OUdwwxEavRw
if(empty($links)) return ;
if(strpos($links,'www.youtube.com/watch?v=')!==false)
{
$code = explode("=",$links);
$code = end($code);
return '<iframe width="100%" height="140px" src="https://www.youtube.com/embed/'.$code.'" frameborder="0" allowfullscreen></iframe>';
}
if(strpos($links,'youtu.be')!==false)
{
$code = explode("=",$links);
$code = end($code);
return '<iframe width="100%" height="140px" src="https://www.youtube.com/embed/'.$code.'" frameborder="0" allowfullscreen></iframe>';
}
if(strpos($links,'iframe')!==false)
{
return $links;
}
if(strpos($links,'embed')!==false)
{
return '<iframe width="100%" height="140px" src="'.$links.'" frameborder="0" allowfullscreen></iframe>';
}
return ;
}
function show_youtube_mb($links='')
{
if(empty($links)) return ;
if(strpos($links,'www.youtube.com/watch?v=')!==false)
{
$code = explode("=",$links);
$code = end($code);
return '<iframe width="100%" height="auto" src="https://www.youtube.com/embed/'.$code.'" frameborder="0" allowfullscreen></iframe>';
}
if(strpos($links,'youtu.be')!==false)
{
$code = explode("=",$links);
$code = end($code);
return '<iframe width="100%" height="auto" src="https://www.youtube.com/embed/'.$code.'" frameborder="0" allowfullscreen></iframe>';
}
if(strpos($links,'iframe')!==false)
{
return $links;
}
if(strpos($links,'embed')!==false)
{
return '<iframe width="100%" height="auto" src="'.$links.'" frameborder="0" allowfullscreen></iframe>';
}
return ;
}
?>