$data['com'] = cs_sql_option(__FILE__, 'cups'); $s_bg = cs_cups_dechex(explode(',', $data['com']['color_bg'])); $data['com']['sample_bg'] = '<span style="color: #' . $s_bg[0] . $s_bg[1] . $s_bg[2] . '; font-weight: bold;">' . $cs_lang['example'] . '</span>'; $s_bg = cs_cups_dechex(explode(',', $data['com']['color_line'])); $data['com']['sample_line'] = '<span style="color: #' . $s_bg[0] . $s_bg[1] . $s_bg[2] . '; font-weight: bold;">' . $cs_lang['example'] . '</span>'; $s_bg = cs_cups_dechex(explode(',', $data['com']['color_team_bg'])); $data['com']['sample_team_bg'] = '<span style="color: #' . $s_bg[0] . $s_bg[1] . $s_bg[2] . '; font-weight: bold;">' . $cs_lang['example'] . '</span>'; $s_bg = cs_cups_dechex(explode(',', $data['com']['color_team_bg_lb'])); $data['com']['sample_team_bg_lb'] = '<span style="color: #' . $s_bg[0] . $s_bg[1] . $s_bg[2] . '; font-weight: bold;">' . $cs_lang['example'] . '</span>'; $s_bg = cs_cups_dechex(explode(',', $data['com']['color_team_fg'])); $data['com']['sample_team_fg'] = '<span style="color: #' . $s_bg[0] . $s_bg[1] . $s_bg[2] . '; font-weight: bold;">' . $cs_lang['example'] . '</span>'; $s_bg = cs_cups_dechex(explode(',', $data['com']['color_headline'])); $data['com']['sample_headline'] = '<span style="color: #' . $s_bg[0] . $s_bg[1] . $s_bg[2] . '; font-weight: bold;">' . $cs_lang['example'] . '</span>'; $s_bg = cs_cups_dechex(explode(',', $data['com']['color_title1'])); $data['com']['sample_title1'] = '<span style="color: #' . $s_bg[0] . $s_bg[1] . $s_bg[2] . '; font-weight: bold;">' . $cs_lang['example'] . '</span>'; $s_bg = cs_cups_dechex(explode(',', $data['com']['color_title2'])); $data['com']['sample_title2'] = '<span style="color: #' . $s_bg[0] . $s_bg[1] . $s_bg[2] . '; font-weight: bold;">' . $cs_lang['example'] . '</span>'; $data['com']['scores_yes'] = $data['com']['scores'] == 1 ? 'checked' : ''; $data['com']['scores_no'] = $data['com']['scores'] == 1 ? '' : 'checked'; $data['com']['html_yes'] = $data['com']['html'] == 1 ? 'checked' : ''; $data['com']['html_no'] = $data['com']['html'] == 1 ? '' : 'checked'; $data['com']['notify_pm'] = $data['com']['notify_pm'] == 1 ? 'checked' : ''; $data['com']['notify_email'] = $data['com']['notify_email'] == 1 ? 'checked' : ''; /* lightbox */ $levels = 0; $var = ''; while ($levels < 2) { $data['com']['lightbox'] == $levels ? $sel = 1 : ($sel = 0); $var .= cs_html_option($cs_lang['light_' . $levels], $levels, $sel); $levels++; }
$width = empty($_GET['width']) ? empty($cs_option['width']) ? 600 : $cs_option['width'] : (int) $_GET['width']; $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_line'])); $col_line = $ocol[0] . $ocol[1] . $ocol[2]; $ocol = cs_cups_dechex(explode(',', $cs_option['color_title1'])); $col_csp_red = $ocol[0] . $ocol[1] . $ocol[2]; $ocol = cs_cups_dechex(explode(',', $cs_option['color_title2'])); $col_csp_grey = $ocol[0] . $ocol[1] . $ocol[2]; $ocol = cs_cups_dechex(explode(',', $cs_option['color_headline'])); $col_cup_headline = $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]; $ocol = cs_cups_dechex(explode(',', $cs_option['color_team_fg'])); $col_team_font = $ocol[0] . $ocol[1] . $ocol[2]; $datahtml['tree']['style1'] = 'color: #' . $col_csp_red . ';'; $datahtml['tree']['title1'] = $cs_option['title1']; $datahtml['tree']['style2'] = 'color: #' . $col_csp_grey . ';'; $datahtml['tree']['title2'] = $cs_option['title2']; $datahtml['tree']['style3'] = 'color: #' . $col_cup_headline . ';'; $datahtml['tree']['title3'] = ' - ' . $cs_lang['cup'] . ': ' . $cup['cups_name'] . $lb; $gwhere = 'games_id = ' . $cup['games_id']; $cs_game = cs_sql_select(__FILE__, 'games', 'games_name, games_id', $gwhere); $gameicon = 'uploads/games/' . $cup['games_id'] . '.gif'; $datahtml['game']['icon'] = file_exists($gameicon) ? cs_html_img($gameicon, 0, 0, 0, $cs_game['games_name'], $cs_game['games_name']) : ''; /* the number of columns per round. LB needs one extra. */ if ($cs_option['scores'] == 1) { $c = 3; } else {