  <table border=1 cellspacing=1 cellpadding=2 width=928 style="border: 1px inset;">
  <form action="index.php?module=project&task=select" method="post" name="filterform" id="filterform">
  <input name="pageno" id="pageno" type="hidden" value="1">
  </form>
  </table>

  <br>
  <table border=1 cellspacing=1 cellpadding=2 width=928 style="border: 1px inset;">

  <tr valign=top>
  <td valign=top width=48 class=listheader>No.</td>
  <td valign=top width=150 class=listheader>Project ID</td>
  <td valign=top width=150 class=listheader>Project Name</td>
  <td valign=top width=350 class=listheader>Project Description</td>
  <td valign=top width=120 class=listheader>Client</td>
  <td valign=top width=100 class=listheader>Options</td>
  </tr>

  <?
  $firstrec = (($pubpageno-1)*10)+1;
  $lastrec = $firstrec + 9;
  $pagecount = 1;
  ?>

  <? foreach ($project_list as $myproject) { ?>

    <? if (($myproject['recordno']>=$firstrec)&&($myproject['recordno']<=$lastrec)) { ?>

      <? $accessok=false; ?>

      <? foreach ($access_list as $myaccess) { ?>

        <? if ($myproject['projectpkey']==$myaccess['projectpkey']) { ?>
          <? $accessok=true; ?>
        <? } ?>

      <? } ?>

      <? if (($accessok==true)||($pubuserrole>=2)) { ?>

        <tr valign=top>
        <td valign=top width=48 class=listnumber <? if ($myproject['projectid']==$pubprojectid) echo "style='background: #c0ffff;'"; ?>><?=$myproject['recordno'];?></td>
        <td valign=top width=150 class=listcontent <? if ($myproject['projectid']==$pubprojectid) echo "style='background: #c0ffff;'"; ?>><?=$myproject['projectid'];?></td>
        <td valign=top width=150 class=listcontent <? if ($myproject['projectid']==$pubprojectid) echo "style='background: #c0ffff;'"; ?>><?=$myproject['projectname'];?>&nbsp;</td>
        <td valign=top width=350 class=listcontent <? if ($myproject['projectid']==$pubprojectid) echo "style='background: #c0ffff;'"; ?>><?=$myproject['projectdescription'];?>&nbsp;</td>
        <td valign=top width=120 class=listcontent <? if ($myproject['projectid']==$pubprojectid) echo "style='background: #c0ffff;'"; ?>><?=$myproject['projectclientname'];?>&nbsp;</td>
        <td valign=top width=100 class=listcontent <? if ($myproject['projectid']==$pubprojectid) echo "style='background: #c0ffff;'"; ?>>
        <button name="open" id="open" onClick="project_button_open('<?=$myproject['projectpkey'];?>');" style="width: 90px;"><img src='gfx/options/b_open.png' class='actionbutton'>&nbsp;&nbsp;Open</button><br>
        <? if (($pubuseraccess['access_project_delete']==1)||($pubuserrole>=2)) { ?>
          <button name="delete" id="delete" onClick="project_button_delete('<?=$myproject['projectpkey'];?>');" style="width: 90px;"><img src='gfx/options/b_drop.png' class='actionbutton'>&nbsp;&nbsp;Delete</button>
        <? } ?>
        </td>
        </tr>

      <? } ?>

    <? } ?>

  <? } ?>

  <?
  $pagecount = intval($myproject['recordno']/10) + 1;
  ?>

  </table>

  <br>
  <?
  echo "<b>Page : </b>";
  for ($i=1;$i<=$pagecount;$i++) {
    if ($i==$pubpageno) {
      echo "[<u>".$i."</u>]&nbsp;";	//-&nbsp;";
    } else {
      echo "<span style='cursor: hand;' onClick='switchPage(".$i.");'><b>".$i."</b></span>&nbsp;";	//-&nbsp;";
    }
    if (($i % 25)==0) echo "<br>";
  }
  ?>

  <script type="text/javascript">

  function switchPage(pageno) {
    document.filterform.pageno.value=pageno;
    document.filterform.submit();
  }

  </script>
