@@ -33,7 +33,7 @@ |
||
33 | 33 | <th>Antal svar</th> |
34 | 34 | </tr> |
35 | 35 | <?php $id = 0; foreach ($questions as $row) : |
36 | - $id++;?> |
|
36 | + $id++; ?> |
|
37 | 37 | <tr> |
38 | 38 | <td><?= $id ?></td> |
39 | 39 | <!-- länk till frågan --> |
@@ -13,6 +13,6 @@ |
||
13 | 13 | <h1>Användare</h1> |
14 | 14 | <!-- länk till alla frågor som innehåller taggen --> |
15 | 15 | <?php $id = 0; foreach ($users as $row) : |
16 | - $id++;?> |
|
16 | + $id++; ?> |
|
17 | 17 | <p><a href="<?= url("user/viewProfile/{$row->acronym}"); ?>"><?= $row->acronym ?></a></p> |
18 | 18 | <?php endforeach; ?> |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | $imageSize2 = "?width=100&height=100&crop-to-fit&area=0,0,0,0"; |
14 | 14 | ?> |
15 | 15 | <h1>Profil (<?= $acronym ?>) |
16 | -<img src="<?= $baseURL ?>/image/profile/<?= $user[0]->picture ?><?= $imageSize ?>"></img> |
|
16 | +<img src="<?= $baseURL ?>/image/profile/<?= $user[ 0 ]->picture ?><?= $imageSize ?>"></img> |
|
17 | 17 | </h1> |
18 | 18 | |
19 | 19 | <!-- om baseURL-en innehåller picture, visa detta --> |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | <?php else : ?> |
45 | 45 | <h3>Presentation</h3> |
46 | 46 | <form method="post"> |
47 | - <textarea class="info-text" name="info" rows="4"><?= $user[0]->info ?></textarea> |
|
47 | + <textarea class="info-text" name="info" rows="4"><?= $user[ 0 ]->info ?></textarea> |
|
48 | 48 | <input type="submit" name="submit" value="Ändra"> |
49 | 49 | </form> |
50 | 50 | <?php endif ?> |
@@ -13,6 +13,6 @@ |
||
13 | 13 | <h2>Taggar</h2> |
14 | 14 | <!-- länk till alla frågor som innehåller taggen --> |
15 | 15 | <?php $id = 0; foreach ($res as $row) : |
16 | - $id++;?> |
|
16 | + $id++; ?> |
|
17 | 17 | <p><a href="<?= url("user/viewTagQuestions/{$row}"); ?>"><?= $row ?></a></p> |
18 | 18 | <?php endforeach; ?> |
@@ -11,33 +11,33 @@ |
||
11 | 11 | |
12 | 12 | ?> |
13 | 13 | <h1>Profil (<?= $acronym ?>) |
14 | -<img src="<?= $baseURL ?>/image/profile/<?= $user[0]->picture ?>?width=80&height=80&crop-to-fit&area=0,0,0,0"></img> |
|
14 | +<img src="<?= $baseURL ?>/image/profile/<?= $user[ 0 ]->picture ?>?width=80&height=80&crop-to-fit&area=0,0,0,0"></img> |
|
15 | 15 | </h1> |
16 | 16 | |
17 | 17 | <a href="profile-edit/<?= $acronym ?>/picture">Ändra profilbild</a> |
18 | 18 | |
19 | 19 | <h3>Presentation</h3> |
20 | 20 | <div class="user-presentation"> |
21 | - <?= $filter->parse($user[0]->info, ["markdown"])->text ?> |
|
21 | + <?= $filter->parse($user[ 0 ]->info, [ "markdown" ])->text ?> |
|
22 | 22 | <a href="profile-edit/<?= $acronym ?>/info">Ändra</a> |
23 | 23 | </div> |
24 | 24 | |
25 | 25 | <h3>Aktivitet</h3> |
26 | 26 | <div class="user-activity"> |
27 | - <p><b>Antal ställda frågor:</b> <?= sizeof($content ?? []) ?></p> |
|
27 | + <p><b>Antal ställda frågor:</b> <?= sizeof($content ?? [ ]) ?></p> |
|
28 | 28 | |
29 | 29 | <?php $id = 0; foreach ($content as $row) : |
30 | 30 | $id++; ?> |
31 | 31 | <p><a href="<?= url("user/viewQuestion/{$row->id}"); ?>"><?= $row->question ?></a></p> |
32 | 32 | <?php endforeach; ?> |
33 | 33 | |
34 | - <p><b>Antal skrivna svar:</b> <?= sizeof($answers ?? []) ?></p> |
|
34 | + <p><b>Antal skrivna svar:</b> <?= sizeof($answers ?? [ ]) ?></p> |
|
35 | 35 | <!-- <?php $id = 0; foreach ($answers as $row) : |
36 | 36 | $id++; ?> |
37 | 37 | <p><?= $row->answer ?></p> |
38 | 38 | <?php endforeach; ?> --> |
39 | 39 | |
40 | - <p><b>Kommentarer:</b> <?= sizeof($comments ?? []) ?></p> |
|
40 | + <p><b>Kommentarer:</b> <?= sizeof($comments ?? [ ]) ?></p> |
|
41 | 41 | |
42 | 42 | <?php $id = 0; foreach ($comments as $comment) : |
43 | 43 | $id++; ?> |
@@ -16,14 +16,14 @@ |
||
16 | 16 | <?= $table ?> |
17 | 17 | <?php elseif ($table == "Question") : ?> |
18 | 18 | <form method="post"> |
19 | - <textarea class="info-text" name="info" rows="4"><?= $post[0]->question ?></textarea> |
|
20 | - <input type="text" class="tags-text" name="tags" value ="<?= $post[0]->tags ?>"> |
|
19 | + <textarea class="info-text" name="info" rows="4"><?= $post[ 0 ]->question ?></textarea> |
|
20 | + <input type="text" class="tags-text" name="tags" value ="<?= $post[ 0 ]->tags ?>"> |
|
21 | 21 | <br><br><input type="submit" name="submit" value="Ändra"> |
22 | 22 | <input type="submit" name="delete" value="Ta bort"> |
23 | 23 | </form> |
24 | 24 | <?php else : ?> |
25 | 25 | <form method="post"> |
26 | - <textarea class="info-text" name="info" rows="4"><?= $post[0]->$rows ?></textarea> |
|
26 | + <textarea class="info-text" name="info" rows="4"><?= $post[ 0 ]->$rows ?></textarea> |
|
27 | 27 | <br><br><input type="submit" name="submit" value="Ändra"> |
28 | 28 | <input type="submit" name="delete" value="Ta bort"> |
29 | 29 | </form> |
@@ -13,6 +13,6 @@ |
||
13 | 13 | <h1>Taggar</h1> |
14 | 14 | <!-- länk till alla frågor som innehåller taggen --> |
15 | 15 | <?php $id = 0; foreach ($tags as $row) : |
16 | - $id++;?> |
|
16 | + $id++; ?> |
|
17 | 17 | <p><a href="<?= url("user/viewTagQuestions/{$row}"); ?>"><?= $row ?></a></p> |
18 | 18 | <?php endforeach; ?> |
@@ -24,7 +24,7 @@ |
||
24 | 24 | <th>Antal svar</th> |
25 | 25 | </tr> |
26 | 26 | <?php $id = 0; foreach ($res as $row) : |
27 | - $id++;?> |
|
27 | + $id++; ?> |
|
28 | 28 | <tr> |
29 | 29 | <td><?= $id ?></td> |
30 | 30 | <!-- länk till frågan --> |
@@ -12,19 +12,19 @@ discard block |
||
12 | 12 | // var_dump($content[0]->question); |
13 | 13 | ?> |
14 | 14 | <h1><?= $acronym ?> |
15 | - <img src="<?= $baseURL ?>/image/profile/<?= $user[0]->picture ?>?width=80&height=80&crop-to-fit&area=0,0,0,0"></img> |
|
15 | + <img src="<?= $baseURL ?>/image/profile/<?= $user[ 0 ]->picture ?>?width=80&height=80&crop-to-fit&area=0,0,0,0"></img> |
|
16 | 16 | </h1> |
17 | 17 | |
18 | 18 | <h3>Presentation</h3> |
19 | 19 | <div class="profile-presentation"> |
20 | - <?= $filter->parse($user[0]->info, ["markdown"])->text ?> |
|
20 | + <?= $filter->parse($user[ 0 ]->info, [ "markdown" ])->text ?> |
|
21 | 21 | </div> |
22 | 22 | |
23 | 23 | <h3>Aktivitet</h3> |
24 | 24 | <div class="profile-activity"> |
25 | - <p>Antal kommentarer: <?= sizeof($comments ?? []) ?></p> |
|
26 | - <p>Antal skrivna svar: <?= sizeof($answers ?? []) ?></p> |
|
27 | - <p>Antal ställda frågor: <?= sizeof($content ?? []) ?></p> |
|
25 | + <p>Antal kommentarer: <?= sizeof($comments ?? [ ]) ?></p> |
|
26 | + <p>Antal skrivna svar: <?= sizeof($answers ?? [ ]) ?></p> |
|
27 | + <p>Antal ställda frågor: <?= sizeof($content ?? [ ]) ?></p> |
|
28 | 28 | |
29 | 29 | <?php if ($content) : ?> |
30 | 30 | <table class="profile-questions-table"> |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | <th>Är besvarad?</th> |
35 | 35 | </tr> |
36 | 36 | <?php $id = 0; foreach ($content as $row) : |
37 | - $id++;?> |
|
37 | + $id++; ?> |
|
38 | 38 | <tr> |
39 | 39 | <td><?= $id ?></td> |
40 | 40 | <td class="question-row"> |