function display() { global $mainframe, $database, $jTips, $jLang, $jPilot, $Itemid, $jTipsCurrentUser, $mosConfig_absolute_path; $my = $mainframe->getUser(); ?> <script type='text/javascript'> //var mySavingBlock; function getDashSeason(obj) { var id = obj.options[obj.selectedIndex].value; window.location.href="<?php echo html_entity_decode(jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&season=")); ?> " + id; } </script> <?php include $mosConfig_absolute_path . '/components/com_jtips/views/Dashboard/Dashlets/SeasonSummary.php'; if (!$this->jSeason->disable_tips and $jTips['LastWin'] and isset($jTips['LastRoundSummary']) and count($jTips['LastRoundSummary']) > 0 and !empty($this->jRound->id)) { include $mosConfig_absolute_path . '/components/com_jtips/views/Dashboard/Dashlets/LastRoundSummary.php'; } if (!$this->jSeason->disable_tips and $jTipsCurrentUser->inSeason($this->jSeason) and $jTipsCurrentUser->status == 1 and isset($jTips['ScoreSummary']) and count($jTips['ScoreSummary']) > 0) { include $mosConfig_absolute_path . '/components/com_jtips/views/Dashboard/Dashlets/ScoreSummary.php'; } // BUG 339 - better subscription system if ($this->jSeason->id) { // we have a competition to join include $mosConfig_absolute_path . '/components/com_jtips/views/Dashboard/Dashlets/SubscriptionStatus.php'; } // BUG 404 - post dash text if ($jTips['PostDashboardText']) { ?> <div class='jtips_post_dashboard'><?php echo jTipsStripslashes($jTips['PostDashboardText']); ?> </div> <?php } $leftCount = jTipsGetModuleCount('jTipsDash'); if ($leftCount > 0) { $leftSplit = floor(100 / $leftCount); echo jTipsRenderModules('jTipsDash', $leftSplit); } }
/** * Take data assigned in $data and display it */ function display() { global $jTipsCurrentUser, $mainframe, $database, $jLang, $jTips, $mosConfig_live_site; $mosConfig_offset = $mainframe->getCfg('offset'); //$Itemid = jTipsGetParam($_REQUEST, 'Itemid', ''); global $Itemid; //$mainframe->setPageTitle(getComponentName($Itemid).' > '.$jTips['Menu']['Tips']); //jTipsCommonHTML::loadOverlib(); $useJs = false; if ($jTips['JsLadder'] != 'none') { $useJs = true; } if ($jTips['EnableComments'] == 1 and $jTips['EnableCommentFilter'] == 1) { $checkComment = "onclick='return validateComment(\"comment\");'"; } else { $checkComment = "onClick='document.tips_form.submit();'"; } //jtips_HTML::buildMenu('tips', $this->jSeason, $this->jTipsUser); //jtips_HTML::seasonsList($this->jTipsUser, $this->jSeasons, "onchange='getSeason(this);'", true, jTipsGetParam($_REQUEST, 'season', jTipsGetParam($_REQUEST, 'season_id', false))); $postURL = jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}"); ?> <script type='text/javascript'> function getSeason(obj) { var id = obj.options[obj.selectedIndex].value; return window.location.href='<?php echo html_entity_decode(jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&task=Tips&season=")); ?> ' + id; } </script> <form action='<?php echo $postURL; ?> ' method='post' name='tips_form' id='tips_form'> <input type='hidden' name='option' value='com_jtips' /> <input type='hidden' name='view' value='Tips' /> <input type="hidden" name="action" value="save" /> <input type='hidden' name='user_id' value='<?php echo $jTipsCurrentUser->id; ?> ' /> <input type="hidden" name="<?php echo jTipsSpoofValue(); ?> " value="1" /> <h2 class="contentheading jmain_heading"><?php echo $this->jSeason->name; ?> </h2> <h3 align="center"> <?php if ($this->jRound->getPrev()) { ?> <a style="font-size:smaller;" href='<?php echo jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=Tips&rid=" . $this->jRound->getPrev()); ?> '>« <?php echo $jLang['_COM_PREV_ROUND']; ?> </a> <?php } echo " " . $jLang['_COM_DASH_ROUND'] . " " . $this->jRound->round . " "; if ($this->jRound->getNext()) { ?> <a style="font-size:smaller;" href='<?php echo jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=Tips&rid=" . $this->jRound->getNext()); ?> '><?php echo $jLang['_COM_NEXT_ROUND']; ?> »</a> <?php } ?> </h3> <?php if ($this->jRound->exists()) { $jGameParams = array('round_id' => $this->jRound->id, 'order' => array('type' => 'order', 'by' => 'position', 'direction' => 'ASC')); $jGame = new jGame($database); $jGames = forceArray($jGame->loadByParams($jGameParams)); $tags = "class='sectiontableheader jtableheader'"; ?> <table width="100%" cellspacing="0"> <thead> <tr class="sectiontableheader"> <th <?php echo $tags; ?> width="33%"><?php echo $jLang['_COM_TIPS_TIPPING_CLOSE']; ?> </th> <?php if ($jTips['ShowJSCountdown'] == 1) { ?> <th <?php echo $tags; ?> width="34%"><?php echo $jLang['_COM_TIPS_TIME_TO_CLOSE']; ?> </th> <?php } ?> <th <?php echo $tags; ?> width="33%"><?php echo $jLang['_COM_TIPS_LASTUP']; ?> </th> </tr> </thead> <tbody> <tr class="sectiontableentry1"> <td style="text-align:center;"> <?php //BUG 136 - show closed/closes depending on start time echo TimeDate::toDisplayDateTime($this->jRound->start_time, false); ?> </td> <?php if ($jTips['ShowJSCountdown'] == 1) { ?> <td><div id='countdown' style="text-align:center;" class="highlight"><?php echo $jLang['_COM_CLOSED']; ?> </div></td> <?php } $jTipParams = array('game_id' => array('type' => 'reference', 'query' => "SELECT DISTINCT id FROM #__jtips_games WHERE round_id = " . $this->jRound->id), 'user_id' => $jTipsCurrentUser->id); $jTip = new jTip($database); $jTipss = forceArray($jTip->loadByParams($jTipParams)); ?> <td><?php if (count($jTipss) > 0) { echo TimeDate::toDisplayDateTime($jTipss[0]->updated, false); } else { echo " "; } ?> </td> </tr> </tbody> </table> <?php if (jTipsGetParam($jTips, 'TeamLadderPopup', 0)) { $url = "view=TeamLadder&Itemid={$Itemid}&menu=0"; ?> <p style="text-align:center;font-weight:bold;"><?php if (isJoomla15()) { /*?> <a class="modal" rel="{handler: 'iframe', size: {x: <?php echo $jTips['ShowTipsWidth']; ?>, y: <?php echo $jTips['ShowTipsHeight']; ?>}}" href="<?php echo jTipsRoute("index2.php?option=com_jtips&" .$url); ?>" title='Team Ladder'><?php echo $jLang['_COM_TIPS_SHOWHIDE']; ?></a> <?php*/ // better popup handling in J1.5 JHTML::_('behavior.modal'); $rel = json_encode(array('size' => array('x' => $jTips['ShowTipsWidth'], 'y' => $jTips['ShowTipsHeight']))); $url = jTipsRoute("index.php?option=com_jtips&tmpl=component&" . $url); $attribs = array('class' => 'modal', 'rel' => str_replace('"', "'", $rel), 'title' => $jLang['_COM_TIPS_SHOWHIDE']); echo JHTML::link($url, $jLang['_COM_TIPS_SHOWHIDE'], $attribs); } else { ?> <a href='javascript:void(0);' onClick="openPopup('<?php echo $url; ?> ', 'Team Ladder');"><?php echo $jLang['_COM_TIPS_SHOWHIDE']; ?> </a> <?php } ?> </p><?php } //BUG 189 - Which order should the tips panel be shown in if ($this->jSeason->tips_layout == 'away') { $left = 'away'; $right = 'home'; } else { $left = 'home'; $right = 'away'; } ?> <table align='center' width='100%' class="jdatatable" cellspacing="0"> <tr> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_GAME_' . strtoupper($left)]; ?> </th> <?php if ($this->jSeason->team_starts) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_' . strtoupper($left) . 'START']; ?> </th> <?php } if ($this->jSeason->pick_score == 1) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_' . strtoupper($left) . 'SCORE']; ?> </th> <?php } ?> <th <?php echo $tags; ?> > <?php if ($this->jSeason->pick_draw == 1 and ($this->jSeason->pick_score and !$jTips['HideTeamSelect'] or !$this->jSeason->pick_score)) { echo " " . $jLang['_COM_GAME_DRAW'] . " "; } else { echo " "; } ?> </th> <?php if ($this->jSeason->pick_score == 1) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_' . strtoupper($right) . 'SCORE']; ?> </th> <?php } if ($this->jSeason->team_starts) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_' . strtoupper($right) . 'START']; ?> </th> <?php } ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_GAME_' . strtoupper($right)]; ?> </th> <?php if ($this->jSeason->pick_margin == 1) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_MARGIN']; ?> </th> <?php } if ($this->jSeason->pick_bonus >= 1) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_BONUS']; ?> </th> <?php } if ($this->jSeason->game_times) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_TIME']; ?> </th> <?php } if ($this->jRound->scored == 1) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_RESULT']; ?> </th> <?php } ?> <th <?php echo $tags; ?> > </th> </tr> <?php // BUG 316 - have TimeDate::toDatabaseDateTime around jRound->start_time was deducting an offset from a GMT time - bad if ($this->jRound->start_time < gmdate('Y-m-d H:i:s') or $jTipsCurrentUser->hasTipped($this->jRound->id) and $jTips['TipLockout'] == 1) { $disabled = "disabled"; } else { $disabled = ''; } $hasTipped = count($jTipss) > 0; $rowIndex = 0; foreach ($jGames as $jGame) { $leftTeam = new jTeam($database); $rightTeam = new jTeam($database); $jTipParams = array('user_id' => $jTipsCurrentUser->id, 'game_id' => $jGame->id); $jTip->loadByParams($jTipParams); $left_id_field = $left . '_id'; $right_id_field = $right . '_id'; $leftLoaded = $rightLoaded = false; if ($jGame->{$left_id_field}) { $leftTeam->load($jGame->{$left_id_field}); $leftLoaded = true; } if ($jGame->{$right_id_field}) { $rightTeam->load($jGame->{$right_id_field}); $rightLoaded = true; } if (!$leftLoaded and $rightLoaded) { $this->byes[] = $rightTeam; } if ($leftLoaded and !$rightLoaded) { $this->byes[] = $leftTeam; } if (!$leftLoaded or !$rightLoaded) { continue; } if ($jGame->winner_id == $leftTeam->id) { $left_style = "font-weight:bold;"; $right_style = ""; } else { if ($jGame->winner_id == -1) { $left_style = "font-style:italics;"; $right_style = "font-style:italics;"; } else { if ($jGame->winner_id == $rightTeam->id) { $left_style = ""; $right_style = "font-weight:bold;"; } else { $left_style = ""; $right_style = ""; } } } $rowClasses = "class='sectiontableentry" . ($rowIndex % 2 + 1) . " jtablerow" . ($rowIndex % 2 + 1) . "'"; if ($this->jSeason->pick_score and $jGame->has_score) { $onClick = 'onClick="switchScore(' . $jGame->id . ');"'; } else { $onClick = ''; } ?> <tr <?php echo $rowClasses; ?> > <td style='text-align:right;<?php echo $left_style; ?> '><label for="<?php echo $left; ?> _game<?php echo $jGame->id; ?> "><?php echo $leftTeam->getDisplayLogoName('right'); ?> </label> <?php if ($this->jSeason->pick_score and !$jTips['HideTeamSelect'] or !$this->jSeason->pick_score) { ?> <input type='radio' <?php echo $onClick; ?> class="inputbox" name='game<?php echo $jGame->id; ?> ' id='<?php echo $left; ?> _game<?php echo $jGame->id; ?> ' value='<?php echo $leftTeam->id; ?> ' <?php echo $jTip->tip_id == $leftTeam->id ? 'checked="checked"' : ''; ?> <?php echo $disabled; ?> /> <?php } ?> </td> <?php if ($this->jSeason->team_starts) { $left_start_field = $left . '_start'; $leftStart = $jGame->{$left_start_field} + 0; if ($jGame->{$left_start_field} > 0) { $leftStart = "+{$leftStart}"; } else { if ($leftStart == 0) { $leftStart = " "; } } ?> <td style='text-align:center;'><?php echo $leftStart; ?> </td> <?php } if ($this->jSeason->pick_score == 1) { ?> <td style='text-align:center;'> <?php if ($jGame->has_score == 1) { ?> <input type='text' onKeyUp="this.value=this.value.replace(/[^\d]+/, '');" class="inputbox" id="<?php echo $left . $jGame->id; ?> " name='<?php echo $left . $jGame->id; ?> ' style='text-align:center;' maxLength='5' size='5' value='<?php $left_score_field = $left . '_score'; echo $jTip->{$left_score_field}; ?> ' <?php echo $disabled; ?> onBlur="setSelectedTeam(<?php echo $jGame->id; ?> );" /> <?php } else { ?> <?php } ?> </td> <?php } if ($this->jSeason->pick_draw == 1 and ($this->jSeason->pick_score and !$jTips['HideTeamSelect'] or !$this->jSeason->pick_score)) { ?> <td style='text-align:center;'> <input class="inputbox" type='radio' name='game<?php echo $jGame->id; ?> ' id="draw_game<?php echo $jGame->id; ?> " value='-1' <?php echo $jTip->tip_id == -1 ? 'checked="checked"' : ''; ?> <?php echo $disabled; ?> <?php echo $onClick; ?> /></td> <?php } else { ?> <td style='text-align:center;'> <?php echo $jLang['_COM_TEAM_VS']; ?> </td> <?php } if ($this->jSeason->pick_score == 1) { ?> <td style='text-align:center;'> <?php if ($jGame->has_score == 1) { ?> <input type='text' onKeyUp="this.value=this.value.replace(/[^\d]+/, '');" class="inputbox" id="<?php echo $right . $jGame->id; ?> " name='<?php echo $right . $jGame->id; ?> ' style='text-align:center;' maxLength='5' size='5' value='<?php $right_score_field = $right . '_score'; echo $jTip->{$right_score_field}; ?> ' <?php echo $disabled; ?> onBlur="setSelectedTeam(<?php echo $jGame->id; ?> );" /> <?php } else { ?> <?php } ?> </td> <?php } $right_start_field = $right . '_start'; if ($this->jSeason->team_starts) { $rightStart = $jGame->{$right_start_field} + 0; if ($jGame->{$right_start_field} > 0) { $rightStart = "+{$rightStart}"; } else { if ($rightStart == 0) { $rightStart = " "; } } ?> <td style='text-align:center;'><?php echo $rightStart; ?> </td> <?php } ?> <td style='text-align:left;<?php echo $right_style; ?> '> <?php if ($this->jSeason->pick_score and !$jTips['HideTeamSelect'] or !$this->jSeason->pick_score) { ?> <input type='radio' <?php echo $onClick; ?> class="inputbox" name='game<?php echo $jGame->id; ?> ' value='<?php echo $rightTeam->id; ?> ' <?php echo $jTip->tip_id == $rightTeam->id ? 'checked="checked"' : ''; ?> <?php echo $disabled; ?> id="<?php echo $right; ?> _game<?php echo $jGame->id; ?> "/> <?php } ?> <label for="<?php echo $right; ?> _game<?php echo $jGame->id; ?> "><?php echo $rightTeam->getDisplayLogoName('left'); ?> </label> </td> <?php if ($this->jSeason->pick_margin == 1) { ?> <td style='text-align:center;'> <?php if ($jGame->has_margin == 1) { ?> <input type='text' onKeyUp="this.value=this.value.replace(/[^\d]+/, '');" class="inputbox" name='margin<?php echo $jGame->id; ?> ' style='text-align:center;' maxLength='5' size='5' value='<?php echo $jTip->margin; ?> ' <?php echo $disabled; ?> /> <?php } else { ?> <?php } ?> </td> <?php } if ($this->jSeason->pick_bonus > 0) { if ($jGame->has_bonus == 1) { // BUG 302 - awayTeam and homeTeam do not exist anymore $bonusTeams = array('' => $jLang['_ADMIN_CONF_NONE'], $jGame->{$left_id_field} => $leftTeam->getName(), $jGame->{$right_id_field} => $rightTeam->getName()); if ($this->jSeason->pick_bonus == 2) { $bonusTeams['-2'] = $jLang['_ADMIN_SEASON_EPTB_BOT']; } ?> <td style='text-align:center;'><?php echo makeSelectList($bonusTeams, 'bonus' . $jGame->id, "{$disabled} class='inputbox'", $jTip->bonus_id); ?> </td> <?php } else { ?> <td style='text-align:center;'> </td> <?php } } //show the game time if ($this->jSeason->game_times) { ?> <td><?php if ($jGame->start_time) { echo TimeDate::toDisplayDateTime($jGame->start_time, false); } else { echo " "; } ?> </td><?php } if ($this->jRound->scored == 1) { $left_score_field = $left . '_score'; $right_score_field = $right . '_score'; ?> <th <?php echo $tags; ?> ><?php echo $jGame->{$left_score_field} . " - " . $jGame->{$right_score_field}; ?> </th> <?php } ?> <td><?php if (!empty($jGame->description)) { $description = nl2br(stripslashes($jGame->description)); echo jTipsToolTip($description, $jLang['_COM_GAME_ADDITIONAL_INFO']); } else { echo " "; } ?> </td> </tr> <?php $rowIndex++; } ?> </table> <div> <?php $this->renderByes(); ?> <table width="100%" cellspacing="10"> <?php if ($jTips['DoubleUp'] == 1) { if ($jTipsCurrentUser->doubleup > 0 && $jTipsCurrentUser->doubleup < $this->jRound->id || $disabled == 'disabled') { $disable_doubleup = 'disabled'; } else { $disable_doubleup = ''; } ?> <tr> <td style='text-align:center'><h4><label for="doubleup"><?php echo $jLang['_COM_GAME_USEDOUBLE']; ?> </label> <input type='checkbox' class="inputbox" id="doubleup" name='doubleup' value='<?php echo $this->jRound->id; ?> ' <?php echo $jTipsCurrentUser->doubleup == $this->jRound->id ? "checked" : ""; ?> <?php echo $disable_doubleup; ?> /></h4></td> </tr> <?php } if ($jTips['EnableComments'] == 1) { if ($disabled == 'disabled') { $commentArea = "<em>"; if (strlen($this->jComment->comment) > 0) { $commentArea .= $this->jComment->comment; } else { $commentArea .= $jLang['_ADMIN_CONF_NONE']; } $commentArea .= "</em>"; } else { $comment = str_replace('"', "'", $this->jComment->comment); $commentArea = ' <input name="comment" id="comment" size="50" class="inputbox" value="' . $comment . '" /> '; } ?> <tr> <td style="text-align:center;"><?php echo $jLang['_COM_DASH_COMMENT']; ?> : <?php echo $commentArea; ?> </td> </tr> <?php } ?> <tr> <td style='text-align:center' id='submittipsbuttonarea'><?php echo $disabled != "disabled" ? "<input type='button' class='button' name='submittips' id='submittips' value='" . $jLang['_COM_TIPS_SAVE'] . "' {$checkComment} />" : ""; ?> </td> </tr> <tr> <td style='text-align:center; padding-top:5px; display:none;' id='ajaxloading'></td> </tr> </table> </div> <input type='hidden' name='round_id' value='<?php echo $this->jRound->id; ?> ' /> </form> <?php } else { if ($this->jRound->exists() and TimeDate::toDatabaseDateTime($this->jRound->start_time) > gmdate('Y-m-d H:i:s')) { ?> <h2 style='text-align:center'><?php echo $jLang['_COM_DASH_ROUND'] . " " . $this->jRound->round; ?> </h2> <h2 style='text-align:center'><?php echo $jLang['_COM_ROUND_CLOSED']; ?> </h2> <?php } else { if ($this->jRound->exists()) { ?> <h2 style='text-align:center'><?php echo $jLang['_COM_DASH_ROUND'] . " " . $this->jRound->round; ?> </h2> <?php } else { ?> <h2 style='text-align:center'><?php echo $jLang['_COM_ROUND_NOGAMES']; ?> </h2> <?php } } } if ($this->jRound->getStatus() === false and !empty($jTipsCurrentUser->id)) { $userTime = strtotime($this->jRound->start_time) - TimeDate::getOffset(false); $targetTime = date('Y-m-d H:i:s', $userTime); if ($jTips['ShowJSCountdown'] == 1) { $field = "'countdown'"; } else { $field = "false"; } ?> <script type='text/javascript'> window.addEvent('domready', function(){ var year = <?php echo TimeDate::format($targetTime, '%Y', true, false); ?> ; var month = <?php echo TimeDate::format($targetTime, '%m', true, false) - 1; ?> ; var day = <?php echo TimeDate::format($targetTime, '%d', true, false); ?> ; var hour = <?php echo TimeDate::format($targetTime, '%H', true, false); ?> ; var min = <?php echo TimeDate::format($targetTime, '%M', true, false); ?> ; var sec = 0; jTipsCountdown(year, month, day, hour, min, 1, <?php echo $field; ?> ); }); </script> <?php } }
/** * Take data assigned in $data and display it */ function display() { global $jTipsCurrentUser, $mainframe, $database, $jLang, $jTips, $mosConfig_live_site; $mosConfig_offset = $mainframe->getCfg('offset'); global $Itemid; $useJs = false; if ($jTips['JsLadder'] != 'none') { $useJs = true; } ?> <h2 class="contentheading jmain_heading"><?php echo $this->jSeason->name; ?> </h2> <h3 align="center"><?php if ($this->jRound->getPrev()) { ?> <a style="font-size: smaller;" href='<?php echo jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=Tips&layout=locked&rid=" . $this->jRound->getPrev()); ?> '>« <?php echo $jLang['_COM_PREV_ROUND']; ?> </a> <?php } echo " " . $jLang['_COM_DASH_ROUND'] . " " . $this->jRound->round . " "; if ($this->jRound->getNext()) { ?> <a style="font-size: smaller;" href='<?php echo jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=Tips&layout=locked&rid=" . $this->jRound->getNext()); ?> '><?php echo $jLang['_COM_NEXT_ROUND']; ?> »</a> <?php } ?> </h3> <?php if ($this->jRound->exists()) { $jGameParams = array('round_id' => $this->jRound->id, 'order' => array('type' => 'order', 'by' => 'position', 'direction' => 'ASC')); $jGame = new jGame($database); $jGames = forceArray($jGame->loadByParams($jGameParams)); $tags = "class='sectiontableheader jtableheader'"; ?> <table width="100%" cellspacing="0"> <thead> <tr class="sectiontableheader"> <th <?php echo $tags; ?> width="50%"><?php echo $jLang['_COM_ROUND_START_TIME']; ?> </th> <?php if ($jTips['ShowJSCountdown'] == 1) { ?> <th <?php echo $tags; ?> width="50%"><?php echo $jLang['_COM_ROUND_TIME_TO_START']; ?> </th> <?php } ?> </tr> </thead> <tbody> <tr class="sectiontableentry1"> <td style="text-align: center;"><?php //BUG 136 - show closed/closes depending on start time echo TimeDate::toDisplayDateTime($this->jRound->start_time, false); ?> </td> <?php if ($jTips['ShowJSCountdown'] == 1) { ?> <td> <div id='countdown' style="text-align: center;" class="highlight"><?php echo $jLang['_COM_CLOSED']; ?> </div> </td> <?php } ?> </tr> </tbody> </table> <?php if (jTipsGetParam($jTips, 'TeamLadderPopup', 0)) { $url = "view=TeamLadder&Itemid={$Itemid}&menu=0"; ?> <p style="text-align: center; font-weight: bold;"> <?php if (isJoomla15()) { // better popup handling in J1.5 JHTML::_('behavior.modal'); $rel = json_encode(array('size' => array('x' => $jTips['ShowTipsWidth'], 'y' => $jTips['ShowTipsHeight']))); $url = jTipsRoute("index.php?option=com_jtips&tmpl=component&" . $url); $attribs = array('class' => 'modal', 'rel' => str_replace('"', "'", $rel), 'title' => $jLang['_COM_TIPS_SHOWHIDE']); echo JHTML::link($url, $jLang['_COM_TIPS_SHOWHIDE'], $attribs); } else { ?> <a href='javascript:void(0);' onClick="openPopup('<?php echo $url; ?> ', 'Team Ladder');"><?php echo $jLang['_COM_TIPS_SHOWHIDE']; ?> </a> <?php } ?> </p><?php } //BUG 189 - Which order should the tips panel be shown in if ($this->jSeason->tips_layout == 'away') { $left = 'away'; $right = 'home'; } else { $left = 'home'; $right = 'away'; } ?> <table align='center' width='100%' class="jdatatable" cellspacing="0"> <tr> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_GAME_' . strtoupper($left)]; ?> </th> <?php if ($this->jSeason->team_starts) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_' . strtoupper($left) . 'START']; ?> </th> <?php } if ($this->jSeason->team_starts) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_' . strtoupper($right) . 'START']; ?> </th> <?php } ?> <th <?php echo $tags; ?> > </th> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_GAME_' . strtoupper($right)]; ?> </th> <?php if ($this->jSeason->game_times) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_TIME']; ?> </th> <?php } if ($this->jRound->scored == 1) { ?> <th <?php echo $tags; ?> ><?php echo $jLang['_COM_TIPS_RESULT']; ?> </th> <?php } ?> <th <?php echo $tags; ?> > </th> </tr> <?php $rowIndex = 0; foreach ($jGames as $jGame) { $leftTeam = new jTeam($database); $rightTeam = new jTeam($database); $left_id_field = $left . '_id'; $right_id_field = $right . '_id'; $leftLoaded = $rightLoaded = false; if ($jGame->{$left_id_field}) { $leftTeam->load($jGame->{$left_id_field}); $leftLoaded = true; } if ($jGame->{$right_id_field}) { $rightTeam->load($jGame->{$right_id_field}); $rightLoaded = true; } if (!$leftLoaded and $rightLoaded) { $this->byes[] = $rightTeam; } if ($leftLoaded and !$rightLoaded) { $this->byes[] = $leftTeam; } if (!$leftLoaded or !$rightLoaded) { continue; } if ($jGame->winner_id == $leftTeam->id) { $left_style = "font-weight:bold;"; $right_style = ""; } else { if ($jGame->winner_id == -1) { $left_style = "font-style:italics;"; $right_style = "font-style:italics;"; } else { if ($jGame->winner_id == $rightTeam->id) { $left_style = ""; $right_style = "font-weight:bold;"; } else { $left_style = ""; $right_style = ""; } } } $rowClasses = "class='sectiontableentry" . ($rowIndex % 2 + 1) . " jtablerow" . ($rowIndex % 2 + 1) . "'"; ?> <tr <?php echo $rowClasses; ?> > <td style='text-align:right;<?php echo $left_style; ?> '><label for="<?php echo $left; ?> _game<?php echo $jGame->id; ?> "><?php echo $leftTeam->getDisplayLogoName('right'); ?> </label></td> <?php if ($this->jSeason->team_starts) { $left_start_field = $left . '_start'; $leftStart = $jGame->{$left_start_field} + 0; if ($jGame->{$left_start_field} > 0) { $leftStart = "+{$leftStart}"; } else { if ($leftStart == 0) { $leftStart = " "; } } ?> <td style='text-align: center;'><?php echo $leftStart; ?> </td> <?php } ?> <td style='text-align: center;'> <?php echo $jLang['_COM_TEAM_VS']; ?> </td> <?php $right_start_field = $right . '_start'; if ($this->jSeason->team_starts) { $rightStart = $jGame->{$right_start_field} + 0; if ($jGame->{$right_start_field} > 0) { $rightStart = "+{$rightStart}"; } else { if ($rightStart == 0) { $rightStart = " "; } } ?> <td style='text-align: center;'><?php echo $rightStart; ?> </td> <?php } ?> <td style='text-align:left;<?php echo $right_style; ?> '><label for="<?php echo $right; ?> _game<?php echo $jGame->id; ?> "><?php echo $rightTeam->getDisplayLogoName('left'); ?> </label> </td> <?php //show the game time if ($this->jSeason->game_times) { ?> <td><?php if ($jGame->start_time) { echo TimeDate::toDisplayDateTime($jGame->start_time, false); } else { echo " "; } ?> </td><?php } if ($this->jRound->scored == 1) { $left_score_field = $left . '_score'; $right_score_field = $right . '_score'; ?> <th <?php echo $tags; ?> ><?php echo $jGame->{$left_score_field} . " - " . $jGame->{$right_score_field}; ?> </th> <?php } ?> <td><?php if (!empty($jGame->description)) { $description = nl2br(stripslashes($jGame->description)); echo jTipsToolTip($description, $jLang['_COM_GAME_ADDITIONAL_INFO']); } else { echo " "; } ?> </td> </tr> <?php $rowIndex++; } ?> </table> <div><?php $this->renderByes(); ?> </div> <?php } else { if ($this->jRound->exists() and TimeDate::toDatabaseDateTime($this->jRound->start_time) > gmdate('Y-m-d H:i:s')) { ?> <h2 style='text-align: center'><?php echo $jLang['_COM_DASH_ROUND'] . " " . $this->jRound->round; ?> </h2> <h2 style='text-align: center'><?php echo $jLang['_COM_ROUND_CLOSED']; ?> </h2> <?php } else { if ($this->jRound->exists()) { ?> <h2 style='text-align: center'><?php echo $jLang['_COM_DASH_ROUND'] . " " . $this->jRound->round; ?> </h2> <?php } else { ?> <h2 style='text-align: center'><?php echo $jLang['_COM_ROUND_NOGAMES']; ?> </h2> <?php } } } if ($this->jRound->getStatus() === false) { $userTime = strtotime($this->jRound->start_time) - TimeDate::getOffset(false); $targetTime = date('Y-m-d H:i:s', $userTime); if ($jTips['ShowJSCountdown'] == 1) { $field = "'countdown'"; } else { $field = "false"; } ?> <script type='text/javascript'> window.addEvent('domready', function(){ var year = <?php echo TimeDate::format($targetTime, '%Y', true, false); ?> ; var month = <?php echo TimeDate::format($targetTime, '%m', true, false) - 1; ?> ; var day = <?php echo TimeDate::format($targetTime, '%d', true, false); ?> ; var hour = <?php echo TimeDate::format($targetTime, '%H', true, false); ?> ; var min = <?php echo TimeDate::format($targetTime, '%M', true, false); ?> ; var sec = 0; jTipsCountdown(year, month, day, hour, min, 1, <?php echo $field; ?> ); }); </script> <?php } }
$render->assign('jSeason', $jSeason); $render->assign('season_link', $season_link); $render->assign('adminUrl', "view=Administration&Itemid={$Itemid}&season=" . getSeasonID()); /* * TODO: BUG: XXX - the admin scripts were not loaded if the scorer was not part of a competition */ $my =& $mainframe->getUser(); if ($jSeason->scorer_id == $my->id) { //$mainframe->addCustomHeadTag('<script type="text/javascript" src="' .$mosConfig_live_site. '/components/com_jtips/views/Administration/Administration.js"></script>'); //$mainframe->addCustomHeadTag('<script type="text/javascript" src="' .$mosConfig_live_site. '/administrator/components/com_jtips/lib/date.js"></script>'); jTipsCommonHTML::loadCalendar(); } $render->displayPreferencesLink(); if (!isset($jTips['Menu']) or empty($jTips['Menu'])) { $jTips['Menu'] = array(); } if (array_key_exists($view, $jTips['Menu'])) { $classes = array('Dashboard' => array('class' => "sectiontableentry2 jmain_menu", 'cursor' => "cursor:pointer;cursor:hand;", 'onevent' => "onClick='window.location.href=\"" . jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=Dashboard{$season_link}") . "\"'; onmouseover='this.className=\"sectiontableentry1 jmain_menu_hover\"' onmouseout='this.className=\"sectiontableentry2 jmain_menu\"'"), 'CompetitionLadder' => array('class' => "sectiontableentry2 jmain_menu", 'cursor' => "cursor:pointer;cursor:hand;", 'onevent' => "onClick='window.location.href=\"" . jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=CompetitionLadder{$season_link}") . "\"' onmouseover='this.className=\"sectiontableentry1 jmain_menu_hover\"' onmouseout='this.className=\"sectiontableentry2 jmain_menu\"'"), 'TeamLadder' => array('class' => "sectiontableentry2 jmain_menu", 'cursor' => "cursor:pointer;cursor:hand;", 'onevent' => "onClick='window.location.href=\"" . jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=TeamLadder{$season_link}") . "\"' onmouseover='this.className=\"sectiontableentry1 jmain_menu_hover\"' onmouseout='this.className=\"sectiontableentry2 jmain_menu\"'")); if ($jSeason->disable_tips or is_a($jTipsCurrentUser, 'jTipsUser') and $jTipsCurrentUser->inSeason($jSeason) and $jTipsCurrentUser->status == '1') { $classes['Tips'] = array('class' => "sectiontableentry2 jmain_menu", 'cursor' => "cursor:pointer;cursor:hand;", 'onevent' => "onClick='window.location.href=\"" . jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=Tips{$season_link}") . "\"' onmouseover='this.className=\"sectiontableentry1 jmain_menu_hover\"' onmouseout='this.className=\"sectiontableentry2 jmain_menu\"'"); } $classes[$view]['class'] = 'sectiontableheader jmain_menu'; $classes[$view]['onevent'] = substr($classes[$view]['onevent'], 0, strpos($classes[$view]['onevent'], ' ')); $render->assign('menuitems', $classes); $size = round(100 / count($classes), 1); $render->assign('cellsize', $size); //Should the menu actually be shown? So far we have set the page title if (!$jTips['DisableMenu']) { $render->display(); } }
function display() { global $Itemid, $database, $mainframe, $jTips, $jLang, $mosConfig_live_site, $jTipsCurrentUser; $mosConfig_offset = $mainframe->getCfg('offset'); $postURL = jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}"); ?> <script type='text/javascript'> function getTeamLadder(obj) { document.getElementById('season_id').value = obj.options[obj.selectedIndex].value; document.ladderForm.submit(); //window.location.href='index.php?option=com_jtips&Itemid=<?php echo $Itemid; ?> &task=teams&season=' + id; } </script> <form action="<?php echo $postURL; ?> " method="post" name="ladderForm"> <input type="hidden" name="option" value="com_jtips" /> <input type="hidden" name="task" value="TeamLadder" /> <input type="hidden" name="season" id="season_id" /> <?php if (jTipsGetParam($_REQUEST, 'menu', 1)) { //jtips_HTML::seasonsList($jTipsCurrentUser, $this->jSeasons, "onchange='getTeamLadder(this);'", false, $this->jSeason->id); } ?> <table width='100%' cellspacing="0"> <thead> <?php ?> <tr class='sectiontableheader jtableheader'> <th class="jtips_team_ladder_header">#</th> <th class="jtips_team_ladder_header"> </th> <th class="jtips_team_ladder_header"><?php echo $jLang['_COM_TLD_TEAM']; ?> </th> <?php if (!empty($jTips['TeamLadderColumns'])) { foreach ($jTips['TeamLadderColumns'] as $field) { $lang_key = "_COM_TLD_ABR_" . strtoupper($field); ?> <th style="text-align:center" width="5" class="jtips_team_ladder_header"><?php echo $jLang[$lang_key]; ?> </th> <?php } } ?> </tr> <?php ?> </thead> <tbody> <?php $i = 1; $rowIndex = 0; $noteams = true; if (count($this->jTeams) > 0) { foreach ($this->jTeams as $jTeam) { $extra = ""; $thisRowIndex = $rowIndex++; ?> <tr class='sectiontableentry<?php echo $thisRowIndex % 2 + 1; ?> jtablerow<?php echo $thisRowIndex % 2 + 1; ?> '> <td style='text-align:center'><?php echo $i; ?> </td> <td style='text-align:center'> <?php $img = $jTeam->getLogo(); // if (jTipsFileExists(getJtipsImage($jTeam->logo))) { // $img .= "<img src='" .$mainframe->getCfg('live_site'); // if (!empty($jTips['SubDirectory'])) { // $img .= $jTips['SubDirectory']; // } // $img .= "/" .getJtipsImage($jTeam->logo). "' alt=' ' border='0' />"; // } if (empty($img)) { $img .= " "; } echo $img; ?> </td> <?php $popupUrl = "view=TeamLadder&Itemid={$Itemid}&action=ShowTeam&id=" . $jTeam->id; if (jTipsGetParam($_REQUEST, 'menu', 0) or !jTipsGetParam($_REQUEST, 'tmpl', false)) { if (isJoomla15()) { /*$x = $jTips['ShowTipsWidth']; $y = $jTips['ShowTipsHeight']; //BUG 274 - team ladder popup results in broken scroll bar if (basename($_SERVER['SCRIPT_FILENAME']) != 'index2.php') { $class = "class='modal'"; } else { $class = ''; } $teamname = "<a $class rel=\"{handler: 'iframe', size: {x: $x, y: $y}}\" href='" .jTipsRoute($mosConfig_live_site. "/index2.php?option=com_jtips&$popupUrl&menu=0"). "'>" .$jTeam->getName(). "</a>"; */ // better popup handling in J1.5 JHTML::_('behavior.modal'); $rel = json_encode(array('handler' => 'iframe', 'size' => array('x' => $jTips['ShowTipsWidth'], 'y' => $jTips['ShowTipsHeight']))); $url = jTipsRoute("index.php?option=com_jtips&tmpl=component&{$popupUrl}&menu=0"); $attribs = array('class' => 'modal', 'rel' => str_replace('"', "'", $rel), 'title' => $jTeam->getName()); $teamname = JHTML::link($url, $jTeam->getName(), $attribs); } else { $teamname = "<a href='javascript:void(0);' onClick='openPopup(\"{$popupUrl}\", \"" . $jTeam->getName() . "\");'>" . $jTeam->getName() . "</a>"; } } else { $teamname = $jTeam->getName(); } ?> <td align="left"><?php echo $teamname; ?> </td> <?php if (!empty($jTips['TeamLadderColumns'])) { foreach ($jTips['TeamLadderColumns'] as $field) { ?> <td style='text-align:center'><?php echo $jTeam->getTeamField($field); ?> </td> <?php } } ?> </tr> <?php $i++; } } else { ?> <tr> <td style='text-align:center' colspan='20'><?php echo $jLang['_COM_TEAMS_UNAVAILABLE']; ?> </td> </tr> <?php } $rowIndex = 0; ?> </tbody> </table> <table align='right' cellspacing="0"> <thead id="teamLegendHeader"> <tr> <th colspan='2' class='sectiontableheader'><?php echo $jLang['_COM_TLD_LEGEND']; ?> </th> </tr> </thead> <tbody id='teamLegend'> <?php if (!empty($jTips['TeamLadderColumns'])) { foreach ($jTips['TeamLadderColumns'] as $field) { $lang_key = "_COM_TLD_" . strtoupper($field); $abr_key = "_COM_TLD_ABR_" . strtoupper($field); $thisRowIndex = $rowIndex++; ?> <tr class='sectiontableentry<?php echo $thisRowIndex % 2 + 1; ?> jtablerow<?php echo $thisRowIndex % 2 + 1; ?> '> <td style='text-align:center;font-weight:bold;'><?php echo $jLang[$abr_key]; ?> </td> <td style='text-align:left'><?php echo $jLang[$lang_key]; ?> </td> </tr> <?php } } ?> </tbody> </table> <?php if ($jTips['JsLadder'] != 'none') { ?> <script type='text/javascript'> window.addEvent('domready', function() { var teamLegend = new Fx.Slide('teamLegend', { duration:<?php echo $jTips['JsLadderDuration'] * 1000; ?> , wait: true, <?php if ($jTips['JsLadder'] == 'linear') { echo "transition: Fx.Transitions.linear"; } else { ?> transition: Fx.Transitions.<?php echo $jTips['JsLadder']; ?> .<?php echo $jTips['JsLadderStyle']; ?> <?php } ?> }); teamLegend.hide(); $('teamLegendHeader').addEvent('click', function(e){ e = new Event(e); teamLegend.toggle(); e.stop(); }); $('teamLegendHeader').setStyle('cursor', 'pointer'); }); </script> <?php } ?> </form> <?php }
function display($hideColumns = array(), $showThisRound = true) { global $database, $jTips, $jLang, $mosConfig_live_site, $mainframe, $jTipsCurrentUser, $Itemid; if (empty($this->jTipsUser->id)) { echo ""; return; } ?> <style type="text/css"> @import url(<?php echo $mosConfig_live_site; ?> /templates/<?php echo jTipsGetTemplateName(); ?> /css/template.css); @import url(<?php echo $mosConfig_live_site; ?> /components/com_jtips/css/jtips-popup.css); </style> <script type='text/javascript' src='<?php echo $mosConfig_live_site; ?> /components/com_jtips/js/mootools.js'></script> <script type='text/javascript' src='<?php echo $mosConfig_live_site; ?> /components/com_jtips/js/Popup.js'></script> <?php $width = $jTips['ShowTipsWidth'] - 40; if ($jTips['ShowTipsPadding']) { ?> <div style="padding-top:10px;padding-left:10px;padding-right:10px;padding-bottom:10px;width:<?php echo $width; ?> px;text-align:center;"> <?php } ?> <h2 style='text-align:center;'><?php echo $this->jSeason->name; ?> <?php echo $jLang['_COM_SHOWTIPS_ROUND']; ?> <?php echo $this->jRound->round; ?> </h2> <?php if ($jTips['SocialIntegration'] and $showThisRound) { if ($jTips['SocialIntegration'] == 'cb') { $imgSrc = getCommunityBuilderAvatar($this->jTipsUser->user_id); $link = jTipsRoute("index.php?option=com_comprofiler&task=userProfile&user={$this->jTipsUser->user_id}"); } else { $imgSrc = getJomSocialAvatar($this->jTipsUser->user_id); $link = getJomSocialProfileLink($this->jTipsUser->user_id); } ?> <div style="text-align:center;"> <a href="javascript:void(0);" onClick="parent.location='<?php echo $link; ?> ';" title='View Profile' id='userLadderLink_<?php echo $this->jTipsUser->id; ?> '> <img src="<?php echo $imgSrc; ?> " border="0" alt="" /> </a> </div> <?php } if ($this->stats) { $this->showStats(); } //BUG 189 - Which order should the tips panel be shown in if ($this->jSeason->tips_layout == 'away') { $left = 'away'; $right = 'home'; } else { $left = 'home'; $right = 'away'; } ?> <table align='center' width='100%' border='0' cellspacing='0' style="padding-top:25px;"> <thead> <tr class="sectiontableheader"> <?php if (!in_array($left, $hideColumns)) { ?> <th class="sectiontableheader TB_th"><?php echo $jLang['_COM_GAME_' . strtoupper($left)]; ?> </th><?php } if (!in_array($right, $hideColumns)) { ?> <th class="sectiontableheader TB_th"><?php echo $jLang['_COM_GAME_' . strtoupper($right)]; ?> </th><?php } if (!in_array('tipped', $hideColumns)) { ?> <th class="sectiontableheader TB_th"><?php echo $jLang['_COM_DASH_TIPPED']; ?> </th><?php } if (!in_array('result', $hideColumns)) { ?> <th class="sectiontableheader TB_th"><?php echo $jLang['_COM_TIPS_RESULT']; ?> </th><?php } if (!in_array('more', $hideColumns)) { ?> <th class="sectiontableheader TB_th"><?php echo $jLang['_COM_TIPS_MORE']; ?> </th><?php } ?> </tr> </thead> <tbody> <?php $rowIndex = 0; $i = 1; $hasTipped = $this->jTipsUser->hasTipped($this->jRound->id); $byeTeams = array(); // Might want to list the byes somewhere later foreach ($this->jGames as $jGame) { $leftTeam = new jTeam($database); $left_id = $left . '_id'; //$leftTeam->load($jGame->$left_id); $rightTeam = new jTeam($database); $right_id = $right . '_id'; //$rightTeam->load($jGame->$right_id); // Skip games with byes $leftLoaded = $rightLoaded = false; if ($jGame->{$left_id}) { $leftTeam->load($jGame->{$left_id}); $leftLoaded = true; } if ($jGame->{$right_id}) { $rightTeam->load($jGame->{$right_id}); $rightLoaded = true; } if (!$leftLoaded and $rightLoaded) { $byeTeams[] = $rightTeam; } if ($leftLoaded and !$rightLoaded) { $byeTeams[] = $leftTeam; } if (!$leftLoaded or !$rightLoaded) { continue; } $jTip = new jTip($database); $jTipParams = array('user_id' => $this->jTipsUser->id, 'game_id' => $jGame->id); $jTip->loadByParams($jTipParams); $overlib_text = ""; if ($jTip->tip_id == $leftTeam->id) { $tipName = $leftTeam->getName(); $tip = $leftTeam->getDisplayLogoName(); $nonName = $rightTeam->getName(); } else { if ($jTip->tip_id == $rightTeam->id) { $tipName = $rightTeam->getName(); $tip = $rightTeam->getDisplayLogoName(); $nonName = $leftTeam->getName(); } else { if ($jTip->tip_id == -1) { $tip = $jLang['_COM_GAME_DRAW']; $tipName = $leftTeam->getName(); $nonName = $rightTeam->getName(); } else { $tip = $jLang['_ADMIN_CONF_NONE']; } } } if ($jGame->winner_id == $jTip->tip_id) { $result = "<img src='" . $mosConfig_live_site . "/administrator/images/tick.png' alt='Y' border='0' align='middle' />"; } else { $result = "<img src='" . $mosConfig_live_site . "/administrator/images/publish_x.png' alt='N' border='0' align='middle' />"; } $onClick = "onClick='toggleMore(" . $jGame->id . ", this)'"; $more = "<img src='{$mosConfig_live_site}/components/com_jtips/images/show.gif' alt='more' border='0' {$onClick} style='cursor:pointer;' />"; $rowIndex++; ?> <tr class="sectiontableentry<?php echo $i % 2 + 1; ?> " valign='middle'> <?php if (!in_array($left, $hideColumns)) { if ($jGame->winner_id == $leftTeam->id) { $style = "style='font-weight:bold;'"; } else { if ($jGame->winner_id == -1) { $style = "style='font-style:italic;'"; } else { $style = ''; } } ?> <td class="sectiontableentry<?php echo $i % 2 + 1; ?> " align="left" <?php echo $style; ?> ><?php echo $leftTeam->getDisplayLogoName(); ?> </td><?php } if (!in_array($right, $hideColumns)) { if ($jGame->winner_id == $rightTeam->id) { $style = "style='font-weight:bold;'"; } else { if ($jGame->winner_id == -1) { $style = "style='font-style:italic;'"; } else { $style = ''; } } ?> <td class="sectiontableentry<?php echo $i % 2 + 1; ?> " align="left" <?php echo $style; ?> ><?php echo $rightTeam->getDisplayLogoName(); ?> </td><?php } if (!in_array('tipped', $hideColumns)) { ?> <td class="sectiontableentry<?php echo $i % 2 + 1; ?> " align="left"><?php echo $tip; ?> </td><?php } if (!in_array('result', $hideColumns)) { ?> <td class="sectiontableentry<?php echo $i % 2 + 1; ?> " style='text-align:center;'><?php echo $result; ?> </td><?php } if (!in_array('more', $hideColumns)) { ?> <td class="sectiontableentry<?php echo $i % 2 + 1; ?> " style='text-align:center;'><?php echo $more; ?> </td><?php } ?> </tr> <?php /* * Process the in-depth game analysis */ $left_score_field = $left . '_score'; $right_score_field = $right . '_score'; if ($jGame->winner_id == $leftTeam->id) { $winnerName = $leftTeam->getDisplayLogoName(); } else { if ($jGame->winner_id == $rightTeam->id) { $winnerName = $rightTeam->getDisplayLogoName(); } else { if ($jGame->winner_id == -1) { $winnerName = $jLang['_COM_GAME_DRAW']; } else { $winnerName = ''; } } } $gameTotal = 0; $tipWidth = 30; if (in_array('actual', $hideColumns)) { $tipWidth += 30; } if (in_array('awarded', $hideColumns)) { $tipWidth += 10; } ?> <tr> <td colspan="50" id="moreInfo<?php echo $jGame->id; ?> " style="display:none;"> <table width="100%" cellspacing="0"> <thead> <tr class="sectiontableheader"> <th class="sectiontableheader" width="30%"> </th> <th class="sectiontableheader" width="<?php echo $tipWidth; ?> %"><?php echo $jLang['_COM_SHOWTIPS_PREDICTED']; ?> </th> <?php if (!in_array('actual', $hideColumns)) { ?> <th class="sectiontableheader" width="30%"><?php echo $jLang['_COM_SHOWTIPS_ACTUAL']; ?> </th> <?php } if (!in_array('awarded', $hideColumns)) { ?> <th class="sectiontableheader" width="10%"><?php echo $jLang['_COM_SHOWTIPS_AWARDED']; ?> </th> <?php } ?> </tr> </thead> <tbody> <tr class="sectiontableentry1"> <th class="sectiontableentry1"><?php echo $jLang['_COM_DASH_TIPPED']; ?> </th> <td class="sectiontableentry1" align="left"><?php echo $tip; ?> </td> <?php if (!in_array('actual', $hideColumns)) { ?> <td class="sectiontableentry1" align="left"><?php echo $winnerName; ?> </td> <?php } if (!in_array('awarded', $hideColumns)) { ?> <td class="sectiontableentry1" style="text-align:right;"> <?php if ($hasTipped) { if ($jGame->winner_id == $jTip->tip_id) { // BUG 379 - Incorrect value displayed when draw correctly picked if ($jGame->winner_id == -1) { echo $this->jSeason->user_draw; $gameTotal += $this->jSeason->user_draw; } else { echo $this->jSeason->user_correct; $gameTotal += $this->jSeason->user_correct; } } else { echo '0'; } } else { //what were the default points here? if ($this->jSeason->user_none >= 0) { echo $this->jSeason->user_none; $gameTotal += $this->jSeason->user_none; } else { if ($this->jSeason->user_none == -1) { //holy crap! you got the lowest score equivalence! echo $jLang['_ADMIN_CONF_ACT_NA']; } else { if ($this->jSeason->user_none == -2) { //you got all the away teams if ($jGame->winner_id == $jGame->away_id) { echo $this->jSeason->user_correct; $gameTotal += $this->jSeason->user_correct; } else { echo '0'; } } } } } ?> </td> <?php } ?> </tr> <?php $subIndex = 1; if ($jGame->has_score) { ?> <tr class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> "> <th class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> "><?php echo $jLang['_COM_DASH_POINTS']; ?> </th> <td class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> "><?php echo $jTip->{$left_score_field} + 0; ?> - <?php echo $jTip->{$right_score_field} + 0; ?> </td> <?php if (!in_array('actual', $hideColumns)) { ?> <td class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> "><?php echo $jGame->{$left_score_field}; ?> - <?php echo $jGame->{$right_score_field}; ?> </td> <?php } if (!in_array('awarded', $hideColumns)) { ?> <td class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> " style="text-align:right;"> <?php if ($jTip->{$left_score_field} == $jGame->{$left_score_field} and $jTip->{$right_score_field} == $jGame->{$right_score_field}) { echo $this->jSeason->user_pick_score; $gameTotal += $this->jSeason->user_pick_score; } else { echo '0'; } ?> </td> <?php } ?> </tr> <?php $subIndex++; } if ($jGame->has_margin) { ?> <tr class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> "> <th class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> "><?php echo $jLang['_COM_TIPS_MARGIN']; ?> </th> <td class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> "><?php echo $jTip->margin + 0; ?> </td> <?php if (!in_array('actual', $hideColumns)) { ?> <td class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> "><?php echo abs($jGame->{$left_score_field} - $jGame->{$right_score_field}); ?> </td> <?php } if (!in_array('awarded', $hideColumns)) { ?> <td class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> " style="text-align:right;"> <?php if ($jTip->margin == abs($jGame->{$left_score_field} - $jGame->{$right_score_field})) { echo $this->jSeason->user_pick_margin; $gameTotal += $this->jSeason->user_pick_margin; } else { echo '0'; } ?> </td> <?php } ?> </tr> <?php $subIndex++; } if ($jGame->has_bonus) { if ($jGame->bonus_id == $leftTeam->id) { $bonusTeam = $leftTeam->getDisplayLogoName(); } else { if ($jGame->bonus_id == $rightTeam->id) { $bonusTeam = $rightTeam->getDisplayLogoName(); } else { if ($jGame->bonus_id == -2) { $bonusTeam = 'Both Teams'; } else { $bonusTeam = ""; } } } if ($jTip->bonus_id == $leftTeam->id) { $bonusTip = $leftTeam->getDisplayLogoName(); } else { if ($jTip->bonus_id == $rightTeam->id) { $bonusTip = $rightTeam->getDisplayLogoName(); } else { if ($jTip->bonus_id == -2) { $bonusTip = 'Both Teams'; } else { $bonusTip = $jLang['_ADMIN_CONF_NONE']; } } } ?> <tr class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> "> <th class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> "><?php echo $jLang['_COM_SHOWTIPS_BONUS_TEAM']; ?> </th> <td class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> " align="left"><?php echo $bonusTip; ?> </td> <?php if (!in_array('actual', $hideColumns)) { ?> <td class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> "><?php echo $bonusTeam; ?> </td> <?php } if (!in_array('awarded', $hideColumns)) { ?> <td class="sectiontableentry<?php echo $subIndex % 2 + 1; ?> " style="text-align:right;"> <?php if ($jGame->bonus_id == $jTip->bonus_id) { echo $this->jSeason->user_pick_bonus; $gameTotal += $this->jSeason->user_pick_bonus; } else { echo '0'; } ?> </td> <?php } ?> </tr> <?php } ?> </tbody> <?php if (!in_array('awarded', $hideColumns)) { ?> <tfoot> <tr class="sectiontableheader"> <th class="sectiontableheader" colspan="3"><?php echo $jLang['_COM_SHOWTIPS_TOTAL']; ?> </th> <th class="sectiontableheader" style="text-align:right;"><?php echo $gameTotal; ?> </th> </tr> </tfoot> <?php } ?> </table> </td> </tr> <?php $i++; } ?> </tbody> </table> <?php /* * Do we have a comment to show */ $jComment = new jComment($database); $jCommentParams = array('user_id' => $this->jTipsUser->id, 'round_id' => $this->jRound->id); $jComment->loadByParams($jCommentParams); if (isset($jComment->comment) && !empty($jComment->comment)) { ?> <hr /> <p align="center"><?php echo jTipsStripslashes($jComment->comment); ?> </p> <?php } /* * Show the Peek into Next Round link be shown and parsed */ if ($jTips['EnableShowTips'] == 1 and $showThisRound) { //getCurrentUser $current_round_id = $this->jSeason->getCurrentRound(); $showFuture = false; if (isset($jTipsCurrentUser->id) and !empty($jTipsCurrentUser->id)) { if ($jTips['ShowTipsAccess'] == 'any' or $jTips['ShowTipsAccess'] == 'processed' and $jTipsCurrentUser->hasTipped($current_round_id) or $jTips['ShowTipsAccess'] == 'inprogress' and $this->jRound->getStatus() !== false) { $showFuture = true; } } else { if ($jTips['ShowTipsAccess'] == 'any') { $showFuture = true; } } if ($current_round_id != $this->jRound->id and $current_round_id and $showFuture) { $hide = array('result', 'actual', 'awarded'); $colsToHide = json_encode($hide); $data = "&season={$this->jSeason->id}&hide=" . rawurlencode($colsToHide); if ($Itemid) { $data .= "&Itemid={$Itemid}"; } if (isJoomla15()) { ?> <p align="center"><a href="<?php echo jTipsRoute("index2.php?option=com_jtips&view=CompetitionLadder&menu=0&action=ShowTips&uid=" . $this->jTipsUser->id . "&rid=" . $current_round_id . $data); ?> "><?php echo $jLang['_POPUP_TIPS_PEEK']; ?> </a></p> <?php } else { ?> <p align="center"><a href="javascript:loadTipsPopup(<?php echo $this->jTipsUser->id; ?> , <?php echo $current_round_id; ?> , $('mb_caption'), '<?php echo $data; ?> ');"><?php echo $jLang['_POPUP_TIPS_PEEK']; ?> </a></p> <?php } } } if ($jTips['ShowTipsPadding']) { echo "</div>"; } }
if ($team) { $jTeam = new jTeam($database); $jTeam->load($team[0]); ?> <div style="text-align:center;"><?php $popupUrl = "view=TeamLadder&action=ShowTeam&menu=0&id=" . $jTeam->id . "&season_id=" . $jTeam->season_id; if (isJoomla15()) { $x = $jTips['ShowTipsWidth']; $y = $jTips['ShowTipsHeight']; //BUG 274 - team ladder popup results in broken scroll bar if (basename($_SERVER['SCRIPT_FILENAME']) != 'index2.php') { $class = "class='modal'"; } else { $class = ''; } $teamname = "<a {$class} rel=\"{handler: 'iframe', size: {x: {$x}, y: {$y}}}\" href='" . jTipsRoute($mosConfig_live_site . "/index2.php?option=com_jtips&{$popupUrl}") . "'>"; } else { $teamname = "<a href='javascript:void(0);' onClick='openPopup(\"{$popupUrl}\", \"" . $jTeam->getName() . "\");'>"; } echo $teamname; // Team logo if ($params->get('logo')) { echo $jTeam->getLogo(100); echo "<br />"; } // Team name echo $jTeam->getName(); ?> </a></div><?php // times picked ?>
function parsePayPalCode($encoded_data, $task, $season) { global $mainframe, $Itemid, $mosConfig_live_site; $my =& $mainframe->getUser(); if (!$Itemid) { $Itemid = jTipsGetParam($_REQUEST, 'Itemid', ''); } if ($task == 'join') { $path = "action=add"; } else { if ($task == 'removeme') { $path = "action=remove"; } } $path .= "&view=Dashboard&season_id=" . $season . "&user_id=" . $my->id; $_SESSION['paypalToken'] = md5(rand()); $path .= "&token=" . $_SESSION['paypalToken']; //$url = (!empty($_SERVER['HTTPS'])) ? "https://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "http://".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; //$path .= "&return=" .urlencode(base64_encode($url)); // BUG 246 - not returning correctly from paypal // BUG 303 - pass false to not necode & as & // BUG if (isJoomla15()) { $base = JURI::base(); } else { $base = "http://" . $_SERVER['SERVER_NAME'] . "/"; } $url = jTipsRoute($base . "index.php?option=com_jtips&Itemid={$Itemid}&{$path}", false); jTipsLogger::_log("building paypal form with return url '{$url}'", 'ERROR'); return str_replace('{RETURN_URL}', $url, stripslashes($encoded_data)); }
function display() { global $mainframe, $database, $jTips, $jLang, $Itemid, $jTipsCurrentUser; $sort_by = jTipsGetParam($_REQUEST, 'sort_by', 'rank'); $sort_dir = jTipsGetParam($_REQUEST, 'dir', 'asc'); if (empty($this->jRound->id)) { $this->jRound->id = -1; } //BUG 132 - form submits to homepage $postURL = "index.php?option=com_jtips&Itemid={$Itemid}"; //$postURL .= http_build_query($_GET); ?> <script type="text/javascript"> window.addEvent('domready', function(){ populateRounds('<?php echo $this->jSeason->id; ?> ', 'round_id', <?php echo $this->jRound->id; ?> ); }) function _goToRound(obj) { var baseURL = "<?php echo html_entity_decode(jTipsRoute($postURL)); ?> "; if (baseURL.match('round_id')) { baseURL = baseURL.replace(/round_id=[0-9]*/g, 'round_id=' + $(obj).value); } else { baseURL += '&round_id=' + $(obj).value; } window.location.href=baseURL; } </script> <form action="<?php echo jTipsRoute($postURL); ?> " method="POST" name="adminForm" id="compform"> <input type="hidden" name="filter_order" value="<?php echo jTipsGetParam($_REQUEST, 'filter_order', 'rank'); ?> " /> <input type="hidden" name="filter_order_Dir" value="<?php echo jTipsGetParam($_REQUEST, 'filter_order_Dir', 'asc'); ?> " /> <input type="hidden" name="view" value="CompetitionLadder" /> <input type="hidden" name="task" value="CompetitionLadder" /> <input type="hidden" name="option" value="com_jtips" /> <input type="hidden" name="Itemid" value="<?php echo $Itemid; ?> " /> <h3 align='center' class="jladderselects"> <?php //if (jTipsGetParam($_REQUEST, 'menu', 1) and !$jTips['DisableSeasonSelect'] and !empty($this->jSeasons) and count($this->jSeasons) > 1) { //jtips_HTML::seasonsList($jTipsUser, $jSeasons, "populateRounds(this, 'round_id');", true); /*$select_options = array(); foreach ($jSeasons as $jS) { $select_options[$jS->id] = $jS->name; } echo makeSelectList($select_options, 'season', "onChange=\"populateRounds(this, 'round_id');\"", $this->jSeason->id); */ //jtips_HTML::seasonsList($jTipsCurrentUser, $this->jSeasons, "id='season_id' onChange=\"populateRounds(this, 'round_id');\"", false, $this->jSeason->id); //} else { if (empty($this->jRound->id)) { $this->jRound->id = -1; } ?> <input type="hidden" name="season" id="season" value="<?php echo $this->jSeason->id; ?> " /> <?php //} ?> <?php echo $jLang['_COM_DASH_ROUND']; ?> : <select name="round_id" id="round_id" disabled="disabled" class="inputbox" onChange="goToRound(this);"> <option value=""><?php echo $jLang['_COM_LADDER_SELECT_SEASON']; ?> </option> </select> </h3> <div class='contentheading jmain_heading'> <?php echo $this->jSeason->name; if ($this->jRound->exists()) { echo " " . $jLang['_COM_COMP_LADAT'] . " " . $this->jRound->round; } else { echo " " . $jLang['_COM_LADDER_NO_ROUNDS']; } ?> </div> <?php /*echo getPageNavigation($page);*/ ?> <table width='100%' cellspacing='0' border='0'> <thead> <tr class='sectiontableheader jtableheader'> <?php if (!empty($jTips['CompetitionLadderColumns'])) { foreach ($jTips['CompetitionLadderColumns'] as $column) { ?> <th><?php echo getUserLadderHeader($column); ?> </th> <?php } } ?> </tr> </thead> <tbody> <?php $i = 0; foreach ($this->jTipsUsers as $jTipsUser) { if (empty($jTipsUser->id)) { continue; } if ($i % 2 == 0) { $class = 'sectiontableentry1 jtablerow1'; } else { $class = 'sectiontableentry2 jtablerow2'; } if ($jTipsUser->id == $jTipsCurrentUser->id) { $font = "style='font-weight:bold;'"; } else { $font = ""; } ?> <tr class='<?php echo $class; ?> ' <?php echo $font; ?> > <?php if (!empty($jTips['CompetitionLadderColumns'])) { foreach ($jTips['CompetitionLadderColumns'] as $column) { $field = getUserLadderField($jTipsUser, $this->jRound, $column); if (is_numeric($field)) { $align = 'center;'; } else { $align = 'left;'; } ?> <td style='text-align:<?php echo $align; ?> ;'><?php echo $field; ?> </td> <?php } } ?> </tr> <?php $i++; } ?> </tbody> <tfoot> <tr> <?php if (!is_null($this->pageNav)) { echo "<td colspan='100' align='center' style='text-align:center;'>" . $this->pageNav->getListFooter() . "</td>"; } ?> </tr> </tfoot> </table> </form> <?php }
function displayPreferencesLink() { global $jTipsCurrentUser, $jTips, $jLang, $Itemid, $mosConfig_live_site, $mainframe; ?> <div class="jpreferences"> <?php if (!empty($jTipsCurrentUser->id)) { if (isJoomla15()) { /*?> <a class="modal" rel="{handler:'iframe', size: {x: <?php echo $jTips['ShowTipsWidth']; ?>, y: <?php echo $jTips['ShowTipsHeight']; ?>}}" href="<?php echo jTipsRoute("index2.php?option=com_jtips&view=UserPreferences&Itemid=$Itemid&return=" .jTipsGetParam($_REQUEST, 'view', ''). "&menu=0"); ?>" title="<?php echo $jLang['_COM_EDIT_PREFERENCES']; ?>"><?php echo $jLang['_COM_EDIT_PREFERENCES']; ?></a> <?php*/ JHTML::_('behavior.modal'); $rel = json_encode(array('size' => array('x' => $jTips['ShowTipsWidth'], 'y' => $jTips['ShowTipsHeight']))); $url = jTipsRoute("index.php?option=com_jtips&view=UserPreferences&tmpl=component&Itemid={$Itemid}&return=" . jTipsGetParam($_REQUEST, 'view', '') . "&menu=0"); $attribs = array('class' => 'modal', 'rel' => str_replace('"', "'", $rel), 'title' => $jLang['_COM_EDIT_PREFERENCES']); echo JHTML::link($url, $jLang['_COM_EDIT_PREFERENCES'], $attribs); } else { ?> <a href="javascript:void(0);" onClick="loadPreferencesPopup('<?php echo jTipsGetParam($_REQUEST, 'view', ''); ?> ', '<?php echo $Itemid; ?> ', '<?php echo $this->season_link; ?> ', this);" title="<?php echo $jLang['_COM_EDIT_PREFERENCES']; ?> "><?php echo $jLang['_COM_EDIT_PREFERENCES']; ?> </a> <?php } } //can this user administer the results for this competition // BUG 309 - remove the popup admin pages - accessible as normal link $my =& $mainframe->getUser(); if ($this->jSeason->scorer_id == $my->id and !empty($my->id) and !empty($this->jSeason->scorer_id) and jTipsGetParam($_REQUEST, 'view', 'Dashboard') != 'Administration') { /*if (isJoomla15()) { ?> <a href="<?php echo jTipsRoute("index2.php?option=com_jtips&" .$this->adminUrl); ?>" class="modal" rel="{handler: 'iframe', size: {x: 800, y: 450}}" title="<?php echo $jLang['_COM_ADMIN_RESULTS']; ?>"><?php echo $jLang['_COM_ADMIN_RESULTS']; ?></a> <?php } else { ?> <a href="javascript:void(0);" onClick="openPopup('<?php echo $this->adminUrl; ?>', '<?php echo $jLang['_COM_ADMIN_RESULTS']; ?>', 800, 450);" title="<?php echo $jLang['_COM_ADMIN_RESULTS']; ?>"><?php echo $jLang['_COM_ADMIN_RESULTS']; ?></a> <?php }*/ ?> <a href="<?php echo jTipsRoute("index.php?option=com_jtips&" . $this->adminUrl); ?> " title="<?php echo $jLang['_COM_ADMIN_RESULTS']; ?> "><?php echo $jLang['_COM_ADMIN_RESULTS']; ?> </a> <?php } ?> </div> <?php }
$jLang['_ADMIN_CONF_COMMENTSACTION_REPLACE'] = 'Replace'; $jLang['_ADMIN_CONF_COMMENTSACTION_DELETE'] = 'Delete'; $jLang['_ADMIN_CONF_COMMENTSFILTERACTION'] = 'Comments Filter Action'; $jLang['_ADMIN_CONF_COMMENTSFILTERACTION_DEF'] = 'The action to take when a comment is found that contains a prohibited word or phrase'; $jLang['_ADMIN_CONF_TEAM_LADD_SEL'] = 'Team Ladder Columns'; $jLang['_ADMIN_CONF_TEAM_LADD_SEL_DEF'] = 'Select the columns that will appear on the Team Ladder page. Move the columns up and down to determine their order of appearance from left to right. To select multiple options, hold down the CTRL key and click on the options.'; $jLang['_ADMIN_CONF_SHOWTIPS'] = 'Enable ShowTips'; $jLang['_ADMIN_CONF_SHOWTIPS_DEF'] = 'Other users tips will be visible once the round has been finalized'; $jLang['_ADMIN_CONF_SHOWTIPS_WIDTH'] = 'ShowTips Window Width'; $jLang['_ADMIN_CONF_SHOWTIPS_WIDTH_DEF'] = 'Window width in pixels - default 640'; $jLang['_ADMIN_CONF_SHOWTIPS_HEIGHT'] = 'ShowTips Window Height'; $jLang['_ADMIN_CONF_SHOWTIPS_HEIGHT_DEF'] = 'Window height in pixels - default 480'; $jLang['_ADMIN_CONF_COMP_LADD_SEL'] = 'Competition Ladder Columns'; $jLang['_ADMIN_CONF_COMP_LADD_SEL_DEF'] = 'Select the columns that will appear in the Competition Ladder page. Move the columns up and and down to determine their order of appearance from left to right. To select multiple options, hold down the CTRL key and click the options.'; $jLang['_ADMIN_REMIND_ENABLE'] = 'Enable Email Reminders'; $jLang['_ADMIN_REMIND_ENABLE_DEF'] = 'Allow users to optionally receive an automated reminder to submit their tips. To enable this feature please add the following line to your cron tab: <br /><strong><pre>0 10 * * 5 cd; wget --delete-after --no-cache "' . jTipsRoute($mosConfig_live_site . '/index2.php?option=com_jtips&view=Dashboard&action=MailMan&key=[PASSKEY]', false) . '";</pre></strong>This will run the email reminder mailout every Friday at 10am.<br />For more information on setting up your own schedule, take a look at <a href="http://en.wikipedia.org/wiki/Cron">Wikipedia</a>'; $jLang['_ADMIN_REMIND_FROMNAME'] = 'From Name'; $jLang['_ADMIN_REMIND_FROMADDRESS'] = 'From Address'; $jLang['_ADMIN_REMIND_SUBJECT'] = 'Reminder Email Subject'; $jLang['_ADMIN_REMIND_BODY'] = 'Reminder Email Body'; $jLang['_ADMIN_REMIND_BODY_DEF'] = 'The body of the reminder email to be automatically sent to users to remind them to submit their tips.<br />You may add replaceable values that will get replaced with details of the registering user. Valid placeholders are:<ul><li>{name}</li><li>{username}</li><li>{email}</li><li>{competition}</li></ul>'; $jLang['_ADMIN_CONF_TEAM_LADD_BTNS'] = 'Team Ladder Option Ordering'; $jLang['_ADMIN_CONF_TEAM_LADD_BTNS_DEF'] = 'Select one or more items in the Team Ladder Columns list and use the Up and Down buttons to change their order'; $jLang['_ADMIN_CONF_COMP_LADD_BTNS'] = 'Competition Ladder Option Ordering'; $jLang['_ADMIN_CONF_COMP_LADD_BTNS_DEF'] = 'Select one or more items in the Competition Ladder Columns list and use the Up and Down buttons to change their order'; $jLang['_ADMIN_CONF_LAST_SUMM_BTNS'] = 'Last Rounder Summary Option Ordering'; $jLang['_ADMIN_CONF_LAST_SUMM_BTNS_DEF'] = 'Select one or more items in the Last Round Summary list and use the Up and Down buttons to change their order'; $jLang['_ADMIN_CONF_SUMM_BTNS'] = 'Summary Score Option Ordering'; $jLang['_ADMIN_CONF_SUMM_BTNS_DEF'] = 'Select one or more items in the Summary Score Columns list and use the Up and Down buttons to change their order'; $jLang['_ADMIN_CONF_LADSTYLE2'] = 'Use Effect For:'; $jLang['_ADMIN_CONF_LADSTYLE2_DEF'] = 'Determines when the above effect will be applied';
function display() { ob_get_contents(); global $database, $mainframe, $jTips, $jLang, $jTipsCurrentUser, $Itemid, $mosConfig_live_site; $send_email = $jTipsCurrentUser->getPreference('email_reminder'); if (empty($send_email)) { $send_email = '0'; } $tips_notifications = $jTipsCurrentUser->getPreference('tips_notifications'); if (empty($tips_notifications)) { $tips_notifications = '0'; } $postURL = jTipsRoute("index.php?option=com_jtips&Itemid=" . $Itemid); $width = $jTips['ShowTipsWidth'] - 40; ?> <style type="text/css"> @import url(<?php echo $mosConfig_live_site; ?> /components/com_jtips/css/jtips-default.css); @import url(<?php echo $mosConfig_live_site; ?> /components/com_jtips/css/jtips-popup.css); </style> <div style="padding-top:10px;padding-left:10px;padding-right:10px;padding-bottom:10px;width:<?php echo $width; ?> px;text-align:center;"> <form action="<?php echo $postURL; ?> " name="adminForm" method="post" id="adminForm"> <input type="hidden" name="option" value="<?php echo jTipsGetParam($_REQUEST, 'option', 'com_jtips'); ?> " /> <input type="hidden" name="view" value="UserPreferences" /> <input type="hidden" name="action" value="save" /> <input type="hidden" name="task" value="save" /> <input type="hidden" name="return" value="<?php echo jTipsGetParam($_REQUEST, 'return', ''); ?> " /> <input type="hidden" name="season" value="<?php echo getSeasonID(); ?> " /> <input type="hidden" name="user" value="<?php echo $jTipsCurrentUser->id; ?> " /> <input type="hidden" name="id" value="<?php echo $jTipsCurrentUser->user_id; ?> " /> <h1 class="contentheading"><?php echo $jLang['_COM_USER_PREFERENCES']; ?> </h1> <table width="100%" border="0" cellspacing="5" cellpadding="0" style="margin-top:25px;"> <tbody> <tr> <th align="right"><?php echo $jLang['_COM_TIME_ZONE']; ?> </th> <td><?php echo makeSelectList($this->timezones, 'timezone', "class='inputbox'", $this->timezone); ?> </td> </tr> <?php if (isset($jTips['EnableEmailReminders']) and $jTips['EnableEmailReminders'] == 1) { ?> <tr> <th align="right"><?php echo $jLang['_COM_SEND_REMINDER_EMAIL']; ?> </th> <td><?php echo jTipsHTML::yesnoRadioList('email_reminder', '', $send_email); ?> </td> </tr> <?php } ?> <?php if (isset($jTips['TipsNotifyEnable']) and $jTips['TipsNotifyEnable'] == 1) { ?> <tr> <th align="right"><?php echo $jLang['_ADMIN_CONF_NOTIFY_TIPS']; ?> </th> <td><?php echo jTipsHTML::yesnoRadioList('tips_notifications', '', $tips_notifications); ?> </td> </tr> <?php } ?> </tbody> <tfoot> <tr> <td style="text-align:center;" colspan="2"><input type="submit" name="submit_preferences" value=" <?php echo $jLang['_COM_SAVE']; ?> " class="button" onClick="window.top.setTimeout('window.parent.document.getElementById(\'sbox-window\').close()', 700);" /></td> </tr> </tfoot> </table> </form> </div> <?php }
// logged in, approved! Allow unsubscribe // BUG 405 - link to tips page ?> <a href="<?php echo jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=Tips"); ?> "><?php echo $jLang['_COM_DASH_GOTO_TIPS']; ?> </a><br /> <?php $confirm_unsub = 'return confirm("' . $jLang['_COM_UNSUBLINK_PART1'] . ' ' . $this->jSeason->name . ' ' . $jLang['_COM_UNSUBLINK_PART2'] . '");'; ?> <a href="<?php echo jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=Dashboard&action=remove"); ?> " title="<?php echo $jLang['_COM_UNSUBSCRIBE']; ?> " onClick='<?php echo $confirm_unsub; ?> '><?php echo $jLang['_COM_UNSUBSCRIBE']; ?> </a><?php } else { // do nothing }
// Link is to CB Pofile $img = getCommunityBuilderAvatar($jTipsUser->user_id); $link = "index.php?option=com_comprofiler&task=userProfile&user="******"<img src='{$img}' border='0' alt='Profile Avatar for {$alt}' />"; echo "<a href='" . jTipsRoute($link) . "' title='View Profile' id='userModLadderLink_" . $jTipsUser->id . "'>" . $imgHTML . "</a>"; ?> </div> <?php } } //build the array for the rows $tableData = array('rank' => $params->get('rank'), 'pointst' => $params->get('pointst'), 'points' => $params->get('points'), 'pointsa' => $params->get('pointsa'), 'prect' => $params->get('prect'), 'prec' => $params->get('prec'), 'preca' => $params->get('preca'), 'comment' => $params->get('comment')); ?> <table width="100%" cellspacing="0"> <thead> <tr class="sectiontableheader"> <th class="sectiontableheader" colspan="2"> <h4><?php echo $jTipsUser->getName(); ?>
// if ($incimage and isset($jTeam->logo) and !empty($jTeam->logo)) { // if (jTipsFileExists(getJtipsImage($jTeam->logo))) { // $img = "<img src='" .$mainframe->getCfg('live_site'); // $img .= "/" .getJtipsImage($jTeam->logo). "' alt=' ' border='0' align='absmiddle' /> "; // echo $img; // } // } if ($params->get('incimage') and !empty($jTeam->logo) and jTipsFileExists(getJtipsImage($jTeam->logo))) { echo $jTeam->getLogo() . " "; } global $Itemid; $popupUrl = "view=TeamLadder&action=ShowTeam&id=" . $jTeam->id . "&Itemid=" . $Itemid; if (isJoomla15()) { $x = $jTips['ShowTipsWidth']; $y = $jTips['ShowTipsHeight']; echo "<a class='modal' rel=\"{handler: 'iframe', size: {x: {$x}, y: {$y}}}\" href='" . jTipsRoute($mosConfig_live_site . "/index2.php?option=com_jtips&{$popupUrl}&menu=0") . "'>" . $jTeam->getName() . "</a>"; } else { echo "<a href='javascript:void(0);' onClick='openPopup(\"{$popupUrl}\", \"" . $jTeam->getName() . "\");'>" . $jTeam->getName() . "</a>"; } ?> </td> <?php if ($team_field != '-1') { ?> <td style="text-align:center;"><?php echo $jTeam->getTeamField($team_field); ?> </td> <?php } ?>