$jGame = new jGame($database); $jGame->load($gid); $jGame->home_score = jTipsGetParam($_REQUEST['home_score'], $i, 0); $jGame->away_score = jTipsGetParam($_REQUEST['away_score'], $i, 0); $jGame->bonus_id = jTipsGetParam($_REQUEST['bonus_id'], $i, null); $jGame->draw = null; if ($jGame->home_score > $jGame->away_score) { $jGame->winner_id = $jGame->home_id; } else { if ($jGame->away_score > $jGame->home_score) { $jGame->winner_id = $jGame->away_id; } else { $jGame->winner_id = -1; $jGame->draw = 1; } } if (!$round_id) { $round_id = $jGame->round_id; } $jGame->save(); } if ($round_id) { //now to process the round $jRound = new jRound($database); $jRound->load($round_id); $jRound->process(); $message = '<p class="message">' . $jLang['_ADMIN_ROUND_STATUS_C'] . '</p>'; } else { $message = '<p class="error">' . $jLang['_COM_FAILED'] . ': ' . $jRound->getErrorMsg() . '</p>'; } die($message);
$dateFormat = '%Y-%m-%d'; } else { $dateFormat = $jTips['DateFormat']; } // Set default values for newer config variables if (!isset($jTips['Is24Hour'])) { $jTips['Is24Hour'] = '0'; } if (!isset($jTips['MinuteValues'])) { $jTips['MinuteValues'] = '0'; } $mainframe->addCustomHeadTag("<script type='text/javascript'>var DateFormat = '" . $dateFormat . "'; var Offset = " . TimeDate::getOffset() . "; var MinuteValues = {$jTips['MinuteValues']}; var Is24Hour = {$jTips['Is24Hour']};</script>"); //BUG 259 - No need to define style here - causes problems in J1.0 with IE //$mainframe->addCustomHeadTag("<style type='text/css'>.pick_score {display:none;} .pick_margin {display:none} .pick_bonus {display:none;} .team_starts {display:none;}</style>"); $tpl = new EditMode(); $focus = new jRound($database); $ids = jTipsGetParam($_REQUEST, 'cid', array()); if (!empty($ids)) { $id = array_shift($ids); $focus->load($id); } //load the jRound object into the script $mainframe->addCustomHeadTag("<script type='text/javascript'>var jRound = " . @json_encode($focus) . ";</script>"); $tpl->formData = array('title' => $jLang['_ADMIN_ROUND_TITLE'] . ": " . ($focus->exists() ? $jLang['_ADMIN_OTHER_EDIT'] : $jLang['_ADMIN_OTHER_NEW'])); $tpl->focus =& $focus; $tpl->status = $focus->getStatus(); if ($focus->getStatus() !== false) { $tpl->massToggles = "disabled"; } else { $tpl->massToggles = ""; }
function getSummaryScores() { global $database; $season_ids = $this->getSeasons(); $scores = array(); foreach ($season_ids as $season_id) { $jSeason = new jSeason($database); $jSeason->load($season_id); $round_id = $jSeason->getCurrentRound(); $jRound = new jRound($database); $jRound->load($round_id); $last_round_id = $jRound->getPrev(); $jHistory = new jHistory($database); if (is_integer($last_round_id)) { $params = array('user_id' => $this->user_id, 'round_id' => $round_id); $jHistory->loadByParams($params); } $jTipsUser_season = new jTipsUser($database); $params = array('user_id' => $this->user_id, 'season_id' => $season_id); $jTipsUser_season->loadByParams($params); $jRound->load($last_round_id); $total = $jHistory->getTotal($this, 'points'); if (!isset($total)) { $total = 0; } $average = $total / (is_numeric($jRound->round) && $jRound->round > 0 ? $jRound->round : 1); if (!isset($average)) { $average = 0; } $scores[$season_id] = array('total_points' => $total, 'total_precision' => $jHistory->getTotal($this, 'precision'), 'average' => $average, 'doubleup' => $jTipsUser_season->doubleup, 'paid' => $jTipsUser_season->paid); } return $scores; }
<?php defined('_JEXEC') or defined('_VALID_MOS') or die('Restricted Access'); /** * Website: www.jtips.com.au * @author Jeremy Roberts * @copyright Copyright © 2009, jTips * @license Commercial - See website for details * * @since 2.1 - 08/10/2008 * @version 2.1 * @package jTips * * Description: Delete the selected rounds and their related games */ jTipsSpoofCheck(); global $mainframe, $database; require_once 'components/com_jtips/classes/jgame.class.php'; require_once 'components/com_jtips/classes/jround.class.php'; $cids = jTipsGetParam($_REQUEST, 'cid', array()); $jRound = new jRound($database); $success = 0; foreach ($cids as $rid) { if ($jRound->destroy($rid)) { $success++; } else { jTipsLogger::_log("Failed to delete round with id: {$rid} - " . $jRound->_error); } } $message = "{$success} / " . count($cids) . " " . $jLang['_ADMIN_ROUND_DELETED']; mosRedirect('index2.php?option=com_jtips&task=list&module=Rounds', $message);
$jTipsCurrentUser = new jTipsUser($database); $my =& $mainframe->getUser(); $parameters = array('user_id' => $my->id); $temp = forceArray($jTipsCurrentUser->loadByParams($parameters)); $jTipsCurrentUser = array_shift($temp); unset($parameters); } //Get the season $jtips_params = array('name' => trim($season_name)); $jSeason = new jSeason($database); $jSeason->loadByParams($jtips_params); if (isset($jSeason->id) and !empty($jSeason->id)) { //parse the info here $hasData = true; $round_id = $jSeason->getCurrentRound(); $jRound = new jRound($database); if (!$round_id) { $hasData = false; } else { $jRound->load($round_id); } $data = array('round_id' => $round_id); $game = new jGame($database); $jGames = forceArray($game->loadByParams($data)); if (empty($jGames)) { $hasData = false; } if ($hasData) { if ($jSeason->tips_layout == 'away') { $left = 'away'; $right = 'home';
* @copyright Copyright © 2009, jTips * @license Commercial - See website for details * * @since 2.1.9 - 06/04/2009 * @version 1.0.0 * @package jTips * * Description: */ require_once 'components/com_jtips/classes/jround.class.php'; require_once 'components/com_jtips/classes/jseason.class.php'; require_once 'components/com_jtips/modules/Rounds/copy.tmpl.php'; global $database, $jTips, $jLang; $tpl = new CopyMode(); $tpl->formData['title'] = $jLang['_ADMIN_ROUND_COPY']; // load the round id being copied $focus = new jRound($database); $ids = jTipsGetParam($_REQUEST, 'cid', array()); if (!empty($ids)) { $id = array_shift($ids); $focus->load($id); } else { mosRedirect('index2.php?option=com_jtips&module=Rounds&task=list', $jLang['_ADMIN_ROUND_COPY_NOROUND']); } $tpl->round = $focus->round; $tpl->round_id = $focus->id; // load the season info $jSeason = new jSeason($database); $jSeason->load($focus->season_id); $tpl->season_name = $jSeason->name; $tpl->display();
function getNextLogicalRound() { global $database; $round_id = $this->getCurrentRound(); $jRound = new jRound($database); $jRound->load($round_id); if ($jRound->round + 1 >= $this->rounds) { return $this->rounds; } else { return $jRound->round + 1; } }
<?php if ($user_field != '-1') { ?> <th class="sectiontableheader" style="text-align:center"><?php echo $fieldOptions[$user_field]; ?> </th> <?php } ?> </tr> </thead> <tbody> <?php $round_id = $jSeason->getLastRound(); $jRound = new jRound($database); $jRound->load($round_id); $jHistory = new jHistory($database); $orderField = ($user_field != 'moved' and $user_field != '-1') ? $user_field : 'pointst'; if ($orderField == 'points' or $orderField == 'comment') { $order = 'desc'; } else { if ($orderField == 'rank' or $orderField == 'pointst') { $order = 'asc'; } else { $order = 'default'; } } $userLadder = $jHistory->getLadder($numtoshow, $round_id, 0, $orderField, $order); $i = 1; foreach ($userLadder as $jUser) {
} else { require_once $mosConfig_absolute_path . '/components/com_jtips/views/CompetitionLadder/tmpl/default.php'; } $mainframe->addCustomHeadTag("<script type='text/javascript' src='" . $mosConfig_live_site . "/components/com_jtips/views/CompetitionLadder/CompetitionLadder.js'></script>"); $render = new jTipsRenderCompetitionLadder(); global $mainframe, $database, $jTips; $my = $mainframe->getUser(); //$jTipsUser = new jTipsUser($database); $page = jTipsGetParam($_REQUEST, 'page', 0); $round_id = jTipsGetParam($_REQUEST, 'round_id', false); $jSeason = new jSeason($database); $season_id = getSeasonID(); $jSeason->load($season_id); $render->assign('jSeason', $jSeason); //die(getSeasonID()); $jRound = new jRound($database); if ($round_id !== false) { $jRound->load($round_id); } else { //Bug 171 & 172 - getCurrentRound is problematic here - gets currently active round! //$round_id = $jSeason->getCurrentRound(); $round_id = $jSeason->getLastRound(); $jRound->load($round_id); if ($jRound->scored != 1) { $prev_id = $jRound->getPrev(); if ($prev_id !== false) { $jRound->load($prev_id); } } } $render->assign('jRound', $jRound);
require_once $include_path . 'utils/timedate.php'; require_once $include_path . 'utils/functions.inc.php'; require_once $include_path . 'classes/jcomment.class.php'; require_once $include_path . 'classes/jhistory.class.php'; require_once $include_path . 'classes/jround.class.php'; require_once $include_path . 'classes/jseason.class.php'; require_once $include_path . 'classes/juser.class.php'; include $include_path . 'config.jtips.php'; //Get the season $jtips_params = array('name' => trim($season_name)); $jSeason = new jSeason($database); $jSeason->loadByParams($jtips_params); if (isset($jSeason->id) and !empty($jSeason->id)) { //parse the info here //get the last round $jRound = new jRound($database); $round_id = $jSeason->getLastRound(); $jRound->load($round_id); //Get the list of rounds $query = "SELECT id FROM #__jtips_rounds WHERE season_id = " . $database->Quote($jSeason->id) . " AND scored = 1"; $database->setQuery($query); $rids = $database->loadResultArray(); //find the user $query = "SELECT user_id, AVG(points) pointsa, AVG(`precision`) preca FROM #__jtips_history " . "WHERE round_id IN ('" . implode("', '", $rids) . "') GROUP BY user_id "; if ($params->get('type') == 'worst') { $query .= " ORDER BY pointsa ASC, preca DESC, RAND()"; } else { $query .= " ORDER BY pointsa DESC, preca ASC, RAND()"; } //jTipsDebug($query); $database->setQuery($query, 0, 1);
function getSeasonName() { global $database; if (!isset($this->season_name)) { $jRound = new jRound($database); $jRound->load($this->round_id); $jSeason = new jSeason($database); $jSeason->load($jRound->season_id); $this->season_name = $jSeason->name; } return $this->season_name; }
$rounds[$jRound->season_id][$jRound->round] = $rid; } sort($seasons); $rounds_to_process = array(); foreach ($seasons as $sid) { ksort($rounds[$sid]); $rounds_to_process = array_merge($rounds_to_process, $rounds[$sid]); } jTipsLogger::_log("round order now fixed (bug 58)"); // // END BUG 58 Fix //////////////////////////////////////////////////// $skippedRounds = $processedRounds = 0; foreach ($rounds_to_process as $id) { //clearHistory($id); $jRound = new jRound($database); $jRound->load($id); //make sure we only process rounds that are pending results if (!$jRound->getStatus()) { $skippedRounds++; jTipsLogger::_log('failed to process this round (' . $jRound->id . ')... it hasnt finished yet! STATUS: ' . $jRound->getStatus()); continue; } if ($jRound->process()) { $processedRounds++; } else { $skippedRounds++; } } $message = $processedRounds . " / " . count($cid) . " " . $jLang['_ADMIN_ROUND_PROCESSED']; //jTipsDebug($message);
* * */ global $mosConfig_absolute_path, $mainframe, $database, $jTips; require_once $mosConfig_absolute_path . '/administrator/components/com_jtips/classes/jcomment.class.php'; require_once $mosConfig_absolute_path . '/administrator/components/com_jtips/classes/jround.class.php'; require_once $mosConfig_absolute_path . '/administrator/components/com_jtips/classes/jhistory.class.php'; require_once $mosConfig_absolute_path . '/administrator/components/com_jtips/classes/juser.class.php'; if (jTipsFileExists($mosConfig_absolute_path . '/components/com_jtips/custom/views/Dashboard/tmpl/default.ext.php')) { require_once $mosConfig_absolute_path . '/components/com_jtips/custom/views/Dashboard/tmpl/default.ext.php'; } else { require_once $mosConfig_absolute_path . '/components/com_jtips/views/Dashboard/tmpl/default.php'; } $render = new jTipsRenderDashboard(); $season_id = getSeasonID(); //jTipsLogger::_log($_REQUEST, 'ERROR'); $my = $mainframe->getUser(); $jSeason = new jSeason($database); if (is_numeric($season_id)) { $jSeason->load($season_id); $render->assign('jSeason', $jSeason); $jRound = new jRound($database); if (($round_id = $jSeason->getCurrentRound()) !== false) { $jRound->load($round_id); } $render->assign('jRound', $jRound); $render->display(); } else { echo "<span class='error'>Invalid Season/Competition Specified.</span>"; } //jtips_HTML::jtips_home($jTipsUser, $jRound, $jSeason);
} else { $season_id = jTipsGetParam($_REQUEST, 'season_id', false); $round_id = jTipsGetParam($_REQUEST, 'round_id', false); $user_id = jTipsGetParam($_REQUEST, 'user_id', false); } //need to select the season, then the round, then list the games //get the seasons $jSeason = new jSeason($database); $jSeasons = forceArray($jSeason->loadByParams(array())); //make a set of options for a select list $season_options = objectsToSelectList($jSeasons, 'name'); $filters = array('Select Season' => makeSelectList($season_options, 'season_id', "id='season_id' onChange='this.form.submit();'", $season_id)); //Load the Rounds if ($season_id) { $params = array('season_id' => $season_id); $jRound = new jRound($database); $jRounds = forceArray($jRound->loadByParams($params)); $round_options = objectsToSelectList($jRounds, 'round'); $filters['Select Round'] = makeSelectList($round_options, 'round_id', "id='round_id' onChange='this.form.submit();'", $round_id); } //Load the users if ($round_id and $season_id) { $params = array('season_id' => $season_id); $jTipsUser = new jTipsUser($database); $jTipsUsers = forceArray($jTipsUser->loadByParams($params)); $user_options = objectsToSelectList($jTipsUsers, 'getName', true); asort($user_options); $filters['Select User'] = makeSelectList($user_options, 'user_id', "id='user_id' onChange='this.form.submit();'", $user_id); } $tpl->selectLists = $filters; $data = array();
jTipsSpoofCheck(); require_once 'components/com_jtips/classes/jcomment.class.php'; require_once 'components/com_jtips/classes/jround.class.php'; require_once 'components/com_jtips/classes/jseason.class.php'; require_once 'components/com_jtips/classes/jtip.class.php'; require_once 'components/com_jtips/classes/juser.class.php'; $ids = jTipsGetParam($_REQUEST, 'cid', array()); $destroyed = array(); if (!empty($ids)) { foreach ($ids as $id) { if (is_numeric($id)) { $jSeason = new jSeason($database); $jSeason->load($id); jTipsLogger::_log('Deleting season ' . $jSeason->name); $params = array('season_id' => $id); $jRound = new jRound($database); $jRounds = $jSeason->loadByParams($params); if (!is_array($jRounds)) { if ($jRound->exists()) { $jRounds = array($jRound); } else { $jRounds = array(); } } jTipsLogger::_log('deleting rounds from season'); foreach ($jRounds as $jRound) { array_push($destroyed, $jRound->destroy()); } $jTipsUser = new jTipsUser($database); $jTipsUsers = $jTipsUser->loadByParams($params); if (!is_array($jTipsUsers)) {
function display() { global $mainframe, $database, $jTips, $jLang, $jLicence, $mosConfig_absolute_path, $mosConfig_live_site, $database; jTipsLogger::_log('Loading dashboard', 'INFO'); jTipsCommonHTML::loadOverlib(); $option = jTipsGetParam($_REQUEST, 'option', 'com_jtips'); if (isJoomla15()) { JToolbarHelper::title($jLang['_ADMIN_DASH_CPANEL'], 'frontpage'); } else { ?> <table class="adminheading" border="0" width="100%"> <tr> <th class="cpanel" align="left"><?php echo $jLang['_ADMIN_DASH_CPANEL']; ?> </th> <td align="right"><a href="http://www.jtips.com.au" target="_blank" title="jTips Home"><img src="<?php echo $mosConfig_live_site; ?> /components/com_jtips/images/license_logo.png" alt="" border="0" /></a></td> </tr> </table> <?php } ?> <table class="adminform"> <tr> <td width="55%" valign="top"> <?php jTipsLogger::_log('Building dashboard icons', 'INFO'); foreach ($this->menu as $item) { if (isset($item['url']) and !empty($item['url'])) { $link = $item['url']; $extra = "target='_blank'"; } else { $link = "index2.php?option={$option}&task=" . $item['task']; $extra = ""; } ?> <div id="cpanel" style="float:left;"> <div class="icon"> <a href="<?php echo $link; ?> " <?php echo $extra; ?> > <img src="components/com_jtips/images/<?php echo $item['image']; ?> " alt="<?php echo $jLang[$item['alt']]; ?> " align="middle" border="0" /><span><?php echo $jLang[$item['link']]; ?> </span></a> </div> </div> <?php } ?> </td> <td width="45%" valign="top"> <div style="width: 100%;"> <?php $tabs = new jTipsTabs(1); $tabs->startPane('dashpanel'); $tabs->startTab($jLang['_ADMIN_DASH_TAB_SUMMARY'], 'summary'); $center = "style='text-align:center;'"; ?> <table class='adminlist'> <thead> <tr> <th><?php echo $jLang['_COM_DASH_SEASON']; ?> </th> <th <?php echo $center; ?> ><?php echo $jLang['_COM_DASH_CURR_ROUND']; ?> </th> <th <?php echo $center; ?> ><?php echo $jLang['_ADMIN_DASH_TOTAL_USERS']; ?> </th> <th <?php echo $center; ?> ><?php echo $jLang['_ADMIN_DASH_PENDING_TIPS']; ?> </th> <th <?php echo $center; ?> ><?php echo $jLang['_ADMIN_DASH_PENDING_PAYMENT']; ?> </th> </tr> </thead> <tbody> <?php jTipsLogger::_log('Loading season data', 'INFO'); $total_user_count = 0; foreach ($this->jSeasons as $jSeason) { if (TimeDate::toDatabaseDate($jSeason->end_time) > gmdate('Y-m-d')) { $round_id = $jSeason->getCurrentRound(); $jRound = new jRound($database); if ($round_id) { $jRound->load($round_id); } $jTipsUsers = $jSeason->getUsers(); $total_users = 0; $no_tips = 0; $has_paid = 0; $no_tips_overlib = ""; foreach ($jTipsUsers as $jTipsUser) { $total_users++; if (!$jTipsUser->hasTipped($jRound->id)) { $no_tips++; if ($no_tips < 10) { $no_tips_overlib .= "<br />" . htmlentities($jTipsUser->getName()); } else { if ($no_tips == 10) { $no_tips_overlib .= "<br />...more"; } } } if ($jTipsUser->paid == 1) { $has_paid++; } } if ($jTips['Payments'] != 0) { $pending_payment = $total_users - $has_paid; } else { $pending_payment = "N/A"; } $no_tips_overlib = substr($no_tips_overlib, 6); if ($no_tips > 0) { $no_tips_overlib_call = jTipsToolTip($no_tips_overlib, "Users Missing Tips"); } else { $no_tips_overlib_call = ''; } ?> <tr> <td><?php echo $jSeason->name; ?> </td> <td <?php echo $center; ?> ><?php echo $jRound->round; ?> </td> <td <?php echo $center; ?> ><?php echo $total_users; ?> </td> <td <?php echo $center; ?> ><?php echo $no_tips . " " . $no_tips_overlib_call; ?> </td> <td <?php echo $center; ?> ><?php echo $pending_payment; ?> </td> </tr> <?php $total_user_count += $total_users; } } ?> </tbody> </table> <?php $tabs->endTab(); $tabs->startTab($jLang['_ADMIN_DASH_TAB_UPDATED'], 'update'); $filesWritable = filesWritable(); ?> <table class="adminlist" width="100%"> <thead> <tr> <th <?php echo $center; ?> ><?php echo $jLang['_ADMIN_DASH_UPG_THISVERSION']; ?> </th> <th <?php echo $center; ?> ><?php echo $jLang['_ADMIN_DASH_UPG_LATESTVERSION']; ?> </th> <th <?php echo $center; ?> ><?php echo $jLang['_ADMIN_DASH_UPG_UPGRADE']; ?> </th> <th <?php echo $center; ?> ><?php echo $jLang['_ADMIN_DASH_UPG_FILE_CHECK']; ?> </th> </tr> </thead> <tbody> <tr> <td <?php echo $center; ?> ><?php echo getFullVersion(); ?> </td> <!-- td <?php echo $center; ?> id="latest_version"><input type="button" onclick="liveCheckLatestVersion('latest_version');" class="button" value="Check Now" <?php if (!$filesWritable) { echo "disabled"; } ?> /></td --> <td <?php echo $center; ?> >N/A</td> <!-- td <?php echo $center; ?> ><span id="liveupdatespan"><?php echo getUpdateButton('', ''); ?> </span></td --> <td <?php echo $center; ?> >N/A</td> <td <?php echo $center; ?> > <?php if ($filesWritable) { $tip = $jLang['_ADMIN_DASH_UPG_FILE_CHECK_OK']; $tipTitle = $jLang['_ADMIN_DASH_UPG_FILE_CHECK_OK_TITLE']; $img = 'checkin.png'; echo jTipsToolTip($tip, $tipTitle, '', $img); } else { $tip = $jLang['_ADMIN_DASH_UPG_FILE_CHECK_FAIL']; $tipTitle = $jLang['_ADMIN_DASH_UPG_FILE_CHECK_FAIL_TITLE']; $img = 'warning.png'; ?> <a href=> <?php echo jTipsToolTip($tip, $tipTitle, '', $img, '', "index2.php?option=com_jtips&module=Upgrade&task=list"); ?> </a> <?php } ?> </td> </tr> <?php if (needsUpgrade()) { ?> <tr> <td colspan="4" id="upgrade_area" <?php echo $center; ?> > <input type="button" class="button" name="upgrade" value="<?php echo $jLang['_ADMIN_UPGRADE_BUTTON']; ?> " onclick="doUpgrade(this);" /> </td> </tr> <?php } ?> </tbody> <thead> <tr> <th <?php echo $center; ?> ><?php echo $jLang['_ADMIN_DASH_LAST_VALIDATED']; ?> </th> <th <?php echo $center; ?> ><?php echo $jLang['_ADMIN_DASH_VALIDATION']; ?> </th> <th <?php echo $center; ?> ><?php echo $jLang['_ADMIN_DASH_EXPIRY_DATE']; ?> </th> <th <?php echo $center; ?> ><?php echo $jLang['_ADMIN_LICENSE_USER_COUNT']; ?> </th> </tr> </thead> <tbody> <tr> <td <?php echo $center; ?> ><?php $validation_date = $jLicence->getValidationDate(); if ($validation_date == -1) { echo $jLang['_ADMIN_DASH_LIC_EXPIRED']; } else { echo $validation_date; } ?> </td> <td <?php echo $center; ?> ><a href="index2.php?option=com_jtips&task=Validate&module=Dashboard"><?php echo $jLang['_ADMIN_DASH_REVALIDATE']; ?> </a></td> <td <?php echo $center; ?> ><?php echo TimeDate::toDisplayDate($jLicence->licence['license_expiry']); ?> </td> <td <?php echo $center; ?> ><?php echo $jLicence->getActiveUserCount(); ?> / <?php echo $jLicence->getLicensedUsers(); ?> </td> </tr> </tbody> <thead> <tr> <th <?php echo $center; ?> colspan="4"><?php echo $jLang['_ADMIN_DASH_LOGGING']; ?> </th> </tr> </thead> <tbody> <tr> <td nowrap><?php echo $jLang['_ADMIN_DASH_FILE_SIZE']; ?> : <?php echo size_readable(filesize($mosConfig_absolute_path . '/components/com_jtips/jtips.log')); ?> </td> <td <?php echo $center; ?> ><a href="index2.php?option=com_jtips&task=DownloadLog&module=Dashboard"><?php echo $jLang['_ADMIN_DASH_DOWNLOAD']; ?> </a></td> <td <?php echo $center; ?> ><a href="index2.php?option=com_jtips&task=PurgeLog&module=Dashboard"><?php echo $jLang['_ADMIN_DASH_PURGE']; ?> </a></td> <td> </td> </tr> </tbody> <tfoot> <tr> <td colspan="4"><small><em><?php echo $jLang['_ADMIN_DASH_LOG_ROTATED']; ?> </em></small></td> </tr> </tfoot> </table> <?php $tabs->endTab(); $tabs->startTab($jLang['_ADMIN_DASH_TAB_ABOUT'], 'about'); ?> <div style="text-align:center;"><img src="components/com_jtips/images/logo.png" border="0" /> <h1><?php echo getFullVersion(); ?> </h1></div> <p><?php echo $jLang['_ADMIN_DASH_ABOUT_UPDATES']; ?> <a href="http://www.jtips.com.au/" target="_blank">http://www.jtips.com.au</a></p> <p><?php echo $jLang['_ADMIN_DASH_ABOUT_SALES']; ?> <a href="mailto:sales@jtips.com.au?subject=jTips Enquiry">sales@jtips.com.au</a></p> <p><?php echo $jLang['_ADMIN_DASH_ABOUT_SUPPORT']; ?> <a href="http://www.jtips.com.au" target="_blank">jTips.com.au</a></p> <p><?php echo $jLang['_ADMIN_DASH_ABOUT_REBUILD']; ?> <a href="#" onclick="sendRebuildRequest('rebuildProgress');">» <?php echo $jLang['_COMMON_CLICK_HERE']; ?> «</a> <span id="rebuildProgress"></span></p> <?php $tabs->endTab(); $tabs->startTab($jLang['_ADMIN_DASH_TAB_CREDITS'], 'credits'); ?> <p><strong><?php echo $jLang['_ADMIN_DASH_CREDITS']; ?> :</strong></p> <table class="adminlist" width="100%"> <thead> <tr> <th><?php echo $jLang['_ADMIN_DASH_CREDITS_PACKAGE']; ?> </th> <th><?php echo $jLang['_ADMIN_DASH_CREDITS_HOMEPAGE']; ?> </th> </tr> </thead> <tbody> <tr> <td>mootools</td> <td><a href="http://mootools.net/" target="_blank">http://mootools.net</a></td> </tr> <tr> <td>tnimg</td> <td><a href="http://vagh.armdex.com/tnimg" target="_blank">http://vagh.armdex.com/tnimg</a></td> </tr> <tr> <td>cURL</td> <td><a href="http://www.phpclasses.org/browse/package/1988.html" target="_blank">http://www.phpclasses.org</a></td> </tr> <tr> <td>dUnzip2</td> <td><a href="http://www.phpclasses.org/browse/package/2495.html" target="_blank">http://www.phpclasses.org</a></td> </tr> <tr> <td>MOOdalBox</td> <td><a href="http://www.e-magine.ro/web-dev-and-design/36/moodalbox/" target="_blank">http://www.e-magine.ro</a></td> </tr> <tr> <td>Silk Icons</td> <td><a href="http://www.famfamfam.com/lab/icons/silk/" target="_blank">http://www.famfamfam.com</a></td> </tr> <tr> <td>datejs</td> <td><a href="http://www.datejs.com/" target="_blank">http://www.datejs.com</a></td> </tr> <tr> <td>strftime in javascript</td> <td><a href="http://tech.bluesmoon.info/2008/04/strftime-in-javascript.html" target="_blank">http://tech.bluesmoon.info/2008/04/strftime-in-javascript.html</a></td> </tr> <tr> <td>Editor Area</td> <td><a href="http://www.cdolivet.net/editarea/" target="_blank">http://www.cdolivet.net/editarea</a></td> </tr> <tr> <td>GNOME Icons</td> <td><a href="http://commons.wikimedia.org/wiki/GNOME_Desktop_icons" target="_blank">http://commons.wikimedia.org/wiki/GNOME_Desktop_icons</a></td> </tr> </tbody> </table> <?php $tabs->endTab(); $tabs->startTab($jLang['_ADMIN_DASH_TAB_HELP'], 'help'); ?> <h2><?php echo $jLang['_ADMIN_DASH_HELP']; ?> </h2> <p><?php echo $jLang['_ADMIN_DASH_HELP_INTRO']; ?> <a href="http://www.jtips.com.au" target="_blank">www.jtips.com.au</a></p> <ul> <li><?php echo $jLang['_ADMIN_DASH_HELP_GETTING_STARTED']; ?> </li> <li><?php echo $jLang['_ADMIN_DASH_HELP_GUIDES']; ?> </li> <li><?php echo $jLang['_ADMIN_DASH_HELP_TRICKS']; ?> </li> </ul> <p>Do you have an invalid license key? Please contact jTips Support at <a href="mailto:support@jtips.com.au">support@jtips.com.au</a> and confirm your license key is valid for the domain <strong><?php echo $_SERVER['SERVER_NAME']; ?> </strong>.</p> <?php $tabs->endTab(); $tabs->endPane(); ?> </div> </td> </tr> </table> <?php }
function getLast(&$jTipsUser, $field = 'points') { global $database; $jSeason = new jSeason($database); $jSeason->load($jTipsUser->season_id); $jRound = new jRound($database); $jRound->load($jSeason->getLatestRound()); if ($jRound->scored != 1) { $jRound->load($jRound->getPrev()); } //$prev_id = $jRound->getPrev(); //$jRound->load($prev_id); $query = "SELECT `{$field}` FROM #__jtips_history WHERE user_id = " . $jTipsUser->id . " AND round_id = " . $jRound->id . ";"; //jTipsDebug($query); $database->setQuery($query); $res = $database->loadResult(); return is_numeric($res) ? floatval($res) : 0; }
function fillInAdditionalFields() { global $database; $jTipsUser = new jTipsUser($database); $jTipsUser->load($this->user_id); $this->user =& $jTipsUser; $jTeam = new jTeam($database); if ($this->tip_id > 0) { $jTeam->load($this->tip_id); } $this->team =& $jTeam; $jGame = new jGame($database); $jGame->load($this->game_id); $jRound = new jRound($database); $jRound->load($jGame->round_id); $this->round =& $jRound; $this->round_num = $jRound->round; $jSeason = new jSeason($database); $jSeason->load($jRound->season_id); $this->season =& $jSeason; }
* Website: www.jtips.com.au * @author Jeremy Roberts * @copyright Copyright © 2009, jTips * @license Commercial - See website for details * * @since 2.1 - 02/10/2008 * @version 2.1 * @package jTips * * Description: */ global $jTips, $database, $jLang, $mainframe; require_once 'components/com_jtips/classes/jgame.class.php'; require_once 'components/com_jtips/classes/jround.class.php'; $mainframe->addCustomHeadTag("<script type='text/javascript' src='components/com_jtips/modules/Rounds/List.js'></script>"); $focus = new jRound($database); //can add in an ordering field here in the params $direction = jTipsGetParam($_REQUEST, 'filter_order_Dir', 'desc'); if (empty($direction)) { $direction = 'desc'; } $orderby = jTipsGetParam($_REQUEST, 'filter_order', 'round'); if (empty($orderby)) { $orderby = 'round'; } $params = array('order' => array('type' => 'order', 'direction' => "{$direction},", 'by' => $orderby), 'order1' => array('type' => 'order', 'direction' => 'ASC', 'by' => 'name'), 'join' => array('type' => 'join', 'join_table' => '#__jtips_seasons', 'lhs_table' => '#__jtips_rounds', 'lhs_key' => 'season_id', 'rhs_table' => '#__jtips_seasons', 'rhs_key' => 'id')); //has the season select been used? if ($season_id = jTipsGetParam($_REQUEST, 'season_id', false)) { $params['season_id'] = $season_id; } //if ($status = jTipsGetParam($_REQUEST, 'status', '')) {
* Website: www.jtips.com.au * @author Jeremy Roberts * @copyright Copyright © 2009, jTips * @license Commercial - See website for details * * @since 2.1.10 - 20/05/2009 * @version 1.0.0 * @package jTips * * Description: Marks selected rounds as uncomplete * which then allows editing fully a round. * * // BUG 351 - allow uncompleting a round */ jTipsSpoofCheck(); global $mosConfig_absolute_path, $database, $jLang; require_once $mosConfig_absolute_path . '/administrator/components/com_jtips/classes/jround.class.php'; $cid = jTipsGetParam($_REQUEST, 'cid', array()); if ($cid === false or is_array($cid) and count($cid) == 0) { //should never get here mosRedirect('index2.php?option=com_jtips&task=list&module=Rounds', $jLang['_ADMIN_ROUNDS_NONE_TO_PROCESS']); } jTipsLogger::_log('uncompleting rounds'); foreach ($cid as $id) { $jRound = new jRound($database); $jRound->load($id); $jRound->scored = 0; $jRound->save(); } $msg = count($cid) . ' ' . $jLang['_ADMIN_ROUNDS_UNCOMPLETED']; mosRedirect('index2.php?option=com_jtips&module=Rounds&task=list', $msg);
* @since 2.1.9 - 06/04/2009 * @version 1.0.0 * @package jTips * * Description: */ require_once 'components/com_jtips/classes/jgame.class.php'; require_once 'components/com_jtips/classes/jround.class.php'; global $database, $jLang; $id = jTipsGetParam($_REQUEST, 'id', false); if (!$id or !is_numeric($id)) { // BUG 373 - Round fails to copy jTipsLogger::_log('No round id specified to copy!', 'ERROR'); mosRedirect('index2.php?option=com_jtips&task=list&module=Rounds', $jLang['_ADMIN_ROUND_COPY_FAIL']); } $focus = new jRound($database); $focus->load($id); $focus->id = null; $focus->round = jTipsGetParam($_REQUEST, 'round', ''); $focus->scored = 0; if (!$focus->round) { jTipsLogger::_log('No Round number entered when copying round, determine next one.', 'ERROR'); $query = "SELECT MAX(round)+1 AS nextround FROM #__jtips_rounds WHERE season_id = '" . $focus->season_id . "'"; $database->setQuery($query); $focus->round = $database->loadResult(); } $focus->save(); $query = "SELECT id FROM #__jtips_games WHERE round_id = '" . $database->getEscaped($id) . "'"; $database->setQuery($query); $game_ids = $database->loadResultArray(); if (!empty($game_ids)) {
* * Description: */ global $database; require_once 'components/com_jtips/classes/jround.class.php'; require_once 'components/com_jtips/classes/jseason.class.php'; ob_clean(); $season_id = jTipsGetParam($_REQUEST, 'season_id', false); $round_id = jTipsGetParam($_REQUEST, 'round_id', false); if (empty($season_id)) { $js = "\$('round_id').length = 0;\n"; $js .= "\$('round_id').options[0] = new Option('--None--', '-1');\n"; die($js . "\$('round_id').disabled = true;"); } $js = "\$('round_id').length = 0;\n"; $jRound = new jRound($database); $params = array('season_id' => $season_id); $jRounds = $jRound->loadByParams($params); if (!is_array($jRounds)) { if ($jRound->exists()) { $jRounds = array($jRound); } else { $jRounds = array(); } } $i = $selectedIndex = 0; foreach ($jRounds as $jr) { $js .= "\$('round_id').options[{$i}] = new Option('" . $jr->round . "', '" . $jr->id . "');\n"; if ($round_id == $jr->id) { $selectedIndex = $i; }
* * */ jTipsSpoofCheck(); global $mosConfig_absolute_path, $database, $jTips, $jTipsCurrentUser, $jLang, $Itemid; require_once $mosConfig_absolute_path . '/administrator/components/com_jtips/classes/jcomment.class.php'; require_once $mosConfig_absolute_path . '/administrator/components/com_jtips/classes/jgame.class.php'; require_once $mosConfig_absolute_path . '/administrator/components/com_jtips/classes/jround.class.php'; require_once $mosConfig_absolute_path . '/administrator/components/com_jtips/classes/jseason.class.php'; require_once $mosConfig_absolute_path . '/administrator/components/com_jtips/classes/jtip.class.php'; jTipsLogger::_log('about to start saving tips'); //TODO: remove this if (empty($jTipsCurrentUser->id)) { die('No jTips User!'); } $jRound = new jRound($database); $jRound->load(jTipsGetParam($_REQUEST, 'round_id', 0)); // BUG 389 - Can save tips by hacking HTML with Firebug if (!$jRound->id or $jRound->getStatus() !== false) { // trying to post to an invalid round or round in progress jTipsRedirect('index.php?option=com_jtips&Itemid=' . $Itemid, $jLang['_COM_CANNOT_POST_CLOSED']); exit; } $jSeason = new jSeason($database); $jSeason->load($jRound->season_id); $jGame = new jGame($database); $jGameParams = array('round_id' => $jRound->id); $jGames = forceArray($jGame->loadByParams($jGameParams)); $myTips = array(); $isUpdate = null; foreach ($jGames as $jGame) {
} $params = array('order' => array('type' => 'order', 'direction' => $direction, 'by' => $orderby)); //has the season select been used? if ($season_id = jTipsGetParam($_REQUEST, 'season_id', false)) { $params['season_id'] = array('type' => 'join', 'join_table' => '#__jtips_rounds', 'lhs_table' => '#__jtips_comments', 'lhs_key' => 'round_id', 'rhs_table' => '#__jtips_rounds', 'rhs_key' => 'id', 'supplement' => 'AND #__jtips_rounds.season_id = ' . $jComment->_db->Quote($season_id)); } $jComments = forceArray($jComment->loadByParams($params, $limit, $limitstart)); $pageNav = new mosPageNav($jComment->getCount($params), $limitstart, $limit); $data = array(); $i = 0; foreach ($jComments as $comment) { //get the comment poster details $jTipsUser = new jTipsUser($database); $jTipsUser->load($comment->user_id); //Which round is it for $jRound = new jRound($database); $jRound->load($comment->round_id); if (strlen($comment->comment) > 100) { $suffix = '...'; } else { $suffix = ''; } $data[$comment->id] = array(makeListLink(substr(jTipsStripslashes($comment->comment), 0, 100) . $suffix, $i++), $jTipsUser->getUserField('name'), $jTipsUser->getUserField('username'), $comment->getSeasonName(), $jRound->round, TimeDate::toDisplayDateTime($comment->updated)); } $jSeason = new jSeason($database); $jSeasons = forceArray($jSeason->loadByParams()); $options = array(jTipsHTML::makeOption('', $jLang['_ADMIN_USERS_SELECT_SEASON'])); foreach ($jSeasons as $season) { $options[] = jTipsHTML::makeOption($season->id, $season->name); } $filters = array($jLang['_ADMIN_SEASON_SELECT'] => jTipsHTML::selectList($options, 'season_id', "id='season_id' class='inputbox' onChange='this.form.submit();'", 'value', 'text', jTipsGetParam($_REQUEST, 'season_id', '')));
ob_start(); } $render = new jTipsRenderShowTips(); $user_id = jTipsGetParam($_REQUEST, 'uid', ''); $jTipsUser = new jTipsUser($database); $jTipsUser->load($user_id); $render->assign('jTipsUser', $jTipsUser); $round_id = jTipsGetParam($_REQUEST, 'rid', ''); $jSeason = new jSeason($database); $jSeason->load($jTipsUser->season_id); $render->assign('jSeason', $jSeason); $jRound = new jRound($database); if ($round_id == false) { $complete = 0; while ($complete !== 1) { $tempRound = new jRound($database); if ($round_id == false) { $round_id = $jSeason->getCurrentRound(); } $tempRound->load($round_id); $round_id = $tempRound->getPrev(); if (!is_numeric($round_id)) { break; } $jRound = new jRound($database); $jRound->load($round_id); $complete = $jRound->getStatus(); } } $jRound->load($round_id); $render->assign('jRound', $jRound);
function getSummaryDetail(&$jTipsUser, $col) { global $database, $jTips, $jLang, $mosConfig_live_site; $Itemid = jTipsGetParam($_REQUEST, 'Itemid', ''); $jSeason = new jSeason($database); $jSeason->load($jTipsUser->season_id); switch ($col) { case 'season': return $jSeason->name; break; case 'rank': $rank = $jTipsUser->getRank(); if (empty($rank)) { return "N/A"; } else { return $rank . " / " . $jTipsUser->getTotalUsers(); } break; case 'score': return $jTipsUser->getTotalScore('points'); break; case 'average': $jRound = new jRound($database); $jRound->load($jSeason->getLastRound()); $round = $jRound->round ? $jRound->round : 1; return round($jTipsUser->getTotalScore('points') / $round, 1); break; case 'precision': return $jTipsUser->getTotalScore('precision'); break; case 'projected': $jRound = new jRound($database); $jRound->load($jSeason->getLatestRound()); $round = $jRound->round ? $jRound->round : 1; $average = $jTipsUser->getTotalScore('points') / $round; return round($average * $jSeason->rounds, 1); break; case 'doubleup': return "<img src='{$mosConfig_live_site}/administrator/images/" . ($jTipsUser->doubleup > 0 ? "publish_x.png' title='" . $jLang['_COM_DASH_ROUND'] . " " . $jTipsUser->doubleup . "'" : "tick.png' />"); break; case 'paid': global $Itemid; if ($jTips['Payments'] == 'paypal' and !$jTipsUser->paid) { $sid = $jSeason->id; if (!$sid) { $sid = getSeasonID(); } return parsePayPalCode($jTips['PayPal'], 'join', $sid); } else { if ($jTips['Payments'] == 'manual' and !$jTipsUser->paid) { return "<img src='{$mosConfig_live_site}/administrator/images/publish_x.png' />"; } else { if ($jTips['Payments'] and $jTipsUser->paid) { $confirm_unsub = 'return confirm("' . $jLang['_COM_UNSUBLINK_PART1'] . ' ' . $jSeason->name . ' ' . $jLang['_COM_UNSUBLINK_PART2'] . '");'; return "<div style='text-align:center;'>\n\t\t\t\t\t\t\t<img src='{$mosConfig_live_site}/administrator/images/tick.png' alt='Paid' border='0' />\n\t\t\t\t\t\t\t<!-- br />\n\t\t\t\t\t\t\t<a href='" . jTipsRoute("index.php?option=com_jtips&Itemid={$Itemid}&view=Dashboard&action=remove&season={$jSeason->id}") . "' onclick='" . $confirm_unsub . "'>" . $jLang['_COM_UNSUBSCRIBE'] . "</a -->\n\t\t\t\t\t\t</div>"; } else { return "-"; } } } /*if ($jTips['Payments'] == 'paypal') { if (!$jTipsUser->paid) { return parsePayPalCode($jTips['PayPal'], 'join', $jSeason->id); } else { $confirm_unsub = 'return confirm("' . $jLang['_COM_UNSUBLINK_PART1'] . ' ' . $jSeason->name . ' ' . $jLang['_COM_UNSUBLINK_PART2'] . '");'; return "<div style='text-align:center;'> <img src='$mosConfig_live_site/administrator/images/tick.png' alt='Paid' border='0' /> <br /> <a href='" .jTipsRoute("index.php?option=com_jtips&Itemid=$Itemid&view=Dashboard&action=remove&season={$jSeason->id}"). "' onclick='" .$confirm_unsub ."'>" .$jLang['_COM_UNSUBSCRIBE']. "</a> </div>"; } } else if ($jTips['Payments'] == 'manual') { return "<img src='$mosConfig_live_site/administrator/images/" .($jTipsUser->paid == 1 ? "tick.png" : "publish_x.png"). "' />"; } else { return "-"; }*/ break; default: return "-"; break; } }
* @license Commercial - See website for details * * @since 2.1 - 08/10/2008 * @version 2.1 * @package jTips * * Description: Store the games and setup */ jTipsSpoofCheck(); global $database, $jTips; //jTipsDebug($_REQUEST); //die(); require_once 'components/com_jtips/classes/jgame.class.php'; require_once 'components/com_jtips/classes/jround.class.php'; require_once 'components/com_jtips/classes/jseason.class.php'; $jRound = new jRound($database); $jSeason = new jSeason($database); if ($round_id = jTipsGetParam($_REQUEST, 'id', false)) { $jRound->load($round_id); } $season_id = jTipsGetParam($_REQUEST, 'season_id', false); $jSeason->load($season_id); $results = $games_to_keep = array(); //jTipsLogger::_log($_REQUEST); jTipsLogger::_log('about to save round and games'); //first, save the round info $start_time_date = jTipsGetParam($_REQUEST, 'date_start_date', strftime($jTips['DateFormat'])) . " "; $start_minute = jTipsGetParam($_REQUEST, 'date_start_time_minute', ''); $start_time_time = jTipsGetParam($_REQUEST, 'date_start_time_hour', '') . ":" . str_pad($start_minute, 2, '0', STR_PAD_LEFT) . jTipsGetParam($_REQUEST, 'date_start_time_meridiem', ''); if (!preg_match('/\\d/', $start_time_time)) { $start_time_time = strftime($jTips['TimeFormat']);
function getLastRoundWinners(&$jTipsUser, $season_id = false) { global $database; if ($season_id === false) { $season_ids = $jTipsUser->getSeasons(); } else { $season_ids = array($season_id); } $winners = array(); foreach ($season_ids as $season_id) { $jSeason = new jSeason($database); $jSeason->load($season_id); //$round_id = $jSeason->getLastRound(); if ($this->id) { $jRound = new jRound($database); $jRound->load($this->id); $winners[$season_id] = $jRound->getRoundWinners(); } else { continue; } } //jTipsDebug(count($winners)); return $winners; }
//Bug 33.4 - Extended params array to default to season for current user $objParams = array('end_time' => array('type' => 'query', 'query' => "> '{$date}'"), 'left_join' => array('type' => 'left_join', 'join_table' => '#__jtips_users', 'lhs_table' => '#__jtips_seasons', 'lhs_key' => 'id', 'rhs_table' => '#__jtips_users', 'rhs_key' => 'season_id')); if (isset($jTipsUser->user_id) and !empty($jTipsUser->user_id)) { $objParams['#__jtips_users.user_id'] = $jTipsUser->user_id; } $jSeasons = forceArray($jSeason->loadByParams($objParams)); if (count($jSeasons) > 0) { $jSeason =& array_shift($jSeasons); } } $jRound = new jRound($database); $round_id = $jSeason->getCurrentRound(); $jRound->load($round_id); if ($jRound->scored == 0) { $prev_round_id = $jSeason->getLastRound(); $prev_round = new jRound($database); $prev_round->load($prev_round_id); $jRound =& $prev_round; $load_round = $prev_round_id; } else { $load_round = $jRound->id; } $jHistory = new jHistory($database); $jTipsUsers = $jHistory->getLadder($jTips['NumDefault'], $load_round); ?> <table width='100%' cellspacing="0"> <thead> <tr class='sectiontableheader jtableheader'> <th>#</th> <th><?php echo $jLang['_COM_TIP_LADDER_USER'];
//Do we have an existing Season? $id = array_shift($ids); if (is_numeric($id)) { $jComment->load($id); } if (!$jComment->exists()) { mosRedirect('index2.php?option=com_jtips&task=list&module=Comments', $jLang['_ADMIN_COMMENT_LOAD_ERROR']); } $jTipsUser = new jTipsUser($database); $jTipsUser->load($jComment->user_id); $title = $jLang['_ADMIN_DASH_COMMENT_MANAGER'] . ": " . $jLang['_ADMIN_OTHER_EDIT']; $mainframe->addCustomHeadTag("<script type='text/javascript' src='components/com_jtips/modules/Comments/Comments.js'></script>"); //what seasons are there $jSeason = new jSeason($database); $jSeasons = forceArray($jSeason->loadByParams(array())); $jSeasonOptions = array(jTipsHTML::makeOption('', $jLang['_ADMIN_CONF_NONE'])); jTipsSortArrayObjects($jSeasons, 'name', 'ASC'); foreach ($jSeasons as $season) { $jSeasonOptions[] = jTipsHTML::makeOption($season->id, $season->name); } //which season is this in? $jRound = new jRound($database); $jRound->load($jComment->round_id); $jRounds = forceArray($jRound->loadByParams(array('season_id' => $jRound->season_id))); $jRoundOptions = array(jTipsHTML::makeOption('', $jLang['_ADMIN_CONF_NONE'])); jTipsSortArrayObjects($jSeasons, 'name', 'ASC'); foreach ($jRounds as $round) { $jRoundOptions[] = jTipsHTML::makeOption($round->id, $round->round); } $formData = array('basic' => array('legend' => '_ADMIN_COMM_EDIT_COMMENT', 'fields' => array('id' => array('field' => array('type' => 'hidden', 'attributes' => array('type' => 'hidden', 'name' => 'id', 'id' => 'id', 'value' => $jComment->id))), 'orig_round_id' => array('field' => array('type' => 'hidden', 'attributes' => array('type' => 'hidden', 'name' => 'orig_round_id', 'id' => 'orig_round_id', 'value' => $jComment->round_id))), 'user_id' => array('label' => '_COM_DASH_USER', 'field' => array('type' => 'hidden', 'attributes' => array('type' => 'hidden', 'name' => 'user_id', 'id' => 'user_id', 'value' => $jComment->user_id))), 'user' => array('label' => '_COM_DASH_USER', 'field' => array('type' => 'label', 'attributes' => array('type' => 'label', 'value' => $jTipsUser->getUserField('name') . " (" . $jTipsUser->getUserField('username') . ")"))), 'season_id' => array('label' => '_ADMIN_ROUND_SEASON', 'field' => array('type' => 'select', 'attributes' => array('name' => 'season_id', 'id' => 'season_id', 'class' => 'inputbox', 'onChange' => 'getTheRounds(this);'), 'options' => $jSeasonOptions, 'selected' => $jRound->season_id)), 'round_id' => array('label' => '_ADMIN_ROUND_ROUND', 'field' => array('type' => 'select', 'attributes' => array('name' => 'round_id', 'id' => 'round_id', 'class' => 'inputbox'), 'options' => $jRoundOptions, 'selected' => $jComment->round_id)), 'comment' => array('label' => '_ADMIN_COMM_EDIT_COMMENT', 'field' => array('type' => 'text', 'attributes' => array('size' => 50, 'name' => 'comment', 'id' => 'comment', 'class' => 'inputbox', 'type' => 'text', 'value' => jTipsStripslashes(htmlentities($jComment->comment, ENT_QUOTES))))), 'updatedlabel' => array('label' => '_COM_TIPS_LASTUP', 'field' => array('type' => 'label', 'attributes' => array('type' => 'label', 'value' => TimeDate::toDisplayDateTime($jComment->updated))), 'description' => '_ADMIN_COMMENTS_UDPATED_DESCRIPTION')))); jTipsAdminDisplay::EditView($title, $formData, 'comments');