コード例 #1
0
ファイル: calnav.php プロジェクト: godboko/modules
 /**
  * Display func.
  * @param $blockinfo array
  * @returns $blockinfo array
  */
 function display(array $data = array())
 {
     $data = parent::display($data);
     if (empty($data)) {
         return;
     }
     if (!defined('CALENDAR_ROOT')) {
         define('CALENDAR_ROOT', xarModVars::get('calendar', 'pearcalendar_root'));
     }
     include_once CALENDAR_ROOT . 'Calendar.php';
     $tplData['form_action'] = xarModURL('calendar', 'user', 'changecalnav');
     $tplData['blockid'] = $data['bid'];
     if (xarServer::getVar('REQUEST_METHOD') == 'GET') {
         // URL of this page
         $tplData['return_url'] = xarServer::getCurrentURL();
     } else {
         // Base URL of the site
         $tplData['return_url'] = xarServer::getBaseURL();
     }
     $data['content'] = $tplData;
     return $data;
 }