forked from broncowdd/BoZoN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
53 lines (49 loc) · 1.52 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
/**
* BoZoN user part:
* simply handles the get link.
* @author: Bronco ([email protected])
**/
include('core.php');
if (!empty($_GET['f'])){
$f=id2file($_GET['f']);
if (is_file($f)){
$type=mime_content_type($f);
$ext=strtolower(pathinfo($f,PATHINFO_EXTENSION));
if (is_in($ext,'FILES_TO_ECHO')!==false){
echo '<pre>'.htmlspecialchars(file_get_contents($f)).'</pre>';
}
else if (is_in($ext,'FILES_TO_RETURN')!==false){
header('Content-type: '.$type);
readfile($f);
}
else{
header('Content-type: '.$type);
// lance le téléchargement des fichiers non affichables
header('Content-Disposition: attachment; filename="'.$f.'"');
readfile($f);
}
exit();
}
}
?>
<head>
<title>BoZoN: <?php e('Drag, drop, share.');?></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta charset="utf-8" />
<link rel="shortcut icon" type="/image/png" href="img/bozonlogo2.png">
<style>
*{-webkit-box-sizing: border-box;-moz-box-sizing: border-box;box-sizing: border-box;}
body{background:url(img/noise.png) #aaa;}
.logo{
color:rgba(0,0,0,0.2);width:100%;height:100%;min-height:100%;
text-align:center;background:url(img/bozonlogo2.png) no-repeat center center;
vertical-align: bottom;
text-align:center;
font-family: Consolas, monaco, monospace;
}
</style>
</head>
<body>
<div class="logo">BoZoN: <?php e('Drag, drop, share.');?> - www.warriordudimanche.net</div>
</body>