@@ -9,9 +9,9 @@ discard block |
||
9 | 9 | $display_messages = $display_messages . "<div class='title' id='" . $message['id'] . "'><span class='name'>Anonymous</span> " . $message['date'] . " id. <a href='#" . $message['id'] . "'>" . $message['id'] . "</a></div><div class = 'message-inside'>"; |
10 | 10 | |
11 | 11 | if ($message['file'] != "") { |
12 | - if(substr($message['file'], -4) == "webm" || substr($message['file'], -3) == "mp4"){ |
|
12 | + if (substr($message['file'], -4) == "webm" || substr($message['file'], -3) == "mp4") { |
|
13 | 13 | $display_messages = $display_messages . '<div><video width="600" controls loop><source src="/images/' . $message['file'] . '" type="video/mp4"></video></div><br />'; |
14 | - }else{ |
|
14 | + }else { |
|
15 | 15 | $display_messages = $display_messages . "<div><a href='images/" . $message['file'] . "'><img src = 'images/" . $message['file'] . "' class='message-image'/></a></div>"; |
16 | 16 | } |
17 | 17 | } |
@@ -27,21 +27,21 @@ discard block |
||
27 | 27 | return $result; |
28 | 28 | } |
29 | 29 | |
30 | - function check_empty($msgs){ |
|
30 | + function check_empty($msgs) { |
|
31 | 31 | if (isset($msgs) && $msgs != "") { |
32 | 32 | $msg = $msgs; |
33 | - } else { |
|
33 | + }else { |
|
34 | 34 | $msg = "something's wrong, this nerve is either empty or our brain doesn't have access to this nerve's messages..."; |
35 | 35 | } |
36 | 36 | return $msg; |
37 | 37 | } |
38 | 38 | |
39 | - function build_result($msg, $last_msg, $action){ |
|
39 | + function build_result($msg, $last_msg, $action) { |
|
40 | 40 | if ($action == "messages") { |
41 | 41 | $result = $msg; |
42 | - } else if ($action == "last_msg") { |
|
42 | + }else if ($action == "last_msg") { |
|
43 | 43 | $result = $last_msg; |
44 | - } else { |
|
44 | + }else { |
|
45 | 45 | $result = "show_messages: parameters <b>must</b> be \$messages and either 'messages' or 'last_msg'"; |
46 | 46 | } |
47 | 47 |