Ejemplo n.º 1
0
 function formatBirthdays($rows, &$matches, $dates)
 {
     $newrows = array();
     $year = substr($dates['start'], 0, 4);
     foreach ($rows as $key => $row) {
         $newrows[$key]['type'] = 'jlb';
         $newrows[$key]['homepic'] = '';
         $newrows[$key]['awaypic'] = '';
         $newrows[$key]['date'] = $year . '-' . $row->month_day;
         $newrows[$key]['age'] = '(' . $row->age . ')';
         $newrows[$key]['headingtitle'] = $this->xparams->get('birthday_text', 'Birthday');
         $newrows[$key]['name'] = '';
         $newrows[$key]['team'] = '';
         global $mainframe;
         if ($this->xparams->get('jlbirthdaypix', 0) == 1 && $row->default_picture != '' && file_exists($mainframe->getCfg('absolute_path') . '/' . str_replace('/', '/', $row->default_picture))) {
             $linkit = 1;
             $newrows[$key]['image'] = '<img src="' . (JUri::root(true) . '/' . parent::jl_utf8_convert($row->default_picture, 'iso-8859-1', 'utf-8')) . '" alt="" style="height:40px; vertical-align:middle;margin:0 5px;" />';
         }
         JoomleagueConnector::build_url($row);
         $newrows[$key]['link'] = JRoute::_($row->link);
         $newrows[$key]['name'] = parent::jl_utf8_convert($row->firstname, 'iso-8859-1', 'utf-8') . ' ';
         $newrows[$key]['name'] .= parent::jl_utf8_convert($row->lastname, 'iso-8859-1', 'utf-8');
         if (isset($row->teamname)) {
             $newrows[$key]['team'] = '<acronym title="' . parent::jl_utf8_convert($row->teamname . ' ' . $row->pname, 'iso-8859-1', 'utf-8') . '">' . parent::jl_utf8_convert($row->short_name, 'iso-8859-1', 'utf-8') . '</acronym>';
         }
         //$newrows[$key]['name'] .= ' ('..')';
         $newrows[$key]['matchcode'] = 0;
         $newrows[$key]['project_id'] = 0;
         $matches[] = $newrows[$key];
     }
     return $newrows;
 }