// functions
function connect()
{
include('index.inc.php');
@mysql_connect($host,$user,$pass) or die("Cannot connect to DB");
@mysql_select_db("$bdd") or die("Cannot select DB");
}
$section=$_GET['section'];
echo "\n";
echo "\n
\n";
echo "FRLinux.net Version 6.0pre08122004 - Le Site d'aide a l'utilisation de Linux\n";
echo "\n";
echo "\n";
echo "\n";
if ($section=="newsletter" || $section=="contact" || $section=="" || $section=="about" || $section=="imprimer" || $section=="news")
{
$mystyle="style_nomenu.css";
} else {
$mystyle="style.css";
}
echo "\n";
echo "\n";
echo "\n";
echo "\n";
if ($section<>"" && $section<>"newsletter" && $section<>"contact" && $section<>"about" && $section<>"imprimer" && $section<>"news" && $section<>"liens")
{
echo "\n";
}
echo "\n";
$article=$_GET['article'];
if ($article=="")
{
$article=$_POST['article'];
}
if ($article=="" && $section=="")
{
include('news.inc.php');
echo "
";
$rmt = $_SERVER["REMOTE_ADDR"];
if (preg_match("/:/", $rmt)) {
$ipver='IPv6';
}
if ($ipver=="IPv6")
{
echo "Felicitations ! Vous utilisez IPv6 : $rmt";
}
} else {
if ($article<>"")
{
connect();
$mycounter=$article;
$table="articles";
@$query = "SELECT content FROM $table WHERE counter LIKE $mycounter";
$result = mysql_query($query);
$nb = mysql_numrows($result);
while ($val = mysql_fetch_array($result))
{
$content = $val["content"];
echo"$content";
}
mysql_close();
} else {
if ($section=="newsletter" || $section=="contact" || $section=="about" || $section=="imprimer" || $section=="news")
{
include('section.inc.php');
}
}
}
echo "
\n";
echo "\n";
?>