-
Notifications
You must be signed in to change notification settings - Fork 0
/
post.php
38 lines (28 loc) · 1.15 KB
/
post.php
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
<?php
$result = array();
//If the user is currently viewing all streams, then they cannot create a new post
if ($_POST['stream'] != 'all') {
exec('./a3 post.wpml '.$_POST['userID'], $result);
}
else {
exec('./a3 blockPost.wpml '.$_POST['userID'], $result);
}
//Display webpage
foreach($result as $text) {
//Remove whitespace if the first character in the string is empty
if ($text[0] == ' ') {
$text = substr($text, 1);
}
//Add any values that will need to be passed between webpages
if ($text == "</form>") {
echo "<input type=\"hidden\" name=\"userID\" value=\"".$_POST['userID']."\"/>\n";
echo "<input type=\"hidden\" name=\"stream\" value=\"".$_POST['stream']."\"/>\n";
echo "<input type=\"hidden\" name=\"postCount\" value=\"".$_POST['postCount']."\"/>\n";
echo "<input type=\"hidden\" name=\"maxCount\" value=\"".$_POST['maxCount']."\"/>\n";
echo "<input type=\"hidden\" name=\"toggleMode\" value=\"".$_POST['toggleMode']."\"/>\n";
echo "<input type=\"hidden\" name=\"timeStamp\" value=\"".$_POST['timeStamp']."\"/>\n";
echo "<input type=\"hidden\" name=\"mode2\" value=\"2\"/>\n";
}
echo $text."\n";
}
?>