Eléphant du PHP |
51 Messages
30 oct. 2008, 16:23
En prime, tout le code de toute la page:
<?php require_once('Connections/blogs.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$maxRows_rsTopFlop = 5;
$pageNum_rsTopFlop = 0;
if (isset($_GET['pageNum_rsTopFlop'])) {
$pageNum_rsTopFlop = $_GET['pageNum_rsTopFlop'];
}
$startRow_rsTopFlop = $pageNum_rsTopFlop * $maxRows_rsTopFlop;
mysql_select_db($database_blogs, $blogs);
$query_rsTopFlop = "SELECT _ID, titre, votes FROM blogs ORDER BY votes DESC";
$query_limit_rsTopFlop = sprintf("%s LIMIT %d, %d", $query_rsTopFlop, $startRow_rsTopFlop, $maxRows_rsTopFlop);
$rsTopFlop = mysql_query($query_limit_rsTopFlop, $blogs) or die(mysql_error());
$row_rsTopFlop = mysql_fetch_assoc($rsTopFlop);
if (isset($_GET['totalRows_rsTopFlop'])) {
$totalRows_rsTopFlop = $_GET['totalRows_rsTopFlop'];
} else {
$all_rsTopFlop = mysql_query($query_rsTopFlop);
$totalRows_rsTopFlop = mysql_num_rows($all_rsTopFlop);
}
$totalPages_rsTopFlop = ceil($totalRows_rsTopFlop/$maxRows_rsTopFlop)-1;
mysql_select_db($database_blogs, $blogs);
$query_rsParts = "SELECT ID, site, titre FROM partenaires ORDER BY titre ASC";
$rsParts = mysql_query($query_rsParts, $blogs) or die(mysql_error());
$row_rsParts = mysql_fetch_assoc($rsParts);
$totalRows_rsParts = mysql_num_rows($rsParts);
mysql_select_db($database_blogs, $blogs);
$query_rsListe = "SELECT * FROM blogs, utilisateurs WHERE blogs.utilisateurID = utilisateurs.ID AND blogs.utilisateurID = '2' ORDER BY utilisateurs.pseudo DESC";
$rsListe = mysql_query($query_rsListe, $blogs) or die(mysql_error());
$row_rsListe = mysql_fetch_assoc($rsListe);
$totalRows_rsListe = mysql_num_rows($rsListe);
mysql_select_db($database_blogs, $blogs);
$query_rsListe2 = "SELECT * FROM blogs";
$rsListe2 = mysql_query($query_rsListe2, $blogs) or die(mysql_error());
$row_rsListe2 = mysql_fetch_assoc($rsListe2);
$totalRows_rsListe2 = mysql_num_rows($rsListe2);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"><!-- InstanceBegin template="/Templates/liste.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta name="Description" content="Information architecture, Web Design, Web Standards." />
<meta name="Keywords" content="your, keywords" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="Distribution" content="Global" />
<meta name="Author" content="Erwin Aligam - [email protected]" />
<meta name="Robots" content="index,follow" />
<link rel="stylesheet" href="css/MarketPlace.css" type="text/css" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>CiaoBlog - Liste des blogs</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body>
<!-- wrap starts here -->
<div id="wrap">
<!--header -->
<div id="header">
<div id="header-links">
<p>
<a href="index.php">Accueil</a> |
<a href="index.php">Contact</a></p>
</div>
<!--header ends-->
</div>
<div id="header-photo">
<h1 id="logo-text"><a href="index.php" title="">ciaoblog</a></h1>
</div>
<!-- navigation starts-->
<div id="nav">
<ul>
<li><a href="index.php">accueil</a></li>
<li id="current"><a href="liste.php">Coin Blog</a></li>
<li><a href="membres/login.php">Zone Membre</a></li>
</ul>
<!-- navigation ends-->
</div>
<!-- content-wrap starts -->
<div id="content-wrap" class="three-col" >
<div id="sidebar">
<h1>Recherche un blog</h1>
<form action="recherche.php" class="searchform" id="recherche">
<p>
<input name="search_query" class="textbox" type="text" />
<input name="search" class="button" value="Cherche" type="submit" />
</p>
</form>
<h1>Créer ton blog</h1>
<p><a href="membres/register.php">Clique ici pour créer ton blog</a></p>
<h1>Les 5 meilleurs blogs</h1>
<ul class="sidemenu">
<?php do { ?>
<li><a href="blog.php?ID=<?php echo $row_rsTopFlop['_ID']; ?>" title="<?php echo $row_rsTopFlop['votes']; ?> votes"><?php echo $row_rsTopFlop['titre']; ?></a></li>
<?php } while ($row_rsTopFlop = mysql_fetch_assoc($rsTopFlop)); ?></ul>
<h1>Partenaires</h1>
<ul class="sidemenu">
<?php do { ?>
<li><a href="<?php echo $row_rsParts['site']; ?>" title="<?php echo $row_rsParts['description']; ?>"><?php echo $row_rsParts['titre']; ?></a></li>
<?php } while ($row_rsParts = mysql_fetch_assoc($rsParts)); ?></ul>
<!-- sidebar ends -->
</div>
<div id="rightcolumn">
<h1>C'est quoi un blog?</h1>
<p align="left">Un blog est un site web constitué par la réunion d' articles agglomérés au fil du temps, et classés par ordre antéchronologique . Chaque article est, à l'image d'un journal de bord ou d'un journal intime, un ajout au blog ; le <em>blogueur</em> (celui qui tient le blog) y délivre un contenu souvent textuel, enrichi de liens et d'éléments multimédias.<br />
</p>
<p align="right"><em>source: Wikipédia</em></p>
<h1>Pourquoi un blog?</h1>
<p>Un blog permet de partager, discuter ou débattre avec ceux qui vous importent.</p>
<p>Un blog est une solution simple et efficace pour vous assurer une visibilité professionnelle sur internet à moindre coût.</p>
<p>Un blog est un tremplin pour une meilleure visibilité sur le net.</p>
</div>
<!-- InstanceBeginEditable name="contenu" -->
<div id="main">
<?php do { ?>
<h1><?php echo $row_rsListe['titre']; ?></h1>
<p class="post-by">créé par <?php echo $row_rsListe['pseudo']; ?> le <?php echo $row_rsListe['date_creation']; ?></p>
<p><?php echo nl2br($row_rsListe['description']); ?></p>
<p class="post-footer"> <a href="blog.php?ID=<?php echo $row_rsListe['_ID']; ?>" class="readmore">Voir ce blog</a> | La langue de ce blog est <?php echo $row_rsListe['langue']; ?></p>
<?php } while ($row_rsListe2 = mysql_fetch_assoc($rsListe2)); ?></div>
<!-- InstanceEndEditable -->
<!-- content-wrap ends-->
</div>
<!-- footer starts -->
<div id="footer-wrap"><div id="footer">
<p>
© 2008 <strong><a href="http://www.ciaonetwork.com">CiaoNetwork</a></strong> |
Design par: <a href="http://www.styleshout.com/">styleshout</a> |
Valid <a href="http://validator.w3.org/check?uri=referer">XHTML</a> |
<a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a>
<a href="index.php">Accueil</a> |
<a href="index.php">Plan du site</a></p>
</div></div>
<!-- footer ends-->
<!-- wrap ends here -->
</div>
</body>
<!-- InstanceEnd --></html>
<?php
mysql_free_result($rsTopFlop);
mysql_free_result($rsParts);
mysql_free_result($rsListe);
mysql_free_result($rsListe2);
?>