Ver Mensaje Individual
  #7 (permalink)  
Antiguo 27/03/2009, 13:14
flatron666
 
Fecha de Ingreso: marzo-2009
Mensajes: 55
Antigüedad: 15 años, 1 mes
Puntos: 0
Respuesta: Detectar variable

Este es el script que llama al descargar.php

<?php
require("./NewsSql.inc.php");
$db = new NewsSQL($DBName);
if ((!empty($PR)) && ($Rating>=1)){
$db->set_Rating($newsid,$Rating);
}
$result = $db->getnewsbyid($newsid);
$title = $result[0]["title"];
$content = $result[0]["content"];
$picture = $result[0]["picture"];
$picturepath = "./photo/";
$viewnum = $result[0]["viewnum"];
$sourceurl = $result[0]["sourceurl"];
$source = $result[0]["source"];
$adddate = $result[0]["adddate"];
$db->addhit($viewnum,$newsid);
$Rate = $result[0]["rating"];
$Rate1 = $Rate*10;
$Rate2 = ceil($Rate1);
$Rate = $Rate2/10;

$pre[0] = $newsid-1;

for ($i=1; $i<=$prenumber-1; $i++){
$pre[$i] = $pre[$i-1]-1;
}

$next[0] = $newsid+1;

for ($i=1; $i<=$nextnumber-1; $i++){
$next[$i] = $next[$i-1]+1;
}

?>
<html>
<head>
<title><?php print "$title"; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php print "$front_charset"; ?>">
<link rel="stylesheet" href="./style/style.css" type="text/css">
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<?php
include("top.php3");
?>
<table width="412" border="0" cellspacing="1" cellpadding="0" align="center" class="table_01">
<tr>
<td class="menu" bgcolor="#FFFFFF" valign="top" width="410">
<div align="left">
<table width="410" border="0" cellspacing="0" cellpadding="4">
<tr>
<td bgcolor="#F2F2F2" class="menu_in">::<? print "$title"; ?></td>
</tr>
<?php

if (!empty($picture)){

print "<tr>
<a href='./descargar.php?$picturepath$picture '> descargar </a>></td>


</tr>";



Donde $picturepath=ruta y $picture=archivo.