gl-website-deployer/admin/list.php

19 lines
667 B
PHP
Raw Normal View History

2024-11-19 08:02:04 +01:00
<?php
require dirname(__FILE__).'/../common.php';
require dirname(__FILE__).'/../lib/auth.php';
$query_builder = $db_conn->createQueryBuilder();
$query = $query_builder->select('id,doi,journal,title,authors,arxiv,year,owned')->from('publications');
$stmt = $query->executeQuery();
$data = array();
$count = 0;
$all_data = $stmt->fetchAllAssociative();
foreach ($all_data as $row) {
$data[$count] = ["ads"=>$row['id'], "title"=>$row['title'], "authors"=>json_decode($row['authors']), "arxiv" => $row['arxiv'], "year" => $row['year'], "journal" => $row['journal'], "doi" => $row['doi'], "owned" => $row['owned']];
$count+=1;
}
return_ok(['result'=>$data]);