84 lines
5.6 KiB
PHP
84 lines
5.6 KiB
PHP
<?php
|
|
if (!empty($_SESSION['site810_edit']))
|
|
{
|
|
?>
|
|
|
|
<?php
|
|
// lista agregatow pobierana przed naglowkiem - naglowek pokazuje liczbe dostepnych pozycji
|
|
if ($_SESSION['syndis_eq_stock']=='P/Bełchatów')
|
|
$dep = 1;
|
|
elseif ($_SESSION['syndis_eq_stock']=='P/Szczerców')
|
|
$dep = 3;
|
|
elseif ($_SESSION['syndis_eq_stock']=='Dębina')
|
|
$dep = 2;
|
|
|
|
$_SESSION['site810_newAgg_array'] = sqlGetResAsArray("select (select DRS_ID from seg_pumps,seg_dev_resources where PUP_ID=DRS_DEV_ID and DRS_DEV_TYPE=10 and PUP_NAME=stp_stapo_typ_p and DRS_SN_NUMBER=stp_stapo_nr_p limit 1) PUP_DRS_ID,stp_stapo_typ_p PUP_NAME,stp_stapo_nr_p PUP_SN_NO,(select PUP_Q_N from seg_pumps,seg_dev_resources where PUP_ID=DRS_DEV_ID and DRS_DEV_TYPE=10 and PUP_NAME=stp_stapo_typ_p and DRS_SN_NUMBER=stp_stapo_nr_p limit 1) PUP_Q_N,(select PUP_H_P from seg_pumps,seg_dev_resources where PUP_ID=DRS_DEV_ID and DRS_DEV_TYPE=10 and PUP_NAME=stp_stapo_typ_p and DRS_SN_NUMBER=stp_stapo_nr_p limit 1) PUP_H_P,(select DRS_ID from seg_engines,seg_dev_resources where ENG_ID=DRS_DEV_ID and DRS_DEV_TYPE=11 and ENG_NAME=stp_stamot_typ_m and DRS_SN_NUMBER=stp_stamot_nr_m LIMIT 1) ENG_DRS_ID,stp_stamot_typ_m ENG_NAME,stp_stamot_nr_m ENG_SN_NO,(select ENG_VOLTAGE from seg_engines,seg_dev_resources where ENG_ID=DRS_DEV_ID and DRS_DEV_TYPE=11 and ENG_NAME=stp_stamot_typ_m and DRS_SN_NUMBER=stp_stamot_nr_m LIMIT 1) ENG_VOLTAGE,(select ENG_POWER from seg_engines,seg_dev_resources where ENG_ID=DRS_DEV_ID and DRS_DEV_TYPE=11 and ENG_NAME=stp_stamot_typ_m and DRS_SN_NUMBER=stp_stamot_nr_m LIMIT 1) ENG_POWER,stp_stakabel_typ ECB_TYP,(select stp_stakabel_dl_ilosc from stp_stakabel_dl where stp_stamot_typ_m=stp_stakabel_dl_typ and stp_stamot_nr_m=stp_stakabel_dl_nr and stp_stamot_u=stp_stakabel_dl_u limit 1) ECB_DLUGOSC,stp_stakabel_g_ozn_1 ECB_OZNAK_01,stp_stakabel_g_ozn_2 ECB_OZNAK_02 from stp_stapo left join stp_status on stp_status_id_s=stp_stapo_stat_id left join stp_uzytkownik on stp_uzytkownik_id_u=stp_stapo_user_id left join stp_stamot on stp_stamot_id_m=stp_stapo_sil_id left join stp_stakabel_g on stp_stakabel_g_kab_id=stp_stamot_kabel_id left join stp_stakabel on stp_stakabel_id_k=stp_stakabel_g_typ_id where stp_stapo_stat_id=1 and stp_stapo_user_id=".$dep." order by PUP_NAME,ENG_NAME");
|
|
?>
|
|
|
|
<div class="tag100">
|
|
<div class="head_tag"><?php echo $lab_Field_site810_044." (".count($_SESSION['site810_newAgg_array']).")" ;?></div>
|
|
<div class="tag">
|
|
<table WIDTH="100%" class="tag">
|
|
<TR>
|
|
<TD class="label"><?php echo $lab_Field_Lp ;?></TD>
|
|
<TD class="label"><?php echo $lab_Field_site203_001 ;?></TD>
|
|
<TD class="label"><?php echo $lab_Field_site303_001 ;?></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_site206_001 ;?></td>
|
|
<td class="label"><?php echo $lab_Field_site303_017 ;?></td>
|
|
|
|
|
|
</TR>
|
|
|
|
<?php
|
|
|
|
// dobor oddzialu i pobranie listy przeniesione nad naglowek [site810A_pupex]
|
|
|
|
//$_SESSION['site810_newAgg_array'] = sqlGetResAsArray("select PUP_DRS_ID,PUP_NAME,PUP_SN_NO,PUP_Q_N,PUP_H_P,ENG_DRS_ID,ENG_NAME,ENG_SN_NO,ENG_VOLTAGE,ENG_POWER,ECB_TYP,ECB_DLUGOSC,ECB_OZNAK_01,ECB_OZNAK_02 from rep_aggregate_departments where PUP_DEPARTMENT='".$_SESSION['syndis_eq_stock']."' and PUP_DRS_ID is not null and ENG_DRS_ID is not null order by PUP_NAME,ENG_NAME");
|
|
|
|
|
|
//print_r($_SESSION['site810_newAgg_array']);
|
|
|
|
for($i=0;$i<count($_SESSION['site810_newAgg_array']); $i++)
|
|
{
|
|
if (isset($_GET['ord']) && $_GET['ord']>0)
|
|
echo "<TR STYLE='cursor: pointer;' onclick=".chr(34)."document.location.href='./?pg=site810E&ord=".$_GET['ord']."&agg=".$i."'".chr(34).">";
|
|
else
|
|
echo "<TR STYLE='cursor: pointer;' onclick=".chr(34)."document.location.href='./?pg=site810A_3&agg=".$i."'".chr(34).">";
|
|
|
|
echo"
|
|
<TD class='field_center'>".($i+1)."</TD>
|
|
<TD class='field_left'>".$_SESSION['site810_newAgg_array'][$i]['PUP_NAME']."</TD>
|
|
<TD class='field_left'>".$_SESSION['site810_newAgg_array'][$i]['PUP_SN_NO']."</TD>
|
|
<TD class='field_left'>".$_SESSION['site810_newAgg_array'][$i]['ENG_NAME']."</TD>
|
|
<TD class='field_left'>".$_SESSION['site810_newAgg_array'][$i]['ENG_SN_NO']."</TD>
|
|
<TD class='field_right'>".$_SESSION['site810_newAgg_array'][$i]['ENG_VOLTAGE']."</TD>
|
|
<TD class='field_right'>".$_SESSION['site810_newAgg_array'][$i]['ENG_POWER']."</TD>
|
|
<TD class='field_center'>".$_SESSION['site810_newAgg_array'][$i]['ECB_TYP']."</TD>
|
|
<TD class='field_right'>".$_SESSION['site810_newAgg_array'][$i]['ECB_DLUGOSC']."</TD>
|
|
</TR>
|
|
";
|
|
}
|
|
?>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
<div class="tag_buttons">
|
|
<?php if ($_GET['ord']>0): ?>
|
|
<a class='btn btn-info btn-sm' href="?pg=site810E&ord=<?php echo $_GET['ord'];?>" role="button" style="text-decoration: none;"><?php echo $lab_ButtonName_Cancel; ?></a>
|
|
<?php else: ?>
|
|
<a class='btn btn-info btn-sm' href="?pg=site810A_3" role="button" style="text-decoration: none;"><?php echo $lab_ButtonName_Cancel; ?></a>
|
|
<?php endif; ?>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<?php
|
|
}
|
|
else showFooterWarningAccessNotification($lab_FooterWarningAccessNotification_001);
|
|
?>
|