• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Footer in content

Xadrian

Active Member
Joined
Feb 24, 2008
Messages
905
Reaction score
26
Location
Poland, Stalowa Wola
Why in Create Account script is inserting footer on wrong place?

It destroy layout's subtopic (extend <fieldset> etc.)

wtfdo.png


create.php:
HTML:
<div class='errors'> <?php echo error(validation_errors()); ?> </div>
<?php include("public/js/keyboard.php");
global $config;
?>
<script>
	function createAccount() {
		$('.loader').show();
		var form = $('#createAccount').serialize();
		$.ajax({
			url: '<?php echo WEBSITE; ?>/index.php/account/create/1',
			  type: 'post',
			  data: form,
			  success: function(data) {
			  	$('.errors').html(data);
			  	$('.loader').hide();
			  }
		});
	}
</script>
<link rel="stylesheet" type="text/css" href="<?php echo WEBSITE; ?>/public/css/keyboard.css">
<div class='message'>
	<div style="text-align: center; padding-top: 15px;">
		<h2>Creating Account - welcome on Nivera!</h2>
		<p>If you decided to create account there, you have to fill up this form:</p>
	</div>
	<div class='content'> <?php echo form_open('account/create', array('onSubmit'=>'createAccount(); return false;', 'id'=>'createAccount')); ?>
		<fieldset style="width: 85%">
			<legend >Account Info</legend>
				<table>
					<tr>
						<td>Account Name</td>
						<td><input type="text" value="<?php echo set_value('name'); ?>" id="name" class="keyboardInput" name="name"/></td>
					</tr>
					<tr>
						<td>Nickname</td>
						<td><input type='text' name='nickname' id="nickname" value='<?php echo set_value('nickname'); ?>' /></td>
					</tr>
					<tr>
						<td>E-mail</td>
						<td><input  type="text" value="<?php echo set_value('email'); ?>" id="email" name="email"/>	</td>
					</tr>
					<tr>
						<td>Password</td>
						<td><input type="password" class="keyboardInput" id="password" name="password"/></td>
					</tr>
					<tr>
						<td>Repeat password</td>
						<td><input type="password" class="keyboardInput" id="repeat" name="repeat"/></td>
					</tr>
				</table>
		</fieldset>
		<fieldset>
			<legend>Character Info</legend>
				<table>
					<tr>
						<td>Character name:</td>
						<td><input  type="text" id="character_name" value="<?php echo set_value('character_name'); ?>" name="character_name"/></td>
					</li>
					<tr>
						<td>Sex:</td>
						<td>
							<input name="sex" type="radio" id="sex" value="1" checked="checked" />
							male &nbsp;
							<input type="radio" id="sex" name="sex" value="0" />
							female 
						</td>
					</tr>
					<tr>
						<td>Choose vocation:</td>
						<td>
							<select name="vocation" class="keyboardInput" id="vocation">
								<option value="1">Sorcerer</option>
								<option value="2">Druid</option>
								<option value="3">Paladin</option>
								<option value="4">Knight</option>
							</select>
						</td>
					</tr>
					<tr>
						<td>Choose city:</td>
						<td>
							<select name="city" id="city">
								<?php 
									foreach($config['cities'] as $city => $name) {
										echo '<option value="'.$city.'">'.$name.'</option>'; 
									}
								?>
							</select>
						</td>
					</tr>
					<tr>
						<td>World:</td>
						<td>
							<?php 
							if(sizeof($config['worlds']) > 1) { ?>
							<select name="world" id="world">
							<?php
							foreach($config['worlds'] as $world => $name)
							echo '<option value="'.$world.'">'.$name.'</option>'; 
							?>
							</select>
							<?php }else{ ?>
							<input type="hidden" name="world" value="0" />
							<?php echo $config['worlds'][0]; ?>
							<?php } ?>						
						</td>
					</tr>
				<table>
		</fieldset>
		<br/>
		<label>&nbsp;</label>
		<input class='sub' type="submit" value="Register"/>
		<?php echo loader(); ?>
		</form>
		
	</div>
	<div class='bar'>If you create an account you accept to our <a href='#' onClick='$("#rules").toggle(500);'>Rules</a>.</div>
</div>

Thanks in advice.
 
Back
Top