Repository navigation
Expand file tree
/
Copy pathdb.inc.php
More file actions
44 lines (36 loc) · 1.7 KB
/
Copy pathdb.inc.php
File metadata and controls
44 lines (36 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
$conf = getConf(dirname(__DIR__)."/../conf/mongo.conf");
try {
$MuGVREConn = new MongoClient("mongodb://".$conf[0].":".$conf[1]."@".$conf[2].":27017");
}
catch (MongoConnectionException $e){
//die('Error Connecting Mongo DB: ' . $e->getMessage());
header('Location: '.$GLOBALS['URL'].'/errors/errordb.php?msg=Cannot connect to VRE MuG database');
}
catch (MongoException $e) {
die('Error: ' . $e->getMessage());
}
$GLOBALS['db'] = $MuGVREConn->$GLOBALS['dbname_VRE'];
$GLOBALS['usersCol'] = $GLOBALS['db']->users;
$GLOBALS['countriesCol']= $GLOBALS['db']->countries;
$GLOBALS['filesCol'] = $GLOBALS['db']->files;
$GLOBALS['filesMetaCol']= $GLOBALS['db']->filesMetadata;
$GLOBALS['checkMail'] = $GLOBALS['db']->checkMail;
$GLOBALS['toolsCol'] = $GLOBALS['db']->tools;
$GLOBALS['toolsDevCol'] = $GLOBALS['db']->tools_dev;
$GLOBALS['toolsDevMetaCol'] = $GLOBALS['db']->tools_dev_meta;
$GLOBALS['visualizersCol'] = $GLOBALS['db']->visualizers;
$GLOBALS['fileTypesCol']= $GLOBALS['db']->file_types;
$GLOBALS['dataTypesCol']= $GLOBALS['db']->data_types;
$GLOBALS['helpsCol'] = $GLOBALS['db']->helps;
$GLOBALS['sampleDataCol']= $GLOBALS['db']->sampleData;
$GLOBALS['projectsCol'] = $GLOBALS['db']->projects;
$GLOBALS['logExecutionsCol'] = $GLOBALS['db']->log_executions;
$GLOBALS['dbData'] = $MuGVREConn->$GLOBALS['dbname_Data'];
$GLOBALS['studiesCol'] = $GLOBALS['dbData']->studies;
$GLOBALS['repositoriesCol']= $GLOBALS['dbData']->repositories;
$GLOBALS['sdrfCol'] = $GLOBALS['dbData']->AEsdrfData;
$GLOBALS['dbPDB'] = $MuGVREConn->$GLOBALS['dbname_PDB'];
$GLOBALS['pdbCol'] = $GLOBALS['dbPDB']->PDB_Entry;
$GLOBALS['monomersCol'] = $GLOBALS['dbPDB']->PDB_Monomers;
?>