PHP Classes

File: examples/templates/if.html

Recommend this page to a friend!
  Classes of tokkara   Simphple   examples/templates/if.html   Download  
File: examples/templates/if.html
Role: Auxiliary data
Content type: text/plain
Description: Documentation
Class: Simphple
Process templates compiling into PHP code
Author: By
Last change: simphple version 1.1.0
Date: 10 years ago
Size: 1,698 bytes


Class file image Download
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>if structure example</title> </head> <body> <!-- IF !empty($number) || !empty($age) || !empty($gender) --> <h1>Number info</h1> <div> <!-- IF !is_numeric($number) --> The data isn't number. <!-- ELSEIF $number>100 --> The number is greater than 100 <!-- ELSEIF $number>=20 --> The number is between 100 and 20 <!-- ELSEIF $number>=0 --> The number is equal to or greater than 0 <!-- ELSE --> The number is negative. <!-- ENDIF --> </div><br/> <h1>Gender and age</h1> <div> <!-- IF $gender==MALE && $age==16 --> Is a male and is 16 years old. <!-- ELSEIF $gender==FEMALE && $age==16 --> Is a female and is 16 years old. <!-- ELSEIF $gender==MALE && $age==35 --> Is a male and is 35 years old <!-- ELSEIF $gender==FEMALE && $age==35 --> Is a female and is 35 years old <!-- ENDIF --> </div> <div><a href="if.php">Back</a></div> <!-- ELSE --> <h1>Complete the form</h1> <form action="if.php" method="post"> <div>Write a number: <input name="number" type="text" value=""/></div> <div>Select a gender: <input name="gender" checked="checked" type="radio" value="{MALE:}"/>Male&nbsp;&nbsp;<input name="gender" type="radio" value="{FEMALE:}"/>Female</div> <div>Selec a age: <input name="age" checked="checked" type="radio" value="16"/>16&nbsp;&nbsp;<input name="age" type="radio" value="35"/>35</div> <div><input name="submit" type="submit" value="Send"/></div> </form> <!-- ENDIF --> </body> </html>