. */ include "inc.php"; $msg1 = ''; $msg2 = ''; // Test sessid; $query = "select id from Sessions where (dnldcode=\"" . addslashes($vercode) . "\" or modcode=\"" . addslashes($vercode) . "\");"; $res = mysql_query($query,$dbh) or die("

Error getting session information..\n
Query: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); if (mysql_num_rows($res) != 1) $msg1 = "The download code is invalid (expired upload?)."; $row = mysql_fetch_row($res); $sessionid = $row[0]; // Test file presence before sending; $query = "select name,method from Files where id=$fid;"; $res = mysql_query($query,$dbh) or die("

Error getting file name..\n
Query: " . $query . "
\nError: (" . mysql_errno() . ") " . mysql_error()); if (mysql_num_rows($res) != 1) $msg2 = "The requested file does not exist."; else $row = mysql_fetch_row($res); if ($msg1 == '' && $msg2 == '') { $realname = "$fpath/" . stripslashes($vercode) . "/$row[0]"; $method = $row[1]; // Create symlink; if ($method == 'http') $origin = "$fpath/" . stripslashes($vercode); elseif ($method == 'ftp') $origin = "$ftppath/" . stripslashes($vercode); if (!file_exists("$serverpath/$vercode")) symlink($origin,"$serverpath/" . stripslashes($vercode)) or error_log(stripslashes($vercode) . ": Failed to symlink $origin to $serverpath/$vercode"); $url = $proto . '://' . $servername . '/' . stripslashes($vercode) . '/' . $row[0]; if ($savehistory) { // record file download into History table; insert_history_entry('download', $fid, $sessionid); } } ?> <?=$appname; ?> - Send File '; ?>
File not found"); echo $notesheading; ?>
    $sendnote1"; echo "
  1. $sendnote2
  2. "; } else echo "
  3. $ftpsendnote1
  4. "; ?>