|
14.02.2006, 15:01
Откройте modules/Files/index.php
Найдите 3 раза:
PHP код:
reitinggraphic($votes, $totalvotes); echo "</td></tr>";
Замените на:
PHP код:
reitinggraphic($votes, $totalvotes); echo " (<a href=\"modules.php?name=$module_name&go=getit&lid=$lid\">Скачать</a>)</td></tr>";
Найдите:
PHP код:
function getit($lid) { global $prefix, $db, $module_name; $lid = intval($lid); $hits = intval($hits); $db->sql_query("update ".$prefix."_files set hits=hits+1 WHERE lid=$lid"); $sql = "SELECT title, url FROM ".$prefix."_files WHERE lid='$lid'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $f_title = $row[title]; $url = $row[url]; echo "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"5; URL=$url\">"; include("header.php"); menu(); OpenTable(); echo "<center><br><br><br>"._NOTEDOWNLOAD." <b>$f_title</b> "._NOTEDOWNLOAD2."<br><br><br><br>"; echo "<b><a href=\"$url\">$url</a></b><br><br><br><br>"; echo "[ <a href=\"javascript:history.go(-1)\">"._PBACK."</a> | <a href=\"modules.php?name=$module_name\">"._PHOME."</a> ]<br><br><br></center>"; CloseTable(); include("footer.php"); }
Замените на:
PHP код:
function getit($lid) { global $prefix, $db, $module_name; $lid = intval($lid); $hits = intval($hits); $db->sql_query("update ".$prefix."_files set hits=hits+1 WHERE lid=$lid"); $sql = "SELECT url FROM ".$prefix."_files WHERE lid='$lid'"; $result = $db->sql_query($sql); $row = $db->sql_fetchrow($result); $url = $row['url']; header("Location: $url"); }
|
|