Files
2026-09-03 11:24:19 +02:00

98 lines
3.1 KiB
PHP

<?php
if (!empty($_SESSION['site401']))
{
?>
<?php
if (empty($_SESSION['well_details']))
header("Location: ./?pg=site401");
?>
<?php
//$hp = pp - HH;
//if (!empty($_GET['hp'])) $hp = $_GET['hp'];
unset($lift401Array);
$lift401Array = sqlGetResAsArray("select RHD_Q_VAL,RHD_HD_VAL,RHD_P1_VAL,RHD_P2_VAL,RHD_PP_VAL,RHD_HH_VAL,RHD_PE_VAL,RHD_DGN_VAL,RHD_DATE from rep_his_data_everyday where RHD_ID=(select max(RHD_ID) from rep_his_data_everyday where RHD_DRS_ID=".$_GET['d'].")");
$hp = (float) round(($lift401Array[0]['RHD_PP_VAL']-$lift401Array[0]['RHD_HH_VAL']),2);
if ($_GET['d']>0)
{
// Wysokość podnoszenia
// =======================================================================================//
unset($scope);
unset($dataP);
unset($dataH);
$wynik = mysql_query("select PEP_X_PARAM from seg_pump_eng_param where PEP_TYPE='H' and PEP_PUP_ID=".$_SESSION['well_details']['pumpID']." order by PEP_X_PARAM");
if($wynik)while ($r = mysql_fetch_array($wynik))
{
$dataP[] = (float) $r["PEP_X_PARAM"];
}
$wynik = mysql_query("select TSD_VAL_04/60 PEP_X_PARAM, TSD_VAL_08 PEP_Y_PARAM from tst_tests left join tst_test_details on TSD_TST_ID=TST_ID where TST_ID=".$_GET['t']." order by TSD_MSR_STEP");
if($wynik)while ($r = mysql_fetch_array($wynik))
{
$dataH[] = array(
$r["PEP_X_PARAM"]*60,
$r["PEP_Y_PARAM"]
);
}
$fileName_new=createChartFileNamePng("site401lift");
if ($_GET['d']>0 && $_GET['t']>0 && count($dataH)>1)
{
include("./polynomial/hpCharts.php");
createLiftChart($dataP, $dataH, $lift401Array[0]['RHD_Q_VAL'], $fileName_new, 969, 600, 20, 15, 1, $hp);
}
unset($newParam);
// =======================================================================================//
}
?>
<div class="tag100">
<div class="head_tag">Wysokość podnoszenia dla studni <?php echo $_SESSION['well_details']['wellName']; ?> </div>
<div class="tag">
<table WIDTH="100%" class="tag">
<TR>
<TD class="desc"><?php echo $lab_Field_site201_004a;?></TD>
<TD CLASS="desc_value"><?php echo str_replace('.',',',round($lift401Array[0]['RHD_Q_VAL']/60,3)); ?></TD>
<TD class="desc">Wysokość podnoszenia [m]</TD>
<TD CLASS="desc_value"><?php echo str_replace('.',',',$hp); ?></TD>
</TR>
</table>
</div>
<div class="tag">
<img SRC='<?php echo $fileName_new; ?>' >
</div>
</div>
<div class="tag100">
<div class="tag_buttons">
<INPUT class='btn btn-info btn-sm' TYPE="button" VALUE="Cofnij" onclick="window.history.back()">
<INPUT class='btn btn-success btn-sm' TYPE="button" VALUE="Drukuj" onclick="window.print()">
</div>
</div>
<?php
unset($lift401Array);
?>
<?php
}
else showFooterWarningAccessNotification($lab_FooterWarningAccessNotification_001);
?>