<?php session_start(); error_reporting(E_ERROR && ~E_NOTICE); require "../include/conf.inc.php"; require "../include/db.inc.php"; function update_history_operation($where, $operation, $table, $id) { global $_SESSION; $H = array(); $H["bho_datetime_d"] = date("Y-m-d H:i:s"); $H["bho_user_c"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["name"] . " (" . $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["user"] . ")"; $H["bho_where_c"] = $where; $H["bho_operation_c"] = $operation; $H["bho_user_k"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]; $H["bho_table_c"] = $table; $H["bho_table_id"] = $id; wpisz($H, "wind_history_operation", array()); } $_POST["e_modify_d"] = date("Y-m-d H:i:s"); update2($_POST, "wind_executive", array(), "e_id_s", $_POST['e_id_s']); update_history_operation('Komornicy', "Zmiana komornika \"" . $_POST["e_name_c"] . "\"", "wind_executive", $_POST['e_id_s']); echo "1";
<?php session_start(); error_reporting(E_ERROR && ~E_NOTICE); require "../include/conf.inc.php"; require "../include/db.inc.php"; function update_history_operation($where, $operation, $table, $id) { global $_SESSION; $H = array(); $H["bho_datetime_d"] = date("Y-m-d H:i:s"); $H["bho_user_c"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["name"] . " (" . $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["user"] . ")"; $H["bho_where_c"] = $where; $H["bho_operation_c"] = $operation; $H["bho_user_k"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]; $H["bho_table_c"] = $table; $H["bho_table_id"] = $id; wpisz($H, "wind_history_operation", array()); } $_POST["e_create_d"] = date("Y-m-d H:i:s"); $_POST["e_u_id_k"] = $_SESSION['fh49ty58u893ytf83902g758902djr4cf302ty5798']['id']; $newid = wpisz($_POST, "wind_executive", array()); if ($newid) { update_history_operation('Komornicy', "Dodanie komornika \"" . $_POST["e_name_c"] . "\"", "wind_executive", $newid); echo "1"; } else { echo "0"; }
} } if ($kwota > 0) { //albo pozostała kwota albo nie było faktur wyszczególnionych, i "jedziemy" jeszcze raz, tylko biorąc wszystkie faktury od najstarszej $FS = $db->GetAll("SELECT frn_id_s FROM wind_frn WHERE frn_case_id_k=" . $_POST['pi_case_id_k'] . " AND frn_amount_left_f > 0 ORDER BY frn_date_d ASC"); foreach ($FS as $_id => $FR) { $frn = $FR['frn_id_s']; $F = $db->GetRow("SELECT * FROM wind_frn WHERE frn_id_s={$frn}"); if ($kwota > 0) { $pozostalo = $kwota - $F['frn_amount_left_f']; if ($pozostalo >= 0) { //spłacone zobowiązanie $db->Execute("UPDATE wind_frn SET frn_amount_left_f=0 WHERE frn_id_s={$frn}"); $db->Execute("INSERT INTO wind_f2p(fp_payin_id_k, fp_frn_id_k, fp_case_id_k, fp_currency_e, fp_amount_f) VALUES({$_piID}, {$frn}, " . $_POST['pi_case_id_k'] . ", '" . $_POST['pi_currency_e'] . "', " . $F['frn_amount_left_f'] . ")"); $kwota = $pozostalo; } else { $left = $F['frn_amount_left_f'] - $kwota; $db->Execute("UPDATE wind_frn SET frn_amount_left_f={$left} WHERE frn_id_s={$frn}"); $db->Execute("INSERT INTO wind_f2p(fp_payin_id_k, fp_frn_id_k, fp_case_id_k, fp_currency_e, fp_amount_f) VALUES({$_piID}, {$frn}, " . $_POST['pi_case_id_k'] . ", '" . $_POST['pi_currency_e'] . "', " . $kwota . ")"); $kwota = 0; } } } } $name = $db->GetOne("SELECT ca_number_c FROM wind_case WHERE ca_id_s=" . $_POST['pi_case_id_k']); update_history_operation("Wpłaty", "Dodanie wpłaty " . number_format($_POST['pi_amount_f'], 2, ".", " ") . " " . $_POST['pi_currency_e'] . " do sprawy o numerze \"" . $name . "\"", "wind_payin", $_piID); update_case_history($_POST['pi_case_id_k'], 0, 'Dodanie wpłaty ' . number_format($_POST['pi_amount_f'], 2, ".", " ") . ' ' . $_POST['pi_currency_e']); echo "1"; } else { echo "0"; }
update_history_operation("Sądy", "Zmiana sądu \"" . $_POST["ct_name_c"] . "\"", "wind_court", $_ctID); $_SESSION['message'][] = "Sąd " . $_POST['ct_name_c'] . " zmieniony"; } else { $_POST["ct_create_d"] = date("Y-m-d H:i:s"); $_POST["ct_u_id_k"] = $_SESSION['fh49ty58u893ytf83902g758902djr4cf302ty5798']['id']; $newid = wpisz($_POST, "wind_court", array("submit_x", "submit_y", "offset")); update_history_operation("Sądy", "Dodanie sądu \"" . $_POST["ct_name_c"] . "\"", "wind_court", $newid); $_SESSION['message'][] = "Sąd " . $_POST['ct_name_c'] . " dodany"; } print "<script>go_to('_court" . ($offset > 0 ? ",o," . $offset : "") . "');</script>"; } if (isset($del_court)) { $name = $db->GetOne("SELECT ct_name_c FROM wind_court WHERE ct_id_s={$del_court}"); $deleting = usun2('wind_court', 'ct_id_s', $del_court); if ($deleting) { update_history_operation("Sądy", "Usunięcie sądu \"{$name}\"", "wind_court", 'NULL'); $_SESSION['message'][] = "Sąd {$name} usunięty"; } else { if ($deleting == -1) { $_SESSION['errors'][] = "Usunięcie sądu {$name} nie powiodło się"; } } print "<script>go_to('_court');</script>"; } if (isset($ctID) && $ctID > 0) { $X = $db->GetRow("SELECT * FROM wind_court WHERE ct_id_s={$ctID}"); $X['ct_name_c'] = stripslashes(htmlspecialchars($X['ct_name_c'])); } ?> <table width='90%' cellpadding=0 cellspacing=0 border=1 bordercolor="#cfcfcf" rules="all"> <form method="post" name="court" action="court">
update_history_operation("Komornicy", "Zmiana komornika \"" . $_POST["e_name_c"] . "\"", "wind_executive", $_eID); $_SESSION['message'][] = "Komornik " . $_POST['e_name_c'] . " zmieniony"; } else { $_POST["e_create_d"] = date("Y-m-d H:i:s"); $_POST["e_u_id_k"] = $_SESSION['fh49ty58u893ytf83902g758902djr4cf302ty5798']['id']; $newid = wpisz($_POST, "wind_executive", array("submit_x", "submit_y", "offset")); update_history_operation("Komornicy", "Dodanie komornika \"" . $_POST["e_name_c"] . "\"", "wind_executive", $newid); $_SESSION['message'][] = "Komornik " . $_POST['e_name_c'] . " dodany"; } print "<script>go_to('_executive" . ($offset > 0 ? ",o," . $offset : "") . "');</script>"; } if (isset($del_executive)) { $name = $db->GetOne("SELECT e_name_c FROM wind_executive WHERE e_id_s={$del_executive}"); $deleting = usun2('wind_executive', 'e_id_s', $del_executive); if ($deleting) { update_history_operation("Komornicy", "Usunięcie komornika \"{$name}\"", "wind_executive", 'NULL'); $_SESSION['message'][] = "Komornik {$name} usunięty"; } else { if ($deleting == -1) { $_SESSION['errors'][] = "Usunięcie komornika {$name} nie powiodło się"; } } print "<script>go_to('_executive');</script>"; } if (isset($eID) && $eID > 0) { $X = $db->GetRow("SELECT * FROM wind_executive WHERE e_id_s={$eID}"); $X['e_name_c'] = stripslashes(htmlspecialchars($X['e_name_c'])); $X['e_shortname_c'] = stripslashes(htmlspecialchars($X['e_shortname_c'])); } ?> <table width='90%' cellpadding=0 cellspacing=0 border=1 bordercolor="#cfcfcf" rules="all">
<table width='90%' cellpadding=0 cellspacing=0 border=1 bordercolor="#cfcfcf" rules="none"> <tr><td><b> Konfiguracja</b></td></tr> </table> <br> <?php if ($submit_x) { $zmiana = false; foreach ($_POST['conf'] as $name => $value) { $val = $db->GetOne("SELECT value" . ($value != '0' && $value != '1' ? '_c' : '') . " FROM wind_config WHERE name='{$name}'"); if ($value != '0' && $value != '1') { $db->Execute("UPDATE wind_config SET value_c='{$value}', value=-1 WHERE name='{$name}'"); } else { $db->Execute("UPDATE wind_config SET value='{$value}' WHERE name='{$name}'"); } if ($val != $value) { update_history_operation("Konfiguracja", "Zmiana wartości konfiguracji \"" . $name . "\" na \"{$value}\"", "wind_config", 'NULL'); $zmiana = true; } if ($zmiana) { $_SESSION['message'][] = "Dane konfiguracyjne zmienione"; } } print "<script>go_to('conf');</script>"; } $X = $db->GetAll("SELECT * FROM wind_config"); $config = array(); foreach ($X as $_id => $C) { if ($C['value'] > -1) { $config[$C['name']] = $C['value']; } else { $config[$C['name']] = $C['value_c'];
$time = mktime(0, 0, 0, $D[2], $D[1] + $_POST['dni'], $D[3]); $_POST['frn_deadline_d'] = date("Y-m-d", $time); } ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})", $_POST['frn_deadline_d'], $D); switch ($_POST['frn_expired_e']) { case '6m': $exp = mktime(0, 0, 0, $D[2] + 6, $D[3], $D[1]); break; case '1r': $exp = mktime(0, 0, 0, $D[2], $D[3], $D[1] + 1); break; case '2r': $exp = mktime(0, 0, 0, $D[2], $D[3], $D[1] + 2); break; case '3r': $exp = mktime(0, 0, 0, $D[2], $D[3], $D[1] + 3); break; case '10r': $exp = mktime(0, 0, 0, $D[2], $D[3], $D[1] + 10); break; } $_POST['frn_expired_d'] = date("Y-m-d", $exp); ereg("([0-9]{2}).([0-9]{2}).([0-9]{4})", $_POST['frn_date_d'], $D); $_POST['frn_date_d'] = $D[3] . '-' . $D[2] . '-' . $D[1]; $_frnID = wpisz($_POST, "wind_frn", array("add_frn", "dni")); if ($_frnID) { update_history_operation("Zobowiązania", "Dodanie zobowiązania \"" . $_POST["frn_number_c"] . "\"", "wind_frn", $_frnID); echo "1"; } else { echo "0"; }
wpisz($H, "wind_history_case", array()); } //wysyłanie maila do pełnomocnika $sprawa = $db->GetRow("SELECT ca_number_c, ca_agent_id_k, ca_debtor_id_k, ca_creditor_id_k FROM wind_case WHERE ca_id_s={$id}"); if ($sprawa['ca_agent_id_k'] != $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]) { $email = $db->GetOne("SELECT cu_email_c FROM wind_users WHERE cu_id_s=" . $sprawa['ca_agent_id_k']); if ($email != '') { if (file_exists("../include/mail.php")) { include "../include/mail.php"; } $dluznik = $db->GetOne("SELECT c_shortname_c FROM wind_client WHERE c_id_s=" . $sprawa['ca_debtor_id_k']); $wierzyciel = $db->GetOne("SELECT c_shortname_c FROM wind_client WHERE c_id_s=" . $sprawa['ca_creditor_id_k']); $admin_letter = new eMail(2); $admin_letter->eMailContent('Zmiana w sprawie ' . $sprawa['ca_number_c'], '<html><head><title>Zmiana w sprawie ' . $sprawa['ca_number_c'] . '</title></head><body>W sprawie o numerze ' . $sprawa['ca_number_c'] . ' zostały zarejestrowane zmiany.' . "\n" . '<br><br>Dłużnik: ' . $dluznik . "\n" . '<br>Wierzyciel: ' . $wierzyciel . "\n" . ($txt != '' ? '<br>Szczegóły: ' . $txt : '') . '</body></html>'); $admin_letter->eMailSend($email); } } //////////////////////////////// } $_POST['n_datetime_d'] = date("Y-m-d H:i:s"); $_POST['n_u_id_k'] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]; $_POST['n_stage_e'] = $db->GetOne("SELECT ca_stage_e FROM wind_case WHERE ca_id_s=" . $_POST['n_case_id_k']); $_nID = wpisz($_POST, "wind_notes", array()); if ($_nID) { $name = $db->GetOne("SELECT ca_number_c FROM wind_case WHERE ca_id_s=" . $_POST['n_case_id_k']); update_history_operation("Notatki", "Dodanie notatki do sprawy o numerze \"" . $name . "\"", "wind_notes", $_nID); update_case_history($_POST['n_case_id_k'], 0, 'Dodanie notatki'); echo "1"; } else { echo "0"; }
$_POST['frn_date_d'] = $D[3] . '-' . $D[2] . '-' . $D[1]; if (isset($_frnID) && $_frnID > 0) { $_POST["frn_modify_dt"] = date("Y-m-d H:i:s"); update2($_POST, "wind_frn", array("submit_x", "submit_y", "_frnID", "offset"), "frn_id_s", $_frnID); update_history_operation("Zobowiązania", "Zmiana zobowiązania \"" . $_POST["frn_number_c"] . "\"", "wind_frn", $_frnID); $_SESSION['message'][] = "Zobowiązanie zmienione"; } $case = $db->GetOne("SELECT frn_case_id_k FROM wind_frn WHERE frn_id_s={$_frnID}"); print "<script>go_to('case," . $case . "');</script>"; } if (isset($del_frn)) { $name = $db->GetOne("SELECT frn_number_c FROM wind_frn WHERE frn_id_s={$del_frn}"); $case = $db->GetOne("SELECT frn_case_id_k FROM wind_frn WHERE frn_id_s={$del_frn}"); $deleting = usun2('wind_frn', 'frn_id_s', $del_frn); if ($deleting) { update_history_operation("Zobowiązania", "Usunięcie zobowiązania o numerze \"" . $name . "\"", "wind_frn", 'NULL'); $_SESSION['message'][] = "Zobowiązanie usunięte"; } else { if ($deleting == -1) { $_SESSION['errors'][] = "Usunięcie zobowiązania nie powiodło się"; } } print "<script>go_to('case,{$case}');</script>"; } if (isset($frnID) && $frnID > 0) { $X = $db->GetRow("SELECT *, UNIX_TIMESTAMP(frn_date_d) as data, UNIX_TIMESTAMP(frn_deadline_d) as data2 FROM wind_frn WHERE frn_id_s={$frnID}"); } ?> <table width='90%' cellpadding=0 cellspacing=0 border=1 bordercolor="#cfcfcf" rules="all"> <form method="post" name="frn" action="frn"> <?php
session_start(); error_reporting(E_ERROR && ~E_NOTICE); require "../include/conf.inc.php"; require "../include/db.inc.php"; function update_history_operation($where, $operation, $table, $id) { global $_SESSION; $H = array(); $H["bho_datetime_d"] = date("Y-m-d H:i:s"); $H["bho_user_c"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["name"] . " (" . $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["user"] . ")"; $H["bho_where_c"] = $where; $H["bho_operation_c"] = $operation; $H["bho_user_k"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]; $H["bho_table_c"] = $table; $H["bho_table_id"] = $id; wpisz($H, "wind_history_operation", array()); } $data = $_POST['d_date_d']; ereg("([0-9]{2}).([0-9]{2}).([0-9]{4})", $_POST['d_date_d'], $D); $_POST['d_date_d'] = $D[3] . '-' . $D[2] . '-' . $D[1]; $_dID = wpisz($_POST, "wind_dates", array('sygn')); if ($_dID) { if ($_POST['d_date_type_e'] == 'wpete') { $db->Execute("UPDATE wind_case SET ca_signature_ete_c='" . $_POST['sygn'] . "' WHERE ca_id_s=" . $_POST['d_case_id_k']); } $name = $db->GetOne("SELECT ca_number_c FROM wind_case WHERE ca_id_s=" . $_POST['d_case_id_k']); update_history_operation("Daty", "Dodanie daty {$data} do sprawy o numerze \"" . $name . "\"", "wind_dates", $_dID); echo "1"; } else { echo "0"; }
$perm += 2; } if ($_POST['del'][$name] == 'on') { $perm += 4; } } $P[$name] = $_POST['cu_type_e'] == 'a' ? 7 : $perm; } wpisz($P, "wind_acl", array()); print "<script>go_to('_users');</script>"; } if (isset($del_user)) { $name = $db->GetOne("SELECT cu_login_c FROM wind_users WHERE cu_id_s={$del_user}"); $deleting = usun2('wind_users', 'cu_id_s', $del_user); if ($deleting) { update_history_operation("Użytkownicy", "Usunięcie użytkownika o loginie \"" . $name . "\"", "wind_users", 'NULL'); $_SESSION['message'][] = "Użytkownik \"{$name}\" usunięty"; } else { if ($deleting == -1) { $_SESSION['errors'][] = "Usunięcie użytkownika \"{$name}\" nie powiodło się"; } } print "<script>go_to('_users');</script>"; } if (isset($userID) && $userID > 0) { $X = $db->GetRow("SELECT * FROM wind_users WHERE cu_id_s={$userID}"); $ACL = $db->GetRow("SELECT * FROM wind_acl WHERE acl_u_id_k={$userID}"); } ?> <table width='90%' cellpadding=0 cellspacing=0 border=1 bordercolor="#cfcfcf" rules="all"> <form method="post" name="user" action="users" onSubmit="javascript: if (!checkUsers()) {return false;}">
if ($deleting) { update_history_operation("Sprawy", "Usunięcie sprawy o numerze \"" . $name . "\"", "wind_case", 'NULL'); $_SESSION['message'][] = "Sprawa {$name} usunięta"; } else { $_SESSION['errors'][] = "Usunięcie sprawy {$name} nie powiodło się"; } } } print "<script>go_to('_case" . ($offset ? ',o,' . $offset : '') . "');</script>"; } if (isset($submit3_x) || isset($submit3)) { if (count($_POST["check"]) > 0) { foreach ($_POST["check"] as $_id => $pid) { update2(array('ca_close_i' => 1, 'ca_close_u_id_k' => $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]), "wind_case", array(), "ca_id_s", $pid); $name = $db->GetOne("SELECT ca_number_c FROM wind_case WHERE ca_id_s={$pid}"); update_history_operation("Sprawy", "Użytkownik " . $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["name"] . " zamknął sprawę o numerze \"" . $name . "\"", "wind_case", $pid); $_SESSION['message'][] = "Sprawy zamknięte"; } } print "<script>go_to('_case" . ($offset ? ',o,' . $offset : '') . "');</script>"; } include 'case_search.php'; $offset += 0; $count = 100; if ($_SESSION['case_search']['wg'] != '') { $xxx = explode(' ', $_SESSION['case_search']['wg']); $_POST['wg'] = $wg = $xxx[0]; $_POST['jak'] = $jak = $xxx[1]; } if ($szukaj_x && $szukaj_y || count($_SESSION['case_search']) > 0) { $orders = $_SESSION['case_search'] = array();
$case = $db->GetOne("SELECT pi_case_id_k FROM wind_payin WHERE pi_id_s={$_payinID}"); print "<script>go_to('case," . $case . "');</script>"; } if (isset($del_pi)) { $pi = $db->GetRow("SELECT pi_amount_f, pi_case_id_k FROM wind_payin WHERE pi_id_s={$del_pi}"); $fry = $db->GetAll("SELECT fp_frn_id_k, fp_amount_f FROM wind_f2p WHERE fp_payin_id_k={$del_pi}"); $name = $db->GetOne("SELECT ca_number_c FROM wind_case WHERE ca_id_s=" . $pi['pi_case_id_k']); $deleting = usun2('wind_payin', 'pi_id_s', $del_pi); if ($deleting) { if (count($fry) > 0) { foreach ($fry as $_id => $F) { $db->Execute("UPDATE wind_frn SET frn_amount_left_f = frn_amount_left_f + " . $F['fp_amount_f'] . " WHERE frn_id_s=" . $F['fp_frn_id_k']); } } $db->Execute("DELETE FROM wind_f2p WHERE fp_payin_id_k={$del_pi}"); update_history_operation("Wpłaty", "Usunięcie wpłaty " . number_format($pi['pi_amount_f'], 2, ".", " ") . " zł do sprawy o numerze \"" . $name . "\"", "wind_payin", 'NULL'); $_SESSION['message'][] = "Wpłata usunięta"; } else { if ($deleting == -1) { $_SESSION['errors'][] = "Usunięcie wpłaty nie powiodło się"; } } print "<script>go_to('case," . $pi['pi_case_id_k'] . "');</script>"; } if (isset($payinID) && $payinID > 0) { $X = $db->GetRow("SELECT *, UNIX_TIMESTAMP(pi_date_d) as data, frn_number_c FROM wind_payin LEFT JOIN wind_frn ON frn_payin_id_k=pi_id_s WHERE pi_id_s={$payinID}"); } ?> <table width='90%' cellpadding=0 cellspacing=0 border=1 bordercolor="#cfcfcf" rules="all"> <form method="post" name="payin" action="payin"> <?php
<?php session_start(); error_reporting(E_ERROR && ~E_NOTICE); require "../include/conf.inc.php"; require "../include/db.inc.php"; function update_history_operation($where, $operation, $table, $id) { global $_SESSION; $H = array(); $H["bho_datetime_d"] = date("Y-m-d H:i:s"); $H["bho_user_c"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["name"] . " (" . $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["user"] . ")"; $H["bho_where_c"] = $where; $H["bho_operation_c"] = $operation; $H["bho_user_k"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]; $H["bho_table_c"] = $table; $H["bho_table_id"] = $id; wpisz($H, "wind_history_operation", array()); } $date = $db->GetOne("SELECT d_case_id_k, UNIX_TIMESTAMP(d_date_d) as data, d_date_type_e FROM wind_dates WHERE d_id_s=" . $_POST['d_id_s']); $aff = usun2("wind_dates", 'd_id_s', $_POST['d_id_s']); if ($aff) { if ($date['d_date_type_e'] == 'wpete') { $db->Execute("UPDATE wind_case SET ca_signature_ete_c='' WHERE ca_id_s=" . $_POST['d_case_id_k']); } $name = $db->GetOne("SELECT ca_number_c FROM wind_case WHERE ca_id_s=" . $date['d_case_id_k']); update_history_operation("Daty", "Usunięcie daty " . date("d.m.Y", $date['data']) . " ze sprawy o numerze \"" . $name . "\"", "wind_dates", 'NULL'); echo "1"; } else { echo "0"; }
<?php session_start(); error_reporting(E_ERROR && ~E_NOTICE); require "../include/conf.inc.php"; require "../include/db.inc.php"; function update_history_operation($where, $operation, $table, $id) { global $_SESSION; $H = array(); $H["bho_datetime_d"] = date("Y-m-d H:i:s"); $H["bho_user_c"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["name"] . " (" . $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["user"] . ")"; $H["bho_where_c"] = $where; $H["bho_operation_c"] = $operation; $H["bho_user_k"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]; $H["bho_table_c"] = $table; $H["bho_table_id"] = $id; wpisz($H, "wind_history_operation", array()); } $_POST["c_modify_d"] = date("Y-m-d H:i:s"); update2($_POST, "wind_client", array(), "c_id_s", $_POST['c_id_s']); update_history_operation($_POST['c_type_e'] == 'd' ? 'Dłużnicy' : ($_POST['c_type_e'] == 'w' ? 'Wierzyciele' : 'Dłużnicy i Wierzyciele'), "Zmiana " . ($_POST['c_type_e'] == 'd' ? 'dłużnika' : ($_POST['c_type_e'] == 'w' ? 'wierzyciela' : 'dłużnika i wierzyciela')) . " \"" . $_POST["c_name_c"] . "\"", "wind_client", $_POST['c_id_s']); echo "1";
<?php session_start(); error_reporting(E_ERROR && ~E_NOTICE); require "../include/conf.inc.php"; require "../include/db.inc.php"; function update_history_operation($where, $operation, $table, $id) { global $_SESSION; $H = array(); $H["bho_datetime_d"] = date("Y-m-d H:i:s"); $H["bho_user_c"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["name"] . " (" . $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["user"] . ")"; $H["bho_where_c"] = $where; $H["bho_operation_c"] = $operation; $H["bho_user_k"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]; $H["bho_table_c"] = $table; $H["bho_table_id"] = $id; wpisz($H, "wind_history_operation", array()); } $_POST["ct_modify_d"] = date("Y-m-d H:i:s"); update2($_POST, "wind_court", array(), "ct_id_s", $_POST['ct_id_s']); update_history_operation('Sądy', "Zmiana sądu \"" . $_POST["ct_name_c"] . "\"", "wind_court", $_POST['ct_id_s']); echo "1";
<?php session_start(); error_reporting(E_ERROR && ~E_NOTICE); require "../include/conf.inc.php"; require "../include/db.inc.php"; function update_history_operation($where, $operation, $table, $id) { global $_SESSION; $H = array(); $H["bho_datetime_d"] = date("Y-m-d H:i:s"); $H["bho_user_c"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["name"] . " (" . $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["user"] . ")"; $H["bho_where_c"] = $where; $H["bho_operation_c"] = $operation; $H["bho_user_k"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]; $H["bho_table_c"] = $table; $H["bho_table_id"] = $id; wpisz($H, "wind_history_operation", array()); } $_POST["ct_create_d"] = date("Y-m-d H:i:s"); $_POST["ct_u_id_k"] = $_SESSION['fh49ty58u893ytf83902g758902djr4cf302ty5798']['id']; $newid = wpisz($_POST, "wind_court", array()); if ($newid) { update_history_operation('Sądy', "Dodanie sądu \"" . $_POST["ct_name_c"] . "\"", "wind_court", $newid); echo "1"; } else { echo "0"; }
update_history_operation("Biura", "Zmiana biura \"" . $_POST["o_name_c"] . "\"", "wind_office", $_offID); $_SESSION['message'][] = "Biuro " . $_POST['o_name_c'] . " zmienione"; } else { $_POST["o_create_d"] = date("Y-m-d H:i:s"); $_POST["o_u_id_k"] = $_SESSION['fh49ty58u893ytf83902g758902djr4cf302ty5798']['id']; $newid = wpisz($_POST, "wind_office", array("submit_x", "submit_y", "offset")); update_history_operation("Biura", "Dodanie biura \"" . $_POST["o_name_c"] . "\"", "wind_office", $newid); $_SESSION['message'][] = "Biuro " . $_POST['o_name_c'] . " dodane"; } print "<script>go_to('_office" . ($offset > 0 ? ",o," . $offset : "") . "');</script>"; } if (isset($del_office)) { $name = $db->GetOne("SELECT o_name_c FROM wind_office WHERE o_id_s={$del_office}"); $deleting = usun2('wind_office', 'o_id_s', $del_office); if ($deleting) { update_history_operation("Biura", "Usunięcie Biura \"{$name}\"", "wind_office", 'NULL'); $_SESSION['message'][] = "Biuro {$name} usunięty"; } else { if ($deleting == -1) { $_SESSION['errors'][] = "Usunięcie Biura {$name} nie powiodło się"; } } print "<script>go_to('_office');</script>"; } if (isset($offID) && $offID > 0) { $X = $db->GetRow("SELECT * FROM wind_office WHERE o_id_s={$offID}"); } ?> <table width='90%' cellpadding=0 cellspacing=0 border=1 bordercolor="#cfcfcf" rules="all"> <form method="post" name="office" action="office"> <?php
wpisz($H, "wind_history_case", array()); } //wysyłanie maila do pełnomocnika $sprawa = $db->GetRow("SELECT ca_number_c, ca_agent_id_k, ca_debtor_id_k, ca_creditor_id_k FROM wind_case WHERE ca_id_s={$id}"); $email = $db->GetOne("SELECT cu_email_c FROM wind_users WHERE cu_id_s=" . $sprawa['ca_agent_id_k']); if ($email != '') { if (file_exists("../include/mail.php")) { include "../include/mail.php"; } $dluznik = $db->GetOne("SELECT c_shortname_c FROM wind_client WHERE c_id_s=" . $sprawa['ca_debtor_id_k']); $wierzyciel = $db->GetOne("SELECT c_shortname_c FROM wind_client WHERE c_id_s=" . $sprawa['ca_creditor_id_k']); $admin_letter = new eMail(2); $admin_letter->eMailContent('Zmiana w sprawie ' . $sprawa['ca_number_c'], '<html><head><title>Zmiana w sprawie ' . $sprawa['ca_number_c'] . '</title></head><body>W sprawie o numerze ' . $sprawa['ca_number_c'] . ' zostały zarejestrowane zmiany.' . "\n" . '<br><br>Dłużnik: ' . $dluznik . "\n" . '<br>Wierzyciel: ' . $wierzyciel . "\n" . ($txt != '' ? '<br>Szczegóły: ' . $txt : '') . '</body></html>'); $admin_letter->eMailSend($email); //$admin_letter->eMailSend('*****@*****.**'); } //////////////////////////////// } if ($_POST['ca_court_fee_date_d'] != '') { ereg("([0-9]{2}).([0-9]{2}).([0-9]{4})", $_POST['ca_court_fee_date_d'], $D); $_POST['ca_court_fee_date_d'] = $D[3] . '-' . $D[2] . '-' . $D[1]; } $aff = update2($_POST, "wind_case", array("ca_id_s"), "ca_id_s", $_POST['ca_id_s']); if ($aff >= 0) { $name = $db->GetOne("SELECT ca_number_c FROM wind_case WHERE ca_id_s=" . $_POST['ca_id_s']); update_history_operation("Sprawy", "Zmiana opłaty sądowej w sprawie o numerze \"" . $name . "\"", "wind_case", $_POST['ca_id_s']); update_case_history($_POST['ca_id_s'], 0, 'Zmiana opłaty sądowej w sprawie o numerze ' . $name); echo "1"; } else { echo "0"; }
{ global $_SESSION; $H = array(); $H["bho_datetime_d"] = date("Y-m-d H:i:s"); $H["bho_user_c"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["name"] . " (" . $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["user"] . ")"; $H["bho_where_c"] = $where; $H["bho_operation_c"] = $operation; $H["bho_user_k"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]; $H["bho_table_c"] = $table; $H["bho_table_id"] = $id; wpisz($H, "wind_history_operation", array()); } if ($_POST['c_shortname_c'] != '') { $exist = $db->GetOne("SELECT COUNT(1) FROM wind_client WHERE c_shortname_c LIKE '" . htmlspecialchars_decode($_POST["c_shortname_c"]) . "'"); } else { $exist = 0; } if ($exist == 0) { $_POST['c_nip_c'] = str_replace('-', '', $_POST['c_nip_c']); $_POST["c_create_d"] = date("Y-m-d H:i:s"); $_POST["c_u_id_k"] = $_SESSION['fh49ty58u893ytf83902g758902djr4cf302ty5798']['id']; $newid = wpisz($_POST, "wind_client", array()); if ($newid) { update_history_operation($_POST['c_type_e'] == 'd' ? 'Dłużnicy' : 'Wierzyciele', "Dodanie " . ($_POST['c_type_e'] == 'd' ? 'dłużnika' : 'wierzyciela') . " \"" . htmlspecialchars_decode($_POST["c_name_c"]) . "\"", "wind_client", $newid); echo "1"; } else { echo "0"; } } else { echo "2"; }
$_POST["c_create_d"] = date("Y-m-d H:i:s"); $_POST["c_u_id_k"] = $_SESSION['fh49ty58u893ytf83902g758902djr4cf302ty5798']['id']; $newid = wpisz($_POST, "wind_client", array("submit_x", "submit_y", "offset")); update_history_operation($_POST['c_type_e'] == 'd' ? 'Dłużnicy' : ($_POST['c_type_e'] == 'w' ? 'Wierzyciele' : 'Dłużnicy i wierzyciele'), "Dodanie " . ($_POST['c_type_e'] == 'd' ? 'dłużnika' : ($_POST['c_type_e'] == 'w' ? 'wierzyciela' : 'dłużnika i wierzyciela')) . " \"" . $_POST["c_name_c"] . "\"", "wind_client", $newid); $_SESSION['message'][] = ($_POST['c_type_e'] == 'd' ? 'Dłużnik' : ($_POST['c_type_e'] == 'w' ? 'Wierzyciel' : 'Dłużnik i wierzyciel')) . " " . $_POST["c_name_c"] . " dodany"; } else { $_SESSION['errors'][] = 'Klient o wpisanej nazwie skróconej już istnieje w bazie'; } } print "<script>go_to('_client" . ($_POST['c_type_e'] == 'd' ? ',d' : ',w') . ($offset > 0 ? ",o," . $offset : "") . "');</script>"; } if (isset($del_client)) { $name = $db->GetRow("SELECT c_name_c, c_type_e FROM wind_client WHERE c_id_s={$del_client}"); $deleting = usun2('wind_client', 'c_id_s', $del_client); if ($deleting) { update_history_operation($name['c_type_e'] == 'd' ? 'Dłużnicy' : ($name['c_type_e'] == 'w' ? 'Wierzyciele' : 'Dłużnicy i wierzyciele'), "Usunięcie " . ($name['c_type_e'] == 'd' ? 'dłużnika' : ($name['c_type_e'] == 'w' ? 'wierzyciela' : 'dłużnika i wierzyciela')) . " \"" . $name["c_name_c"] . "\"", "wind_client", 'NULL'); $_SESSION['message'][] = ($name['c_type_e'] == 'd' ? 'Dłużnik' : ($name['c_type_e'] == 'w' ? 'Wierzyciel' : 'Dłużnik i wierzyciel')) . " " . $name["c_name_c"] . " usunięty"; } else { if ($deleting == -1) { $_SESSION['errors'][] = "Usunięcie " . ($name['c_type_e'] == 'd' ? 'dłużnika' : ($name['c_type_e'] == 'w' ? 'wierzyciela' : 'dłużnika i wierzyciela')) . " " . $name["c_name_c"] . " nie powiodło się"; } } print "<script>go_to('_client,{$typ}');</script>"; } if (isset($cID) && $cID > 0) { $X = $db->GetRow("SELECT * FROM wind_client WHERE c_id_s={$cID}"); $X['c_name_c'] = stripslashes(htmlspecialchars($X['c_name_c'])); $X['c_shortname_c'] = stripslashes(htmlspecialchars($X['c_shortname_c'])); } ?> <table width='90%' cellpadding=0 cellspacing=0 border=1 bordercolor="#cfcfcf" rules="all">
<?php session_start(); error_reporting(E_ERROR && ~E_NOTICE); require "../include/conf.inc.php"; require "../include/db.inc.php"; function update_history_operation($where, $operation, $table, $id) { global $_SESSION; $H = array(); $H["bho_datetime_d"] = date("Y-m-d H:i:s"); $H["bho_user_c"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["name"] . " (" . $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["user"] . ")"; $H["bho_where_c"] = $where; $H["bho_operation_c"] = $operation; $H["bho_user_k"] = $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"]; $H["bho_table_c"] = $table; $H["bho_table_id"] = $id; wpisz($H, "wind_history_operation", array()); } $date = $db->GetOne("SELECT d_case_id_k, UNIX_TIMESTAMP(d_date_d) as data FROM wind_dates WHERE d_id_s=" . $_POST['d_id_s']); ereg("([0-9]{2}).([0-9]{2}).([0-9]{4})", $_POST['d_date_d'], $D); $data = $_POST['d_date_d']; $_POST['d_date_d'] = $D[3] . '-' . $D[2] . '-' . $D[1]; $aff = update2(array('d_date_type_e' => $_POST['d_date_type_e'], 'd_date_d' => $_POST['d_date_d']), "wind_dates", array(), 'd_id_s', $_POST['d_id_s']); if ($aff) { $name = $db->GetOne("SELECT ca_number_c FROM wind_case WHERE ca_id_s=" . $date['d_case_id_k']); update_history_operation("Daty", "Zmiana daty z " . date("d.m.Y", $date['data']) . " na " . $data . " w sprawie o numerze \"" . $name . "\"", "wind_dates", 'NULL'); echo "1"; } else { echo "0"; }