@@ -2,9 +2,12 @@ discard block |
||
| 2 | 2 | <form action="<?=WEBROOT?>controller/modules/comment/write_comment" method="post" class="row"> |
| 3 | 3 | <?php if (!isset($_SESSION['idlogin'.CLEF_SITE])):?> |
| 4 | 4 | <input type="text" name="pseudo" placeholder="Your pseudo"> |
| 5 | - <?php else: ?> |
|
| 5 | + <?php else { |
|
| 6 | + : ?> |
|
| 6 | 7 | <input type="hidden" name="pseudo" value="<?=$_SESSION['idlogin'.CLEF_SITE]?>"> |
| 7 | - <?php endif;?> |
|
| 8 | + <?php endif; |
|
| 9 | +} |
|
| 10 | +?> |
|
| 8 | 11 | <textarea name="comment" id="" cols="30" rows="10"></textarea> |
| 9 | 12 | <button>Send</button> |
| 10 | 13 | |
@@ -12,8 +15,11 @@ discard block |
||
| 12 | 15 | <input type="hidden" name="table" value="<?=$this->table?>"> |
| 13 | 16 | <input type="hidden" name="id_in_table" value="<?=$this->id_in_table?>"> |
| 14 | 17 | </form> |
| 15 | -<?php else: ?> |
|
| 18 | +<?php else { |
|
| 19 | + : ?> |
|
| 16 | 20 | <div class="row"> |
| 17 | 21 | <p>You must be connected to publish a comment</p> |
| 18 | 22 | </div> |
| 19 | -<?php endif;?> |
|
| 20 | 23 | \ No newline at end of file |
| 24 | +<?php endif; |
|
| 25 | +} |
|
| 26 | +?> |
|
| 21 | 27 | \ No newline at end of file |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | * @return array |
| 17 | 17 | * function to get values out of the class |
| 18 | 18 | */ |
| 19 | - public function getValues(){ |
|
| 19 | + public function getValues() { |
|
| 20 | 20 | return ["comment" => $this->values]; |
| 21 | 21 | } |
| 22 | 22 | |