Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- extract($_REQUEST);
- $startYear = 1;
- $endYear = ($endYear);
- $assetCost = ($assetCost);
- $startDep = ($startDep);
- $startDepUsage = ($startDep);
- $endDep = ($endDep);
- $calulate = 0;
- print "<h1> Depreciation Asset Table </h1>";
- print "<h2> Depreciation Period From Year 1 To $endYear";
- print "<h2> Asset Cost: $assetCost";
- print "<h2> From $startDep% to $endDep%";
- function chkData($endYear, $assetCost, $startDep, $calulate) {
- if (is_integer($endYear) == true)
- continue;
- else {
- print "Depreciation Value is not Integer";
- $calulate++;
- }
- if (is_decimal($assetCost) == true)
- continue;
- else {
- print "Asset cost is not numeric";
- $calulate++;
- }
- if (is_decimal($startDep) == true)
- continue;
- else
- {
- print "Starting depreciation value is not numeric";
- $calulate++;
- }
- if (is_decimal($endDep) == true)
- continue;
- else
- {
- print "Starting depreciation value is not numeric";
- $calulate++;
- }
- if ($calulate == 0)
- return true;
- else
- return false;
- }
- if (chkData($endYear, $assetCost, $startDep, $calulate) == true)
- print "<table>" ;
- print "<th> Depreciation year %/ Year</th>";
- for ($i = $startDep; $i <= $endDep; $i += 5.5) {
- print "<th> $i </th>";
- }
- print "</table>"
- ?>
- <a href="csis3280F2018ScottMyronAs1.html" class="button">Back</a>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement