Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
ng6
Commits
b1c4d8b3
Commit
b1c4d8b3
authored
Mar 10, 2014
by
Jerome Mariette
Browse files
cumulate with project evolution ok
parent
7b27790b
Changes
2
Hide whitespace changes
Inline
Side-by-side
ui/nG6/class.tx_nG6_eid.php
View file @
b1c4d8b3
...
...
@@ -685,7 +685,11 @@ class tx_nG6_eid {
$values
=
split
(
","
,
trim
(
t3lib_div
::
_GP
(
'values'
)));
$by
=
trim
(
t3lib_div
::
_GP
(
'by'
));
$role
=
trim
(
t3lib_div
::
_GP
(
'role'
));
print
json_encode
(
tx_nG6_db
::
select_projects_evolution
(
$values
,
$by
,
$role
));
$cumulate
=
false
;
if
(
trim
(
t3lib_div
::
_GP
(
'cumulate'
))
==
'1'
){
$cumulate
=
true
;
}
print
json_encode
(
tx_nG6_db
::
select_projects_evolution
(
$values
,
$by
,
$role
,
$cumulate
));
}
elseif
(
$type
==
'data_distribution'
){
$values
=
split
(
","
,
trim
(
t3lib_div
::
_GP
(
'values'
)));
$by
=
trim
(
t3lib_div
::
_GP
(
'by'
));
...
...
@@ -699,7 +703,24 @@ class tx_nG6_eid {
$octet
=
false
;
}
print
json_encode
(
tx_nG6_db
::
select_storage_distribution
(
$values
,
$by
,
$role
,
$get_analyzes
,
$octet
));
}
}
elseif
(
$type
==
'data_evolution'
){
$values
=
split
(
","
,
trim
(
t3lib_div
::
_GP
(
'values'
)));
$by
=
trim
(
t3lib_div
::
_GP
(
'by'
));
$role
=
trim
(
t3lib_div
::
_GP
(
'role'
));
$get_analyzes
=
false
;
if
(
trim
(
t3lib_div
::
_GP
(
'get_analyzes'
))
==
'1'
){
$get_analyzes
=
true
;
}
$octet
=
true
;
if
(
trim
(
t3lib_div
::
_GP
(
'octet'
))
==
'1'
){
$octet
=
false
;
}
$cumulate
=
false
;
if
(
trim
(
t3lib_div
::
_GP
(
'cumulate'
))
==
'1'
){
$cumulate
=
true
;
}
print
json_encode
(
tx_nG6_db
::
select_storage_evolution
(
$values
,
$by
,
$role
,
$get_analyzes
,
$octet
,
$cumulate
));
}
}
/**
...
...
ui/nG6/lib/class.tx_nG6_db.php
View file @
b1c4d8b3
...
...
@@ -245,7 +245,7 @@ class tx_nG6_db {
}
}
function
select_projects_evolution
(
$values
,
$by
,
$role
)
{
function
select_projects_evolution
(
$values
,
$by
,
$role
,
$cumulate
)
{
if
(
$by
==
"organism"
||
$by
==
"location"
)
{
$by
=
"tx_nG6_"
.
$by
;
}
...
...
@@ -274,7 +274,11 @@ class tx_nG6_db {
$results
=
array
();
$res
=
$GLOBALS
[
'TYPO3_DB'
]
->
exec_SELECT_queryArray
(
$queryParts
);
while
(
$res_row
=
$GLOBALS
[
'TYPO3_DB'
]
->
sql_fetch_assoc
(
$res
))
{
$results
[]
=
array
(
$res_row
[
"crdate"
],
$res_row
[
"nb"
]);
if
(
$cumulate
&&
count
(
$results
)
>
0
)
{
$results
[]
=
array
(
$res_row
[
"crdate"
],
$res_row
[
"nb"
]
+
$results
[
count
(
$results
)
-
1
][
1
]);
}
else
{
$results
[]
=
array
(
$res_row
[
"crdate"
],
$res_row
[
"nb"
]);
}
}
return
$results
;
...
...
@@ -389,6 +393,10 @@ class tx_nG6_db {
$final_results
[]
=
array
(
$group_key
,
$group_values
);
}
return
$final_results
;
}
function
select_storage_evolution
(
$values
,
$by
,
$role
,
$get_analyzes
,
$octet
,
$cumulate
)
{
}
/*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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