
<?php
...
function getfilelist ($data_id, $cat) {
global $t;
$files = getall("SELECT filename, description, language FROM files WHERE data_id = '$data_id' AND category = '$cat' AND downloadable = 1 ORDER BY id");
$fmt = new NumberFormatter( Locale::getDefault(), NumberFormatter::DECIMAL );
foreach($files AS $id => $file) {
$template_description = parseTemplate( $file['description'] );
if ( $file['language'] ) {
$languages = explode( ",", $file['language']);
$fulllanguages = [];
foreach( $languages AS $language ) {
$fulllanguages[] = getLanguageName( $language );
}
$template_description .= " [" . implode( ", ", $fulllanguages) . "]";
}
$path = ALEXFILES . getcategorydir($cat) . '/' . $data_id . '/' . $file['filename'];
$files[$id]['path'] = $path;
$files[$id]['extension'] = strtolower(substr(strrchr($file['filename'], "."), 1)); // any reason not to use pathinfo() ?
$files[$id]['template_description'] = $template_description;
if (file_exists($path)) {
$files[$id]['filesize'] = filesize($path);
$files[$id]['filesizetext'] = $fmt->format(round( $files[$id]['filesize']/1024/1024, 1) );
}
}
return $files;
}
...
?>
SELECT
COUNT(*) AS antal,
t2.person_id AS link,
g.id AS gameid,
g.title,
COALESCE(alias.label, g.title) AS title_translation,
t2.title_id,
t1.person_id AS rlink,
t1.title_id AS rtitle_id
FROM person a1
INNER JOIN pgrel t1 ON t1.person_id = a1.id
INNER JOIN game g ON g.id = t1.game_id
INNER JOIN pgrel t2 ON t1.game_id = t2.game_id
INNER JOIN person a2 ON a2.id = t2.person_id
LEFT JOIN alias ON g.id = alias.game_id AND alias.language = @LANG AND alias.visible = 1
WHERE
t1.person_id IN (@inlist) AND
t2.person_id NOT IN (@notlist) AND
t1.title_id IN (1,4,5) AND t2.title_id IN (1,4,5)
GROUP BY
link
ORDER BY
a1.firstname,
a1.surname,
a2.firstname,
a2.surname,
t1.title_id,
t2.title_id,
title_translation
"You can not have a meaningful campaign if strict time records are not kept."









Gaming in general is a male thing. [..] Everybody who's tried to design a game to interest a large female audience has failed. And I think that has to do with the different thinking processes of men and women.