-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopenPaste.php
58 lines (38 loc) · 1.38 KB
/
openPaste.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
<?php
session_start();
require_once('classes/class.php');
check_login('index.php',false);
$_GET['name']=htmlspecialchars($_GET['name'],ENT_QUOTES,"UTF-8");
$sql= $pdo->query("SELECT id_author FROM file WHERE file='".$_GET['name']."' ");
$results=$sql->fetch();
$name_author=$user->user_info($results['id_author'])[0];
?>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Wklejka użytkownika <?=$name_author?> </title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="img/logo.png" sizes="32x32"/>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-130672518-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-130672518-1');
</script>
</head>
<body>
<a href="chatroom.php"> Wróć </a>
<?php
if (file_exists("files/".$_GET['name']))
{
$dane = fread(fopen("files/".$_GET['name'], "r"), filesize("files/".$_GET['name']));
echo '<pre>'.nl2br(stripslashes($dane)).'</pre>';
}else{
header('Location: chatroom.php');
}
?>
</body>
</html>