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

137 lines
9.6 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
if (!empty($_SESSION['site807']))
{
?>
<?php
// aktualizacja skrzynki pocztowej
if (!empty($_POST['inMailName']) && $_POST['subMailSave']==$lab_ButtonName_Update)
{
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inMailName']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() WHERE SSP_NAME='MAIL'");
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inMailNameDesc']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() WHERE SSP_NAME='MAIL_NAME'");
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inMailSMTP']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() WHERE SSP_NAME='SMTP_SERVER'");
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inMailSMTPort']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() WHERE SSP_NAME='SMTP_PORT'");
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inMailSMTPuser']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() WHERE SSP_NAME='SMTP_USERNAME'");
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inMailSMTPass']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() WHERE SSP_NAME='SMTP_PASSWORD'");
echo"<div class='actionOK'>$lab_UpdateRecordNotification_001</div>";
}
// aktualizacja numeru stacji bazowej
if (!empty($_POST['inBaseNo']) && $_POST['subBaseSave']==$lab_ButtonName_Update)
{
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inBaseNo']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() WHERE SSP_NAME='NR_BASE_STATION'");
echo"<div class='actionOK'>$lab_UpdateRecordNotification_001</div>";
}
// aktualizacja parametrów dla urządzenia sterowanego SMS
if (!empty($_POST['inGSMno']) && $_POST['subGSMSave']==$lab_ButtonName_Update)
{
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inGSMno']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() where SSP_NAME='MOBILE' and SSP_PARAM2='EQUIPMENTS' and SSP_PARAM1=".$_POST['dev']);
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inMailNotif']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() where SSP_NAME='ALARM_MAIL' and SSP_PARAM2='EQUIPMENTS' and SSP_PARAM1=".$_POST['dev']);
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inPhoneNotif']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() where SSP_NAME='ALARM_PHONE' and SSP_PARAM2='EQUIPMENTS' and SSP_PARAM1=".$_POST['dev']);
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inGSMdrs']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() where SSP_NAME='DEVICE' and SSP_PARAM2='EQUIPMENTS' and SSP_PARAM1=".$_POST['dev']);
mysql_query("UPDATE sys_setup_parameters SET SSP_VALUE='".$_POST['inGSMrefresh']."',SSP_AUDIT_CU='".$_SESSION['user']."',SSP_AUDIT_CD=now() where SSP_NAME='REFRESH' and SSP_PARAM2='EQUIPMENTS' and SSP_PARAM1=".$_POST['dev']);
echo"<div class='actionOK'>$lab_UpdateRecordNotification_001</div>";
}
//aktualizacja liczników dla zleceń
if ($_POST['subOrdersSave']==$lab_ButtonName_Update && $_POST['formenc']==md5($_POST['dep']))
{
mysql_query("DELETE FROM seg_order_no_counters WHERE ONC_PLC='".$_POST['dep']."'");
mysql_query("INSERT INTO seg_order_no_counters SET ONC_SCOPE='',ONC_VALUE=".getFloatValue($_POST['inPumpAggZWW']).",ONC_YEAR='".date('Y')."',ONC_PLC='".$_POST['dep']."'");
mysql_query("INSERT INTO seg_order_no_counters SET ONC_SCOPE='U ',ONC_VALUE=".getFloatValue($_POST['inPumpUS']).",ONC_YEAR='".date('Y')."',ONC_PLC='".$_POST['dep']."'");
mysql_query("INSERT INTO seg_order_no_counters SET ONC_SCOPE='C ',ONC_VALUE=".getFloatValue($_POST['inPumpCS']).",ONC_YEAR='".date('Y')."',ONC_PLC='".$_POST['dep']."'");
mysql_query("INSERT INTO seg_order_no_counters SET ONC_SCOPE='R ',ONC_VALUE=".getFloatValue($_POST['inPumpCR']).",ONC_YEAR='".date('Y')."',ONC_PLC='".$_POST['dep']."'");
mysql_query("INSERT INTO seg_order_no_counters SET ONC_SCOPE='I ',ONC_VALUE=".getFloatValue($_POST['inPumpCI']).",ONC_YEAR='".date('Y')."',ONC_PLC='".$_POST['dep']."'");
mysql_query("INSERT INTO seg_order_no_counters SET ONC_SCOPE='L ',ONC_VALUE=".getFloatValue($_POST['inPumpCL']).",ONC_YEAR='".date('Y')."',ONC_PLC='".$_POST['dep']."'");
mysql_query("INSERT INTO seg_order_no_counters SET ONC_SCOPE='Up ',ONC_VALUE=".getFloatValue($_POST['inPumpUp']).",ONC_YEAR='".date('Y')."',ONC_PLC='".$_POST['dep']."'");
mysql_query("INSERT INTO seg_order_no_counters SET ONC_SCOPE='Cp ',ONC_VALUE=".getFloatValue($_POST['inPumpCp']).",ONC_YEAR='".date('Y')."',ONC_PLC='".$_POST['dep']."'");
mysql_query("INSERT INTO seg_order_no_counters SET ONC_SCOPE='Lp ',ONC_VALUE=".getFloatValue($_POST['inPumpLp']).",ONC_YEAR='".date('Y')."',ONC_PLC='".$_POST['dep']."'");
mysql_query("INSERT INTO seg_order_no_counters SET ONC_SCOPE='Rp ',ONC_VALUE=".getFloatValue($_POST['inPumpRp']).",ONC_YEAR='".date('Y')."',ONC_PLC='".$_POST['dep']."'");
mysql_query("INSERT INTO seg_order_no_counters SET ONC_SCOPE='Ip ',ONC_VALUE=".getFloatValue($_POST['inPumpIp']).",ONC_YEAR='".date('Y')."',ONC_PLC='".$_POST['dep']."'");
unset($_POST['formenc']);
echo"<div class='actionOK'>$lab_UpdateRecordNotification_001</div>";
}
?>
<div class="tag100">
<div class="head_tag"><?php echo $lab_SubMenu_807 ;?></div>
<div class="tag">
<table WIDTH="100%" class="tag">
<tr>
<td class="label"><?php echo $lab_Field_site807_001 ;?></td>
<td class="label"><?php echo $lab_Field_site807_002 ;?></td>
<td class="label"></td>
</tr>
<tr>
<td class='field_left'><?php echo $lab_Field_site807_003 ;?></td>
<td class='field_center'><?php echo sqlStringValue("select SSP_VALUE from sys_setup_parameters where SSP_NAME='MAIL'","SSP_VALUE") ;?></td>
<td CLASS='desc_value' width='5px'><img src='./images/edit.png' title='<?php echo $lab_ButtonName_Modify;?>' style="cursor: pointer;" onclick="document.location.href='?pg=site807mail'"></td>
</tr>
<tr>
<td class='field_left'><?php echo $lab_Field_site807_011 ;?></td>
<td class='field_center'><?php echo sqlStringValue("select SSP_VALUE from sys_setup_parameters where SSP_NAME='NR_BASE_STATION'","SSP_VALUE") ;?></td>
<td CLASS='desc_value' width='5px'><img src='./images/edit.png' title='<?php echo $lab_ButtonName_Modify;?>' style="cursor: pointer;" onclick="document.location.href='?pg=site807base'"></td>
</tr>
<tr>
<td class='field_left'><?php echo $lab_Field_site807_013 ;?></td>
<td class='field_center'><?php echo $lab_Field_site807_014 ;?></td>
<td CLASS='desc_value' width='5px'><img src='./images/edit.png' title='<?php echo $lab_ButtonName_Modify;?>' style="cursor: pointer;" onclick="document.location.href='?pg=site807tree'"></td>
</tr>
<tr>
<td class='field_left'><?php echo $lab_Field_site807_016 ;?></td>
<td class='field_center'><?php echo $lab_SubMenu_810 ;?></td>
<td CLASS='desc_value' width='5px'><img src='./images/edit.png' title='<?php echo $lab_ButtonName_Modify;?>' style="cursor: pointer;" onclick="document.location.href='?pg=site807orders'"></td>
</tr>
<tr>
<td class='field_left'>Przypisanie obiektów do wydziałów / odwodnień – pompy</td>
<td class='field_center'><?php echo sqlValue("select count(*) from seg_dev_resources where DRS_DEV_TYPE=10"); ?> szt.</td>
<td CLASS='desc_value' width='5px'><img src='./images/edit.png' title='<?php echo $lab_ButtonName_Modify;?>' style="cursor: pointer;" onclick="document.location.href='?pg=site807objdep&obj=10'"></td>
</tr>
<tr>
<td class='field_left'>Przypisanie obiektów do wydziałów / odwodnień – silniki</td>
<td class='field_center'><?php echo sqlValue("select count(*) from seg_dev_resources where DRS_DEV_TYPE=11"); ?> szt.</td>
<td CLASS='desc_value' width='5px'><img src='./images/edit.png' title='<?php echo $lab_ButtonName_Modify;?>' style="cursor: pointer;" onclick="document.location.href='?pg=site807objdep&obj=11'"></td>
</tr>
<tr>
<td class='field_left'>Przypisanie obiektów do wydziałów / odwodnień – studnie</td>
<td class='field_center'><?php echo sqlValue("select count(*) from seg_dev_resources where DRS_DEV_TYPE=12"); ?> szt.</td>
<td CLASS='desc_value' width='5px'><img src='./images/edit.png' title='<?php echo $lab_ButtonName_Modify;?>' style="cursor: pointer;" onclick="document.location.href='?pg=site807objdep&obj=12'"></td>
</tr>
<tr>
<td class='field_left'>Przypisanie obiektów do wydziałów / odwodnień – piezometry</td>
<td class='field_center'><?php echo sqlValue("select count(*) from seg_dev_resources where DRS_DEV_TYPE=601"); ?> szt.</td>
<td CLASS='desc_value' width='5px'><img src='./images/edit.png' title='<?php echo $lab_ButtonName_Modify;?>' style="cursor: pointer;" onclick="document.location.href='?pg=site807objdep&obj=601'"></td>
</tr>
</table>
</div>
</div>
<?php
}
else showFooterWarningAccessNotification($lab_FooterWarningAccessNotification_001);
?>