public function save() { // Check for request forgeries JSession::checkToken() or die('COM_JOOMLEAGUE_GLOBAL_INVALID_TOKEN'); $pid = JRequest::getInt("pid", 0); $tpid = JRequest::getInt("tpid", 0); //teamplayer $post = JRequest::get('post'); if ($pid > 0) { //set id $post['id'] = $pid; // Convert Date $post['birthday'] = JoomleagueHelper::convertDate($post['birthday'], 0); $post['deathday'] = JoomleagueHelper::convertDate($post['deathday'], 0); $model = $this->getModel('person'); $params = JComponentHelper::getParams('com_joomleague'); // Save methode des models benutzen if ($model->store($post, 'Person')) { $user = JFactory::getUser(); $person = $model->getPerson($pid); $to = $model->getPlayerChangedRecipients(); $nickname = $person->nickname; if (!empty($nickname)) { $nickname = "'" . $nickname . "'"; } $subject = addslashes(sprintf(JText::_("COM_JOOMLEAGUE_EDIT_PERSON_SUBJECT"), $person->firstname, $nickname, $person->lastname)); $message = addslashes(sprintf(JText::_("COM_JOOMLEAGUE_EDIT_PERSON_MESSAGE"), $user->name, $person->firstname, $nickname, $person->lastname)); $message .= $this->_getShowPlayerLink(); // send mail if ($params->get('cfg_edit_person_info_update_notify') == "1") { $model->sendMailTo($to, $subject, $message); } // save player information if (JoomleagueControllerPerson::_saveTeamplayer($tpid, $post)) { $msg = JText::_('COM_JOOMLEAGUE_EDIT_PERSON_SAVED'); } else { $msg .= ' ' . JText::_('COM_JOOMLEAGUE_EDIT_PERSON_SAVE_ERROR') . $model->getError(); } } else { $msg .= ' ' . JText::_('COM_JOOMLEAGUE_EDIT_PERSON_SAVE_ERROR') . $model->getError(); } } $this->setRedirect($this->_getShowPlayerLink(), $msg); }
function savememberdata() { $result = true; //$post = JRequest::get('post'); //echo '<br /><pre>~'.print_r($post,true).'~</pre><br />'; $predictionGameID = JRequest::getVar('prediction_id', '', 'post', 'int'); $joomlaUserID = JRequest::getVar('user_id', '', 'post', 'int'); $predictionMemberID = JRequest::getVar('member_id', '', 'post', 'int'); $show_profile = JRequest::getVar('show_profile', '', 'post', 'int'); $fav_teams = JRequest::getVar('fav_team', '', 'post', 'array'); $champ_teams = JRequest::getVar('champ_tipp', '', 'post', 'array'); $slogan = JRequest::getVar('slogan', '', 'post', 'string', JREQUEST_ALLOWRAW); $reminder = JRequest::getVar('reminder', '', 'post', 'int'); $receipt = JRequest::getVar('receipt', '', 'post', 'int'); $admintipp = JRequest::getVar('admintipp', '', 'post', 'int'); $picture = JRequest::getVar('picture', '', 'post', 'string', JREQUEST_ALLOWRAW); $aliasName = JRequest::getVar('aliasName', '', 'post', 'string', JREQUEST_ALLOWRAW); $group_id = JRequest::getVar('group_id', '', 'post', 'int'); $pRegisterDate = JRequest::getVar('registerDate', '', 'post', 'date', JREQUEST_ALLOWRAW); $pRegisterTime = JRequest::getVar('registerTime', '', 'post', 'time', JREQUEST_ALLOWRAW); //echo '<br /><pre>~'.print_r($pRegisterDate,true).'~</pre><br />'; //echo '<br /><pre>~'.print_r($pRegisterTime,true).'~</pre><br />'; $dFavTeams = ''; foreach ($fav_teams as $key => $value) { $dFavTeams .= $key . ',' . $value . ';'; } $dFavTeams = trim($dFavTeams, ';'); $dChampTeams = ''; foreach ($champ_teams as $key => $value) { $dChampTeams .= $key . ',' . $value . ';'; } $dChampTeams = trim($dChampTeams, ';'); $registerDate = JoomleagueHelper::convertDate($pRegisterDate, 0) . ' ' . $pRegisterTime . ':00'; //echo '<br /><pre>~'.print_r($registerDate,true).'~</pre><br />'; $query = "\tUPDATE\t#__joomleague_prediction_member\n\t\t\t\t\t\t\tSET\tregisterDate='{$registerDate}',\n\t\t\t\t\t\t\t\tshow_profile={$show_profile},\n\t\t\t\t\t\t\t\tgroup_id={$group_id},\n\t\t\t\t\t\t\t\tfav_team='{$dFavTeams}',\n\t\t\t\t\t\t\t\tchamp_tipp='{$dChampTeams}',\n\t\t\t\t\t\t\t\tslogan='{$slogan}',\n\t\t\t\t\t\t\t\taliasName='{$aliasName}',\n\t\t\t\t\t\t\t\treminder={$reminder},\n\t\t\t\t\t\t\t\treceipt={$receipt},\n\t\t\t\t\t\t\t\tadmintipp={$admintipp},\n\t\t\t\t\t\t\t\tpicture='{$picture}'\n\t\t\t\t\t\tWHERE\tid={$predictionMemberID}"; //echo $query . '<br />'; $this->_db->setQuery($query); if (!$this->_db->query()) { $this->setError($this->_db->getErrorMsg()); $result = false; //echo '<br />ERROR~' . $query . '~<br />'; } return $result; }
function saveshort() { JRequest::checkToken() or jexit('COM_JOOMLEAGUE_GLOBAL_INVALID_TOKEN'); $msg = ''; $post = JRequest::get('post'); $cid = JRequest::getVar('cid', array(), 'post', 'array'); JArrayHelper::toInteger($cid); $project_id = JRequest::getVar('p', '', 'post', 'int'); $round_id = JRequest::getVar('r', '', 'post', 'int'); $model = $this->getModel('results'); $user = JFactory::getUser(); $allowed = $model->isAllowed(); $isMatchAdmin = $model->isMatchAdmin($cid, $user->id); if (!$allowed && !$isMatchAdmin) { $link = JoomleagueHelperRoute::getResultsRoute($project_id, $round_id); $msg = JText::_('COM_JOOMLEAGUE_SAVE_RESULTS_NO_PRIVILEGES'); $this->setRedirect($link, $msg); } for ($x = 0; $x < count($cid); $x++) { if (!isset($post['published' . $cid[$x]])) { $post['published' . $cid[$x]] = '0'; } $post['match_date' . $cid[$x]] = JoomleagueHelper::convertDate($post['match_date' . $cid[$x]], 0); //clear ranking cache $cache = JFactory::getCache('joomleague.project' . $project_id); $cache->clean(); if ($model->save_array($cid[$x], $post, true, $project_id)) { $msg = JText::_('COM_JOOMLEAGUE_SAVE_RESULTS_SUCCESS'); } else { $msg = JText::_('COM_JOOMLEAGUE_SAVE_RESULTS_ERROR'); } } $link = JoomleagueHelperRoute::getResultsRoute($project_id, $round_id); echo '#' . $msg . '#'; $this->setRedirect($link, $msg); }
function display($tpl = null) { $option = JRequest::getCmd('option'); $mainframe = JFactory::getApplication(); $uri = JFactory::getURI(); $params =& JComponentHelper::getParams($option); $filter_state = $mainframe->getUserStateFromRequest($option . 'mc_filter_state', 'filter_state', '', 'word'); $filter_order = $mainframe->getUserStateFromRequest($option . 'mc_filter_order', 'filter_order', 'mc.match_number', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'mc_filter_order_Dir', 'filter_order_Dir', '', 'word'); $search = $mainframe->getUserStateFromRequest($option . 'mc_search', 'search', '', 'string'); $search_mode = $mainframe->getUserStateFromRequest($option . 'mc_search_mode', 'search_mode', '', 'string'); $division = $mainframe->getUserStateFromRequest($option . 'mc_division', 'division', '', 'string'); $project_id = $mainframe->getUserState($option . 'project'); $search = JString::strtolower($search); $matches =& $this->get('Data'); $total =& $this->get('Total'); $pagination =& $this->get('Pagination'); $model = $this->getModel(); // state filter $lists['state'] = JHTML::_('grid.state', $filter_state); // table ordering $lists['order_Dir'] = $filter_order_Dir; $lists['order'] = $filter_order; // search filter $lists['search'] = $search; $lists['search_mode'] = $search_mode; $projectws =& $this->get('Data', 'projectws'); $roundws =& $this->get('Data', 'roundws'); //build the html options for teams foreach ($matches as $row) { if ($row->divhomeid == '') { $row->divhomeid = 0; } if ($row->divawayid == '') { $row->divawayid = 0; } $teams[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM')); $divhomeid = 0; //apply the filter only if both teams are from the same division //teams are not from the same division in tournament mode with divisions if ($row->divhomeid == $row->divawayid) { $divhomeid = $row->divhomeid; } else { $row->divhomeid = 0; $row->divawayid = 0; } if ($projectteams =& $model->getProjectTeamsOptions($divhomeid)) { $teams = array_merge($teams, $projectteams); } $lists['teams_' + $divhomeid] = $teams; unset($teams); } //build the html selectlist for rounds $model = $this->getModel('projectws'); $ress = JoomleagueHelper::getRoundsOptions($model->_id, 'ASC', true); foreach ($ress as $res) { $datum = JoomleagueHelper::convertDate($res->round_date_first, 1) . ' - ' . JoomleagueHelper::convertDate($res->round_date_last, 1); $project_roundslist[] = JHTML::_('select.option', $res->id, sprintf("%s (%s)", $res->name, $datum)); } $lists['project_rounds'] = JHTML::_('select.genericList', $project_roundslist, 'rid[]', 'class="inputbox" ' . 'onChange="document.getElementById(\'short_act\').value=\'rounds\';' . 'document.roundForm.submit();" ', 'value', 'text', $roundws->id); $lists['project_rounds2'] = JHTML::_('select.genericList', $project_roundslist, 'rid', 'class="inputbox" ', 'value', 'text', $roundws->id); // diddipoeler rounds for change in match $project_change_roundslist = array(); if ($ress =& JoomleagueHelper::getRoundsOptions($model->_id, 'ASC', true)) { $project_change_roundslist = array_merge($project_change_roundslist, $ress); } $lists['project_change_rounds'] = $project_change_roundslist; unset($project_change_roundslist); //build the html selectlist for matches $overall_config = $model->getTemplateConfig('overall'); if (isset($overall_config['use_jl_substitution']) && $overall_config['use_jl_substitution'] || isset($overall_config['use_jl_events']) && $overall_config['use_jl_events']) { $match_list = array(); $mdd[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_MATCH')); foreach ($matches as $row) { $mdd[] = JHTML::_('select.option', 'index3.php?option=com_joomleague&controller=match&task=editEvents&cid[0]=' . $row->id, $row->team1 . '-' . $row->team2); } $RosterEventMessage = isset($overall_config['use_jl_substitution']) && $overall_config['use_jl_substitution'] ? JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_LINEUP') : ''; if (isset($overall_config['use_jl_events']) && $overall_config['use_jl_events']) { if (isset($overall_config['use_jl_events']) && $overall_config['use_jl_substitution']) { $RosterEventMessage .= ' / '; } $RosterEventMessage .= JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_EVENTS'); } $RosterEventMessage .= $RosterEventMessage != '' ? ':' : ''; $lists['RosterEventMessage'] = $RosterEventMessage; $lists['round_matches'] = JHTML::_('select.genericList', $mdd, 'mdd', 'id="mdd" class="inputbox" onchange="jl_load_new_match_events(this,\'eventscontainer\')"', 'value', 'text', '0'); } //build the html options for extratime $match_result_type[] = JHTMLSelect::option('0', JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_RT')); $match_result_type[] = JHTMLSelect::option('1', JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_OT')); $match_result_type[] = JHTMLSelect::option('2', JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_SO')); $lists['match_result_type'] = $match_result_type; unset($match_result_type); //build the html options for massadd create type $createTypes = array(0 => JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD'), 1 => JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_1'), 2 => JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_2')); $ctOptions = array(); foreach ($createTypes as $key => $value) { $ctOptions[] = JHTMLSelect::option($key, $value); } $lists['createTypes'] = JHTMLSelect::genericlist($ctOptions, 'ct[]', 'class="inputbox" onchange="javascript:displayTypeView();"', 'value', 'text', 1, 'ct'); unset($createTypes); // build the html radio for adding into one round / all rounds $createYesNo = array(0 => JText::_('JNO'), 1 => JText::_('JYES')); $ynOptions = array(); foreach ($createYesNo as $key => $value) { $ynOptions[] = JHTMLSelect::option($key, $value); } $lists['addToRound'] = JHTMLSelect::radiolist($ynOptions, 'addToRound', 'class="inputbox"', 'value', 'text', 0); // build the html radio for auto publish new matches $lists['autoPublish'] = JHTMLSelect::radiolist($ynOptions, 'autoPublish', 'class="inputbox"', 'value', 'text', 0); //build the html options for divisions $divisions[] = JHTMLSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_DIVISION')); $mdlDivisions = JModel::getInstance("divisions", "JoomLeagueModel"); if ($res =& $mdlDivisions->getDivisions($project_id)) { $divisions = array_merge($divisions, $res); } $lists['divisions'] = $divisions; unset($divisions); $this->assignRef('division', $division); $this->assignRef('user', JFactory::getUser()); $this->assignRef('lists', $lists); $this->assignRef('matches', $matches); $this->assignRef('ress', $ress); $this->assignRef('projectws', $projectws); $this->assignRef('roundws', $roundws); $this->assignRef('pagination', $pagination); $this->assignRef('request_url', $uri->toString()); $this->assignRef('prefill', $params->get('use_prefilled_match_roster', 0)); $this->addToolbar(); parent::display($tpl); }
function copyfrom() { $mainframe = JFactory::getApplication(); $option = JRequest::getCmd('option'); $msg = ''; $post = JRequest::get('post'); $model = $this->getModel('match'); $add_match_count = JRequest::getInt('add_match_count'); $round_id = JRequest::getInt('rid'); $post['project_id'] = $mainframe->getUserState($option . 'project', 0); $post['round_id'] = $mainframe->getUserState($option . 'round_id', 0); $post['match_date'] = JoomleagueHelper::convertDate($post['match_date'], 0) . ' '; if ($post['addtype'] == 1) { if ($add_match_count > 0) { if (!empty($post['autoPublish'])) { $post['published'] = 1; } $matchNumber = JRequest::getInt('firstMatchNumber', 1); $roundFound = false; if ($projectRounds = $model->getProjectRoundCodes($post['project_id'])) { foreach ($projectRounds as $projectRound) { if ($projectRound->id == $post['round_id']) { $roundFound = true; } if ($roundFound) { $post['round_id'] = $projectRound->id; $post['roundcode'] = $projectRound->roundcode; for ($x = 1; $x <= $add_match_count; $x++) { if (!empty($post['firstMatchNumber'])) { $post['match_number'] = $matchNumber; } $post['match_date'] .= empty($post['startTime']) ? '00:00:00' : $post['startTime'] . ':00'; if ($model->store($post)) { $msg = JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_CTRL_ADD_MATCH'); $matchNumber++; } else { $msg = JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_CTRL_ERROR_ADD_MATCH') . $model->getError(); break; } } if (empty($post['addToRound'])) { break; } } } } } } if ($post['addtype'] == 2) { if ($matches = $model->getRoundMatches($round_id)) { foreach ($matches as $match) { //aufpassen,was uebernommen werden soll und welche daten durch die aus der post ueberschrieben werden muessen //manche daten muessen auf null gesetzt werden $dmatch['match_date'] = JoomleagueHelper::convertDate($post['date'], 0) . ' ' . $post['time']; if ($post['mirror'] == '1') { $dmatch['projectteam1_id'] = $match->projectteam2_id; $dmatch['projectteam2_id'] = $match->projectteam1_id; } else { $dmatch['projectteam1_id'] = $match->projectteam1_id; $dmatch['projectteam2_id'] = $match->projectteam2_id; } $dmatch['project_id'] = $post['project_id']; $dmatch['round_id'] = $post['round_id']; if ($post['start_match_number'] != '') { $dmatch['match_number'] = $post['start_match_number']; $post['start_match_number']++; } #echo '<pre>'; print_r($dmatch); echo '</pre>'; if ($model->store($dmatch)) { $msg = JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_CTRL_COPY_MATCH'); } else { $msg = JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_CTRL_ERROR_COPY_MATCH') . $model->getError(); } } } else { $msg = JText::_('COM_JOOMLEAGUE_ADMIN_MATCH_CTRL_ERROR_COPY_MATCH2') . $model->getError(); } } //echo $msg; $link = 'index.php?option=com_joomleague&view=matches&task=match.display'; $this->setRedirect($link, $msg); }
<td class="center"> <?php if ($row->picture == '') { $imageTitle = JText::_('COM_JOOMLEAGUE_ADMIN_PERSONS_NO_IMAGE'); echo JHTML::_('image', 'administrator/components/com_joomleague/assets/images/delete.png', $imageTitle, 'title= "' . $imageTitle . '"'); } elseif ($row->picture == JoomleagueHelper::getDefaultPlaceholder("player")) { $imageTitle = JText::_('COM_JOOMLEAGUE_ADMIN_PERSONS_DEFAULT_IMAGE'); echo JHTML::_('image', 'administrator/components/com_joomleague/assets/images/information.png', $imageTitle, 'title= "' . $imageTitle . '"'); } elseif ($row->picture == !'') { $playerName = JoomleagueHelper::formatName(null, $row->firstname, $row->nickname, $row->lastname, 0); echo JoomleagueHelper::getPictureThumb($row->picture, $playerName, 0, 21, 4); } ?> </td> <td class="nowrap" class="center"><?php echo JoomleagueHelper::convertDate($row->birthday); ?> </td> <td class="nowrap" class="center"><?php echo Countries::getCountryFlag($row->country); ?> </td> <td align="center"><?php echo $row->id; ?> </td> </tr> <?php $k = 1 - $k; } }
} else { $playerName = JoomleagueHelper::formatName(null, $row->firstname, $row->nickname, $row->lastname, 0); echo JoomleagueHelper::getPictureThumb($row->picture, $playerName, 0, 21, 4); } ?> </td> <td class="nowrap" class="center"> <?php $append = ''; if ($row->birthday == '0000-00-00') { $append = ' style="background-color:#FFCCCC;"'; } if ($is_checked) { echo $row->birthday; } else { echo $this->calendar(JoomleagueHelper::convertDate($row->birthday), 'birthday' . $row->id, 'birthday' . $row->id, '%d-%m-%Y', 'size="10" ' . $append . ' cb="cb' . $i . '"', 'onupdatebirthday', $i); } ?> </td> <td class="nowrap" class="center"> <?php $append = ''; if (empty($row->country)) { $append = ' background-color:#FFCCCC;'; } echo JHTMLSelect::genericlist($this->lists['nation'], 'country' . $row->id, $inputappend . ' class="inputbox" style="width:140px; ' . $append . '" onchange="document.getElementById(\'cb' . $i . '\').checked=true"', 'value', 'text', $row->country); ?> </td> <td class="nowrap" class="center"> <?php $append = '';
echo JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_COPY2'); ?> </td> <td><?php echo $this->lists['project_rounds2']; ?> </td> </tr> <tr> <td width="100" align="right" class="key"><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_DEFAULT_DATE'); ?> </td> <td> <?php echo JHTML::calendar(JoomleagueHelper::convertDate($this->roundws->round_date_first), 'date', 'date', '%d-%m-%Y', 'size="10" '); ?> <input type='text' name='time' value='<?php echo $this->projectws->start_time; ?> ' size='4' maxlength='5' class='inputbox' /> </td> </tr> <tr> <td width="100" align="right" class="key"><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_FIRST_MATCHNR'); ?> </td> <td><input type="text" name="start_match_number" size="4" value="" /></td> </tr>
* @copyright Copyright (C) 2006-2015 joomleague.at. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @link http://www.joomleague.at */ defined('_JEXEC') or die; ?> <form name="adminForm" id="adminForm" method="post"> <?php $dateformat = "%d-%m-%Y"; ?> <div class="clearfix"> <div class="btn-wrapper input-append pull-left"> <?php echo JHtml::calendar(JoomleagueHelper::convertDate($this->startdate, 1), 'startdate', 'startdate', $dateformat, array('class' => 'input-small')); echo ' - ' . JHtml::calendar(JoomleagueHelper::convertDate($this->enddate, 1), 'enddate', 'enddate', $dateformat, array('class' => 'input-small')); ?> <input type="submit" class="button btn" name="reload View" value="<?php echo JText::_('COM_JOOMLEAGUE_GLOBAL_FILTER'); ?> " /> </div> <div class="btn-wrapper input-append pull-right"> <?php if ($this->club) { $picture = $this->club->logo_middle; echo JoomleagueHelper::getPictureThumb($picture, $this->club->name, 50, 50, 2); } ?> </div> </div>
<td class="center"> <input onchange="document.getElementById('cb<?php echo $i; ?> ').checked=true" type="text" name="match_number<?php echo $row->id; ?> " value="<?php echo $row->match_number; ?> " size="6" tabindex="1" class="inputbox" /> </td> <td class="center" nowrap="nowrap"> <?php echo JHTML::calendar(JoomleagueHelper::convertDate($date), 'match_date' . $row->id, 'match_date' . $row->id, '%d-%m-%Y', 'size="9" tabindex="2" ondblclick="copyValue(\'match_date\')" onchange="document.getElementById(\'cb' . $i . '\').checked=true"'); ?> </td> <td class="left" nowrap="nowrap"> <input ondblclick="copyValue('match_time')" onchange="document.getElementById('cb<?php echo $i; ?> ').checked=true" type="text" name="match_time<?php echo $row->id; ?> " value="<?php echo $time; ?>
/** * Method to update checked persons * * @access public * @return boolean True on success * */ function storeshort($cid, $post) { $result = true; for ($x = 0; $x < count($cid); $x++) { $tblPerson = $this->getTable("person"); $tblPerson->id = $cid[$x]; $tblPerson->firstname = $post['firstname' . $cid[$x]]; $tblPerson->lastname = $post['lastname' . $cid[$x]]; $tblPerson->nickname = $post['nickname' . $cid[$x]]; $tblPerson->birthday = JoomleagueHelper::convertDate($post['birthday' . $cid[$x]], 0); $tblPerson->deathday = $post['deathday' . $cid[$x]]; $tblPerson->country = $post['country' . $cid[$x]]; $tblPerson->position_id = $post['position' . $cid[$x]]; if (!$tblPerson->store()) { $this->setError($this->_db->getErrorMsg()); $result = false; } } return $result; }
<?php */ ?> <?php ?> </td> <td nowrap='nowrap'> <?php echo $row->predictionname; ?> </td> <td style='text-align: center; '> <?php if (isset($row->last_tipp)) { list($date, $time) = explode(" ", $row->last_tipp); $time = strftime("%H:%M", strtotime($time)); echo JoomleagueHelper::convertDate($date); echo ' / '; echo $time; } else { echo JText::_('COM_JOOMLEAGUE_ADMIN_PMEMBERS_NEVER_TIPPED'); } ?> </td> <td style='text-align: center; '> <?php if ($row->reminder) { $imgfile = 'ok.png'; $imgtitle = JText::_('Active'); } else { $imgfile = 'delete.png'; $imgtitle = JText::_('COM_JOOMLEAGUE_ADMIN_PMEMBERS_INACTIVE');
<?php defined('_JEXEC') or die('Restricted access'); ?> <form name="adminForm" id="adminForm" method="post"> <?php $dateformat = "%d-%m-%Y"; ?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td><?php echo JHTML::calendar(JoomleagueHelper::convertDate($this->startdate, 1), 'startdate', 'startdate', $dateformat); echo ' - ' . JHTML::calendar(JoomleagueHelper::convertDate($this->enddate, 1), 'enddate', 'enddate', $dateformat); ?> <input type="submit" class="button" name="reload View" value="<?php echo JText::_('COM_JOOMLEAGUE_GLOBAL_FILTER'); ?> " /></td> <td><?php if ($this->club) { $picture = $this->club->logo_middle; echo JoomleagueHelper::getPictureThumb($picture, $this->club->name, 50, 50, 2); } ?> </td> </tr> </table> <?php echo JHTML::_('form.token') . "\n"; ?> </form><br />
public function saveshort() { // Check for request forgeries JSession::checkToken() or die('COM_JOOMLEAGUE_GLOBAL_INVALID_TOKEN'); $option = JRequest::getCmd('option'); $mainframe = JFactory::getApplication(); $post = JRequest::get('post'); $cid = JRequest::getVar('cid', array(), 'post', 'array'); JArrayHelper::toInteger($cid); $model = $this->getModel('round'); for ($x = 0; $x < count($cid); $x++) { $post['round_date_first' . $cid[$x]] = JoomleagueHelper::convertDate($post['round_date_first' . $cid[$x]], 0); $post['round_date_last' . $cid[$x]] = JoomleagueHelper::convertDate($post['round_date_last' . $cid[$x]], 0); if (isset($post['roundcode' . $cid[$x]])) { if ($post['roundcode' . $cid[$x]] == '0') { $max = $model->getMaxRound($mainframe->getUserState($option . 'project', 0)); $post['roundcode' . $cid[$x]] = $max + 1; } } } if ($model->storeshort($cid, $post)) { $msg = JText::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_CTRL_ROUND_SAVED'); } else { $msg = JText::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_CTRL_ERROR_SAVE') . $model->getError(); } $link = 'index.php?option=com_joomleague&view=rounds&task=round.display'; $this->setRedirect($link, $msg); }
<td colspan='2'><?php echo $this->config['show_full_name'] ? $this->predictionMember->name : $this->predictionMember->username; ?> </td> </tr> <tr> <?php echo JoomleagueModelPredictionUsers::echoLabelTD('COM_JOOMLEAGUE_PRED_USERS_EDIT_LABEL_REGDATE', 'COM_JOOMLEAGUE_PRED_USERS_EDIT_LABEL_HELP_REGDATE'); ?> <td colspan='2'><?php $regDate = substr($this->predictionMember->pmRegisterDate, 0, 10); $regTime = substr($this->predictionMember->pmRegisterDate, 11, 8); if ($this->allowedAdmin) { echo JText::sprintf('%1$s - %2$s', JHTML::calendar(JoomleagueHelper::convertDate($regDate), 'registerDate', 'date', '%d-%m-%Y', 'size="10"'), '<input class="inputbox" type="text" name="registerTime" size="4" maxlength="5" value="' . $regTime . '" />'); } else { echo '<input type="hidden" name="registerDate" value="' . JoomleagueHelper::convertDate($regDate) . '" />'; echo '<input type="hidden" name="registerTime" value="' . $regTime . '" />'; echo $this->predictionMember->pmRegisterDate != '0000-00-00 00:00:00' ? JHTML::date($this->predictionMember->pmRegisterDate, JText::_('COM_JOOMLEAGUE_PRED_USERS_EDIT_LABEL_REGDATE_FORMAT')) : JText::_('COM_JOOMLEAGUE_PRED_USERS_UNKNOWN'); } ?> </td> </tr> <tr> <?php echo JoomleagueModelPredictionUsers::echoLabelTD('COM_JOOMLEAGUE_PRED_USERS_EDIT_LABEL_APPROVED', 'COM_JOOMLEAGUE_PRED_USERS_EDIT_LABEL_HELP_APPROVED'); ?> <td colspan='2'><?php echo $this->lists['approvedForGame']; ?> </td> </tr>
?> ').checked=true" /> </td> <td class="center"> <?php $date1 = JoomleagueHelper::convertDate($row->round_date_first, 1); $append = ''; if ($date1 == '00-00-0000' || $date1 == '') { $append = ' style="background-color:#FFCCCC;" '; } echo JHTML::calendar($date1, 'round_date_first' . $row->id, 'round_date_first' . $row->id, '%d-%m-%Y', 'size="10" ' . $append . 'tabindex="3" ' . 'class="center" ' . 'onchange="document.getElementById(\'cb' . $i . '\').checked=true"'); ?> </td> <td class="center"> - </td> <td class="center"><?php $date2 = JoomleagueHelper::convertDate($row->round_date_last, 1); $append = ''; if ($date2 == '00-00-0000' || $date2 == '') { $append = ' style="background-color:#FFCCCC;"'; } echo JHTML::calendar($date2, 'round_date_last' . $row->id, 'round_date_last' . $row->id, '%d-%m-%Y', 'size="10" ' . $append . 'tabindex="3" ' . 'class="center" ' . 'onchange="document.getElementById(\'cb' . $i . '\').checked=true"'); ?> </td> <td class="center" class="nowrap"><?php $link2Title = JText::_('COM_JOOMLEAGUE_ADMIN_ROUNDS_EDIT_MATCHES_LINK'); $link2Params = "title='{$link2Title}'"; echo JHTML::link($link2, $link2Title, $link2Params); ?> </td> <td class="center" class="nowrap"><?php if ($row->countUnPublished == 0 && $row->countMatches > 0) {
<td align='center' valign='top'><input type='text' style='font-size: 9px;' class='inputbox' size='3' name='match_number<?php echo $thismatch->id; ?> ' value="<?php echo $thismatch->match_number; ?> " onchange="$('cb<?php echo $i; ?> ').checked=true; " /> </td> <!-- Edit date --> <td nowrap='nowrap' align='center' valign='top'> <?php echo JHTML::calendar(JoomleagueHelper::convertDate($datum, 1), 'match_date' . $thismatch->id, 'match_date' . $thismatch->id, '%d-%m-%Y', 'size="9" style="font-size:9px;" onchange="$(\'cb' . $i . '\').checked=true; "'); ?> </td> <!-- Edit start time --> <td align='center' nowrap='nowrap' valign='top'> <input type='text' style='font-size: 9px;' size='3' name='match_time<?php echo $thismatch->id; ?> ' value='<?php echo substr($uhrzeit, 0, 5); ?> ' class='inputbox' onchange="$('cb<?php echo $i; ?> ').checked=true; " />