本文整理汇总了PHP中Zone::fetchAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Zone::fetchAll方法的具体用法?PHP Zone::fetchAll怎么用?PHP Zone::fetchAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zone
的用法示例。
在下文中一共展示了Zone::fetchAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: checkForm
<?php
global $ns;
$text .= "\n<script type=\"application/javascript\">\nfunction checkForm()\n{\n\tvar formValid = true;\n\tif (\$F('database') == '') {\n\t\tformValid = false;\n\t\t\$('database-error').innerHTML = \"" . LAN_ADD_RAID_DATABASESELECTERROR . "\";\n\t}\n\n\treturn formValid;\n}\n</script>\n<style type=\"text/css\">\ntd.error-msg {\n\twidth: 100px;\n}\n</style>\n";
$text .= "<div style=\"text-align: center;\">\n<h2>" . LAN_ADD_RAID_TITLE . "</h2>\n<form name=\"createraid\" method=\"post\" action=\"?action=create\" onsubmit=\"return checkForm();\">\n<h3>" . LAN_ADD_RAID_INFO_HEADING . "</h3>\n<table class=\"raid-form\">\n<tr><td><label for=\"database\">" . LAN_ADD_RAID_DATABASESELECT . "</label></td><td><select name=\"database\" id=\"database\"><option></option>";
foreach (Database::fetchAll() as $database) {
$text .= "<option value=\"" . $database->getId() . "\">" . $database->getName() . "</option>";
}
$text .= "</select></td><td id=\"database-error\" class=\"error-msg\"></td></tr>\n<tr><td>" . LAN_ADD_RAID_RAIDSTART . "</td><td><input type=\"text\" id=\"raidstart-day\" name=\"raidstart-day\" style=\"width: 20px;\" value=\"dd\" onfocus=\"javascript: \$('raidstart-day').value = ''\"/>-\n<select id=\"raidstart-month\" name=\"raidstart-month\">\n<option value=\"1\">" . LAN_ADMIN_COMMON_JAN . "</option>\n<option value=\"2\">" . LAN_ADMIN_COMMON_FEB . "</option>\n<option value=\"3\">" . LAN_ADMIN_COMMON_MAR . "</option>\n<option value=\"4\">" . LAN_ADMIN_COMMON_APR . "</option>\n<option value=\"5\">" . LAN_ADMIN_COMMON_MAY . "</option>\n<option value=\"6\">" . LAN_ADMIN_COMMON_JUN . "</option>\n<option value=\"7\">" . LAN_ADMIN_COMMON_JUL . "</option>\n<option value=\"8\">" . LAN_ADMIN_COMMON_AUG . "</option>\n<option value=\"9\">" . LAN_ADMIN_COMMON_SEP . "</option>\n<option value=\"10\">" . LAN_ADMIN_COMMON_OCT . "</option>\n<option value=\"11\">" . LAN_ADMIN_COMMON_NOV . "</option>\n<option value=\"12\">" . LAN_ADMIN_COMMON_DEC . "</option>\n</select>-\n<input type=\"text\" name=\"raidstart-year\" id=\"raidstart-year\" value=\"yyyy\" onfocus=\"javascript: \$('raidstart-year').value = ''\" style=\"width: 40px;\"/>\n<input type=\"text\" id=\"raidstart-hour\" name=\"raidstart-hour\" style=\"width: 20px;\" value=\"hh\" onfocus=\"javascript: \$('raidstart-hour').value = ''\"/>:<input type=\"text\" id=\"raidstart-minute\" name=\"raidstart-minute\" style=\"width: 20px;\" value=\"dd\" onfocus=\"javascript: \$('raidstart-minute').value = ''\"/>\n</td><td id=\"raidstart-error\"></td></tr>\n<tr><td>" . LAN_ADD_RAID_RAIDEND . "</td><td><input type=\"text\" id=\"raidend-day\" name=\"raidend-day\" style=\"width: 20px;\" value=\"dd\" onfocus=\"javascript: \$('raidend-day').value = ''\"/>-\n<select id=\"raidend-month\" name=\"raidend-month\">\n<option value=\"1\">" . LAN_ADMIN_COMMON_JAN . "</option>\n<option value=\"2\">" . LAN_ADMIN_COMMON_FEB . "</option>\n<option value=\"3\">" . LAN_ADMIN_COMMON_MAR . "</option>\n<option value=\"4\">" . LAN_ADMIN_COMMON_APR . "</option>\n<option value=\"5\">" . LAN_ADMIN_COMMON_MAY . "</option>\n<option value=\"6\">" . LAN_ADMIN_COMMON_JUN . "</option>\n<option value=\"7\">" . LAN_ADMIN_COMMON_JUL . "</option>\n<option value=\"8\">" . LAN_ADMIN_COMMON_AUG . "</option>\n<option value=\"9\">" . LAN_ADMIN_COMMON_SEP . "</option>\n<option value=\"10\">" . LAN_ADMIN_COMMON_OCT . "</option>\n<option value=\"11\">" . LAN_ADMIN_COMMON_NOV . "</option>\n<option value=\"12\">" . LAN_ADMIN_COMMON_DEC . "</option>\n</select>-\n<input type=\"text\" name=\"raidend-year\" id=\"raidend-year\" value=\"yyyy\" onfocus=\"javascript: \$('raidend-year').value = ''\" style=\"width: 40px;\"/>\n<input type=\"text\" id=\"raidend-hour\" name=\"raidend-hour\" style=\"width: 20px;\" value=\"hh\" onfocus=\"javascript: \$('raidend-hour').value = ''\"/>:<input type=\"text\" id=\"raidend-minute\" name=\"raidend-minute\" style=\"width: 20px;\" value=\"dd\" onfocus=\"javascript: \$('raidend-minute').value = ''\"/>\n</td><td id=\"raidend-error\"></td></tr>\n<tr><td>" . LAN_ADD_RAID_ZONE . "</td><td>\n<select name=\"zone\" id=\"zone\">\n<option></option>";
foreach (Zone::fetchAll() as $zone) {
$text .= "<option value=\"" . $zone->getId() . "\">" . $zone->getName() . "</option>";
}
$text .= "\n</select>\n</td><td id=\"raidzone-error\"></td></tr>\n</table>\n<h3>" . LAN_ADD_RAID_PARTICIPANT_HEADING . "</h3>\n<table class=\"raid-form\">\n<tr><td colspan=\"3\" style=\"text-align: center;\"><select id=\"raid-participants\" name=\"raid-participants\" size=\"10\"></select></td></tr>\n<tr><td>" . LAN_ADD_RAID_PARTICIPANT . "</td><td><input type=\"text\" id=\"new-raid-participant\"/></td><td><input type=\"button\" onclick=\"javascript: addParticipant();\" value=\"" . LAN_ADMIN_COMMON_ADD . "\"/></td></tr>\n</table>\n<script type=\"text/javascript\">\nfunction addParticipant() {\n\tif (\$F('new-raid-participant') == \"\") {\n\t\talert('Please enter a name.');\n\t\treturn;\n\t}\n\t\n\tvar participantexists = false;\n\t\$('raid-participants').childElements().each(function (element) {\n\t\tif (element.innerHTML == \$F('new-raid-participant')) {\n\t\t\tparticipantexists = true;\n\t\t\treturn;\n\t\t}\n\t});\n\t\n\tif (participantexists) {\n\t\talert(\$F('new-raid-participant')+\" has already been added.\");\n\t\t\$('new-raid-participant').value = \"\";\n\t\treturn;\n\t}\n\t\n\tvar newParticipant = document.createElement(\"option\");\n\tnewParticipant.innerHTML = \$F('new-raid-participant');\n\t\$('raid-participants').appendChild(newParticipant);\n\t\$('new-raid-participant').value = \"\";\n}\n</script>\n<h3>" . LAN_ADD_RAID_DKP_AWARDS . "</h3>\n<table>\n\t<tr><th>" . LAN_ADD_RAID_DKP_AWARD_DESCRIPTION . "</th><th>" . LAN_ADD_RAID_DKP_AWARD_AMOUNT . "</th><th></th></tr>\n</table>\n<input type=\"submit\" value=\"" . LAN_ADD_RAID_SUBMIT . "\"/>\n</form>\n</div>";
$ns->tableRender("<a href=\"admin_e107dkp.php\">Main Menu</a> -> <a href=\"" . e_SELF . "\">Raid Management</a> -> Add Raid", $text);