Просмотр файла index.php

Размер файла: 2.48Kb
<?
include('inc/config.php');
require_once  ('inc/connect.php');
include  ('inc/log.php');
?>
 <div class="pageContent"> 
    <div id="main"> <div class="container"><div class="left">
<?
echo '
<img src = "'.$info['logo'].'" alt = "logo"> </a>
<br>'.$info['hello'].'';
?>
<hr>
<form action="search.php" method="post" name="form">
<div class="rekl"><strong>поиск по блогу:</strong><br><input name="quest" type="text" size="18" maxlength="20">

<input name="submit"
type="submit"
value="поиск">
</form>
</div>


<?

$five =mysql_query("SELECT `id`,`title`,`date`  FROM `zametki` ORDER BY `date` DESC LIMIT 3 ",$db);
if(mysql_num_rows($five) >0){
$top = mysql_fetch_array($five);
}

if (!empty($top) ) {
echo '<hr><div class="post-title">Последниe заметки:</div></div>';
do
{
echo '<div class="ls"><img src ="style/icon/'.$info['icon'].'/about.png"><a href = "view_p.php?zametka='.$top ['id'] .'" > '.$top ['title'] .'</a> </div>';
}

while ($top = mysql_fetch_array($five));
echo '';
}
else {
echo 'заметок нет ,пока...';}




$five1 =mysql_query("SELECT `id`,`title`, `good` FROM `zametki` ORDER BY  `good` DESC LIMIT 3  ",$db);
if(mysql_num_rows($five1) >0){
$top1= mysql_fetch_array($five1);
}
else{echo '';}
if (!empty($top1) ) {
echo '<hr><div class="post-title">Лучшие заметки:</div>';
do
{
echo '<div class="ls"><img src ="style/icon/'.$info['icon'].'/star.png">
<a href = "view_p.php?zametka='.$top1 ['id'] .'" > '.$top1 ['title'] .'</a> </div>';
}

while ($top1 = mysql_fetch_array($five1));
echo '';
}
else {
echo 'заметок нет ,пока...';}



?>

<br><div class="post-title">Категории </div>
<?
if (!empty($prosm) ) {
do
{
 echo' <div class="menu"><img src ="style/icon/'.$info['icon'].'/arrow_right.png"><a href = "view_c.php?pid='.mysql_escape_string(trim(htmlspecialchars($prosm['id']))).'"> '.$prosm['name'].'</a>
 ';
 
 echo '('.mysql_result(mysql_query("SELECT COUNT(*) FROM `zametki`  WHERE `cat`=".$prosm ['id']." ",$db),0).')</div>';
 }
while($prosm = mysql_fetch_array($cat));
}
else {echo 'Категори нет. Пока...';}
?>

<hr>
<?
if (!empty($link) ) {
echo '<div class="post-title">Друзья</div>
 ';
do
{
 echo'
 


<div class = "rekl"><img src ="style/icon/'.$info['icon'].'/dollar.png"><a href ="click.php?site='.mysql_escape_string($link['site']).'">'.$link['name'].'</a> </div>

';
}

while($link = mysql_fetch_array($list));
}


else {echo 'Блок рекламы пуст :)';}
###########

foot();
?>

</div></div></div></div>