30 lines
756 B
PHP
30 lines
756 B
PHP
|
<?php
|
||
|
|
||
|
require dirname(__FILE__).'/common.php';
|
||
|
|
||
|
$m = setup_mustache();
|
||
|
|
||
|
$query_builder = $db_conn->createQueryBuilder();
|
||
|
|
||
|
$query = $query_builder->select('id,title,authors,arxiv,citation_count,doi')->from('publications')->where('owned=true');
|
||
|
$query = $query->orderBy('year', 'DESC')->setFirstResult(0)->setMaxResults(5);
|
||
|
|
||
|
$stmt = $query->executeQuery();
|
||
|
$all_data = $stmt->fetchAllAssociative();
|
||
|
$publi = [];
|
||
|
$count = 0;
|
||
|
foreach ($all_data as $row) {
|
||
|
$publi[$count] = array('title' => $row['title'], 'arxiv'=>$row['arxiv']);
|
||
|
$count += 1;
|
||
|
}
|
||
|
|
||
|
$tpl = $m->loadTemplate('public_index');
|
||
|
|
||
|
echo $tpl->render(
|
||
|
array(
|
||
|
'ROOT_URL' => $iap_root,
|
||
|
'title' => 'Guilhem Lavaux\'s home page',
|
||
|
'publications' => $publi
|
||
|
)
|
||
|
);
|