Commit 923da642 authored by Romain Loth's avatar Romain Loth

arf a few more mods for new DB format

parent 4a4a09b4
......@@ -62,6 +62,10 @@ $login = $_GET['query'];
// $base = new PDO("sqlite:" . $dbname);
$base = new PDO($dsn, $user, $pass, $opt);
// liste des chercheurs
$scholar_array = array();
if ($login) {
if (sizeof($login) > 0) {
// nom du chercheur $target_name
......@@ -72,8 +76,6 @@ if ($login) {
$target_name=$row['first_name'].' '.$row['last_name'];
}
// liste des chercheurs
// old way in two steps without a scholars <=> keywords table
// $sql1 = "SELECT keywords,last_name,first_name FROM scholars WHERE luid='" . $login . "'";
// $sql2 = "SELECT uid FROM sch_kw JOIN keywords ON sch_kw.kwid = keywords.kwid WHERE kwstr LIKE \"%" . trim($keyword)."%\"";
......@@ -105,7 +107,7 @@ HERE_QUERY;
arsort($scholar_array);
$scholar_id_array=array_keys($scholar_array);
// echo var_dump($scholar_id_array)."<br/>" ;
var_dump($scholar_id_array)."<br/>" ;
// liste des chercheurs
$scholars = array();
......@@ -161,6 +163,7 @@ foreach ($base->query($sql) as $row) {
// right now duplicate treatment short-circuited like this
// (effect visible in stat-prep_from_array)
$info['affiliation'] = $row['org'] . $row['team_lab'];
$info['affiliation_id'] = $row['affiliation_id'];
// ----------------------------------------------------->8---------
// $info['lab2'] = $row['lab2'];
// $info['affiliation2'] = $row['affiliation2'];
......@@ -240,12 +243,11 @@ $header = '<div class="row" id="welcome">
<br/>
<br/>
<p>
This directory presents the profiles of <a href="#scholars">'. count($scholars).' scholars</a> and <a href="#labs">'. count($labs).' labs</a> in the field of Complex Systems';
Scholars have been selected from the complex systems directory when sharing common keywords with '.$target_name.'.
This directory presents the profiles of <a href="#scholars">'. count($scholars).' scholars</a> and <a href="#labs">'. count($labs).' labs</a> in the field of Complex Systems
<br/>
Scholars have been selected from the complex systems directory when sharing common keywords with '.$target_name.'
// TODO restore old version before duplicate lab/orga
// This directory presents the profiles of <a href="#scholars">'. count($scholars).' scholars</a>, <a href="#labs">'. count($labs).' labs</a> and <a href="#orga">'.$orga_count.' organizations</a> in the field of Complex Systems';
<!-- TODO restore old version before duplicate lab/orga with $orga_count -->
</p>
<h4>About the complex systems directory</h4>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment