Exemple #1
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');
 }
Exemple #2
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');
 }
Exemple #3
0
 function feedbackForm($paramOne = null)
 {
     if (isset($_POST['submit'])) {
         $this->sqlDataArray = array('pirna_code' => FormElements::filterString($paramOne, true));
         $this->resultFeedbackVote = $this->model->sendFeedbackComment($this->sqlDataArray);
     } else {
         $this->principalData['formToken'] = FormElements::formToken();
         $this->principalData['pirna_code'] = FormElements::filterString($paramOne, true);
         View::render('information/feedback_form', $this->principalData);
     }
 }
 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);
     }
 }