Exemple #1
0
    function EditView($title, $formData, $icon = 'generic')
    {
        global $jTips, $jLang;
        jTipsCommonHTML::loadCalendar();
        ?>
		<form action="index2.php" name="adminForm" method="post" enctype="multipart/form-data">
		<input type="hidden" name="option" value='<?php 
        echo jTipsGetParam($_REQUEST, 'option', 'com_jtips');
        ?>
'>
		<input type='hidden' name='task' value=''>
		<input type="hidden" name="hidemainmenu" value="0" />
		<input type='hidden' name='module' value='<?php 
        echo jTipsGetParam($_REQUEST, 'module', '');
        ?>
'>
		<input type="hidden" name="<?php 
        echo jTipsSpoofValue();
        ?>
" value="1" />
		<?php 
        if (isJoomla15()) {
            JToolBarHelper::title($title, $icon);
        } else {
            ?>
			<table class="adminheading">
			<tr><th class="edit"><?php 
            echo $title;
            ?>
</th></tr>
			</table>
			<?php 
        }
        foreach ($formData as $fieldset) {
            ?>
			<fieldset>
			<legend><?php 
            echo $jLang[$fieldset['legend']];
            ?>
</legend>
			<table class="admintable" width="100%">
			<tbody>
			<?php 
            $hiddenFields = array();
            foreach ($fieldset['fields'] as $row) {
                if ($row['field']['type'] == 'hidden') {
                    $hiddenFields[] = $row;
                    continue;
                }
                if ($row['field']['type'] == 'editor') {
                    $colspan = 2;
                } else {
                    $colspan = 1;
                }
                ?>
<tr>
				<td class="key" width="25%"><label for="<?php 
                echo $row['field']['attributes']['id'];
                ?>
"><?php 
                echo $jLang[$row['label']];
                ?>
</label></td>
				<td width="25%" colspan="<?php 
                echo $colspan;
                ?>
"><?php 
                echo parseEditField($row['field']);
                ?>
</td>
				<?php 
                if ($colspan == 1) {
                    ?>
				<td width="50%"><?php 
                    echo isset($row['description']) ? $jLang[$row['description']] : "";
                    ?>
&nbsp;</td>
					<?php 
                }
                ?>
				</tr><?php 
            }
            ?>
			</tbody>
			<tfoot>
			</tfoot>
			</table>
			<?php 
            //now loop on the hidden fields
            if (!empty($hiddenFields)) {
                foreach ($hiddenFields as $def) {
                    echo parseEditField($def['field']);
                }
            }
            ?>
			</fieldset>
			<?php 
        }
        ?>
		</form>
		<?php 
    }
Exemple #2
0
    /**
     * 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&amp;Itemid={$Itemid}&amp;view=Tips&amp;rid=" . $this->jRound->getPrev());
            ?>
'>&laquo; <?php 
            echo $jLang['_COM_PREV_ROUND'];
            ?>
</a>
			<?php 
        }
        echo "&nbsp;" . $jLang['_COM_DASH_ROUND'] . " " . $this->jRound->round . "&nbsp;";
        if ($this->jRound->getNext()) {
            ?>
			<a  style="font-size:smaller;" href='<?php 
            echo jTipsRoute("index.php?option=com_jtips&amp;Itemid={$Itemid}&amp;view=Tips&amp;rid=" . $this->jRound->getNext());
            ?>
'><?php 
            echo $jLang['_COM_NEXT_ROUND'];
            ?>
 &raquo;</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 "&nbsp;";
            }
            ?>
			</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 "&nbsp;" . $jLang['_COM_GAME_DRAW'] . "&nbsp;";
            } else {
                echo "&nbsp;";
            }
            ?>
</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;
            ?>
>&nbsp;</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>&nbsp;
						<?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 = "&nbsp;";
                        }
                    }
                    ?>
                        <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 {
                        ?>
&nbsp;<?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;'>&nbsp;<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;'>&nbsp;<?php 
                    echo $jLang['_COM_TEAM_VS'];
                    ?>
&nbsp;</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 {
                        ?>
&nbsp;<?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 = "&nbsp;";
                        }
                    }
                    ?>
                        <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 
                }
                ?>
						&nbsp;<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 {
                        ?>
&nbsp;<?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;'>&nbsp;</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 "&nbsp;";
                    }
                    ?>
</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};
                    ?>
&nbsp;</th>
						<?php 
                }
                ?>
<td><?php 
                if (!empty($jGame->description)) {
                    $description = nl2br(stripslashes($jGame->description));
                    echo jTipsToolTip($description, $jLang['_COM_GAME_ADDITIONAL_INFO']);
                } else {
                    echo "&nbsp;";
                }
                ?>
</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>&nbsp;<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 
        }
    }
Exemple #3
0
    function display()
    {
        global $jLang;
        if (isJoomla15()) {
            JToolbarHelper::title($jLang['_ADMIN_EDIT_CUSTOMISATIONS_TITLE'], 'customisations');
        } else {
            ?>
			<table class='adminheading'>
				<tr><th><?php 
            echo $jLang['_ADMIN_EDIT_CUSTOMISATIONS_TITLE'];
            ?>
</th></tr>
			</table>
			<?php 
        }
        ?>
		<form action="index2.php?option=com_jtips" method="POST" name="adminForm" enctype="multipart/form-data">
			<input type="hidden" name="task" value="" />
			<input type="hidden" name="module" value="Customisations" />
			<input type="hidden" name="path" value="<?php 
        echo $this->path;
        ?>
" />
			<input type="hidden" name="<?php 
        echo jTipsSpoofValue();
        ?>
" value="1" />
			<?php 
        if (!$this->path) {
            $this->displayFileSetup();
        }
        ?>
			<fieldset>
			<legend><?php 
        echo $jLang['_ADMIN_CSTM_FILE_EDIT'];
        ?>
</legend>
			<table class='adminform'>
				<thead>
				<tr>
				<th><?php 
        echo $this->path;
        ?>
</th>
				</tr>
				</thead>
				<tbody>
				<tr>
				<td><textarea style="width:100%;height:500px" cols="110" rows="25" name="filecontent" id="filecontent" class="inputbox"><?php 
        echo $this->content;
        ?>
</textarea></td>
				</tr>
				</tbody>
			</table>
			</fieldset>
		</form>
		<?php 
    }
Exemple #4
0
    function display()
    {
        global $jLang;
        ?>
		<form action='index2.php' method='post' name='adminForm'>
			<input type='hidden' name='task' value='list' />
			<input type='hidden' name='option' value='<?php 
        echo jTipsGetParam($_REQUEST, 'option', 'com_jtips');
        ?>
' />
			<input type='hidden' name='module' value='Export' />
			<input type='hidden' name='hidemainmenu' value='0' />
			<input type="hidden" name="<?php 
        echo jTipsSpoofValue();
        ?>
" value="1" />
			<?php 
        if (isJoomla15()) {
            JToolBarHelper::title($jLang['_ADMIN_CONF_EXPBTN'], 'export');
        } else {
            ?>
				<table class='adminheading'>
					<tr><th><?php 
            echo $jLang['_ADMIN_CONF_EXPBTN'];
            ?>
</th></tr>
				</table>
				<?php 
        }
        ?>
			<fieldset>
			<legend><?php 
        echo $jLang['_ADMIN_EXP_INFO'];
        ?>
</legend>
			<table class='admintable' width="100%">
				<tr>
					<td class="key" width="25%"><?php 
        echo $jLang['_ADMIN_EXP_PREVIOUS'];
        ?>
</td>
					<td><?php 
        echo $this->selectLists['history'];
        ?>
&nbsp;<?php 
        echo $this->selectLists['actions'];
        ?>
&nbsp;<input type='submit' name='doAction' value='Go!' class='button' <?php 
        echo $this->disableExportButton;
        ?>
 onclick="this.form.task.value='history'" /></td>
				</tr>
				<tr>
					<td class="key" width="25%"><?php 
        echo $jLang['_ADMIN_EXP_SELECT_TYPE'];
        ?>
</td>
					<td><?php 
        echo $this->selectLists['objects'];
        ?>
&nbsp;<input type="submit" name="getExport" value="Export Data" class="button" onclick="this.form.task.value='export'" /></td>
				</tr>
			</table>
			</fieldset>
		</form>
		<?php 
    }
Exemple #5
0
    function displayEditRound()
    {
        global $jLang, $mosConfig_live_site, $jTips, $Itemid;
        ?>
		<style type='text/css'>
		#loader3.ajax-loading {
			background:url(<?php 
        echo $mosConfig_live_site;
        ?>
/components/com_jtips/images/loading.gif) no-repeat center;
			padding: 20px 0;
		}
		</style>
		<div id="loader3"></div>
		<form action="index2.php?Itemid=<?php 
        echo $Itemid;
        ?>
" method="post" id="jTipsRoundEditForm">
		<input type="hidden" name="option" value="com_jtips" />
		<input type="hidden" name="view" value="Administration" />
		<input type="hidden" name="action" value="SaveRound" />
		<input type="hidden" name="season_id" id="season_id" value="<?php 
        echo $this->jSeason->id;
        ?>
" />
		<input type="hidden" name="<?php 
        echo jTipsSpoofValue();
        ?>
" value="1" />
		<input type="hidden" name="id" id="id" value="<?php 
        echo $this->focus->id;
        ?>
" />
		<input type="hidden" name="roundnum" id="roundnum" value="<?php 
        echo $this->roundnum;
        ?>
" />
			<h2><?php 
        echo $jLang['_ADMIN_ROUND_LEGEND'];
        ?>
</h2>
			<table class='admintable' width="100%">
			<tr>
			<td class="key" width="25%"><?php 
        echo $jLang['_ADMIN_ROUND_START'] . " " . $jLang['_ADMIN_ROUND_DATE'] . " &amp; " . $jLang['_ADMIN_ROUND_TIME'];
        ?>
</td>
			<td>
			<input type="text" class="inputbox" name="date_start_date" size="30" value="<?php 
        echo $this->date_start_date;
        ?>
" id="date_start_date" />&nbsp;<img src='<?php 
        echo $mosConfig_live_site;
        ?>
/administrator/components/com_jtips/images/calendar.png' onclick='return showCalendar("date_start_date", "<?php 
        echo $jTips['DateFormat'];
        ?>
");' border='0' alt='...' align='absmiddle' />
			&nbsp;<?php 
        echo $this->date_start_time_hour;
        ?>
			:<?php 
        echo $this->date_start_time_minute;
        ?>
			&nbsp;<?php 
        echo $this->date_start_time_meridiem;
        ?>
			</td>
			</tr>
			<tr>
			<td class="key" width="25%"><?php 
        echo $jLang['_ADMIN_ROUND_END'] . " " . $jLang['_ADMIN_ROUND_DATE'] . " &amp; " . $jLang['_ADMIN_ROUND_TIME'];
        ?>
</td>
			<td>
			<input type="text" class="inputbox"  name="date_end_date" size="30" value="<?php 
        echo $this->date_end_date;
        ?>
" id="date_end_date" />&nbsp;<img src='<?php 
        echo $mosConfig_live_site;
        ?>
/administrator/components/com_jtips/images/calendar.png' onclick='return showCalendar("date_end_date", "<?php 
        echo $jTips['DateFormat'];
        ?>
");' border='0' alt='...' align='absmiddle' />
			&nbsp;<?php 
        echo $this->date_end_time_hour;
        ?>
			:<?php 
        echo $this->date_end_time_minute;
        ?>
			&nbsp;<?php 
        echo $this->date_end_time_meridiem;
        ?>
			</td>
			</tr>
			<tr>
			<td class="key" width="25%"><label for="show_jtips_info"><?php 
        echo $jLang['_ADMIN_ROUND_SHOW_COMMENTS'];
        ?>
</label></td>
			<td><input type="checkbox" id="show_jtips_info" onClick="if(this.checked){$$('.jtipsinfo').setStyle('display', '');}else{$$('.jtipsinfo').setStyle('display', 'none');}" /></td>
			</tr>
			</table>
		<h2><?php 
        echo $jLang['_ADMIN_ROUND_GAMES_LEGEND'];
        ?>
</h2>
		<?php 
        if (!$this->focus->getStatus() or !$this->focus->exists()) {
            ?>
			<p><input type="button" class="button" onClick="addGameRow();" id="addgame" value="Add Game" />
			&nbsp;<input type="button"  class="button" onClick="removeGameRow();" id="removegame" value="Remove Game(s)" /></p>
			<?php 
        }
        ?>
		<table class="admintable" cellspacing="0" width="100%">
		<thead>
		<tr class="sectiontableheader">
			<!--th align='center' width='1'>#</th-->
			<th align="center" width='20'>&nbsp;</th>
			<th id="left_team_th"><?php 
        echo $jLang['_ADMIN_ROUND_' . strtoupper($this->left)];
        ?>
</th>
			<th id="right_team_th"><?php 
        echo $jLang['_ADMIN_ROUND_' . strtoupper($this->right)];
        ?>
</th>
			<th class="pick">Enable Picks</th>
			<th id="left_start_th" class="team_starts"><?php 
        echo $jLang['_ADMIN_GAME_' . strtoupper($this->left) . '_START'];
        ?>
</th>
			<th id="right_start_th" class="team_starts"><?php 
        echo $jLang['_ADMIN_GAME_' . strtoupper($this->right) . '_START'];
        ?>
</th>
			<th class="date_time"><?php 
        echo $jLang['_ADMIN_GAME_TIME'];
        ?>
</th>
			<th class="jtipsinfo" style="display:none;"><?php 
        echo $jLang['_ADMIN_ROUNDS_INFO'];
        ?>
</th>
		</tr>
		</thead>
		<tbody id="table">
		</tbody>
		</table>
		<div class="contentheading" style="text-align:center;">
		<?php 
        if (isJoomla15()) {
            ?>
			<input type="submit" value="<?php 
            echo $jLang['_COM_SAVE'];
            ?>
" name="submit_round" class="button" />
			<input type="button" value="<?php 
            echo $jLang['_COM_CANCEL'];
            ?>
" name="cancel_round" onClick="window.parent.document.getElementById('sbox-window').close();" class="button" />
			<?php 
        } else {
            ?>
			<input type="submit" value="<?php 
            echo $jLang['_COM_SAVE'];
            ?>
" name="submit_round" class="button" />
			<input type="button" value="<?php 
            echo $jLang['_COM_CANCEL'];
            ?>
" name="cancel_round" onClick="$('mb_close_link').onclick();" class="button" />
			<?php 
        }
        ?>
		</div>
		</form>
		<?php 
    }
Exemple #6
0
    function display()
    {
        global $jTips, $jLang;
        if (isJoomla15()) {
            JToolBarHelper::title($this->formData['title'], 'user');
        } else {
            ?>
			<table class='adminheading'>
			<tr>
				<th><?php 
            echo $this->formData['title'];
            ?>
</th>
			</tr>
			</table>
			<?php 
        }
        ?>
		<script type='text/javascript'>
		function submitbutton(pressbutton) {
			if (pressbutton != 'list') {
				//are any users selected?
				if(document.adminForm.boxchecked.value==0) {
					alert('<?php 
        echo $jLang['_ADMIN_USER_NEW_NO_SELECTION'];
        ?>
');
					return;
				}
				
				//is a season selected?
				if ($('season_id').value == '') {
					alert("<?php 
        echo $jLang['_ADMIN_SEASON_SELECT_ALERT'];
        ?>
");
					return;
				}
			}
			submitform(pressbutton);
		}
		</script>
		<form action='index2.php' name='adminForm' id='adminForm' method='post'>
			<input type="hidden" name="task" value="edit" />
			<input type="hidden" name="option" value="com_jtips" />
			<input type="hidden" name="module" value="Users" />
			<input type="hidden" name="boxchecked" value="0" />
			<input type="hidden" name="filter_order" value="<?php 
        echo jTipsGetParam($_REQUEST, 'filter_order');
        ?>
" />
			<input type="hidden" name="filter_order_Dir" value="<?php 
        echo jTipsGetParam($_REQUEST, 'filter_order_Dir');
        ?>
" />
			<input type="hidden" name="<?php 
        echo jTipsSpoofValue();
        ?>
" value="1" />
			<table class="adminform">
				<?php 
        foreach ($this->selectLists as $label => $list) {
            ?>
					<tr>
						<td width="20%"><?php 
            echo $label;
            ?>
:&nbsp;</td>
						<td><?php 
            echo $list;
            ?>
</td>
						<td>&nbsp;</td>
					</tr>
					<?php 
        }
        ?>
			</table>
			<table class="adminlist">
				<thead>
				<tr>
					<th align='center' width='1'>#</th>
					<th align="center" width='20'><input type="checkbox" name="toggle" value="" onClick="checkAll(<?php 
        echo count($this->users);
        ?>
);" /></th>
					<th><a href="javascript:tableOrdering('name', '<?php 
        echo $this->nextDir;
        ?>
', 'edit');"><?php 
        echo $jLang['_ADMIN_USERS_FULLNAME'];
        ?>
</a></th>
					<th><a href="javascript:tableOrdering('username', '<?php 
        echo $this->nextDir;
        ?>
', 'edit');"><?php 
        echo $jLang['_ADMIN_USERS_USERNAME'];
        ?>
</a></th>
					<th><a href="javascript:tableOrdering('email', '<?php 
        echo $this->nextDir;
        ?>
', 'edit');"><?php 
        echo $jLang['_ADMIN_USERS_EMAIL'];
        ?>
</a></th>
				</tr>
				</thead>
				<tbody>
				<?php 
        $i = 0;
        foreach ($this->users as $user) {
            ?>
					<tr class="row<?php 
            echo $i % 2;
            ?>
">
						<td align="center"><?php 
            echo $i + 1;
            ?>
</td>
						<td align="center"><?php 
            echo jTipsHTML::idBox($i, $user->id);
            ?>
</td>
						<td><label for="cb<?php 
            echo $i;
            ?>
"><?php 
            echo $user->name;
            ?>
</label></td>
						<td><?php 
            echo $user->username;
            ?>
</td>
						<td><a href="mailto:<?php 
            echo $user->email;
            ?>
"><?php 
            echo $user->email;
            ?>
</a></td>
					</tr>
					<?php 
            $i++;
        }
        ?>
				</tbody>
				<?php 
        if (isJoomla15()) {
            ?>
					<tfoot>
					<tr>
					<td colspan="50"><?php 
            echo $this->pageNav->getListFooter();
            ?>
</td>
					</tr>
					</tfoot>
					<?php 
        }
        ?>
				</table>
				<?php 
        if (!isJoomla15()) {
            echo $this->pageNav->getListFooter();
        }
        ?>
		</form>
		<?php 
    }
Exemple #7
0
    function display()
    {
        global $jTips, $jLang;
        if (isJoomla15()) {
            JToolbarHelper::title($this->formData['title'], 'tips');
        } else {
            ?>
			<table class='adminheading'>
				<tr><th><?php 
            echo $this->formData['title'];
            ?>
</th></tr>
			</table>
			<?php 
        }
        ?>
		<form action='index2.php' name='adminForm' id='adminForm' method='post'>
			<input type="hidden" name="task" value="edit" />
			<input type="hidden" name="option" value="com_jtips" />
			<input type="hidden" name="module" value="Tips" />
			<input type="hidden" name="<?php 
        echo jTipsSpoofValue();
        ?>
" value="1" />
			<table class='adminform'>
				<?php 
        foreach ($this->selectLists as $label => $list) {
            ?>
					<tr>
						<td width="20%"><?php 
            echo $label;
            ?>
:&nbsp;</td>
						<td><?php 
            echo $list;
            ?>
</td>
						<td>&nbsp;</td>
					</tr>
					<?php 
        }
        ?>
			</table>
			<table class="adminlist">
				<thead>
				<tr>
					<th colspan="2"><?php 
        echo $jLang['_ADMIN_ROUND_HOME'];
        ?>
</th>
					<th><?php 
        echo $jLang['_COM_TIPS_HOMESCORE'];
        ?>
</th>
					<th colspan="2"><?php 
        echo $jLang['_ADMIN_ROUND_AWAY'];
        ?>
</th>
					<th><?php 
        echo $jLang['_COM_TIPS_AWAYSCORE'];
        ?>
</th>
					<th width="5" align="center"><?php 
        echo $jLang['_ADMIN_ROUND_DRAW'];
        ?>
</th>
					<th><?php 
        echo $jLang['_ADMIN_TIPSMAN_SCORE_MARGIN'];
        ?>
</th>
					<th><?php 
        echo $jLang['_ADMIN_CONF_BP'];
        ?>
</th>
				</tr>
				</thead>
				<tbody>
				<?php 
        $i = 0;
        foreach ($this->games as $game_id => $data) {
            ?>
					<tr class="row<?php 
            echo $i++ % 2;
            ?>
">
						<td width="5" align="center">
							<input type="hidden" name="game_id[]" value="<?php 
            echo $game_id;
            ?>
" />
							<input type="hidden" name="id[]" value="<?php 
            echo $data['id'];
            ?>
" />
							<input type="radio" name="g<?php 
            echo $game_id;
            ?>
[tip_id]" value="<?php 
            echo $data['home']->id;
            ?>
" <?php 
            echo $data['home_tipped'];
            ?>
 />
						</td>
						<td><?php 
            echo $data['home']->getName();
            ?>
</td>
						<td><input type="text" name="g<?php 
            echo $game_id;
            ?>
[home_score]" size="5" value="<?php 
            echo $data['home_score'];
            ?>
" /></td>
						<td align="center"><input type="radio" name="g<?php 
            echo $game_id;
            ?>
[tip_id]" value="<?php 
            echo $data['away']->id;
            ?>
" <?php 
            echo $data['away_tipped'];
            ?>
 /></td>
						<td><?php 
            echo $data['away']->getName();
            ?>
</td>
						<td><input type="text" name="g<?php 
            echo $game_id;
            ?>
[away_score]" size="5" value="<?php 
            echo $data['away_score'];
            ?>
" /></td>
						<td align="center"><input type="radio" name="g<?php 
            echo $game_id;
            ?>
[tip_id]" value="-1" <?php 
            echo $data['draw_tipped'];
            ?>
 /></td>
						<td><input type="text" name="g<?php 
            echo $game_id;
            ?>
[margin]" size="5" value="<?php 
            echo $data['margin'];
            ?>
" /></td>
						<td><?php 
            echo $data['bonus_id'];
            ?>
</td>
					</tr>
					<?php 
        }
        ?>
				</tbody>
			</table>
		</form>
		<?php 
    }
Exemple #8
0
    function display()
    {
        global $jLang;
        ?>
		<form action='index2.php' method='post' name='adminForm' enctype='multipart/form-data'>
		<input type='hidden' name='task' value='' />
		<input type='hidden' name='option' value='<?php 
        echo jTipsGetParam($_REQUEST, 'option', 'com_jtips');
        ?>
' />
		<input type='hidden' name='hidemainmenu' value='0' />
		<input type="hidden" name="module" value="Import" />
		<input type="hidden" name="<?php 
        echo jTipsSpoofValue();
        ?>
" value="1" />
		<?php 
        if (isJoomla15()) {
            JToolBarHelper::title($jLang['_ADMIN_IMP_HEADER'], 'import');
        } else {
            ?>
			<table class='adminheading'>
				<tr>
					<th><?php 
            echo $jLang['_ADMIN_IMP_HEADER'];
            ?>
</th>
				</tr>
			</table>
			<?php 
        }
        ?>
		<?php 
        if ($this->importExists) {
            ?>
			<fieldset>
			<legend><?php 
            echo $jLang['_ADMIN_IMPORT_SETUP_LEGEND'];
            ?>
</legend>
			<input type="hidden" name="hasFile" id="hasFile" value="1" />
			<input type="hidden" name="importFile" value="1" id="importFile" />
			<table class='admintable' width="100%">
			<tr>
				<td class="key"><label for="importObject"><?php 
            echo $jLang['_ADMIN_IMP_SELECT_TYPE'];
            ?>
</label></td>
				<td><?php 
            echo $this->selectLists['objects'];
            ?>
<span id='loading' style='display:none;'><?php 
            echo getAjaxLoading();
            ?>
</span></td>
			</tr>
			<tr id="match_row" style="display:none;">
				<td class="key" valign="top"><?php 
            echo $jLang['_ADMIN_IMP_MATCH_SELECT'];
            ?>
:</td>
				<td><select name="match_on[]" id="match_on" multiple="multiple" class="inputbox"></select></td>
			</tr>
			</table>
			</fieldset>
			<fieldset>
			<legend><?php 
            echo $jLang['_ADMIN_IMP_FIELD_MAPPING_LEGEND'];
            ?>
</legend>
			<table class='adminlist' width="100%">
			<thead>
			<tr>
				<th width='25%'><?php 
            echo $jLang['_ADMIN_IMP_COL_HEADER'];
            ?>
</th>
				<th width='25%'><?php 
            echo $jLang['_ADMIN_IMP_FIELD_MAP'];
            ?>
</th>
				<th width='25%'>Row 1 Data</th>
				<th width='25%'>Row 2 Data</th>
			</tr>
			</thead>
			<tbody>
			<?php 
            for ($i = 0; $i < count($this->headers); $i++) {
                $col = cleanString($this->headers[$i]);
                $row1 = isset($this->row1Data[$i]) ? $this->row1Data[$i] : '';
                $row2 = isset($this->row2Data[$i]) ? $this->row2Data[$i] : '';
                ?>
				<tr class="row<?php 
                echo $i % 2;
                ?>
">
					<td class="key" width='25%'><?php 
                echo $col;
                ?>
</td>
					<td><?php 
                echo jTipsHTML::selectList($this->noneOptions, "importFields[{$col}]", 'disabled id="' . $col . '" class="importFields"', 'value', 'text');
                ?>
</td>
					<td style='text-align:left;'><?php 
                echo jTipsHTML::cleanText($row1);
                ?>
</td>
					<td style='text-align:left;'><?php 
                echo jTipsHTML::cleanText($row2);
                ?>
</td>
				</tr>
				<?php 
            }
            ?>
			</tbody>
			</table>
			</fieldset>
			<?php 
        } else {
            ?>
			<fieldset>
			<legend><?php 
            echo $jLang['_ADMIN_IMPORT_UPLOAD_LEGEND'];
            ?>
</legend>
			<input type="hidden" name="hasFile" id="hasFile" value="0" />
			<table class='admintable' width="100%">
			<tr>
				<td class="key" width='25%'><label for="importFile"><?php 
            echo $jLang['_ADMIN_IMP_UPLOAD'];
            ?>
</label></td>
				<td><input type='file' name='importFile' id="importFile" size='40' /></td>
			</tr>
			</table>
			</fieldset>
			<?php 
        }
        ?>
		</form>
		<?php 
    }
Exemple #9
0
    function display()
    {
        global $jLang;
        ?>
		<form action='index2.php' method='post' name='adminForm' enctype='multipart/form-data'>
		<input type='hidden' name='task' value='' />
		<input type='hidden' name='option' value='<?php 
        echo jTipsGetParam($_REQUEST, 'options', 'com_jtips');
        ?>
' />
		<input type='hidden' name='hidemainmenu' value='0' />
		<input type='hidden' name='module' value='Configuration' />
		<input type='hidden' name='<?php 
        echo jTipsSpoofValue();
        ?>
' value='1' />
		<?php 
        if (isJoomla15()) {
            JToolbarHelper::title($jLang['_ADMIN_CONF_TITLE'] . " - " . getVersionNum(), 'config');
        } else {
            ?>
			<table class='adminheading'>
			<tr><th><?php 
            echo $jLang['_ADMIN_CONF_TITLE'] . " - " . getVersionNum();
            ?>
</th></tr>
			</table>
			<?php 
        }
        ?>
		<div style='width: 100%;'>
		<?php 
        $tabs = new jTipsTabs(1);
        $tabs->startPane('dashboard');
        foreach ($this->configuration as $tab => $items) {
            $tabs->startTab(ucwords($tab), $tab);
            ?>
			&nbsp;
			<table class='adminlist'>
				<thead>
				<tr>
					<th align='left' width='20%'><?php 
            echo $jLang['_ADMIN_CONF_SETTING'];
            ?>
</th>
					<th align='left' width='20%'><?php 
            echo $jLang['_ADMIN_CONF_VARIABLE'];
            ?>
</th>
					<th align='left'><?php 
            echo $jLang['_ADMIN_CONF_DESCRIPTION'];
            ?>
</th>
				</tr>
				</thead>
				<tbody>
			<?php 
            $i = 0;
            foreach ($items as $key => $val) {
                if (isset($val['versions']) and !empty($val['versions'])) {
                    continue;
                } else {
                    if (isset($val['type']) and !empty($val['type'])) {
                        $label = (isset($val['label']) and !empty($val['label']) and isset($jLang[$val['label']]) and !empty($jLang[$val['label']])) ? $val['label'] : '';
                        if (isset($val['definition']) and !empty($val['definition']) and isset($jLang[$val['definition']]) and !empty($jLang[$val['definition']])) {
                            $definition = $jLang[$val['definition']];
                        } else {
                            $definition = '&nbsp;';
                        }
                        ?>
					<tr class='row<?php 
                        echo $i % 2;
                        ?>
'>
						<td><?php 
                        if (isset($jLang[$label]) and !empty($jLang[$label])) {
                            echo $jLang[$label];
                        } else {
                            echo "&nbsp;";
                        }
                        ?>
</td>
						<td><?php 
                        echo makeConfigItem($key, $val);
                        ?>
</td>
						<td><?php 
                        echo $definition;
                        ?>
</td>
					</tr>
					<?php 
                    }
                }
                $i++;
            }
            ?>
				</tbody>
				</table>
				<?php 
            $tabs->endTab();
        }
        $tabs->endPane();
        ?>
		</div>
		</form>
		<?php 
    }
Exemple #10
0
    function display()
    {
        global $jTips, $jLang, $mainframe;
        jTipsCommonHTML::loadCalendar();
        if (isJoomla15()) {
            JToolBarHelper::title($this->formData['title'], 'round');
        } else {
            ?>
			<table class='adminheading'>
			<tr>
				<th><?php 
            echo $this->formData['title'];
            ?>
</th>
			</tr>
			</table>
			<?php 
        }
        ?>
		<style type="text/css">
		.hide {
			display:none;
		}
		</style>
		<form action='index2.php' name='adminForm' id='adminForm' method='post'>
			<input type="hidden" name="task" value="edit" />
			<input type="hidden" name="option" value="com_jtips" />
			<input type="hidden" name="module" value="Rounds" />
			<input type="hidden" name="boxchecked" value="0" />
			<input type="hidden" name="id" id="id" value="<?php 
        echo $this->focus->id;
        ?>
" />
			<input type="hidden" name="filter_order" value="<?php 
        echo jTipsGetParam($_REQUEST, 'filter_order');
        ?>
" />
			<input type="hidden" name="filter_order_Dir" value="<?php 
        echo jTipsGetParam($_REQUEST, 'filter_order_Dir');
        ?>
" />
			<input type="hidden" name="<?php 
        echo jTipsSpoofValue();
        ?>
" value="1" />
			<fieldset>
				<legend><?php 
        echo $jLang['_ADMIN_ROUND_LEGEND'];
        ?>
</legend>
				<table class='admintable' width="100%">
				<tr>
				<td class="key" width="25%"><?php 
        echo $jLang['_ADMIN_SEASON_SELECT'];
        ?>
</td>
				<td><?php 
        echo $this->selectLists['season_id'];
        ?>
</td>
				</tr>
				<tr>
				<td class="key" width="25%"><?php 
        echo $jLang['_ADMIN_ROUND_ROUND'];
        ?>
</td>
				<td><?php 
        echo $this->selectLists['roundnum'];
        ?>
</td>
				</tr>
				<tr>
				<td class="key" width="25%"><?php 
        echo $jLang['_ADMIN_ROUND_START'] . " " . $jLang['_ADMIN_ROUND_DATE'] . " &amp; " . $jLang['_ADMIN_ROUND_TIME'];
        ?>
</td>
				<td>
				<input type="text" name="date_start_date" size="30" value="<?php 
        echo $this->date_start_date;
        ?>
" id="date_start_date" />&nbsp;<img src='components/com_jtips/images/calendar.png' onclick='return showCalendar("date_start_date", "<?php 
        echo $jTips['DateFormat'];
        ?>
");' border='0' alt='...' align='absmiddle' />
				&nbsp;<?php 
        echo $this->date_start_time_hour;
        ?>
				:<?php 
        echo $this->date_start_time_minute;
        ?>
				&nbsp;<?php 
        echo $this->date_start_time_meridiem;
        ?>
				</td>
				</tr>
				<tr>
				<td class="key" width="25%"><?php 
        echo $jLang['_ADMIN_ROUND_END'] . " " . $jLang['_ADMIN_ROUND_DATE'] . " &amp; " . $jLang['_ADMIN_ROUND_TIME'];
        ?>
</td>
				<td>
				<input type="text" name="date_end_date" size="30" value="<?php 
        echo $this->date_end_date;
        ?>
" id="date_end_date" />&nbsp;<img src='components/com_jtips/images/calendar.png' onclick='return showCalendar("date_end_date", "<?php 
        echo $jTips['DateFormat'];
        ?>
");' border='0' alt='...' align='absmiddle' />
				&nbsp;<?php 
        echo $this->date_end_time_hour;
        ?>
				:<?php 
        echo $this->date_end_time_minute;
        ?>
				&nbsp;<?php 
        echo $this->date_end_time_meridiem;
        ?>
				</td>
				</tr>
				<tr>
				<td class="key" width="25%"><label for="show_comments"><?php 
        echo $jLang['_ADMIN_ROUND_SHOW_COMMENTS'];
        ?>
</label></td>
				<td><input type="checkbox" id="show_comments" onClick="$$('.info').toggleClass('hide');" /></td>
				</tr>
				</table>
			</fieldset>
			<fieldset>
			<legend><?php 
        echo $jLang['_ADMIN_ROUND_GAMES_LEGEND'];
        ?>
</legend>
			<?php 
        if (!$this->focus->getStatus() or !$this->focus->exists()) {
            ?>
			<p><input type="button" disabled class="button" onClick="addGameRow();toggleColumns();" id="addgame" value="Add Game" />
			&nbsp;<input type="button" disabled  class="button" onClick="removeGameRow();toggleColumns();" id="removegame" value="Remove Game(s)" /></p>
				<?php 
        }
        ?>
			<div id="round_loading" style="text-align:center;"><img src="components/com_jtips/images/loading.gif" alt="Loading..." border="0" /></div>
			<table class="adminlist" id="games_list" style="display:none;opacity:0;">
				<thead>
				<tr>
					<!--th align='center' width='1'>#</th-->
					<th align="center" width='20'>&nbsp;</th>
					<th id="left_team_th">&nbsp;</th>
					<th id="right_team_th">&nbsp;</th>
					<th><?php 
        echo $jLang['_ADMIN_ROUND_ORDER'];
        ?>
</th>
					<th class="pick_score"><input type='checkbox' onclick='toggleYesNo(this, "score");' <?php 
        echo (is_numeric($this->status) and $this->focus->exists()) ? "style='display:none;'" : "";
        ?>
 id="pick_score_toggle" /> <label for="pick_score_toggle"><?php 
        echo $jLang['_ADMIN_GAME_HAS_SCORE'];
        ?>
</label></th>
					<th class="pick_margin"><input type='checkbox' onclick='toggleYesNo(this, "margin");' <?php 
        echo (is_numeric($this->status) and $this->focus->exists()) ? "style='display:none;'" : "";
        ?>
 id="pick_margin_toggle" /> <label for="pick_margin_toggle"><?php 
        echo $jLang['_ADMIN_GAME_HAS_MARGIN'];
        ?>
</label></th>
					<th class="pick_bonus"><input type='checkbox' onclick='toggleYesNo(this, "bonus");' <?php 
        echo (is_numeric($this->status) and $this->focus->exists()) ? "style='display:none;'" : "";
        ?>
 id="pick_bonus_toggle" /> <label for="pick_bonus_toggle"><?php 
        echo $jLang['_ADMIN_GAME_HAS_BONUS'];
        ?>
</label></th>
		            <th id="left_start_th" class="team_starts">&nbsp;</th>
		            <th id="right_start_th" class="team_starts">&nbsp;</th>
		            <th id="tough_score_th" class="tough_score">&nbsp;</th>
		            <th class="date_time"><?php 
        echo $jLang['_ADMIN_GAME_TIME'];
        ?>
</th>
		            <th id="left_score_th" class="results">&nbsp;</th>
		            <th id="right_score_th" class="results">&nbsp;</th>
		            <th class="bonus_results"><?php 
        echo $jLang['_ADMIN_GAME_BONUS'];
        ?>
</th>
			    <th id="info_th" class="info hide"><?php 
        echo $jLang['_ADMIN_ROUNDS_INFO'];
        ?>
</th>
				</tr>
				</thead>
				<tbody id="table">
				</tbody>
			</table>
			</fieldset>
		</form>
		<?php 
        $init = "\n\t\t<script type='text/javascript'>\n\t\twindow.addEvent('domready', function() {\n\t\t\tgetTheRounds(\$('season_id'))\n\t\t});\n\t\t</script>";
        if (isJoomla15()) {
            $mainframe->addCustomHeadTag($init);
        } else {
            echo $init;
        }
    }