oki thx za podpowiedź coś tam poczytam o htaccess
ale jeśli ktoś bardziej dokladnie zna temat to proszę o rozwinięcie pozdrawiam i dziękuję bardzo

powoli odbijam sie od dna z problemem
------------------------------------------------------------------------------------------------------------
znalazłem jeszcze skrypt który mimo iż pobieramy plik nie pokazuje nazwy pliku(ani ścieżki do niego) tutaj zamieszczam kod który znalazłem
niestety nie bardzo wiem jak go użyć bo to jest tylko wycinek ale może komuś coś podpowie
| Send attachment
Line 46
: if ( isset( $_GET['attachment'])) Line 62: * send attachment
Line 65: $attachment = $_GET['attachment'];
Line 65: $attachment = $_GET['attachment'];
Line 66
: settype( $attachment, 'integer'); Line 69: * we will select attachment from sql
Line 72: $attach_query = $mysql -> query( "SELECT a.*, t.* FROM attachments a LEFT JOIN attachments_types t ON a.attachment_type = t.attachments_type_id WHERE a.attachment_id = '$attachment' AND a.attachment_post > '0'");
Line 72: $attach_query = $mysql -> query( "SELECT a.*, t.* FROM attachments a LEFT JOIN attachments_types t ON a.attachment_type = t.attachments_type_id WHERE a.attachment_id = '$attachment' AND a.attachment_post > '0'");
Line 72: $attach_query = $mysql -> query( "SELECT a.*, t.* FROM attachments a LEFT JOIN attachments_types t ON a.attachment_type = t.attachments_type_id WHERE a.attachment_id = '$attachment' AND a.attachment_post > '0'");
Line 72: $attach_query = $mysql -> query( "SELECT a.*, t.* FROM attachments a LEFT JOIN attachments_types t ON a.attachment_type = t.attachments_type_id WHERE a.attachment_id = '$attachment' AND a.attachment_post > '0'");
Line 72: $attach_query = $mysql -> query( "SELECT a.*, t.* FROM attachments a LEFT JOIN attachments_types t ON a.attachment_type = t.attachments_type_id WHERE a.attachment_id = '$attachment' AND a.attachment_post > '0'");
Line 72: $attach_query = $mysql -> query( "SELECT a.*, t.* FROM attachments a LEFT JOIN attachments_types t ON a.attachment_type = t.attachments_type_id WHERE a.attachment_id = '$attachment' AND a.attachment_post > '0'");
Line 72: $attach_query = $mysql -> query( "SELECT a.*, t.* FROM attachments a LEFT JOIN attachments_types t ON a.attachment_type = t.attachments_type_id WHERE a.attachment_id = '$attachment' AND a.attachment_post > '0'");
Line 86: $attach_forum_query = $mysql -> query( "SELECT f.forum_id FROM posts p LEFT JOIN topics t ON p.post_topic = t.topic_id LEFT JOIN forums f ON t.topic_forum_id = f.forum_id WHERE p.post_id = '".$attach_result['attachment_post']."'");
Line 102
: header('Content-type: '.$attach_result['attachments_type_mime']); Line 106
: if ( $_GET['thumb'] && in_array( $attach_result['attachments_type_mime'], $proper_mimes)){ Line 112: $thumb_file = str_ireplace( '.', '_thumb.', $attach_result['attachment_file']);
Line 117: //header('Content-Disposition: attachment; filename="'.$attach_result['attachment_name'].'"');
Line 117: //header('Content-Disposition: attachment; filename="'.$attach_result['attachment_name'].'"');
Line 123: //header("Content-length: ".filesize( ROOT_PATH.'uploads/'.$attach_result['attachment_file']));
Line 124: //header('Content-Disposition: attachment; filename="'.$attach_result['attachment_name'].'"');
Line 124: //header('Content-Disposition: attachment; filename="'.$attach_result['attachment_name'].'"');
Line 126
: readfile(ROOT_PATH
.'uploads/'.$attach_result['attachment_file']); Line 136
: $mysql -> update( array( 'attachment_downloads' => $attach_result['attachment_downloads'] + 1), 'attachments', "`attachment_id` = '$attachment'"); Line 136
: $mysql -> update( array( 'attachment_downloads' => $attach_result['attachment_downloads'] + 1), 'attachments', "`attachment_id` = '$attachment'"); Line 136
: $mysql -> update( array( 'attachment_downloads' => $attach_result['attachment_downloads'] + 1), 'attachments', "`attachment_id` = '$attachment'"); Line 136
: $mysql -> update( array( 'attachment_downloads' => $attach_result['attachment_downloads'] + 1), 'attachments', "`attachment_id` = '$attachment'"); Line 136
: $mysql -> update( array( 'attachment_downloads' => $attach_result['attachment_downloads'] + 1), 'attachments', "`attachment_id` = '$attachment'"); Line 138: $cache -> flushCache( 'attachments_'.$attach_result['attachment_post']);
Line 138: $cache -> flushCache( 'attachments_'.$attach_result['attachment_post']);
Line 142
: header("Content-length: ".filesize( ROOT_PATH
.'uploads/'.$attach_result['attachment_file'])); Line 144
: if ( !in_array( $attach_result['attachments_type_mime'], $proper_mimes)) Line 145
: header('Content-Disposition: attachment; filename="'.$attach_result['attachment_name'].'"'); Line 145
: header('Content-Disposition: attachment; filename="'.$attach_result['attachment_name'].'"'); Line 147
: readfile(ROOT_PATH
.'uploads/'.$attach_result['attachment_file']); Line 154: * no acess to attachment
Line 159: $main_error -> message = $language -> getString( 'post_attachments_notfound');
Line 168: $main_error -> message = $language -> getString( 'post_attachments_notfound');
Line 177: $main_error -> message = $language -> getString( 'post_attachments_notfound');