Commit ad4584d1 authored by Romain Loth's avatar Romain Loth

minor fixes for php api

parent c4b46d94
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
// default informations // default informations
$thedb = $graphdb; $thedb = $graphdb;
$gexf=$_GET["gexf"]; $gexf=$_GET["gexf"];
$max_item_displayed=6;
$type = $_GET["type"]; $type = $_GET["type"];
$TITLE="ISITITLE"; $TITLE="ISITITLE";
$query = str_replace( '__and__', '&', $_GET["query"] ); $query = str_replace( '__and__', '&', $_GET["query"] );
...@@ -97,9 +96,10 @@ $count=0; ...@@ -97,9 +96,10 @@ $count=0;
$all_terms_from_selected_projects=array();// list of terms for the top 6 project selected $all_terms_from_selected_projects=array();// list of terms for the top 6 project selected
$output = "";
// to filter under some conditions // to filter under some conditions
$to_display=true; $to_display=true;
$count=0;
foreach ($wos_ids as $id => $score) { foreach ($wos_ids as $id => $score) {
if ($total_count<$count_max) { if ($total_count<$count_max) {
// retrieve publication year // retrieve publication year
...@@ -112,7 +112,6 @@ foreach ($wos_ids as $id => $score) { ...@@ -112,7 +112,6 @@ foreach ($wos_ids as $id => $score) {
$sql = 'SELECT data FROM ISITITLE WHERE id='.$id.' group by data'; $sql = 'SELECT data FROM ISITITLE WHERE id='.$id.' group by data';
$output = "";
foreach ($base->query($sql) as $row) { foreach ($base->query($sql) as $row) {
$external_link="<a href=http://google.com/webhp?#q=".urlencode('"'.$row['data'].'"')." target=blank>".' <img width=15px src="libs/img2/google.png"></a>'; $external_link="<a href=http://google.com/webhp?#q=".urlencode('"'.$row['data'].'"')." target=blank>".' <img width=15px src="libs/img2/google.png"></a>';
$output.="<li title='".$score."'>"; $output.="<li title='".$score."'>";
...@@ -133,7 +132,7 @@ foreach ($wos_ids as $id => $score) { ...@@ -133,7 +132,7 @@ foreach ($wos_ids as $id => $score) {
} }
} else{ } else{
continue; break;
} }
} }
......
...@@ -11,6 +11,7 @@ $gexf_db["data/AXA/RiskV2PageRank2500.gexf"] = "data/AXA/data.db"; ...@@ -11,6 +11,7 @@ $gexf_db["data/AXA/RiskV2PageRank2500.gexf"] = "data/AXA/data.db";
$gexf_db["data/AXA/RiskV2PageRank5000.gexf"] = "data/AXA/data.db"; $gexf_db["data/AXA/RiskV2PageRank5000.gexf"] = "data/AXA/data.db";
$gexf_db["data/test/mini_for_csv.gexf"] = "data/test/mini_for_csv.csv"; $gexf_db["data/test/mini_for_csv.gexf"] = "data/test/mini_for_csv.csv";
$gexf_db["data/gargistex/shale_and_ice.gexf"] = "data/gargistex/shale_and_ice.csv"; $gexf_db["data/gargistex/shale_and_ice.gexf"] = "data/gargistex/shale_and_ice.csv";
$gexf_db["data/gargistex/model_calibration.gexf"] = "data/gargistex/model_calibration.csv";
// $gexf_db["data/ProgrammeDesCandidats.gexf"] = "foobar"; // $gexf_db["data/ProgrammeDesCandidats.gexf"] = "foobar";
...@@ -19,9 +20,15 @@ $gexf= str_replace('"','',$_GET["gexf"]); ...@@ -19,9 +20,15 @@ $gexf= str_replace('"','',$_GET["gexf"]);
$mainpath=dirname(getcwd())."/"; $mainpath=dirname(getcwd())."/";
$graphdb = $gexf_db[$gexf]; $graphdb = $gexf_db[$gexf];
// for csv parsing
$csvsep = "\t"; $csvsep = "\t";
$csvquote = '"'; $csvquote = '"';
// for csv caching (optional)
$memserver = 'localhost';
$memport = 11211;
// number of docs to display setting // number of docs to display setting
$max_item_displayed = 7; $max_item_displayed = 7;
......
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