Проблем с сваляне на файл

DangerM

Registered
Проблема е че не бях пускал скоро сайта преди да го оставя работеше всичко и сега видях че когато пробвам да сваля файла пред линка от който трябва да се свали искарва ИП-то ми и не може да се свали а ако го изтрия се сваля .
Предложете какво да направя защото нямам идея от какво може да е .
 

Radko

Registered
Да беше дал някакъв код да погледнем, понеже съм си затрил някъде кристалната топка.
 

DangerM

Registered
Бих дал ако имах идея от кой точно е !
Не мисля че е от ъплоуд файла защото запазва линка на файла без ип-то

това е файла от който се преглежда песента

PHP:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<b>
<style type="text/css">
.borderc2 {
border: 1px #CCCCCC solid;
}

.borderc2 h1 {
font-size: 12px;
font-weight: bold;
margin: 0;
}

.borderc2 a {
color: #000;
font-weight: bold;
}

.borderc2 a:hover {
color: #FF0030;
font-weight: bold;
}
</style>
 <?php
include("settings.php");
$id = $_GET['id'];
$sql = mysql_query("SELECT * FROM `songs` WHERE `id`='$id'");
$row = mysql_fetch_array($sql);
$view = $row['views'];
$downs = $row['downs'];
$date = $row['date'];
$kat=$row['kategoria'];

?> 



<?
$newdown = $view + 1;
$sql3 = "UPDATE songs SET views='$newdown' where id='$id'";
$ress = mysql_query($sql3);
?>
<table width="100%" border="0" cellpadding="2" cellspacing="2">
  <tbody><tr>
    <td colspan="3" class="borderc2">
	<center><h1><? echo $row['name']; ?><br/></h1></td></center>
  </tr>


  <tr>
    <td class="borderc2">
	Свалена:
	</td>
    <td class="borderc2" align="left">
	<? echo $downs; ?> път(и)<br/></font>
  </tr>
  <tr>
    <td class="borderc2">
	Прегледана:
	</td>
    <td class="borderc2" align="left">
    <font color="red"><? echo $newdown; ?> път(и)<br/></font>
  </tr>
  <tr>
    <td class="borderc2">
	Адрес:
	</td>
    <td class="borderc2" align="left">
	<div class="playads">
	<a href="#">Адрес</a>
	</div>
	</td>
  </tr>
    <td class="borderc2">
	Добавил:
	</td>
    <td class="borderc2" align="left">
	<b><a href="my.php?m=profile&username=<?php echo $row['author']; ?>"><?php echo $row['author']; ?><i><? echo $row['date']; ?></i>	</td>
  </tr>

  <tr>
    <td class="borderc2">
	Категория:
	</td>
    <td class="borderc2" align="left">
<font color='black' size='1'>
<b><?PHP if($kat=="$kategoria"){echo"Няма категория";}else{ echo"<font color='black' size='2'> <a href=\"cat2.php?kategoria=$kat\"><b>$kat</a>";} ?></font>
  </tr>
<tr>
<td class="borderc2" align="center">
<?php 
$id = $_GET['id']; 
$sql = mysql_query("SELECT * FROM `songs` WHERE `id`='$id'"); 
$row = mysql_fetch_array($sql); 

?> 
 <a href="javascript:void(0);" onclick="var e = this.parentNode.getElementsByTagName('div')[0]; e.style.display = e.style.display == 'block' ? 'none' : 'block';"><blink><img src="images/pozdrav.png"></img>Поздрави с тази песен.</blink></a>
<?
if($_SESSION['username'])
{
$ip = $_SERVER["REMOTE_ADDR"];
echo '
   <br><div style="display:none">
<form action="" method="POST"></center>
<div id="pokaji" onclick="pokaji(this.id);"></div><div style="display: none;" class="dvijeshto">
<center>
Вашето Име: 
</center>
<center><input value="'.$csuser.'" type="text" name="user"></center>
<center><input value="'.$row[name].'" type="text" name="izp"><br></center>
<center><input value="'.$id.'" type="text" name="pesen"></center>
';
}
else
{		
echo '';
}

?>
</center>
</div>
<?
if($_SESSION['username'])
{
$ip = $_SERVER["REMOTE_ADDR"];
echo '<center><input type="submit" name="button" class="button" value="Поздрав"></form></center>';
}
else
{		
echo '<center><font size="1" color="red">За да пуснете поздрав трябва да се логнете</font></center><script language="Javascript1.2"> 
am = "Моля влезте с потребителското си име и парола"; 
bV  = parseInt(navigator.appVersion) 
bNS = navigator.appName=="Netscape" 
bIE = navigator.appName=="Microsoft Internet Explorer" 
bOP = navigator.appName=="Opera" 
function nrc(e) { 
   if (bNS && e.which > 1){ 
      alert(am) 
      return false 
   } else if (bIE && (event.button >1)) { 
     alert(am) 
     return false; 
   } 
} 
document.onmousedown = nrc; 
if (document.layers) window.captureEvents(Event.MOUSEDOWN); 
if (bNS && bV<5) window.onmousedown = nrc; 
</script>';
}

?></div></center>

<?
include("settings.php");
session_start();
$csuser=$_SESSION['username'];
?></div></div>
<center><?php

if($_POST['button']){

$ot=$_POST['user'];

$izp=$_POST['izp'];

$pesen=$_POST['pesen'];

$query = mysql_query("INSERT INTO `pozdravi` (ot, id, izp, pesen) VALUES('$ot','NULL','$izp','$pesen')");

echo '<center><font color=red></font></center><a href="index.php?m=play&id='.$row['id'].'"><br></a><center></center>';
die('<META HTTP-EQUIV="refresh" CONTENT="0;URL=index.php?m=play&id='.$id.'">');
}
?>
</td>
    <td class="borderc2" align="left">
<?php
if ($_SESSION['username']==TRUE)
{
?>
<a href="add.php?m=play&id=<?php echo $row['id']; ?>&ext=add&id=<?php echo $row['id']; ?>" title="Добави в любими"><img src="images/addtolove.png"></img> Добави в любими</a>

<?php
}
else
{
    echo "Само за <a href='reg.php'>регистрирани</a> потребители";
}
?>


</tr>





  <tr>
    <td class="borderc2" align="center">
	<a href="download.php?id=<? echo $id; ?>">ИЗТЕГЛИ!</a>
	</td>



    <td class="borderc2" align="center">
<object type="application/x-shockwave-flash" data="modules/player.swf?mp3=<?php echo $row['link']; ?>" width="200" height="20"> 
<param name="movie" value="modules/player.swf?mp3=<? echo $row['link']; ?>">  
</object>
	</td>

 
 


    <td class="borderc2" align="center">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Система за гласуване</title>
<?php $id = (is_numeric($_GET['id']) && $_GET['id'] > 0) ? $_GET['id'] : 0; ?>
<script type="text/javascript" src="vote.js"></script>
<script language="JavaScript">
function movepic(img_name,img_src) {
document[img_name].src=img_src;
}
</script>
</head>
<?php
require "connect.php";
$row = mysql_fetch_array(mysql_query("SELECT `yes`,`no` FROM `votes` WHERE `id` = '$id'"));
					$yess = (empty($row['yes'])) ? 0 : $row['yes'];
					$noo = (empty($row['no'])) ? 0 : $row['no'];
					$timestamp_vote = (is_numeric(TIMESTAMP_VOTE) && TIMESTAMP_VOTE > 0) ? time() - (TIMESTAMP_VOTE * 3600) : 0;
					$query = mysql_query("SELECT `vote` FROM `ips` WHERE `id` = '$id' AND `ip` = '".$_SERVER['REMOTE_ADDR']."' AND `timestamp` > '$timestamp_vote' LIMIT 1");
					$vote_ip = mysql_fetch_object($query);
					$vote_yes = (($vote_ip -> vote) == 1) ? "vote_up" : "vote_up2";
					$vote_no = (($vote_ip -> vote) == -1) ? "vote_down" : "vote_down2";
					?> 
					<span style='color:red;'><strong>Кефи ли та?!</strong></span> <br>
					<div id="txtHint"><?php if (!mysql_num_rows($query)) { ?><a href="javascript:void(null)" onclick="showHint('1','<?=$id?>')" onmouseover="movepic('pic1','vote_up.gif');" 
					onmouseout="movepic('pic1','vote_up2.gif');"><? } ?><img name="pic1" src="<?=$vote_yes?>.gif" border="0"><?php if (!mysql_num_rows($query)) { ?></a><? } ?> <b><?=$yess?></b> 
					<?php if (!mysql_num_rows($query)) { ?><a href="javascript:void(null)" onclick="showHint('-1','<?=$id?>')" onmouseover="movepic('pic2','vote_down.gif');" 
					onmouseout="movepic('pic2','vote_down2.gif');"><? } ?><img name="pic2" src="<?=$vote_no?>.gif" border="0"><?php if (!mysql_num_rows($query)) { ?></a><? } ?> <b><?=$noo?></b></div>



</body>
</html>

	</td>
  </tr>
</tbody></table>
</b>
<html>



<center>


<center>

<br>


<? include ("comments.php");?>



а това е download.php

PHP:
<?php
include("settings.php");
$id = $_GET['id'];
$sql = mysql_query("SELECT * FROM songs WHERE id='$id'");
$row = mysql_fetch_array($sql);
$link = $row['link'];
$name = $row['name'];
$downs = $row['downs'];
$newdown = $downs + 1;
$sql3 = "UPDATE songs SET downs='$newdown' where id='$id'";
$ress = mysql_query($sql3);
header("Location: $link");

?>
 

DangerM

Registered
За какво ще послужат Header-И ?
ето този код
PHP:
<?
session_start();
include("settings.php");

$csuser=$_SESSION['username'];
?>
<!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>Danger-Music</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta name="Author" content="Радослав Луджов">

<link href="style.css" rel="stylesheet" type="text/css">


</head><body onload="clock()">
<table id="page" width="915" align="center" border="0" cellpadding="2" cellspacing="2">
  <tbody><tr>
    <td colspan="3" id="header" valign="top">
	<table id="slide" width="100%" border="0" cellpadding="0" cellspacing="0">
  <tbody><tr>
   <td width="30%" align="left">
  </tr>
</tbody></table>





	<table width="37%" border="1" cellpadding="0" cellspacing="0" height="10" align="right">
	<td width="5%" align="right"><? include('banner.php');?>
	</table>

	<table width="100%" border="0" cellpadding="0" cellspacing="0" height="20">
  <tbody>
 
	<img src="images/header.png">
</table>







  <tr>
    <td colspan="3">
<div id="menu">
  <a href="index.php"><span><font color="black">Начало</span></a>
  <a href="search.php"><span><font color="black">Песни</span></a>
  <a href="clips.php"><span><font color="black">Клипове</span></a>
  <a href="viewt.php"><span><font color="black">Текстове</span></a>
  <a href="members.php"><span><font color="black">Потребители</span></a>
  <a href="viewalbum.php"><span><font color="black">Албуми</span></a>
  <a href="svali.php"><span><font color="black">Vbox7</span></a>



	</td>
  </tr>
  <tr>
    <td width="20%" valign="top">

	<table class="menuside" width="100%" border="0" cellpadding="0" cellspacing="0">
  <tbody><tr class="mbg">
    <td><img src="images/mbgo.gif"></td>
	<td class="mtxt" width="100%">Потребителски Панел</td>
    </tr>
  <tr>
    <td colspan="2" class="mbrd">
<?
include("settings.php");
if($_SESSION['username'])
{
$pquery = "SELECT * FROM users WHERE username='$csuser'";
$presult = mysql_query($pquery);
$prow=mysql_fetch_array($presult);
$picture = $prow['picture'];
$q = mysql_query("SELECT * FROM `pm` WHERE `procheteno`='ne'") or die(mysql_error());
$broi = mysql_num_rows($q);


$num = $prow['num'];
$picture2 = $prow['picture'];
$view = $row['views'];
if(!$picture) $img = "images/nopicture.gif";
 $img = $picture2;
echo '<center><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
 <tr>
  </tr>


  <tr>
    <td colspan="3" class="menubrd" align=""> 



      <b>Добре дошъл, <a href="my.php?m=profile&username='.$csuser.'"><b>'.$csuser.'</a></b>
<br>
      <br><center><img src="'.$picture.'" width="120"><br>
      </b></center>
<div class="navmenu">
	<ul>
<left>
'.$rk.'
<img src="images/editprofile.gif"> </img><a href="edit.php"><font size="2">Промени своя профил</a><br/>
<img src="images/pesni.png"> </img><a href="search.php"><font size="2">Търси песен</a><br/>
<img src="images/msg.gif" width="16"><font size="2"> <a href="index.php?m=pm">Съобщения </a></font><font color="#84aa03" size="2">('.$broi.')</font><br/>
<img src="images/fr.png"> </img><a href="myfr.php"><font size="2">Мойте приятели</a><br/>
<img src="images/nota.png"> </img><a href="myups.php"><font size="2">Песни качени от мен</a><br/>
<img src="images/addtolove.png"> </img><a href="myfs.php"><font size="2">Любими файлове</a><br/>
<img src="images/music.png"> </img><a href="addsongs.php"><font size="2">Добави песен</a><br/>
<img src="images/cd.png"> </img><a href="addalbum.php"><font size="2">Добави албум</a><br/>
<img src="images/icon_video.gif"> </img><a href="addclip.php"><font size="2">Добави клип</a><br/>
<img src="images/addtext.png"> </img><a href="text.php"><font size="2">Добави текс</a><br/>
<img src="images/exit.gif"> </img><a href="modules/logout.php"><font size="2">Излез</font></a>

</left>

</left>
	</ul>
	</div>
    </tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">


</table>';
}
else
{
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">

  <tr>
<form action="modules/login.php" name="login" method="POST">
	<b>Потребител:</b><br />
	<input name="username" type="text" class="frm" /><br />
	<b>Парола:</b><br />
	<input name="password" type="password" class="frm" /><br><br>
	<input name="submit" type="submit" value="Влез" class="btn" />
	<hr /></form>
	<center>
	<b>[ <a href="index.php?m=register">РЕГИСТРАЦИЯ</a> ]
	<hr />
	[ <a href="index.php?m=forgot">Забравена парола?</a> ]</b>
	</center>
	<hr />
	</div>
	</td>
  </tr>
</table>';
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="3" class="menubrd" align="center">
      
	</td>
    </tr>
</table>

	<div id="tuts">


<hr>	</div>

	</td>
    </tr>
</tbody></table>

<br>

<table class="menuside" width="100%" border="0" cellpadding="0" cellspacing="0">
  <tbody><tr class="mbg">
    <td><img src="images/mbgo.gif"></td>
	<td class="mtxt" width="100%">Статистика</td>
    </tr>
  <tr>
    <td colspan="2" class="mbrd">
	<? include('google3.php');?>

	</td>
    </tr>
</tbody></table>


<br>

<table class="menuside" width="100%" border="0" cellpadding="0" cellspacing="0">






</tbody></table>

	</td>
    <td width="60%" valign="top">

	<table class="menuside" width="100%" border="0" cellpadding="0" cellspacing="0">
  <tbody><tr class="mbg">
    <td><img src="images/mbgo.gif"></td>
	<td class="mtxt" width="100%">Реклама</td>
    </tr>
  <tr>
    <td colspan="2" class="mbrd" align="center">
<a href="contact.php"><font size="2"><img src="images/468x60.gif"></img></a><br/>
	 
	</td>
    </tr>
</tbody></table>

<br>

<table class="menuside" width="100%" border="0" cellpadding="0" cellspacing="0">

		</td>
    </tr>
</tbody></table>

<br>

<table class="menuside" width="100%" border="0" cellpadding="0" cellspacing="0">
  <tbody><tr class="mbg">
    <td><img src="images/mbgo.gif"></td>
	<td class="mtxt" width="100%">Online прослушване / Сваляне / Безплатно / mp3</td>
    </tr>
  <tr>
    <td colspan="2" class="mbrd">
<center>
<?
$_GET['m'] = htmlspecialchars($_GET['m']);
if (!isset($_GET['m'])){
	$page = "modules/play/index.php";
}else{
	if (!isset($_GET['ext']) || $_GET['ext'] == ''){
		if ($_GET['m'] == "home") {
			$page = "modules/play/index.php";
		}else{
		if ($_GET['m']) {
$page = "modules/" . $_GET['m'] . "/index.php";
	}else{
				$page = "modules/play/index.php";
			}
		}
	}else{
		if ($_GET['m']) {

$page = "modules/" . $_GET['m'] . "/" . $_GET['ext'] . ".php";
}else{
			$page = "modules/play/index.php";
		}
	}
}
if(!file_exists($page))
{
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="menubg">Грешка 404</td>
  </tr>
  <tr>
    <td class="border1">
	<div align="center">
<b><font color="red" size="4">Няма такава страница!</font></b>
	</div>
	</td>
  </tr>
</table>';
}
else
{
include("$page");
}

?>


<table id="urok_table" width="100%" border="0" cellpadding="2" cellspacing="2">


</tr>
</tbody></table>
	</td>
    </tr>
</tbody></table>




<br>

<table class="menuside" width="100%" border="0" cellpadding="0" cellspacing="0">


	</td>
    </tr>
</tbody></table>
	</td>
    <td width="20%" valign="top">

	<table class="menuside" width="100%" border="0" cellpadding="0" cellspacing="0">
  <tbody><tr class="mbg">
    <td><img src="images/mbgo.gif"></td>
	<td class="mtxt" width="100%">
	Анкета</td>
    </tr>
  <tr>
    <td colspan="2" class="mbrd">

<? include('poll/index.php');?>
	</td>
    </tr>
</tbody></table>



<br>


<br>
<table class="menuside" width="100%" border="0" cellpadding="0" cellspacing="0">
  <tbody><tr class="mbg">
    <td><img src="images/mbgo.gif"></td>
	<td class="mtxt" width="100%">Подкрепете ни</td>
    </tr>
  <tr>
    <td colspan="2" class="mbrd" align="center">

<? include('modules/vote1.php');?>

	</td>
    </tr>
</tbody></table>

<br>

<table class="menuside" width="100%" border="0" cellpadding="0" cellspacing="0">
  <tbody><tr class="mbg">
    <td><img src="images/mbgo.gif"></td>
	<td class="mtxt" width="100%">Онлайн потребители</td>
    </tr>
  <tr>
    <td colspan="2" class="mbrd">


<? include('google.php');?> 

<table id="coment" width="100%" border="0" cellpadding="2" cellspacing="2">
<table id="coment" width="100%" border="0" cellpadding="2" cellspacing="2">
<table id="coment" width="100%" border="0" cellpadding="2" cellspacing="2">


	</td>
  </tr>
</tbody></table>
<br>

	</td>
    </tr>
</tbody></table>

	</td>
  </tr>
<tr>
    <td colspan="3" id="footer" valign="middle">
	</td>
  
  </tr>
</tbody></table>

	
	</td>
  </tr>
</tbody></table>




</body></html>


 <tr>
   
<tr>
    <td colspan="10" id="footer">
	
	<table width="95%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="17%" align="center"><a font <a href="baner.php"><font size="2">  <b><font color="black">Банери</a></font>
</td>
    <td width="100%" align="center"><b><? echo $copyright; ?>


<center>
 <center><b>©2009-2011 Danger Music. Всички права запазени.</center></b>


<td width="15%" align="right">
<script  type="text/javascript">

</script>
<noscript><a href="http://www.tyxo.bg/?99730" title="Tyxo.bg counter" target="_blank"><img src="http://cnt.tyxo.bg/99730" width="80" height="15" border="0" alt="Tyxo.bg counter" /></a></noscript>

  </tr>
</table>






е нещо като индекс изкарва информацията от този


PHP:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<b>
<style type="text/css">
.borderc2 {
border: 1px #CCCCCC solid;
}

.borderc2 h1 {
font-size: 12px;
font-weight: bold;
margin: 0;
}

.borderc2 a {
color: #000;
font-weight: bold;
}

.borderc2 a:hover {
color: #FF0030;
font-weight: bold;
}
</style>
 <?php
include("settings.php");
$id = $_GET['id'];
$sql = mysql_query("SELECT * FROM `songs` WHERE `id`='$id'");
$row = mysql_fetch_array($sql);
$view = $row['views'];
$downs = $row['downs'];
$date = $row['date'];
$kat=$row['kategoria'];

?> 



<?
$newdown = $view + 1;
$sql3 = "UPDATE songs SET views='$newdown' where id='$id'";
$ress = mysql_query($sql3);
?>
<table width="100%" border="0" cellpadding="2" cellspacing="2">
  <tbody><tr>
    <td colspan="3" class="borderc2">
	<center><h1><? echo $row['name']; ?><br/></h1></td></center>
  </tr>


  <tr>
    <td class="borderc2">
	Свалена:
	</td>
    <td class="borderc2" align="left">
	<? echo $downs; ?> път(и)<br/></font>
  </tr>
  <tr>
    <td class="borderc2">
	Прегледана:
	</td>
    <td class="borderc2" align="left">
    <font color="red"><? echo $newdown; ?> път(и)<br/></font>
  </tr>
  <tr>
    <td class="borderc2">
	Адрес:
	</td>
    <td class="borderc2" align="left">
	<div class="playads">
	<a href="#">Адрес</a>
	</div>
	</td>
  </tr>
    <td class="borderc2">
	Добавил:
	</td>
    <td class="borderc2" align="left">
	<b><a href="my.php?m=profile&username=<?php echo $row['author']; ?>"><?php echo $row['author']; ?><i><? echo $row['date']; ?></i>	</td>
  </tr>

  <tr>
    <td class="borderc2">
	Категория:
	</td>
    <td class="borderc2" align="left">
<font color='black' size='1'>
<b><?PHP if($kat=="$kategoria"){echo"Няма категория";}else{ echo"<font color='black' size='2'> <a href=\"cat2.php?kategoria=$kat\"><b>$kat</a>";} ?></font>
  </tr>
<tr>
<td class="borderc2" align="center">
<?php 
$id = $_GET['id']; 
$sql = mysql_query("SELECT * FROM `songs` WHERE `id`='$id'"); 
$row = mysql_fetch_array($sql); 

?> 
 <a href="javascript:void(0);" onclick="var e = this.parentNode.getElementsByTagName('div')[0]; e.style.display = e.style.display == 'block' ? 'none' : 'block';"><blink><img src="images/pozdrav.png"></img>Поздрави с тази песен.</blink></a>
<?
if($_SESSION['username'])
{
$ip = $_SERVER["REMOTE_ADDR"];
echo '
   <br><div style="display:none">
<form action="" method="POST"></center>
<div id="pokaji" onclick="pokaji(this.id);"></div><div style="display: none;" class="dvijeshto">
<center>
Вашето Име: 
</center>
<center><input value="'.$csuser.'" type="text" name="user"></center>
<center><input value="'.$row[name].'" type="text" name="izp"><br></center>
<center><input value="'.$id.'" type="text" name="pesen"></center>
';
}
else
{		
echo '';
}

?>
</center>
</div>
<?
if($_SESSION['username'])
{
$ip = $_SERVER["REMOTE_ADDR"];
echo '<center><input type="submit" name="button" class="button" value="Поздрав"></form></center>';
}
else
{		
echo '<center><font size="1" color="red">За да пуснете поздрав трябва да се логнете</font></center><script language="Javascript1.2"> 
am = "Моля влезте с потребителското си име и парола"; 
bV  = parseInt(navigator.appVersion) 
bNS = navigator.appName=="Netscape" 
bIE = navigator.appName=="Microsoft Internet Explorer" 
bOP = navigator.appName=="Opera" 
function nrc(e) { 
   if (bNS && e.which > 1){ 
      alert(am) 
      return false 
   } else if (bIE && (event.button >1)) { 
     alert(am) 
     return false; 
   } 
} 
document.onmousedown = nrc; 
if (document.layers) window.captureEvents(Event.MOUSEDOWN); 
if (bNS && bV<5) window.onmousedown = nrc; 
</script>';
}

?></div></center>

<?
include("settings.php");
session_start();
$csuser=$_SESSION['username'];
?></div></div>
<center><?php

if($_POST['button']){

$ot=$_POST['user'];

$izp=$_POST['izp'];

$pesen=$_POST['pesen'];

$query = mysql_query("INSERT INTO `pozdravi` (ot, id, izp, pesen) VALUES('$ot','NULL','$izp','$pesen')");

echo '<center><font color=red></font></center><a href="index.php?m=play&id='.$row['id'].'"><br></a><center></center>';
die('<META HTTP-EQUIV="refresh" CONTENT="0;URL=index.php?m=play&id='.$id.'">');
}
?>
</td>
    <td class="borderc2" align="left">
<?php
if ($_SESSION['username']==TRUE)
{
?>
<a href="add.php?m=play&id=<?php echo $row['id']; ?>&ext=add&id=<?php echo $row['id']; ?>" title="Добави в любими"><img src="images/addtolove.png"></img> Добави в любими</a>

<?php
}
else
{
    echo "Само за <a href='reg.php'>регистрирани</a> потребители";
}
?>


</tr>





  <tr>
    <td class="borderc2" align="center">
	<a href="download.php?id=<? echo $id; ?>">ИЗТЕГЛИ!</a>
	</td>



    <td class="borderc2" align="center">
<object type="application/x-shockwave-flash" data="modules/player.swf?mp3=<?php echo $row['link']; ?>" width="200" height="20"> 
<param name="movie" value="modules/player.swf?mp3=<? echo $row['link']; ?>">  
</object>
	</td>

 
 


    <td class="borderc2" align="center">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Система за гласуване</title>
<?php $id = (is_numeric($_GET['id']) && $_GET['id'] > 0) ? $_GET['id'] : 0; ?>
<script type="text/javascript" src="vote.js"></script>
<script language="JavaScript">
function movepic(img_name,img_src) {
document[img_name].src=img_src;
}
</script>
</head>
<?php
require "connect.php";
$row = mysql_fetch_array(mysql_query("SELECT `yes`,`no` FROM `votes` WHERE `id` = '$id'"));
					$yess = (empty($row['yes'])) ? 0 : $row['yes'];
					$noo = (empty($row['no'])) ? 0 : $row['no'];
					$timestamp_vote = (is_numeric(TIMESTAMP_VOTE) && TIMESTAMP_VOTE > 0) ? time() - (TIMESTAMP_VOTE * 3600) : 0;
					$query = mysql_query("SELECT `vote` FROM `ips` WHERE `id` = '$id' AND `ip` = '".$_SERVER['REMOTE_ADDR']."' AND `timestamp` > '$timestamp_vote' LIMIT 1");
					$vote_ip = mysql_fetch_object($query);
					$vote_yes = (($vote_ip -> vote) == 1) ? "vote_up" : "vote_up2";
					$vote_no = (($vote_ip -> vote) == -1) ? "vote_down" : "vote_down2";
					?> 
					<span style='color:red;'><strong>Кефи ли та?!</strong></span> <br>
					<div id="txtHint"><?php if (!mysql_num_rows($query)) { ?><a href="javascript:void(null)" onclick="showHint('1','<?=$id?>')" onmouseover="movepic('pic1','vote_up.gif');" 
					onmouseout="movepic('pic1','vote_up2.gif');"><? } ?><img name="pic1" src="<?=$vote_yes?>.gif" border="0"><?php if (!mysql_num_rows($query)) { ?></a><? } ?> <b><?=$yess?></b> 
					<?php if (!mysql_num_rows($query)) { ?><a href="javascript:void(null)" onclick="showHint('-1','<?=$id?>')" onmouseover="movepic('pic2','vote_down.gif');" 
					onmouseout="movepic('pic2','vote_down2.gif');"><? } ?><img name="pic2" src="<?=$vote_no?>.gif" border="0"><?php if (!mysql_num_rows($query)) { ?></a><? } ?> <b><?=$noo?></b></div>



</body>
</html>

	</td>
  </tr>
</tbody></table>
</b>
<html>



<center>


<center>

<br>


<? include ("comments.php");?>
 

palex

Registered
Сигурен ли си, че songs.link е с коректна информацията - погледни с PhpMyAdmin.

Сложи едно
echo "<pre>".$row['link']."</pre>";
след
$row = mysql_fetch_array($sql);

и ще се ориентираш. Ако ти вади URL с твоето IP значи проблема е при записа в таблицата. Ако ти го вади без IP-то, значи трябва да търсиш другаде. Може да е лошо конфигуриран PHP или Apache.
 

DangerM

Registered
В базата данни записва само линка към песента без ИП и когато добавя
Код:
echo "<pre>".$row['link']."</pre>";
е само линка нямам идея от каде може да е :idea:
 

Горе