-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhomepage.php
More file actions
65 lines (52 loc) · 1.2 KB
/
homepage.php
File metadata and controls
65 lines (52 loc) · 1.2 KB
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
<?php include 'filemenu.php';
//lista de files
$dir="../phpfiles/";
//raiz
$files=glob($dir."*.txt");
//Nome e Formato do Ficheiro
$filestxt=glob("*.txt");
$filexlsx=glob("*.xlsx");
$filexls=glob("*.xls");
$filexml=glob("*.xml");
$filejpg=glob("*.jpg");
$filepng=glob("*.png");
?>
<div class="container">
<div class="row" style="text-align:center;margin-top:3%">
<div class="col">
<div class="row">
<div class="col-3">
<form method="post">
<input type="text" name="search" placeholder="Search" class="form-control">
<input type="submit" name="searchbtn" value="Search" class="btn btn-primary w-100 mt-3">
</form>
</div>
</div>
<div class="row">
<?php
//Mostar todos os files dentro da pasta
foreach($filestxt as $allfiles){
echo " <div class='col-sm-3 mt-3'>
<div class='card'>
<div class='card-body'>
<h5 class='card-title'>".$allfiles."</h5>
<form method='post'>
</form>
</div>
</div>
</div>";
}
?>
</div>
<?php
$file="router1.txt";
if(isset($_POST["open"])){
header('Location:openfile.php?file='.$file);
}
if(isset($_POST["searchbtn"])){
$search=$_POST["search"];
}
?>
</div>
</div>
</div>