-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsave.php
More file actions
21 lines (19 loc) · 759 Bytes
/
save.php
File metadata and controls
21 lines (19 loc) · 759 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
$filename = $_POST['filename'];
if($filename=="") $filename = "awkwords-settings.awkw";
Header('Content-Type: application/octet-stream');
Header('Content-Disposition: attachment; filename="'.$filename.'"');
echo "#awkwords version 1.2\n"; // [awkwords-version]
$sp_names = $_POST['sp_names'];
$sp_contents = $_POST['sp_contents'];
for($n=0; $n<=25; $n++) { // subpatterns
// save every row that has anything filled
if($sp_names[$n]!="" || $sp_contents[$n]!="") {
echo $sp_names[$n].":".$sp_contents[$n]."\n";
}
}
echo "r:".$_POST['pattern']."\n"; // pattern
echo "n:".$_POST['numw']."\n"; // number of words to generate
if($_POST['nle']) echo "nle\n"; // new line each
if($_POST['filterdup']) echo "filterdup\n"; // filter duplicates
?>