Initial commit
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
<?php
|
||||
if (!empty($_SESSION['site303']))
|
||||
{
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="tag100">
|
||||
<div class="head_tag"><?php echo $lab_Tag_site304_001 ;?></div>
|
||||
<div class="tag">
|
||||
<table WIDTH="100%" class="tag">
|
||||
<TR>
|
||||
<TD class="label">Lp.</TD>
|
||||
<TD class="label"><?php echo $lab_Field_site204_001 ;?></TD>
|
||||
<TD class="label"><?php echo $lab_Field_site303_001 ;?></TD>
|
||||
<TD class="label"><?php echo $lab_Field_site204_002 ;?></TD>
|
||||
<TD class="label"><?php echo $lab_Field_site204_003 ;?></TD>
|
||||
<TD class="label"><?php echo $lab_Field_site203_022 ;?></TD>
|
||||
<TD class="label"><?php echo $lab_Field_site303_004 ;?></TD>
|
||||
|
||||
|
||||
</TR>
|
||||
|
||||
<?php
|
||||
|
||||
if (isset($_GET['eng']) && $_GET['eng']>0)
|
||||
{
|
||||
unset($eng_array);
|
||||
//$eng_array = sqlGetResAsArray("select * from seg_dev_resources,seg_engines where DRS_DEV_TYPE=11 and DRS_DEV_ID=ENG_ID and DRS_ID in (select DRS_ID from seg_dev_resources,seg_engines where DRS_DEV_TYPE=11 and DRS_DEV_ID=ENG_ID and DRS_DEPARTMENT='".$_SESSION['syndis_eq_stock']."' and ENG_ID=".$_GET['eng']." and (DRS_RESOURCES_DIC_ID in (1,2,3,707) or (DRS_RESOURCES_DIC_ID=40 and DRS_DEV_ATTENTION='1524')) union select RWS_ENG_DRS_ID DRS_ID from seg_wellsink_pump_eng_rel,seg_dev_resources left join seg_engines on DRS_DEV_TYPE=11 and DRS_DEV_ID=ENG_ID where RWS_ENG_DRS_ID=DRS_ID and DRS_DEPARTMENT='".$_SESSION['syndis_eq_stock']."' and ENG_ID=".$_GET['eng'].") order by DRS_SN_NUMBER,ENG_POWER");
|
||||
$eng_array = sqlGetResAsArray("select * from seg_engines,seg_dev_resources where DRS_DEV_TYPE=11 and DRS_DEV_ID=ENG_ID and ENG_ID=".$_GET['eng']." and (DRS_RESOURCES_DIC_ID in (1,2,3,707) or (DRS_RESOURCES_DIC_ID=40 and DRS_DEV_ATTENTION in ('1401','1524'))) and DRS_DEPARTMENT='".$_SESSION['syndis_eq_stock']."' order by DRS_SN_NUMBER");
|
||||
}
|
||||
// $eng_array = sqlGetResAsArray("select DRS_ID,DRS_SN_NUMBER,DRS_STATUS_DIC_ID,DRS_RESOURCES_DIC_ID,ENG_ID,ENG_NAME,ENG_VOLTAGE,ENG_POWER,(select WLL_NAME from seg_wells where WLL_ID=(select RWL_WLL_ID from seg_well_pump_eng_rel where RWL_ENG_DRS_ID=DRS_ID limit 1)) WLL_NAME from seg_dev_resources left join seg_engines on DRS_DEV_ID=ENG_ID and DRS_DEV_TYPE=11 where DRS_DEPARTMENT = '".$_SESSION['syndis_eq_stock']."' and DRS_STATUS_DIC_ID in (6,7,8,30) and ENG_ID=".$_GET['eng']);
|
||||
// $eng_array = sqlGetResAsArray("select DRS_ID,DRS_SN_NUMBER,DRS_STATUS_DIC_ID,DRS_RESOURCES_DIC_ID,ENG_ID,ENG_NAME,ENG_VOLTAGE,ENG_POWER,(select WLL_NAME from seg_wells where WLL_ID=(select RWL_WLL_ID from seg_well_pump_eng_rel where RWL_ENG_DRS_ID=DRS_ID limit 1)) WLL_NAME from seg_dev_resources left join seg_engines on DRS_DEV_ID=ENG_ID and DRS_DEV_TYPE=11 where DRS_DEPARTMENT = '".$_SESSION['syndis_eq_stock']."' and ENG_ID=".$_GET['eng']);
|
||||
//$eng_array = sqlGetResAsArray("select DRS_ID,DRS_SN_NUMBER,DRS_STATUS_DIC_ID,DRS_RESOURCES_DIC_ID,ENG_ID,ENG_NAME,ENG_VOLTAGE,ENG_POWER,(select WLL_NAME from seg_wells where WLL_ID=(select RWL_WLL_ID from seg_well_pump_eng_rel where RWL_ENG_DRS_ID=DRS_ID limit 1)) WLL_NAME from seg_dev_resources left join seg_engines on DRS_DEV_ID=ENG_ID and DRS_DEV_TYPE=11 where DRS_RESOURCES_DIC_ID in (1,2,3,40,707) and DRS_DEPARTMENT = '".$_SESSION['syndis_eq_stock']."' and ENG_ID=".$_GET['eng']);
|
||||
|
||||
for($i=0;$i<count($eng_array);$i++)
|
||||
{
|
||||
unset($wellInfo); unset($engStatus); unset($pumpWellSink);
|
||||
|
||||
$wellInfo = sqlGetResAsArray("select * from seg_well_pump_eng_rel,seg_wells where RWL_WLL_ID=WLL_ID and RWL_ENG_DRS_ID=".$eng_array[$i]['DRS_ID']);
|
||||
|
||||
if ($eng_array[$i]['DRS_RESOURCES_DIC_ID']==1) $engStatus = 'Nowe';
|
||||
elseif ($eng_array[$i]['DRS_RESOURCES_DIC_ID']==2) $engStatus = 'Rezerwa';
|
||||
elseif ($eng_array[$i]['DRS_RESOURCES_DIC_ID']==707) $engStatus = 'Remont';
|
||||
elseif ($eng_array[$i]['DRS_RESOURCES_DIC_ID']==3 && count($wellInfo)>0) $engStatus = 'Eksploatacja SPM';
|
||||
elseif ($eng_array[$i]['DRS_RESOURCES_DIC_ID']==3 && count($wellInfo)==0) $engStatus = 'Bestgum';
|
||||
elseif ($eng_array[$i]['DRS_RESOURCES_DIC_ID']==40 && $eng_array[$i]['DRS_DEV_ATTENTION']=='1524') $engStatus = 'Kasacja [w likwidacji]';
|
||||
|
||||
|
||||
$pumpWellSink = sqlGetResAsArray("select * from seg_wellsink_pump_eng_rel,seg_wells where WLL_ID=RWS_WLL_ID and RWS_ENG_DRS_ID=".$eng_array[$i]['DRS_ID']);
|
||||
if (count($pumpWellSink)>0)
|
||||
{
|
||||
$wellInfo[0]['WLL_NAME'] = 'Zatopiony w '.$pumpWellSink[0]['WLL_NAME'];
|
||||
$engStatus = 'Kasacja [zatopione]';
|
||||
}
|
||||
|
||||
echo"
|
||||
<tr STYLE='cursor: pointer;' onclick=".chr(34)."document.location.href='./?pg=site304inf&dev=".$eng_array[$i]['DRS_ID']."&eb=".$_GET['eng']."'".chr(34).">
|
||||
<td class='field_left'>".($i+1)."</td>
|
||||
<td class='field_left'>".$eng_array[$i]['ENG_NAME']."</td>
|
||||
<td class='field_center'>".$eng_array[$i]['DRS_SN_NUMBER']."</td>
|
||||
<td class='field_right'>".$eng_array[$i]['ENG_VOLTAGE']."</td>
|
||||
<td class='field_right'>".$eng_array[$i]['ENG_POWER']."</td>
|
||||
<td class='field_center'>".$wellInfo[0]['WLL_NAME']."</td>
|
||||
<td class='field_center'>".$engStatus."</td>
|
||||
</tr>
|
||||
";
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<table style="width:100%; background-color: #f5f5f5">
|
||||
<tr>
|
||||
<td style="width: 25%; text-align: left;"><span class="resume">Wyników: <?php echo count($eng_array); ?></span></td>
|
||||
<td style="width: 50%; text-align: center;">
|
||||
</td>
|
||||
<td style="width: 25%; text-align: right;">
|
||||
<!-- <a href="./export/site304list_xls.php" target="_blank" title="Export do EXCEL"><img src="./images/excel_ico.png" style="max-width: 20px; border: 0;"></a> -->
|
||||
<!-- <a href="./export/site304list_print.php" target="_blank" title="Wydruk"><img src="./images/printer-icon.png" style="max-width: 20px; border: 0;"></a> -->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<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>
|
||||
|
||||
<div class="tag50_right">
|
||||
<div class=tag_buttons>
|
||||
<a href='./?pg=site304'> <INPUT class='btn btn-info btn-sm' TYPE='BUTTON' VALUE='<?php echo $lab_ButtonName_Back; ?>'></A>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
else showFooterWarningAccessNotification($lab_FooterWarningAccessNotification_001);
|
||||
?>
|
||||
Reference in New Issue
Block a user