@@ -13,10 +13,10 @@ discard block |
||
| 13 | 13 | $uploadOk = true; |
| 14 | 14 | $imageFileType = strtolower(pathinfo($target_file, PATHINFO_EXTENSION)); |
| 15 | 15 | $check = getimagesize($_FILES["file"]["tmp_name"]); |
| 16 | - if($imageFileType != "webm" && $imageFileType != "mp4"){ |
|
| 16 | + if ($imageFileType != "webm" && $imageFileType != "mp4") { |
|
| 17 | 17 | if ($check !== false) { |
| 18 | 18 | $uploadOk = true; |
| 19 | - } else { |
|
| 19 | + }else { |
|
| 20 | 20 | echo "what are you doing anon? that file was not an image or a webm..."; |
| 21 | 21 | $uploadOk = false; |
| 22 | 22 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | // Upload the file |
| 38 | 38 | if ($uploadOk == false) { |
| 39 | 39 | echo "Sorry, your file was not uploaded."; |
| 40 | - } else { |
|
| 40 | + }else { |
|
| 41 | 41 | move_uploaded_file($_FILES["file"]["tmp_name"], $target_file); |
| 42 | 42 | } |
| 43 | 43 | } |
@@ -60,19 +60,19 @@ discard block |
||
| 60 | 60 | array_push($messages["messages"], $new_message); |
| 61 | 61 | $jsondata = json_encode($messages, JSON_PRETTY_PRINT); |
| 62 | 62 | |
| 63 | - if(isset($_FILES['file']['name']) && $_FILES['file']['name'] != ""){ |
|
| 64 | - if($uploadOk){ |
|
| 63 | + if (isset($_FILES['file']['name']) && $_FILES['file']['name'] != "") { |
|
| 64 | + if ($uploadOk) { |
|
| 65 | 65 | file_put_contents($file, $jsondata); |
| 66 | 66 | } |
| 67 | 67 | }elseif (!(isset($_FILES['file']['name']) && $_FILES['file']['name'] != "")) { |
| 68 | 68 | file_put_contents($file, $jsondata); |
| 69 | 69 | } |
| 70 | - } else { |
|
| 70 | + }else { |
|
| 71 | 71 | echo "The message field is <b>required</b>."; |
| 72 | 72 | } |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | - function greenText($msg){ |
|
| 75 | + function greenText($msg) { |
|
| 76 | 76 | preg_match_all('/(?<!>)>(?!>).*/', $msg, $matches, PREG_SET_ORDER, 0); |
| 77 | 77 | |
| 78 | 78 | foreach ($matches as $m) { |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | if($uploadOk){ |
| 65 | 65 | file_put_contents($file, $jsondata); |
| 66 | 66 | } |
| 67 | - }elseif (!(isset($_FILES['file']['name']) && $_FILES['file']['name'] != "")) { |
|
| 67 | + } elseif (!(isset($_FILES['file']['name']) && $_FILES['file']['name'] != "")) { |
|
| 68 | 68 | file_put_contents($file, $jsondata); |
| 69 | 69 | } |
| 70 | 70 | } else { |