0byt3m1n1
Path:
C:
/
wamp64
/
www
/
RRC
/
[
Home
]
File: result.php
<?php include("config.php"); /*$p1l = $_POST['p1l']; $p1w = $_POST['p1w']; $p2l = $_POST['p2l']; $p2w = $_POST['p2w']; $rooftype = $_POST['rooftype'];*/ $length = $_POST['fname']; $width = $_POST['lname']; $district = $_POST['state']; $block = $_POST['district']; $persons = $_POST['pno']; $water= $_POST['water']; $last_id=$con->insert_id; $sql = "SELECT DistCode FROM district WHERE DistrictName = '$block'"; $result = mysqli_query($con, $sql ); if( $result ) { while( $row = mysqli_fetch_assoc( $result ) ) { $id=$row['DistCode']; } //echo $id; } else{ echo "Something went wrong please check"; // failure! check for errors and do something else } $rainsql = "SELECT AvgRain FROM rainfalldata WHERE DistCode = '$id'"; $rainresult = mysqli_query($con, $rainsql ); if( $rainresult ) { while( $row = mysqli_fetch_assoc( $rainresult ) ) { $rainAvg=$row['AvgRain']; } } else{ echo "Something went wrong please check"; // failure! check for errors and do something else } /* if ($rooftype == 's') { $rt = 'Sloped / Pitched Roof'; $ph1area = $p1l*$p1w*2; $ph2area = $p2l*$p2w; $area = $ph1area + $ph2area ; } else {*/ $area = $length * $width ; /*} */ $roof=$_POST['type']; //echo $roof; if ($roof == 'Fibre sheet') { $rc= 0.9; } elseif($roof == 'Tile') { $rc= 0.8; } elseif($roof == 'Asbestos') { $rc= 0.8; } elseif($roof == 'Concrete') { $rc= 0.7; } else { $rc= 0.2; } //echo $rc; $rain= $rainAvg/1000; $result = $rc*$area*$rain*1000; $re=$result*0.8; $sw=$re*0.7; $ne=$re*0.2; $ws=$re*0.1; $dd=4860*$persons*$water; $total=$sw+$ne+$ws; $percent= ($total/$dd)*100; $per=floor($percent); ?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <meta charset="utf-8"> <title>Rainfall Calculator</title> <meta name="generator" content="Bootply" /> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet"> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous"> <link rel="stylesheet" href="resultstyle.css"> </head> <body style="background-color: #c2d1f0;"> <div class=container> <!-- <div class="row"> <div class="col-xs-12">--> <!--<form name="insert" action="" method="post">--> <form action="result.php" method="POST"> <div class="banner"> <h1>ROOF TOP RAINWATER CALCULATOR </h1> </div> <div class="se" style=" padding: 2%; padding-top: 1%; margin-top: inherit;"> <div class="colums"> <div class="item" > <label for="fname"> Location <!--<span>*</span>--></label> <input id="fname" type="text" name="fname" value='<?php echo $block ;?> '> </div> <div class="item" > <label for="fname"> No of persons in the household <!--<span>*</span>--></label> <input id="fname" type="text" name="fname" value='<?php echo $persons ;?> '> </div> <div class="item" > <label for="fname"> Projected area of the Roof <!--<span>*</span>--></label> <input id="fname" type="text" name="fname" value='<?php echo $area ;?> meter square'> </div> <div class="item"> <!--style="margin-left:25%"--> <label for="fname"> Roof Material <!--<span>*</span>--></label> <input id="fname" type="text" name="fname" value='<?php echo $roof;?> '> </div> <table style="white-space:pre;"> Annual water harvesting potential of the roof top catchment during:- <tbody> <tr> <td style="padding-left: 11%;">South West Monsoon (June - Sept)</td> <td>:</td> <td ><?php echo floor($sw)?> Litre </td> </tr> <tr> <td style="padding-left: 13%;"> North East Monsoon (Oct - Nov) </td> <td>:</td> <td ><?php echo floor($ne) ?> Litre </td> </tr> <tr> <td style="padding-left: 13%;"> Winter and Summer (Dec - May) </td> <td>:</td> <td ><?php echo floor($ws)?> Litre </td> </tr> <tr> <td style="padding-left: 40%;">Total(Annual) </td> <td style="width:5%">:</td> <td ><?php echo floor($total);?> Litre</td> </tr> <tr> <td style=" width: 65%; white-space: break-spaces;">Required storage capacity of the rain water harvesting tank for meeting your domestic demand </td> <td>:</td> <td ><?php echo floor($dd);?> Litre</td> </tr> </tbody> </table> </br> </div> <?php if($total<$dd) { ?> <style type="text/css">#alert-block{ display:contents; color: coral; }</style> <?php } else { ?> <style type="text/css">#alert-block{ display:none; } </style> <?php } ?> <div class="msg-block"> <div id="head" style="margin-bottom: 3%; color: orangered;font-size: 18px;">** Message **</br></div> <div class="alert-block" id="alert-block" style="color: yellowgreen;"> The existing area of roof top catchment is insufficient to generate the runoff volume for meeting your domestic demand. 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 could be met by constructing a tank of capacity <?php echo floor($total); ?> litre. </div> In-order to reduce the evaporation loss, the tank should built with less suface area and having more depth. This water should be purified if it is used for drinking purpose. </div> <div class="btn-block"> <!-- <button type="button" name="disc" id="disc" onclick="window.location.href ='description.php'">click</button>--> <button type="button" name="logout" id="logout" onclick="window.location.href ='index.php'">close</button> </div> </form> <!--/*form ends*/ </div> </div>--> </div> <div class ="ref"> <div class="ref-img"> <!--<img src="images/harvest.jpg" alt="abcd">--> <img src="images/harvest.jpg" alt="refimg" id="ref-img" style="position: relative; height: 300px; width:100%; background-repeat: no-repeat; background-size: cover; display: flex; justify-content: center; align-items: center; text-align: center;" > </div> <div class="ref-disc"> </br><h2>Components of a rooftop harvesting system</h2> <h3 style="color:red">1. Roof top catchment</h3> It acts as a receiver of the rainfall and supply the water to the rain water harvesting system. The quantity of the supply mainly depends on the area of the rooftop. Runoff generation coefficient for different types of roofs such as tile, concrete, GI/fiber sheet, asbestos sheet and organic roofs are also reflects the input into the system. <h3 style="color:paleturquoise">2. Gutters </h3> It collects the runoff from the rooftop catchment and directs the flow towards the conveyance system. These are commonly semi-circular in cross- section and it is tightly hinged to the roof edge. </br> <h3 style="color:yellow">3. Conveyance pipes</h3> It transports the water towards the filter unit, storage tank and recharge system. <h3 style="color:orange">4. First flush valve </h3> This valve helps to flush out the turbid water containing leafs, small twigs, bird droppings etc. which are more during the initial stages of rainfall. <h3 style="color:violet">5. Filter unit </h3> This unit acts as a primary purifier. Generally, coarse grained materials such as pebbles, gravels will occupy the bottom side of the unit and fine grained material such as sand will be kept just above it. For removing the foul odor, charcoal may be spread out as the topmost layer. A wire mesh should be kept in between the layers. <h3 style="color:skyblue">6. Storage tank </h3> It stores the purified water. The storage tank should be maintained well without getting affected by bacteria growth. <h3 style="color:lightgreen">7. Recharge well </h3> The surplus water from the storage tank may be injected into the well to replenish the shallow aquifer. </div> </div> </div> </div><!--container ends--> <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> <script src="js/bootstrap.min.js"></script> </body> </html>