-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcontent.php
81 lines (74 loc) · 1.63 KB
/
content.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!-- saved from url=(0041)http://bonjourjeanjacques.org/acte03.html -->
<html>
<head>
<title>Visualisation</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
h1 {
text-align:left;
font-family:arial;
font-size:12px;
color:red;
text-transform:uppercase;
}
@charset "UTF-8";
@font-face {
font-weight: normal;
font-style: normal;
}
body {
font-family:'Times New Roman';
font-size: 13px;
color: black;
background-color: #F5F5F5;
text-align: justify;
}
ul {
list-style-type: none;
}
.chapeau {
padding-top: 5%;
padding-left: 15%;
padding-right: 30%;
font-size:200%;
line-height:130%;
a:link { color : black; text-decoration: underline }
a:hover { color : black; text-decoration: underline }
a:visited { color : black; text-decoration: underline }
</style>
</head>
<body>
<?php
$type = $_GET["type"];
$url = $_GET["url"];
if (isset($type)) {
if ($type=="image") {
echo '<img src="'.$url.'" style="width:auto;margin-right:10%;margin-left:10%;max-height:80%;margin-top:5%;margin-bot:auto;">';
}
elseif ($type=="txt"){
$handle = fopen($url, 'ru');
if ($handle)
{
while (!feof($handle))
{
$buffer = fgets($handle);
echo '<p class="chapeau">'.$buffer.'</p>';
}
fclose($handle);
}
}
} else {
$handle = fopen('presentation.txt', 'ru');
if ($handle)
{
while (!feof($handle))
{
$buffer = fgets($handle);
echo '<p class="chapeau">'.$buffer.'</p>';
}
fclose($handle);
}
}
?>
</body>
</html>