par
juliette » 02 déc. 2012, 13:32
ARF, super désolé j'ai plusieurs moteurs sur cette page et le moteur dont je parle est celui ci...
<?php
session_start();
include '../../includes/classes/connexion/Mysql.class.php';
include '../../includes/config.php';
include '../../includes/template/javascript.php';
?>
<table class="table well table-hover">
<?php
// si le formulaire est posté
if (isset($_POST['moteur'])) {
$q = strtolower(addslashes($_POST['moteur']));
$bdd = new MySqlClass();
$bdd->MysqlOpen($SqlHost, $SqlUser, $SqlPass, $SqlBdd);
$req = $bdd->MysqlSelectPerso("SELECT
ce.id_chien AS id_chien,
ce.nom AS nom,
ce.id_affixe AS id_affixe_ce,
ce.proprietaire AS proprietaire,
ce.sex AS sex,
ce.livre AS livre,
ce.lof AS lof,
ce.video AS video,
ce.photo AS photo,
af.id_affixe AS id_affixe,
af.affixe AS affixe,
af.prefixe AS prefixe,
af.affixe_url AS aff_url
FROM chien ce
INNER JOIN affixe af ON ce.id_affixe = af.id_affixe
WHERE LOWER( nom ) LIKE '$q%' OR LOWER( lof ) LIKE '$q%'");
if ($req) {
// Affichage
for ($i = 0; $i < count($req); $i++) {
$ligne = $req[$i];
// suppression des ' du nom pour l'url
$nom_url = $ligne['nom'];
$Chaine = $nom_url;
$Chaine = str_replace("'", "-", $Chaine);
if (!empty($ligne['video'])) {
$vi = '<a href="#" rel="tooltip" data-placement="right" title="Ce pedigree contient une vidéo"><i class="icon-facetime-video"></i></a>';
} elseif (!empty($ligne['photo'])) {
$vi = '<a href="#" rel="tooltip" data-placement="right" title="Ce pedigree contient une photo"><i class="icon-camera"></i></a>';
} else {
$vi = '';
}
echo '
<tr>
<td width="50%">
<div class="tooltip-demo">
</i> <img src="assets/img/' . nl2br(stripslashes($ligne['sex'])) . '.png" title="Berger belge malinois' . nl2br(stripslashes($ligne['sex'])) . '"/>
<a href="' . $ligne['id_chien'] . '-pedigree-malinois-' . stripcslashes(strtolower($Chaine)) . '-' . $ligne['aff_url'] . '.html">
<strong>' . stripcslashes($ligne['nom']) . ' ' . stripcslashes($ligne['prefixe']) . ' ' . stripcslashes($ligne['affixe']) . '</strong>
</a>
' . $vi . '
<br />
' . $ligne['proprietaire'] . '
</div>
</td>
';
if (isset($_SESSION['SESS_MEMBER_ID'])) {
if (isset($_SESSION['SESS_GROUPE']) and $_SESSION['SESS_GROUPE'] == 'Admin' or $_SESSION['SESS_GROUPE'] == 'Redacteur') {
echo'<td width="50%" class="hidden-phone">
<br /><p class="pull-right">Malinois ' . $ligne['livre'] . ' ' . $ligne['lof'] . ' [<a href="#">Modifier</a>] | [<a href="#">Supprimer</a>]</p>
</td>
</tr>';
} elseif ($_SESSION['SESS_GROUPE'] == 'Membre') {
echo'<td width="50%" class="hidden-phone">
<br /><p class="pull-right">Malinois ' . $ligne['livre'] . ' ' . $ligne['lof'] . '</p>
</td>
</tr>';
}
} else {
echo'<td width="50%" class="hidden-phone">
<br /><p class="pull-right">Malinois ' . $ligne['livre'] . ' ' . $ligne['lof'] . '</p>
</td>
</tr>';
}
}
} else {
echo '</table><p class="center"><strong><font color="red">Aucun résultat</font></strong></><br /><br />';
}
} else {
header('location: 404.php');
// var_dump($_GET['malinois']);
}
?>
</table>
et ce n'est plus du tout le même, ce sont vos test qui m'on montrer que je me trompais de moteur....
ARF, super désolé j'ai plusieurs moteurs sur cette page et le moteur dont je parle est celui ci...
[php]<?php
session_start();
include '../../includes/classes/connexion/Mysql.class.php';
include '../../includes/config.php';
include '../../includes/template/javascript.php';
?>
<table class="table well table-hover">
<?php
// si le formulaire est posté
if (isset($_POST['moteur'])) {
$q = strtolower(addslashes($_POST['moteur']));
$bdd = new MySqlClass();
$bdd->MysqlOpen($SqlHost, $SqlUser, $SqlPass, $SqlBdd);
$req = $bdd->MysqlSelectPerso("SELECT
ce.id_chien AS id_chien,
ce.nom AS nom,
ce.id_affixe AS id_affixe_ce,
ce.proprietaire AS proprietaire,
ce.sex AS sex,
ce.livre AS livre,
ce.lof AS lof,
ce.video AS video,
ce.photo AS photo,
af.id_affixe AS id_affixe,
af.affixe AS affixe,
af.prefixe AS prefixe,
af.affixe_url AS aff_url
FROM chien ce
INNER JOIN affixe af ON ce.id_affixe = af.id_affixe
WHERE LOWER( nom ) LIKE '$q%' OR LOWER( lof ) LIKE '$q%'");
if ($req) {
// Affichage
for ($i = 0; $i < count($req); $i++) {
$ligne = $req[$i];
// suppression des ' du nom pour l'url
$nom_url = $ligne['nom'];
$Chaine = $nom_url;
$Chaine = str_replace("'", "-", $Chaine);
if (!empty($ligne['video'])) {
$vi = '<a href="#" rel="tooltip" data-placement="right" title="Ce pedigree contient une vidéo"><i class="icon-facetime-video"></i></a>';
} elseif (!empty($ligne['photo'])) {
$vi = '<a href="#" rel="tooltip" data-placement="right" title="Ce pedigree contient une photo"><i class="icon-camera"></i></a>';
} else {
$vi = '';
}
echo '
<tr>
<td width="50%">
<div class="tooltip-demo">
</i> <img src="assets/img/' . nl2br(stripslashes($ligne['sex'])) . '.png" title="Berger belge malinois' . nl2br(stripslashes($ligne['sex'])) . '"/>
<a href="' . $ligne['id_chien'] . '-pedigree-malinois-' . stripcslashes(strtolower($Chaine)) . '-' . $ligne['aff_url'] . '.html">
<strong>' . stripcslashes($ligne['nom']) . ' ' . stripcslashes($ligne['prefixe']) . ' ' . stripcslashes($ligne['affixe']) . '</strong>
</a>
' . $vi . '
<br />
' . $ligne['proprietaire'] . '
</div>
</td>
';
if (isset($_SESSION['SESS_MEMBER_ID'])) {
if (isset($_SESSION['SESS_GROUPE']) and $_SESSION['SESS_GROUPE'] == 'Admin' or $_SESSION['SESS_GROUPE'] == 'Redacteur') {
echo'<td width="50%" class="hidden-phone">
<br /><p class="pull-right">Malinois ' . $ligne['livre'] . ' ' . $ligne['lof'] . ' [<a href="#">Modifier</a>] | [<a href="#">Supprimer</a>]</p>
</td>
</tr>';
} elseif ($_SESSION['SESS_GROUPE'] == 'Membre') {
echo'<td width="50%" class="hidden-phone">
<br /><p class="pull-right">Malinois ' . $ligne['livre'] . ' ' . $ligne['lof'] . '</p>
</td>
</tr>';
}
} else {
echo'<td width="50%" class="hidden-phone">
<br /><p class="pull-right">Malinois ' . $ligne['livre'] . ' ' . $ligne['lof'] . '</p>
</td>
</tr>';
}
}
} else {
echo '</table><p class="center"><strong><font color="red">Aucun résultat</font></strong></><br /><br />';
}
} else {
header('location: 404.php');
// var_dump($_GET['malinois']);
}
?>
</table>
[/php]
et ce n'est plus du tout le même, ce sont vos test qui m'on montrer que je me trompais de moteur....