// PNE_blog : id / type (B log - T estimonial)/ date_code / date_real / title / teaser / text / name / email / optin / city / since / product / approved
IF (!isset($_GET[art])) {
IF (isset($_GET[cat])) { $cat = $_GET[cat] ; } ELSE IF (isset($_POST[cat])) { $cat = $_POST[cat] ; }
IF (isset($_GET[tag])) { $tag = $_GET[tag] ; } ELSE IF (isset($_POST[tag])) { $tag = $_POST[tag] ; }
IF (isset($cat)) {
$query = "SELECT * FROM PNE_blog WHERE type LIKE 'B' AND approved LIKE '1' AND (product LIKE '".$cat."' OR teaser LIKE '%".$cat."%' OR text LIKE '%".$cat."%') ORDER BY date_code DESC, id DESC";
} ELSE IF (isset($tag)) {
$query = "SELECT * FROM PNE_blog WHERE type LIKE 'B' AND approved LIKE '1' AND (title LIKE '%".$tag."%' OR teaser LIKE '%".$tag."%' OR text LIKE '%".$tag."%') ORDER BY date_code DESC, id DESC";
} ELSE {
$query = "SELECT * FROM PNE_blog WHERE type LIKE 'B' AND approved LIKE '1' ORDER BY date_code DESC, id DESC";
}
$result = mysql_query($query);
if($result) {
// echo $query ;
$a = 1;
while($row = mysql_fetch_array($result)){
$a++;
print "
\n" ;
$img = rand(1,6);
print "
\n" ;
print "
\n" ;
print "
\n" ;
print "
\n" ;
print "
".$row[title]." \n" ;
print "
\n" ;
print "" .stripslashes(nl2br($row[teaser]))."... \n" ;
print "
\n" ;
print "
Lire Plus +
\n" ;
print "
\n" ;
}
}
} ELSE {
$query = "SELECT * FROM PNE_blog WHERE id like $_GET[art] AND type LIKE 'B' AND approved LIKE '1'";
$result = mysql_query($query);
if($result) {
$a = 1;
while($row = mysql_fetch_array($result)){
$a++;
print "
\n" ;
$img = rand(1,6);
print "
\n" ;
print "" .stripslashes(nl2br($row[teaser]))." \n" ;
print "
\n" ;
print "
\n" ;
print "".stripslashes($row[title])." \n" ;
print "
\n" ;
print "
\n" ;
print "
\n" ;
print "" .stripslashes(nl2br($row[text]))." \n" ;
print "
\n" ;
/*============= TAGS ==================*/
print "
\n" ;
print "
\n" ;
/*============= SHARE ==================*/
print "
\n" ;
print "
Partagez cet article
\n" ;
// print "
\n" ;
// print "
\n" ;
print "
" ;
print " " ;
print "
\n" ;
print "
/* **************************************************************************** BLOG FORM HIDDEN ****************************************************
******************************************************************************************************************************************************* */
?>
Le Blog - Écrivez un article!
IF (!isset($_POST[submit])) { ?>Tous les clients de Piscine Nouvelle Ère sont invités à soumettre leurs articles originaux pour diffusion sur notre blog. Qu'il s'agisse de conseils ou expériences personnelles, etc... Si votre article est retenu et publié, vous courez la chance de gagner un prix. Un gagnant chaque mois parmi les articles retenus.