Example #1
0
 function information($paramOne = null)
 {
     $this->updateItem = FormElements::filterString($paramOne);
     $this->model->quantityCacheSearch();
     $this->model->breadCumbs();
     $this->model->footerFaq();
     $this->model->footerSystemUpdate();
     if ($this->updateItem != null) {
         $this->sqlDataArray = array('info_update_id' => $this->updateItem);
         $this->updateData = $this->model->getUpdate($this->sqlDataArray);
         if (FlashMessages::hasFlashMessage()) {
             $this->principalData['FlashMessage'] = FlashMessages::displayFlashMessage();
         } else {
             $this->principalData['updateData'] = $this->updateData[0];
             $this->principalData['updateItem'] = true;
         }
     } else {
         $this->updateData = $this->model->getUpdate();
         if (FlashMessages::hasFlashMessage()) {
             $this->principalData['FlashMessage'] = FlashMessages::displayFlashMessage();
         } else {
             $this->principalData['updateData'] = $this->updateData;
             $this->principalData['updateItem'] = false;
         }
     }
     View::setHeaderVars('title', 'Update Information');
     View::setHeaderVars('specificKeywords', '');
     View::setHeaderVars('description', '');
     View::setHeaderVars('cannonicalUrl', '');
     View::setHeaderVars('robots', 'noindex, nofollow');
     View::render('header');
     View::render('update/index', $this->principalData);
     View::render('footer');
 }
Example #2
0
 function archive($paramOne = 'pirna', $paramTwo = null, $paramThree = null)
 {
     $this->actualPage = FormElements::filterString($paramOne);
     $this->dataType = FormElements::filterString($paramTwo);
     $this->archiveExtension = FormElements::filterString($paramThree);
     $this->model->quantityCacheSearch();
     $this->model->BreadCumbs();
     $this->model->footerFaq();
     $this->model->footerSystemUpdate();
     $this->principalData['downloadPage'] = false;
     if (!empty($this->dataType) && !empty($this->archiveExtension)) {
         $this->principalData['downloadPage'] = true;
     }
     $this->principalData['activeDownloadPirna'] = '';
     $this->principalData['activeDownloadDataset'] = '';
     $this->principalData['activeDownloadAlignament'] = '';
     $this->principalData['activeDownloadCluster'] = '';
     if ($this->actualPage === 'pirna') {
         $this->model->generateLog('download pirna', 'download', '400');
         $this->principalData['activeDownloadPirna'] = 'class="active"';
         $this->temporaryTitle = 'piRNA';
         $this->principalData['sizeHsaFile'] = Files::getFileSize('downloads/pirna/hsa-pirna-list.txt');
         $this->principalData['downloadType'] = 'pirna/hsa-pirna-list';
         $this->cannonicalUrl = URL . 'download/archive/pirna';
     } elseif ($this->actualPage === 'dataset') {
         $this->model->generateLog('download dataset', 'download', '420');
         $this->principalData['activeDownloadDataset'] = 'class="active"';
         $this->temporaryTitle = 'Dataset';
         $this->principalData['sizeHsaFile'] = Files::getFileSize('downloads/dataset/hsa-dataset-list.txt');
         $this->principalData['downloadType'] = 'dataset/hsa-dataset-list';
         $this->cannonicalUrl = '';
     } elseif ($this->actualPage === 'alignament') {
         $this->model->generateLog('download alignament', 'download', '440');
         $this->principalData['activeDownloadAlignament'] = 'class="active"';
         $this->temporaryTitle = 'Alignament';
         $this->principalData['sizeHsaFile'] = Files::getFileSize('downloads/alignament/hsa-alignament-list.txt');
         $this->principalData['downloadType'] = 'alignament/hsa-alignament-list';
         $this->cannonicalUrl = '';
     } elseif ($this->actualPage === 'cluster') {
         $this->model->generateLog('download cluster', 'download', '430');
         $this->principalData['activeDownloadCluster'] = 'class="active"';
         $this->temporaryTitle = 'Cluster';
         $this->principalData['sizeHsaFile'] = Files::getFileSize('downloads/cluster/hsa-cluster-list.txt');
         $this->principalData['downloadType'] = 'cluster/hsa-cluster-list';
         $this->cannonicalUrl = '';
     }
     $this->principalData['downloadTitle'] = $this->temporaryTitle;
     View::setHeaderVars('title', 'Download ' . $this->temporaryTitle);
     View::setHeaderVars('specificKeywords', DEFAULT_KEYWORDS . ', piRNA download, dataset download, alignament download');
     View::setHeaderVars('description', 'Download piRNA sequences, alignaments or full datasets');
     View::setHeaderVars('cannonicalUrl', $this->cannonicalUrl);
     View::setHeaderVars('robots', 'index, follow');
     View::render('header');
     View::render('download/index', $this->principalData);
     View::render('footer');
 }
Example #3
0
 function informations($paramOne = 'pirna')
 {
     $this->actualPage = FormElements::filterString($paramOne);
     $this->model->quantityCacheSearch();
     $this->model->breadCumbs();
     $this->model->footerFaq();
     $this->model->footerSystemUpdate();
     $this->principalData['activeAboutPirna'] = '';
     $this->principalData['activeAboutDatabase'] = '';
     $this->principalData['activeAboutDataset'] = '';
     $this->principalData['activeAboutReference'] = '';
     $this->principalData['activeAboutStatistics'] = '';
     if ($this->actualPage === 'database') {
         $this->sqlDataArray = array('text_type' => 'database');
         $this->temporaryTitle = 'Database';
         $this->principalData['activeAboutDatabase'] = 'class="active"';
     } elseif ($this->actualPage === 'dataset') {
         $this->sqlDataArray = array('text_type' => 'dataset');
         $this->temporaryTitle = 'Dataset';
         $this->principalData['activeAboutDataset'] = 'class="active"';
     } elseif ($this->actualPage === 'reference') {
         $this->sqlDataArray = array('text_type' => 'reference');
         $this->temporaryTitle = 'Reference';
         $this->principalData['activeAboutReference'] = 'class="active"';
     } elseif ($this->actualPage === 'statistics') {
         $this->temporaryTitle = 'Statistics';
         $this->principalData['activeAboutStatistics'] = 'class="active"';
     } else {
         $this->sqlDataArray = array('text_type' => 'pirna');
         $this->temporaryTitle = 'piRNA';
         $this->principalData['activeAboutPirna'] = 'class="active"';
     }
     if ($this->actualPage === 'statistics') {
         $this->aboutData = $this->model->getAboutStatistics();
         $this->principalData['aboutDataTitle'] = $this->temporaryTitle;
         $this->principalData['aboutData'] = $this->aboutData;
     } else {
         $this->aboutData = $this->model->getAboutInformation($this->sqlDataArray);
         $this->principalData['aboutDataTitle'] = $this->temporaryTitle;
         $this->principalData['aboutData'] = $this->aboutData['text_content'];
     }
     View::setHeaderVars('title', 'About ' . $this->temporaryTitle);
     View::setHeaderVars('specificKeywords', DEFAULT_KEYWORDS . ' ,about pirna, about database, about dataset, about');
     View::setHeaderVars('description', 'Informations about piRNAs, origin, functions, database and datasets');
     View::setHeaderVars('cannonicalUrl', '');
     View::setHeaderVars('robots', 'noindex, nofollow');
     View::render('header');
     View::render('about/index', $this->principalData);
     View::render('footer');
 }
Example #4
0
 function index()
 {
     $this->model->quantityCacheSearch();
     $this->model->breadCumbs();
     $this->model->footerFaq();
     $this->model->footerSystemUpdate();
     View::setHeaderVars('title', 'Contact');
     View::setHeaderVars('specificKeywords', DEFAULT_KEYWORDS . ', contact, message');
     View::setHeaderVars('description', 'Contact informations page');
     View::setHeaderVars('cannonicalUrl', '');
     View::setHeaderVars('robots', 'noindex, nofollow');
     View::render('header');
     View::render('contact/index', $this->principalData);
     View::render('footer');
 }
Example #5
0
 function informations($paramOne = 'pirna')
 {
     $this->actualPage = FormElements::filterString($paramOne);
     $this->model->quantityCacheSearch();
     $this->model->BreadCumbs();
     $this->model->footerFaq();
     $this->model->footerSystemUpdate();
     $this->principalData['activeFaqPirna'] = '';
     $this->principalData['activeFaqDatabase'] = '';
     $this->principalData['activeFaqDataset'] = '';
     $this->principalData['activeFaqLogs'] = '';
     if ($this->actualPage === 'pirna') {
         $this->principalData['activeFaqPirna'] = 'class="active"';
         $this->sqlDataArray = array('faq_type' => '1');
         $this->temporaryTitle = 'piRNA';
         $this->cannonicalUrl = URL . 'faq/informations/pirna';
     } elseif ($this->actualPage === 'database') {
         $this->principalData['activeFaqDatabase'] = 'class="active"';
         $this->sqlDataArray = array('faq_type' => '2');
         $this->temporaryTitle = 'Database';
         $this->cannonicalUrl = '';
     } elseif ($this->actualPage === 'dataset') {
         $this->principalData['activeFaqDataset'] = 'class="active"';
         $this->sqlDataArray = array('faq_type' => '3');
         $this->temporaryTitle = 'Dataset';
         $this->cannonicalUrl = '';
     } elseif ($this->actualPage === 'logs') {
         $this->principalData['activeFaqLogs'] = 'class="active"';
         $this->sqlDataArray = array('faq_type' => '4');
         $this->temporaryTitle = 'Logs';
         $this->cannonicalUrl = '';
     }
     $this->faqData = $this->model->getFaqData($this->sqlDataArray);
     $this->principalData['faqTitle'] = $this->temporaryTitle;
     $this->principalData['faqData'] = $this->faqData;
     $this->principalData['faqType'] = $this->actualPage;
     View::setHeaderVars('title', 'FAQ/Help ' . $this->temporaryTitle);
     View::setHeaderVars('specificKeywords', DEFAULT_KEYWORDS . ', faq pirna, help pirna, faq, help');
     View::setHeaderVars('description', 'Questions and step-by-step about functions of database');
     View::setHeaderVars('cannonicalUrl', $this->cannonicalUrl);
     View::setHeaderVars('robots', 'index, follow');
     View::render('header');
     View::render('faq/index', $this->principalData);
     View::render('footer');
 }
Example #6
0
 function index()
 {
     $this->model->quantityCacheSearch();
     $this->model->BreadCumbs();
     $this->model->footerFaq();
     $this->model->footerSystemUpdate();
     $this->principalData['formToken'] = FormElements::formToken();
     $this->aboutPirnaData = $this->model->getAboutInformation();
     $this->principalData['systemArticle'] = $this->aboutPirnaData['articleData'][0];
     $this->cannonicalUrl = URL;
     View::setHeaderVars('title', 'Home');
     View::setHeaderVars('specificKeywords', DEFAULT_KEYWORDS . ', home');
     View::setHeaderVars('description', 'piRNA database home page');
     View::setHeaderVars('cannonicalUrl', $this->cannonicalUrl);
     View::setHeaderVars('robots', 'index, follow');
     View::render('header');
     View::render('index/index', $this->principalData);
     View::render('footer');
 }
Example #7
0
 function informations($paramOne = null)
 {
     $this->model->quantityCacheSearch();
     $this->model->BreadCumbs();
     $this->model->footerFaq();
     $this->model->footerSystemUpdate();
     $this->errorInformation = array();
     if ($paramOne === '400') {
         $this->model->generateLog('error 400: ' . $_SERVER['REQUEST_URI'], 'error', '500');
         $this->errorInformation['errorTitle'] = 'Erro 400';
         $this->errorInformation['errorMessage'] = "Request Error.";
     } elseif ($paramOne === '401') {
         $this->model->generateLog('error 401: ' . $_SERVER['REQUEST_URI'], 'error', '510');
         $this->errorInformation['errorTitle'] = 'Erro 401';
         $this->errorInformation['errorMessage'] = "Authorization Required.";
     } elseif ($paramOne === '403') {
         $this->model->generateLog('error 403: ' . $_SERVER['REQUEST_URI'], 'error', '520');
         $this->errorInformation['errorTitle'] = 'Erro 403';
         $this->errorInformation['errorMessage'] = "Access Denied.";
     } elseif ($paramOne === '500') {
         $this->model->generateLog('error 500: ' . $_SERVER['REQUEST_URI'], 'error', '540');
         $this->errorInformation['errorTitle'] = 'Error 500';
         $this->errorInformation['errorMessage'] = "Server Internal Error.";
     } else {
         $this->model->generateLog('error 404: ' . $_SERVER['REQUEST_URI'], 'error', '530');
         $this->errorInformation['errorTitle'] = 'Error 404';
         $this->errorInformation['errorMessage'] = "Page Not Found.";
     }
     $this->principalData = $this->errorInformation;
     View::setHeaderVars('title', $this->principalData['errorTitle']);
     View::setHeaderVars('specificKeywords', DEFAULT_KEYWORDS . ', error');
     View::setHeaderVars('description', $this->principalData['errorMessage']);
     View::setHeaderVars('cannonicalUrl', '');
     View::setHeaderVars('robots', 'noindex, nofollow');
     View::render('header');
     View::render('error/index', $this->principalData);
     View::render('footer');
 }
Example #8
0
 function searchList($paramOne = null)
 {
     $this->actualPage = FormElements::filterString($paramOne);
     $this->model->quantityCacheSearch();
     $this->model->breadCumbs();
     $this->model->footerFaq();
     $this->model->footerSystemUpdate();
     $this->principalData['activeCachePirna'] = '';
     $this->principalData['activeCacheAlignament'] = '';
     $this->principalData['activeCacheCluster'] = '';
     if ($this->actualPage === 'pirna') {
         $this->sqlDataArray = array('cache_type' => 'pirna');
         $this->principalData['activeCachePirna'] = 'class="active"';
         $this->temporaryTitle = 'piRNA';
     } elseif ($this->actualPage === 'alignament') {
         $this->sqlDataArray = array('cache_type' => 'alignament');
         $this->principalData['activeCacheAlignament'] = 'class="active"';
         $this->temporaryTitle = 'Alignament';
     } elseif ($this->actualPage === 'cluster') {
         $this->sqlDataArray = array('cache_type' => 'cluster');
         $this->principalData['activeCacheCluster'] = 'class="active"';
         $this->temporaryTitle = 'Cluster';
     }
     $this->cacheData = $this->model->searchCache($this->sqlDataArray);
     if (FlashMessages::hasFlashMessage()) {
         $this->principalData['FlashMessage'] = FlashMessages::displayFlashMessage();
     } else {
         $this->principalData['cacheData'] = $this->cacheData;
     }
     View::setHeaderVars('title', $this->temporaryTitle . ' Results Cache');
     View::setHeaderVars('specificKeywords', DEFAULT_KEYWORDS . ', cache results, search pirna cache');
     View::setHeaderVars('description', 'Stored piRNA search');
     View::setHeaderVars('cannonicalUrl', '');
     View::setHeaderVars('robots', 'noindex, nofollow');
     View::render('header');
     View::render('cache/index', $this->principalData);
     View::render('footer');
 }
Example #9
0
 function alignament($paramOne = null)
 {
     $this->actualPage = FormElements::filterString($paramOne);
     $this->model->quantityCacheSearch();
     $this->model->BreadCumbs();
     $this->sqlDataArray = array('alignament_id' => $this->actualPage);
     $this->resultInformation = $this->model->getInformation($this->sqlDataArray, 'alignament');
     $this->resultPirna = $this->model->getPirna($this->sqlDataArray);
     if (FlashMessages::hasFlashMessage()) {
         $this->principalData['FlashMessage'] = FlashMessages::displayFlashMessage();
     } else {
         $this->principalData['alignamentInfo'] = $this->resultInformation;
         $this->principalData['quantityPirna'] = $this->resultPirna['quantityPirna'];
         if ($this->principalData['quantityPirna'] > 0) {
             $this->principalData['listPirnaTwo'] = $this->resultPirna['listPirnaTwo'];
             $this->principalData['tabActive'] = $this->resultPirna['tabActive'];
             $this->principalData['contentTabActive'] = $this->resultPirna['contentTabActive'];
         }
     }
     View::setHeaderVars('title', 'Alignament Information');
     View::setHeaderVars('specificKeywords', '');
     View::setHeaderVars('description', '');
     View::setHeaderVars('cannonicalUrl', '');
     View::setHeaderVars('robots', 'index, follow');
     View::render('header');
     View::render('information/alignament', $this->principalData);
     View::render('footer-clean');
 }
Example #10
0
 function cluster($paramOne = 1)
 {
     $this->model->quantityCacheSearch();
     $this->model->BreadCumbs();
     $this->actualPage = FormElements::filterString($paramOne);
     $this->principalData['resultPage'] = false;
     if (isset($_POST['search']) || isset($_GET['cluster_chromosome']) && isset($_GET['cluster_start']) && isset($_GET['cluster_end'])) {
         $this->principalData['resultPage'] = true;
         $this->initialResult = ($this->actualPage - 1) * $this->resultsPerPage;
         $this->sqlDataArray = array('initialItem' => $this->initialResult, 'maximumQuantity' => $this->resultsPerPage);
         $this->searchResults = $this->model->searchCluster($this->sqlDataArray);
         if (FlashMessages::hasFlashMessage()) {
             $this->principalData['FlashMessage'] = FlashMessages::displayFlashMessage();
         } else {
             $this->principalData['resultCount'] = $this->searchResults[0];
             $this->principalData['totalPages'] = $this->searchResults[1];
             $this->principalData['resultSearch'] = $this->searchResults[2];
             $this->principalData['resultQuery'] = $this->searchResults[3];
             $this->temporaryPagination = $this->model->pagination($this->actualPage, $this->searchResults[1]);
             $this->principalData['pagination'] = $this->temporaryPagination[0];
             $this->principalData['activePagination'] = $this->temporaryPagination[1];
         }
     } else {
         $this->principalData['formToken'] = FormElements::formToken();
     }
     $this->principalData['qttResultPage'] = $this->resultsPerPage;
     $this->cannonicalUrl = URL . 'search/cluster';
     $this->principalData['activeSearchPirna'] = '';
     $this->principalData['activeSearchAlignament'] = '';
     $this->principalData['activeSearchCluster'] = 'class="active"';
     View::setHeaderVars('title', 'Search Cluster');
     View::setHeaderVars('specificKeywords', '');
     View::setHeaderVars('description', '');
     View::setHeaderVars('cannonicalUrl', $this->cannonicalUrl);
     View::setHeaderVars('robots', 'noindex, nofollow');
     View::render('header');
     View::render('search/cluster', $this->principalData);
     View::render('footer-clean');
 }
Example #11
0
 function createInfo($paramOne = null)
 {
     $this->model->checkLogged();
     if ($paramOne === 'faq') {
         if (isset($_POST['submit'])) {
             $this->model->sendCreateInfo('faq');
         }
         $this->principalData['formToken'] = FormElements::formToken();
         if (FlashMessages::hasFlashMessage()) {
             $this->principalData['FlashMessage'] = FlashMessages::displayFlashMessage();
         }
         View::setHeaderVars('title', 'Admin');
         View::render('sidebar-admin');
         View::render('administration/createinfofaq', $this->principalData);
     } elseif ($paramOne === 'article') {
         if (isset($_POST['submit'])) {
             $this->model->sendCreateInfo('article');
         }
         $this->principalData['formToken'] = FormElements::formToken();
         if (FlashMessages::hasFlashMessage()) {
             $this->principalData['FlashMessage'] = FlashMessages::displayFlashMessage();
         }
         View::setHeaderVars('title', 'Admin');
         View::render('sidebar-admin');
         View::render('administration/createinfoarticle', $this->principalData);
     } elseif ($paramOne === 'informations') {
         if (isset($_POST['submit'])) {
             $this->model->sendCreateInfo('informations');
         }
         $this->principalData['formToken'] = FormElements::formToken();
         if (FlashMessages::hasFlashMessage()) {
             $this->principalData['FlashMessage'] = FlashMessages::displayFlashMessage();
         }
         View::setHeaderVars('title', 'Admin');
         View::render('sidebar-admin');
         View::render('administration/createinfoinformations', $this->principalData);
     } elseif ($paramOne === 'update') {
         if (isset($_POST['submit'])) {
             $this->model->sendCreateInfo('update');
         }
         $this->principalData['formToken'] = FormElements::formToken();
         if (FlashMessages::hasFlashMessage()) {
             $this->principalData['FlashMessage'] = FlashMessages::displayFlashMessage();
         }
         View::setHeaderVars('title', 'Admin');
         View::render('sidebar-admin');
         View::render('administration/createinfoupdate', $this->principalData);
     }
 }
Example #12
0
 function cluster($paramOne = 1)
 {
     $this->model->quantityCacheSearch();
     $this->model->breadCumbs();
     $this->actualPage = FormElements::filterInteger($paramOne);
     $this->initialResult = ($this->actualPage - 1) * $this->resultsPerPage;
     $this->sqlDataArray = array('initialItem' => $this->initialResult, 'maximumQuantity' => 5);
     $this->browseData = $this->model->getBrowseCluster($this->sqlDataArray);
     if (FlashMessages::hasFlashMessage()) {
         $this->principalData['FlashMessage'] = FlashMessages::displayFlashMessage();
     } else {
         $this->principalData['countResults'] = $this->browseData['quantityAllCluster'];
         $this->principalData['browseData'] = $this->browseData['clusterList'];
         $this->principalData['totalPages'] = $this->browseData['totalPages'];
         $this->temporaryPagination = $this->model->pagination($this->actualPage, $this->browseData['totalPages']);
         $this->principalData['pagination'] = $this->temporaryPagination[0];
         $this->principalData['activePagination'] = $this->temporaryPagination[1];
     }
     if ($this->actualPage === 1) {
         $this->cannonicalUrl = URL . 'browse/cluster';
     } else {
         $this->cannonicalUrl = '';
     }
     $this->principalData['qttResultPage'] = $this->resultsPerPage;
     $this->principalData['activeBrowsePirna'] = '';
     $this->principalData['activeBrowseDataset'] = '';
     $this->principalData['activeBrowseCluster'] = 'class="active"';
     View::setHeaderVars('title', 'Browse piRNA Clusters');
     View::setHeaderVars('specificKeywords', DEFAULT_KEYWORDS . ', piRNA cluster List, piRNA cluster, browse piRNA cluster');
     View::setHeaderVars('description', 'Browse all the piRNA clusters in the database');
     View::setHeaderVars('cannonicalUrl', $this->cannonicalUrl);
     View::setHeaderVars('robots', 'index, follow');
     View::render('header');
     View::render('browse/cluster', $this->principalData);
     View::render('footer-clean');
 }