"'",          "(ç)"=>"ç",
   "(à)"=>"à",   "(â)"=>"â",   "(ä)"=>"ä",
   "(è)"=>"è",   "(é)"=>"é",  "(ê)"=>"ê",  "(ë)"=>"ë",
   "(î)"=>"î",    "(ï)"=>"ï",
   "(ô)"=>"ô",    "(ö)"=>"ö",
   "(ù)"=>"ù",   "(ü)"=>"ü",    "(û)"=>"û",
   "(«)"=>"«",    "(»)"=>"»",
   "(©)"=>"©",     "(§)"=>"¶",
);   
   
// Use this function only if the format differs
function convert($content)
{
    $len = count($cvt);
    while($htmlchar = current($cvt))
    {
      $letter = key($cvt);
      preg_replace($letter, $htmlchar, $content);
      next($cvt);
    }
    return $content;
}  
// Use  to convert to UTF-8
function makeUTF($desc)
{  
  $desc = UTF8_encode($desc);
  $desc = stripslashes($desc);
  return($desc);
}  
function display($host, $name, $user, $password, $size)
{
    global $site;
    global $forum;
    global $topiclist;
    global $db_prefix;     // From config.php
    $db = @mysql_connect($host, $user, $password);
    mysql_select_db($name);
 
    $top = $db_prefix."topics";
  
    $sql = "SELECT id, subject, posted, poster FROM $top 
            ORDER BY posted DESC LIMIT $size";
     
    $results = mysql_query($sql) or die(mysql_error());
     
    // Extracting and displaying titles
      
    while($line = mysql_fetch_assoc($results)) 
    {
       $title = $line['subject'];
       //$title = $line['post_subject'];
       $url = $forum . "viewtopic.php?id=" . $line['id'];
       
       if($formatflag) $title = convert($title);
       $username = $line['poster'];
       $date = strftime("%A %B %e, %Y %H:%M", $line['posted']+(0));
     
       echo "$title by $username  $date
\n";
    }
    
    mysql_close($db);
     
}
$forum = "./" . $forumdir;
if(substr($forum,-1, 1) != "/") $forum = $forum. "/";
include($forum."config.php");
if (!PUN) die("punBB not installed in $forumdir");
display($db_host, $db_name , $db_username, $db_password , 10);     
?>