Update website
This commit is contained in:
parent
4413528994
commit
1d90fbf296
6865 changed files with 1091082 additions and 0 deletions
29
index.php
Normal file
29
index.php
Normal file
|
@ -0,0 +1,29 @@
|
|||
<?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
|
||||
)
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue