<label for="settingsStatsHide"><?php echo _SET_STATS_HIDE; ?> </label> </td> </tr> </table> </div> <?php iefixEnd(); ?> <?php // ====================================================================================================== // FILTERS // ====================================================================================================== if (isUserMature()) { $hideFilters = array(); } else { // Hide mature filters from the underage user. $hideFilters = preg_split('/\\,/', $_config["matureFilters"], 64, PREG_SPLIT_NO_EMPTY); } $found = false; ob_start(); ?> <div class="sep largetext"><?php echo _FILTERS; ?> </div> <div class="container2 notsowide"> <div> <?php
$limit = 48; break; default: $limit = 12; } if ($_cmd[0] != "") { setcookie("yGalOrder", $_GET["order"], strtotime("+1 month"), "/", "." . $_config["galRoot"]); // give the user a fresh cookie setcookie("yGalLimit", $_GET["limit"], strtotime("+1 month"), "/", "." . $_config["galRoot"]); // give the user a fresh cookie } $offset = isset($_GET["offset"]) ? intval($_GET["offset"]) : 0; if ($offset < 0) { $offset = 0; } if (!isUserMature()) { $where = "({$where}) AND `objMature` = '0'"; } /* // allow moderators to view deleted submissions if($_auth["useid"] && ($_auth["useid"] == $_config["adminUser"] || $_auth["useIsSModerator"] || $_auth["useIsModerator"])) { // $where = str_replace("`objDeleted` = '0'", "`objExtension` <> ''", $where); $where = str_replace("`objDeleted` = '0'", "1", $where); $where = str_replace("`objPending` = '0'", "1", $where); } */ $selectCount = preg_replace('/SELECT(.*)FROM/', "SELECT COUNT(*) FROM", $select); $result = mysql_query("{$selectCount} WHERE {$where}") or trigger_error(_ERR_MYSQL); $totalCount = mysql_result($result, 0); $result = mysql_query("{$select} WHERE {$where} ORDER BY {$order} LIMIT {$offset}," . ($limit + 1)) or trigger_error(_ERR_MYSQL); $gallery = array();