/** * Render a question (including sub questions, response elements, etc) * * @param ModelQuestionModel question being rendered * @return string */ public function renderQuestion(ModelQuestionModel $question) { $builder = new Tag_Builder(); $questionText = $builder->strong($this->view->h($question->qText)); if (!_blank($question->questionNumber)) { $questionNum = $builder->em("({$this->view->h($question->questionNumber)})"); $questionText = "{$questionNum} {$questionText}"; } $questionText .= $this->referenceString($question); $rendered = $builder->div(array('class' => 'questionText'), $questionText); $rendered .= $builder->span(array('class' => 'response'), $this->renderResponse($question)); return $rendered; }
$stat_date = strip_tags($_POST['vindexdate']); } else { unset($stat_date); } if (isset($_POST['statcode']) && is_numeric($_POST['statcode'])) { $stat_code = strip_tags($_POST['statcode']); } else { unset($stat_code); } switch ($myfunc) { default: _blank(); break; case "runfedacalc": _createStatsEntries($stat_code, $stat_date); break; case "delfedacalc": _deleteStatsEntries($stat_code, $stat_date); _blank(); break; case "runssicalc": _createStatsEntries($stat_code, $stat_date); break; case "delssicalc": _deleteStatsEntries($stat_code, $stat_date); _blank(); break; } # just in case we close main div echo '</div>'; LS_page_end();
} /** * Show a team selector + generate button * * @param int $param */ function _blank($param) { echo "<h3>Team Information Generator</h3>"; echo "<p>Select your Team from the drop-down box and click the generate button.</p>"; echo "<p><form action=\"myteam.php?func=generate\" method=\"post\">"; echo '<table><tr><td>' . Select_Team('tid', '', $param, 0) . '</td><td>' . _button("Generate") . '</td></tr></table>'; echo '</form></p><div id=\'maincontent\'>'; } if (isset($_REQUEST['tid']) && intval($_REQUEST['tid']) > 0) { $t_id = strip_tags($_REQUEST['tid']); } else { $t_id = 0; } switch ($func) { default: _blank($t_id); break; case "generate": _blank($t_id); _teampage($t_id); break; } # just in case we close main div echo '</div>'; LS_page_end();
} else { $v_roundscore = 0; } if (isset($_REQUEST['vrest']) && intval($_REQUEST['vrest']) > 0) { $v_rest = strip_tags($_REQUEST['vrest']); } else { $v_rest = 0; } if (isset($_REQUEST['vroundcheck']) && intval($_REQUEST['vroundcheck']) > 0) { $v_roundcheck = strip_tags($_REQUEST['vroundcheck']); } else { $v_roundcheck = 0; } switch ($myfunc) { default: _blank($event_id); break; case 'dartstats': _showdartstat($event_id, $event_group_id); break; case 'legstats': _showlegstat($event_id, 0); break; case 'legstatsgroup': _showlegstat($event_id, 1); break; case 'legstatdetail': _showlegstatDetails($event_id, $p_id, $detail_mode); break; case 'setstats': _showsetstat($event_id);
} else { $t_id = 0; } if (isset($_REQUEST['vverein']) && intval($_REQUEST['vverein']) > 0) { $verein_id = strip_tags($_REQUEST['vverein']); } else { $verein_id = 0; } if (isset($_REQUEST['vlocid']) && intval($_REQUEST['vlocid']) > 0) { $location_id = strip_tags($_REQUEST['vlocid']); } else { $location_id = 0; } switch ($myfunc) { default: _blank($event['id']); break; case "newteam": _editteam($event['id'], 0); break; case "editteam": _editteam($event['id'], $t_id); break; case "team2team": _createteamfromoldteam($event['id'], $t_id); break; case "saveteam": _saveTeam($t_id, $event['id'], $team_name, $verein_id, $location_id); break; case "delete": _delTeam($t_id, $event['id']);