CODE (htmlphp):
скопировать код в буфер обмена
скопировать код в буфер обмена
- <? include("includes/connect-mysql.php");
- $result = mysql_query("SELECT * FROM News ORDER BY id DESC",$db);
- $myrow = mysql_fetch_array($result);?>
- <!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">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
- <title>Новости</title>
- <link href="template/styles/style.css" rel="stylesheet" type="text/css" />
- <link href="template/styles/news.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <!-- Шапка -->
- <table width="1200px" height="325px" border="0" align="center" cellpadding="0" cellspacing="0" background="template/img/header.png">
- <tr>
- <td>
- </td>
- </tr>
- </table>
- <!-- Меню -->
- <? include("includes/menu.php"); ?>
- <!-- Контенты -->
- <table class="contents" cellpadding="0" cellspacing="0">
- <!-- Контент 1 -->
- <? include("includes/content1.php"); ?>
- <!-- Контент 2 -->
- <? include("includes/content2.php"); ?>
- <!-- Контент 3 -->
- <? include("includes/content3.php"); ?>
- <!-- Основной контент -->
- <table cellpadding="0" cellspacing="0" class="general-table">
- <!-- Топ -->
- <tr>
- <td class="table-top"></td>
- </tr>
- <!-- Центр -->
- <tr>
- <td class="table" align="center">
- <h5>
- <?
- do{
- "<table border='0' cellpadding='0' cellspacing='0' class='table-news'>
- <!-- Топ -->
- <tr>
- <td class='news-top' id='news'>
- <div class='news-title'>%s.%s</div>
- </td>
- </tr>
- <!-- Содержание -->
- <tr>
- <td class='news' id='news'>
- <h5>
- %s
- </h5>
- </td>
- </tr>
- <!-- Футер -->
- <tr>
- <td class='news-footer'>
- <div class='news-date'>Дата добавления: %s</div>
- </td>
- </tr>
- </table>",
- $myrow['news-id'],
- $myrow['news-name'],
- $myrow['news-text'],
- $myrow['news-date']
- );
- echo "<br><br><br>";
- }
- while($myrow = mysql_fetch_array($result));
- ?>
- </h5>
- </td>
- </tr>
- <!-- Футер -->
- <tr>
- <td class="table-footer" align="center">
- <? include("includes/copyright.php"); ?>
- </td>
- </tr>
- </table>
- </body>
- </html>