202 lines
8.3 KiB
PHP
202 lines
8.3 KiB
PHP
<?php
|
|
if (!empty($_SESSION['site406']))
|
|
{
|
|
?>
|
|
<?php
|
|
//warunek, gdy wracamy z wykresu
|
|
if (!empty($_GET['q']))
|
|
{
|
|
$_POST['inNewQ']=$_GET['q']/60;
|
|
$_POST['subStep4']=$lab_ButtonName_Next;
|
|
}
|
|
|
|
require_once('./polynomial/regression.php' );
|
|
|
|
?>
|
|
|
|
|
|
<?php
|
|
if(!empty($_POST['subStep4']) || (!empty($_GET['s']) && $_SESSION['wariant']=='step4') )
|
|
{
|
|
$_SESSION['wariant']='step4';
|
|
|
|
if (!empty($_POST['inNewQ'])) $_SESSION['inNewQ'] = $_POST['inNewQ'];
|
|
$Hd = str_replace(",", ".",$_SESSION['inNewHD']);
|
|
$p2 = getLastValueFromDevResourceDetail("WELL_PARAMETERS","P2M",$_SESSION['devID']);
|
|
$qQ = str_replace(",", ".",$_SESSION['inNewQ'])/60;
|
|
$f = 3.14*pow((str_replace(",", ".",$_SESSION['inNewDR'])/1000),2)/4;
|
|
$ct = $qQ/$f;
|
|
$Hsl=$_SESSION['rurType'] * (str_replace(",", ".",$_SESSION['inNewLP'])/(str_replace(",", ".",$_SESSION['inNewDR'])/1000)) * (pow($ct,2)/19.62);
|
|
$Hp=round($Hd+$p2+$Hsl,2);
|
|
|
|
$Hp_min = $Hp-($Hp*0.035);
|
|
$Hp_max = $Hp+($Hp*0.07);
|
|
|
|
$qQuery = str_replace(",", ".",$_SESSION['inNewQ'])*60;
|
|
|
|
//$resArray = loadSelectionArray($qQuery,$Hp,$Hp_min,$Hp_max);
|
|
$resArray = loadSelectionArray_New($qQuery,$Hp,$Hp_min,$Hp_max);
|
|
|
|
}
|
|
|
|
|
|
if(!empty($_POST['subStep5']) || (!empty($_GET['s']) && $_SESSION['wariant']=='step5'))
|
|
{
|
|
$_SESSION['wariant']='step5';
|
|
|
|
$Hd = str_replace(",", ".",$_SESSION['inNewHD']);
|
|
$p2 = getLastValueFromDevResourceDetail("WELL_PARAMETERS","P2M",$_SESSION['devID']);
|
|
$qQ = str_replace(",", ".",$_SESSION['inNewQ'])/60;
|
|
$f = 3.14*pow((str_replace(",", ".",$_SESSION['inNewDR'])/1000),2)/4;
|
|
$ct = $qQ/$f;
|
|
$Hsl=$_SESSION['rurType'] * (str_replace(",", ".",$_SESSION['inNewLP'])/(str_replace(",", ".",$_SESSION['inNewDR'])/1000)) * (pow($ct,2)/19.62);
|
|
$Hp=round($Hd+$p2+$Hsl,2);
|
|
|
|
$Hp_min = $Hp-($Hp*0.1);
|
|
$Hp_max = $Hp+($Hp*0.15);
|
|
|
|
$qQuery = str_replace(",", ".",$_SESSION['inNewQ'])*60;
|
|
|
|
//$resArray = loadSelectionArray($qQuery,$Hp,$Hp_min,$Hp_max);
|
|
$resArray = loadSelectionArray_New($qQuery,$Hp,$Hp_min,$Hp_max);
|
|
}
|
|
|
|
|
|
if ($_GET['s']=='hu') $resArray = sortmddata($resArray,'hpod','ASC','num');
|
|
else if ($_GET['s']=='hd') $resArray = sortmddata($resArray,'hpod','DESC','num');
|
|
else if ($_GET['s']=='eu') $resArray = sortmddata($resArray,'eta','ASC','num');
|
|
else if ($_GET['s']=='ed') $resArray = sortmddata($resArray,'eta','DESC','num');
|
|
else if ($_GET['s']=='su') $resArray = sortmddata($resArray,'mocsilnika','ASC','num');
|
|
else if ($_GET['s']=='sd') $resArray = sortmddata($resArray,'mocsilnika','DESC','num');
|
|
else if ($_GET['s']=='stu') $resArray = sortmddata($resArray,'pupStatus','ASC','str');
|
|
else if ($_GET['s']=='std') $resArray = sortmddata($resArray,'pupStatus','DESC','str');
|
|
//else $resArray = sortmddata($resArray,'deltah','ASC','num');
|
|
else $resArray = sortmddata($resArray,'pupStatus','ASC','str');
|
|
|
|
|
|
// 'tst'=>$tst,'popma'=>$r_pName,'nrpompy'=>$r_pSN,'silnik'=>$r_eName,'nrsilnika'=>$r_eSN,'qsz'=>$qQuery,'hpod'=>round($h4search,2),'eta'=>$eta,'deltah'=>$deltaH,'mocsilnika'=>$r_eP
|
|
|
|
|
|
|
|
$rec_count=0;
|
|
|
|
?>
|
|
|
|
<form action="./?pg=site406_5" method="post">
|
|
<div class="tag100">
|
|
<div class="head_tag">Lista przesortowanych agregatów na zadane parametry.</div>
|
|
<div class="tag">
|
|
<div class="steps">
|
|
<img src="./images/ps_step_5.png" border="0" usemap="#selection">
|
|
<map name="selection">
|
|
<area shape="circle" coords="19,19,19" href="?pg=site406">
|
|
<area shape="circle" coords="169,19,19" href="?pg=site406_2">
|
|
<area shape="circle" coords="319,19,19" href="?pg=site406_3">
|
|
<area shape="circle" coords="469,19,19" href="?pg=site406_4">
|
|
</map>
|
|
</div>
|
|
|
|
<table WIDTH="100%" class="tag">
|
|
<TR>
|
|
<TD class="label">Typ pompy </TD>
|
|
<TD class="label">Numer pompy</TD>
|
|
<TD class="label">Status pompy <a style="text-decoration: none;" href="./?pg=site406_5&s=stu"><img src="./images/sort_up.png" ></a> <a style="text-decoration: none;" href="./?pg=site406_5&s=std"><img src="./images/sort_down.png"></a></td>
|
|
<TD class="label">Typ silnika</TD>
|
|
<TD class="label">Numer silnika</TD>
|
|
<td class="label">Q<sub>SZ</sub> [m<sup>3</sup>/min]</td>
|
|
<td class="label">~H [m] <a style="text-decoration: none;" href="./?pg=site406_5&s=hu"><img src="./images/sort_up.png" ></a> <a style="text-decoration: none;" href="./?pg=site406_5&s=hd"><img src="./images/sort_down.png"></a></td>
|
|
<td class="label">~η <a style="text-decoration: none;" href="./?pg=site406_5&s=eu"><img src="./images/sort_up.png" ></a> <a style="text-decoration: none;" href="./?pg=site406_5&s=ed"><img src="./images/sort_down.png"></a></td>
|
|
<td class="label">Moc silnika [kW] <a style="text-decoration: none;" href="./?pg=site406_5&s=su"><img src="./images/sort_up.png" ></a> <a style="text-decoration: none;" href="./?pg=site406_5&s=sd"><img src="./images/sort_down.png"></a></td>
|
|
</TR>
|
|
|
|
<?php
|
|
for($i=0; $i<count($resArray); $i++)
|
|
{
|
|
echo"
|
|
<TR STYLE='cursor: pointer;' onclick=".chr(34)."document.location.href='?pg=site406charts&t=".$resArray[$i]['tst']."&q=".$resArray[$i]['qsz']."'".chr(34).">
|
|
<TD class='field_center'>".$resArray[$i]['popma']."</TD>
|
|
<TD class='field_center'>".$resArray[$i]['nrpompy']."</TD>
|
|
<TD class='field_center'>".$resArray[$i]['pupStatus']."</TD>
|
|
<TD class='field_center'>".$resArray[$i]['silnik']."</TD>
|
|
<TD class='field_center'>".$resArray[$i]['nrsilnika']."</TD>
|
|
<TD class='field_center'>".$resArray[$i]['qsz']/60 ."</TD>
|
|
<TD class='field_center'>".$resArray[$i]['hpod']."</TD>
|
|
<TD class='field_center'>".$resArray[$i]['eta']."</TD>
|
|
<TD class='field_center'>".$resArray[$i]['mocsilnika']."</TD>
|
|
</TR>
|
|
";
|
|
$rec_count++;
|
|
}
|
|
?>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
if ($rec_count>0)
|
|
{
|
|
echo"
|
|
<div class='footer_selection_info'>
|
|
Dla wybranego agregatu należy sprawdzić:<br/>
|
|
- długość kabla zasilającego L<sub>K</sub> <br/>
|
|
- średnicę studni D<sub>ST</sub> <br/>
|
|
- średnicę agregatu D<sub>A</sub> <br/>
|
|
- głębokość położenia filtrów studni L<sub>F</sub> <br/>
|
|
</div>
|
|
";
|
|
}
|
|
else if ($rec_count==0 && empty($_POST['subStep5']))
|
|
{
|
|
echo"
|
|
<div class='footer_selection_alert'>
|
|
Brak przesortowanych agregatów na zadane parametry <br/><br/>
|
|
Czy chcesz wyświetlić przesortowane agregaty dla przedziału wydajności Qsz?
|
|
</div>
|
|
";
|
|
}
|
|
else if ($rec_count==0 && !empty($_POST['subStep5']))
|
|
{
|
|
echo"
|
|
<div class='footer_selection_alert'>
|
|
Brak przesortowanych agregatów dla przedziałów wydajności Qsz<br/><br/>
|
|
Czy chcesz wyświetlić wyszukiwarkę agregatów z katalogu?
|
|
</div>
|
|
";
|
|
}
|
|
?>
|
|
|
|
<?php
|
|
if ($rec_count==0 && empty($_POST['subStep5']))
|
|
echo"
|
|
<div class=tag_buttons>
|
|
<INPUT class='btn btn-success btn-sm' TYPE='submit' name='subStep5' VALUE='Wyświetl'>
|
|
</div>
|
|
";
|
|
else if ($rec_count==0 && !empty($_POST['subStep5']))
|
|
echo"
|
|
</form><form action='./?pg=site201' method='post'>
|
|
<div class=tag_buttons>
|
|
<input type='hidden' name='inQpump' value='".$_SESSION['inNewQ']."'>
|
|
<INPUT class='btn btn-success btn-sm' TYPE='submit' name='subStep5' VALUE='Wyświetl'>
|
|
</div>
|
|
";
|
|
?>
|
|
|
|
|
|
</div>
|
|
</form>
|
|
|
|
|
|
<div class="tag50_left">
|
|
<div class="tag_buttons" style="text-align: left;">
|
|
<button type="button" class="btn btn-default btn-sm" onclick="window.print();">Drukuj</button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<?php
|
|
}
|
|
else showFooterWarningAccessNotification($lab_FooterWarningAccessNotification_001);
|
|
?>
|