debug=true; // Inicialitzem Templates $tpl = new CachedTemplate(); $tpl->init(); $tpl->use_get(); // Seleccionem plantilla i includes $arr_tpl = array("main"=>_TEMPLATES_DIR."/noticies/detail.ihtml", "header"=>_TEMPLATES_DIR."/header.ihtml", "left"=>_TEMPLATES_DIR."/left.ihtml", "footer"=>_TEMPLATES_DIR."/footer.ihtml", "right"=>_TEMPLATES_DIR."/right.ihtml"); $tpl->set_file($arr_tpl); //Directorios $tpl->set_var("IMG_ADMIN_ROOT", _IMG_ADMIN_ROOT); $tpl->set_var("_IMG", _IMG); $tpl->set_var("CSS_ADMIN_ROOT", _CSS_ADMIN_ROOT); $tpl->set_var("JS_ADMIN_ROOT", _JS_ADMIN_ROOT); $tpl->set_var("ADMIN_ROOT", _ADMIN_ROOT); $tpl->set_var("WEB_ROOT", _WEB_ROOT); $tpl->set_var("NOTIS_SEC_PK", $NOTIS_SEC_PK); $tpl->set_var("lang", $_languageID); //Variables de idioma eval(ST("txt_imprimir", "\$txt_imprimir", $_languageID)); $tpl->set_var("imprimir_txt", $txt_imprimir); eval(ST("txt_enviar_email", "\$txt_enviar_email", $_languageID)); $tpl->set_var("enviar_email_txt", $txt_enviar_email); eval(ST("txt_name_obligatori", "\$txt_name_obligatori", $_languageID)); $tpl->set_var("name_obligatori_txt", $txt_name_obligatori); eval(ST("txt_titol_obligatori", "\$txt_titol_obligatori", $_languageID)); $tpl->set_var("titol_obligatori_txt", $txt_titol_obligatori); eval(ST("txt_opinio_obligatori", "\$txt_opinio_obligatori", $_languageID)); $tpl->set_var("opinio_obligatori_txt", $txt_opinio_obligatori); eval(ST("txt_OpinionsLectors", "\$txt_OpinionsLectors", $_languageID)); $tpl->set_var("opinions_lectors_txt", $txt_OpinionsLectors); eval(ST("txt_EscriuOpinio", "\$txt_EscriuOpinio", $_languageID)); $tpl->set_var("escriu_opinio_txt", $txt_EscriuOpinio); eval(ST("txt_NomOpinio", "\$txt_NomOpinio", $_languageID)); $tpl->set_var("nom_txt", $txt_NomOpinio); eval(ST("txt_TitolOpinio", "\$txt_TitolOpinio", $_languageID)); $tpl->set_var("titol_txt", $txt_TitolOpinio); eval(ST("txt_Opinion", "\$txt_Opinion", $_languageID)); $tpl->set_var("opinio_txt", $txt_Opinion); eval(ST("txt_EnviarOpinio", "\$ButoOpinar", $_languageID)); // +----------------------------------------------------------------------+ // | CUERPO | // +----------------------------------------------------------------------+ // Guardem l'audiència //AudienceSection($db,$x_sec,"",$_SESSION['session_usuPK']); // Blocks $tpl->set_block("main","BEntradeta","BlockEntradeta"); $tpl->set_block("main","BCapsalera","BlockCapsalera"); $tpl->set_block("main","BCosYoutubePeu","BlockCosYoutubePeu"); $tpl->set_block("main","BCosYoutube","BlockCosYoutube"); $tpl->set_block("main","BCosFoto1Peu","BlockCosFoto1Peu"); $tpl->set_block("main","BCosFoto1","BlockCosFoto1"); $tpl->set_block("main","BCosAltresFotos2","BlockCosAltresFotos2"); $tpl->set_block("main","BCosAltresFotos2Peu","BlockCosAltresFotos2Peu"); $tpl->set_block("main","BCosAltresFotos3","BlockCosAltresFotos3"); $tpl->set_block("main","BCosAltresFotos3Peu","BlockCosAltresFotos3Peu"); $tpl->set_block("main","BCosAltresFotos","BlockCosAltresFotos"); $tpl->set_block("main","BCos1","BlockCos1"); $tpl->set_block("main","BCos2","BlockCos2"); $tpl->set_block("main","BCosAmbMultimedia","BlockCosAmbMultimedia"); $tpl->set_block("main","BCosNoMultimedia","BlockCosNoMultimedia"); //$tpl->set_block("main","BAutor","BlockAutor"); //$tpl->set_block("main","BAutorFotos","BlockAutorFotos"); $tpl->set_block("main","BCodiAdjunt","BlockCodiAdjunt"); $tpl->set_block("main","BVideoAdjunt","BlockVideoAdjunt"); $tpl->set_block("main","BAudioAdjunt","BlockAudioAdjunt"); $tpl->set_block("main","BPeu","BlockPeu"); $tpl->set_block("main","BOpinioNoti","BlockOpinioNoti"); $tpl->set_block("main","BLlistatOpinions","BlockLlistatOpinions"); $tpl->set_block("main","BNovaOpinio","BlockNovaOpinio"); $tpl->set_block("main","BAltresNoticiesTitular","BlockAltresNoticiesTitular"); $tpl->set_block("main","BAltresNoticies","BlockAltresNoticies"); $tpl->set_block("main","BKeywords","BlockKeywords"); //Carreguem INCS include(_COMMON_INC."/header.php"); $tpl->parse("header", "header"); include(_COMMON_INC."/left.php"); $tpl->parse("left", "left"); include(_COMMON_INC."/right.php"); $tpl->parse("right", "right"); //include(_COMMON_INC."/footer.php"); $tpl->parse("footer", "footer"); // Agafem variables per GET $id = $_GET['id']; $tpl->set_var ("php_self", urlencode("http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING'])); if($_SERVER['REMOTE_ADDR'] == "90.74.0.66") { // Select de la Noticia $sql = "SELECT * FROM core_ArticlesPortal INNER JOIN core_ArticlesPortalSection ON ars_FK_art_PK = art_PK INNER JOIN core_Themes ON ars_FK_thm_PK = thm_PK WHERE art_FK_usu_PK = $USU_PK AND art_PK = $id LIMIT 1"; } else { // Select de la Noticia $sql = "SELECT * FROM core_ArticlesPortal INNER JOIN core_ArticlesPortalSection ON ars_FK_art_PK = art_PK INNER JOIN core_Themes ON ars_FK_thm_PK = thm_PK WHERE art_Publish = 1 AND art_FK_usu_PK = $USU_PK AND art_PK = $id LIMIT 1"; } //echo $sql; $rsNoticia = $db->Execute($sql); if(!$rsNoticia->EOF){ if($oNoticia = $rsNoticia->FetchNextObject()){ if($oNoticia->THM_PK==159) { $tpl->set_var("banner_esports",""); } if (strpos(GetThemes(136).",".GetThemes(137).",".GetThemes(245), $oNoticia->THM_PK)===false) { $tpl->set_var("categoriaNoticia", "THM_PK."\" class=\"categoria\">".strtoupper($oNoticia->THM_NAME).""); } //$tpl->set_var("categoriaNoticia", "THM_PK."\" class=\"text13b\" style=\"color:#666666; border: 0px solid #333333; padding: 3px; background-color:#FFFFFF\">".$oNoticia->THM_NAME.""); $tpl->set_var("art_Headline", str_replace('"',""",$oNoticia->ART_HEADLINE)); $tpl->set_var("art_Headline2", urlencode($oNoticia->ART_HEADLINE)); $tpl->set_var("art_HeadlineTitle", str_replace('"',""",(str_replace('’',"'",$oNoticia->ART_HEADLINE)))); if($oNoticia->ART_LEAD && $oNoticia->ART_LEAD != ""){ $tpl->set_var("art_Lead", $oNoticia->ART_LEAD); $tpl->parse("BlockEntradeta","BEntradeta", false); } if ($oNoticia->ART_AUTOR) { $x_autor = " / ".$oNoticia->ART_AUTOR; } else { $x_autor = " / Redacció"; } $tpl->set_var("data_autor", date("d/m/Y H:i",strtotime($oNoticia->ART_TIMEPUBLISH)).$x_autor); $tpl->set_var("urldetall_noencode","http://www.xcatalunya.cat/noticies/detail.php?id=".$oNoticia->ART_PK); $tpl->set_var("urldetall",urlencode("http://www.xcatalunya.cat/noticies/detail.php?id=".$oNoticia->ART_PK)); $tpl->set_var("titolencode",urlencode(utf8_encode($oNoticia->ART_HEADLINE))); if($oNoticia->ART_AUTORFOTOS && $oNoticia->ART_AUTORFOTOS != ""){ $tpl->set_var("art_AutorFotos", "Fotos: ".$oNoticia->ART_AUTORFOTOS); //$tpl->parse("BlockAutorFotos","BAutorFotos", false); } $tpl->parse("BlockCapsalera","BCapsalera", false); if ($oNoticia->ART_KEYWORDS) { $keywords= explode(',', $oNoticia->ART_KEYWORDS); foreach ($keywords as $paraula) { if ($paraula) { $tpl->set_var("art_Keywords",strtoupper($paraula)); $tpl->parse("BlockKeywords","BKeywords",true); $sql_keywords.=" OR art_Keywords like '%".strtoupper($paraula)."%'"; } } } else { //$keywords=array("ONADA DE FRED","ICL MANRESA","CARRETERA C55"); //foreach ($keywords as $paraula) { // // $tpl->set_var("art_Keywords",strtoupper($paraula)); // $tpl->parse("BlockKeywords","BKeywords",true); //} } $cosAmbMultimedia = false; if($oNoticia->ART_YOUTUBE && $oNoticia->ART_YOUTUBE != ""){ $cosAmbMultimedia = true; $video = $oNoticia->ART_YOUTUBE; //$video = substr($video, strpos($video, "http")); //$video = substr($video, 0, strpos($video, "\"")); //$video = ""; $tpl->set_var("art_YouTube", $video); if($oNoticia->ART_YOUTUBEPEU && $oNoticia->ART_YOUTUBEPEU != ""){ $tpl->set_var("art_YouTubePeu", $oNoticia->ART_YOUTUBEPEU); $tpl->parse("BlockCosYoutubePeu","BCosYoutubePeu", false); } $tpl->parse("BlockCosYoutube","BCosYoutube", false); } if($oNoticia->ART_FOTO1 && $oNoticia->ART_FOTO1 != ""){ $cosAmbMultimedia = true; $tpl->set_var("art_Foto1", $oNoticia->ART_FOTO1); $foto = $oNoticia->ART_FOTO1; //$extensio = substr($foto, strrpos($foto, ".") + 1); //$foto = substr($foto, 0, strrpos($foto, ".")); //$foto = $foto."_thumb.".$extensio; $tpl->set_var("art_Foto1_thumb", $foto); if($oNoticia->ART_FOTO1PEU && $oNoticia->ART_FOTO1PEU != ""){ $tpl->set_var("art_Foto1Peu", $oNoticia->ART_FOTO1PEU); $tpl->parse("BlockCosFoto1Peu","BCosFoto1Peu", false); } $tpl->parse("BlockCosFoto1","BCosFoto1", false); } $altresFotos = false; if($oNoticia->ART_FOTO2 && $oNoticia->ART_FOTO2 != ""){ $altresFotos = true; $tpl->set_var("art_Foto2", $oNoticia->ART_FOTO2); $foto = $oNoticia->ART_FOTO2; $extensio = substr($foto, strrpos($foto, ".") + 1); $foto = substr($foto, 0, strrpos($foto, ".")); $foto = $foto."_thumb.".$extensio; $tpl->set_var("art_Foto2_thumb", $foto); if($oNoticia->ART_FOTO2PEU && $oNoticia->ART_FOTO2PEU != ""){ $tpl->set_var("art_Foto2Peu", $oNoticia->ART_FOTO2PEU); $tpl->parse("BlockCosAltresFotos2","BCosAltresFotos2", false); } $tpl->parse("BlockCosAltresFotos2Peu","BCosAltresFotos2Peu", false); } if($oNoticia->ART_FOTO3 && $oNoticia->ART_FOTO3 != ""){ $altresFotos = true; $tpl->set_var("art_Foto3", $oNoticia->ART_FOTO3); $foto = $oNoticia->ART_FOTO3; $extensio = substr($foto, strrpos($foto, ".") + 1); $foto = substr($foto, 0, strrpos($foto, ".")); $foto = $foto."_thumb.".$extensio; $tpl->set_var("art_Foto3_thumb", $foto); if($oNoticia->ART_FOTO3PEU && $oNoticia->ART_FOTO3PEU != ""){ $tpl->set_var("art_Foto3Peu", $oNoticia->ART_FOTO3PEU); $tpl->parse("BlockCosAltresFotos3","BCosAltresFotos3", false); } $tpl->parse("BlockCosAltresFotos3Peu","BCosAltresFotos3Peu", false); } if($altresFotos){ $cosAmbMultimedia = true; $tpl->parse("BlockCosAltresFotos","BCosAltresFotos", false); } $tpl->set_var("art_Body", $oNoticia->ART_BODY); if (strip_tags($oNoticia->ART_BODY)) { $tpl->parse("BlockCos1","BCos1", false); $tpl->parse("BlockCos2","BCos2", false); } if($cosAmbMultimedia) $tpl->parse("BlockCosAmbMultimedia","BCosAmbMultimedia", false); else $tpl->parse("BlockCosNoMultimedia","BCosNoMultimedia", false); $tpl->set_var("noticiaURL", _WEB_ROOT.$_SERVER['PHP_SELF']."?id=$id"); if($oNoticia->ART_DOCUMENT && $oNoticia->ART_DOCUMENT != ""){ //$tpl->set_var("art_Document", "ART_DOCUMENT."\" target=\"_blank\" class=\"text10b\">1 arxiu adjunt"); $tpl->set_var("art_Codi", $oNoticia->ART_DOCUMENT); $tpl->parse("BlockCodiAdjunt","BCodiAdjunt", false); } if($oNoticia->ART_VIDEO && $oNoticia->ART_VIDEO != ""){ //$tpl->set_var("art_Video", "ART_VIDEO."\" target=\"_blank\" class=\"text10b\">1 video adjunt") $txt_video = ''; $tpl->set_var("art_Video", $txt_video); $tpl->parse("BlockVideoAdjunt","BVideoAdjunt", false); } if($oNoticia->ART_AUDIO && $oNoticia->ART_AUDIO != ""){ $tpl->set_var("art_Audio", "ART_AUDIO."\" target=\"_blank\" class=\"text10b\">1 audio adjunt"); $tpl->parse("BlockAudioAdjunt","BAudioAdjunt", false); } $tpl->parse("BlockPeu","BPeu", false); // // Select d'altres Noticies // $sql = "SELECT art_PK, art_Headline // FROM core_ArticlesPortal // INNER JOIN core_ArticlesPortalSection ON ars_FK_art_PK = art_PK // INNER JOIN core_Themes ON ars_FK_thm_PK = thm_PK // WHERE art_Publish = 1 AND art_FK_usu_PK = $USU_PK AND art_PK <> $id AND thm_PK = ".$oNoticia->THM_PK; // // $rsAltresNoticies = $db->Execute($sql); // // if(!$rsAltresNoticies->EOF){ // // while($oAltresNoticies = $rsAltresNoticies->FetchNextObject()){ // // $tpl->set_var("categoriaAltresNoticies", "THM_PK."\" class=\"text13b\">".$oNoticia->THM_NAME.""); // $tpl->set_var("titularAltresNoticies", "ART_PK."\" class=\"text13b\" style=\"color:#666666;\">".$oAltresNoticies->ART_HEADLINE.""); // // $tpl->parse("BlockAltresNoticiesTitular","BAltresNoticiesTitular", true); // } // // $tpl->parse("BlockAltresNoticies","BAltresNoticies", false); // } // $rsAltresNoticies->Close(); } } $rsNoticia->Close(); //// ========================================================================================== //// Select de Més Noticies (les que són de portada) //// ========================================================================================== // //$sql = "SELECT art_PK, art_Headline, art_Body, art_Lead, art_TimePublish, art_Foto1, art_Foto1Peu, art_YouTube, art_Tipus, // CASE art_Checked WHEN 0 THEN 99 ELSE art_Checked END AS art_Ordre // FROM core_ArticlesPortal // WHERE art_Publish = 1 AND art_FK_usu_PK = $USU_PK AND art_PK NOT IN (".$oNoticia->ART_PK.") // ORDER BY art_Ordre, art_TimePublish DESC LIMIT 8"; // ////echo $sql."
"; //$rsMesNoticies = $db->Execute($sql); // //if(!$rsMesNoticies->EOF){ // // $cont = 1; // // while($oMesNoticies = $rsMesNoticies->FetchNextObject()){ // // $tpl->set_var("not_titol_".$cont,$oMesNoticies->ART_HEADLINE); // $tpl->set_var("not_PK_".$cont,$oMesNoticies->ART_PK); // $cont++; // } //} //// ========================================================================================== // Altres notícies $sql = "SELECT DISTINCT art_PK, art_Headline, art_Autor, art_TimePublish, art_Body, art_Lead, art_TimePublish, art_Foto1, art_Foto1Peu, art_YouTube, art_Tipus, CASE art_Checked WHEN 0 THEN 99 ELSE art_Checked END AS art_Ordre FROM core_ArticlesPortal INNER JOIN core_ArticlesPortalSection ON art_PK = ars_FK_art_PK WHERE art_Publish = 1 AND art_FK_usu_PK = $USU_PK AND art_PK NOT IN (".$oNoticia->ART_PK.") ORDER BY art_Ordre, art_TimePublish DESC LIMIT 6"; //echo $sql."
"; $rsInteressar = $db->Execute($sql); if(!$rsInteressar->EOF){ $cont = 1; while($oInteressar = $rsInteressar->FetchNextObject()){ // ============================================================================ // Busquem thm_Name i thm_PK categoria // ============================================================================ $sql = "SELECT thm_PK, thm_Name FROM core_Themes INNER JOIN core_ArticlesPortalSection ON thm_PK = ars_FK_thm_PK INNER JOIN core_ArticlesPortal ON ars_FK_art_PK = art_PK WHERE art_PK = ".$oInteressar->ART_PK." AND art_FK_usu_PK = $USU_PK ORDER BY ars_PK LIMIT 1"; $rsCategoria = $db->Execute($sql); $idCategoria = ""; $categoria = ""; if (!$rsCategoria->EOF){ if($oCategoria = $rsCategoria->FetchNextObject()){ $categoria = $oCategoria->THM_NAME; $idCategoria = $oCategoria->THM_PK; $tpl->set_var("int_categoria_".$cont,''.strtoupper($oCategoria->THM_NAME).''); } } $rsCategoria->Close(); // ============================================================================ $tpl->set_var("int_titol_".$cont,$oInteressar->ART_HEADLINE); $tpl->set_var("int_PK_".$cont,$oInteressar->ART_PK); if ($oInteressar->ART_YOUTUBE) { $tpl->set_var("int_foto_".$cont,'
'.$oInteressar->ART_YOUTUBE.'
'); //$tpl->set_var("int_foto_".$cont,'
'); } elseif ($oInteressar->ART_FOTO1) { $tpl->set_var("int_foto_".$cont,''); } // if ($oInteressar->ART_AUTOR) { // $x_autor = " / ".$oInteressar->ART_AUTOR; // } else { // $x_autor = " / Redacció"; // } $tpl->set_var("data_".$cont, date("d/m/Y H:i",strtotime($oInteressar->ART_TIMEPUBLISH))); $cont++; } } // Guardem l'opinió if ($_POST['int_envia'] == 1) { $codi_erroni = false; // Valido el codigo CAPTCHA ingresado y lo comparo contra el almacenado en la sesión. //if((sha1($_POST['CAPTCHA_CODE']) != $_SESSION["CAPTCHA_CODE"])) { //if($_POST['CAPTCHA_CODE'] != date("Y")) { if($_POST['CAPTCHA_CODE'] != 5) { $tpl->set_var ("Message", "Codi de validació incorrecte"); $codi_erroni = true; } if (!$codi_erroni) { // Control per impedir insert múltiple amb F5 $sql = "SELECT * FROM core_ArticlesPortalOpinion WHERE aro_Chk = '".$_POST['txt_aro_Chk']."' AND aro_Chk<>''"; $rsControl = $db->execute($sql); // Si la variable de control aro_Chk no està repetida fem insert if ($rsControl->EOF) { $_POST['txt_aro_IP'] = getIP(); $_POST['txt_aro_Date'] = date("Y/m/d H:i:s"); $_POST['int_aro_Publish'] = "1"; //Inserim l'opinió a la BBDD $table = "core_ArticlesPortalOpinion"; $prefix = "aro"; if ( strpos(strtolower($_POST['txt_aro_Opinion']), "script")!=false || strpos(strtolower($_POST['txt_aro_Opinion']), "http")!=false || strpos(strtolower ($_POST['txt_aro_Opinion']), "href")!=false || strpos(strtolower ($_POST['txt_aro_Opinion']), "www")!=false || strpos($_POST['txt_aro_Opinion'], "<")!=false || strpos($_POST['txt_aro_Opinion'], ">")!=false ) { die; } if ( strpos(strtolower($_POST['txt_aro_Name']), "script")!=false || strpos(strtolower($_POST['txt_aro_Name']), "http")!=false || strpos(strtolower ($_POST['txt_aro_Name']), "href")!=false || strpos(strtolower ($_POST['txt_aro_Name']), "www")!=false || strpos($_POST['txt_aro_Name'], "<")!=false || strpos($_POST['txt_aro_Name'], ">")!=false) { die; } $_POST['txt_aro_Name'] = addslashes($_POST['txt_aro_Name']); $_POST['txt_aro_Opinion'] = addslashes($_POST['txt_aro_Opinion']); InsertRow ($table, $prefix, $db); //Posem variables a 0 $txt_aro_Name = ""; $txt_aro_Opinion = ""; } $rsControl->Close(); } } // Select d'opinions $sql = "SELECT aro_PK, aro_Name, aro_Topic, aro_Date, aro_Opinion FROM core_ArticlesPortalOpinion WHERE aro_FK_usu_PK = $USU_PK AND aro_Publish <> 2 AND aro_FK_art_PK = $id ORDER BY aro_Date DESC"; $rsOpinions = $db->Execute($sql); if(!$rsOpinions->EOF){ while($oOpinions = $rsOpinions->FetchNextObject()){ $tpl->set_var("titolOpinio", $oOpinions->ARO_TOPIC); $tpl->set_var("nomOpinio", $oOpinions->ARO_NAME); $aux = explode(" ",$oOpinions->ARO_DATE); $data = explode("-", $aux[0]); $data = $data[2]."-".$data[1]."-".$data[0]; $hora = explode(":", $aux[1]); $hora = $hora[0].":".$hora[1]; $tpl->set_var("dataOpinio", $data); $tpl->set_var("horaOpinio", $hora); $tpl->set_var("cosOpinio", $oOpinions->ARO_OPINION); $tpl->parse("BlockOpinioNoti", "BOpinioNoti", true); } $tpl->parse("BlockLlistatOpinions", "BLlistatOpinions", true); } $rsOpinions->Close(); // Formulari d'opinions $frmOpinio = new form; $frmOpinio->isfile = false; $frmTarget = ($SWParentTarget)?"_parent":""; $tpl->set_var("formOpinio", $frmOpinio->get_start("", "post", "/noticies/detail.php?id=$id#opinio", $frmTarget, "opinio")); CreateObject($tpl,$frmOpinio, array("type"=>"text", "name"=>"txt_aro_Name", "value"=>"$txt_aro_Name", "maxlength"=>"255", "size"=>"40", "extrahtml"=>"class=\"text14\"")); CreateObject($tpl,$frmOpinio, array("type"=>"text", "name"=>"txt_aro_Topic", "value"=>"$txt_aro_Topic", "maxlength"=>"255", "extrahtml"=>"class=\"text14\" style=\"width:100%\"")); CreateObject($tpl,$frmOpinio,array("type"=>"textarea", "name"=>"txt_aro_Opinion", "value"=>"$txt_aro_Opinion", "rows"=>"3","extrahtml" =>"class=\"text14\" style=\"width:100%\"")); CreateObject($tpl,$frmOpinio,array("type" => "hidden", "name" => "int_aro_FK_art_PK", "value" => $id)); CreateObject($tpl,$frmOpinio,array("type" => "hidden", "name" => "int_aro_FK_usu_PK", "value" => $USU_PK)); CreateObject($tpl,$frmOpinio,array("type" => "hidden", "name" => "int_aro_Type", "value" => 0)); CreateObject($tpl,$frmOpinio,array("type" => "hidden", "name" => "txt_aro_Chk", "value" => rand(1, 999999999))); // Control antispam - CAPTCHA_CODE CreateObject($tpl,$frmOpinio,array("type" => "text","name" => "CAPTCHA_CODE","value" => "","size" => "4","maxlength" => "4","extrahtml" => "class=text12")); CreateObject($tpl,$frmOpinio,array("type" => "hidden", "name" => "int_envia", "value" => "1")); CreateObject($tpl,$frmOpinio, array("type"=>"button", "name"=>"botoOpinar", "value"=>$ButoOpinar, "extrahtml"=>"class=\"boto1\" onClick=\"validarCamps(this.form);\" style=\"cursor:hand;cursor:pointer;\"")); $tpl->set_var ("formOpinioEnd", $frmOpinio->get_finish()); $tpl->parse("BlockNovaOpinio","BNovaOpinio", false); // +----------------------------------------------------------------------+ // | FINALITZACIONS | // +----------------------------------------------------------------------+ // Parsejar pàgina $tpl->pparse("out","main"); // Tancar la connexió amb la BD $db->Close(); ?>