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'); }
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'); }
function searchCache($sqlDataArray = array()) { if (isset($_COOKIE['pirna_db_cache_search'])) { $this->rawData = explode('@', FormElements::filterString($_COOKIE['pirna_db_cache_search'])); $quantity = count($this->rawData); for ($num = 0; $num < $quantity; ++$num) { $this->temporaryData[$num] = explode('|', $this->rawData[$num]); } if ($sqlDataArray['cache_type'] === 'pirna') { $tempNumber = 0; for ($num = 0; $num < $quantity; ++$num) { if ($this->temporaryData[$num][1] === 'pirna') { $this->results[$tempNumber]['cacheDate'] = Dates::convertDate($this->temporaryData[$num][0]); $this->results[$tempNumber]['cacheUrl'] = 'pirna/1?pirna_code=' . $this->temporaryData[$num][3]; $this->results[$tempNumber]['cacheUrl'] .= '&pirna_organism=' . $this->temporaryData[$num][5]; $this->results[$tempNumber]['cacheQuery'] = 'piRNA Code = ' . $this->temporaryData[$num][3]; $this->results[$tempNumber]['cacheQuery'] .= ' & piRNA Organism = ' . $this->temporaryData[$num][5]; ++$tempNumber; } } } elseif ($sqlDataArray['cache_type'] === 'alignament') { $tempNumber = 0; for ($num = 0; $num < $quantity; ++$num) { if ($this->temporaryData[$num][1] === 'alignament') { $this->results[$tempNumber]['cacheDate'] = Dates::convertDate($this->temporaryData[$num][0]); $this->results[$tempNumber]['cacheUrl'] = 'alignament/1?alignament_chromosome=' . $this->temporaryData[$num][3]; $this->results[$tempNumber]['cacheUrl'] .= '&alignament_start=' . $this->temporaryData[$num][5]; $this->results[$tempNumber]['cacheUrl'] .= '&alignament_end=' . $this->temporaryData[$num][7]; $this->results[$tempNumber]['cacheQuery'] = 'Chromosome = ' . $this->temporaryData[$num][3]; $this->results[$tempNumber]['cacheQuery'] .= ' & Start = ' . $this->temporaryData[$num][5]; $this->results[$tempNumber]['cacheQuery'] .= ' & End = ' . $this->temporaryData[$num][7]; ++$tempNumber; } } } elseif ($sqlDataArray['cache_type'] === 'cluster') { $tempNumber = 0; for ($num = 0; $num < $quantity; ++$num) { if ($this->temporaryData[$num][1] === 'cluster') { $this->results[$tempNumber]['cacheDate'] = Dates::convertDate($this->temporaryData[$num][0]); $this->results[$tempNumber]['cacheUrl'] = 'cluster/1?cluster_chromosome=' . $this->temporaryData[$num][3] . '&cluster_start=' . $this->temporaryData[$num][5] . '&cluster_end=' . $this->temporaryData[$num][7]; $this->results[$tempNumber]['cacheQuery'] = 'Chromosome = ' . $this->temporaryData[$num][3] . ' & Start = ' . $this->temporaryData[$num][5] . ' & End = ' . $this->temporaryData[$num][7]; ++$tempNumber; } } } } $this->quantityResults = count($this->results); if ($this->quantityResults > 0) { return $this->results; } else { FlashMessages::setFlashMessage('noresult', '<b>Zero Results!</b><br />None of your cache search results was found.'); } }
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'); }
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'); }
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'); }
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'); }
function loadMoreComments($paramOne = null, $paramTwo = null) { $maximumQuantity = FormElements::filterInteger($paramTwo, true) + 1; $this->sqlDataArray = array('pirnaCode' => FormElements::filterString($paramOne, true), 'initialItem' => 0, 'maximumQuantity' => $maximumQuantity); $this->principalData = $this->model->loadMoreComments($this->sqlDataArray); View::render('information/morecomments', $this->principalData); }
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'); }
function sendFeedbackComment($sqlDataArray = array()) { $this->dataArray = array('comment_name' => FormElements::getPostString('sendFeedbackName', true), 'comment_email' => FormElements::getPostString('sendFeedbackEmail', true), 'comment_content' => FormElements::getPostString('sendFeedbackContent', true), 'comment_date' => date('Y-m-d')); if (!in_array('errorRequiredField', $this->dataArray)) { $addComment = $this->db->insert('comment', $this->dataArray); if ($addComment > 0) { $this->dataArray = array('pirna_code' => $sqlDataArray['pirna_code'], 'comment_id' => $addComment); $addRel = $this->db->insert('rel_comment_pirna', $this->dataArray); echo 'success/Your comment will be checked soon.'; parent::generateLog('sent a comment to pirna: ' . $sqlDataArray['pirna_code'], 'attempts', '220'); } else { echo 'error/Please Check the Information Sent.'; parent::generateLog('error sending a comment to pirna: ' . $sqlDataArray['pirna_code'], 'attempts', '221'); } } else { echo 'error/Please Check the Information Sent.'; parent::generateLog('error sending a comment to pirna: ' . $sqlDataArray['pirna_code'], 'attempts', '221'); } }
function searchCluster($sqlDataArray = array()) { if (isset($_POST['search'])) { $this->dataArray = array('cluster_chromosome' => FormElements::getPostInteger('inputSearchChromosome', true), 'cluster_start' => FormElements::getPostInteger('inputSearchStart', true), 'cluster_end' => FormElements::getPostInteger('inputSearchEnd', true)); $this->formToken = FormElements::getPostString('token', true); parent::checkFormRequired($this->dataArray); parent::checkFormToken($this->formToken, 'search/cluster'); } elseif (isset($_GET['cluster_chromosome']) && isset($_GET['cluster_start']) && isset($_GET['cluster_end'])) { $this->dataArray = array('cluster_chromosome' => FormElements::filterInteger($_GET['cluster_chromosome'], true), 'cluster_start' => FormElements::filterInteger($_GET['cluster_start'], true), 'cluster_end' => FormElements::filterInteger($_GET['cluster_end'], true)); } if (!in_array('errorRequiredField', $this->dataArray) && (isset($_GET['cluster_chromosome']) || $this->formToken === Session::getSession('formToken')) && !FlashMessages::hasFlashMessage()) { $cookieData = date('Y-m-d') . '|cluster|' . 'cluster_chromosome|' . $this->dataArray['cluster_chromosome'] . '|cluster_start|' . $this->dataArray['cluster_start'] . '|cluster_end|' . $this->dataArray['cluster_end']; if (isset($_COOKIE['pirna_db_cache_search'])) { $newData = $_COOKIE['pirna_db_cache_search'] . '@' . $cookieData; } else { $newData = $cookieData; } setcookie('pirna_db_cache_search', $newData, time() + 86400 * 30 * 30, '/'); Session::unsetSession('formToken'); $this->sqlAllResults = 'SELECT cluster_code, cluster_chromosome, cluster_start, cluster_end FROM cluster WHERE cluster_chromosome = ' . $this->dataArray['cluster_chromosome'] . ' AND cluster_start >= ' . $this->dataArray['cluster_start'] . ' AND cluster_end <= ' . $this->dataArray['cluster_end']; $this->allResults = $this->db->select($this->sqlAllResults); $this->results[0] = count($this->allResults); $this->results[1] = ceil($this->results[0] / $sqlDataArray['maximumQuantity']); $this->sql = 'SELECT cluster_code, cluster_chromosome, cluster_start, cluster_end FROM cluster WHERE cluster_chromosome = ' . $this->dataArray['cluster_chromosome'] . ' AND cluster_start >= ' . $this->dataArray['cluster_start'] . ' AND cluster_end <= ' . $this->dataArray['cluster_end'] . ' LIMIT :initialItem, :maximumQuantity'; $this->results[2] = $this->db->select($this->sql, $sqlDataArray); $this->results[3] = '?cluster_chromosome=' . $this->dataArray['cluster_chromosome'] . '&' . 'cluster_start=' . $this->dataArray['cluster_start'] . '&' . 'cluster_end=' . $this->dataArray['cluster_end']; if ($this->results[0] > 0) { return $this->results; } else { FlashMessages::setFlashMessage('noresult', '<b>Not Found!</b><br />None cluster was found using your query..'); } } }
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); } }
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'); }
function sendCreateInfo($type = null) { if ($type === 'faq') { $this->table = 'faq'; $this->dataArray = array('faq_title' => FormElements::getPostString('createFaqTitle', true), 'faq_content' => FormElements::getPostString('createFaqContent', true), 'faq_type' => FormElements::getPostString('createFaqType', true)); } elseif ($type === 'article') { $this->table = 'system_article'; $this->dataArray = array('article_title' => FormElements::getPostString('createArticleTitle', true), 'article_author' => FormElements::getPostString('createArticleAuthor', true), 'article_journal' => FormElements::getPostString('createArticleJournal', true), 'article_date' => FormElements::getPostString('createArticleDate', true), 'article_reference' => FormElements::getPostString('createArticleReference', true)); } elseif ($type === 'informations') { $this->table = 'general_text'; $this->dataArray = array('text_content' => FormElements::getPostString('createInformationsContent', true), 'text_type' => FormElements::getPostString('createInformationsType', true)); } elseif ($type === 'update') { $this->table = 'info_update'; $this->dataArray = array('info_update_title' => FormElements::getPostString('createUpdateTitle', true), 'info_update_content' => FormElements::getPostString('createUpdateContent', true)); } else { FlashMessages::setFlashMessage('error', '<b>Error!</b><br />This Section Does not Exists.'); } $this->formToken = FormElements::getPostString('token', true); parent::checkFormRequired($this->dataArray); parent::checkFormToken($this->formToken, 'administration/createinfo/' . $type); if (!FlashMessages::hasFlashMessage()) { Session::unsetSession('formToken'); $this->resultsDelete = $this->db->insert($this->table, $this->dataArray); if (count($this->resultsDelete) === 1) { FlashMessages::setFlashMessage('success', '<b>Success!</b><br />Succesfully Created.'); } else { FlashMessages::setFlashMessage('error', '<b>Error!</b><br />Unsuccesfully Created.'); } } }