]+src=[\'"]([^\'"]+)[\'"][^>]*>/i', $rsn["texto"], $matches); if(!empty($matches[1][0])){ $media = $matches[1][0]; }else{ $media = ''; } } return $media; }exists("INC_HEAD")) { $tpl->addFile("INC_HEAD", $fbz_frontend."html/inc/head.html"); } if($tpl->exists("INC_HEADER")) { $tpl->addFile("INC_HEADER", $fbz_frontend."html/inc/header.html"); } if($tpl->exists("INC_MENU")) { $tpl->addFile("INC_MENU", $fbz_frontend."html/inc/menu.html"); } if($tpl->exists("INC_BUSCA")) { $tpl->addFile("INC_BUSCA", $fbz_frontend."html/inc/busca.html"); } if($tpl->exists("INC_BANNER")) { $tpl->addFile("INC_BANNER", $fbz_frontend."html/inc/banner.html"); } if($tpl->exists("INC_BOX")) { $tpl->addFile("INC_BOX", $fbz_frontend."html/inc/box.html"); } if($tpl->exists("INC_FILTRO")) { $tpl->addFile("INC_FILTRO", $fbz_frontend."html/inc/filtro.html"); } if($tpl->exists("INC_BANNERS")) { $tpl->addFile("INC_BANNERS", $fbz_frontend."html/inc/banners.html"); } if($tpl->exists("INC_BLOGLIST")) { $tpl->addFile("INC_BLOGLIST", $fbz_frontend."html/inc/bloglist.html"); } if($tpl->exists("INC_FOOTER")) { $tpl->addFile("INC_FOOTER", $fbz_frontend."html/inc/footer.html"); } if($tpl->exists("INC_MODAL")) { $tpl->addFile("INC_MODAL", $fbz_frontend."html/inc/modal.html"); } if($tpl->exists("INC_JS")) { $tpl->addFile("INC_JS", $fbz_frontend."html/inc/js.html"); } if($tpl->exists("INC_CSS")) { $tpl->addFile("INC_CSS", $fbz_frontend."html/inc/css.html"); } if($tpl->exists("INC_ANALYTICS")) { $tpl->addFile("INC_ANALYTICS", $fbz_frontend."html/inc/analytics.html"); } if( $tpl->exists("INC_BUSCA") ) include("fbz/inc/busca.php"); if( $tpl->exists("INC_MENU") && test_table('fbz_paginas') ) include("fbz/inc/menu.php"); if( $tpl->exists("INC_BANNERS") && test_table('fbz_banners') ) include("fbz/inc/banners.php"); if( $tpl->exists("INC_BLOGLIST") && test_table('fbz_noticias') ) include("fbz/inc/blog.php"); // Header if($tpl->exists("HTML_LANG")) $tpl->HTML_LANG = $fbz_fw_lang; if($tpl->exists("HTML_CHARSET")) $tpl->HTML_CHARSET = $fbz_fw_charset; if($tpl->exists("HTML_URL")) $tpl->HTML_URL = $fbz_url_site; if($tpl->exists("HTML_LOGO")) $tpl->HTML_LOGO = $fbz_url_site.$site['design']['logo']; if($tpl->exists("HTML_ICO")) $tpl->HTML_ICO = $site['design']['favicon']!='' ? $fbz_url_site.$site['design']['favicon'] : $fbz_url_site.'img/favicon.ico'; if($tpl->exists("HTML_CANONICAL")) $tpl->HTML_CANONICAL = ""; if($tpl->exists("HTML_IMG")) $tpl->HTML_IMG = ""; if($tpl->exists("HTML_TITLE")) $tpl->HTML_TITLE = $site['geral']['title']; if($tpl->exists("HTML_DESC")) $tpl->HTML_DESC = $site['geral']['description']; if($tpl->exists("HTML_KW")) $tpl->HTML_KW = $site['geral']['keywords']; // dados gerais if($tpl->exists("EMPRESA")) $tpl->EMPRESA = $site['geral']['nome']; if($tpl->exists("RESUMO")) $tpl->RESUMO = $site['geral']['description']; if($tpl->exists("EMAIL")) $tpl->EMAIL = $site['geral']['email']; if($tpl->exists("DOMINIO")) $tpl->DOMINIO = $fbz_url_site; if($tpl->exists("MAPS_KEY")) $tpl->MAPS_KEY = $site['google']['key_maps']; // fbz_lojas foreach ($site as $key => $value) { if( strstr($key,'loja') ){ foreach ($site[$key] as $key => $value) { $var = 'LOJA_'.strtoupper($key); $exist = $var.'_EXIST'; if($key=='whatsapp'){ $whats_num = '55'.preg_replace("/[^0-9]/","",$value); if( $tpl->exists('LOJA_WHATSAPP_NUM') ){ $tpl->LOJA_WHATSAPP_NUM = $whats_num; } } if( $tpl->exists($var) ){ $tpl->$var = $value; } // show/hide de contatos // LOJA_CAMPO_EXIST if( $tpl->exists($exist) ){ $tpl->$exist = $value!='' ? '' : 'hidden'; } } if($tpl->exists("HEADER_CONTATO")) $tpl->block('HEADER_CONTATO'); if($tpl->exists("FOOTER_CONTATO")) $tpl->block('FOOTER_CONTATO'); if($tpl->exists("FOOTER_FONES")) $tpl->block('FOOTER_FONES'); } } // fbz_social foreach ($site['social'] as $rede => $url) { if( $url!='' ){ if($tpl->exists("SOCIAL_LABEL")) $tpl->SOCIAL_LABEL = $rede; if($tpl->exists("SOCIAL_TITLE")) $tpl->SOCIAL_TITLE = Maiusculo($rede); if($tpl->exists("SOCIAL_URL")) $tpl->SOCIAL_URL = $url; if($tpl->exists("SOCIAL_CLASS")) $tpl->SOCIAL_CLASS = 'fa fa-'.$rede; if($tpl->exists("HEADER_SOCIAL")) $tpl->block("HEADER_SOCIAL"); if($tpl->exists("FOOTER_SOCIAL")) $tpl->block("FOOTER_SOCIAL"); } } // site['design'] foreach ($site['design'] as $key => $value) { if( strstr($key,'color_') ){ $hex = $value; list($r, $g, $b) = sscanf($hex, "#%02x%02x%02x"); $rgb = $r.','.$g.','.$b; if($tpl->exists($key)) $tpl->$key = $hex; $key_rgb = $key.'_rgb'; if($tpl->exists($key_rgb)) $tpl->$key_rgb = $rgb; } } if($tpl->exists("FOOTER_CATEGORIAS")) { $categorias = fbz_array_busca($fbz_sql_query_tipos); foreach($categorias as $categoria) { $tpl->CODIGO_CATEGORIA = $categoria["CODIGO_CATEGORIA"]; $tpl->CATEGORIA = Maiusculo(fbz_tipos_plural($categoria["CATEGORIA"])); $tpl->CATEGORIA_SELECTED = (get("busca")==$id_busca && fbz_getvg("tipo",$categoria["CODIGO_CATEGORIA"])) ? 'selected' : '' ; $tpl->block("FOOTER_CATEGORIAS"); } } //analytics if ($site['google']['key_analytics']!="") { if($tpl->exists("GA_KEY")) $tpl->GA_KEY = $site['google']['key_analytics']; $tpl->block("GA"); } // alertas navegador if (session('msg_'.$fbz_prefix)!="") { $tpl->MODAL_TITLE = "Atenção!"; $tpl->MODAL_CONTENT = session('msg_'.$fbz_prefix); $tpl->block("MODAL"); setmsg(""); } // selecao de idioma translator if (session('lingua_'.$fbz_prefix)!="") { $tpl->JS_BTN_TRANSLATOR = session('lingua_'.$fbz_prefix); } // form footer if($tpl->exists('formfooter')) { $vformfooter[] = array("Nome","Seu Nome","text","valida",12); $vformfooter[] = array("E-mail","E-mail","email","valida valida-email",12); $vformfooter[] = array("Telefone","Telefone","text","valida mask-fone",12); $vformfooter[] = array("Mensagem","Sua mensagem","textarea","valida",12,'',3); if (post("fooenviar")) { //var_export($_POST); exit; //fbz_captcha('validar'); $nome = $_POST['campo_1']; $email = $_POST['campo_2']; $titulo = 'Contato pelo Site'; $redir = post("url_retorno"); $html = "

".$titulo."


"; $template = '{label}: {valor}
'; $html .= formulario_template($vformfooter,$template); $html = fbz_html_to_var("fbz/html/email.htm", array( array("{url}",$fbz_url_site), array("{corpo}",$html) ) ); //die($html); $sql = "INSERT INTO fbz_mensagens (nome, email, fone, mensagem) values ('$nome', '$email', '$fone', '$mensagem')"; //die($sql); mysql_query($sql) or die(mysql_error()); if(!is_email($email)) { setmsg("Informe um e-mail válido."); } else { mail_send($email,$site['geral']['email'],$titulo,$html); if ($fbz_cad_news_auto) fbz_news_add($email,$nome); setmsg("Sua mensagem foi enviada com sucesso."); } redir(esta_pagina()); } //formulario $tpl->FORMFOOTER_ACTION = ""; $tpl->FORMFOOTER_CAMPOS = formulario_html($vformfooter); //$tpl->FORM_CAPTCHA = fbz_captcha(); }