c10d2abc
rcavalie
ajout fichiers se...
|
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
|
<?php
session_start();
if($_SESSION['name']){
$file_name= $_GET['name'];
$file_read = fopen($file_name,'r') or die ("Unable to read file");
$contents = fread($file_read, filesize($file_name)+1);
fclose($file_read);
}
else header('Location: index.php');
?>
<html>
<form action="edit_file.php" method="post">
<center>
<br><br><textarea name="edit" cols="90" rows="20" style="color:#8AFB17; border style:solid; background-color:#0C090A; font-size:20; font-family:DejaVu Sans Mono"><?php echo $contents; ?></textarea><p>
<input type="hidden" name="file_name" value="<?php echo $file_name; ?>">
<input type="submit" value="Save">
</center>
</form>
<form action="workArea.php" >
<center>
<input type="submit" name="submit" value="Cancel">
</center>
</form>
</html>
|