if (isset($_GET['admin']))
{
$admin =$_GET['admin'];
}
else{ $admin ="";
}
if($admin == "")
{
include"libcms2.php3";
include"confcms2.php";
$db = mysql_connect("$dbchemin","$dbuser","$dbpass") or mysql_die("Connexion impossible");
$err = mysql_error();
if ($err) {
echo "Uh oh! There's an error! news Here it is: ";
echo "$err";
}
mysql_select_db("$dbname");
$err = mysql_error();
if ($err) {
echo "Uh oh! There's an error! basenews Here it is: ";
echo "$err";
}
$authors = mysql_query("SELECT ID, Name FROM authors");
$cats = mysql_query("SELECT id, Name FROM categories");
$ans = mysql_query("SELECT ID, Name FROM an");
$moi = mysql_query("SELECT ID, Name FROM mois");
$mot = mysql_query("SELECT ID, Name FROM motcle3");
$requete="select max(ID) from artbrnew";
$result1 = mysql_query($requete);
if ($result1){
//echo "$result1";
$idmax=mysql_result($result1,0,"max(ID)");
//echo " Maxi $idmax";
$idnew="$idmax" -20;
}
echo("Les 20 derniers articles ");
$requete2="select * from artbrnew where ID >'$idnew' ";
$jokes = mysql_query($requete2);
//$jokes = mysql_query(select * from artbrnew where ID > "$idnew");
while ($joke = mysql_fetch_array($jokes)) {
$titre = $joke["titre"];
$id = $joke["ID"];
echo ("$titre Article entier Zoom ");
//echo("$titre ");
}echo(" ");}
?> |