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


PHP Dataset::displayTableColumns方法代码示例

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


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

示例1: displayTrainingRows

 /**
  * Display all training rows
  */
 private function displayTrainingRows()
 {
     foreach ($this->Trainings as $training) {
         $date = date("d.m.Y", $training['time']);
         $link = Ajax::trainingLink($training['id'], $date, true);
         echo '<tr class="r">';
         echo '<td class="l"><small>' . $link . '</small></td>';
         $this->Dataset->setActivityData($training);
         $this->Dataset->displayTableColumns();
         echo '</tr>';
     }
 }
开发者ID:9x,项目名称:Runalyze,代码行数:15,代码来源:class.SearchResults.php

示例2: displayTableBody

 /**
  * Display table body
  */
 protected function displayTableBody()
 {
     $maxIndex = ceil(($this->TimeEnd - $this->TimeStart) / $this->Timerange) - 1;
     $CompleteData = array();
     $CompleteResult = $this->Dataset->getGroupOfTrainingsForTimerange($this->Sportid, $this->Timerange, $this->TimeStart, $this->TimeEnd);
     foreach ($CompleteResult as $Data) {
         $CompleteData[$Data['timerange']] = $Data;
     }
     for ($index = 0; $index <= $maxIndex; ++$index) {
         echo '<tr><td class="l"><span class="b">' . $this->rowHead($index) . '</span></td>';
         if (isset($CompleteData[$index]) && !empty($CompleteData[$index])) {
             echo '<td class="small">' . $CompleteData[$index]['num'] . 'x</td>';
             $this->displayAdditionalColumns($CompleteData[$index]);
             $this->Dataset->setGroupOfTrainings($CompleteData[$index]);
             if (isset($CompleteData[$index + 1])) {
                 $this->Dataset->setKilometerToCompareTo($CompleteData[$index + 1]['distance']);
             }
             $this->Dataset->displayTableColumns();
         } else {
             echo HTML::emptyTD($this->Dataset->cols() + 1 + $this->AdditionalColumns, '<em>' . __('No activities') . '</em>', 'c small');
         }
         echo '</tr>';
     }
 }
开发者ID:9x,项目名称:Runalyze,代码行数:27,代码来源:class.SummaryTable.php

示例3: displayWeekTable

 /**
  * Display table with last week-statistics 
  * @param bool $showAllWeeks
  */
 private function displayWeekTable($showAllWeeks = false)
 {
     if (($this->showsAllYears() || $this->showsSpecificYear() && $this->year != date('Y')) && !$showAllWeeks) {
         return;
     }
     $Dataset = new Dataset();
     if ($this->Configuration()->value('compare_weeks')) {
         $Dataset->activateKilometerComparison();
     }
     $title = $showAllWeeks ? __('All training weeks') : __('Last 10 training weeks');
     echo '<table class="r fullwidth zebra-style">';
     echo '<thead><tr><th colspan="' . ($Dataset->cols() + 1) . '">' . $title . '</th></tr></thead>';
     echo '<tbody>';
     if (!$showAllWeeks) {
         $starttime = time();
         $maxW = 9;
     } else {
         $starttime = $this->year == date("Y") ? time() : mktime(1, 0, 0, 12, 31, $this->year);
         $maxW = ($starttime - mktime(1, 0, 0, 12, 31, $this->year - 1)) / (7 * DAY_IN_S);
     }
     $CompleteData = array();
     $CurrentWeekEnd = Time::Weekend($starttime);
     $CompleteResult = $Dataset->getGroupOfTrainingsForTimerange($this->sportid, 7 * DAY_IN_S, $CurrentWeekEnd - ($maxW + 2) * 7 * DAY_IN_S, $CurrentWeekEnd);
     foreach ($CompleteResult as $Data) {
         $CompleteData[$Data['timerange']] = $Data;
     }
     for ($w = 0; $w <= $maxW; $w++) {
         $time = $starttime - $w * 7 * DAY_IN_S;
         $start = Time::Weekstart($time);
         $end = Time::Weekend($time);
         $week = Icon::$CALENDAR . ' ' . __('Week') . ' ' . date('W', $time);
         //echo '<tr><td class="b l"">'.DataBrowserLinker::link($week, $start, $end).'</td>';
         echo '<tr><td class="l"><span class="b">' . DataBrowserLinker::link($week, $start, $end, '') . '</span>&nbsp;&nbsp;&nbsp;<span class="small">' . date('d.m', $start) . " - " . date('d.m', $end) . '</span></td>';
         if (isset($CompleteData[$w]) && !empty($CompleteData[$w])) {
             $Dataset->setGroupOfTrainings($CompleteData[$w]);
             if (isset($CompleteData[$w + 1])) {
                 $Dataset->setKilometerToCompareTo($CompleteData[$w + 1]['distance']);
             }
             $Dataset->displayTableColumns();
         } else {
             echo HTML::emptyTD($Dataset->cols(), '<em>' . __('No activities') . '</em>', 'c small');
         }
         echo '</tr>';
     }
     echo '</tbody>';
     echo '</table>';
 }
开发者ID:schoch,项目名称:Runalyze,代码行数:51,代码来源:class.RunalyzePluginStat_Statistiken.php


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