ver_anuncio.php <?php
include_once("../config/conexao.php");
?>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="ISO-8859-1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="../css/stylo.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css">
<link href='http://fonts.googleapis.com/css?family=PT+Sans:400,700' rel='stylesheet' type='text/css'>
<script src="js/jquery.min.js"></script>
<script>
$(function() {
var pull = $('#pull');
menu = $('nav ul');
menuHeight = menu.height();
$(pull).on('click', function(e) {
e.preventDefault();
menu.slideToggle();
});
$(window).resize(function(){
var w = $(window).width();
if(w > 320 && menu.is(':hidden')) {
menu.removeAttr('style');
}
});
});
</script>
<link href="http://fonts.googleapis.com/css?family=Open+Sans:600" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="../js/jquery.min-.js"></script>
<script type="text/javascript" src="../js/mapa.js"></script>
<script src="SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
<link href="SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="../css/cursor.css">
<script src="../js/bloqueio.js" type="text/javascript"></script>
<title>Anúncio:<?php echo $ln->nome; ?></title>
<link href="../SpryAssets/SpryTabbedPanels.css" rel="stylesheet" type="text/css" />
<script src="../SpryAssets/SpryTabbedPanels.js" type="text/javascript"></script>
</head>
<body onload="initialize()">
<div id="divhoriz">
<img style=" margin-left:50px;" src="../img/logo.png" width="500" height="159"></div>
<div>
<nav class="clearfix">
<ul class="clearfix">
<li><a href="#">Início</a></li>
<li><a href="quemsomos.php">Quem Somos</a></li>
<li><a href="#">Fale Conosco</a></li>
<li id="divcadastre"><a href="#">CADASTRE SUA EMPRESA OU SERVIÇO AQUI. É GRÁTIS!</a></li>
</ul>
<a href="#" id="pull">Menu</a>
</nav></div>
<table width="100%" height="579" border="0" style=" margin-top:10px;">
<tr>
<td>
<table width="100%" height="350" border="0">
<tr>
<td valign="top" rowspan="4">
<table width="100%" border="0" cellpadding="5" cellspacing="5">
<tr>
<td width="2%" align="center" valign="middle"><img src="uploads/<?php echo $ln->foto; ?>" width="360" height="280" /></td>
<td width="98%" align="left" valign="top"><br />
<div align="left" style="margin:5px; color:#333; font-size:11px;">Nome da Empresa: <strong style="font-size:14px; text-transform:uppercase;"><?php echo $ln->empresa; ?></strong></div>
<div align="left" style="margin:5px; color:#333; font-size:11px;"> Telefone 1: <strong><?php echo $ln->telefone; ?></strong> Telefone 2: <strong><?php echo $ln->telefone2; ?></strong> </div>
<div align="left" style="margin:5px; font-size:11px; color:#333;"> E-mail: <strong><a href="mailto:<?php echo $ln->email; ?>"><u><?php echo $ln->email; ?></u></a></strong></div>
<div align="left" style="margin:5px; font-size:11px; color:#333;"> CEP: <strong><?php echo $ln->cep; ?></strong></div>
<div align="left" style="margin:5px; color:#333; font-size:11px;">Rua: <strong><?php echo $ln->rua; ?>, </strong>n<strong>°<?php echo $ln->numero; ?></strong></div>
<div align="left" style="margin:5px; color:#333; font-size:11px;">Bairro: <strong><?php echo $ln->bairro; ?></strong></div>
<div align="left" style="margin:5px; font-size:11px; color:#333;">Cidade: <strong><?php echo $ln->cidade; ?></strong></div>
<div align="left" style="margin:5px; font-size:11px; color:#333;"> Site: <strong><a href="<?php echo $ln->site; ?>" target="_blank"><u><?php echo $ln->site; ?></u></a></strong></div>
<div align="left" style="margin:5px; font-size:11px; color:#333;">Enviado por: <strong><?php echo $ln->nome; ?></strong></div>
<br />
</td>
</tr>
</table>
<table width="725" height="47" border="0">
<tr>
<th scope="col"> <div id="TabbedPanels1" class="TabbedPanels">
<ul class="TabbedPanelsTabGroup">
<li class="TabbedPanelsTab" tabindex="0"><img src="cep.png" width="16" height="15" /> Localize-se</li>
<li class="TabbedPanelsTab" tabindex="0"><img src="sobre.png" width="20" height="13" /> Sobre Nós</li>
<li class="TabbedPanelsTab" tabindex="0"><img src="email.png" width="16" height="12" /> Entre Em Contato</li>
</ul>
<div class="TabbedPanelsContentGroup">
<div class="TabbedPanelsContent">
<div id="apresentacao">
<form method="post" action="index.html">
<fieldset>
<label for="txtEndereco">Informe Cep ou Endereço:</label>
<input type="text" id="txtEndereco" name="txtEndereco" />
<input type="button" id="btnEndereco" name="btnEndereco" value="Mostrar no mapa" />
<div id="mapa"></div>
</fieldset>
</form>
</div>
</div>
<div class="TabbedPanelsContent">
<div align="left" style="width:700px; height:95px; word-wrap:break-word; overflow:scroll; overflow-x:hidden;"><?php echo $ln->descricao; ?></div>
</div>
<div class="TabbedPanelsContent">
<p align="center" style="font-size:18px;"><strong>Entre em contato com <u><?php echo $ln->empresa; ?></u>, preenchendo o formulário abaixo!</strong></p>
<div align="center">Mensagem será enviada na Caixa de Spam "Lixeira" do seu email!</div>
<form action="formail.php">
<input type="hidden" name="emaildest" value="<?php echo $ln->email; ?>">
<!-- e-mail do destinatario -->
<input type="hidden" name="redirecionar" formtarget="_new" value="obrigado.php">
<!-- Endereço para onde Vai depois de enviar o formulario -->
<center>
<table width="280" height="260" border="0" align="left" cellpadding="1" cellspacing="0" >
<tr>
<td>
<table width="600" height="139" border="0" align="center" cellpadding="3" cellspacing="5">
<tr>
<td height="28"><div style="color:#333;" align="right">Nome:</div></td><td width="194"><input type="text" size="30" placeholder="Informe o seu nome" name="nome" value=""></td>
<td width="383" rowspan="3">
<textarea cols="40" placeholder="Mensagem" rows="6" name="mensagem"></textarea>
</td>
</tr>
<tr>
<td height="28"><div style="color:#333;" align="right">E-mail:</div></td><td><input type="text" placeholder="Informe seu email ex: exemplo@exemplo.com" size="30" name="email" value=""></td>
</tr>
<tr>
<td height="28"><div style="color:#333;" align="right">Assunto:</div></td><td><input type="text" placeholder="Informe o assunto" size="30" name="assunto" value=""></td>
</tr>
<tr>
</tr>
<tr>
<td colspan="3" align="center"><input type="submit" value=" Enviar "> <input type="reset" value=" Limpar "></td>
</tr>
</table>
</td>
</tr>
</table>
</center>
</form>
<script language=javaScript>
function checanav(){
var x = navigator.appVersion;
y = x.substring(0,4);
if (y>=4) variaveis(),local();
}
function variaveis(){
if (navigator.appName == "Netscape") {
h=".left";
v=".top";
dS="document.";
sD="";
iW="window.innerWidth"
iH="window.innerHeight"
osX="window.pageXOffset"
osY="window.pageYOffset"
}else{
h=".pixelLeft";
v=".pixelTop";
dS="";
sD=".style";
iW="document.body.clientWidth"
iH="document.body.clientHeight"
osX="document.body.scrollLeft"
osY="document.body.scrollTop"
}
}
obW=70+30
obH=62+38
objectXY="marca"
function local(){
eval(dS+objectXY+sD+h+"="+((eval(iW))-obW+(eval(osX))));
eval(dS+objectXY+sD+v+"="+((eval(iH))-obH+(eval(osY))));
setTimeout("local()",100)
}
checanav()
</script>
<!--fim -->
</div>
</div>
</div>
</th>
</tr>
</table>
<script type="text/javascript">
var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1");
</script>
</td>
<td width="313" valign="top"><strong style="color:#999; padding-left:5px; border-bottom-style:solid;">EMPRESAS EM DESTAQUE</strong><br>
<?php
include_once("../mysqli.php");
try {
$con = conexao::getInstance();
$res = $con->query("SELECT * FROM anuncios ORDER BY cliques DESC LIMIT 1");
while($m=$res->fetch_array(MYSQLI_ASSOC)){
$ID = $m["ID"];
$thumb = $m["thumb"];
$empresa = $m["empresa"];
$telefone = $m["telefone"];
$cidade = $m["cidade"];
}
} catch(Exception $e) {
echo $e->getMessage();
}
?>
<table style=" margin-top:15px; margin-left:5px;" height="50" border="0">
<tr>
<td height="110" valign="middle"><a href="javascript: ver_anuncio(<?php echo $ID; ?>);" style="text-decoration:none;"><img style="border:3px solid #CCC; width:250px; height:220px;" src="../uploads/<?php echo $thumb; ?>" /></a></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top"><strong style="color:#999; padding-left:5px; border-bottom-style:solid;">PARCEIROS</strong></td>
</tr>
<tr>
<td valign="top" style=" padding-top:10px; padding-left:5px; color:#999;">
<strong style="border-bottom-style:solid;">SIGA-NOS NO FACEBOOK </strong>
</td>
</tr>
</table>
</td>
</tr>
</table>
<div id="divfooter">
<table id="divtabefooter" width="100%" border="0">
<tr>
<td valign="top" style="padding-left:60px;"><strong style="color:#CCC;">Empresa</strong><br>
<ul><a style="text-decoration:none; color:#FFF;" href="quemsomos.php">Quem Somos</a></ul>
<ul><a style="text-decoration:none; color:#FFF;" href="#">Fale Conosco</a></ul>
</td>
<td valign="top" style="padding-right:50px;"><strong style="color:#CCC;">Links Úteis</strong><br>
<ul><a style="text-decoration:none; color:#FFF;" href="https://www.google.com.br/maps?hl=pt-BR&tab=wl" target="_blank">Maps</a></ul>
<ul><a style="text-decoration:none; color:#FFF;" href="https://www.google.com.br/" target="_blank">Google</a></ul>
</td>
<td valign="top"><strong style="color:#CCC;">Dúvidas</strong><br>
<ul><a style="text-decoration:none; color:#FFF;" href="#">Comece por aqui</a></ul>
<ul><a style="text-decoration:none; color:#FFF;" href="pqanunciar.php">Por quê anunciar?</a></ul>
</td>
</tr>
</table>
</div>
</body>
</html>meu script está em java e eu estou fazendo em mysql como faço para usar essa função aqui $id = $_GET["id"];aonde eu coloco isso para puxar por id obg