Esempio n. 1
0
		color: red;
	}
	
	form div.error input, 
	form div.error select, 
	form div.error textarea {
		border-color: red;
	}
</style>
</head>
	<body>
	<div id="main">
	<form action="" method="post">
	
		<div class="<?php 
echo getFieldErrorClass($validationErrors, 'temperature');
?>
">
				<label for="temperature">Enter the temperature:</label>
				<input type="text" id="temperature" name="temperature" value="<?php 
echo $temperature;
?>
"/>
				<?php 
echo formErrors(getValue($validationErrors, 'temperature', []));
?>
			</div>
		<br>
		<br>		
		<div>
		<label>Please choose the conversion type:</label>
Esempio n. 2
0
 $form_newletter_setting = array();
 $form_newletter_setting['double_optin'] = 0;
 $form_value = array();
 if ($POST_DO && ($cnt_form["fields"][$key]['required'] || isset($_POST[$POST_name]))) {
     if (isset($_POST[$POST_name]) && is_array($_POST[$POST_name])) {
         $POST_val[$POST_name] = array_map('combined_POST_cleaning', $_POST[$POST_name]);
         $POST_val[$POST_name] = array_diff($POST_val[$POST_name], array(''));
         if (!count($POST_val[$POST_name])) {
             $POST_val[$POST_name] = false;
         }
     } else {
         $POST_val[$POST_name] = isset($_POST[$POST_name]) ? remove_unsecure_rptags(clean_slweg($_POST[$POST_name])) : false;
     }
     if ($cnt_form["fields"][$key]['required'] && ($POST_val[$POST_name] === false || $POST_val[$POST_name] == '')) {
         $POST_ERR[$key] = $cnt_form["fields"][$key]['error'];
         $cnt_form["fields"][$key]['class'] = getFieldErrorClass($value['class'], $cnt_form["error_class"]);
     } else {
         $cnt_form["fields"][$key]['value'] = str_replace(' checked', '', $cnt_form["fields"][$key]['value']);
     }
     if (isset($POST_val[$POST_name])) {
         $form_newletter_setting['selection'] = $POST_val[$POST_name];
     } else {
         $form_newletter_setting['selection'] = false;
     }
 }
 // prepare default settings for newsletter field
 $form_value_default = convertStringToArray($cnt_form["fields"][$key]['value'], "\n", 'UNIQUE', false);
 foreach ($form_value_default as $form_value_nl) {
     $form_value_nl = explode('=', $form_value_nl, 2);
     $form_value_nl[0] = trim($form_value_nl[0]);
     $form_value_nl[1] = empty($form_value_nl[1]) ? '' : trim($form_value_nl[1]);
Esempio n. 3
0
echo getFieldErrorClass($validationErrors, 'firstNumber');
?>
">
				<label for="firstNumber">Enter the first number:</label>
				<input type="text" id="firstNumber" name="firstNumber" value="<?php 
echo $firstNumber;
?>
"/>
				<?php 
echo formErrors(getValue($validationErrors, 'firstNumber', []));
?>
			</div>
		<br>
		<br>
		<div class="<?php 
echo getFieldErrorClass($validationErrors, 'secondNumber');
?>
">
				<label for="secondNumber">Enter the second number:</label>
				<input type="text" id="secondNumber" name="secondNumber" value="<?php 
echo $secondNumber;
?>
"/>
				<?php 
echo formErrors(getValue($validationErrors, 'secondNumber', []));
?>
			</div>
		<br>
		<br>		
		<div>
		<label>Please choose the operation:</label>
Esempio n. 4
0
		<br>
		<br>
		<div class="<?php 
echo getFieldErrorClass($validationErrors, 'day');
?>
">
				<label for="day">Enter day:</label>
				<input type="text" id="day" name="day"/>
				<?php 
echo formErrors(getValue($validationErrors, 'day', []));
?>
			</div>
		<br>
		<br>		
		<div class="<?php 
echo getFieldErrorClass($validationErrors, 'year');
?>
">
				<label for="year">Enter year:</label>
				<input type="text" id="year" name="year"/>
				<?php 
echo formErrors(getValue($validationErrors, 'year', []));
?>
			</div>	
		<br>
		<br>
		<input type="submit" />			
	</form>
</div>
</body>
</html>
Esempio n. 5
0
					<label for="hours_add">Hours to add:</label>
					<input type="text" id="hours_add" name="hours_add"/>
			</div>
			<div>
					<label for="minutes_add">Minutes to add:</label>
					<input type="text" id="minutes_add" name="minutes_add"/>
				
			</div>
			<div>
					<label for="seconds_add">Seconds to add:</label>
					<input type="text" id="seconds_add" name="seconds_add"/>
				
			</div>				
			<h3>Enter the format and get your result:</h3>	
			<div class="<?php 
echo getFieldErrorClass($validationErrors, 'user_format');
?>
">
					<label for="user_format">Enter format:</label>
					<input type="text" id="user_format" name="user_format"/>
					<?php 
echo formErrors(getValue($validationErrors, 'user_format', []));
?>
			</div>			
			<div class="user_result">
					<label for="user_result">The new date:</label>
					<input type="text" id="user_result" name="user_result" value="<?php 
echo $newDate;
?>
"/>
					</div>	
Esempio n. 6
0
				<?php 
echo formErrors(getValue($validationErrors, 'username', []));
?>
			</div>
			<div class="<?php 
echo getFieldErrorClass($validationErrors, 'password1');
?>
">
				<label for="password1">Enter Password:</label>
				<input type="password" id="password1" name="password1" />
				<?php 
echo formErrors(getValue($validationErrors, 'password1', []));
?>
			</div>
			<div class="<?php 
echo getFieldErrorClass($validationErrors, 'password2');
?>
">
				<label for="password2">Retype Password:</label>
				<input type="password" id="password2" name="password2" />
				<?php 
echo formErrors(getValue($validationErrors, 'password2', []));
?>
			</div>
			<div>
				<input type="submit" />
			<div class="<?php 
echo Hello($validationErrors, 'username', 'password1', 'password2');
?>
">
		<label for="hello">Hello, <?php 
Esempio n. 7
0
?>
			</div>
		
			<div class="<?php 
echo getFieldErrorClass($validationErrors, 'password');
?>
">
				<label for="password">Password</label>
				<input type="password" id="password" name="password" />
				<?php 
echo formErrors(getValue($validationErrors, 'password', []));
?>
			</div>
			
			<div class="<?php 
echo getFieldErrorClass($validationErrors, 'reppassword');
?>
">
				<label for="reppassword">Repeat Password</label>
				<input type="password" id="reppassword" name="reppassword" />
				<?php 
echo formErrors(getValue($validationErrors, 'reppassword', []));
?>
			</div>
			
			
			<div>
				<input type="submit" />
			</div>
		
		</form>