/** * @param $TypeInfo &array Associative array of type information: * 'class','summary','description','actions' */ function __construct(&$TypeInfo, $Keys) { parent::__construct('calendar/notification'); $this->mDataArray['Type'] =& $TypeInfo; $this->mDataArray['Keys'] = $Keys; $this->mDataArray['Custom'] = ''; }
function Load() { $this->SetData('style', $this->mStyle); $this->SetData('items', $this->mItems); $this->SetData('selected', $this->mSelected); parent::Load(); }
function __construct($poll_data, $poll_option_data, $user_voted, $show_results) { parent::__construct('polls/vote_box'); $this->data = $poll_data; $this->option_data = $poll_option_data; $this->user_voted = $user_voted; $this->show_results = $show_results; }
/** * @param $ViewPath string The path of a CI view. * @param $Data array The initial data array. */ function __construct($ViewPath, $Data = array()) { parent::__construct($ViewPath, $Data); // Initialise data $this->IncludeSpecialHeadings(TRUE); $this->SetOccurrenceFilter(); $this->mUriFormat = Date_uri::DefaultFormat(); $this->mUriBase = ''; }
/** * @param $Class * - string Message type. * - array Values in array as returned by ToArray. * @param $Message string message text. */ function __construct($Class, $Message = '') { if (is_array($Class)) { $Message = $Class['text']; $Class = $Class['class']; } parent::__construct('general/message.php'); $this->mDataArray['class'] = $Class; $this->mDataArray['text'] = $Message; }
/** * @param $PageCode string Page code. * @param $Namespace string Namespace of page code. * @param $Scope array Scope variables to pass onto page model. * @note Actual page code is @a Namespace : @a PageCode. */ function __construct($PageCode, $Namespace = NULL, $Scope = array()) { parent::__construct(NULL); // Find and set page code using namespace if (NULL !== $Namespace) { $PageCode = $Namespace . ':' . $PageCode; } $CI =& get_instance(); $CI->pages_model->SetPageCode($PageCode); $this->mProperties = $CI->pages_model->GetPropertyArrayNew('main', false, $Scope); }
function _test_static($mode = null) { $analyser_program = '../tools/static_analysis/analyser.pl'; $root_directory = '..'; if (null !== $mode) { if ('text' == $mode || 'ajax' == $mode) { $text = ''; $tests = $_POST['tests']; if (false !== $tests) { if (preg_match('/^\\w+(,\\w+)*$/', $tests)) { $tests = explode(',', $tests); $command = $analyser_program . ' ' . $root_directory; foreach ($tests as $test) { $command .= ' -t ' . $test; } $text = `{$command} 2>&1`; } } if ('text' == $mode) { $data = array('Text' => ''); $main_view = new FramesView('general/text', $data); } else { $data = array('RootTag' => array('_tag' => 'result')); foreach (explode("\n", $text) as $line) { $data['RootTag'][] = array('_tag' => 'line', $line); } $main_view = new FramesView('general/xml', $data); } $main_view->Load(); } else { show_404(); } } else { $data = array('Tests' => array(), 'TestSets' => array()); $lines = `{$analyser_program} -m`; $lines = explode("\n", $lines); foreach ($lines as $line) { if (preg_match('/^\\t(.*)\\t(.*)$/', $line, $matches)) { $data['Tests'][$matches[1]] = $matches[2]; } } $this->pages_model->SetPageCode('admin_tools_test_static'); $this->main_frame->IncludeJs('javascript/admin/static_analysis.js'); $this->main_frame->IncludeJs('javascript/simple_ajax.js'); $this->main_frame->SetContentSimple('admin/tools/test/static', $data); $this->main_frame->load(); } }
/** * @brief Echo's out the byline */ function Load() { $this->SetData('reporters', $this->mReporters); $this->SetData('article_date', $this->mDate); parent::Load(); }
/** * @param $ViewPath string The path of a CI view of the frame. * @param $Data array The initial data array. */ function __construct($ViewPath, $Data = array()) { parent::__construct($ViewPath, $Data); $this->mDataArray['content'] = array(0 => new FramesView('')); }
function Load() { // Validate the included comment. if (!is_numeric($this->mIncludedComment)) { if ($this->mIncludedComment == 'last') { $this->mIncludedComment = count($this->mComments); } else { $this->mIncludedComment = 1; } } $CI =& get_instance(); $this->SetData('Items', $this->mComments); $this->SetData('InnerView', 'comments/comment'); $this->SetData('InnerItemName', 'Comment'); $this->SetData('MaxPerPage', $this->mMaxPerPage); $this->SetData('PageLinkSpan', $this->mPageLinkSpan); $this->SetData('IncludedIndex', $this->mIncludedComment); $this->SetData('PageUrlPrefix', $CI->comment_views->GetUriPrefix()); $this->SetData('PageUrlPostfix', $CI->comment_views->GetUriPostfix() . '#comments'); $this->SetData('ThreadUrlPrefix', '/comments/thread/'); $this->SetData('ThreadUrlPostfix', ''); // for subviews (comments) foreach (array('Report' => 'report', 'Edit' => 'edit', 'Delete' => 'delete', 'Undelete' => 'undelete', 'Good' => 'flaggood', 'Ungood' => 'unflaggood') as $key => $value) { $this->SetData($key . 'UrlPrefix', '/comments/' . $value . '/'); $this->SetData($key . 'UrlPostfix', $CI->uri->uri_string()); } parent::Load(); }
function Load() { /// Process the data before loading $this->ProcessEvents($this->mData, $this->mCategories); /// Make some links if (NULL !== $this->mPaths && NULL !== $this->mRangeFormat && NULL !== $this->mStartTime && NULL !== $this->mEndTime) { $days = Academic_time::DaysBetweenTimestamps($this->mStartTime, $this->mEndTime); $start = new Academic_time($this->mStartTime); $end = new Academic_time($this->mEndTime); $now = new Academic_time(time()); $try_again = TRUE; if (0 === $start->AcademicDay() && 0 === $end->AcademicDay()) { $CI =& get_instance(); $terms_apart = ($end->AcademicYear() - $start->AcademicYear()) * 6 + $end->AcademicTerm() - $start->AcademicTerm(); // don't really need to scroll in years if (FALSE && $terms_apart >= 6) { $this->SetData('ForwardUrl', $this->GenerateRangeUrl($CI->academic_calendar->Academic($start->AcademicYear() + 1, $start->AcademicTerm(), $start->AcademicWeek()), $CI->academic_calendar->Academic($end->AcademicYear() + 1, $end->AcademicTerm(), $end->AcademicWeek()))); $this->SetData('BackwardUrl', $this->GenerateRangeUrl($CI->academic_calendar->Academic($start->AcademicYear() - 1, $start->AcademicTerm(), $start->AcademicWeek()), $CI->academic_calendar->Academic($end->AcademicYear() - 1, $end->AcademicTerm(), $end->AcademicWeek()))); $try_again = FALSE; } elseif ($terms_apart > 0) { $this->SetData('ForwardUrl', $this->GenerateRangeUrl($CI->academic_calendar->Academic($start->AcademicYear() + (5 === $start->AcademicTerm() ? 1 : 0), ($start->AcademicTerm() + 1) % 6, $start->AcademicWeek()), $CI->academic_calendar->Academic($end->AcademicYear() + (5 === $start->AcademicTerm() ? 1 : 0), ($end->AcademicTerm() + 1) % 6, $end->AcademicWeek()))); $this->SetData('BackwardUrl', $this->GenerateRangeUrl($CI->academic_calendar->Academic($start->AcademicYear() - (0 === $start->AcademicTerm() ? 1 : 0), ($start->AcademicTerm() + 5) % 6, $start->AcademicWeek()), $CI->academic_calendar->Academic($end->AcademicYear() - (0 === $start->AcademicTerm() ? 1 : 0), ($end->AcademicTerm() + 5) % 6, $end->AcademicWeek()))); $try_again = FALSE; } $this->SetData('NowUrl', $this->GenerateRangeUrl($CI->academic_calendar->Academic($now->AcademicYear(), $now->AcademicTerm(), 1), $CI->academic_calendar->Academic($now->AcademicYear() + (5 === $start->AcademicTerm() ? 1 : 0), ($now->AcademicTerm() + 1) % 6, 1))); $this->SetData('NowUrlLabel', 'This term'); } if ($try_again) { $now = $now->Midnight(); if ($days >= 7) { $forward_jump = '1week'; $now = $now->BackToMonday(); $this->SetData('NowUrlLabel', 'This week'); } else { $forward_jump = '1day'; $this->SetData('NowUrlLabel', 'Today'); } $this->SetData('ForwardUrl', $this->GenerateRangeUrl($start->Adjust($forward_jump), $end->Adjust($forward_jump))); $this->SetData('BackwardUrl', $this->GenerateRangeUrl($start->Adjust('-' . $forward_jump), $end->Adjust('-' . $forward_jump))); $this->SetData('NowUrl', $this->GenerateRangeUrl($now, $now->Adjust('+' . $forward_jump))); } } parent::Load(); }
function __construct($prefix) { parent::__construct('calendar/event_edit'); $this->mPrefix = 'eved'; //$prefix; }