<?php
/******************************************************************************
*
* Open ShareLive (main site code)
* Copyright (C) 2002-2005 ShareLive
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
******************************************************************************/
?>
<html>
<head>
<title>Download All</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="sl_theme_proz.css" rel="stylesheet" type="text/css">
</head>
<script language="JavaScript" type="text/JavaScript">
var sFileLinks = new Array;
var nCounter = 0;
<?php
require('Connections/Default.php');
$q = mysql_query("SELECT * FROM ".$dbprefix."links WHERE rel_id = " . $_GET['pid']);
mysql_query("UPDATE ".$dbprefix."links SET counter = counter + 1 WHERE rel_id = " . $_GET['pid']);
mysql_query("UPDATE ".$dbprefix."shares SET dl_counter=dl_counter+1 WHERE rel_id= " . $_GET['pid']);
$i = 0;
$str = '';
while ($row = mysql_fetch_array($q)) {
// Tempory fix for the Shareza '&' bug
$link = str_replace("%26", "and", $row['link']);
echo " sFileLinks[$i] = \"" . str_replace("\r", '', str_replace("\n", '', $link)) . "\";\n";
$i++;
}
?>
var LinkTimer = false;
function SendFile(){
nCounter++;
if(nCounter==sFileLinks.length){
top.clearInterval(LinkTimer);
nCounter=0;
}
top.document.location=sFileLinks[nCounter];
return true;
}
function AddLinks(){
LinkTimer = top.setInterval('SendFile()', 100)
}
</script>
<body onLoad="javascript:AddLinks()">
<p></p>
<br>
<table width="580" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td bgcolor="#CCCCCC"><table width="100%" border="0" cellpadding="6" cellspacing="3" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#F3F3F3"><p class="bodytext"><strong>Your download should
begin in a few seconds.</strong><br>
If nothing happens, <a href="javascript:AddLinks()">click here</a>.<br>
</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
<p> </p>
</body>
</html>