<% // incluir librerias include("config.inc.php3"); //include("../jugadores/config.inc.php3"); // standard header standar_header(); // se crea el objeto de conexion a la base de datos $table = new my_dbsearcher; %> Federación Colombiana de Golf Randa Home
<% $qidj = db_query("SELECT * FROM Jugador WHERE Publicar = 'S' ORDER by Rand()"); $rj = db_fetch_object($qidj); $ruta="$folder_img_jugadores/$rj->Foto1"; %><% echo $rj->Nombre%> <% echo $rj->Apellido %>
Home

Federaci�n Colombiana de Golf

Asociado a R&A

<% $select="SELECT m.nombre as mod_nombre, s.nombre as nom_sec, m.id_modulo as mod_id, s.id_seccion as sec_id, m.path as path "; $from= " FROM modulo as m LEFT JOIN seccion as s ON m.id_modulo = s.id_modulo "; $where = " WHERE s.activo = 'S' OR s.id_modulo is NULL ORDER BY m.orden ASC, s.orden ASC"; $query=$select.$from.$where; $table->sql_query($query); $cur_module=""; while ($row = $table->sql_fetch_object()){ if ($cur_module != $row->mod_id) { $cur_module = $row->mod_id; %> <% } // if cur_module if ($row->sec_id) { %> <% } // end if sec_id } //while %>
<% if (empty($row->path)) { // si el registro no tiene path, enlazar al modulo correspondiente %> <% } else { // Existe path, colocar el enlace ala pagina correspondiente %> <% } %> <% echo strtoupper($row->mod_nombre) %>
<%echo $row->nom_sec %>

Buscador de Noticias

<% $query="SELECT n.titular, n.subtitular, n.fecha_noticia, n.cuerpo, n.foto, n.autor, n.fuente, n.id_seccion, n.id_tipo_news FROM news as n WHERE n.id_news=$nt AND n.publicar='S' "; $table->search($query); if ($table->nfound) { $datos=$table->sql_fetch_row(); $titular=$datos[0]; $subtitular=$datos[1]; $fecha=fecha($datos[2]); $texto=$datos[3]; $foto=$datos[4]; $autor=$datos[5]; $fuente=$datos[6]; $id_seccion=$datos[7]; $tipo=$datos[8]; %><% // no colocar otros titulares si es HTML if ($tipo != 2) { %>
<% // se deben listar todos los titulares de noticias vigentes en las seccion // excepto la noticia en pantalla $query = "SELECT n.id_news as id_news, n.titular as titular FROM news as n WHERE n.id_seccion = '$sc' AND n.id_news != '$nt' AND n.publicar = 'S' AND TO_DAYS(n.fecha_inicio) <= TO_DAYS(NOW()) AND TO_DAYS(n.fecha_fin) >= TO_DAYS(NOW())"; $table->search($query); // mostrar la tabla solo si hay registros if ($table->nfound) { %>

Otros Titulares

<% while ($row=$table->sql_fetch_object()) { %> <% }//While %>
<%echo $row->titular %>
<% }//if %>
<% } // end if not HTML %><% if ($subtitular){%><%echo $subtitular%>
<%}%><%echo $titular%>

<% if ($autor){ %>por: <%echo $autor%><% } if ($fuente) echo " / ".$fuente %>

<% if ($foto){ %><% echo $foto %><% } %><% // reemplazar los cambios de linea por HTML breaks if ($tipo!='2') $texto=nl2br($texto); echo "$texto"; %>

<% }//if nfound %>

<% //Vamos a buscar las noticas relacionas con la noticia actual $query="SELECT n.titular as titular, n.id_news as id_news FROM news as n, rel_news as r WHERE r.id_news = '$nt' AND r.id_relnews = n.id_news "; $table->search($query); if ($table->nfound){ %> <% while ($rel_obj=$table->sql_fetch_object()){ %> <% }//while %>
Noticias Relacionadas
<% echo $rel_obj->titular%>
<% }//numrecords %>

E-mail fedegolf@federacioncolombianadegolf.com
Dirección: Cra. 7 # 72 – 64 Int.26 Tel: (57-1)3107664 Bogotá - Colombia
Copyright © 2005 Federación Colombiana de Golf | Todos los derechos Reservados - Prohibida su copia
Sugerencias y Comentarios al Webmaster
Dise�o de p�ginas web en Colombia

<% $table->sql_close() %>