Initial commit

This commit is contained in:
2026-09-03 11:24:19 +02:00
commit 6ed3153f36
1897 changed files with 538007 additions and 0 deletions
+133
View File
@@ -0,0 +1,133 @@
<?php
if (!empty($_SESSION['site402']))
{
?>
<?php
//paginacja
if (!$_GET['pgn']) {$_GET['pgn']=1; delSearchSessionData(); }
if ($_POST['sub_search']=='Szukaj') $_SESSION['site302_input'] = $_POST['sr_well'];
?>
<form action="./?pg=site402" method="post">
<div class="tag100">
<table>
<tr>
<td>Zbiornik:</td>
<td style="width: 10px;"></td>
<td><input type="text" name="sr_well" value="<?php echo $_SESSION['site302_input'];?>"></td>
<td style="width: 10px;"></td>
<td><input type="submit" name="sub_search" value="Szukaj" class="btn btn-default btn-sm"></td>
<td></td>
</tr>
<tr><td>&nbsp;</td></tr>
<tr>
<td colspan="3">
<?php
if (!empty($_POST['sr_all'])) echo"<input type='checkbox' name='sr_all' value='1' checked>";
else echo"<input type='checkbox' name='sr_all' value='1'>&nbsp;";
echo $lab_Field_site203_022;
?>
</td>
</tr>
</table>
</div>
</form>
<div class="tag100">
<div class="head_tag"><?php echo $lab_Tag_site302_001 ;?></div>
<div class="tag">
<table WIDTH="100%" class="tag">
<TR>
<TD class="label">Lp.</TD>
<TD class="label"><?php echo $lab_Field_site302_001 ;?></TD>
<TD class="label"><?php echo $lab_Field_site302_002 ;?></TD>
<TD class="label"><?php echo $lab_Field_site302_003 ;?></TD>
<TD class="label"><?php echo $lab_Field_site302_006 ;?></TD>
</TR>
<?php
if (empty($_SESSION['site302_array']) || $_POST['sub_search']=='Szukaj')
{
if (!empty($_POST['sr_well']))
{
$query="select SRP_ID,SRP_NAME,DRS_BUY_DATE,DRS_STATUS_DIC_ID, MCF_NAME,DRS_ID from seg_dev_resources,seg_reservoirs_piezometers left join seg_manufacturers on SRP_MCF_ID=MCF_ID where DRS_DEV_TYPE=600 and DRS_DEV_ID=SRP_ID and SRP_NAME like '%".$_POST['sr_well']."%'";
$query.=" and DRS_STATUS_DIC_ID=7";
$query .= " order by SRP_NAME";
if (empty($_POST['sr_all'])) $query .= " limit 50";
}
else
{
$query="select SRP_ID,SRP_NAME,DRS_BUY_DATE,DRS_STATUS_DIC_ID, MCF_NAME,DRS_ID from seg_dev_resources,seg_reservoirs_piezometers left join seg_manufacturers on SRP_MCF_ID=MCF_ID where DRS_DEV_TYPE=600 and DRS_DEV_ID=SRP_ID";
$query.=" and DRS_STATUS_DIC_ID=7";
$query .= " order by SRP_NAME";
if (empty($_POST['sr_all'])) $query .= " limit 50";
}
$res=null;
$wynik = mysql_query($query);
if($wynik)while ($r = mysql_fetch_array($wynik))
{
$res[]=array(
'devID' => $r["DRS_ID"],
'resID' => $r["SRP_ID"],
'resName'=> $r["SRP_NAME"],
'mcfName' => $r["MCF_NAME"],
'buyDate' => $r["DRS_BUY_DATE"],
'wtrLevel'=> getLastValueFromDevResourceDetail('RESERVOIR_PIEZOMETER_PARAMETERS','WATER_LEVEL',$r["DRS_ID"])
);
}
unset($_SESSION['site302_array']);
$_SESSION['site302_array']=$res;
}
$start=($_GET['pgn']-1)*20;
$stop = $_GET['pgn']*20;
if ($stop>count($_SESSION['site302_array'])) $stop=count($_SESSION['site302_array']);
for($i=$start;$i<$stop;$i++)
{
echo"
<TR STYLE='cursor: pointer;' onclick=".chr(34)."document.location.href='?pg=site402inf&dev=".$_SESSION['site302_array'][$i]['devID']."'".chr(34).">
<TD class='field_left'>".($i+1).".</TD>
<TD class='field_left'>".$_SESSION['site302_array'][$i]['resName']."</TD>
<TD class='field_center'>".$_SESSION['site302_array'][$i]['mcfName']."</TD>
<TD class='field_center'>".$_SESSION['site302_array'][$i]['buyDate']."</TD>
<TD class='field_center'>".$_SESSION['site302_array'][$i]['wtrLevel']."</TD>
</TR>
";
}
?>
</table>
<table style="width:100%; background-color: #f5f5f5">
<tr>
<td style="width: 25%; text-align: left;"><span class="resume"><?php echo $lab_NumberResults_001.": ".count($_SESSION['site302_array']); ?></span></td>
<td style="width: 50%; text-align: center;">
<?php
if (count($_SESSION['site302_array'])>20)
echo pagination_grid('?pg=site402', $_GET['pgn'], count($_SESSION['site302_array']));
?>
</td>
<td style="width: 25%; text-align: right;">
<a href="/export/site402_xls.php" title="Export do EXCEL"><img src="/images/excel_ico.png" style="max-width: 20px; border: 0;"></a>&nbsp;
<a href="/export/site402_print.php" target="_blank" title="Wydruk"><img src="/images/printer-icon.png" style="max-width: 20px; border: 0;"></a>&nbsp;
</td>
</tr>
</table>
</div>
</div>
<?php
}
else showFooterWarningAccessNotification($lab_FooterWarningAccessNotification_001);
?>