Exemple #1
0
        $sGuild = $asGuild[$iGuildCount - 1];
    } else {
        $sGuild = " None";
    }
    //Following IF statement is used to determine if this guild drop-down box is displayed
    if ($iGuildCount > count($asGuild) + 1) {
        $sDisplay = 'none';
    } else {
        $sDisplay = 'inline';
    }
    echo "<!-- SPAN is used to hide/show SELECTs. JavaScript is used to write SPAN tags so that, if JS is disabled, SELECT is always shown -->\n";
    echo "<script type = 'text/javascript'>\n<!--\n";
    echo "document.write (\"<span id = 'spnGuild{$iGuildCount}' style = 'display: {$sDisplay}'>\")\n// -->\n</script>\n";
    echo "Guild:\n";
    echo "<select name = 'selGuild{$iGuildCount}' onchange = 'fnGuilds ({$iGuildCount})'>\n";
    ListNames($link, DB_PREFIX . 'guilds', 'guName', $sGuild);
    echo "</select><br>\n";
    echo "<script type = 'text/javascript'>\n<!--\ndocument.write ('</span>')\n";
    echo "// -->\n</script>\n";
}
?>
</p>

<p>
<table>
<tr><th colspan = "4">Skills</th></tr>
<?php 
//Get character's skills. Fill an array with the skills. This array can then be queried, avoiding repeated DB queries
$result = ba_db_query($link, "SELECT * FROM {$db_prefix}skillstaken WHERE stPlayerID = {$admin_player_id}");
$aiSkillID = array();
while ($row = ba_db_fetch_assoc($result)) {
Exemple #2
0
        echo "<input type = 'text' class = 'text' name = 'txtAncestor' value = 'Enter name here if not in above list' onfocus = \"fnClearValue ('txtAncestor', 'Enter name here if not in above list')\">";
    }
    echo "</td></tr>";
} else {
    echo '<td><input type = "text" class = "text" name = "txtAncestor" value = "' . htmlentities(stripslashes($row['chAncestor'])) . '"></td></tr>';
    echo "<input type = 'hidden' name = 'selAncestor' value = ''>";
}
?>
</tr>
<?php 
if (LOCATIONS_LABEL == '') {
    //Write a hidden field so that INSERT/UPDATE query does not break
    echo "<input type = 'hidden' name = 'selLocation' value = ''>";
} else {
    echo "<tr><td>" . LOCATIONS_LABEL . "</td><td><select name = 'selLocation'>";
    ListNames($link, DB_PREFIX . 'locations', 'lnName', htmlentities(stripslashes($row['chLocation'])));
    echo "</select></td></tr>";
}
?>


</table>

<script type = 'text/javascript'>
function NewfnGuilds (iGuild) {
	//Number of guilds
	iNumGuilds = <?php 
echo NUM_GUILDS;
?>
;
	if (document.forms [0].elements ['NewselGuild' + iGuild].selectedIndex == 0) {
?>
 name="chkANCESTOR_DROPDOWN" /></td></tr>
<tr><td><?php 
HelpLink('help_config_character.php');
?>
 USE_SHORT_OS_NAMES:</td><td><input type="checkbox" <?php 
if ($row['cnUSE_SHORT_OS_NAMES']) {
    echo " checked";
}
?>
 name="chkUSE_SHORT_OS_NAMES" /></td></tr>
<tr><td><?php 
HelpLink('help_config_character.php');
?>
 DEFAULT_FACTION:</td><td><select name = "selDEFAULT_FACTION"><?php 
ListNames($link, DB_PREFIX . 'factions', 'faName', $row['cnDEFAULT_FACTION']);
?>
</select></td></tr>
<tr><td><?php 
HelpLink('help_config_character.php');
?>
 NON_DEFAULT_FACTION_NOTES:</td><td><input type="checkbox" <?php 
if ($row['cnNON_DEFAULT_FACTION_NOTES']) {
    echo " checked";
}
?>
 name="chkNON_DEFAULT_FACTION_NOTES" /></td></tr>
<tr><td><?php 
HelpLink('help_config_character.php');
?>
 ALLOW_EVENT_PACK_BY_POST:</td><td><input type="checkbox" <?php