2) { $categories = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/categories"); array_push($categories, "unclassed"); foreach ($categories as $category) { if ($category != "." && $category != "..") { $shown = false; if ($category == "unclassed") { buffer("

" . $lang["gallery"]["unclassed"] . "

"); } else { buffer("

" . file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/categories/" . $category) . "

"); } buffer("
"); $photos = scandir($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures"); foreach ($photos as $photo) { if ($photo == "." || $photo == "..") {} else { $praw = file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/data/webcontent/galery/pictures/" . $photo); $pcat = explode("|", $praw)[1]; $ppath = explode("|", $praw)[0]; if ($pcat == $category) { $shown = true; if (file_exists($_SERVER['DOCUMENT_ROOT'] . $ppath)) { buffer("
"); buffer(""); if (isset(explode("|", $praw)[2])) { buffer("
" . explode("|", $praw)[2] . "
"); } buffer("
"); } else { buffer("
"); buffer('

' . $lang["gallery"]["error"] . '

'); buffer("
"); } } } } if (!$shown) { buffer("

" . $lang["gallery"]["nothing"] . "

"); } buffer("
"); } } } else { buffer("
" . $lang["gallery"]["disabled"][0] . "" . $lang["gallery"]["disabled"][1] . "" . $lang["gallery"]["disabled"][2] . "
"); } buffer(""); renderSpecial($buffer, $lang["gallery"]["title"]); ?>