Location: PHPKode > projects > LogithequePHP > logi/log.php
<?php

require('header.php');

$sql = "SELECT * FROM log WHERE id = ".mysql_real_escape_string($_GET['id'])."";
$res = mysql_query($sql);
$row = mysql_fetch_assoc($res);
$smarty->assign('id', $row['id']);
$smarty->assign('nom', $row['nom']);
$smarty->assign('desc', $row['description']);
$smarty->assign('version', $row['version']);
$smarty->assign('auteur', $row['auteur']);
$smarty->assign('screen', $row['screen']);
$smarty->assign('site', $row['site']);
$smarty->assign('langue', $row['lang']);
$smarty->assign('down', $row['down']);
$smarty->assign('license', $row['license']);
$smarty->assign('os', $row['os']);
$smarty->assign('prix', $row['prix']);

$sql2 = "SELECT * FROM down WHERE id = ".mysql_real_escape_string($_GET['id'])."";
$res2 = mysql_query($sql2);
$row2 = mysql_fetch_assoc($res2);
$smarty->assign('id', $row2['id']);
$smarty->assign('downcount', $row2['down']);

$sql=mysql_query("select comments.com_id,comments.com_name,comments.com_dis,comments.post_id_fk,membre.avatar,membre.pseudo from comments,membre where comments.post_id_fk=".mysql_real_escape_string($_GET['id'])." AND comments.com_name = membre.pseudo ORDER BY com_id DESC LIMIT 5");
while($row=mysql_fetch_array($sql))
{

$comment[] = $row;
}
if($row)
{
$smarty->assign('comment', $comment);
}
$smarty->display($template.'/log.tpl');
require('footer.php');
?>
Return current item: LogithequePHP