Commit afb01805 by zekena

bugs

parent 50a1bd7b
...@@ -75,17 +75,17 @@ if ($_POST['submit']) { ...@@ -75,17 +75,17 @@ if ($_POST['submit']) {
</nav> </nav>
<div id="side-menu" class="side-nav"> <div id="side-menu" class="side-nav">
<a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a> <a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a>
<a href="categories/length.php">Length</a> <a href="length.php">Length</a>
<a href="categories/temperature.php">Temperature</a> <a href="temperature.php">Temperature</a>
<a href="categories/area.php">Area</a> <a href="area.php">Area</a>
<a href="categories/volume.php">Volume</a> <a href="volume.php">Volume</a>
<a href="categories/weight.php">Weight</a> <a href="weight.php">Weight</a>
<a href="categories/speed.php">Speed</a> <a href="speed.php">Speed</a>
<a href="login/login.php">Log in</a> <a href="../login/login.php">Log in</a>
</div> </div>
<script src="../js/slide.js"></script> <script src="../js/frontSide.js"></script>
<div id="title"> <div id="title">
<h1>Area</h1> <h1>Area</h1>
</div> </div>
......
...@@ -133,16 +133,16 @@ function length_options(){ ...@@ -133,16 +133,16 @@ function length_options(){
</nav> </nav>
<div id="side-menu" class="side-nav"> <div id="side-menu" class="side-nav">
<a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a> <a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a>
<a href="categories/length.php">Length</a> <a href="length.php">Length</a>
<a href="categories/temperature.php">Temperature</a> <a href="temperature.php">Temperature</a>
<a href="categories/area.php">Area</a> <a href="area.php">Area</a>
<a href="categories/volume.php">Volume</a> <a href="volume.php">Volume</a>
<a href="categories/weight.php">Weight</a> <a href="weight.php">Weight</a>
<a href="categories/speed.php">Speed</a> <a href="speed.php">Speed</a>
<a href="login/login.php">Log in</a> <a href="../login/login.php">Log in</a>
</div> </div>
<script src="../js/slide.js"></script> <script src="../js/frontside.js"></script>
<div id="title"> <div id="title">
<h1>Length</h1> <h1>Length</h1>
</div> </div>
......
<?php <?php
if (file_exists('dbconnect.php')) { if (file_exists('dbconnect.php')) {
require('dbconnect.php'); require('dbconnect.php');
if (mysqli_connect_error()) { if (mysqli_connect_error()) {
die('Connect Error (' . mysqli_connect_errno() . ')' . mysqli_connect_error()); die('Connect Error (' . mysqli_connect_errno() . ')' . mysqli_connect_error());
}
} }
}
//Add function file //Add function file
if (file_exists('../includes/functions.php')) { if (file_exists('../includes/functions.php')) {
require_once('../includes/functions.php'); require_once('../includes/functions.php');
...@@ -24,9 +24,9 @@ if ($_POST['submit']) { ...@@ -24,9 +24,9 @@ if ($_POST['submit']) {
$to_value = convert_speed($from_value, $from_unit, $to_unit); $to_value = convert_speed($from_value, $from_unit, $to_unit);
$sql = "INSERT INTO speed_entry(from_unit,to_unit,from_value,to_value) VALUES ('$from_unit','$to_unit','$from_value','$to_value');"; $sql = "INSERT INTO speed_entry(from_unit,to_unit,from_value,to_value) VALUES ('$from_unit','$to_unit','$from_value','$to_value');";
if (!mysqli_query($link, $sql)) { if (!mysqli_query($link, $sql)) {
die('An error occurred when submitting your review.'); die('An error occurred when submitting your review.');
} }
} }
$speed_options = array( $speed_options = array(
...@@ -64,17 +64,17 @@ $speed_options = array( ...@@ -64,17 +64,17 @@ $speed_options = array(
</nav> </nav>
<div id="side-menu" class="side-nav"> <div id="side-menu" class="side-nav">
<a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a> <a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a>
<a href="categories/length.php">Length</a> <a href="length.php">Length</a>
<a href="categories/temperature.php">Temperature</a> <a href="temperature.php">Temperature</a>
<a href="categories/area.php">Area</a> <a href="area.php">Area</a>
<a href="categories/volume.php">Volume</a> <a href="volume.php">Volume</a>
<a href="categories/weight.php">Weight</a> <a href="weight.php">Weight</a>
<a href="categories/speed.php">Speed</a> <a href="speed.php">Speed</a>
<a href="login/login.php">Log in</a> <a href="../login/login.php">Log in</a>
</div> </div>
<script src="../js/slide.js"></script> <script src="../js/frontside.js"></script>
<div id="title"> <div id="title">
<h1>Speed</h1> <h1>Speed</h1>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
if (file_exists('dbconnect.php')) { if (file_exists('dbconnect.php')) {
require('dbconnect.php'); require('dbconnect.php');
if (mysqli_connect_error()) { if (mysqli_connect_error()) {
die('Connect Error (' . mysqli_connect_errno() . ')' . mysqli_connect_error()); die('Connect Error (' . mysqli_connect_errno() . ')' . mysqli_connect_error());
} }
} }
//Add function file //Add function file
...@@ -25,7 +25,7 @@ if ($_POST['submit']) { ...@@ -25,7 +25,7 @@ if ($_POST['submit']) {
$to_value = convert_temp($from_value, $from_unit, $to_unit); $to_value = convert_temp($from_value, $from_unit, $to_unit);
$sql = "INSERT INTO temperature_entry(from_unit,to_unit,from_value,to_value) VALUES ('$from_unit','$to_unit','$from_value','$to_value');"; $sql = "INSERT INTO temperature_entry(from_unit,to_unit,from_value,to_value) VALUES ('$from_unit','$to_unit','$from_value','$to_value');";
if (!mysqli_query($link, $sql)) { if (!mysqli_query($link, $sql)) {
die('An error occurred when submitting your review.'); die('An error occurred when submitting your review.');
} }
} }
...@@ -111,17 +111,17 @@ $temp_options = array( ...@@ -111,17 +111,17 @@ $temp_options = array(
</nav> </nav>
<div id="side-menu" class="side-nav"> <div id="side-menu" class="side-nav">
<a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a> <a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a>
<a href="categories/length.php">Length</a> <a href="length.php">Length</a>
<a href="categories/temperature.php">Temperature</a> <a href="temperature.php">Temperature</a>
<a href="categories/area.php">Area</a> <a href="area.php">Area</a>
<a href="categories/volume.php">Volume</a> <a href="volume.php">Volume</a>
<a href="categories/weight.php">Weight</a> <a href="weight.php">Weight</a>
<a href="categories/speed.php">Speed</a> <a href="speed.php">Speed</a>
<a href="login/login.php">Log in</a> <a href="../login/login.php">Log in</a>
</div> </div>
<script src="../js/slide.js"></script> <script src="../js/frontside.js"></script>
<div id="title"> <div id="title">
<h1>Temperature</h1> <h1>Temperature</h1>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
if (file_exists('dbconnect.php')) { if (file_exists('dbconnect.php')) {
require('dbconnect.php'); require('dbconnect.php');
if (mysqli_connect_error()) { if (mysqli_connect_error()) {
die('Connect Error (' . mysqli_connect_errno() . ')' . mysqli_connect_error()); die('Connect Error (' . mysqli_connect_errno() . ')' . mysqli_connect_error());
} }
} }
//Add function file //Add function file
...@@ -25,8 +25,8 @@ if ($_POST['submit']) { ...@@ -25,8 +25,8 @@ if ($_POST['submit']) {
$to_value = convert_volume($from_value, $from_unit, $to_unit); $to_value = convert_volume($from_value, $from_unit, $to_unit);
$sql = "INSERT INTO volume_entry(from_unit,to_unit,from_value,to_value) VALUES ('$from_unit','$to_unit','$from_value','$to_value');"; $sql = "INSERT INTO volume_entry(from_unit,to_unit,from_value,to_value) VALUES ('$from_unit','$to_unit','$from_value','$to_value');";
if (!mysqli_query($link, $sql)) { if (!mysqli_query($link, $sql)) {
die('An error occurred when submitting your review.'); die('An error occurred when submitting your review.');
} }
} }
$volume_options = array( $volume_options = array(
'cubic inches', 'cubic inches',
...@@ -79,17 +79,17 @@ $volume_options = array( ...@@ -79,17 +79,17 @@ $volume_options = array(
</nav> </nav>
<div id="side-menu" class="side-nav"> <div id="side-menu" class="side-nav">
<a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a> <a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a>
<a href="categories/length.php">Length</a> <a href="length.php">Length</a>
<a href="categories/temperature.php">Temperature</a> <a href="temperature.php">Temperature</a>
<a href="categories/area.php">Area</a> <a href="area.php">Area</a>
<a href="categories/volume.php">Volume</a> <a href="volume.php">Volume</a>
<a href="categories/weight.php">Weight</a> <a href="weight.php">Weight</a>
<a href="categories/speed.php">Speed</a> <a href="speed.php">Speed</a>
<a href="login/login.php">Log in</a> <a href="../login/login.php">Log in</a>
</div> </div>
<script src="../js/slide.js"></script> <script src="../js/frontside.js"></script>
<div id="title"> <div id="title">
<h1>Volume</h1> <h1>Volume</h1>
</div> </div>
...@@ -105,25 +105,63 @@ $volume_options = array( ...@@ -105,25 +105,63 @@ $volume_options = array(
<input id="Input" class="Input-text" placeholder="Enter amount" name="from_value" value="<?php echo $from_value; ?>" />&nbsp; <input id="Input" class="Input-text" placeholder="Enter amount" name="from_value" value="<?php echo $from_value; ?>" />&nbsp;
<label for="Input" class="Input-label">Your entry</label> <label for="Input" class="Input-label">Your entry</label>
<select name="from_unit"> <select name="from_unit">
<option value="cubic_inches"<?php if($from_unit == 'cubic_inches') { echo " selected"; } ?>>cubic inches</option> <option value="cubic_inches" <?php if ($from_unit == 'cubic_inches') {
<option value="cubic_feet"<?php if($from_unit == 'cubic_feet') { echo " selected"; } ?>>cubic feet</option> echo " selected";
<option value="cubic_meters"<?php if($from_unit == 'cubic_meters') { echo " selected"; } ?>>cubic meters</option> } ?>>cubic inches</option>
<option value="cubic_centimeres"<?php if($from_unit == 'cubic_centimeters') { echo " selected"; } ?>>cubic centimeters</option> <option value="cubic_feet" <?php if ($from_unit == 'cubic_feet') {
<option value="imperial_gallons"<?php if($from_unit == 'imperial_gallons') { echo " selected"; } ?>>imperial gallons</option> echo " selected";
<option value="imperial_quarts"<?php if($from_unit == 'imperial_quarts') { echo " selected"; } ?>>imperial quarts</option> } ?>>cubic feet</option>
<option value="imperial_pints"<?php if($from_unit == 'imperial_pints') { echo " selected"; } ?>>imperial pints</option> <option value="cubic_meters" <?php if ($from_unit == 'cubic_meters') {
<option value="imperial_cups"<?php if($from_unit == 'imperial_cups') { echo " selected"; } ?>>imperial cups</option> echo " selected";
<option value="imperial_ounces"<?php if($from_unit == 'imperial_ounces') { echo " selected"; } ?>>imperial ounces</option> } ?>>cubic meters</option>
<option value="imperial_tablespoons"<?php if($from_unit == 'imperial_tablespoons') { echo " selected"; } ?>>imperial tablespoons</option> <option value="cubic_centimeres" <?php if ($from_unit == 'cubic_centimeters') {
<option value="us_gallons"<?php if($from_unit == 'us_gallons') { echo " selected"; } ?>>US gallons</option> echo " selected";
<option value="us_quarts"<?php if($from_unit == 'imperial_quarts') { echo " selected"; } ?>>imperial quarts</option> } ?>>cubic centimeters</option>
<option value="us_pints"<?php if($from_unit == 'imperial_pints') { echo " selected"; } ?>>imperial pints</option> <option value="imperial_gallons" <?php if ($from_unit == 'imperial_gallons') {
<option value="us_cups"<?php if($from_unit == 'us_cups') { echo " selected"; } ?>>US cups</option> echo " selected";
<option value="us_ounces"<?php if($from_unit == 'us_ounces') { echo " selected"; } ?>>US ounces</option> } ?>>imperial gallons</option>
<option value="us_tablespoons"<?php if($from_unit == 'us_tablespoons') { echo " selected"; } ?>>US tablespoons</option> <option value="imperial_quarts" <?php if ($from_unit == 'imperial_quarts') {
<option value="us_gallons"<?php if($from_unit == 'us_gallons') { echo " selected"; } ?>>US gallons</option> echo " selected";
<option value="liters"<?php if($from_unit == 'liters') { echo " selected"; } ?>>liters</option> } ?>>imperial quarts</option>
<option value="millimeters"<?php if($from_unit == 'millimeters') { echo " selected"; } ?>>millimeters</option> <option value="imperial_pints" <?php if ($from_unit == 'imperial_pints') {
echo " selected";
} ?>>imperial pints</option>
<option value="imperial_cups" <?php if ($from_unit == 'imperial_cups') {
echo " selected";
} ?>>imperial cups</option>
<option value="imperial_ounces" <?php if ($from_unit == 'imperial_ounces') {
echo " selected";
} ?>>imperial ounces</option>
<option value="imperial_tablespoons" <?php if ($from_unit == 'imperial_tablespoons') {
echo " selected";
} ?>>imperial tablespoons</option>
<option value="us_gallons" <?php if ($from_unit == 'us_gallons') {
echo " selected";
} ?>>US gallons</option>
<option value="us_quarts" <?php if ($from_unit == 'imperial_quarts') {
echo " selected";
} ?>>imperial quarts</option>
<option value="us_pints" <?php if ($from_unit == 'imperial_pints') {
echo " selected";
} ?>>imperial pints</option>
<option value="us_cups" <?php if ($from_unit == 'us_cups') {
echo " selected";
} ?>>US cups</option>
<option value="us_ounces" <?php if ($from_unit == 'us_ounces') {
echo " selected";
} ?>>US ounces</option>
<option value="us_tablespoons" <?php if ($from_unit == 'us_tablespoons') {
echo " selected";
} ?>>US tablespoons</option>
<option value="us_gallons" <?php if ($from_unit == 'us_gallons') {
echo " selected";
} ?>>US gallons</option>
<option value="liters" <?php if ($from_unit == 'liters') {
echo " selected";
} ?>>liters</option>
<option value="millimeters" <?php if ($from_unit == 'millimeters') {
echo " selected";
} ?>>millimeters</option>
</select> </select>
</div> </div>
...@@ -131,25 +169,63 @@ $volume_options = array( ...@@ -131,25 +169,63 @@ $volume_options = array(
<input readonly id="Input" class="Input-text" placeholder="Wait for it" name="to_value" value=" <?php echo $to_value; ?>" />&nbsp; <input readonly id="Input" class="Input-text" placeholder="Wait for it" name="to_value" value=" <?php echo $to_value; ?>" />&nbsp;
<label for="Input" class="input-label">Converted Result</label> <label for="Input" class="input-label">Converted Result</label>
<select name="to_unit"> <select name="to_unit">
<option value="cubic_inches"<?php if($to_unit == 'cubic_inches') { echo " selected"; } ?>>cubic inches</option> <option value="cubic_inches" <?php if ($to_unit == 'cubic_inches') {
<option value="cubic_feet"<?php if($to_unit == 'cubic_feet') { echo " selected"; } ?>>cubic feet</option> echo " selected";
<option value="cubic_meters"<?php if($tounit == 'cubic_meters') { echo " selected"; } ?>>cubic meters</option> } ?>>cubic inches</option>
<option value="cubic_centimeres"<?php if($to_unit == 'cubic_centimeters') { echo " selected"; } ?>>cubic centimeters</option> <option value="cubic_feet" <?php if ($to_unit == 'cubic_feet') {
<option value="imperial_gallons"<?php if($to_unit == 'imperial_gallons') { echo " selected"; } ?>>imperial gallons</option> echo " selected";
<option value="imperial_quarts"<?php if($to_unit == 'imperial_quarts') { echo " selected"; } ?>>imperial quarts</option> } ?>>cubic feet</option>
<option value="imperial_pints"<?php if($to_unit == 'imperial_pints') { echo " selected"; } ?>>imperial pints</option> <option value="cubic_meters" <?php if ($tounit == 'cubic_meters') {
<option value="imperial_cups"<?php if($to_unit == 'imperial_cups') { echo " selected"; } ?>>imperial cups</option> echo " selected";
<option value="imperial_ounces"<?php if($to_unit == 'imperial_ounces') { echo " selected"; } ?>>imperial ounces</option> } ?>>cubic meters</option>
<option value="imperial_tablespoons"<?php if($to_unit == 'imperial_tablespoons') { echo " selected"; } ?>>imperial tablespoons</option> <option value="cubic_centimeres" <?php if ($to_unit == 'cubic_centimeters') {
<option value="us_gallons"<?php if($to_unit == 'us_gallons') { echo " selected"; } ?>>US gallons</option> echo " selected";
<option value="us_quarts"<?php if($to_unit == 'imperial_quarts') { echo " selected"; } ?>>imperial quarts</option> } ?>>cubic centimeters</option>
<option value="us_pints"<?php if($to_unit == 'imperial_pints') { echo " selected"; } ?>>imperial pints</option> <option value="imperial_gallons" <?php if ($to_unit == 'imperial_gallons') {
<option value="us_cups"<?php if($to_unit == 'us_cups') { echo " selected"; } ?>>US cups</option> echo " selected";
<option value="us_ounces"<?php if($to_unit == 'us_ounces') { echo " selected"; } ?>>US ounces</option> } ?>>imperial gallons</option>
<option value="us_tablespoons"<?php if($to_unit == 'us_tablespoons') { echo " selected"; } ?>>US tablespoons</option> <option value="imperial_quarts" <?php if ($to_unit == 'imperial_quarts') {
<option value="us_gallons"<?php if($to_unit == 'us_gallons') { echo " selected"; } ?>>US gallons</option> echo " selected";
<option value="liters"<?php if($to_unit == 'liters') { echo " selected"; } ?>>liters</option> } ?>>imperial quarts</option>
<option value="millimeters"<?php if($to_unit == 'millimeters') { echo " selected"; } ?>>millimeters</option> <option value="imperial_pints" <?php if ($to_unit == 'imperial_pints') {
echo " selected";
} ?>>imperial pints</option>
<option value="imperial_cups" <?php if ($to_unit == 'imperial_cups') {
echo " selected";
} ?>>imperial cups</option>
<option value="imperial_ounces" <?php if ($to_unit == 'imperial_ounces') {
echo " selected";
} ?>>imperial ounces</option>
<option value="imperial_tablespoons" <?php if ($to_unit == 'imperial_tablespoons') {
echo " selected";
} ?>>imperial tablespoons</option>
<option value="us_gallons" <?php if ($to_unit == 'us_gallons') {
echo " selected";
} ?>>US gallons</option>
<option value="us_quarts" <?php if ($to_unit == 'imperial_quarts') {
echo " selected";
} ?>>imperial quarts</option>
<option value="us_pints" <?php if ($to_unit == 'imperial_pints') {
echo " selected";
} ?>>imperial pints</option>
<option value="us_cups" <?php if ($to_unit == 'us_cups') {
echo " selected";
} ?>>US cups</option>
<option value="us_ounces" <?php if ($to_unit == 'us_ounces') {
echo " selected";
} ?>>US ounces</option>
<option value="us_tablespoons" <?php if ($to_unit == 'us_tablespoons') {
echo " selected";
} ?>>US tablespoons</option>
<option value="us_gallons" <?php if ($to_unit == 'us_gallons') {
echo " selected";
} ?>>US gallons</option>
<option value="liters" <?php if ($to_unit == 'liters') {
echo " selected";
} ?>>liters</option>
<option value="millimeters" <?php if ($to_unit == 'millimeters') {
echo " selected";
} ?>>millimeters</option>
</select> </select>
</div> </div>
......
<?php <?php
if (file_exists('dbconnect.php')) { if (file_exists('dbconnect.php')) {
require('dbconnect.php'); require('dbconnect.php');
if (mysqli_connect_error()) { if (mysqli_connect_error()) {
die('Connect Error (' . mysqli_connect_errno() . ')' . mysqli_connect_error()); die('Connect Error (' . mysqli_connect_errno() . ')' . mysqli_connect_error());
} }
} }
//Add function file //Add function file
...@@ -25,7 +25,7 @@ if ($_POST['submit']) { ...@@ -25,7 +25,7 @@ if ($_POST['submit']) {
$to_value = convert_mass($from_value, $from_unit, $to_unit); $to_value = convert_mass($from_value, $from_unit, $to_unit);
$sql = "INSERT INTO weight_entry(from_unit,to_unit,from_value,to_value) VALUES ('$from_unit','$to_unit','$from_value','$to_value');"; $sql = "INSERT INTO weight_entry(from_unit,to_unit,from_value,to_value) VALUES ('$from_unit','$to_unit','$from_value','$to_value');";
if (!mysqli_query($link, $sql)) { if (!mysqli_query($link, $sql)) {
die('An error occurred when submitting your review.'); die('An error occurred when submitting your review.');
} }
} }
...@@ -117,17 +117,17 @@ $mass_options = array( ...@@ -117,17 +117,17 @@ $mass_options = array(
</nav> </nav>
<div id="side-menu" class="side-nav"> <div id="side-menu" class="side-nav">
<a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a> <a href="#" class="btn-close" onclick="closeSlideMenu()">&times;</a>
<a href="categories/length.php">Length</a> <a href="length.php">Length</a>
<a href="categories/temperature.php">Temperature</a> <a href="temperature.php">Temperature</a>
<a href="categories/area.php">Area</a> <a href="area.php">Area</a>
<a href="categories/volume.php">Volume</a> <a href="volume.php">Volume</a>
<a href="categories/weight.php">Weight</a> <a href="weight.php">Weight</a>
<a href="categories/speed.php">Speed</a> <a href="speed.php">Speed</a>
<a href="login/login.php">Log in</a> <a href="../login/login.php">Log in</a>
</div> </div>
<script src="../js/slide.js"></script> <script src="../js/frontside.js"></script>
<div id="title"> <div id="title">
<h1>Weight</h1> <h1>Weight</h1>
</div> </div>
...@@ -143,15 +143,33 @@ $mass_options = array( ...@@ -143,15 +143,33 @@ $mass_options = array(
<input id="Input" class="Input-text" placeholder="Enter amount" name="from_value" value="<?php echo $from_value; ?>" />&nbsp; <input id="Input" class="Input-text" placeholder="Enter amount" name="from_value" value="<?php echo $from_value; ?>" />&nbsp;
<label for="Input" class="Input-label">Your entry</label> <label for="Input" class="Input-label">Your entry</label>
<select name="from_unit"> <select name="from_unit">
<option value="ounces"<?php if($from_unit == 'ounces') { echo " selected"; } ?>>ounces</option> <option value="ounces" <?php if ($from_unit == 'ounces') {
<option value="pounds"<?php if($from_unit == 'pounds') { echo " selected"; } ?>>pounds</option> echo " selected";
<option value="stones"<?php if($from_unit == 'stones') { echo " selected"; } ?>>stones</option> } ?>>ounces</option>
<option value="long_tons"<?php if($from_unit == 'long_tons') { echo " selected"; } ?>>long tons</option> <option value="pounds" <?php if ($from_unit == 'pounds') {
<option value="short_tons"<?php if($from_unit == 'short_tons') { echo " selected"; } ?>>short tons</option> echo " selected";
<option value="milligrams"<?php if($from_unit == 'milligrams') { echo " selected"; } ?>>milligrams</option> } ?>>pounds</option>
<option value="grams"<?php if($from_unit == 'grams') { echo " selected"; } ?>>grams</option> <option value="stones" <?php if ($from_unit == 'stones') {
<option value="kilograms"<?php if($from_unit == 'kilograms') { echo " selected"; } ?>>kilograms</option> echo " selected";
<option value="metric_tonnes"<?php if($from_unit == 'metric_tonnes') { echo " selected"; } ?>>metric tonnes</option> } ?>>stones</option>
<option value="long_tons" <?php if ($from_unit == 'long_tons') {
echo " selected";
} ?>>long tons</option>
<option value="short_tons" <?php if ($from_unit == 'short_tons') {
echo " selected";
} ?>>short tons</option>
<option value="milligrams" <?php if ($from_unit == 'milligrams') {
echo " selected";
} ?>>milligrams</option>
<option value="grams" <?php if ($from_unit == 'grams') {
echo " selected";
} ?>>grams</option>
<option value="kilograms" <?php if ($from_unit == 'kilograms') {
echo " selected";
} ?>>kilograms</option>
<option value="metric_tonnes" <?php if ($from_unit == 'metric_tonnes') {
echo " selected";
} ?>>metric tonnes</option>
</select> </select>
</div> </div>
...@@ -159,15 +177,33 @@ $mass_options = array( ...@@ -159,15 +177,33 @@ $mass_options = array(
<input readonly id="Input" class="Input-text" placeholder="Wait for it" name="to_value" value="<?php echo float_to_string($to_value); ?>" />&nbsp; <input readonly id="Input" class="Input-text" placeholder="Wait for it" name="to_value" value="<?php echo float_to_string($to_value); ?>" />&nbsp;
<label for="Input" class="input-label">Converted Result</label> <label for="Input" class="input-label">Converted Result</label>
<select name="to_unit"> <select name="to_unit">
<option value="ounces"<?php if($to_unit == 'ounces') { echo " selected"; } ?>>ounces</option> <option value="ounces" <?php if ($to_unit == 'ounces') {
<option value="pounds"<?php if($to_unit == 'pounds') { echo " selected"; } ?>>pounds</option> echo " selected";
<option value="stones"<?php if($to_unit == 'stones') { echo " selected"; } ?>>stones</option> } ?>>ounces</option>
<option value="long_tons"<?php if($to_unit == 'long_tons') { echo " selected"; } ?>>long tons/option> <option value="pounds" <?php if ($to_unit == 'pounds') {
<option value="short_tons"<?php if($to_unit == 'short_tons') { echo " selected"; } ?>>short tons</option> echo " selected";
<option value="milligrams"<?php if($to_unit == 'milligrams') { echo " selected"; } ?>>milligrams</option> } ?>>pounds</option>
<option value="grams"<?php if($to_unit == 'grams') { echo " selected"; } ?>>grams</option> <option value="stones" <?php if ($to_unit == 'stones') {
<option value="kilograms"<?php if($to_unit == 'kilograms') { echo " selected"; } ?>>kilograms</option> echo " selected";
<option value="metric_tonnes"<?php if($to_unit == 'metric_tonnes') { echo " selected"; } ?>>metric tonnes</option> } ?>>stones</option>
<option value="long_tons" <?php if ($to_unit == 'long_tons') {
echo " selected";
} ?>>long tons/option>
<option value="short_tons" <?php if ($to_unit == 'short_tons') {
echo " selected";
} ?>>short tons</option>
<option value="milligrams" <?php if ($to_unit == 'milligrams') {
echo " selected";
} ?>>milligrams</option>
<option value="grams" <?php if ($to_unit == 'grams') {
echo " selected";
} ?>>grams</option>
<option value="kilograms" <?php if ($to_unit == 'kilograms') {
echo " selected";
} ?>>kilograms</option>
<option value="metric_tonnes" <?php if ($to_unit == 'metric_tonnes') {
echo " selected";
} ?>>metric tonnes</option>
</select> </select>
</div> </div>
......
...@@ -7,3 +7,5 @@ ...@@ -7,3 +7,5 @@
6,,, 6,,,
7,,, 7,,,
8,,, 8,,,
9,,,
10,,,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment