本文整理汇总了PHP中addHidden函数的典型用法代码示例。如果您正苦于以下问题:PHP addHidden函数的具体用法?PHP addHidden怎么用?PHP addHidden使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了addHidden函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addr_display_result
/**
* List search results
* @param array $res Array containing results of search
* @param bool $includesource If true, adds backend column to address listing
*/
function addr_display_result($res, $includesource = true)
{
global $PHP_SELF, $oTemplate, $oErrorHandler;
//FIXME: no HTML output from core
echo addForm($PHP_SELF, 'post', 'addressbook', '', '', array(), TRUE) . addHidden('html_addr_search_done', 'true');
addr_insert_hidden();
$oTemplate->assign('compose_addr_pop', false);
$oTemplate->assign('include_abook_name', $includesource);
$oTemplate->assign('addresses', formatAddressList($res));
$oTemplate->display('addrbook_search_list.tpl');
echo '</form>';
}
示例2: addSelect
/**
* Function to create a selectlist from an array.
* Usage:
* name: html name attribute
* values: array ( key => value ) -> <option value="key">value</option>
* default: the key that will be selected
* usekeys: use the keys of the array as option value or not
*/
function addSelect($name, $values, $default = null, $usekeys = false)
{
// only one element
if (count($values) == 1) {
$k = key($values);
$v = array_pop($values);
return addHidden($name, $usekeys ? $k : $v) . htmlspecialchars($v) . "\n";
}
$ret = '<select name="' . htmlspecialchars($name) . "\">\n";
foreach ($values as $k => $v) {
if (!$usekeys) {
$k = $v;
}
$ret .= '<option value="' . htmlspecialchars($k) . '"' . ($default == $k ? ' selected="selected"' : '') . '>' . htmlspecialchars($v) . "</option>\n";
}
$ret .= "</select>\n";
return $ret;
}
示例3: writeContent
function writeContent()
{
global $sId, $aStates, $isPost, $sName, $sEmail, $nPhone, $sAddress, $sAddress2, $sCity, $sState, $nZip, $bAdmin, $bActive;
if (!empty($sId)) {
addHidden('use_id', $sId);
}
addField(makeInput('Name', 'use_name', $sName), true);
addField(makeEmail('Email Address', 'use_email', $sEmail), true);
addField(makePassword('Password', 'use_password'));
addField(makeInput('Phone', 'use_phone', $nPhone, 'size="13"'));
addField(makeInput('Address', 'use_address', $sAddress, 'size="30"'));
addField(makeInput('Address 2', 'use_address2', $sAddress2, 'size="30"'));
addField(makeInput('City', 'use_city', $sCity));
addField(makeSelect('State', 'use_state', $aStates, $sState));
addField(makeInput('Zip', 'use_zip', $nZip, 'size="10"'));
addField(makeCheckbox('Admin', 'use_admin', $bAdmin));
addField(makeCheckbox('Active', 'use_active', $bActive));
addField(makeSubmit('Save', 'save') . ' ' . makeCancel('Cancel', 'cancel'));
writeDataForm($_SERVER['PHP_SELF'], 'user');
}
示例4: rejudgeForm
/**
* Returns a form to rejudge all judgings based on a (table,id)
* pair. For example, to rejudge all for language 'java', call
* as rejudgeForm('language', 'java').
*/
function rejudgeForm($table, $id)
{
$ret = addForm('rejudge.php') . addHidden('table', $table) . addHidden('id', $id);
$button = 'REJUDGE this submission';
$question = "Rejudge submission s{$id}?";
$disabled = false;
$allbutton = false;
// special case submission
if ($table == 'submission') {
// disable the form button if there are no valid judgings anyway
// (nothing to rejudge) or if the result is already correct
global $DB;
$validresult = $DB->q('MAYBEVALUE SELECT result FROM judging WHERE
submitid = %i AND valid = 1', $id);
if (IS_ADMIN) {
if (!$validresult) {
$question = "Restart judging of PENDING submission s{$id}, " . 'are you sure?';
$button = 'RESTART judging';
} elseif ($validresult == 'correct') {
$question = "Rejudge CORRECT submission s{$id}, " . 'are you sure?';
}
} else {
if (!$validresult || $validresult == 'correct') {
$disabled = true;
}
}
} else {
$button = "REJUDGE ALL for {$table} {$id}";
$question = "Rejudge all submissions for this {$table}?";
if (IS_ADMIN) {
$allbutton = true;
}
}
$ret .= '<input type="submit" value="' . htmlspecialchars($button) . '" ' . ($disabled ? 'disabled="disabled"' : 'onclick="return confirm(\'' . htmlspecialchars($question) . '\');"') . " />\n" . ($allbutton ? addCheckBox('include_all') . '<label for="include_all">include pending/correct submissions</label>' : '') . addCheckBox('full_rejudge') . '<label for="full_rejudge">create rejudging with reason: </label>' . addInput('reason', '', 0, 255) . addEndForm();
return $ret;
}
示例5: error
break;
case 'NOCONSTRAINT':
break;
default:
error("{$t}.{$key} is referenced in {$table} with unknown action '{$action}'.");
}
}
}
}
if (isset($_POST['confirm'])) {
// LIMIT 1 is a security measure to prevent our bugs from
// wiping a table by accident.
$DB->q("DELETE FROM {$t} WHERE %SS LIMIT 1", $k);
auditlog($t, implode(', ', $k), 'deleted');
echo "<p>" . ucfirst($t) . " <strong>" . specialchars(implode(", ", $k)) . "</strong> has been deleted.</p>\n\n";
if (!empty($referrer)) {
echo "<p><a href=\"" . $referrer . "\">back to overview</a></p>";
} else {
// one table falls outside the predictable filenames
$tablemulti = $t == 'team_category' ? 'team_categories' : $t . 's';
echo "<p><a href=\"" . $tablemulti . ".php\">back to {$tablemulti}</a></p>";
}
} else {
echo addForm($pagename) . addHidden('table', $t);
foreach ($k as $key => $val) {
echo addHidden($key, $val);
}
echo msgbox("Really delete?", "You're about to delete {$t} <strong>" . specialchars(join(", ", array_values($k))) . (empty($desc) ? '' : ' "' . specialchars($desc) . '"') . "</strong>.<br />\n" . (count($warnings) > 0 ? "<br /><strong>Warning, this will:</strong><br />" . implode('<br />', $warnings) : '') . "<br /><br />\n" . "Are you sure?<br /><br />\n\n" . (empty($referrer) ? '' : addHidden('referrer', $referrer)) . addSubmit(" Never mind... ", 'cancel') . addSubmit(" Yes I'm sure! ", 'confirm'));
echo addEndForm();
}
require LIBWWWDIR . '/footer.php';
示例6: addr_display_result
/**
* List search results
* @param array $res Array containing results of search
* @param bool $includesource UNDOCUMENTED [Default=true]
*/
function addr_display_result($res, $includesource = true)
{
global $color, $javascript_on, $PHP_SELF, $squirrelmail_language;
if (sizeof($res) <= 0) {
return;
}
echo addForm($PHP_SELF, 'POST', 'addrbook') . addHidden('html_addr_search_done', 'true');
addr_insert_hidden();
$line = 0;
if ($javascript_on) {
print '<script language="JavaScript" type="text/javascript">' . "\n<!-- \n" . "function CheckAll(ch) {\n" . " for (var i = 0; i < document.addrbook.elements.length; i++) {\n" . " if( document.addrbook.elements[i].type == 'checkbox' &&\n" . " document.addrbook.elements[i].name.substr(0,16) == 'send_to_search['+ch ) {\n" . " document.addrbook.elements[i].checked = !(document.addrbook.elements[i].checked);\n" . " }\n" . " }\n" . "}\n" . "//-->\n" . "</script>\n";
$chk_all = '<a href="#" onClick="CheckAll(\'T\');">' . _("All") . '</a> <font color="' . $color[9] . '">' . _("To") . '</font>' . ' ' . '<a href="#" onClick="CheckAll(\'C\');">' . _("All") . '</a> <font color="' . $color[9] . '">' . _("Cc") . '</font>' . ' ' . '<a href="#" onClick="CheckAll(\'B\');">' . _("All") . '</a>';
}
echo html_tag('table', '', 'center', '', 'border="0" width="98%"') . html_tag('tr', '', '', $color[9]) . html_tag('th', ' ' . $chk_all, 'left') . html_tag('th', ' ' . _("Name"), 'left') . html_tag('th', ' ' . _("E-mail"), 'left') . html_tag('th', ' ' . _("Info"), 'left');
if ($includesource) {
echo html_tag('th', ' ' . _("Source"), 'left', '', 'width="10%"');
}
echo "</tr>\n";
foreach ($res as $row) {
$email = AddressBook::full_address($row);
if ($line % 2) {
$tr_bgcolor = $color[12];
} else {
$tr_bgcolor = $color[4];
}
if ($squirrelmail_language == 'ja_JP') {
echo html_tag('tr', '', '', $tr_bgcolor, 'nowrap') . html_tag('td', '<input type="checkbox" name="send_to_search[T' . $line . ']" value = "' . htmlspecialchars($email) . '" /> ' . _("To") . ' ' . '<input type="checkbox" name="send_to_search[C' . $line . ']" value = "' . htmlspecialchars($email) . '" /> ' . _("Cc") . ' ' . '<input type="checkbox" name="send_to_search[B' . $line . ']" value = "' . htmlspecialchars($email) . '" /> ' . _("Bcc") . ' ', 'center', '', 'width="5%" nowrap') . html_tag('td', ' ' . htmlspecialchars($row['lastname']) . ' ' . htmlspecialchars($row['firstname']) . ' ', 'left', '', 'nowrap') . html_tag('td', ' ' . htmlspecialchars($row['email']) . ' ', 'left', '', 'nowrap') . html_tag('td', ' ' . htmlspecialchars($row['label']) . ' ', 'left', '', 'nowrap');
} else {
echo html_tag('tr', '', '', $tr_bgcolor, 'nowrap') . html_tag('td', addCheckBox('send_to_search[T' . $line . ']', FALSE, $email) . ' ' . _("To") . ' ' . addCheckBox('send_to_search[C' . $line . ']', FALSE, $email) . ' ' . _("Cc") . ' ' . addCheckBox('send_to_search[B' . $line . ']', FALSE, $email) . ' ' . _("Bcc") . ' ', 'center', '', 'width="5%" nowrap') . html_tag('td', ' ' . htmlspecialchars($row['name']) . ' ', 'left', '', 'nowrap') . html_tag('td', ' ' . htmlspecialchars($row['email']) . ' ', 'left', '', 'nowrap') . html_tag('td', ' ' . htmlspecialchars($row['label']) . ' ', 'left', '', 'nowrap');
}
if ($includesource) {
echo html_tag('td', ' ' . $row['source'] . ' ', 'left', '', 'nowrap');
}
echo "</tr>\n";
$line++;
}
if ($includesource) {
$td_colspan = '5';
} else {
$td_colspan = '4';
}
echo html_tag('tr', html_tag('td', '<input type="submit" name="addr_search_done" value="' . _("Use Addresses") . '" />', 'center', '', 'colspan="' . $td_colspan . '"')) . '</table>' . addHidden('html_addr_search_done', '1') . '</form>';
}
示例7: array
}
echo "</table>\n";
echo "<h2>Details</h2>\n";
$restrictions = array('rejudgingid' => $id);
if ($viewtypes[$view] == 'unverified') {
$restrictions['verified'] = 0;
}
if ($viewtypes[$view] == 'unjudged') {
$restrictions['judged'] = 0;
}
if ($viewtypes[$view] == 'diff') {
$restrictions['rejudgingdiff'] = 1;
}
if (isset($_REQUEST['old_verdict']) && $_REQUEST['old_verdict'] != 'all') {
$restrictions['old_result'] = $_REQUEST['old_verdict'];
}
if (isset($_REQUEST['new_verdict']) && $_REQUEST['new_verdict'] != 'all') {
$restrictions['result'] = $_REQUEST['new_verdict'];
}
echo addForm($pagename, 'get') . "<p>Show submissions:\n" . addHidden('id', $id);
for ($i = 0; $i < count($viewtypes); ++$i) {
echo addSubmit($viewtypes[$i], 'view[' . $i . ']', null, $view != $i);
}
$verdicts = array_keys($verdicts);
array_unshift($verdicts, 'all');
echo "<br/>old verdict: " . addSelect('old_verdict', $verdicts, isset($_REQUEST['old_verdict']) ? $_REQUEST['old_verdict'] : 'all');
echo ", new verdict: " . addSelect('new_verdict', $verdicts, isset($_REQUEST['new_verdict']) ? $_REQUEST['new_verdict'] : 'all');
echo addSubmit('filter');
echo "</p>\n" . addEndForm();
putSubmissions($cdatas, $restrictions);
require LIBWWWDIR . '/footer.php';
示例8: displayHtmlHeader
@(include $theme[$theme_default]['PATH']);
}
displayHtmlHeader("{$org_name} - " . _("Login"), $header, FALSE);
echo "<body text=\"{$color['8']}\" bgcolor=\"{$color['4']}\" link=\"{$color['7']}\" vlink=\"{$color['7']}\" alink=\"{$color['7']}\" onLoad=\"squirrelmail_loginpage_onload()\">" . "\n" . '<form action="redirect.php" method="post" onSubmit="document.forms[0].js_autodetect_results.value=\'' . SMPREF_JS_ON . '\';">' . "\n";
$username_form_name = 'login_username';
$password_form_name = 'secretkey';
do_hook('login_top');
$loginname_value = sqGetGlobalVar('loginname', $loginname) ? htmlspecialchars($loginname) : '';
/* If they don't have a logo, don't bother.. */
if (isset($org_logo) && $org_logo) {
/* Display width and height like good little people */
$width_and_height = '';
if (isset($org_logo_width) && is_numeric($org_logo_width) && $org_logo_width > 0) {
$width_and_height = " width=\"{$org_logo_width}\"";
}
if (isset($org_logo_height) && is_numeric($org_logo_height) && $org_logo_height > 0) {
$width_and_height .= " height=\"{$org_logo_height}\"";
}
}
if (sqgetGlobalVar('mailto', $mailto)) {
$rcptaddress = addHidden('mailto', $mailto);
} else {
$rcptaddress = '';
}
echo html_tag('table', html_tag('tr', html_tag('td', '<center>' . (isset($org_logo) && $org_logo ? '<img src="' . $org_logo . '" alt="' . sprintf(_("%s Logo"), $org_name) . '"' . $width_and_height . ' /><br />' . "\n" : '') . (isset($hide_sm_attributions) && $hide_sm_attributions ? '' : '<small>' . sprintf(_("SquirrelMail version %s"), $version) . '<br />' . "\n" . ' ' . _("By the SquirrelMail Development Team") . '<br /></small>' . "\n") . html_tag('table', html_tag('tr', html_tag('td', '<b>' . sprintf(_("%s Login"), $org_name) . "</b>\n", 'center', $color[0])) . html_tag('tr', html_tag('td', "\n" . html_tag('table', html_tag('tr', html_tag('td', _("Name:"), 'right', '', 'width="30%"') . html_tag('td', addInput($username_form_name, $loginname_value), 'left', '', 'width="*"')) . "\n" . html_tag('tr', html_tag('td', _("Password:"), 'right', '', 'width="30%"') . html_tag('td', addPwField($password_form_name) . addHidden('js_autodetect_results', SMPREF_JS_OFF) . $rcptaddress . addHidden('just_logged_in', '1'), 'left', '', 'width="*"')), 'center', $color[4], 'border="0" width="100%"'), 'left', $color[4])) . html_tag('tr', html_tag('td', '<center>' . addSubmit(_("Login")) . '</center>', 'left')), '', $color[4], 'border="0" width="350"') . '</center>', 'center')), '', $color[4], 'border="0" cellspacing="0" cellpadding="0" width="100%"');
do_hook('login_form');
echo '</form>' . "\n";
do_hook('login_bottom');
?>
</body></html>
示例9: addInput
echo addInput('data[0][country]', @$row['country'], 4, 3, 'pattern="[A-Z]{3}" title="three uppercase letters (ISO-3166-1 alpha-3)"');
?>
<a target="_blank"
href="http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3#Current_codes"><img
src="../images/b_help.png" class="smallpicto" alt="?" /></a></td></tr>
<tr><td><label for="data_0__comments_">Comments:</label></td>
<td><?php
echo addTextArea('data[0][comments]', @$row['comments']);
?>
</td></tr>
</table>
<?php
echo addHidden('cmd', $cmd) . addHidden('table', 'team_affiliation') . addHidden('referrer', @$_GET['referrer']) . addSubmit('Save') . addSubmit('Cancel', 'cancel', null, true, 'formnovalidate') . addEndForm();
require LIBWWWDIR . '/footer.php';
exit;
}
$data = $DB->q('MAYBETUPLE SELECT * FROM team_affiliation WHERE affilid = %s', $id);
if (!$data) {
error("Missing or invalid affiliation id");
}
$affillogo = "../images/affiliations/" . urlencode($data['affilid']) . ".png";
$countryflag = "../images/countries/" . urlencode($data['country']) . ".png";
echo "<h1>Affiliation: " . specialchars($data['name']) . "</h1>\n\n";
echo "<table>\n";
echo '<tr><td>ID:</td><td>' . specialchars($data['affilid']) . "</td></tr>\n";
echo '<tr><td>Shortname:</td><td>' . specialchars($data['shortname']) . "</td></tr>\n";
echo '<tr><td>Name:</td><td>' . specialchars($data['name']) . "</td></tr>\n";
echo '<tr><td>Logo:</td><td>';
示例10: count
$nunchecked++;
if ($results === NULL) {
$nomatch[] = "string '<code>@EXPECTED_RESULTS@:</code>' not found in " . "<a href=\"submission.php?id=" . $sid . "\">s{$sid}</a>, leaving submission unchecked";
} else {
$earlier[] = "<a href=\"submission.php?id=" . $sid . "\">s{$sid}</a> already verified earlier";
}
}
}
echo "{$nchecked} submissions checked: " . count($unexpected) . " unexpected results, " . count($multiple) . ($verify_multiple ? " automatically verified (multiple outcomes), " : " to check manually, ") . count($verified) . " automatically verified<br/>\n";
echo "{$nunchecked} submissions not checked: " . count($earlier) . " verified earlier, " . count($nomatch) . " without magic string<br/>\n";
if (count($unexpected)) {
flushresults("Unexpected results", $unexpected);
}
if (count($multiple)) {
if ($verify_multiple) {
flushresults("Automatically verified (multiple outcomes)", $multiple, TRUE);
} else {
flushresults("Check manually", $multiple);
echo "<div class=\"details\" id=\"detail{$section}\">\n" . addForm($pagename) . "<p>Verify all multiple outcome submissions: " . addHidden('verify_multiple', '1') . addSubmit('verify') . addEndForm() . "</p>\n</div>\n\n";
}
}
if (count($verified)) {
flushresults("Automatically verified", $verified, TRUE);
}
if (count($earlier)) {
flushresults("Verified earlier", $earlier, TRUE);
}
if (count($nomatch)) {
flushresults("Without magic string", $nomatch, TRUE);
}
require LIBWWWDIR . '/footer.php';
示例11: dj_setcookie
$viewall = $_COOKIE['domjudge_balloonviewall'];
}
// Did someone press the view button?
if (isset($_REQUEST['viewall'])) {
$viewall = $_REQUEST['viewall'];
}
dj_setcookie('domjudge_balloonviewall', $viewall);
$refresh = array('after' => 15, 'url' => 'balloons.php');
require LIBWWWDIR . '/header.php';
echo "<h1>Balloon Status</h1>\n\n";
foreach ($cdatas as $cdata) {
if (isset($cdata['freezetime']) && difftime($cdata['freezetime'], now()) <= 0) {
echo "<h4>Scoreboard of c{$cdata['cid']} ({$cdata['shortname']}) is now frozen.</h4>\n\n";
}
}
echo addForm($pagename, 'get') . "<p>\n" . addHidden('viewall', $viewall ? 0 : 1) . addSubmit($viewall ? 'view unsent only' : 'view all') . "</p>\n" . addEndForm();
$contestids = $cids;
if ($cid !== null) {
$contestids = array($cid);
}
// Problem metadata: colours and names.
if (empty($cids)) {
$probs_data = array();
} else {
$probs_data = $DB->q('KEYTABLE SELECT probid AS ARRAYKEY,name,color,cid
FROM problem
INNER JOIN contestproblem USING (probid)
WHERE cid IN (%Ai)', $contestids);
}
$freezecond = array();
if (!dbconfig_get('show_balloons_postfreeze', 0)) {
示例12: confirm_update
/**
* Confirms event update
* @return void
* @access private
*/
function confirm_update()
{
global $calself, $year, $month, $day, $hour, $minute, $calendardata, $color, $event_year, $event_month, $event_day, $event_hour, $event_minute, $event_length, $event_priority, $event_title, $event_text;
$tmparray = $calendardata["{$month}{$day}{$year}"]["{$hour}{$minute}"];
$tab = ' ';
echo html_tag('table', html_tag('tr', html_tag('th', _("Do you really want to change this event from:") . "<br />\n", '', $color[4], 'colspan="2"') . "\n") . html_tag('tr', html_tag('td', _("Date:"), 'right', $color[4]) . "\n" . html_tag('td', date_intl(_("m/d/Y"), mktime(0, 0, 0, $month, $day, $year)), 'left', $color[4]) . "\n") . html_tag('tr', html_tag('td', _("Time:"), 'right', $color[4]) . "\n" . html_tag('td', date_intl(_("H:i"), mktime($hour, $minute, 0, $month, $day, $year)), 'left', $color[4]) . "\n") . html_tag('tr', html_tag('td', _("Priority:"), 'right', $color[4]) . "\n" . html_tag('td', $tmparray['priority'], 'left', $color[4]) . "\n") . html_tag('tr', html_tag('td', _("Title:"), 'right', $color[4]) . "\n" . html_tag('td', sm_encode_html_special_chars($tmparray['title']), 'left', $color[4]) . "\n") . html_tag('tr', html_tag('td', _("Message:"), 'right', $color[4]) . "\n" . html_tag('td', nl2br(sm_encode_html_special_chars($tmparray['message'])), 'left', $color[4]) . "\n") . html_tag('tr', html_tag('th', _("to:") . "<br />\n", '', $color[4], 'colspan="2"') . "\n") . html_tag('tr', html_tag('td', _("Date:"), 'right', $color[4]) . "\n" . html_tag('td', date_intl(_("m/d/Y"), mktime(0, 0, 0, $event_month, $event_day, $event_year)), 'left', $color[4]) . "\n") . html_tag('tr', html_tag('td', _("Time:"), 'right', $color[4]) . "\n" . html_tag('td', date_intl(_("H:i"), mktime($event_hour, $event_minute, 0, $event_month, $event_day, $event_year)), 'left', $color[4]) . "\n") . html_tag('tr', html_tag('td', _("Priority:"), 'right', $color[4]) . "\n" . html_tag('td', $event_priority, 'left', $color[4]) . "\n") . html_tag('tr', html_tag('td', _("Title:"), 'right', $color[4]) . "\n" . html_tag('td', sm_encode_html_special_chars($event_title), 'left', $color[4]) . "\n") . html_tag('tr', html_tag('td', _("Message:"), 'right', $color[4]) . "\n" . html_tag('td', nl2br(sm_encode_html_special_chars($event_text)), 'left', $color[4]) . "\n") . html_tag('tr', html_tag('td', "<form name=\"updateevent\" method=\"post\" action=\"{$calself}\">\n" . $tab . addHidden('year', $year) . $tab . addHidden('month', $month) . $tab . addHidden('day', $day) . $tab . addHidden('hour', $hour) . $tab . addHidden('minute', $minute) . $tab . addHidden('event_year', $event_year) . $tab . addHidden('event_month', $event_month) . $tab . addHidden('event_day', $event_day) . $tab . addHidden('event_hour', $event_hour) . $tab . addHidden('event_minute', $event_minute) . $tab . addHidden('event_priority', $event_priority) . $tab . addHidden('event_length', $event_length) . $tab . addHidden('event_title', $event_title) . $tab . addHidden('event_text', $event_text) . $tab . addHidden('updated', 'yes') . $tab . addHidden('confirmed', 'yes') . $tab . addSubmit(_("Yes")) . "</form>\n", 'right', $color[4]) . "\n" . html_tag('td', "<form name=\"nodelevent\" method=\"post\" action=\"day.php\">\n" . $tab . addHidden('year', $year) . $tab . addHidden('month', $month) . $tab . addHidden('day', $day) . $tab . addSubmit(_("No")) . "</form>\n", 'left', $color[4]) . "\n"), '', $color[0], 'border="0" cellpadding="2" cellspacing="1"');
}
示例13: addForm
$restrictions['judged'] = 0;
}
if ($viewtypes[$view] == 'diff') {
$restrictions['rejudgingdiff'] = 1;
}
if (isset($_REQUEST['old_verdict']) && $_REQUEST['old_verdict'] != 'all') {
$restrictions['old_result'] = $_REQUEST['old_verdict'];
}
if (isset($_REQUEST['new_verdict']) && $_REQUEST['new_verdict'] != 'all') {
$restrictions['result'] = $_REQUEST['new_verdict'];
}
echo "<p>Show submissions:</p>\n" . addForm($pagename, 'get') . addHidden('id', $id);
for ($i = 0; $i < count($viewtypes); ++$i) {
echo addSubmit($viewtypes[$i], 'view[' . $i . ']', null, $view != $i);
}
if (isset($_REQUEST['old_verdict'])) {
echo addHidden('old_verdict', $_REQUEST['old_verdict']);
}
if (isset($_REQUEST['new_verdict'])) {
echo addHidden('new_verdict', $_REQUEST['new_verdict']);
}
echo addEndForm() . "<br />\n";
echo addForm($pagename, 'get') . addHidden('id', $id) . addHidden("view[{$view}]", $viewtypes[$view]);
$verdicts = array_keys($verdicts);
array_unshift($verdicts, 'all');
echo "old verdict: " . addSelect('old_verdict', $verdicts, isset($_REQUEST['old_verdict']) ? $_REQUEST['old_verdict'] : 'all');
echo ", new verdict: " . addSelect('new_verdict', $verdicts, isset($_REQUEST['new_verdict']) ? $_REQUEST['new_verdict'] : 'all');
echo addSubmit('filter') . addEndForm();
echo addForm($pagename, 'get') . addHidden('id', $id) . addHidden("view[{$view}]", $viewtypes[$view]) . addSubmit('clear') . addEndForm() . "<br /><br />\n";
putSubmissions($cdatas, $restrictions);
require LIBWWWDIR . '/footer.php';
示例14: data
?>
<h1>Import and Export</h1>
<h2>Import / Export via file up/download</h2>
<ul>
<li><a href="impexp_contestyaml.php">Contest data (contest.yaml)</a></li>
<li><a href="problems.php">Problem archive</a></li>
<li>Tab separated, export:
<a href="impexp_tsv.php?act=ex&fmt=groups">groups.tsv</a>,
<a href="impexp_tsv.php?act=ex&fmt=teams">teams.tsv</a>,
<a href="impexp_tsv.php?act=ex&fmt=scoreboard">scoreboard.tsv</a>,
<a href="impexp_tsv.php?act=ex&fmt=results">results.tsv</a>
<li>
<?php
echo addForm('impexp_tsv.php', 'post', null, 'multipart/form-data') . 'Tab separated, import: ' . '<label for="fmt">type:</label> ' . addSelect('fmt', array('groups', 'teams', 'accounts')) . ', <label for="tsv">file:</label>' . addFileField('tsv') . addHidden('act', 'im') . addSubmit('import') . addEndForm();
?>
</li>
</ul>
<h2>Import teams / Upload standings from / to icpc.baylor.edu</h2>
<p>
Create a "Web Services Token" with appropriate rights in the "Export" section
for your contest at <a
href="https://icpc.baylor.edu/login">https://icpc.baylor.edu/login</a>. You can
find the Contest ID (e.g. <code>Southwestern-Europe-2014</code>) in the URL.
</p>
<?php
echo addForm("impexp_baylor.php");
示例15: addHidden
?>
<label for="data_0__visible_0">no</label></td></tr>
</table>
<?php
echo addHidden('cmd', $cmd) . addHidden('table', 'team_category') . addHidden('referrer', @$_GET['referrer'] . ($cmd == 'edit' ? strstr(@$_GET['referrer'], '?') === FALSE ? '?edited=1' : '&edited=1' : '')) . addSubmit('Save') . addSubmit('Cancel', 'cancel', null, true, 'formnovalidate' . (isset($_GET['referrer']) ? ' formaction="' . specialchars($_GET['referrer']) . '"' : '')) . addEndForm();
require LIBWWWDIR . '/footer.php';
exit;
}
$data = $DB->q('TUPLE SELECT * FROM team_category WHERE categoryid = %i', $id);
if (!$data) {
error("Missing or invalid category id");
}
if (isset($_GET['edited'])) {
echo addForm('refresh_cache.php') . msgbox("Warning: Refresh scoreboard cache", "If the category sort order was changed, it may be necessary to " . "recalculate any cached scoreboards.<br /><br />" . addSubmit('recalculate caches now', 'refresh')) . addHidden('cid', $id) . addEndForm();
}
echo "<h1>Category: " . specialchars($data['name']) . "</h1>\n\n";
echo "<table>\n";
echo '<tr><td>ID:</td><td>' . specialchars($data['categoryid']) . "</td></tr>\n";
echo '<tr><td>Name:</td><td>' . specialchars($data['name']) . "</td></tr>\n";
echo '<tr><td>Sortorder:</td><td>' . specialchars($data['sortorder']) . "</td></tr>\n";
if (isset($data['color'])) {
echo '<tr><td>Colour: </td><td style="background: ' . specialchars($data['color']) . ';">' . specialchars($data['color']) . "</td></tr>\n";
}
echo '<tr><td>Visible:</td><td>' . printyn($data['visible']) . "</td></tr>\n";
echo "</table>\n\n";
if (IS_ADMIN) {
echo "<p>" . editLink('team_category', $data['categoryid']) . "\n" . delLink('team_category', 'categoryid', $data['categoryid'], $data['name']) . "</p>\n\n";
}
echo "<h2>Teams in " . specialchars($data['name']) . "</h2>\n\n";