require_once 'admin/db.inc.php';
$connexion = dbConnect();
$type_actu = "0";
$idActualite = intval($_GET['id']);
$page = $_GET["page"];
if($idActualite!="" && $idActualite > 0){
$sqlDetailActualite = "SELECT `IdActualite` , `ActDateCreation` , `ActTitreEn` , `ActIntroductionEn` , `ActDescriptifEn` , `ActPhoto` , `ActVignette`, `ActDatePublication`";
$sqlDetailActualite .= " FROM `systeam_actualites`";
$sqlDetailActualite .= " WHERE `IdActualite` ='$idActualite'";
$sqlDetailActualite .= " AND `ActType` = ".$type_actu;
$sqlDetailActualite .= " AND `ActTitreEn` != ''";
$sqlDetailActualite.= " AND (AfficheAn=1)";
$sqlDetailActualite .= " ORDER BY `ActDatePublication` DESC";
$resultDetailActualite = dbQuery($sqlDetailActualite, $connexion);
if(dbResok($resultDetailActualite)){
//$rstDetail = dbFetchArray($resultDetailActualite, $connexion);
$rstDetail = $resultDetailActualite[0];
?>
Oct 6, 2024
<<
Retour
}
}else { //Si pas d'id actualite on affiche toutes les actualités
$sqlActualites = "SELECT IdActualite, ActTitreEn , ActIntroductionEn , ActVignette,ActDatePublication FROM systeam_actualites WHERE en_ligne=1 ";
$dateActuelle = time();
$sqlActualites.= " AND (ActDatePublication=0 OR ActDatePublication<=".$dateActuelle.")";
$sqlActualites.= " AND (ActDateDepublication=0 OR ActDateDepublication>=".$dateActuelle.")";
$sqlActualites .= " AND `ActTitreEn` != ''";
$sqlActualites .= " AND `ActType` = ".$type_actu ;
$sqlActualites.= " AND (AfficheAn=1)";
$sqlActualites.= " ORDER BY ActDatePublication DESC ";
$nav = new Navigation($connexion, $sqlActualites, $page, 15 ,15, "https://www.systeam.fr/en/news", "","");
$resultActualites = dbQuery($nav->RequeteSQL(), $connexion);
if(dbResOk($resultActualites)){
foreach($resultActualites as $rstActualite)
{
?>
Oct 6, 2024
}
}
if($nav) echo '
'.$nav->AffichageNavigation().'
';
}
?>