case 'cup-grid-score': case 'cup-grid-score-win': case 'cup-grid-score-loss': $grid .= '<td align="right" class="' . $matrix[$i][$j]['class'] . '">'; if (isset($matrix[$i][$j]['content'])) { $grid .= $matrix[$i][$j]['content']; } $grid .= '</td>'; break; } } else { $grid .= '<td>' . ($i == 1 ? ' ' : '') . '</td>'; } } $grid .= "\n" . '</tr>' . "\n"; } $grid .= '</table>' . "\n"; $datahtml['tree']['grid'] = $grid; $datahtml['if']['standalone'] = false; if (!$tree) { $datahtml['if']['standalone'] = true; } if ($gridonly) { $cache = $grid; } else { $cache = cs_subtemplate(__FILE__, $datahtml, 'cups', 'viewtree'); } if (function_exists('cs_datacache_load')) { cs_datacache_create('cups', 'viewtree', $key, $cache, 0); } echo $cache;
$real[$key]['img'] = ''; break; } if ($prevpos == $real[$key]['pos']) { $real[$key]['pos'] = ''; } else { $prevpos = $real[$key]['pos']; } switch ($real[$key]['id']) { case CS_CUPS_TEAM_UNKNOWN: $real[$key]['link'] = $cs_lang['unknown']; break; case CS_CUPS_TEAM_BYE: $real[$key]['link'] = $cs_lang['bye']; break; default: foreach ($teams as $tkey => $tinfo) { if ($tinfo['squads_id'] == $real[$key]['id']) { $real[$key]['link'] = $tinfo['link']; unset($teams[$tkey]); } } break; } $data['result'][] = $real[$key]; } $cache = cs_subtemplate(__FILE__, $data, 'cups', 'result'); if (function_exists('cs_datacache_load')) { cs_datacache_create('cups', 'result', $key, $cache, 0); } echo $cache;
imagefilledrectangle($img, $currwidth, $currheight, $currwidth + $entitywidth, $currheight + $entityheight, $col_team_bg); if ($lbfinal['cupmatches_winner'] != CS_CUPS_TEAM_UNKNOWN) { $string = ''; if ($lbfinal['cupmatches_winner'] == $final['team1_id']) { if (!empty($lbfinal['team1_name'])) { $string = $lbfinal['team1_name']; } // else // $string = '#'.$match['cupmatches_seed1']; } else { if (!empty($lbfinal['team2_name'])) { $string = $lbfinal['team2_name']; } // else // $string = '#'.$match['cupmatches_seed2']; } $string = iconv($cs_main['charset'], CS_CUPS_GD_CHARSET . '//TRANSLIT', $string); if (!empty($string)) { imagestring($img, $font_match, $currwidth + 10, $currheight + $entity_font_height, $string, $col_team_font); } } header('Content-type: image/png'); ob_start(); imagepng($img); $imagevariable = ob_get_contents(); ob_end_clean(); if (function_exists('cs_datacache_load')) { cs_datacache_create('cups', 'image', $key, base64_encode($imagevariable), 0); } echo $imagevariable; imagedestroy($img);
if ($matchl['squad1_id'] != CS_CUPS_TEAM_BYE) { $data['cups'][$run]['third'][0] = array('name' => cs_cups_team($cs_lang, $cup['cups_system'], $matchl['squad1_id'], $matchl['team1_name'], 1, 9999, true)); } } else { if ($matchl['squad2_id'] != CS_CUPS_TEAM_BYE) { $data['cups'][$run]['third'][0] = array('name' => cs_cups_team($cs_lang, $cup['cups_system'], $matchl['squad2_id'], $matchl['team2_name'], 1, 9999, true)); } } break; } if ($matchw['cupmatches_winner'] == $matchw['squad1_id']) { $data['cups'][$run]['winner'] = cs_cups_team($cs_lang, $cup['cups_system'], $matchw['squad1_id'], $matchw['team1_name'], 1, 9999, true); $data['cups'][$run]['second'] = cs_cups_team($cs_lang, $cup['cups_system'], $matchw['squad2_id'], $matchw['team2_name'], 1, 9999, true); } else { $data['cups'][$run]['winner'] = cs_cups_team($cs_lang, $cup['cups_system'], $matchw['squad2_id'], $matchw['team2_name'], 1, 9999, true); $data['cups'][$run]['second'] = cs_cups_team($cs_lang, $cup['cups_system'], $matchw['squad1_id'], $matchw['team1_name'], 1, 9999, true); } } else { $data['cups'][$run]['if']['open'] = true; } $run++; } } else { $data['if']['hascups'] = false; $data['count']['all'] = 0; } $cachedata = cs_subtemplate(__FILE__, $data, 'cups', 'halloffame'); if (function_exists('cs_datacache_load')) { cs_datacache_create('cups', 'halloffame', $key, $cachedata, 0); } echo $cachedata;
header('Content-type: text/css'); echo $cachedata; exit(0); } $data = array(); $width = empty($cs_option['width']) ? empty($_GET['width']) ? 0 : (int) $_GET['width'] : $cs_option['width']; $height = empty($cs_option['height']) ? 0 : $cs_option['height']; $data['grid']['width'] = $width > 0 ? 'width: ' . $width . 'px;' : ''; $data['grid']['height'] = $height > 0 ? 'height: ' . $height . 'px;' : ''; $data['grid']['score_width'] = CS_CUPS_GRID_SCORE_WIDTH; $data['grid']['image_width'] = CS_CUPS_GRID_IMAGE_WIDTH; $data['grid']['image_height'] = CS_CUPS_GRID_IMAGE_HEIGHT; $ocol = cs_cups_dechex(explode(',', $cs_option['color_bg'])); $col_bg = $ocol[0] . $ocol[1] . $ocol[2]; $ocol = cs_cups_dechex(explode(',', $cs_option['color_team_fg'])); $col_team_font = $ocol[0] . $ocol[1] . $ocol[2]; $ocol = cs_cups_dechex(explode(',', $cs_option['color_team_bg'])); $col_team_bg = $ocol[0] . $ocol[1] . $ocol[2]; $ocol = cs_cups_dechex(explode(',', $cs_option['color_team_bg_lb'])); $col_team_bg_lb = $ocol[0] . $ocol[1] . $ocol[2]; $data['grid']['color_bg'] = $col_bg; $data['grid']['color_team_font'] = $col_team_font; $data['grid']['color_team_bg'] = $col_team_bg; $data['grid']['color_team_bg_lb'] = $col_team_bg_lb; header('Content-type: text/css'); $style = cs_subtemplate(__FILE__, $data, 'cups', 'tree_style'); if (function_exists('cs_datacache_load')) { cs_datacache_create('cups', 'style', $key, $style, 0); } echo $style; exit(0);