/home/mip/public_html_/old-website/announcements_all.php
<? 
require_once("func_proc.php");
do_header("Announcements");
do_menu();
if($aname) $sql_aname = "and title like '%$aname%'";

// nextback
$sites = getdata("select count(*) from web_announcements where 1 $sql_aname and ('$sqltoday' >=  posting_date AND '$sqltoday' < expiry_date) and status = 'Published'");
$total=$sites[1][0];
$range=5;
$next_back=next_back($total,$range,$page,"$PHP_SELF?aname=$aname");
$start=$next_back[0];
// nextback

$ann = getdata("select * from web_announcements where 1 $sql_aname and ('$sqltoday' >=  posting_date AND '$sqltoday' < expiry_date) and status = 'Published' order by posting_date desc limit $start,$range");
$num_ann = count($ann);
?>
<style type="text/css">
<!--
.style3 {	font-size: 11px;
	font-family: Arial, Helvetica, sans-serif;
	color: #FFFFFF;
}
.style8 {	font-family: "Myriad Pro";
	font-size: 12px;
	color: #CCCCCC;
}
-->
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <th scope="col"><div align="left" style="padding:20px;"><img src="images/announce.gif" width="199" height="22" /></div></th>
  </tr>
  <tr>
    <th align="center" scope="col"><img src="images/separator1.jpg" width="492" height="23" /></th>
  </tr>
  <tr>
    <td align="center" scope="col">
		<table width="550" height="44" border="0">
		<form action="<?=$PHP_SELF?>#search" method="post">
		<tr>
		<td style="padding-top:0px; padding-bottom:14px; padding-right:0px;" align="right" colspan="2">
		<div style="padding-top:3px; padding-bottom:3px;"><b><font color="#FFFFFF">Search:</font></b>&nbsp;<input type="text" name="aname" value="<?=$aname?>" />&nbsp;<input type="submit" name="search" value="Search" /></div>
		</td>
		</tr>
		</form>
		<tr><td valign="top" class="morejobs_item">
			<?
			if($num_ann) {
			for($j=1;$j<=$num_ann;$j++){ ?>
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
			<tr><td style="padding-bottom:15px;" class="style3">
			<div style="font-size:14px;">
			<img src="images/b_let.jpg" / border="0">
			<a href="announcements.php?id=<?=$ann[$j][id]?>" title="<?=$ann[$j][title]?>" class="data"><?=$ann[$j][title]?></a></div>
			<div style="padding-left:18px;"><?=substr(strip_tags($ann[$j][announcement]),0,250)?>...</div>
			<div style="padding-left:18px;"><font size=1><?=dateformat($ann[$j][posting_date])?></font></div>
			</td></tr>
			</table>
			<? } } else { ?>	
			<div align="center" style="color:#FF0000; padding:10px;"><b>No Record Found</b></div>			
			<? } ?>
		</td></tr>
		<? if($num_ann) { ?>
		<tr>
			<td align="right" style="padding-top:0px; padding-bottom:5px;" class="style3"><a href="archive.php" class="data" title="Annoucements Archive">Annoucements Archive</a></td>
		</tr>
		<tr>
			<td align="center" style="padding-top:10px; padding-bottom:15px;" class="style3"><?=$next_back[1]?></td>
		</tr>
		<? } ?>
		</table>              
	</td>
</tr>
</table>
<? do_footer(); ?>