Location: PHPKode > projects > Basic Announce > UPLOAD/index3.php
<?
//$ip = $_SERVER['REMOTE_ADDR'];
//if ($ip!='ADD IP') // TO add more IPS add the following  && 'IP'
//{
//  die('SITENAME NEWS AREA IS OFFLINE DUE MAINTENANCE'); // else DIE..!
//}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <title>Site NAME NEWS AREA</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="title" content="SITENAME NEWS AREA" />
    <meta name="keywords" content="SITENAME NEWS AREA" />
    <meta name="language" content="en" />
    <meta name="robots" content="All" />
    <meta name="copyright" content="COMPANY NAME" />
    <meta name="MSSmartTagsPreventParsing" content="true" />
    <link id="theme" rel="stylesheet" type="text/css" href="style.css" title="theme" />
  </head>
  <body> 
    <div id="wrapper"> 
      <div id="bg"> 
        <div id="header"></div>  
        <div id="page"> 
          <div id="container"> 
            <!-- banner -->  
            <div id="banner"></div>  
            <!-- end banner -->  
            <!-- horizontal navigation -->  
            <div id="nav1"> 
              <?Include("Inc/nav.php")?> 
            </div>  
            <!-- end horizontal navigation -->  
            <!--  content -->  
            <div id="content"> 
              <div id="center"> 
                <div id="welcome"> 
                  <p style="clear:both" /> 
                	<p style="clear:both" /> 
                	<?

mysql_connect("SERVER ADDRESS","USER","PASSWORD");
@mysql_select_db("DATABASE NAME") or die( "Unable to select database");
$query='SELECT * FROM `announcements` LIMIT 41, 60 '; //LEAVE AS IS AND RUN THE SQL DUMP TO ADD DB TABLE
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();
?>
<!-- Don't Edit Below THIS LINE -->
<table border="1" cellpadding="2" bordercolordark="#000000" bordercolorlight="#000000">                 
<tr>
<th height="26"><span class="c1">Announcement</span></th>
<th height="26"><span class="c1">Submitted By</span></th>
<th height="26"><span class="c1">Date & Time</span></th>
</tr>
<?php
$i=0;
while ($i < $num) {

$f1=mysql_result($result,$i,"Announcement");
$f2=mysql_result($result,$i,"Submitted");
$f3=mysql_result($result,$i,"Date_time");
?>
<tr>
<td><span class="c1"><?php echo $f1; ?></span></td>
<td><span class="c1"><?php echo $f2; ?></span></td>
<td><span class="c1"><?php echo $f3; ?></span></td>
</tr>
<?php
$i++;
}
?></table><p style="clear:both" /> 
                	<p style="clear:both" /> 
                	<p style="clear:both" /> 
                	<p style="clear:both" /> 
                	<p style="clear:both" /> 
                	<p style="clear:both" /> 
                </div> 
              </div>  
              <div id="right"> 
                <div id="sidebar"> 
                  <div style="text-align:center;margin:20px 0"> 
                    &nbsp;</div> 
                </div> 
              </div>  
              <div class="clear" style="height:40px"></div> 
            </div>  
            <!-- end content --> 
          </div>  
          <!-- end container --> 
        </div>  
        <div id="footerWrapper"> 
          <div id="footer"> 
            <p style="padding-top:10px"> 
  
              <font face="Times New Roman">&copy;2010 <?Print "$_SERVER['HTTP_HOST']?></font></p> 
          </div> 
        </div> 
      </div> 
    </div> 
  </body>
</html>
Return current item: Basic Announce