assign('guide_url',$ok_url); if($tmp_vars[0] != $ok_url) { header("HTTP/1.1 301 Moved Permanently"); header("Location: /audioguia_".$ok_url."_".$audio_id.".html"); header("Connection: close"); } //print_r($guia); $smarty->assign('guia',$guia); // other languages: $av_langs = array(); if($guia['group_id']) $av_langs = get_online_grupguides($guia['group_id']); //print_r($av_langs); $smarty->assign('av_langs',$av_langs); $images = array(); $full_path = '/var/www/audioguiasonline.com/httpdocs/db_files/guia_'.$guia['id']; $web_path = '/db_files/guia_'.$guia['id']; //if(file_exists($full_path.'/s_'.$guia['id'].'.jpg')) $images[] = array("big"=>$web_path.'/b_'.$guia['id'].'.jpg',"small"=>$web_path.'/s_'.$guia['id'].'.jpg', "title"=>$guia['titulo']); $member = get_memberdata($guia['member_id']); //print_r($member); $smarty->assign('member',$member); $rutas = array(); $rutas = get_rutabyguia($audio_id); $googlemap = ''; if($guia['longitude']){ $googlemap .= "var latlng = new GLatLng(".$guia['latitude'].",".$guia['longitude'].");"."\n"; $googlemap .= "map.addOverlay(createMarker(latlng, 'guia_".$guia['id']."', 'inicio_m','".str_replace("'","\'",$guia['titulo'])."'));"."\n"; $googlemap .= "bounds.extend(latlng);"."\n"; } foreach ($rutas AS $key => $ruta) { if($ruta['id']) $tmp_pistas = get_pistabyruta($ruta['id']); if(!empty($tmp_pistas[0])) { $rutas[$key]['pistas'] = $tmp_pistas; foreach($tmp_pistas AS $tmp_pista){ if($tmp_pista['longitude']) { $googlemap .= "var latlng = new GLatLng(".$tmp_pista['latitude'].",".$tmp_pista['longitude'].");"."\n"; $googlemap .= "map.addOverlay(createMarker(latlng, 'pista_".$tmp_pista['id']."', '".$tmp_pista['orden']."','".str_replace("'","\'",$tmp_pista['titulo'])."'));"."\n"; $googlemap .= "bounds.extend(latlng);"."\n"; } if(file_exists($full_path.'/'.$tmp_pista['id'].'/s_'.$tmp_pista['id'].'.jpg')) $images[] = array("big"=>$web_path.'/'.$tmp_pista['id'].'/b_'.$tmp_pista['id'].'.jpg',"small"=>$web_path.'/'.$tmp_pista['id'].'/s_'.$tmp_pista['id'].'.jpg', "title"=>$tmp_pista['titulo'], "copyright"=>$tmp_pista['imgcopy']); } } } $smarty->assign('googlemap',$googlemap); /* echo ''; */ $smarty->assign('rutas',$rutas); //print_r($images); $smarty->assign('images',$images); $banner = get_banner('normal', 1, $guia['bannertags']); //print_r($banner); $smarty->assign("header_banner_url",$banner[0]['url']); $smarty->assign("header_banner_title",$banner[0]['title']); $smarty->assign("header_banner_img",$banner[0]['filename']); $minibanner = get_banner('mini', 2, $guia['bannertags']); $smarty->assign("minibanner",$minibanner); $css = get_cssbackground(); $smarty->assign("css",$css); $smarty->display($templatepath.'audioguia.tpl'); ?>