denbooru-php/config.php

38 lines
873 B
PHP

<?php
$tmsu = "tmsu -D /strg/drw/.tmsu/db ";
$BASE_ROUTE = "";
function escape_cmd($command){
return "'" . addcslashes(addcslashes($command, '(..)'),'-') . "'";
}
/* Exclude */
$exclude = "";
$exclude_query = "";
$alone_exclude_query = "";
if(!isset($_SESSION["login"])){
$exclude = array("nipples", "nude", "lewd", "dick");
$exclude_copy = $exclude;
$exclude_query = $exclude_query . " and ";
$alone_exclude_query = " not " . $exclude_copy[0];
unset($exclude_copy[0]);
foreach($exclude_copy as $ex_tag){
$alone_exclude_query = $alone_exclude_query . " and not " . $ex_tag;
}
$exclude_query = $exclude_query . $alone_exclude_query;
$alone_exclude_query = escape_cmd($alone_exclude_query);
}
$_IS_LOGGED = $_SESSION["login"] === "true";
$_IS_ADMIN = $_SESSION["username"] === "admin";
if(!is_array($_SESSION["msg"])){
$_SESSION["msg"] = array();
}
?>