PHP Classes

Scale It: Calculate measures converted between scales

Recommend this page to a friend!
  Info   View files Example   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 102 This week: 1All time: 9,757 This week: 560Up
Version License PHP version Categories
scaleit 1.0Freely Distributable5PHP 5, Conversion, Math
Description 

Author

This class can calculate measures converted between scales.

It displays a form that takes two scales and a distance given in feet and inches.

The class multiplies the distance for ratio between the scales and displays the resulting value as an approximate fraction.

A configurable human factor may be applied to the calculation.

Picture of Jeremy Stansfield
  Performance   Level  
Name: Jeremy Stansfield <contact>
Classes: 7 packages by
Country: United States United States
Age: 51
All time rank: 1998283 in United States United States
Week rank: 411 Up48 in United States United States Up

Example

<?php
/**
 * index.php
 */

require 'scaleit.class.php';
$s = new scaleit();

?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title id="page_title">Scale It</title>
<style>
html {
  height:100%;
  width:100%;
}
a,a:link {
  color:#F8F8F8;
}

body {
  height:100%;
  width:100%;
  margin:0px;
  padding:0px;
  background-color:#171717;
  font-family:"Lucida Console", Monaco, monospace;
}
input {
  border-radius:5px;
  font-family:"Lucida Console", Monaco, monospace;
  padding:5px;
  border:1px solid grey;
  margin-bottom:5px;
}
#page_content {
  border-radius:5px;
  min-height:100%;
  width:90%;
  background-color:#313131;
  margin-top:10px;
  margin-bottom:0px;
  margin-left: auto;
  margin-right:auto;
  padding:10px;
  color:#BABABA;
}

/* login form */
#login_form {
  width:250px;
  margin: 50px auto;
}

#login_form p {
  padding:0px;
  margin:0px;
  text-align:center;
}
#your_ip {
  text-align:right;
  font-size:85%;
}
#content {
  display:block;
  min-height:90%;
  width:300px;
  margin:20px auto;
  text-align:center;
}
#result {
  padding:20px;
  font-size:120%;

}
</style>
</head>
<body>

  <div id="page_content">
      <div id="html">

        <div id="content">
          <h1>Scale It</h1>
          <?php echo $s;?></div>

      </div>
  </div>
</body>
</html>


  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example Example script to use class
Plain text file scaleit.class.php Class Scale Class construct

 Version Control Unique User Downloads Download Rankings  
 0%
Total:102
This week:1
All time:9,757
This week:560Up