voici index php
<?php
/***********************************************
*
* copyright : (C) 2007, Ezzar Mehri Emna
* email : [email protected]
*
* PHPANNONCES IS NOT FREE SOFTWARE
*
**********************************************/
/* * * * * * * *
* You are licensed to install and use 1 (one) copy of this script on 1 (one)
* website for each license you purchase from www.annonces-express.net/download/.
*
* You may not redistribute copies or modified copies of any of the files included in
* the PHPannonces distributions under any circumstances.
*
* The Annonces-express group reserves the right to modify these terms at any time.
* * * * * * * */
define('IN_INDEX', true);
$script_path = './';
include($script_path . 'common.php');
$cat_id = -1;
$page_title = !empty($script_config['home_title']) ? $script_config['home_title'] : $script_config['site_name'];
include($script_path . 'includes/page_header.php');
$template->set_filenames(
array('body' => 'index_body.tpl')
);
$j = 0;
for ($i = 0; $i < count($cats_array); $i++)
{
if ( $j == 0 || $j > 2 )
{
$template->assign_block_vars('lignes', array());
$j = 0;
}
$template->assign_block_vars('lignes.colonnes', array(
'CAT_NAME' => $cats_array[$i]['cat_title'],
'CAT_POSTS' => $cats_array[$i]['cat_posts'],
'ROW_CLASS' => (($i % 2) == 0) ? 'row1' : 'row2',
'CAT_ID' => $cats_array[$i]['cat_id'])
);
$deletetime = time()-3600*24*30;mysql_query("DELETE FROM " . ANNONCES_TABLE . " WHERE annonce_date <$deletetime");
unset($image);
$show_again = true;
$count_sublist = 0;
for ($k = 0; $k < count($sub_cats_array); $k++)
{
if ( $show_again )
{
if ( $sub_cats_array[$k]['cat_id'] == $cats_array[$i]['cat_id'] )
{
if ( $count_sublist < 9 )
{
$url = rewrite_url(REWRITE_MENU, $cats_array[$i]['cat_id'], $sub_cats_array[$k]['menu_name_rewriting'], $sub_cats_array[$k]['menu_id']);
$template->assign_block_vars('lignes.colonnes.sub_categories', array(
'MENU_LIST' => '<span class="genmed">' . make_url($sub_cats_array[$k]['menu_name'], $url) . '</span>')
);
$count_sublist++;
}
else
{
$url = rewrite_url(REWRITE_CAT, $sub_cats_array[$k]['cat_id'], $cats_array[$i]['cat_title_rewriting']);
$template->assign_block_vars('lignes.colonnes.sub_categories', array(
'MENU_LIST' => '<span class="genmed"><b>' . make_url('Afficher toutes les catégories...', $url) . '</b></span>')
);
$show_again = false;
}
}
}
}
$j++;
}
if ( $userdata['user_logged_in'] )
{
$user_lastvisit = time()-$userdata['user_lastvisit'];
$lastvisit = 'Dernière connexion : il y a ';
if ($user_lastvisit < 60)
{
$lastvisit .= 'quelques secondes';
}
else if ($user_lastvisit < 3600)
{
$lastvisit .= '<b>' . intval($user_lastvisit/60) . '</b> minutes';
}
else if ($user_lastvisit < 86400)
{
$lastvisit .= '<b>' . intval($user_lastvisit/3600) . '</b> heures et <b>' . intval(($user_lastvisit % 3600) / 60) . '</b> minutes';
}
else if ($user_lastvisit > 86400)
{
$lastvisit .= '<b>' . intval($user_lastvisit/86400) . '</b> jours et <b>' . intval(($user_lastvisit % 86400) / 3600) . '</b> heures';
}
}
$template->assign_vars(array(
'LAST_LOGIN' => !empty($userdata['user_lastvisit']) ? $lastvisit : '',
'COLSPAN' => intval(count($sub_cats_array)/8)+1)
);
$template->pparse('body');
include($script_path . 'includes/page_tail.php');
?>

voici index php
[php]<?php
/***********************************************
*
* copyright : (C) 2007, Ezzar Mehri Emna
* email :
[email protected] *
* PHPANNONCES IS NOT FREE SOFTWARE
*
**********************************************/
/* * * * * * * *
* You are licensed to install and use 1 (one) copy of this script on 1 (one)
* website for each license you purchase from www.annonces-express.net/download/.
*
* You may not redistribute copies or modified copies of any of the files included in
* the PHPannonces distributions under any circumstances.
*
* The Annonces-express group reserves the right to modify these terms at any time.
* * * * * * * */
define('IN_INDEX', true);
$script_path = './';
include($script_path . 'common.php');
$cat_id = -1;
$page_title = !empty($script_config['home_title']) ? $script_config['home_title'] : $script_config['site_name'];
include($script_path . 'includes/page_header.php');
$template->set_filenames(
array('body' => 'index_body.tpl')
);
$j = 0;
for ($i = 0; $i < count($cats_array); $i++)
{
if ( $j == 0 || $j > 2 )
{
$template->assign_block_vars('lignes', array());
$j = 0;
}
$template->assign_block_vars('lignes.colonnes', array(
'CAT_NAME' => $cats_array[$i]['cat_title'],
'CAT_POSTS' => $cats_array[$i]['cat_posts'],
'ROW_CLASS' => (($i % 2) == 0) ? 'row1' : 'row2',
'CAT_ID' => $cats_array[$i]['cat_id'])
);
$deletetime = time()-3600*24*30;mysql_query("DELETE FROM " . ANNONCES_TABLE . " WHERE annonce_date <$deletetime");
unset($image);
$show_again = true;
$count_sublist = 0;
for ($k = 0; $k < count($sub_cats_array); $k++)
{
if ( $show_again )
{
if ( $sub_cats_array[$k]['cat_id'] == $cats_array[$i]['cat_id'] )
{
if ( $count_sublist < 9 )
{
$url = rewrite_url(REWRITE_MENU, $cats_array[$i]['cat_id'], $sub_cats_array[$k]['menu_name_rewriting'], $sub_cats_array[$k]['menu_id']);
$template->assign_block_vars('lignes.colonnes.sub_categories', array(
'MENU_LIST' => '<span class="genmed">' . make_url($sub_cats_array[$k]['menu_name'], $url) . '</span>')
);
$count_sublist++;
}
else
{
$url = rewrite_url(REWRITE_CAT, $sub_cats_array[$k]['cat_id'], $cats_array[$i]['cat_title_rewriting']);
$template->assign_block_vars('lignes.colonnes.sub_categories', array(
'MENU_LIST' => '<span class="genmed"><b>' . make_url('Afficher toutes les catégories...', $url) . '</b></span>')
);
$show_again = false;
}
}
}
}
$j++;
}
if ( $userdata['user_logged_in'] )
{
$user_lastvisit = time()-$userdata['user_lastvisit'];
$lastvisit = 'Dernière connexion : il y a ';
if ($user_lastvisit < 60)
{
$lastvisit .= 'quelques secondes';
}
else if ($user_lastvisit < 3600)
{
$lastvisit .= '<b>' . intval($user_lastvisit/60) . '</b> minutes';
}
else if ($user_lastvisit < 86400)
{
$lastvisit .= '<b>' . intval($user_lastvisit/3600) . '</b> heures et <b>' . intval(($user_lastvisit % 3600) / 60) . '</b> minutes';
}
else if ($user_lastvisit > 86400)
{
$lastvisit .= '<b>' . intval($user_lastvisit/86400) . '</b> jours et <b>' . intval(($user_lastvisit % 86400) / 3600) . '</b> heures';
}
}
$template->assign_vars(array(
'LAST_LOGIN' => !empty($userdata['user_lastvisit']) ? $lastvisit : '',
'COLSPAN' => intval(count($sub_cats_array)/8)+1)
);
$template->pparse('body');
include($script_path . 'includes/page_tail.php');
?>[/php] :cry: