 |
 |
|
|
|
SERVER
ANNOUNCEMENT |
|
$x=1;
// truncate the text to only 150 chars, add ... to the end
function truncate($text) {
$text = substr($text,0,350);
$text = substr($text,0,strrpos($text,' '));
$text = $text."...";
return $text;
}
// format the date to mm/dd/yyyy
function formatdate($date) {
$year = substr ($date, 0, 4);
$month = substr ($date, 5, 2);
$day = substr ($date, 8, 2);
return $month.'/'.$day.'/'.$year;
}
// limit the number of announcements to return
$limit = 2;
require '/home2/mlahost/public_html/online/configuration.php';
$link = mysql_connect($db_host,$db_username,$db_password);
mysql_select_db($db_name);
$result = mysql_query("SELECT * FROM tblannouncements WHERE published='on' ORDER BY id DESC LIMIT ".$limit);
while($data = mysql_fetch_array ($result))
{
$id = $data['id'];
$date = $data['date'];
$title = $data['title'];
$announcement = truncate($data['announcement']);
$date = formatdate($date);
echo' '.$date.' - '.$title.''.$announcement.' more info ';
echo' ';
$x=false;
}
if(!$x) echo 'News & announcements: view more ';
if($x) echo 'There are no new announcements. ';
?> |
|

|
|
|
FREQUENTLY ASK
QUESTIONS:
How do i pay?
We
accept payment thru Bank Deposit on
Metrobank , BPI Family Savings Bank,
Banco De Oro, Smart Money,
G-Cash or thru Paypal. Please
contact our
billing department for the account
details.
For Clients
outside the Philippines, you may deposit
your payment thru any of BPI Correspondent
Banks. Complete List
Here.
|
|
|
|
 |
|