Location: PHPKode > scripts > TrovaLavoro > trovalavoro/richiesta.php
<?php
include("db/db.php");
if(isset($_GET["id"]))
{
$id = $_GET["id"];
$g = mysql_query("SELECT * FROM richiesta WHERE id='$id'");
if(mysql_num_rows($g) > 0)
{
$t = mysql_fetch_array($g);	
}
else
{
exit();
}
}
else
{
exit();	
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script language="javascript">
$(document).ready(function(){
$('#del').click(function(){
window.location.reload()
});
$("#buj_l").click(function(){
$("#buj_l").css({visibility: "hidden",position:"absolute"});
$("#buj_r").css({visibility: "hidden",position:"absolute"});
$("#buji").css({opacity: 0, visibility: "visible",position:"relative"}).animate({opacity: 1.0},1000);
});
$("#button").click(function(){
$("#button").css({opacity: 0.5}).animate({opacity: 1.0},1000);
en = $("#box_input_a2").val();
es = $("#box_input_b2").val();
ep = $("#box_input_c").val();
id = $('#o').text();
$.post("<?php echo $uu["url"]; ?>up2.php",{"nome":en,"tel":es,"text":ep,"idi":id},function(data){
if(data == 1)
{
$("span").text("Per favore, compila tutti i campi!").css({color:"#900",opacity: 0.5}).animate({opacity: 1.0},1000);
}
else
{
$("span").text("La sua risposta e stata inviata con successo!").css({color:"#036",opacity: 0.5}).animate({opacity: 1.0},1000);
$("#form")[0].reset();	
}
});
});
$("#offertb").click(function(){
$("#offertb").css({opacity: 0, visibility: "visible",position:"relative"}).animate({opacity: 1.0},1000);
en = $("#settore").find(":selected").text();
es = $("#telefono").val();
ep = $("#titolo").val();
bo = $('#box_in').find(":selected").text();
off = $('#offertext').val();
$.post("<?php echo $uu["url"]; ?>up2.php",{"nom":en,"telefono":es,"titolo":ep,"select":bo,"desc":off},function(data){
if(data == 1)
{
$("#offertb").val("Compila tutti i campi!").css({opacity: 0.5}).animate({opacity: 1.0},2000,function(){
$("#offertb").val("Invia la tua richiesta di lavoro").css({opacity: 0.5}).animate({opacity: 1.0},1000);	
});
}
else
{
$("#offerta")[0].reset();
$("#offertb").val("La sua richiesta e stata inviata!").css({opacity: 0.5}).animate({opacity: 1.0},2000,function(){
$("#offertb").val("Invia la tua richiesta di lavoro").css({opacity: 0.5}).animate({opacity: 1.0},1000);
});	
}
});
});
$("#box_input_b").keyup(function(){
bo = $('#box_input_a').find(":selected").text();
$('#del').css({visibility:"visible"});
if(bo == "Seleziona la regione")
{
a = $("#box_input_b").val();
$.post("<?php echo $uu["url"]; ?>up2.php?last=0",{"sea":a},function(data){
$("#post").empty();
$("#post").append(data);
});
}
else
{
a = $("#box_input_b").val();
$.post("<?php echo $uu["url"]; ?>up2.php?last=0",{"sea":a,"re":bo},function(data){
$("#post").empty();
$("#post").append(data);
});
}
});
});
function p(l)
{
a = $("#box_input_b").val();
bo = $('#box_input_a').find(":selected").text();
if(bo == "Seleziona la regione")
{
$.post("<?php echo $uu["url"]; ?>up2.php?last="+l,{"sea":a},function(data){
$("#post").html("");
$("#post").append(data);
});	
}
else
{
$.post("<?php echo $uu["url"]; ?>up2.php?last="+l,{"sea":a,"re":bo},function(data){
$("#post").html("");
$("#post").append(data);
});
}
}
</script>
<title><?php echo $t["titolo"]." - ".$uu["nome"]; ?></title>
<link href='http://fonts.googleapis.com/css?family=Average+Sans' rel='stylesheet' type='text/css'>
<script src="//use.edgefonts.net/neuton-cursive.js"></script>
<link rel="stylesheet" href="<?php echo $uu["url"]; ?>css/style.css" media="all" />
</head>
<body>
<div id="body">
<div id="top">
<div id="top_mid">
<div id="logo"><a href="<?php echo $uu["url"]; ?>"><?php echo $uu["nome"]; ?></a></div>
<div id="menu">
<ul>
<li><a href="<?php echo $uu["url"]; ?>">Offerte di Lavoro</a></li>
<li><a href="<?php echo $uu["url"]; ?>cercolavoro.php">Cerco Lavoro</a></li>
<li><a href="<?php echo $uu["url"]; ?>cosaoffriamo.php">I Nostri Servizi</a></li>
</ul>
</div>
</div>
</div>
<div id="bod">
<div id="bod_left">
<div id="annuncio">
<h2><?php echo $t["titolo"]; ?></h2>
<p style="border-bottom: 1px dashed rgb(217, 214, 203);font-size:13px; margin-bottom:20px">Regione: <strong>Italia, <?php echo $t["regione"]; ?></strong> - Settore: <strong><?php echo $t["nome"]; ?></strong> - Data di pubblicazione: <strong><?php echo str_replace("-"," ",$t["date"]); ?></strong></p>
<?php echo $t["text"]; ?>
</div>
<div id="buj">
<div id="buji">
<form action="" id="form" method="get">
<div id="box_input"><input name="" id="box_input_a2" type="text" placeholder="Nome Azienda" value="" /><input name="" id="box_input_b2" type="text" placeholder="Inserisci numero di telefono"  value="" /></div>
<div id="box_textarea"><textarea name="" id="box_input_c" cols="" rows=""></textarea></div>
<div id="box_bo"><input type="button" id="button" value="Invia Risposta" /><span style="float:right; margin-top:10px;"></span><div id="o" style="visibility:hidden; position:absolute"><?php echo $t["id"]; ?></div></div>
</form></div>
<div id="buj_l">Rispondi al richiesta</div>
<div id="buj_r">
<script type="text/javascript"> document.write('<a href="https://www.facebook.com/sharer/sharer.php?u='+document.location.href+'" style="color:#405278; text-decoration:none" target="_blank">Condividi su Facebook</a>');
</script></div>
</div>
<div id="last">
</div>
<div id="post">
<?php
$reg = $t["regione"];
$udu = mysql_query("SELECT * FROM richiesta WHERE regione='$reg' AND id!='$id' AND `ap`='1' ORDER BY id DESC LIMIT 10");
$nav_d = mysql_num_rows($udu);
$d = 0;
while($d < $nav_d)
{
$id = mysql_result($udu,$d,"id");
$nome = mysql_result($udu,$d,"nome");
$titolo = mysql_result($udu,$d,"titolo");
$text = mysql_result($udu,$d,"text");
$regione = mysql_result($udu,$d,"regione");
$text = strip_tags($text);
$date = mysql_result($udu,$d,"date");
$fr = explode("-",$date);
?>
<div id="posts">
<div id="posts_l">
<h3><a href="<?php echo $uu["url"]; ?>richiesta/<?php echo $id; ?>/"><?php echo $titolo; ?></a></h3>
<p><?php echo cutsrr($text,66); ?></p>
</div>
<div id="posts_l2"><h3><?php echo $nome; ?></h3>
<p>Italia, <?php echo $regione; ?></p></div>
<div id="posts_l3" align="right"><h3><?php echo $fr[0]." ".$fr[1]; ?></h3>
<p><?php echo $fr[2]; ?></p></div>
</div>
<?php 
$d++;
}
?>
<div id="pagination"></div>
</div>
</div>
<?php
include("db/right.php");
include("db/text.php");
?>
</div>
</div>
</div>
</body>
</html>
Return current item: TrovaLavoro