<?php
    session_start();    
    if(empty($_SESSION['p0B_c0ff33'])) header('location:login.php?goto=index');

	if(empty ($_GET['p'])){
		$_GET['p']="index";
	}

	include('templates/header.php'); 

?>
<body> 
<!-- Start: page-top-outer -->
<?php 
	
	include('templates/menu.php'); 
	include "../db_function.php";  

	if(empty ($_GET['page'])){
		$_GET['page']=1;
	}
	
	$table="tbltext";
			
?>
			
			
	

<!-- start content-outer ........................................................................................................................START -->
<div id="content-outer">
<!-- start content -->
<div id="content">

	<!--  start page-heading -->
	<div id="page-heading">
		<h1>Announcement</h1>
 	<!--  end top-search -->
 	<div class="clear"></div>
	</div>
	<table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
	<tr>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
		<th class="topleft"></th>
		<td id="tbl-border-top">&nbsp;</td>
		<th class="topright"></th>
		<th rowspan="3" class="sized"><img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
	</tr>
	<tr>
		<td id="tbl-border-left"></td>
		<td>
		<!--  start content-table-inner ...................................................................... START -->
		<div id="content-table-inner">
		<?php
	if(isset($masg) && $masg==0 ){
	echo'
	<div id="message-green">
		<table border="0" width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td class="green-left">Your update suces.   </td>
			<td class="green-right"><a class="close-green"><img src="images/table/icon_close_green.gif" alt="" /></a></td>
		</tr>
		</table>
	</div>';
	}
	else if(isset($masg) && $masg==1){
	echo'
	<div id="message-red">
		<table border="0" width="100%" cellpadding="0" cellspacing="0">
			<tr>
					<td class="red-left">Your update is Fail. Please try again!</td>
				<td class="red-right"><a class="close-red"><img src="images/table/icon_close_red.gif"   alt="" /></a></td>
			</tr>
		</table>
	</div>';
	}
	else if(isset($masg) && $masg==2){
	echo'
	<div id="message-yellow">
		<table border="0" width="100%" cellpadding="0" cellspacing="0">
			<tr>
					<td class="yellow-left">'.$change.'</td>
				<td class="yellow-right"><a class="close-yellow"><img src="images/table/icon_close_red.gif"   alt="" /></a></td>
			</tr>
		</table>
	</div>';
	}
	else if(isset($masg) && $masg==3 ){
	echo'
	<div id="message-green">
		<table border="0" width="100%" cellpadding="0" cellspacing="0">
		<tr>
			<td class="green-left">Your delete suces.   </td>
			<td class="green-right"><a class="close-green"><img src="images/table/icon_close_green.gif" alt="" /></a></td>
		</tr>
		</table>
	</div>';
	}
	?>

	<div id="table-content">
			
			
	<?php 
	
	$str="SELECT * FROM $table WHERE page='announcement'";
	$sql=mysql_query($str);
	while($row=mysql_fetch_array($sql)){
	echo'
	<div style="float:left;width:845px;position:relative; margin-right:70px;" class="about">
		<div style="position:absolute;padding:5px;background:#000000;top:-5px;right:-80px;width:20px;">
			<a style="color:#ffffff;" href="edit.php?table='.$table.'&row=detail&fildID=id&id='.$row['id'].'" rel="facebox">Edit</a>
		</div>
		'.$row['detail'].'
	</div>
	<div style="clear:both;"></div>
	<br /><br />
	';
 } ?>
		
			</div>
		
			<div class="clear"></div>
		 
		</div>
		<!--  end content-table-inner ............................................END  -->
		</td>
		<td id="tbl-border-right"></td>
	</tr>
	<tr>
		<th class="sized bottomleft"></th>
		<td id="tbl-border-bottom">&nbsp;</td>
		<th class="sized bottomright"></th>
	</tr>
	</table>
	<div class="clear">&nbsp;</div>

</div>
<!--  end content -->
<div class="clear">&nbsp;</div>
</div>
<!--  end content-outer........................................................END -->

<div class="clear">&nbsp;</div>
    
 <?php include('templates/footer.php'); ?>

 