2020-03-05 20:46:08 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
function remove_whitespace($target)
|
|
|
|
{
|
|
|
|
return str_replace(" ", "", $target);
|
|
|
|
}
|
|
|
|
|
2020-03-07 15:22:08 +00:00
|
|
|
function render($template, $param){
|
2020-03-05 20:46:08 +00:00
|
|
|
ob_start();
|
|
|
|
extract($param, EXTR_SKIP);
|
|
|
|
include($template);
|
|
|
|
$ret = ob_get_contents();
|
|
|
|
ob_end_clean();
|
|
|
|
return $ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
function setup_locale()
|
|
|
|
{
|
|
|
|
$locale = "de_DE.UTF-8";
|
|
|
|
|
|
|
|
if (isset($_SESSION["locale"]))
|
|
|
|
{
|
|
|
|
$locale = $_SESSION["locale"];
|
|
|
|
}
|
|
|
|
|
|
|
|
putenv("LC_ALL=$locale");
|
|
|
|
setlocale(LC_ALL, $locale);
|
|
|
|
|
|
|
|
$domain = "rhythm";
|
|
|
|
|
|
|
|
bindtextdomain($domain, "./locale");
|
|
|
|
bind_textdomain_codeset($domain, 'UTF-8');
|
|
|
|
|
|
|
|
textdomain($domain);
|
|
|
|
}
|
|
|
|
|
2020-03-07 15:22:08 +00:00
|
|
|
function modifier_is_rest($modifier)
|
|
|
|
{
|
|
|
|
return !($modifier & 0b0111);
|
|
|
|
}
|
|
|
|
|
2020-03-05 20:46:08 +00:00
|
|
|
?>
|