Здравейте имам проблем със една система за новини.Тоест искам да направя във сайта си да има и система за топ новина,обаче като я инклудна ми се преебава другата система за новини всичко менюта се разместват и става малзало.Ето я системата за топ новина http://cska-bg.info/CSKA/topnew.php искам да я инклудна тук: http://cska-bg.info/CSKA П од менюто над боксовете. Който може да ми помогне да пише на скайп cesekara_1996
Ето ви кода от index.php
и topnew.php
Ето ви кода от index.php
Код:
<!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>
<title>ПФК ЦСКА София:Фен сайт</title>
<meta http-equiv="content-type" content="text/html; charset=windows-1251" />
<meta name="description" content="ПФК ЦСКА София 1948 фен сайт" />
<meta name="keywords" content="ПФК ЦСКА СОФИЯ PFK CSKA SOFIA" />
<meta http-equiv="content-language" content="bg-BG" />
<link rel="StyleSheet" href="css.css" type="text/css"/>
<link rel='shortcut icon' href='images/favicon.ico' type='image/xicon' />
</head>
<body>
<style>
A.applink:hover {border: 2px dotted #DCE6F4;padding:2px;background-color:#ffff00;color:green;text-decoration:none}
A.applink {border: 2px dotted #DCE6F4;padding:2px;color:#2F5BFF;background:transparent;text-decoration:none}
A.info {color:#2F5BFF;background:transparent;text-decoration:none}
A.info:hover {color:green;background:transparent;text-decoration:underline}
</style>
<br>
<div id="wrapper">
<div id="header">
</div>
<div id="menu">
<ul>
<? include "menu.php"; ?>
</ul>
</div>
<div id="body">
<center><table width="969" border="0">
<tr>
<td><center><div id="left">
<? include "leftmenu.php"; ?><br>
</div>
<div id="center">
<? include "newscenter.php"; ?><br><br><? include "topvideo.php"; ?><br><? include "468x60.php"; ?>
</div>
</div>
<div id="right">
<? include "rightmenu.php"; ?>
</div>
<div style="clear: both;"><? include "728x90.php"; ?><center></td>
</tr>
</table><center>
</body>
</div>
</div>
</div>
<div id="footer">
<div class="footer">
<? include "footer.php"; ?>
</div>
</div>
</div>
</body>
</html>
и topnew.php
Код:
<?php
session_start();
include("topnew-conn.php");
echo '';
function utf8_substr($str,$from,$len)
{
return preg_replace('#^(?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$from.'}'.
'((?:[\x00-\x7F]|[\xC0-\xFF][\x80-\xBF]+){0,'.$len.'}).*#i',
'$1',$str);
}
$broinastranica = 1;
$pageNum = 1;
if(isset($_GET['page'])) {
$pageNum = (int)$_GET['page'];
}
$redove = ($pageNum - 1) * $broinastranica;
$query = mysql_query(" SELECT * FROM `novini` ORDER BY id DESC" . " LIMIT $redove, $broinastranica");
while ($row = mysql_fetch_array($query)) {
$newstext = $row['newstext'];
$newsauthor = $row['newsauthor'];
$newsname = $row['newsname'];
$id = $row['id'];
if($_SESSION['admin']) {
$edit = "<a href='admintopnew.php?act=editnews&id=$id'>Промени новината</a><br><a href='admintopnew.php?act=dellnews&id=$id'>Изтрий новината</a>";
}
echo "
<table border='0' width='963' id='table1' cellspacing='0' cellpadding='0'>
<tr>
<td id='title' align='center'>
<table border='0' width='93%' id='table2' cellspacing='6' cellpadding='0'>
<tr>
<center><font size=5 color=red><td>$newsname</td><center>
</tr>
</table>
</td>
</tr>
<tr>
<td id='bg' align='center'>
<font size='3'>$newstext</font><br />
<font size='3'>$edit</font><br />
<font size='3'><a href='news_view.php?id=$row[id]'>Прочети цялата новина</a></font>
</td>
</tr>
<tr>
<td id='footerr'></td>
</tr>
</table><br>";
}
$query = mysql_query("SELECT COUNT(id) AS broi FROM novini") or die (mysql_error());
$row = mysql_fetch_array($query, MYSQL_ASSOC);
?>