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
549fba2e
Commit
549fba2e
authored
Jun 24, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix localdb publications displays
parent
90b42c9f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
37 deletions
+86
-37
csv_div.php
LOCALDB/csv_div.php
+48
-0
default_div.php
LOCALDB/default_div.php
+4
-7
info_div.php
LOCALDB/info_div.php
+1
-30
parameters_details.php
LOCALDB/parameters_details.php
+3
-0
twjs.css
libs/css2/twjs.css
+30
-0
No files found.
LOCALDB/csv_div.php
0 → 100644
View file @
549fba2e
<?php
// manage the dynamical additional information in the left panel.
ini_set
(
'display_errors'
,
1
);
ini_set
(
'display_startup_errors'
,
1
);
error_reporting
(
-
1
);
// DISPLAY THE RESULTS
function
displayDoc
(
$docId
,
$score
,
$base
)
{
$output
=
""
;
// POSS score should have a data-score attribute
$output
=
"<li class='searchhit' title='"
.
$score
.
"'>"
;
$output
.=
"<p><b>"
.
$base
[
$docId
][
'title'
]
.
"</b> by <span class='author'>"
.
$base
[
$docId
][
'author'
]
.
"</span> ["
.
$base
[
$docId
][
'pubdate'
]
.
"], <i>"
.
$base
[
$docId
][
'journal'
]
.
"</i></p>"
;
$output
.=
"<p><b>keywords:</b> "
.
$base
[
$docId
][
'keywords'
]
.
"</p>"
;
$output
.=
"<p><span class='hit-text'>"
.
$base
[
$docId
][
'text'
]
.
"</span></p>"
;
$output
.=
"</li>"
;
return
$output
;
}
$htmlout
=
"<ul class=infoitems>
\n
"
;
$nb_displayed
=
0
;
foreach
(
$sims
as
$doc
=>
$freq
)
{
// doc limit
if
(
$nb_displayed
>
$max_item_displayed
)
{
break
;
}
$rowid
=
ltrim
(
$doc
,
'd'
);
$thisdoc
=
displayDoc
(
$rowid
,
$freq
,
$base
);
// echodump("doc", $thisdoc);
$htmlout
.=
$thisdoc
.
"
\n
"
;
// doc limit
$nb_displayed
++
;
}
$htmlout
.=
"</ul>
\n
"
;
echo
'<br/><h4><font color="#0000FF"> Full text of top '
.
$max_item_displayed
.
"/"
.
count
(
$sims
)
.
' related publications:</font></h4>'
.
$htmlout
;
?>
LOCALDB/default_div.php
View file @
549fba2e
...
...
@@ -112,6 +112,7 @@ foreach ($wos_ids as $id => $score) {
$sql
=
'SELECT data FROM ISITITLE WHERE id='
.
$id
.
' group by data'
;
$output
=
""
;
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>'
;
$output
.=
"<li title='"
.
$score
.
"'>"
;
...
...
@@ -135,11 +136,6 @@ foreach ($wos_ids as $id => $score) {
continue
;
}
}
if
(
$total_count
<
$count_max
){
$related
.=
$total_count
;
}
else
{
$related
.=
">"
.
$count_max
;
}
$output
.=
"</ul>"
;
#####
...
...
@@ -306,7 +302,8 @@ function imagestar($score,$factor,$twjs) {
}
return
$star_image
;
}
if
(
$max_item_displayed
>
$related
)
$max_item_displayed
=
$related
;
echo
$news
.
'<br/><h4><font color="#0000FF"> Full text of top '
.
$max_item_displayed
.
'/'
.
$related
.
' related publications:</font></h4>'
.
$output
;
if
(
$max_item_displayed
>
$total_count
)
$max_item_displayed
=
$total_count
;
// echo $news.'<br/><h4><font color="#0000FF"> Full text of top '.$max_item_displayed.'/'.$related.' related publications:</font></h4>'.$output;
echo
'<br/><h4><font color="#0000FF"> Full text of top '
.
$max_item_displayed
.
'/'
.
$total_count
.
' related publications:</font></h4>'
.
$output
;
//pt - 301 ; 15.30
?>
LOCALDB/info_div.php
View file @
549fba2e
...
...
@@ -12,8 +12,6 @@ $project_root = "../";
include
(
'parameters_details.php'
);
$max_item_displayed
=
6
;
if
(
$_GET
[
'dbtype'
]
==
"sql"
)
{
$base
=
new
PDO
(
"sqlite:"
.
$project_root
.
$graphdb
);
include
(
'default_div.php'
);
...
...
@@ -101,34 +99,7 @@ else {
arsort
(
$sims
);
// echodump("sims", $sims);
// DISPLAY THE RESULTS
function
displayDoc
(
$docId
,
$score
,
$base
)
{
$output
=
""
;
// POSS score should have a data-score attribute
$output
=
"<li title='"
.
$score
.
"'>"
;
$output
.=
"<p><b>"
.
$base
[
$docId
][
'title'
]
.
"</b></p>"
;
$output
.=
"<p>"
.
$base
[
$docId
][
'author'
]
.
" ["
.
$base
[
$docId
][
'pubdate'
]
.
"], <i>("
.
$base
[
$docId
][
'journal'
]
.
")</i></p>"
;
$output
.=
"<p>"
.
$base
[
$docId
][
'keywords'
]
.
"</p>"
;
$output
.=
"<p>"
.
$base
[
$docId
][
'text'
]
.
"</p>"
;
$output
.=
"</li>"
;
return
$output
;
}
$htmlout
=
"<ul>
\n
"
;
foreach
(
$sims
as
$doc
=>
$freq
)
{
$rowid
=
ltrim
(
$doc
,
'd'
);
$thisdoc
=
displayDoc
(
$rowid
,
$freq
,
$base
);
echodump
(
"doc"
,
$thisdoc
);
$htmlout
.=
$thisdoc
;
}
$htmlout
=
"</ul>
\n
"
;
echo
'<br/><h4><font color="#0000FF"> Full text of top '
.
count
(
$sims
)
.
' related publications:</font></h4>'
.
$htmlout
;
include
(
'csv_div.php'
);
}
}
...
...
LOCALDB/parameters_details.php
View file @
549fba2e
...
...
@@ -18,6 +18,9 @@ $gexf= str_replace('"','',$_GET["gexf"]);
$mainpath
=
dirname
(
getcwd
())
.
"/"
;
$graphdb
=
$gexf_db
[
$gexf
];
// number of docs to display setting
$max_item_displayed
=
7
;
// echodump("graphdb", $graphdb);
function
echodump
(
$title
,
$anyObj
)
{
...
...
libs/css2/twjs.css
View file @
549fba2e
...
...
@@ -172,6 +172,22 @@ html.waiting {
cursor
:
pointer
;
}
.author
{
font-variant
:
small-caps
;
}
.searchhit
{
font-family
:
"Roboto"
,
"Droid Sans"
,
sans-serif
;
border
:
1px
solid
#222
;
padding
:
7px
0
7px
12px
;
margin
:
10px
10px
0
0
;
}
.hit-text
{
color
:
#444
;
font-family
:
"Crete Round"
,
"garamond"
,
serif
;
padding
:
5px
;
}
#tab-container
{
margin
:
7px
;
...
...
@@ -258,6 +274,20 @@ p.micromessage{
color
:
'#222'
}
#information
.information-vcard
{
border
:
2px
solid
#555
;
padding
:
2em
1em
.3em
1em
;
background-color
:
#fff
;
border-radius
:
.3em
;
}
#information
.information-links
{
padding
:
7px
0
0
20px
;
}
ul
.infoitems
{
list-style
:
none
;
}
/* switch css -- generic (src: proto.io/freebies/onoff/)*/
.onoffswitch
{
...
...
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