当前位置: 首页>>代码示例>>PHP>>正文


PHP Home::launch方法代码示例

本文整理汇总了PHP中Home::launch方法的典型用法代码示例。如果您正苦于以下问题:PHP Home::launch方法的具体用法?PHP Home::launch怎么用?PHP Home::launch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Home的用法示例。


在下文中一共展示了Home::launch方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: launch

 /**
  * Process incoming parameters and display the page.
  *
  * @return void
  * @access public
  */
 public function launch()
 {
     global $interface;
     global $configArray;
     if (isset($_POST['submit'])) {
         $result = $this->sendEmail($_POST['from'], $_POST['message']);
         if (!PEAR::isError($result)) {
             include_once 'Home.php';
             Home::launch();
             exit;
         } else {
             $interface->assign('errorMsg', $result->getMessage());
         }
     }
     // Display Page
     $institutionDetails = $this->recordDriver->getInstitutionDetails();
     $datasources = getExtraConfigArray('datasources');
     if (!$institutionDetails['institution']) {
         $interface->assign('institution', $configArray['Site']['title']);
         $interface->assign('datasource', $configArray['Site']['title']);
     } else {
         $interface->assign('institution', $institutionDetails['institution']);
         $interface->assign('datasource', $institutionDetails['datasource']);
     }
     $interface->assign('formTargetPath', '/MetaLib/Record?id=' . urlencode($_GET['id']) . '/Feedback');
     if (isset($_GET['lightbox'])) {
         $interface->assign('title', $_GET['message']);
         return $interface->fetch('Record/Feedback.tpl');
     } else {
         $interface->setPageTitle('Give Feedback on a Record');
         $interface->assign('subTemplate', 'Feedback.tpl');
         $interface->setTemplate('view-alt.tpl');
         $interface->display('layout.tpl', 'RecordFeedback' . $_GET['id']);
     }
 }
开发者ID:bharatm,项目名称:NDL-VuFind,代码行数:41,代码来源:Feedback.php

示例2: launch

 /**
  * Process incoming parameters and display the page.
  *
  * @return void
  * @access public
  */
 public function launch()
 {
     global $interface;
     global $configArray;
     if (isset($_POST['submit'])) {
         $result = $this->sendEmail($_POST['to'], $_POST['from'], $_POST['message']);
         if (!PEAR::isError($result)) {
             include_once 'Home.php';
             Home::launch();
             exit;
         } else {
             $interface->assign('errorMsg', $result->getMessage());
         }
     }
     // Display Page
     $interface->assign('formTargetPath', '/MetaLib/' . urlencode($_GET['id']) . '/Email');
     $interface->assign('recordId', urlencode($_GET['id']));
     if (isset($_GET['lightbox'])) {
         $interface->assign('title', $_GET['message']);
         return $interface->fetch('MetaLib/email.tpl');
     } else {
         $interface->setPageTitle('Email Record');
         $interface->assign('subTemplate', 'email.tpl');
         $interface->setTemplate('view-alt.tpl');
         $interface->display('layout.tpl', 'RecordEmail' . $_GET['id']);
     }
 }
开发者ID:bharatm,项目名称:NDL-VuFind,代码行数:33,代码来源:Email.php

示例3: launch

 /**
  * Display the page.
  *
  * @return void
  * @access public
  */
 public function launch()
 {
     global $interface;
     global $configArray;
     // Connect to Solr:
     $db = ConnectionManager::connectToIndex();
     // Process incoming parameters:
     $source = isset($_GET['source']) ? $_GET['source'] : false;
     $from = isset($_GET['from']) ? $_GET['from'] : false;
     $rowid = isset($_GET['rowid']) ? $_GET['rowid'] : false;
     $page = isset($_GET['page']) && is_numeric($_GET['page']) ? $_GET['page'] : 0;
     $limit = isset($configArray['AlphaBrowse']['page_size']) ? $configArray['AlphaBrowse']['page_size'] : 20;
     $extras = isset($configArray['AlphaBrowse_Extras'][$source]) ? $configArray['AlphaBrowse_Extras'][$source] : null;
     // Normalize input for call numbers
     if ($source == 'lcc' && $from) {
         $from = $this->_normalizeCallNumber($from);
     }
     // If required parameters are present, load results:
     if ($source && ($from !== false || $rowid !== false)) {
         // Load Solr data or die trying:
         $result = $db->alphabeticBrowse($source, $from, $rowid, $page, $limit, $extras, true);
         $this->_checkError($result);
         // No results?  Try the previous page just in case we've gone past the
         // end of the list....
         if ($result['Browse']['totalCount'] == 0) {
             $page--;
             $result = $db->alphabeticBrowse($source, $from, $rowid, $page, $limit, $extras, true);
             $this->_checkError($result);
         }
         // Only display next/previous page links when applicable:
         $interface->assign('nextpage', $page + 1);
         $interface->assign('nextRowid', $result['Browse']['endRow']);
         if ($result['Browse']['startRow'] > 1) {
             $interface->assign('prevpage', -1);
             $interface->assign('prevRowid', $result['Browse']['startRow']);
         }
         // Send other relevant values to the template:
         $interface->assign('source', $source);
         $interface->assign('from', $from);
         // Before assigning results, lets dedupe the extras
         foreach ($result['Browse']['items'] as &$item) {
             if (isset($item['extras'])) {
                 foreach ($item['extras'] as &$extra) {
                     $extra = array_unique($extra);
                 }
             }
         }
         $interface->assign('result', $result);
     }
     // We also need to load all the same details as the basic Home action:
     parent::launch();
 }
开发者ID:bharatm,项目名称:NDL-VuFind,代码行数:58,代码来源:Results.php


注:本文中的Home::launch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。