probeem= download hack
Geplaatst: 18 jul 2004, 19:32
Warning: stat failed for media/http://www.gold-strike.nl/~svennson/Criminals.zip (errno=2 - No such file or directory) in /home/svennson/web/phpBB2/downloads.php on line
deze error krijg ik als ik een file toegevoegd heb kan iemand helpen
downloads.php =
kan iemand helpn
svennson
deze error krijg ik als ik een file toegevoegd heb kan iemand helpen
downloads.php =
Code: Selecteer alles
<?php
$download_dir = "media/";
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Set page ID for session management
//
$userdata = session_pagestart($user_ip, PAGE_DOWNLOADS);
init_userprefs($userdata);
//
// End session management
//
//
// Generate page
//
make_jumpbox('viewforum.'.$phpEx);
$page_title = $lang['Downloads'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
if ($view == "detail")
{
$template->set_filenames(array(
'body' => 'view_dl_body.tpl')
);
}
else
{
$template->set_filenames(array(
'body' => 'downloads_body.tpl')
);
}
$user_id = $userdata['user_id'];
$username = $userdata['username'];
if ( $userdata['session_logged_in'])
{
$user_traffic = $userdata['user_traffic'];
}
else
{
$user_traffic = "0";
}
if ($user_traffic < 1024)
{
$user_traffic_out = $user_traffic . " Bytes";
}
if ($user_traffic > 1023)
{
$user_traffic_out = bcdiv($user_traffic,1024,2) . " kb";
}
if ($user_traffic > 1048575)
{
$user_traffic_out = bcdiv($user_traffic,1048576,2) . " Mb";
}
if ($view == "detail")
{
$sql = "SELECT * FROM " . DOWNLOADS_TABLE . " WHERE id = $id";
}
else
{
$sql = "SELECT * FROM " . DOWNLOADS_TABLE . " ORDER by sort";
}
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
if ( $row = $db->sql_fetchrow($result) )
{
$i = 0;
do
{
$description = $row['description'];
if ($view == "detail") $long_desc = nl2br($row['long_desc']);
$file_name = $row['file_name'];
$file_id = $row['id'];
if ($row['long_desc'] != "") $info = "<a href=\"downloads.$phpEx?view=detail&id=" . $file_id . "\">" . $lang['Dl_info'] . "</a>";
if ($row['long_desc'] == "") $info = "-";
$file_klicks = $row['klicks'];
$file_free = $row['free'];
$file_extern = $row['extern'];
if ($file_extern == "0") $file_size = filesize($download_dir . $file_name);
if ($file_size < 1024)
{
$file_size_out = $file_size . " byte";
}
if ($file_size > 1025)
{
$file_size_out = bcdiv($file_size,1024,2) . " kb";
}
if ($file_size > 1048575)
{
$file_size_out = bcdiv($file_size,1048576,2) . " Mb";
}
if ($file_extern == "1") $file_size_out = $lang['Dl_not_availible'];
if ( $userdata['session_logged_in'] AND $user_traffic > $file_size AND $file_extern == "0")
{
$status = "<a href=\"load." . $phpEx . "?id=" . $file_id . "\"><img src=\"" . $images['Dl_yellow'] . "\" border=\"0\" alt=\"" . $lang['Dl_yellow_explain'] . "\"></a>";
}
else
{
$status = "<img src=\"" . $images['Dl_red'] . "\" alt=\"" . $lang['Dl_red_explain'] . "\">";
}
if ( $file_extern == "1")
{
$status = "<a href=\"load." . $phpEx . "?id=" . $file_id . "\"><img src=\"" . $images['Dl_grey'] . "\" border=\"0\" alt=\"" . $lang['Dl_grey_explain'] . "\"></a>";
}
if ( $file_free == "1")
{
$status = "<a href=\"load." . $phpEx . "?id=" . $file_id . "\"><img src=\"" . $images['Dl_green'] . "\" border=\"0\" alt=\"" . $lang['Dl_green_explain'] . "\">";
}
$template->assign_vars(array(
"L_ACCOUNT" => $lang['Dl_account'],
"L_USERNAME" => $lang['Username'],
"L_TRAFFIC" => $lang['Traffic'],
"L_STATUS" => $lang['Download_status'],
"L_DOWNLOAD" => $lang['Dl_download'],
"L_SIZE" => $lang['Dl_file_size'],
"L_KLICKS" => $lang['Dl_klicks'],
"L_FILE_NAME" => $lang['Dl_file_name'],
"L_NAME" => $lang['Dl_name'],
"L_I" => $lang['Dl_i'],
"L_DETAILS" => $lang['Dl_detail'],
"GREEN" => $images['Dl_green'],
"RED" => $images['Dl_red'],
"YELLOW" => $images['Dl_yellow'],
"GREY" => $images['Dl_grey'],
"L_DL_GREEN_EXPLAIN" => $lang['Dl_green_explain'],
"L_DL_RED_EXPLAIN" => $lang['Dl_red_explain'],
"L_DL_YELLOW_EXPLAIN" => $lang['Dl_yellow_explain'],
"L_DL_GREY_EXPLAIN" => $lang['Dl_grey_explain'],
"L_DESCRIPTION" => $lang['Dl_file_description'])
);
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
$row_1 = $theme['td_class1'];
$row_2 = $theme['td_class2'];
$template->assign_block_vars('downloads', array(
'ROW_CLASS' => $row_class,
'ROW_CLASS1' => $row_1,
'ROW_CLASS2' => $row_2,
'DESCRIPTION' => $description,
'LONG_DESC' => $long_desc,
'INFO' => $info,
'STATUS' => $status,
'USER_TRAFFIC' => $user_traffic_out,
'FILE_SIZE' => $file_size_out,
'FILE_KLICKS' => $file_klicks,
'FILE_NAME' => $file_name)
);
$i++;
}
while ( $row = $db->sql_fetchrow($result) );
}
$template->assign_block_vars('userdata', array(
'ROW_1' => $row_1,
'ROW_2' => $row_2,
'USER_TRAFFIC' => $user_traffic_out,
'USER_NAME' => $username)
);
$template->pparse('body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
svennson