0byt3m1n1
Path:
C:
/
Users
/
Administrator
/
Documents
/
[
Home
]
File: result.rtf
{\rtf1\ansi\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0 Courier New;}} {\*\generator Riched20 6.3.9600}\viewkind4\uc1 \pard\f0\fs22\lang16393 <?php\par \par include("config.php");\par /*$p1l = $_POST['p1l'];\par $p1w = $_POST['p1w'];\par $p2l = $_POST['p2l'];\par $p2w = $_POST['p2w'];\par $rooftype = $_POST['rooftype'];*/\par \par $length = $_POST['fname'];\par $width = $_POST['lname']; \par $district = $_POST['state'];\par $block = $_POST['district'];\par $persons = $_POST['pno'];\par $last_id=$con->insert_id;\par \par \par $sql = "SELECT DistCode FROM district WHERE DistrictName = '$block'";\par $result = mysqli_query($con, $sql );\par if( $result )\par \{\par while( $row = mysqli_fetch_assoc( $result ) )\par \{\par $id=$row['DistCode'];\par \}\par //echo $id;\par \}\par else\{\par echo "Something went wrong please check";\par // failure! check for errors and do something else\par \}\par \par $rainsql = "SELECT AvgRain FROM rainfalldata WHERE DistCode = '$id'"; \par $rainresult = mysqli_query($con, $rainsql );\par if( $rainresult )\par \{\par while( $row = mysqli_fetch_assoc( $rainresult ) )\par \{\par $rainAvg=$row['AvgRain'];\par \}\par \par \}\par else\{\par echo "Something went wrong please check";\par // failure! check for errors and do something else\par \}\par \par /*\par \par if ($rooftype == 's') \par \{ \par $rt = 'Sloped / Pitched Roof';\par $ph1area = $p1l*$p1w*2;\par $ph2area = $p2l*$p2w;\par $area = $ph1area + $ph2area ;\par \} \par else \par \{*/\par \par $area = $length * $width ;\par /*\}\par */\par \par $roof=$_POST['type'];\par \par //echo $roof;\par \par if ($roof == 'Fibre sheet')\par \{\par $rc= 0.9;\par \}\par elseif($roof == 'Tile')\par \{\par $rc= 0.8;\par \}\par elseif($roof == 'Asbestos')\par \{\par $rc= 0.8;\par \}\par elseif($roof == 'Concrete')\par \{\par $rc= 0.7;\par \}\par else \par \{\par $rc= 0.2;\par \}\par \par //echo $rc;\par $rain= $rainAvg/1000;\par $result = $rc*$area*$rain*1000;\par $re=$result*0.8;\par $sw=$re*0.8;\par $ne=$re*0.1;\par $dd=29160*$persons;\par $total=$sw+$ne+$ne;\par $percent= ($total/$dd)*100;\par $per=round($percent, 2); \par \par ?>\par \par <!DOCTYPE html>\par <html lang="en">\par \tab <head>\par \tab\tab <meta http-equiv="content-type" content="text/html; charset=UTF-8">\par \tab\tab <meta charset="utf-8">\par \tab\tab <title>Rainfall Calculator</title>\par \tab\tab <meta name="generator" content="Bootply" />\par \tab\tab <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">\par \tab\tab\par \tab\tab <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">\par <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet">\par <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">\par \tab <link rel="stylesheet" href="resultstyle.css">\par \par \par \par </head>\par \par <body style="background-color: #c2d1f0;">\par <div class="col-sm-8">\par <div class="row">\par <div class="col-xs-12">\par \par \tab\tab <!--<form name="insert" action="" method="post">-->\par \tab\tab <form action="result.php" method="POST">\par \par <div class="banner">\par <h1>ROOF TOP RUN-OFF VOLUME CALCULATOR </h1>\par \par </div>\par \par \par <div class="colums">\par \par <div class="item" >\par <label for="fname"> Location <!--<span>*</span>--></label>\par <input id="fname" type="text" name="fname" value='<?php echo $block ;?> '> \par </div>\par \par <div class="item" >\par <label for="fname"> No of persons in the household <!--<span>*</span>--></label>\par <input id="fname" type="text" name="fname" value='<?php echo $persons ;?> '> \par </div>\par \par <div class="item" >\par <label for="fname"> Projected area of the Roof <!--<span>*</span>--></label>\par <input id="fname" type="text" name="fname" value='<?php echo $area ;?> meter square'> \par </div>\par \par <div class="item"> <!--style="margin-left:25%"-->\par <label for="fname"> Roof Material <!--<span>*</span>--></label>\par <input id="fname" type="text" name="fname" value='<?php echo $roof;?> '> \par </div>\par \par <table>\par Annual water harvesting potential of the roof top catchment during :-\par <tbody>\par <tr> \par <td style="padding-left: 10%;">South West Monsoon (June - Sept)</td>\par <td >: <?php echo $sw?> Litre </td>\par \par </tr> \par <tr>\par <td style="padding-left: 10%;"> North East Monsoon (Oct - Nov)</td>\par <td >: <?php echo $ne?> Litre </td>\par </tr> \par <tr>\par <td style="padding-left: 10%;"> Winter and Summer (Dec - May)</td>\par <td >: <?php echo $ne?> Litre </td>\par </tr> \par <tr>\par <td style="padding-left: 20%;">Total(Annual) </td>\par <td >: <?php echo $total?> Litre</td>\par </tr>\par \par <tr>\par <td style="white-space: pre-line;">Required storage capacity of the rain water harvesting tank for meeting your domestic demand </td>\par <td >: <?php echo $dd;?> Litre</td>\par </tr>\par \par </tbody>\par \par </table>\par </br>\par </div>\par \par <?php\par if($total<$dd)\par \{\par ?>\par <style type="text/css">#alert-block\{\par display:contents;\par color: yellow;\par \}</style>\par <?php \}\par \par else\par \{ ?>\par <style type="text/css">#alert-block\{\par display:none;\par \}\par </style>\par <?php\par \par \}\par ?>\par <div class="msg-block">\par \pard <div id="head" style="margin-left: 36%;\par margin-bottom: 3%;\par \pard color: orangered;font-size: 18px;">** Message **</br></div> \par <div class="alert-block" id="alert-block" >\par The existing area of roof top catchment is insufficient to generate the runoff volume for meeting your domestic demand.\par Hence increase the area of roof top for collecting more rainfall so as to meet your demand. Here about <?php echo $per?>% of your domestic demand \par could be met by constructing a tank of capacity <?php echo $total?> litre.\par </div>\par In-order to reduce the evaporation loss, the tank should built with less suface area and having more depth.\par This water should be purified if it is used for drinking purpose.\par </div>\par \par <div class="btn-block">\par <button type="button" name="logout" id="logout" onclick="window.location.href ='index.php'">close</button>\par </div>\par \par \par </form>\par \par </div>\par </div>\par </div> \par \tab\tab\par \par \par \tab <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>\par \tab\tab <script src="js/bootstrap.min.js"></script>\par \tab </body>\par </html>\par }