<script type="text/javascript">

function isNumberKey(evt){
         var charCode = (evt.which) ? evt.which : event.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57))
           return false;
         return true;
}

$(document).ready(function(){
	$('input[name*="HOMEPAGE_MAX_NEWS"]').attr("onkeypress","return isNumberKey(event)");
});


</script>

<!-- Content (Right Column) -->
		<div id="content" class="box">

			<h1>Settings</h1>

			<?php if(isset($successMsg) && $successMsg!=''){ ?>
				<p class="msg done"><?php echo $successMsg; ?></p>
			<?php } ?>
			
			<?php if(isset($failedMsg) && $failedMsg!=''){ ?>
				<p class="msg error"><?php echo $failedMsg; ?></p>
			<?php } ?>

			<form action="setting.php" method="post" id="horoscopeFrm" name="horoscopeFrm" >

				<!-- Login -->
				<fieldset>
					<legend>Setting Details</legend>
					
					<?php if($settingDetail && $settingDetail > 0 ){
							foreach ($settingDetail as $setting){ if($EDIT_ACCESS){ ?>
					
								<p class="nomt">
									<label for="inp-01" class="req"><?php echo $setting->setting_label ?> :</label><br />
									<?php if($setting->setting_type=='input'){ ?>
										<input type="text" id="settings['<?php echo $setting->setting_name ?>']" name="settings['<?php echo $setting->setting_name ?>']" value="<?php echo $setting->setting_value ?>"  class="input-text-02" size="50" ><br/>
									<?php }else if($setting->setting_type=='textarea'){ ?>
										<textarea name="settings['<?php echo $setting->setting_name ?>']" id="settings['<?php echo $setting->setting_name ?>']" cols="54" rows="5"  ><?php echo $setting->setting_value; ?></textarea><br/>
									<?php } ?>
								</p>
					
								<?php }else { ?>
								
								<p class="nomt">
									<label for="inp-01" class="req"><?php echo $setting->setting_label ?> :</label><br />
										<?php echo $setting->setting_value; ?><br/>
								</p>
								
					<?php } } } ?>

				</fieldset>
					<?php if($EDIT_ACCESS){ ?>
						<p><input type="submit" value="Update Setting" id="submit" name="submit" class="input-submit" /></p>
					<?php }else { ?>
						<p><a href="index.php"><input type="button" value="Back to Home" id="back" name="back" class="input-submit" /></a></p>
					<?php } ?>	
			</form>

		</div> <!-- /content -->
