Jump to content


Photo

Abrir Na Mesma Janela


  • Faça o login para participar
Nenhuma resposta neste tópico

#1 Lility

Lility

    Turista

  • Usuários
  • 50 posts
  • Sexo:Não informado

Posted 20/06/2008, 09:32

OI Pessoal

Estou com uma duvida nao muito simples. Tenho um script que chama várias paginas dentro dele, cada item do menu para ser mais clara. Desta forma a index é apenas uma pagina e os demais são puxados para dentro dela. Até ai tudo ok, minha duvida é que tenho outras paginas que terão que abrir na mesma janela, só que o problema é ele acaba perdendo a configuração a pagina principal, está faltando eu determinar alguma coisa para q ele abra dentro da mesma. Vou postar os dois códigos, a pagina de index e a que vai chamar a proxima que deveria abrir dentro da mesma pagina, será q algumem pode me ajudar?
Index.php
<HTML>
<HEAD>
<TITLE></TITLE>
&lt;script src="js/flash.js" type="text/javascript"></script>
<LINK REL="stylesheet" HREF="stylesheet.css" TYPE="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--

@import url("stylesheet.css");
-->
</style>
</HEAD>
<BODY background="img/bg_b.gif" LEFTMARGIN="0" TOPMARGIN="0" bgproperties="fixed" MARGINWIDTH="0" MARGINHEIGHT="0" width="100%" height="100%">
<?
require("inc/config.php");

require("inc/conecta.php");

$id = "$id";
$data = date("Ymd");
$consulta = "INSERT INTO contador
			   (data)
			 VALUES
			   ('$data')";
			   $resultado = mysql_query($consulta)
  or die("Falha na execução da consulta");

///////////// CONTADOR DE VISITAS POR IP //////////////////////////////////////////
$acao1=mysql_query("SELECT ip FROM contador_ip WHERE ip='$REMOTE_ADDR'"); 
while ($valor=mysql_fetch_array($acao1)){ 
$sim=$valor['ip']; 
} 
if(!$sim){ 
$acao=mysql_query("INSERT INTO contador_ip (ip) VALUES('$REMOTE_ADDR')"); 
} 
$acao=mysql_query("SELECT * FROM contador_ip"); 
$acessos=mysql_num_rows($acao); 
$font="<font face=verdana size=1>"; 
//CONTADOR DE VISITAS POR IP 


$paginas = Array 
	(
		"inicio" => "inicio.php",
		"mostra" => "cat.php",
		"contato" => "contato.php",
		"links" => "Links.php",	
	);
$paginaPHP = $paginas[$p];	
$p = "links";
if (isset($_GET["p"])) {
	$p = $_GET["p"];
}
if (($p=="links") && (!isset($_GET["l"]))) {
	$l = "Quem";
} else {
	$l = $_GET["l"];
}
?>
<TABLE WIDTH="800"  BORDER="0" align="center" CELLPADDING="0" CELLSPACING="0" class="menulink1" TOPMARGIN="0" background="img/lado.png">
  <TR> 
	<TD height="333" valign="top"  class="menulink1" TOPMARGIN="0"> 
	  <div align="center"> 
		<table width="97%" height="29" border="0" cellpadding="0" cellspacing="0">
		  <tr> 
			<td><div align="center"> 
				<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="778" height="305">
				  <param name="movie" value="img/teste2.swf">
				  <param name="quality" value="high">
				  <embed src="img/teste2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="772" height="305"></embed></object>
			  </div></td>
		  </tr>
		</table>
	  </div>
	  <div align="right">
		<table width="778" border="0" align="center" cellpadding="0" cellspacing="0" topmargin="0">
		  <tr> 
			<td width="519" height="28" valign="bottom" bgcolor="#000000" > <p align="right" class="menu"><a href="?p=links&l=Inicio" class="menulink1">Início</a>      <a href="?p=links&l=Quem" class="menulink1"> 
				Quem Somos</a>       <a href="?p=mostra&l=mostra" class="menulink1"> 
				Portifólio</a>       <a href="?p=links&l=Empreendimentos" class="menulink1">Empreendimentos</a>   
				      <a href="?p=contato&l=contato" class="menulink1"> 
				Fale Conosco</a></p></td>
		  </tr>
		</table>
	  </div>
	  </TD>
  </TR>
  <TR> 
	<TD width="800" height="62"   class="menulink1" TOPMARGIN="0"> 
	  <div align="center"> 
		<table width="778" height="62" border="0" cellspacing="0" cellpadding="0">
		  <tr> 
			<td width="572" height="21" rowspan="2" background="img/back.gif"> 
			  <div align="center"></div>
			  <div align="center"></div>
			  <div align="center"></div>
			  <div align="justify"></div>
			  <div align="justify"></div>
			  <div align="center"> 
				<table width="97%" border="0" cellspacing="0" cellpadding="0">
				  <tr> 
					<td> 
					  <? 
							$paginaPHP = $paginas[$p];
					if (isset($paginaPHP)) {
						include($paginas[$p]); 
						
					} else {
						  include("contato.php");

											}
				 
				?>
					</td>
				  </tr>
				</table>
			  </div>
			<td width="8" rowspan="2" background="img/faixa.jpg"><td width="198" height="43" colspan="2" valign="top" background="" bgcolor="#55585F" cellspacing="0" topmargin="0" cellpadding="0"> 
			  <div align="right" > <img src="img/cor_list.jpg" width="30" height="43" vspace="0" align="top"></div> 
		  <tr> 
			<td height="19" colspan="2" bgcolor="#55585F" cellspacing="0" topmargin="0" cellpadding="0">  
		</table>
	  </div>
	  </TD>
  </TR>
</TABLE>
<div align="center">
  <table width="800" height="40" border="0" cellpadding="0" cellspacing="0" background="img/abaixo.png">
	<tr> 
	  <td width="800" height="40"> 
		<div align="center"><font color="#FFFFFF" size="2" face="tahoma">..:: 
		  A S Ramos Construções - Rua Belmira Isabel Martins, 62 
		  - Sala 503 - Estreito - SC - Fone: 48 - 3248-8883::..</font></div></td>
	</tr>
  </table>
</div>
<p> </p>
</BODY>
</HTML>
Pagina para abrir em mesma janela
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Produtos</TITLE>
<style type="text/css">
<!--
-->
</style>
<BODY>
<table width="5%" height="34" border="0" >
  <p align="left"><img src="img/portifolio.gif"></p>
	  <div align="center"> 
		<?php
  include("inc/conecta.php");
 $consulta = "SELECT * FROM tb_produtos ORDER BY idproduto";
$resultado = mysql_query($consulta)
  or die("FALHA NA CONSULTA");
  if (mysql_num_rows($resultado) == 0) {
  echo "<font face=verdana size=1 color=000000><b>Nenhum registro no momento<br></b></font>";
  } 
while ($row = mysql_fetch_assoc($resultado)){
 $idMarca = $row["idproduto"];
 $nomemarca = $row["nomeproduto"];
 $foto0 = $row["foto0"];
  $descricaoproduto = $row["descricaoproduto"];
 
 
 echo "<p><img src='http://198.170.81.47/adm/produtos/$foto0' width=400 position:relative;><br>";
  echo "<font face=verdana size=2 color=#006633>$descricaoproduto<br>";
	
 
 }
				
?></p>
		</div></td>
  </tr>
</table>
</BODY>
</HTML>
Pagina q gerencia os links - Acho q o segredo esta aqui, mas nao estou conseguindo fazer funcionar
<? 
if (isset($l)) {
	$sql = "SELECT * FROM conteudo WHERE Link = '".$l."'";
	$resultado5 = mysql_query($sql)
	or die("Falha na execução da consulta");
	if (mysql_num_rows($resultado5) == 0); 
	

	while ($linha5 = mysql_fetch_assoc($resultado5)){
		//Linhas que são exibidas nas consultas
		$idconteudo = $linha5["idLink"];
		$Link = $linha5["Link"];
		$Texto = $linha5["Texto"];
		
		
		
		//Cabeçalhos da Consulta
		echo "<table>";
		
		echo "$linha5[Texto]";
		echo "</table>";
	}

}
?>





0 user(s) are reading this topic

0 membro(s), 0 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq