blob: e7522320455c5f6d129312f3cf50fc45f3bad70e (
plain)
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
require('config.php');
global $dir;
global $title;
$title = 'Copy/Paste quotes from Org-Mode';
include('header.php');
$set = isset($_POST['org_data']) && isset($_POST['filename']);
if ($set) {
$filename = $dir.'/'.rawurlencode($_POST['filename']).'.org';
$fd = fopen($filename, 'w');
fwrite($fd, $_POST['word_data']);
fclose($fd);
echo 'uploaded';
} else {
?>
<form method="post" action="upload-msword.php">
Filename:
<input type="text" name="filename" />
Text:
<textarea name="org_data"></textarea>
</form>
<?php
}
include('footer.php');
|