forked from mxrnx/fikaba
-
Notifications
You must be signed in to change notification settings - Fork 1
/
boardslist.php
43 lines (25 loc) · 1.23 KB
/
boardslist.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
function boardslist($option){
$url = 'https://planches.4feuilles.org';
$short = array('/gen/','/ani/','/tec/','/jeu/');
$long = array('Générale','Anime','Technologie','Jeux vidéo');
if ($option == 1) {
foreach (array_combine($short, $long) as $short => $long) {
$list[] = '<a href="'.$url.'' . $short . '" target="_top">['.$short.' - '. $long .']</a>';
}
} elseif ($option == 2){
foreach (array_combine($short, $long) as $short => $long) {
$list[] = '<li><a href="'.$url.'' . $short . '" target="_top"><button class="button-mobile" >'.$short.' - '. $long .'</button></a></li>';
}
} elseif ($option == 3){
foreach (array_combine($short, $long) as $short => $long) {
$list[] = '<a class="item" href="'.$url.'' . $short . '" target="_top">'.$short.'</a> ';
}
} elseif ($option == 4){
foreach (array_combine($short, $long) as $short => $long) {
$list[] = '<a href="'.$url.'' . $short . 'index.php?mode=admin" target="_top">['.$short.']</a>';
}
}
$result = implode($list);
return $result;
}