-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditfile.php
More file actions
47 lines (41 loc) · 1.07 KB
/
editfile.php
File metadata and controls
47 lines (41 loc) · 1.07 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
<?php
include 'filemenu.php';
//lista de files
$dir="../phpfiles/";
//raiz
$files=glob($dir."*.txt");
//nome do file
$filestxt=glob("*.txt");
$filesxlsx=glob("*.xlsx");
$filesxls=glob("*.xls");
$filesxml=glob("*.xml");
?>
<div class="container">
<div class="row" style="text-align:center;margin-top:3%">
<div class="col-2">
</div>
<div class="col-8">
<form method="post">
<select name="files" id="framework" class="form-control">
<?php
foreach($filestxt as $allfiles){
echo "<option value=".$allfiles.">".$allfiles."</option>";
}
foreach($filesxlsx as $allfiles){
echo "<option value=".$allfiles.">".$allfiles."</option>";
}
foreach($filesxls as $allfiles){
echo "<option value=".$allfiles.">".$allfiles."</option>";
}
foreach($filesxml as $allfiles){
echo "<option value=".$allfiles.">".$allfiles."</option>";
}
echo '</select></td><td><input type="submit" name="open" value="Abrir File" class="btn btn-primary w-100 mt-3"></form></td></tr>';
if(isset($_POST["open"])){
$nam=$_POST["files"];
header('Location:saveeditfile.php?nam='.$nam);
}
?>
</div>
</div>
</div>