switch($data->language) { case 'ja': ?>Platz [プラッツ] break; case 'de': ?>Platz break; default: #en ?>Platz } ?>
$path = '/platz/' . $data->category; $que = pg_query_params($db, 'SELECT * FROM categories WHERE path = $1 AND language = $2 AND suspended = FALSE', array($path, $data->language)); if($res = pg_fetch_object($que)) { $name = $res->name; $description = $res->description; } else { $que = pg_query_params($db, 'SELECT * FROM categories WHERE path = $1 AND language = $2 AND suspended = FALSE', array($path, 'en')); if($res = pg_fetch_object($que)) { $name = $res->name; $description = $res->description; } else { $que = pg_query_params($db, 'SELECT * FROM categories WHERE path = $1 AND suspended = FALSE', array($path)); if($res = pg_fetch_object($que)) { $name = $res->name; $description = $res->description; } else { $name = $data->category; $description = ''; } } } ?> $que = pg_query_params($db, 'SELECT count(*) AS total FROM platz WHERE category = $1', array($data->category)); if($res = pg_fetch_object($que)) $data->total = intval($res->total); $que = pg_query_params($db, 'SELECT * FROM platz WHERE category = $1 ORDER BY id DESC LIMIT $2 OFFSET $3', array($data->category, $data->number, $data->offset)); ?> switch($data->language) { case 'ja': ?> 件中 件目から 0 件目 break; case 'de': ?> zu 0 von break; default: #en ?> to 0 of } ?>
while($res = pg_fetch_object($que)) { ?>
#:
if($res->parent > 0) { ?> switch($data->language) { case 'ja': ?>返信先 break; case 'de': ?>Antwort zu break; default: #en ?>Answer to } ?># - } ?> - - switch($data->language) { case 'ja': ?>返信 break; case 'de': ?>Antwort break; default: #en ?>Reply } ?>
if($data->page > 1) { ?> switch($data->language) { case 'ja': ?>最初 break; case 'de': ?>Anfang break; default: #en ?>First } ?> } else { ?> switch($data->language) { case 'ja': ?>最初 break; case 'de': ?>Anfang break; default: #en ?>First } ?> } ?> - if($data->page > 1) { ?> switch($data->language) { case 'ja': ?>前 break; case 'de': ?>Vorder break; default: #en ?>Prev } ?> } else { ?> switch($data->language) { case 'ja': ?>前 break; case 'de': ?>Vorder break; default: #en ?>Prev } ?> } ?> - if($data->page > 2) { ?> switch($data->language) { case 'ja': ?>ページ break; case 'de': ?>Seite break; default: #en ?>Page } ?> -2 - } ?> if($data->page > 1) { ?> switch($data->language) { case 'ja': ?>ページ break; case 'de': ?>Seite break; default: #en ?>Page } ?> -1 - } ?> switch($data->language) { case 'ja': ?>ページ break; case 'de': ?>Seite break; default: #en ?>Page } ?> if($data->page < intval(($data->total + $data->number - 1) / $data->number)) { ?> - switch($data->language) { case 'ja': ?>ページ break; case 'de': ?>Seite break; default: #en ?>Page } ?> 1 } ?> if($data->page + 1 < intval(($data->total + $data->number - 1) / $data->number)) { ?> - switch($data->language) { case 'ja': ?>ページ break; case 'de': ?>Seite break; default: #en ?>Page } ?> 2 } ?> - if($data->page < intval(($data->total + $data->number - 1) / $data->number)) { ?> switch($data->language) { case 'ja': ?>次 break; case 'de': ?>Nächste break; default: #en ?>Next } ?> } else { ?> switch($data->language) { case 'ja': ?>次 break; case 'de': ?>Nächste break; default: #en ?>Next } ?> } ?> - if($data->page < intval(($data->total + $data->number - 1) / $data->number)) { ?>