mirror of
https://github.com/saintly2k/FoOlSlideX.git
synced 2025-02-20 11:13:13 +08:00
[TYP-200] Add munch_groups($a, $b, $c) function
This commit is contained in:
parent
384a2c7c7d
commit
a21ea379d7
@ -117,9 +117,9 @@ $latest_chapters = $conn->query("SELECT * FROM `chapters` ORDER BY `added` DESC"
|
||||
<thead>
|
||||
<th style="width:5%"><?= $lang["home"]["type"] ?></th>
|
||||
<th style="width:5%"><?= $lang["home"]["chapter"] ?></th>
|
||||
<th style="width:25%;"><?= $lang["home"]["chap_title"] ?></th>
|
||||
<th style="width:25%"><?= $lang["home"]["title"] ?></th>
|
||||
<th class="text-center" style="width:5%"><?= $lang["home"]["group"] ?></th>
|
||||
<th style="width:20%;"><?= $lang["home"]["chap_title"] ?></th>
|
||||
<th style="width:20%"><?= $lang["home"]["title"] ?></th>
|
||||
<th class="text-center" style="width:15%"><?= $lang["home"]["group"] ?></th>
|
||||
<th class="text-center" style="width:10%"><?= $lang["home"]["uploader"] ?></th>
|
||||
<th class="text-right" style="width:20%"><?= $lang["home"]["added"] ?></th> <!-- IF ON OTHER LANGUAGES THAN ENGLISH, HERE IS AN OVERFLOW ON THE "added" TAB, IDK WHY, IF ANYONE KNOWS HOW TO FIX, PLS DO ON GITHUB.com/saintly2k/FoOlSlideX -->
|
||||
</thead>
|
||||
|
@ -66,8 +66,29 @@ function bbconvert($text) {
|
||||
return preg_replace($find,$replace,$text);
|
||||
}
|
||||
|
||||
function munch_groups($a, $b, $c) {
|
||||
return "YOLO";
|
||||
function munch_groups($a, $b = "", $c = "", $html = true) {
|
||||
require("../../config.php");
|
||||
require("conn.php");
|
||||
require("user.php");
|
||||
|
||||
$output = "";
|
||||
|
||||
if($a=="0") {
|
||||
$output .= "No Group";
|
||||
} else {
|
||||
$a = $conn->query("SELECT * FROM `groups` WHERE `id`='$a' LIMIT 1")->fetch_assoc();
|
||||
$output .= "<a href='".$config["url"]."group/".$a["slug"]."'>".$a["name"]."</a>";
|
||||
}
|
||||
if(!empty($b)) {
|
||||
$b = $conn->query("SELECT * FROM `groups` WHERE `id`='$b' LIMIT 1")->fetch_assoc();
|
||||
$output .= ", <a href='".$config["url"]."group/".$b["slug"]."'>".$b["name"]."</a>";
|
||||
}
|
||||
if(!empty($c)) {
|
||||
$c = $conn->query("SELECT * FROM `groups` WHERE `id`='$c' LIMIT 1")->fetch_assoc();
|
||||
$output .= ", <a href='".$config["url"]."group/".$c["slug"]."'>".$c["name"]."</a>";
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user