ciao ragazzi allora ho questo pezzo di codice:

Codice PHP:

echo '[i]Bacheca[/i]

'
;

if(!
$userdata['session_logged_in'])
{
    echo 
"Accesso Alla Bacheca Impedito Agli Ospiti. Se Non Lo Sei Registrati O Fai Il Login Da <anchor>qui<go href=\"" append_sid("index.$phpEx") . "\" /></anchor>";
}
else
{


$i 0;

$topics = array();

$start = ((!isset($_GET['start'])) || (!is_numeric($_GET['start']))) ? "0" $_GET['start'];

$user_forum = (!isset($_GET['forum'])) ? "-1" $_GET['forum'];

if(
$user_forum != "-1")

{

    
$sql "select forum_name from " FORUMS_TABLE " where forum_id = \"$user_forum\"";

    
$query $db->sql_query($sql);

        if (
$forum_name $db->sql_fetchrowset($query))

        {

                
$auth auth(AUTH_VIEW$user_forum$userdata);

                if(
$auth['auth_view'])

                {

                        
$forum_header sprintf($lang['wap_viewing_posts'],"[b]" str_replace("&","&amp;",$forum_name[0][0]) . "[/b]\n
"
);

                        
$forum_where " where forum_id = \"$user_forum\"";

                }

                else

                {

                        echo 
$lang['wap_not_authorised_forum'];

                        exit(
" " $footer);

                }

         }

         else

         {    

             echo 
$lang['wap_forum_not_exist'];

                exit(
" " $footer);

         }

}

else 

{

    
$forum_header "";

        
$forum_where "";

}

$i 0;

$query $db->sql_query("select forum_id, topic_id from " POSTS_TABLE "$forum_where order by post_time desc limit 2000");

if(!
$latestposts $db->sql_fetchrowset($query))

{

    echo 
$lang['wap_no_posts'];

    echo 
$footer;

    exit(
"

$footer);

}

foreach(
$latestposts as $val)

{

    
$tid $val['topic_id'];

    if(
preg_match("/\b$tid\b/","$list"))

    {

        continue;

    }

    
$auth auth(AUTH_READ,$val['forum_id'],$userdata);

    if(
$auth['auth_read'] == "1")

    {

        
$sql "select topic_title, topic_moved_id, topic_replies from " TOPICS_TABLE " where topic_id = \"".$val['topic_id']."\"";

        
$query $db->sql_query($sql);

        
$topic_title $db->sql_fetchrow($query);

        if(empty(
$topic_title['topic_moved_id']))

        {

            
// if all is well, add the text to the topic



            
$topics[] = "<anchor>".wap_validate($topic_title['topic_title'],0,0)."<go href=\"" append_sid("waptopic.$phpEx?s=0&amp;topic=".$val['topic_id']."&amp;forum=".$val['forum_id']) . "\" /></anchor> (".$topic_title['topic_replies'].")
\n"
;

            
$list .= $val['topic_id']."|";

            
$i++;

        }

    }



}

$list explode("|",$list);

$list count($list);

if(
$list == 1)

{

    echo 
$lang['wap_no_posts'];

    exit(
"

$footer);


vorrei che prima del titolo comparisse un'icona a seconda dello stato secondo questo codice:

Codice PHP:
if ($topicinfo['topic_status'] == 1)

                   {

echo 
"<img src=\"http://sito/forum/wap/icone/folder_lock_new.gif\" alt=\"chiuso\"/>";

}else{ 

echo (
"*"); 
chi mi sa aiutare???auguriii