<?php
include("../include/connexionBase.inc");
//=========================================
// includes du fichier fonctions
require 'fonctions.php';
//=========================================
session_start();
/*
// si la connexion échoue
if ($maConnexion == false) {
// on renvoie une variable resultat_0 qui indique l'échec
// ainsi qu'une variable erreurmsg qui indique la raison de l'échec
echo "&resultat_0=Echec&erreurmsg=";
echo utf8_encode("Connexion : base de donnees introuvable");
exit;
}
else{echo utf8_encode("Connexion : base de donnees JPG TRANSACTION Ok");}*/
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<!--<meta name="identifier-url" content="
http://www.jpg-transactions.com">-->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="content-language" content="FR">
<title>JPG Transaction – commerce tabac bar restaurant, annonces fond de commerce, annonces vente fond de commerce</title>
<meta name="description" content="JPG transactions vous accompagne dans l’acquisition d’un bien immobilière : commerce tabac bar restaurant, annonces fond de commerce, annonces vente fond de commerce. Nos équipes d’experts sont toujours à l’écoute de vos besoins">
<meta name="keywords" content="commerce tabac bar restaurant, annonces fond de commerce, annonces vente fond de commerce">
<meta name="author" content="agence immobiliere nantes">
<meta name="copyright" content="
www.jpg-transactions.com">
<meta NAME="ROBOTS" CONTENT="INDEX, FOLLOW, NOYDIR, NOODP, ALL">
<?php
set_time_limit(0);
$host = "*******"; // Machine hébergeant la base de donnée
$user = "*******"; // Nom d'utilisateur = Nom de la base que vous avez choisi
$pass = "*******"; // Le mot de passe que vous avez choisi pour cette base
$base = "*******"; // Nom de la base de donnée
function connexion_mysql_db() {
global $host,$login,$pass;
$db = mysql_connect($host,$login,$pass) or erreur_connexion_mysql();
mysql_select_db($base);
}
?>
<script language="JavaScript" type="text/JavaScript">
<!--
function OuvrePopup(page,largeur,hauteur,options) {
var top=((screen.height-hauteur)/2)+50;
var left=((screen.width-largeur)/2)+75;
window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options);
}
//-->
</script>
<!-- ------------------------- CHOIX FEUILLE DE STYLE EN FONCTION NAVIGATEUR ------------------------- -->
<script language="JavaScript">
var name = navigator.appName
// On appelle le nom du navigateur avec la Propriété appName
// de l'objet navigator
if (name == "Microsoft Internet Explorer")
style=("../include/style.css");
else style=("../include/style2.css"); // sinon c'est mozilla
document.write('<link rel="stylesheet" type="text/css" href="'+style+'" media="screen" />');
</script>
<script type="text/javascript" src="../include/swfobject.js"></script>
</head>
<body bottommargin="0">
<div id="conteneur" >
<!-- PARTIE GAUCHE MENU ET CONTACT -->
<div id="menu">
<NOEMBED><a href="html/organisation.html">Organisation</a> | <a href="html/services.html">Services</a> | <a href="html/annonces.php">Annonces</a> | <a href="html/construction.html">References</a> | <a href="html/partenaires.html">Partenaires</a> | <a href="html/contacta.php">Contact Achat</a> | <a href="html/contactv.php">Contact Vente</a></noembed>
<script type="text/javascript">
var so = new SWFObject("../swf/menu.swf", "menu", "182", "302", "8", "#ffffff", true);
so.write("menu");
</script>
</div>
<div id="contact">
<img src="../img/acquisition_fond_de_commerce.gif" alt="acquisition fond de commerce" border="0" /></img>
</div>
<div id="photo_service">
<img src="../img/fond_commerce.jpg" alt="fond de commerce" border="0" /></img>
</div>
<!-- CALQUE DE RECHERCHE DE BIEN -->
<div id="fond_recherche">
<div id="txt_cat">
Catégories :
</div>
<div id="txt_dep">
Départements :
</div>
<div id="formu">
<form name="formRecherche" method="post" action="./annonces.php">
<?php
////////////////////////////////////////////////////////////////////////////////////////////////////
//combo liste des categories
////////////////////////////////////////////////////////////////////////////////////////////////////
$sq3 = 'SELECT * FROM jpgtr40_JPG.categorie';
$req3 = mysql_query($sq3) or die('Erreur SQL !<br>'.$sq3.'<br>'.mysql_error());
echo '<select id="f_cat" tabindex="1" name="categorie" value='.isset( $_POST['categorie'] ).'>';
//echo '<select id="f_cat" tabindex="1" name="categorie" value='.isset( $_SESSION['categorie'] ).'>';
echo '<option value="%">----------------------Toutes----------------------</option>';
while ( $listcat = mysql_fetch_array( $req3 ) ) {
echo '<option ';
if ($listcat['CAT_NOM']==@$_POST['categorie']){echo 'selected ';}
echo 'value="'.$listcat['CAT_NOM'].'">'.htmlentities($listcat['CAT_NOM']).'</option>';
//echo '<option value="'.$listcat['CAT_NOM'].'">'.$listcat['CAT_NOM'].'</option>';
}
//}
//mysql_close();
mysql_free_result($req3);
echo '</select>';
?>
</div>
<div id="formu">
<?php
////////////////////////////////////////////////////////////////////////////////////////////////////
//combo liste des departements
////////////////////////////////////////////////////////////////////////////////////////////////////
$sq2 = 'SELECT * FROM jpgtr40_JPG.departement ORDER BY DEPT_NUM';
$req2 = mysql_query($sq2) or die('Erreur SQL !<br>'.$sq2.'<br>'.mysql_error());
echo '<select id="f_dept" tabindex="2" name="departement" value='.isset( $_POST['departement'] ).'>';
echo '<option value="%">-----------------------Tous------------------------</option>';
while ( $listDept = mysql_fetch_array( $req2 ) ) {
echo '<option ';
if ($listDept['DEPT_NUM']==@$_POST['departement']){echo 'selected ';}
echo 'value="'.$listDept['DEPT_NUM'].'">'.$listDept['DEPT_NUM'].' - '.htmlentities($listDept['DEPT_NOM']).'</option>';
}
mysql_free_result($req2);
echo '</select>';
?>
</div>
<input type="hidden" name="charger" value="<?php echo isset( $_POST['charger'] ); ?>">
<div id="b_valider2">
<input type="image" src="../img/b_valider2.gif" onClick="charger.value='ok';submit();">
</div>
</form>
</div>
<!-- BLOC DE JEAN-CHRISTOPHE -->
<?php
if (isset( $_POST['charger'] )!='ok' and @$_GET['lien']!='ok')
{
?>
<div id="txt_annonces">
<p><b>L'agence immobilière à Nantes, JPG Transactions est à l'écoute de vos besoins et vous propose de consulter les annonces actuellement disponibles pour trouver votre fond de commerce dans les départements du Grand Ouest.
Pour une recherche approfondie, utilisez l'outil de recherche ci-dessus vous permettant d'affiner votre choix par catégorie et par département.
Ci-après découvrez toutes les annonces disponibles par type de fond de commerce.</b></p>
<table align="center">
<tr>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... tml">Hotêl restaurant</a>
</td>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... tml">Hôtel bureau</a>
</td>
</tr>
<tr>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... reperie</a>
</td>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... izzeria</a>
</td>
</tr>
<tr>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... taurant</a>
</td>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... .html">Bar restaurant</a>
</td>
</tr>
<tr>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... .html">Bar brasserie</a>
</td>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... .html">Bar PMU</a>
</td>
</tr>
<tr>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... ml">Bar</a>
</td>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... .html">Bar tabac</a>
</td>
</tr>
<tr>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... >Presse</a>
</td>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... tml">Tabac presse</a>
</td>
</tr>
<tr>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... html">Murs commerciaux</a>
</td>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... .html">Pas de porte</a>
</td>
</tr>
<tr>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... .html">PME - PMI</a>
</td>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... uristes</a>
</td>
</tr>
<tr>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... abillement et chaussures</a>
</td>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... ure">Salon de coiffure</a>
</td>
</tr>
<tr>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... tml">Salon d’esthetique</a>
</td>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... ntation</a>
</td>
</tr>
<tr>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... oration</a>
</td>
<td width="200px" align="center"><a href="
http://www.jpg-transactions.com/html/an ... heque">Bar Pub Discothèque</a>
</td>
</tr>
</table>
</div>
<?php
}
?>
<!-- FIN DU BLOC DE JEAN-CHRISTOPHE -->
<?php
//=========================================
// initialisation des variables
//=========================================
// on va afficher 3 résultats par page.
$nombre = 100;
// si limite n'existe pas on l'initialise à zéro
if (!isset($limite)) $limite = 0;
// on cherche le nom de la page.
$path_parts = pathinfo($_SERVER['PHP_SELF']);
$page = $path_parts["basename"];
//SI LE BOUTON OK EST VALIDE///////////////////////////////////////////////////////
if (isset( $_POST['charger'] )=='ok' or @$_GET['lien']=='ok')
{
//=========================================
// requête SQL qui compte le nombre total
// d'enregistrements dans la table.
//=========================================
if (@$_GET['lien']=='ok')
{
$categorie = htmlentities( $_GET['categorie'] );
$departement = $_GET['departement'];
/*echo "<div id='affiche_echo'>";
echo"num venant du lien page : ";
echo $departement;
echo "<br>";
echo $categorie;
echo "</div>";*/
$_POST['departement'] = $departement;
$_POST['categorie'] = $categorie;
}
else
{
$categorie = htmlentities( $_POST['categorie'] );
$departement = $_POST['departement'];
/*echo "<div id='affiche_echo'>";
echo"num venant du formulaire : ";
echo $departement;
echo "<br>";
echo $categorie;
echo "</div>";*/
}
$sql = "SELECT count(INFO_ID) FROM jpgtr40_JPG.INFORMATION";
//if (isset( $_POST['categorie'] )<>""){$sql=$sql." WHERE INFORMATION.INFO_CAT LIKE '".$_POST['categorie']."'"; }
//if (isset( $_POST['departement'] )<>""){$sql=$sql." AND INFORMATION.INFO_DEPT LIKE '".$_POST['departement']."'"; }
if (isset( $categorie )<>""){$sql=$sql." WHERE INFORMATION.INFO_CAT LIKE '$categorie'"; }
if (isset( $departement )<>""){$sql=$sql." AND INFORMATION.INFO_DEPT LIKE '$departement'"; }
$req = mysql_query($sql) or die ('Erreur : '.mysql_error() );
$row = mysql_fetch_row($req);
$total = $row[0];
//=========================================
// vérifier la validité de notre variable
// $limite;
//=========================================
$verifLimite= verifLimite($limite,$total,$nombre);
// si la limite passée n'est pas valide on la remet à zéro
if(!$verifLimite) {
$limite = 0;
}
//=========================================
//Fonction pour decoder le texte en html
//=========================================
function decoder($texte){
$texte = utf8_decode($texte);
$texte = stripslashes($texte);
$texte = trim($texte);
$texte = htmlentities($texte, ENT_QUOTES);
$texte = strip_tags($texte);
$texte = nl2br($texte);
$texte = str_replace(">", ">", $texte);
$texte = str_replace("<", "<", $texte);
return $texte;
}
//=========================================
// requête SQL qui ne prend que le nombre
// d'enregistrement necessaire à l'affichage.
//=========================================
// on crée la requête SQL
$sql = 'SELECT * FROM jpgtr40_JPG.INFORMATION';
//if (isset( $_POST['categorie'] )<>""){$sql=$sql." WHERE INFORMATION.INFO_CAT LIKE '".$_POST['categorie']."'"; }
//if (isset( $_POST['departement'] )<>""){$sql=$sql." AND INFORMATION.INFO_DEPT LIKE '".$_POST['departement']."'"; }
if (isset( $categorie )<>""){$sql=$sql." WHERE INFORMATION.INFO_CAT LIKE '$categorie'"; }
if (isset( $departement )<>""){$sql=$sql." AND INFORMATION.INFO_DEPT LIKE '$departement'"; }
//$sql=$sql." ORDER BY INFORMATION.INFO_CAT ASC LIMIT ".$limite.",".$nombre."";
$sql=$sql." ORDER BY INFORMATION.INFO_CAT";
// on envoie la requête
$req = mysql_query($sql) or die('Erreur SQL !<br>'.$sql.'<br>'.mysql_error());
// si on a récupéré un résultat on l'affiche.
if($total) {
$limitesuivante = $limite + $nombre;
$limiteprecedente = $limite - $nombre;
echo'<div id="resultat">';
// nombre d'annonces correspondant aux critères
echo '<table align="center" border = "0" ><tr>'."\n";
echo '<td id="infoResult"><b> '.$total.' annonce(s) correspond(ent) aux critères sélectionnés</b></td>';
//echo '<td id="infoResult"><b> '.$total.''if ($total<2){' annonce corresponds'}else{' annonces correspondent'}' aux critères sélectionnés</b></td>';
echo '</tr></table><br>'."\n";
// on fait une boucle qui va faire un tour pour chaque enregistrement
while($data = mysql_fetch_assoc($req))
{
$prix=$data['INFO_PRIX'];
$affichPrix = number_format($prix,2,","," ");
// on affiche les informations de l'enregistrement en cours
echo'<table width="600" height="22" border="0" cellpadding="0" cellspacing="0">';
echo'<tr id="cadreht">';
echo'<td id="nom_bien" align="left" colspan="1"> <b>'.$data['INFO_CAT'].'</b></td>';
//echo'<td id="nom_bien" align="left" colspan="1">| <b>'.$data['INFO_CAT'].'</b></td>';
//echo'<td align="right" colspan="2">Dépt : '.$data['INFO_DEPT'].' | Prix : '.$data['INFO_PRIX'].' € </td>';
echo'<td align="right" colspan="2">Dépt : '.$data['INFO_DEPT'].' | Réf : '.$data['INFO_ID'].' | Prix : '.$affichPrix.' € </td>';
echo'</tr>';
echo'<tr>';
echo'<td colspan="4">';
echo'<table width="100%" border="0" cellpadding="0" cellspacing="0">';
echo'<tr>';
echo'<td id="milieu" align="left"><br><div style="margin-left:10px; margin-right:10px;font-size:12px;">'.(ucfirst(decoder($data['INFO_DESC']))).'</div><br></td>';
echo'</tr>';
echo'</table>';
echo'</td>';
echo'</tr>';
echo'<tr>';
echo'<td id="cadrebas" width="600" align="right" colspan="4"><a href ="contactref.php?id='.$data['INFO_ID'].'" ><b>NOUS CONTACTER</b></a> | <a href =javascript:OuvrePopup("detail.php?id='.$data['INFO_ID'].'",650,500,"menubar=no,scrollbars=no,statusbar=no") ><b>DETAILS</b></a></img> </td>';
echo'</tr>';
echo'</table><br><br>';
}
mysql_free_result($req);
//=========================================
// si le nombre d'enregistrement à afficher
// est plus grand que $nombre
//=========================================
//if($total > $nombre) {
// affichage des liens vers les pages
//affichePages($nombre,$page,$total);
// affichage des boutons
//displayNextPreviousButtons($limite,$total,$nombre,$page);
//}
//=========================================
echo'</div>';
}
else{
echo'<div id="aucun_resultat">';
echo'<b>Aucun resultat ne correspond à votre recherche</b>';
echo'</div>';
}
}
else{
echo'<div id="resultat2">';
echo '<b>Sélectionnez une Catégorie, un Département.</b>';
echo'</div>';
}
// on ferme la connexion à mysql
mysql_close();
?>
<div id="fond">
<!--<img src="../img/fond.gif" border="0" /></img>-->
<div id="basPage">
<table width="240px" border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="center"><img src="../img/bas_de_page.gif" border="0" usemap="#Map" /></img></td>
</tr>
</table>
<map name="Map" id="Map">
<area shape="rect" coords="219,3,360,26" href="#" alt="" /><area shape="rect" coords="365,4,486,26" href="admin.php" alt="" /><area shape="rect" coords="489,3,573,27" href="contacta.php" alt="" />
</map>
</div>
</div>
<div id="liens2">
<a href="../html/organisation.html">Organisation</a> | <a href="../html/services.html">Services</a> | <a href="../html/annonces.php">Annonces</a> | <a href="../html/references.html">References</a> | <a href="../html/partenaires.html">Partenaires</a> | <a href="../html/contacta.php">Contact Achat</a> | <a href="../html/contactv.php">Contact Vente</a> | <a href="../plan_du_site.html" title="Plan du site">Plan du site</a>
</div>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "
https://ssl." : "
http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-15840624-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html>