Topic: Simple website integration

I've been using punBB 1.2 for a while and I decided to upgrade to the new, nut I have a few questions...

First, I have been using the following code to pull certain topics and display them as "new" on the main page of my site

<table border="0" style="border-collapse: collapse" bordercolor="#FF4106" width="100%">
  <tr>
    <td width="100%">
    <table border="1" style="border-collapse: collapse" bordercolor="#393939" width="100%">
      <tr>
        <td background="images/cellpic2.gif" width="45%" bgcolor="#101010" align="center"><b>
        <font face="Tahoma" size="2" color="#FFFFFF">Lastest Topics</font></b></td>
        <td background="images/cellpic2.gif" width="20%" bgcolor="#101010" align="center"><b>
        <font face="Tahoma" size="2" color="#FFFFFF">Author</font></b></td>
        <td background="images/cellpic2.gif" width="8%" bgcolor="#101010" align="center"><b>
        <font face="Tahoma" size="2" color="#FFFFFF">Replies</font></b></td>
        <td background="images/cellpic2.gif" width="8%" bgcolor="#101010" align="center"><b>
        <font face="Tahoma" size="2" color="#FFFFFF">Views</font></b></td>
      </tr>

<?
  $MySQL['Server'] = "localhost"; 
  $MySQL['User'] = "root";
  $MySQL['Pass'] ="ub2742a6b";
  $MySQL['Database'] = "stkclan_forums";

  MySQL_Connect($MySQL['Server'], $MySQL['User'], $MySQL['Pass']) OR Die("Failed to establish the connection.");
  MySQL_Select_db($MySQL['Database']);
    
  $result = mysql_query("SELECT subject, id, poster, num_views, num_replies FROM stk_forumstopics WHERE forum_id = '8' OR forum_id = '9' OR forum_id = '10' OR forum_id = '11' OR forum_id = '13' OR forum_id = '14' OR forum_id = '15' OR forum_id = '16' OR forum_id = '17' OR forum_id = '18' OR forum_id = '20' ORDER BY last_post DESC LIMIT 5");
  if (!$result)
  {
  $message = "Invalid query: " . mysql_error() . "\n";
  die($message);
  }
  while ($row = mysql_fetch_assoc($result))
  {
  echo '
      <tr>
        <td width="45%" align="left">
        <p style="margin-left: 5; margin-top: 2; margin-bottom: 2"><font face="tahoma" style="font-size: 10pt"><b>
        <a style="text-decoration: none" href="forums/viewtopic.php?id=' . $row['id'] . '">'. $row['subject'] . '</a></b></font></td>
        <td width="20%" align="center"><font face="arial" style="font-size: 10pt">'. $row['poster'] . '</font></td>
        <td width="8%" align="center"><font face="arial" style="font-size: 10pt">'. $row['num_replies'] . '</font></td>
        <td width="8%" align="center"><font face="arial" style="font-size: 10pt">'. $row['num_views'] . '</font></td>
      </tr>
';
  }  
  mysql_free_result($result);
?>
    </table>
    </td>
  </tr>
</table>

I'm guessing with some simple modifications the same might still be possible?

Secondly, Does using TPL template files still work to skin my forums to look like my website? I have the following code in various areas of my forums page:

<?php
    define('PUN_ROOT', './forums/');
    define('PUN_QUIET_VISIT', 1);
    require PUN_ROOT.'include/common.php';
?>    

<pun_head>
<div id="punwrap">
<div id="pun<pun_page>" class="pun">

<div id="brdheader" class="block">
    <div class="box">
        <div id="brdtitle" class="inbox">
        </div>
        <pun_navlinks>
        <pun_status>
    </div>
</div>

<pun_announcement>

<pun_main>

<pun_footer>

</div>
</div>

Thanks for any helpful insight smile

Regards
Juston