Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
david Chavalarias
clinicaltrials
Commits
9e08ba53
Commit
9e08ba53
authored
Sep 18, 2014
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
geomap ok
parent
3bcc2454
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
3 deletions
+45
-3
extras_explorerjs.js
extras_explorerjs.js
+4
-3
mapael.php
geomap2/php/mapael.php
+41
-0
No files found.
extras_explorerjs.js
View file @
9e08ba53
...
...
@@ -4,8 +4,8 @@
function
callGeomap
(){
db
=
JSON
.
stringify
(
'php/community.db'
);
if
(
is_empty
(
selections
)){
jsonparams
=
JSON
.
stringify
(
Object
.
keys
(
getnodesIndex
()))
;
// pr( Object.keys(getnodesIndex()) )
// jsonparams='["all"]'
;
jsonparams
=
'["unique_id"]&unique_id='
+
getUrlParam
.
nodeidparam
;
}
else
{
N
=
0
;
...
...
@@ -26,7 +26,8 @@ function callGeomap(){
temp
=
getNeighs
(
selections
,
arr
);
sel_plus_neigh
=
Object
.
keys
(
temp
);
k
=
sel_plus_neigh
.
length
;
if
(
N
==
k
)
jsonparams
=
JSON
.
stringify
(
Object
.
keys
(
getnodesIndex
()));
// if(N==k) jsonparams='["all"]';
if
(
N
==
k
)
jsonparams
=
'["unique_id"]&unique_id='
+
getUrlParam
.
nodeidparam
;
else
jsonparams
=
JSON
.
stringify
(
sel_plus_neigh
);
//jsonparams=JSON.stringify(getSelections());
...
...
geomap2/php/mapael.php
View file @
9e08ba53
...
...
@@ -20,6 +20,10 @@ $query = str_replace( '__and__', '&', $_GET["query"] );
$query
=
str_replace
(
'D::'
,
''
,
$query
);
$elems
=
json_decode
(
$query
);
$unique_id
=
""
;
$scholar_array
=
array
();
$singularnick
=
"scholar"
;
$pluralnick
=
"scholars"
;
...
...
@@ -31,17 +35,52 @@ if(count($elems)==1){
$selectiveQuery
=
false
;
break
;
}
if
(
$e
==
"unique_id"
)
{
$unique_id
=
$_GET
[
"unique_id"
];
if
(
$unique_id
)
{
$sql
=
"SELECT keywords_ids FROM scholars where unique_id='"
.
$unique_id
.
"'"
;
#pt($sql);
foreach
(
$base
->
query
(
$sql
)
as
$row
)
{
$keywords_ids
=
split
(
','
,
$row
[
'keywords_ids'
]);
$scholar_array
=
array
();
foreach
(
$keywords_ids
as
$keywords_id
)
{
$sql2
=
"SELECT * FROM scholars2terms where term_id="
.
trim
(
$keywords_id
);
foreach
(
$base
->
query
(
$sql2
)
as
$row
)
{
$sql3
=
"SELECT id FROM scholars where term_id="
.
trim
(
$keywords_id
);
$scholar_array
[
$row
[
'scholar'
]]
=
1
;
}
}
}
$elems
=
null
;
$elems
=
array
();
foreach
(
$scholar_array
as
$key
=>
$value
){
array_push
(
$elems
,
utf8_decode
(
$key
));
}
}
break
;
}
}
}
$norm_country
=
array
();
if
(
$selectiveQuery
){
$countries_temp
=
array
();
foreach
(
$elems
as
$e
){
$sql
=
"SELECT "
.
$column
.
" FROM "
.
$table
.
" where id="
.
$e
;
if
(
$unique_id
!=
""
)
$sql
=
"SELECT "
.
$column
.
" FROM "
.
$table
.
" where unique_id=
\"
"
.
$e
.
"
\"
"
;
foreach
(
$base
->
query
(
$sql
)
as
$row
)
{
if
(
$countries_temp
[
$row
[
$column
]])
$countries_temp
[
$row
[
$column
]]
+=
1
;
else
$countries_temp
[
$row
[
$column
]]
=
1
;
}
...
...
@@ -139,9 +178,11 @@ if($selectiveQuery){
//pr($value["code"].": ".$value["realValue"].", ".$value["percentage"].", div:".($country_divisor[$key]+1));
}
}
else
{
// $column="data";
$sql
=
"select count(*),data from ISIkeyword GROUP BY data ORDER BY count(*) DESC"
;
$sql
=
"select count(*),"
.
$column
.
" from scholars GROUP BY country ORDER BY count(*) DESC"
;
////}
////$sql="select count(*),data from ISIC1Country GROUP BY data ORDER BY count(*) DESC";//ademe
//
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment