добре пич виж сега лист.пхп ми е отделно
това ми е download.php кадето ми е кода от comment
а в лист си имам ...
така е добре ама като добавя новина и не ми яизкарва ...
това ми е download.php кадето ми е кода от comment
Код:
<?
include "c.php";
define('IN_PHPBB', true);
$phpbb_root_path ='forum/';
include($phpbb_root_path . 'config.php');
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
?>
<!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>:: ALL MIX ::</title>
<style type="text/css">
</style>
<script type="text/JavaScript">
</script>
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">
</style>
<link href="css/table.css" rel="stylesheet" type="text/css" />
<style type="text/css">
</style>
</head>
<body>
<table width="794" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="183" background="1.jpg"><p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p> </td>
</tr>
<tr>
<td height="29" align="center" background="menu_header.jpg"><div align="right"><a href="archive.php?letter=a" class="footer_link">A</a> . <span class="style19"><a href="archive.php?letter=b" class="footer_link">B</a></span> . <a href="archive.php?letter=c" class="footer_link">C</a> . <a href="archive.php?letter=d" class="footer_link">D</a> .<a href="archive.php?letter=e" class="footer_link"> E</a> .<a href="archive.php?letter=f" class="footer_link"> F</a> .<a href="archive.php?letter=g" class="footer_link"> G</a> .<a href="archive.php?letter=h" class="footer_link"> H</a> .<a href="archive.php?letter=i" class="footer_link"> I</a> . <a href="archive.php?letter=j" class="footer_link">J</a> . <a href="archive.php?letter=k" class="footer_link">K</a> . <a href="archive.php?letter=l" class="footer_link">L</a> . <a href="archive.php?letter=m" class="footer_link">M</a> .<a href="archive.php?letter=n" class="footer_link"> N</a> . <a href="archive.php?letter=o" class="footer_link">O</a> . <a href="archive.php?letter=p" class="footer_link">P</a> . <span class="style19"><a href="archive.php?letter=r" class="footer_link">R</a></span> . <a href="archive.php?letter=s" class="footer_link">S</a> . <a href="archive.php?letter=t" class="footer_link">T</a> . <a href="archive.php?letter=v" class="footer_link">V</a> . <a href="archive.php?letter=w" class="footer_link">W</a> . <a href="archive.php?letter=x" class="footer_link">X</a> . <a href="archive.php?letter=y" class="footer_link">Y</a> . <a href="archive.php?letter=z" class="footer_link">Z </a></div></td>
</tr>
<?
if ($userdata['user_active']>0)
{
?>
<?
} else {
?>
<tr>
<td height="2" align="center"></td>
<?
}
?>
<?
if ($userdata['user_active']>0)
{
?>
<tr>
<td height="13" align="center" background="forum_table.jpg" bgcolor="#637D96"><span class="style4"><a href="index.php" class="menu_link">Начало</a></span> | <a href="http://www.allmix.org/forum/index.php" class="menu_link">Форум</a> | <a href="news.php" class="menu_link"><strong>Предстоящи п</strong>артита</a> | <a href="after_news.php" class="menu_link">Минали партита</a> | <a href="form.php" class="menu_link">Търсене</a> | <a href="Contact/contact.php?mode=report" class="menu_link">Контакт</a></td>
</tr>
<tr>
<td height="13" align="center" bgcolor="#7D8995"><a href="http://www.allmix.org/forum/report.php?mode=report" class="footer_link">Докладвай за неработешт линк или липсвашт сет.</a> </td>
</tr>
<?
} else {
?>
<tr>
<td height="13" align="center" background="forum_table.jpg" bgcolor="#637D96"><a href="index.php" class="menu_link"><span class="style4"><a href="index.php" class="menu_link">Начало</a> | <a href="forum/index.php" class="menu_link">Форум</a> | <a href="http://www.allmix.org/forum/profile.php?mode=register" class="menu_link">Регистрирайте се</a></td>
<?
}
?>
</table>
<table width="794" border="0" align="center" cellpadding="0" cellspacing="0">
<?
if ($userdata['user_active']>0)
{
?>
<?
} else {
?>
<tr>
<td align="center" bgcolor="#7D8995"> </td>
<td align="center" bgcolor="#7D8995"><a href="http://www.allmix.org/forum/profile.php?mode=register" class="menu_link">За да ползвате разширените функции на сайта, трябва да се регистрирате като потребител.</a></td>
<td align="center" bgcolor="#7D8995"> </td>
</tr>
<tr>
<td align="center" bgcolor="#7D8995"> </td>
<td align="center" bgcolor="#7D8995"><form action="http://www.allmix.org/forum/login.php" method="post">
<div align="right">
<p align="center">Потребител:
<input name="username" type="text" class="Login" style="border: 1px solid black;"size="10" />
Парола:
<input name="password" type="password" class="Login" style="border: 1px solid black;" size="10" />
<input name="login" type="submit" class="Login" style="border: 1px solid black;" value="Вход" />
</p>
</div>
</form></td>
<td align="center" bgcolor="#7D8995"> </td>
<?
}
?>
</tr>
<tr>
<td width="10" align="center" bgcolor="#7D8995"> </td>
<td width="781" align="center" bgcolor="#7D8995"><strong>И з т е г л и о т т у к </strong></td>
<td width="10" align="center" bgcolor="#7D8995"> </td>
</tr>
</table>
<table width="799" border="0" align="center">
<tr>
<td background="table_bg.jpg"><span class="style15 style17">Name</span></td>
<td background="table_bg.jpg"><span class="style15">Size</span></td>
<td background="table_bg.jpg"><span class="style15">Year</span></td>
</tr>
<tr>
<?
$id=$_GET['id'];
$sql = mysql_query("SELECT * FROM mp3z WHERE id='$id'") or die(mysql_error);
while($arr = mysql_fetch_assoc($sql))
{
$name = $arr["name"];
$link = $arr["link"];
$size = $arr["size"];
$year = $arr["year"];
?>
<td width="662" align="left" bgcolor="#4F4F4F"><a href="<?=$link?>" class="menu_link"><?=$name?></a></td>
<td width="63" align="left" bgcolor="#4F4F4F"><?=$size?></td>
<td width="60" align="left" bgcolor="#4F4F4F"><?=$year?></td>
</tr>
<?
}
?>
</table>
<table width="799" border="0" align="center">
<tr>
<td bgcolor="#4F4F4F"> </td>
</tr>
</table>
<table width="799" border="0" align="center">
<tr>
<td bgcolor="#4F4F4F"><?
#форма за коментари
/*
автор : Велико Боев К
URL: www.burkoff.org
e-mail:redcell@abv.bg
коментар: Това е първия ми скрипт ;)
*/
$server ="localhost";
$potrebitelvmysql = "allmix";
$parola = "";
$tablica ="allmix";
?>
<form method="POST" action="list.php">
<table>
<tr><td width='20'>име:</td><td><input type="text" name="name" size="24"></td></tr>
<tr><td width='20'>текст:</td><td><textarea type="text" name="text" cols="20" rows="5"></textarea></td></tr>
<tr><td> </td><td><input type="submit" value="изпрати" name="send"></td></tr>
</table></form>
<?
$status = "ok";
if (strlen($name) <2 ) { // проверка за попълнено име
$status= "error";}
if (strlen($text) <2 ) { // проверка за попълнен текст
$status= "error";}
if($status=="ok"){
mysql_pconnect("$server","$potrebitelvmysql","$parola") or die ( 'проблем при свързване с MySQL!' );
// ("localhost","DB_USER","DB_PASS")
mysql_select_db("$tablica") or die ( 'Грешка при връзката!' );
$posted = time();
$query="SELECT * from komentari where text='$text' ";
$result=mysql_query($query);
$num=mysql_num_rows($result);
if ($num>0)
{
echo "<META HTTP-EQUIV='Refresh' CONTENT='0; URL=$_REQUEST[link]'>";
exit;}
else
{
$query = mysql_query("UPDATE komentari SET text='$text' WHERE id='1' ");
mysql_query($query);
}
$query = mysql_query("INSERT komentari (name, text, posted) VALUES ('$name', '$text','$posted')");
}
include "list.php";
?>
</td>
</tr>
</table>
<table width="796" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="289" height="19" align="center" background="forum_table2.jpg"><span class="style20"><a href="news.php" class="style28"><span class="menu_link">allmix.org</span></a></span><span class="copyright style5 style30"><span class="style31"> Designed by </span></span><a href="mailto: xtosk8@gmail.com" class="style28"><span class="menu_link">X-to</span></a><span class="copyright style5 style30"> <span class="style31">© 2007</span></span></td>
</tr>
</table>
<table width="798" border="0" align="center">
<tr>
<td align="center" valign="top"><p class="copyright"><script type="text/javascript" language="javascript"></script>
<script type="text/javascript" language="javascript1.2"></script>
<a href="http://counter.search.bg/cgi-bin/s?_id=allmix" target="_blank"><img width=70 height=15 border=0 alt=""
src="http://counter.search.bg/cgi-bin/c?_id=allmix&_z=4" /></a></tr>
</table>
</body>
</html>
а в лист си имам ...
Код:
<?php
#извеждане на коментарите
/*
автор : Велико Боев К.
URL: www.burkoff.org
e-mail:redcell@abv.bg
коментар: Това е първия ми скрипт ;)
*/
$server ="localhost";
$potrebilevmysql = "allmix";
$parola = "";
$tablica ="allmix";
$connect=mysql_pconnect("$server","$potrebilevmysql","$parola") or die ( 'проблем при свързване с MySQL!' );
// ("localhost","DB_USER","DB_PASS")
mysql_select_db("$tablica") or die ( 'Грешка при връзката!' );
$query = mysql_query("SELECT name, text FROM komentari ORDER BY posted DESC");
while (list ($name, $text)=mysql_fetch_array ($query)) {
echo "<b>$name</b> :$text<br>";
}
?>
така е добре ама като добавя новина и не ми яизкарва ...