Revision 49958
Added by Tsampikos Livisianos about 7 years ago
modules/uoa-joomla/trunk/joomla-3.4/plugins/content/includestatsnumbers/includestatsnumbers.php | ||
---|---|---|
128 | 128 |
/*54*/$this->codes[] = "{include_number DTSRCDATAREPO}"; |
129 | 129 |
/*55*/$this->codes[] = "{include_number EGIPROJTOTAL }"; |
130 | 130 |
|
131 |
/*H2020*/ |
|
132 |
/*53*/$this->codes[] = "{include_number H2020PUBSTOTAL}"; |
|
133 |
/*53*/$this->codes[] = "{include_number H2020PROJPUBS}"; |
|
134 |
/*54*/$this->codes[] = "{include_number H2020PROJTOTAL}"; |
|
131 |
/*53*/$this->codes[] = "{include_number H2020PUBSTOTAL}"; |
|
132 |
/*53*/$this->codes[] = "{include_number H2020PROJPUBS}"; |
|
133 |
/*54*/$this->codes[] = "{include_number H2020PROJTOTAL}"; |
|
135 | 134 |
|
136 |
/*55*/$this->codes[] = "{include_number H2020OAPUBS}"; |
|
137 |
/*55*/$this->codes[] = "{include_number H2020RESPUBS}"; |
|
138 |
/*55*/$this->codes[] = "{include_number H2020EMBPUBS}"; |
|
135 |
/*55*/$this->codes[] = "{include_number H2020OAPUBS}";
|
|
136 |
/*55*/$this->codes[] = "{include_number H2020RESPUBS}";
|
|
137 |
/*55*/$this->codes[] = "{include_number H2020EMBPUBS}";
|
|
139 | 138 |
|
140 |
/*NWO*/ |
|
141 |
/*50*/$this->codes[] = "{include_number NWOPUBSTOTAL}"; |
|
142 |
/*51*/$this->codes[] = "{include_number NWOPROJPUBS}"; |
|
143 |
/*52*/$this->codes[] = "{include_number NWOPROJTOTAL}"; |
|
144 |
/*53*/$this->codes[] = "{include_number NWOOAPUBS}"; |
|
145 |
/*54*/$this->codes[] = "{include_number NWORESPUBS}"; |
|
146 |
/*55*/$this->codes[] = "{include_number NWOEMBPUBS}"; |
|
147 | 139 |
|
140 |
/*NWO*/ |
|
141 |
/*50*/$this->codes[] = "{include_number NWOPUBSTOTAL}"; |
|
142 |
/*51*/$this->codes[] = "{include_number NWOPROJPUBS}"; |
|
143 |
/*52*/$this->codes[] = "{include_number NWOPROJTOTAL}"; |
|
144 |
/*53*/$this->codes[] = "{include_number NWOOAPUBS}"; |
|
145 |
/*54*/$this->codes[] = "{include_number NWORESPUBS}"; |
|
146 |
/*55*/$this->codes[] = "{include_number NWOEMBPUBS}"; |
|
148 | 147 |
|
148 |
/*MESTD*/ |
|
149 |
/*50*/$this->codes[] = "{include_number MESTDPUBSTOTAL}"; |
|
150 |
/*51*/$this->codes[] = "{include_number MESTDPROJPUBS}"; |
|
151 |
/*52*/$this->codes[] = "{include_number MESTDPROJTOTAL}"; |
|
152 |
/*53*/$this->codes[] = "{include_number MESTDOAPUBS}"; |
|
153 |
/*54*/$this->codes[] = "{include_number MESTDRESPUBS}"; |
|
154 |
/*55*/$this->codes[] = "{include_number MESTDEMBPUBS}"; |
|
149 | 155 |
|
156 |
/*SFI*/ |
|
157 |
$this->codes[] = "{include_number SFIPUBSTOTAL}"; |
|
158 |
$this->codes[] = "{include_number SFIPROJPUBS}"; |
|
159 |
$this->codes[] = "{include_number SFIPROJTOTAL}"; |
|
160 |
$this->codes[] = "{include_number SFIOAPUBS}"; |
|
161 |
$this->codes[] = "{include_number SFIRESPUBS}"; |
|
162 |
$this->codes[] = "{include_number SFIEMBPUBS}"; |
|
163 |
|
|
164 |
|
|
165 |
/*MZOS*/ |
|
166 |
$this->codes[] = "{include_number MZOSPUBSTOTAL}"; |
|
167 |
$this->codes[] = "{include_number MZOSPROJPUBS}"; |
|
168 |
$this->codes[] = "{include_number MZOSPROJTOTAL}"; |
|
169 |
$this->codes[] = "{include_number MZOSOAPUBS}"; |
|
170 |
$this->codes[] = "{include_number MZOSRESPUBS}"; |
|
171 |
$this->codes[] = "{include_number MZOSEMBPUBS}"; |
|
172 |
|
|
173 |
/*TUBITAK*/ |
|
174 |
$this->codes[] = "{include_number TUBITAKPUBSTOTAL}"; |
|
175 |
$this->codes[] = "{include_number TUBITAKPROJPUBS}"; |
|
176 |
$this->codes[] = "{include_number TUBITAKPROJTOTAL}"; |
|
177 |
$this->codes[] = "{include_number TUBITAKOAPUBS}"; |
|
178 |
$this->codes[] = "{include_number TUBITAKRESPUBS}"; |
|
179 |
$this->codes[] = "{include_number TUBITAKEMBPUBS}"; |
|
180 |
|
|
181 |
/*RCUK*/ |
|
182 |
$this->codes[] = "{include_number RCUKPUBSTOTAL}"; |
|
183 |
$this->codes[] = "{include_number RCUKPROJPUBS}"; |
|
184 |
$this->codes[] = "{include_number RCUKPROJTOTAL}"; |
|
185 |
$this->codes[] = "{include_number RCUKOAPUBS}"; |
|
186 |
$this->codes[] = "{include_number RCUKRESPUBS}"; |
|
187 |
$this->codes[] = "{include_number RCUKEMBPUBS}"; |
|
188 |
|
|
189 |
/*SNSF*/ |
|
190 |
$this->codes[] = "{include_number SNSFPUBSTOTAL}"; |
|
191 |
$this->codes[] = "{include_number SNSFPROJPUBS}"; |
|
192 |
$this->codes[] = "{include_number SNSFPROJTOTAL}"; |
|
193 |
$this->codes[] = "{include_number SNSFOAPUBS}"; |
|
194 |
$this->codes[] = "{include_number SNSFRESPUBS}"; |
|
195 |
$this->codes[] = "{include_number SNSFEMBPUBS}"; |
|
196 |
|
|
197 |
/*FWF*/ |
|
198 |
$this->codes[] = "{include_number FWFPUBSTOTAL}"; |
|
199 |
$this->codes[] = "{include_number FWFPROJPUBS}"; |
|
200 |
$this->codes[] = "{include_number FWFPROJTOTAL}"; |
|
201 |
$this->codes[] = "{include_number FWFOAPUBS}"; |
|
202 |
$this->codes[] = "{include_number FWFRESPUBS}"; |
|
203 |
$this->codes[] = "{include_number FWFEMBPUBS}"; |
|
204 |
|
|
205 |
/*NSF*/ |
|
206 |
$this->codes[] = "{include_number NSFPUBSTOTAL}"; |
|
207 |
$this->codes[] = "{include_number NSFPROJPUBS}"; |
|
208 |
$this->codes[] = "{include_number NSFPROJTOTAL}"; |
|
209 |
$this->codes[] = "{include_number NSFOAPUBS}"; |
|
210 |
$this->codes[] = "{include_number NSFRESPUBS}"; |
|
211 |
$this->codes[] = "{include_number NSFEMBPUBS}"; |
|
212 |
|
|
213 |
/*NIH*/ |
|
214 |
$this->codes[] = "{include_number NIHPUBSTOTAL}"; |
|
215 |
$this->codes[] = "{include_number NIHPROJPUBS}"; |
|
216 |
$this->codes[] = "{include_number NIHPROJTOTAL}"; |
|
217 |
$this->codes[] = "{include_number NIHOAPUBS}"; |
|
218 |
$this->codes[] = "{include_number NIHRESPUBS}"; |
|
219 |
$this->codes[] = "{include_number NIHEMBPUBS}"; |
|
220 |
|
|
221 |
/*NHMRC*/ |
|
222 |
$this->codes[] = "{include_number NHMRCPUBSTOTAL}"; |
|
223 |
$this->codes[] = "{include_number NHMRCPROJPUBS}"; |
|
224 |
$this->codes[] = "{include_number NHMRCPROJTOTAL}"; |
|
225 |
$this->codes[] = "{include_number NHMRCOAPUBS}"; |
|
226 |
$this->codes[] = "{include_number NHMRCRESPUBS}"; |
|
227 |
$this->codes[] = "{include_number NHMRCEMBPUBS}"; |
|
228 |
|
|
229 |
/*CSF*/ |
|
230 |
$this->codes[] = "{include_number CSFPUBSTOTAL}"; |
|
231 |
$this->codes[] = "{include_number CSFPROJPUBS}"; |
|
232 |
$this->codes[] = "{include_number CSFPROJTOTAL}"; |
|
233 |
$this->codes[] = "{include_number CSFOAPUBS}"; |
|
234 |
$this->codes[] = "{include_number CSFRESPUBS}"; |
|
235 |
$this->codes[] = "{include_number CSFEMBPUBS}"; |
|
236 |
|
|
237 |
/*ARC*/ |
|
238 |
$this->codes[] = "{include_number ARCPUBSTOTAL}"; |
|
239 |
$this->codes[] = "{include_number ARCPROJPUBS}"; |
|
240 |
$this->codes[] = "{include_number ARCPROJTOTAL}"; |
|
241 |
$this->codes[] = "{include_number ARCOAPUBS}"; |
|
242 |
$this->codes[] = "{include_number ARCRESPUBS}"; |
|
243 |
$this->codes[] = "{include_number ARCEMBPUBS}"; |
|
244 |
|
|
245 |
|
|
246 |
|
|
150 | 247 |
|
151 | 248 |
|
249 |
|
|
250 |
|
|
251 |
|
|
252 |
|
|
253 |
|
|
152 | 254 |
|
153 | 255 |
|
154 | 256 |
} |
155 | 257 |
|
156 | 258 |
public function onContentPrepare( $context, &$article, &$params, $page = 0 ) { |
157 |
$regex_base = '\{(include_number)\s+(PUBS|OAPUBS|NOAPUBS|FPUBS|PROJ|DATASRC|DATASRC-PUBS|DATASRC-PUBREPS|DATASRC-PUBOAJ|DATASRC-PUBAGGR|FUNDERS|FP7PUBSTOTAL|FP7PROJPUBS|FP7PROJTOTAL|FP7OAPUBS|FP7RESPUBS|FP7EMBPUBS|SC39FP7PUBSTOTAL|SC39FP7PROJPUBS|SC39FP7PROJTOTAL|SC39FP7OAPUBS|ERCPUBSTOTAL|ERCPROJTOTAL|ERCPROJPUBS|ERCOAPUBS|ERCRESPUBS|ERCEMBPUBS|WTPUBSTOTAL|WTPROJPUBS|WTPROJTOTAL|WTOAPUBS|WTRESPUBS|WTEMBPUBS|DATASRC-WITHPUBS|ORG-WITHPUBS|DATA-TOTAL|FETPUBS|FETOAPUBS|FETRESPUBS|FETEMBPUBS|DATASETPUBS|DATASETPROJ|PUBSDATASETS|EGIPUBS|EGIVO|EGIPROJ|EGIOA|EGIEMB|EGIRESERCPUBSTOTAL|FCTPROJTOTAL|FCTPROJPUBS|FCTOAPUBS|FCTRESPUBS|FCTEMBPUBS|RES|DTSRCDATAREPO|EGIPROJTOTAL|H2020PUBSTOTAL|H2020PROJPUBS|H2020PROJTOTAL|H2020OAPUBS|H2020RESPUBS|H2020EMBPUBS|NWOPROJTOTAL|NWOPROJPUBS|NWOOAPUBS|NWORESPUBS|NWOEMBPUBS)\}'; |
|
259 |
$regex_base = '\{(include_number)\s+(PUBS|OAPUBS|NOAPUBS|FPUBS|PROJ|DATASRC|DATASRC-PUBS|DATASRC-PUBREPS|DATASRC-PUBOAJ|DATASRC-PUBAGGR|FUNDERS|FP7PUBSTOTAL|FP7PROJPUBS|FP7PROJTOTAL|FP7OAPUBS|FP7RESPUBS|FP7EMBPUBS|SC39FP7PUBSTOTAL|SC39FP7PROJPUBS|SC39FP7PROJTOTAL|SC39FP7OAPUBS|ERCPUBSTOTAL|ERCPROJTOTAL|ERCPROJPUBS|ERCOAPUBS|ERCRESPUBS|ERCEMBPUBS|WTPUBSTOTAL|WTPROJPUBS|WTPROJTOTAL|WTOAPUBS|WTRESPUBS|WTEMBPUBS|DATASRC-WITHPUBS|ORG-WITHPUBS|DATA-TOTAL|FETPUBS|FETOAPUBS|FETRESPUBS|FETEMBPUBS|DATASETPUBS|DATASETPROJ|PUBSDATASETS|EGIPUBS|EGIVO|EGIPROJ|EGIOA|EGIEMB|EGIRESERCPUBSTOTAL|FCTPROJTOTAL|FCTPROJPUBS|FCTOAPUBS|FCTRESPUBS|FCTEMBPUBS|RES|DTSRCDATAREPO|EGIPROJTOTAL|H2020PUBSTOTAL|H2020PROJPUBS|H2020PROJTOTAL|H2020OAPUBS|H2020RESPUBS|H2020EMBPUBS|NWOPROJTOTAL|NWOPROJPUBS|NWOOAPUBS|NWORESPUBS|NWOEMBPUBS|MESTDPUBSTOTAL|MESTDPROJPUBS|MESTDPROJTOTAL|MESTDOAPUBS|MESTDRESPUBS|MESTDEMBPUBS|SFIPUBSTOTAL|SFIPROJPUBS|SFIPROJTOTAL|SFIOAPUS|SFIRESPUBS|SFIEMBPUBS|MZOSPUBSTOTAL|MZOSPROJPUBS|MZOSOAPUBS|MZOSRESPUBS|MZOSEMBPUBS|TUBITAKPUBSTOTAL|TUBITAKPROJPUBS|TUBITAKOAPUBS|TUBITAKRESPUBS|TUBITAKEMBPUBS|RCUKPUBSTOTAL|RCUKPROJPUBS|RCUKOAPUBS|RCUKRESPUBS|RCUKEMBPUBS|SNSFPUBSTOTAL|SNSFPROJPUBS|SNSFOAPUBS|SNSFRESPUBS|SNSFEMBPUBS|FWFPUBSTOTAL|FWFPROJPUBS|FWFOAPUBS|FWFRESPUBS|FWFEMBPUBS|NSFPUBSTOTAL|NSFPROJPUBS|NSFOAPUBS|NSFRESPUBS|NSFEMBPUBS|NIHPUBSTOTAL|NIHPROJPUBS|NIHOAPUBS|NIHRESPUBS|NIHEMBPUBS|NHMRCPUBSTOTAL|NHMRCPROJPUBS|NHMRCOAPUBS|NHMRCRESPUBS|NHMRCEMBPUBS|CSFPUBSTOTAL|CSFPROJPUBS|CSFOAPUBS|CSFRESPUBS|CSFEMBPUBS|ARCPUBSTOTAL|ARCPROJPUBS|ARCOAPUBS|ARCRESPUBS|ARCEMBPUBS)\}';
|
|
158 | 260 |
$regex = "/$regex_base/"; |
159 | 261 |
|
160 | 262 |
|
... | ... | |
301 | 403 |
|
302 | 404 |
$egivo="select count(distinct c.name) as field0 from result_concepts rc join concept c on c.id=rc.concept join category cat on cat.id=c.category where cat.id='egi::virtual'"; |
303 | 405 |
|
304 |
$egiproj="select count(distinct c.name) as field0 from result_concepts rc join concept c on c.id=rc.concept join category cat on cat.id=c.category where cat.id='egi::projects' ";
|
|
406 |
$egiproj="select count(distinct pr.id) as field0 from result_concepts rc, project_results pr, project p where p.id=pr.id and pr.result=rc.id and rc.concept like 'egi%'";
|
|
305 | 407 |
|
306 | 408 |
$egipubs= " select count( distinct rc.id) as field0 from result r,result_concepts rc, concept con, category cat where rc.id=r.id and con.id=rc.concept and con.category= cat.id and cat.context ='egi'"; |
307 | 409 |
|
... | ... | |
335 | 437 |
$res = "select count (distinct id) from result"; |
336 | 438 |
$dtsrcdatarepo = "SELECT count(*) FROM datasource WHERE type = 'Data Repository'"; |
337 | 439 |
$egiprojtotal = "select count(distinct c.name) as field0 from concept c join category cat on cat.id=c.category where cat.id='egi::projects' "; |
440 |
|
|
338 | 441 |
|
339 |
|
|
340 |
//H2020 |
|
341 | 442 |
$h2020pubstotal = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id and type='publication' and result_projects.project = project.id and funding_lvl0 = 'H2020'"; |
342 | 443 |
$h2020projpubs = "SELECT count(distinct project.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id and type='publication' and result_projects.project = project.id and funding_lvl0='H2020'"; |
343 | 444 |
$h2020projtotal = "SELECT count(id) FROM project WHERE funding_lvl0 = 'H2020'"; |
... | ... | |
345 | 446 |
$h2020respubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funding_lvl0 = 'H2020' and bestlicense='Restricted' and type='publication'"; |
346 | 447 |
$h2020embpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funding_lvl0 = 'H2020' and bestlicense='Embargo' and type='publication'"; |
347 | 448 |
|
348 |
|
|
349 | 449 |
//NWO |
350 | 450 |
/*22: total number of NWO pubs*/ |
351 | 451 |
$qnwopubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder ='Netherlands Organisation for Scientific Research (NWO)' and result.result_projects = result_projects.id and result.type='publication'"; |
... | ... | |
363 | 463 |
/*27: NWO embargo pubs*/ |
364 | 464 |
$qnwoembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder = 'Netherlands Organisation for Scientific Research (NWO)' and bestlicense='Embargo' and type='publication'"; |
365 | 465 |
|
466 |
/*MESTD*/ |
|
467 |
$qmestdpubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder ='Ministry of Education, Science and Technological Development of Republic of Serbia' and result.result_projects = result_projects.id and result.type='publication'"; |
|
468 |
$qmestdprojpubs = "SELECT count(distinct project.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder ='Ministry of Education, Science and Technological Development of Republic of Serbia' and result.result_projects = result_projects.id and type='publication'"; |
|
469 |
$qmestdprojtotal = "SELECT count(id) FROM project WHERE funder = 'Ministry of Education, Science and Technological Development of Republic of Serbia'"; |
|
470 |
$qmestdoapubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects= result_projects.id AND result_projects.project = project.id and funder = 'Ministry of Education, Science and Technological Development of Republic of Serbia' and bestlicense='Open Access' and type='publication'"; |
|
471 |
$qmestdrespubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funder = 'Ministry of Education, Science and Technological Development of Republic of Serbia' and bestlicense='Restricted' and type='publication'"; |
|
472 |
$qmestdembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder = 'Ministry of Education, Science and Technological Development of Republic of Serbia' and bestlicense='Embargo' and type='publication'"; |
|
366 | 473 |
|
474 |
// SFI |
|
475 |
$qsfipubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Science Foundation Ireland' and result.result_projects = result_projects.id and result.type='publication'"; |
|
476 |
$qsfiprojpubs = "SELECT count(distinct project.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Science Foundation Ireland' and result.result_projects = result_projects.id and result.type='publication'"; |
|
477 |
$qsfiprojtotal = "SELECT count(id) FROM project WHERE funder ='Science Foundation Ireland'"; |
|
478 |
$qsfioapubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects= result_projects.id AND result_projects.project = project.id and funder ='Science Foundation Ireland' and bestlicense='Open Access' and result.type='publication'"; |
|
479 |
$qsfirespubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funder='Science Foundation Ireland' and bestlicense='Restricted' and result.type='publication'"; |
|
480 |
$qsfiembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder ='Science Foundation Ireland' and bestlicense='Embargo' and result.type='publication'"; |
|
367 | 481 |
|
482 |
// MZOS |
|
483 |
$qmzospubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Ministry of Science, Education and Sports of the Republic of Croatia (MSES)' and result.result_projects = result_projects.id and result.type='publication'"; |
|
484 |
$qmzosprojpubs = "SELECT count(distinct project.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Ministry of Science, Education and Sports of the Republic of Croatia (MSES)' and result.result_projects = result_projects.id and result.type='publication'"; |
|
485 |
$qmzosprojtotal = "SELECT count(id) FROM project WHERE funder ='Ministry of Science, Education and Sports of the Republic of Croatia (MSES)'"; |
|
486 |
$qmzosoapubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects= result_projects.id AND result_projects.project = project.id and funder ='Ministry of Science, Education and Sports of the Republic of Croatia (MSES)' and bestlicense='Open Access' and result.type='publication'"; |
|
487 |
$qmzosrespubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funder='Ministry of Science, Education and Sports of the Republic of Croatia (MSES)' and bestlicense='Restricted' and result.type='publication'"; |
|
488 |
$qmzosembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder ='Ministry of Science, Education and Sports of the Republic of Croatia (MSES)' and bestlicense='Embargo' and result.type='publication'"; |
|
368 | 489 |
|
490 |
// Tubitak |
|
491 |
$qtubitakpubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Türkiye Bilimsel ve Teknolojj |
|
492 |
ik Ara�~_tırma Kurumu' and result.result_projects = result_projects.id and result.type='publication'"; |
|
493 |
$qtubitakprojpubs = "SELECT count(distinct project.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Türkiye Bilimsel ve Teknolojii |
|
494 |
k Ara�~_tırma Kurumu' and result.result_projects = result_projects.id and result.type='publication'"; |
|
495 |
$qtubitakprojtotal = "SELECT count(id) FROM project WHERE funder ='Türkiye Bilimsel ve Teknolojik Ara�~_tırma Kurumu'"; |
|
496 |
$qtubitakoapubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects= result_projects.id AND result_projects.project = project.id and funder ='Türkiye Bilimsel ve Teknolojik Ara�~_tırma Kurumu' and bestlicense='Open Access' and result.type='publication'"; |
|
497 |
$qtubitakrespubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funder='Türkiye Bilimsel ve Teknolojik Ara�~_tırma Kurumu' and bestlicense='Restricted' and result.type='publication'"; |
|
498 |
$qtubitakembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder ='Türkiye Bilimsel ve Teknolojik Ara�~_tırma Kurumu' and bestlicense='Embargo' and result.type='publication'"; |
|
369 | 499 |
|
500 |
// RCUK |
|
501 |
$qrcukpubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Research Council UK' and result.result_projects = result_projects.id and result.type='publication'"; |
|
502 |
$qrcukprojpubs = "SELECT count(distinct project.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Research Council UK' and result.result_projects = result_projects.id and result.type='publication'"; |
|
503 |
$qrcukprojtotal = "SELECT count(id) FROM project WHERE funder ='Research Council UK'"; |
|
504 |
$qrcukoapubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects= result_projects.id AND result_projects.project = project.id and funder ='Research Council UK' and bestlicense='Open Access' and result.type='publication'"; |
|
505 |
$qrcukrespubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funder='Research Council UK' and bestlicense='Restricted' and result.type='publication'"; |
|
506 |
$qrcukembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder ='Research Council UK' and bestlicense='Embargo' and result.type='publication'"; |
|
370 | 507 |
|
508 |
// SNSF |
|
509 |
$qsnsfpubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Swiss National Science Foundation' and result.result_projects = result_projects.id and result.type='publication'"; |
|
510 |
$qsnsfprojpubs = "SELECT count(distinct project.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Swiss National Science Foundation' and result.result_projects = result_projects.id and result.type='publication'"; |
|
511 |
$qsnsfprojtotal = "SELECT count(id) FROM project WHERE funder ='Swiss National Science Foundation'"; |
|
512 |
$qsnsfoapubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects= result_projects.id AND result_projects.project = project.id and funder ='Swiss National Science Foundation' and bestlicense='Open Access' and result.type='publication'"; |
|
513 |
$qsnsfrespubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funder='Swiss National Science Foundation' and bestlicense='Restricted' and result.type='publication'"; |
|
514 |
$qsnsfembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder ='Swiss National Science Foundation' and bestlicense='Embargo' and result.type='publication'"; |
|
515 |
|
|
516 |
// FWF |
|
517 |
$qfwfpubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Austrian Science Fund (FWF)' and result.result_projects = result_projects.id and result.type='publication'"; |
|
518 |
$qfwfprojpubs = "SELECT count(distinct project.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Austrian Science Fund (FWF)' and result.result_projects = result_projects.id and result.type='publication'"; |
|
519 |
$qfwfprojtotal = "SELECT count(id) FROM project WHERE funder ='Austrian Science Fund (FWF)'"; |
|
520 |
$qfwfoapubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects= result_projects.id AND result_projects.project = project.id and funder ='Austrian Science Fund (FWF)' and bestlicense='Open Access' and result.type='publication'"; |
|
521 |
$qfwfrespubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funder='Austrian Science Fund (FWF)' and bestlicense='Restricted' and result.type='publication'"; |
|
522 |
$qfwfembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder ='Austrian Science Fund (FWF)' and bestlicense='Embargo' and result.type='publication'"; |
|
523 |
|
|
524 |
// NSF |
|
525 |
$qnsfpubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='National Science Foundation' and result.result_projects = result_projects.id and result.type='publication'"; |
|
526 |
$qnsfprojpubs = "SELECT count(distinct project.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='National Science Foundation' and result.result_projects = result_projects.id and result.type='publication'"; |
|
527 |
$qnsfprojtotal = "SELECT count(id) FROM project WHERE funder ='National Science Foundation'"; |
|
528 |
$qnsfoapubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects= result_projects.id AND result_projects.project = project.id and funder ='National Science Foundation' and bestlicense='Open Access' and result.type='publication'"; |
|
529 |
$qnsfrespubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funder='National Science Foundation' and bestlicense='Restricted' and result.type='publication'"; |
|
530 |
$qnsfembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder ='National Science Foundation' and bestlicense='Embargo' and result.type='publication'"; |
|
531 |
|
|
532 |
// NIH |
|
533 |
$qnihpubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='National Institutes of Health' and result.result_projects = result_projects.id and result.type='publication'"; |
|
534 |
$qnihprojpubs = "SELECT count(distinct project.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='National Institutes of Health' and result.result_projects = result_projects.id and result.type='publication'"; |
|
535 |
$qnihprojtotal = "SELECT count(id) FROM project WHERE funder ='National Institutes of Health'"; |
|
536 |
$qnihoapubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects= result_projects.id AND result_projects.project = project.id and funder ='National Institutes of Health' and bestlicense='Open Access' and result.type='publication'"; |
|
537 |
$qnihrespubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funder='National Institutes of Health' and bestlicense='Restricted' and result.type='publication'"; |
|
538 |
$qnihembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder ='National Institutes of Health' and bestlicense='Embargo' and result.type='publication'"; |
|
539 |
|
|
540 |
// NHMRC |
|
541 |
$qnhmrcpubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='National Health and Medical Research Council (NHMRC)' and result.result_projects = result_projects.id and result.type='publication'"; |
|
542 |
$qnhmrcprojpubs = "SELECT count(distinct project.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='National Health and Medical Research Council (NHMRC)' and result.result_projects = result_projects.id and result.type='publication'"; |
|
543 |
$qnhmrcprojtotal = "SELECT count(id) FROM project WHERE funder ='National Health and Medical Research Council (NHMRC)'"; |
|
544 |
$qnhmrcoapubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects= result_projects.id AND result_projects.project = project.id and funder ='National Health and Medical Research Council (NHMRC)' and bestlicense='Open Access' and result.type='publication'"; |
|
545 |
$qnhmrcrespubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funder='National Health and Medical Research Council (NHMRC)' and bestlicense='Restricted' and result.type='publication'"; |
|
546 |
$qnhmrcembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder ='National Health and Medical Research Council (NHMRC)' and bestlicense='Embargo' and result.type='publication'"; |
|
547 |
|
|
548 |
// CSF |
|
549 |
$qcsfpubstotal = "SELECT count( distinct result.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Croatian Science Foundation (CSF)' and result.result_projects = result_projects.id and result.type='publication'"; |
|
550 |
$qcsfprojpubs = "SELECT count(distinct project.id) FROM result, project, result_projects where result_projects.project = project.id and project.funder='Croatian Science Foundation (CSF)' and result.result_projects = result_projects.id and result.type='publication'"; |
|
551 |
$qcsfprojtotal = "SELECT count(id) FROM project WHERE funder ='Croatian Science Foundation (CSF)'"; |
|
552 |
$qcsfoapubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects= result_projects.id AND result_projects.project = project.id and funder ='Croatian Science Foundation (CSF)' and bestlicense='Open Access' and result.type='publication'"; |
|
553 |
$qcsfrespubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects = result_projects.id AND result_projects.project = project.id and funder='Croatian Science Foundation (CSF)' and bestlicense='Restricted' and result.type='publication'"; |
|
554 |
$qcsfembpubs = "SELECT count(distinct result_projects.id) FROM result, result_projects, project WHERE result.result_projects=result_projects.id AND result_projects.project = project.id and funder ='Croatian Science Foundation (CSF)' and bestlicense='Embargo' and result.type='publication'"; |
|
555 |
|
|
556 |
|
|
557 |
|
|
558 |
|
|
559 |
|
|
560 |
|
|
561 |
|
|
562 |
|
|
371 | 563 |
/*FCT*/ |
372 | 564 |
/*22*/$temp['fctpubstotal'] = $this->doQuery($qfctpubstotal); |
373 | 565 |
/*23*/$temp['fctprojpubs'] = $this->doQuery($qfctprojpubs); |
... | ... | |
447 | 639 |
|
448 | 640 |
|
449 | 641 |
|
450 |
/*47*/$temp['h2020pubstotal'] = $this->doQuery($h2020pubstotal);
|
|
451 |
/*48*/$temp['h2020projpubs'] = $this->doQuery($h2020projpubs);
|
|
452 |
/*49*/$temp['h2020projtotal'] = $this->doQuery($h2020projtotal);
|
|
453 |
/*50*/$temp['h2020oapubs'] = $this->doQuery($h2020oapubs);
|
|
454 |
/*50*/$temp['h2020respubs'] = $this->doQuery($h2020respubs);
|
|
455 |
/*51*/$temp['h2020embpubs'] = $this->doQuery($h2020embpubs);
|
|
642 |
/*47*/$temp['h2020pubstotal'] = $this->doQuery($h2020pubstotal); |
|
643 |
/*48*/$temp['h2020projpubs'] = $this->doQuery($h2020projpubs); |
|
644 |
/*49*/$temp['h2020projtotal'] = $this->doQuery($h2020projtotal); |
|
645 |
/*50*/$temp['h2020oapubs'] = $this->doQuery($h2020oapubs); |
|
646 |
/*50*/$temp['h2020respubs'] = $this->doQuery($h2020respubs); |
|
647 |
/*51*/$temp['h2020embpubs'] = $this->doQuery($h2020embpubs); |
|
456 | 648 |
|
457 |
//NWO |
|
458 |
/*22*/$temp['nwopubstotal'] = $this->doQuery($qnwopubstotal); |
|
459 |
/*23*/$temp['nwoprojpubs'] = $this->doQuery($qnwoprojpubs); |
|
460 |
/*24*/$temp['nwoprojtotal'] = $this->doQuery($qnwoprojtotal); |
|
461 |
/*25*/$temp['nwooapubs'] = $this->doQuery($qnwooapubs); |
|
462 |
/*26*/$temp['nworespubs'] = $this->doQuery($qnworespubs); |
|
463 |
/*27*/$temp['nwoembpubs'] = $this->doQuery($qnwoembpubs); |
|
464 | 649 |
|
650 |
//NWO |
|
651 |
/*22*/$temp['nwopubstotal'] = $this->doQuery($qnwopubstotal); |
|
652 |
/*23*/$temp['nwoprojpubs'] = $this->doQuery($qnwoprojpubs); |
|
653 |
/*24*/$temp['nwoprojtotal'] = $this->doQuery($qnwoprojtotal); |
|
654 |
/*25*/$temp['nwooapubs'] = $this->doQuery($qnwooapubs); |
|
655 |
/*26*/$temp['nworespubs'] = $this->doQuery($qnworespubs); |
|
656 |
/*27*/$temp['nwoembpubs'] = $this->doQuery($qnwoembpubs); |
|
465 | 657 |
|
658 |
/*MESTD*/ |
|
659 |
/*22*/$temp['mestdpubstotal'] = $this->doQuery($qmestdpubstotal); |
|
660 |
/*23*/$temp['mestdprojpubs'] = $this->doQuery($qmestdprojpubs); |
|
661 |
/*24*/$temp['mestdprojtotal'] = $this->doQuery($qmestdprojtotal); |
|
662 |
/*25*/$temp['mestdoapubs'] = $this->doQuery($qmestdoapubs); |
|
663 |
/*26*/$temp['mestdrespubs'] = $this->doQuery($qmestdrespubs); |
|
664 |
/*27*/$temp['mestdembpubs'] = $this->doQuery($qmestdembpubs); |
|
466 | 665 |
|
467 |
|
|
666 |
//SFI NUMS |
|
667 |
$this->storeQuery('sfipubstotal', $qsfipubstotal); |
|
668 |
$this->storeQuery('sfiprojpubs', $qsfiprojpubs); |
|
669 |
$this->storeQuery('sfiprojtotal', $qsfiprojtotal); |
|
670 |
$this->storeQuery('sfioapubs', $qsfioapubs); |
|
671 |
$this->storeQuery('sfirespubs', $qsfirespubs); |
|
672 |
$this->storeQuery('sfiembpubs', $qsfiembpubs); |
|
468 | 673 |
|
674 |
//MZOS NUMS |
|
675 |
$this->storeQuery('mzospubstotal', $qmzospubstotal); |
|
676 |
$this->storeQuery('mzosprojpubs', $qmzosprojpubs); |
|
677 |
$this->storeQuery('mzosprojtotal', $qmzosprojtotal); |
|
678 |
$this->storeQuery('mzosoapubs', $qmzosoapubs); |
|
679 |
$this->storeQuery('mzosrespubs', $qmzosrespubs); |
|
680 |
$this->storeQuery('mzosembpubs', $qmzosembpubs); |
|
469 | 681 |
|
682 |
//TUBITAK NUMS |
|
683 |
$this->storeQuery('tubitakpubstotal', $qtubitakpubstotal); |
|
684 |
$this->storeQuery('tubitakprojpubs', $qtubitakprojpubs); |
|
685 |
$this->storeQuery('tubitakprojtotal', $qtubitakprojtotal); |
|
686 |
$this->storeQuery('tubitakoapubs', $qtubitakoapubs); |
|
687 |
$this->storeQuery('tubitakrespubs', $qtubitakrespubs); |
|
688 |
$this->storeQuery('tubitakembpubs', $qtubitakembpubs); |
|
470 | 689 |
|
690 |
//RCUK NUMS |
|
691 |
$this->storeQuery('rcukpubstotal', $qrcukpubstotal); |
|
692 |
$this->storeQuery('rcukprojpubs', $qrcukprojpubs); |
|
693 |
$this->storeQuery('rcukprojtotal', $qrcukprojtotal); |
|
694 |
$this->storeQuery('rcukoapubs', $qrcukoapubs); |
|
695 |
$this->storeQuery('rcukrespubs', $qrcukrespubs); |
|
696 |
$this->storeQuery('rcukembpubs', $qrcukembpubs); |
|
697 |
|
|
698 |
//SNSF NUMS |
|
699 |
$this->storeQuery('snsfpubstotal', $qsnsfpubstotal); |
|
700 |
$this->storeQuery('snsfprojpubs', $qsnsfprojpubs); |
|
701 |
$this->storeQuery('snsfprojtotal', $qsnsfprojtotal); |
|
702 |
$this->storeQuery('snsfoapubs', $qsnsfoapubs); |
|
703 |
$this->storeQuery('snsfrespubs', $qsnsfrespubs); |
|
704 |
$this->storeQuery('snsfembpubs', $qsnsfembpubs); |
|
705 |
|
|
706 |
//FWF NUMS |
|
707 |
$this->storeQuery('fwfpubstotal', $qfwfpubstotal); |
|
708 |
$this->storeQuery('fwfprojpubs', $qfwfprojpubs); |
|
709 |
$this->storeQuery('fwfprojtotal', $qfwfprojtotal); |
|
710 |
$this->storeQuery('fwfoapubs', $qfwfoapubs); |
|
711 |
$this->storeQuery('fwfrespubs', $qfwfrespubs); |
|
712 |
$this->storeQuery('fwfembpubs', $qfwfembpubs); |
|
713 |
|
|
714 |
//NSF NUMS |
|
715 |
$this->storeQuery('nsfpubstotal', $qnsfpubstotal); |
|
716 |
$this->storeQuery('nsfprojpubs', $qnsfprojpubs); |
|
717 |
$this->storeQuery('nsfprojtotal', $qnsfprojtotal); |
|
718 |
$this->storeQuery('nsfoapubs', $qnsfoapubs); |
|
719 |
$this->storeQuery('nsfrespubs', $qnsfrespubs); |
|
720 |
$this->storeQuery('nsfembpubs', $qnsfembpubs); |
|
721 |
|
|
722 |
//NIH NUMS |
|
723 |
$this->storeQuery('nihpubstotal', $qnihpubstotal); |
|
724 |
$this->storeQuery('nihprojpubs', $qnihprojpubs); |
|
725 |
$this->storeQuery('nihprojtotal', $qnihprojtotal); |
|
726 |
$this->storeQuery('nihoapubs', $qnihoapubs); |
|
727 |
$this->storeQuery('nihrespubs', $qnihrespubs); |
|
728 |
$this->storeQuery('nihembpubs', $qnihembpubs); |
|
729 |
|
|
730 |
//NHMRC NUMS |
|
731 |
$this->storeQuery('nhmrcpubstotal', $qnhmrcpubstotal); |
|
732 |
$this->storeQuery('nhmrcprojpubs', $qnhmrcprojpubs); |
|
733 |
$this->storeQuery('nhmrcprojtotal', $qnhmrcprojtotal); |
|
734 |
$this->storeQuery('nhmrcoapubs', $qnhmrcoapubs); |
|
735 |
$this->storeQuery('nhmrcrespubs', $qnhmrcrespubs); |
|
736 |
$this->storeQuery('nhmrcembpubs', $qnhmrcembpubs); |
|
737 |
|
|
738 |
//CSF NUMS |
|
739 |
$this->storeQuery('csfpubstotal', $qcsfpubstotal); |
|
740 |
$this->storeQuery('csfprojpubs', $qcsfprojpubs); |
|
741 |
$this->storeQuery('csfprojtotal', $qcsfprojtotal); |
|
742 |
$this->storeQuery('csfoapubs', $qcsfoapubs); |
|
743 |
$this->storeQuery('csfrespubs', $qcsfrespubs); |
|
744 |
$this->storeQuery('csfembpubs', $qcsfembpubs); |
|
745 |
|
|
746 |
//ARC NUMS |
|
747 |
$this->storeQuery('arcpubstotal', $qarcpubstotal); |
|
748 |
$this->storeQuery('arcprojpubs', $qarcprojpubs); |
|
749 |
$this->storeQuery('arcprojtotal', $qarcprojtotal); |
|
750 |
$this->storeQuery('arcoapubs', $qarcoapubs); |
|
751 |
$this->storeQuery('arcrespubs', $qarcrespubs); |
|
752 |
$this->storeQuery('arcembpubs', $qarcembpubs); |
|
753 |
|
|
754 |
|
|
755 |
|
|
756 |
|
|
757 |
|
|
758 |
|
|
759 |
|
|
471 | 760 |
if($addflag){ |
472 | 761 |
JLog:: add("params to store: ".print_r($temp, TRUE), JLog :: ERROR, 'stats'); |
473 | 762 |
|
Also available in: Unified diff
add numbers for every funder