@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | if (!$_SESSION['logged_in'] && $password != "") { |
28 | 28 | require_once("functions/login.php"); |
29 | - }else if ($_SESSION['logged_in'] || $password == "") { |
|
29 | + } else if ($_SESSION['logged_in'] || $password == "") { |
|
30 | 30 | // display messages |
31 | 31 | require_once("functions/display_messages.php"); |
32 | 32 | $messages = get_messages($file); |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | -if($password != "" && isset($_POST['auth_submit'])){ |
|
3 | - if($password != $_POST['password']){ |
|
2 | +if ($password != "" && isset($_POST['auth_submit'])) { |
|
3 | + if ($password != $_POST['password']) { |
|
4 | 4 | ?> |
5 | 5 | <b>wrong password</b>, try again. |
6 | 6 | <?php |
7 | - } else{ |
|
7 | + }else { |
|
8 | 8 | $_SESSION['logged_in'] = true; |
9 | 9 | echo 'logged in!'; |
10 | 10 | header("refresh:0;"); |
@@ -15,15 +15,15 @@ |
||
15 | 15 | } |
16 | 16 | if (isset($display_messages) && $display_messages != "") { |
17 | 17 | $msg = $display_messages; |
18 | - } else { |
|
18 | + }else { |
|
19 | 19 | $msg = "something's wrong, this nerve is either empty or our brain doesn't have access to this nerve's messages..."; |
20 | 20 | } |
21 | 21 | |
22 | 22 | if ($action == "messages") { |
23 | 23 | $result = $msg; |
24 | - } else if ($action == "last_msg") { |
|
24 | + }else if ($action == "last_msg") { |
|
25 | 25 | $result = $last_msg; |
26 | - } else { |
|
26 | + }else { |
|
27 | 27 | $result = "show_messages: parameters <b>must</b> be either 'messages' or 'last_msg'"; |
28 | 28 | } |
29 | 29 |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | $check = getimagesize($_FILES["file"]["tmp_name"]); |
16 | 16 | if ($check !== false) { |
17 | 17 | $uploadOk = 1; |
18 | - } else { |
|
18 | + }else { |
|
19 | 19 | echo "what are you doing anon? that file was not an image or a webm..."; |
20 | 20 | $uploadOk = 0; |
21 | 21 | } |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | // Upload the file |
36 | 36 | if ($uploadOk == 0) { |
37 | 37 | echo "Sorry, your file was not uploaded."; |
38 | - } else { |
|
38 | + }else { |
|
39 | 39 | move_uploaded_file($_FILES["file"]["tmp_name"], $target_file); |
40 | 40 | } |
41 | 41 | } |
@@ -58,12 +58,12 @@ discard block |
||
58 | 58 | array_push($messages["messages"], $new_message); |
59 | 59 | $jsondata = json_encode($messages, JSON_PRETTY_PRINT); |
60 | 60 | file_put_contents($file, $jsondata); |
61 | - } else { |
|
61 | + }else { |
|
62 | 62 | echo "The message field is <b>required</b>."; |
63 | 63 | } |
64 | 64 | } |
65 | 65 | |
66 | - function greenText($msg){ |
|
66 | + function greenText($msg) { |
|
67 | 67 | preg_match_all('/(?<!>)>(?!>).*/', $msg, $matches, PREG_SET_ORDER, 0); |
68 | 68 | |
69 | 69 | foreach ($matches as $m) { |
@@ -74,12 +74,12 @@ discard block |
||
74 | 74 | return $msg; |
75 | 75 | } |
76 | 76 | |
77 | - function postLink($msg){ |
|
77 | + function postLink($msg) { |
|
78 | 78 | preg_match_all('/>>\d.\d*/', $msg, $matches, PREG_SET_ORDER, 0); |
79 | 79 | |
80 | 80 | foreach ($matches as $m) { |
81 | 81 | $m[0] = str_replace('\n', '', str_replace("\r", "", $m[0])); |
82 | - $msg = str_replace($m[0], '<a href="#' . str_replace(">>", "",$m[0]) . '" class="postLink" style="color:#55F;">' . $m[0] . '</a>', $msg); |
|
82 | + $msg = str_replace($m[0], '<a href="#' . str_replace(">>", "", $m[0]) . '" class="postLink" style="color:#55F;">' . $m[0] . '</a>', $msg); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | return $msg; |