Exemple #1
0
             $deleting = usun2("wind_client", "c_id_s", $pid);
             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 {
                 $_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 ($submit_x) {
     $_POST['c_nip_c'] = str_replace('-', '', $_POST['c_nip_c']);
     if (isset($_cID) && $_cID > 0) {
         $_POST["c_modify_d"] = date("Y-m-d H:i:s");
         update2($_POST, "wind_client", array("submit_x", "submit_y", "_cID", "offset"), "c_id_s", $_cID);
         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", $_cID);
         $_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"] . " zmieniony";
     } else {
         $exist = $db->GetOne("SELECT COUNT(1) FROM wind_client WHERE c_shortname_c LIKE '" . $_POST['c_shortname_c'] . "'");
         if (!$exist) {
             $_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>";
Exemple #2
0
<?php

if ($_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"] != 999 && $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"] > 0) {
    if (isset($del) && $del > 0) {
        update2(array('frn_show_i' => 0), 'wind_frn', array(), 'frn_id_s', $del);
        ?>
  <script language="JavaScript">
  <!--
  window.location.href="index.php";
  //-->
  </script>
  <?php 
    }
    ?>
  </center><br />
  <b>Przypomnienia o przedawnieniu:</b>&nbsp;<a id="showhide" div="1" style="cursor:pointer;">pokaż/ukryj</a>
<div id="div1" style="display:none;">
<?php 
    $prz = $db->GetAll("SELECT frn_id_s, frn_case_id_k, ca_number_c, frn_type_e, frn_number_c, (UNIX_TIMESTAMP(frn_expired_d)-30*86400) as start, UNIX_TIMESTAMP(frn_expired_d) as end, UNIX_TIMESTAMP(frn_deadline_d) as deadline  FROM wind_frn, wind_case WHERE frn_case_id_k=ca_id_s AND ca_pozew_d = '0000-00-00' AND frn_amount_left_f > 0 AND " . date("U") . " >= (UNIX_TIMESTAMP(frn_expired_d)-30*86400) AND " . date("U") . " < UNIX_TIMESTAMP(frn_expired_d) AND UNIX_TIMESTAMP(frn_expired_d)>=0 AND frn_show_i=1 AND ca_close_i=0 ORDER BY frn_expired_d ASC");
    if (count($prz) > 0) {
        print '<br><table style="width: 800px;" border=1 bordercolor="#cfcfcf" rules="all" cellpadding=3 cellspacing=0>';
        print "<tr ><td class='p13c'>Lp.</td><td class='p13c'>Typ</td><td class='p13c'>Numer</td><td class='p13c'>Sprawa</td><td class='p13c'>Termin płatności</td><td class='p13c'>Termin przedawnienia</td></tr>";
        foreach ($prz as $_id => $F) {
            print "<tr onmouseover=javascript:style.background='#d2ffb2' onmouseout=javascript:style.background='#ffffff'><td class=p13c>" . ++$_id . "</td><td>";
            switch ($F['frn_type_e']) {
                case 'f':
                    print 'Faktura';
                    break;
                case 'r':
                    print 'Rachunek';
                    break;
Exemple #3
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}");
    $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";
}
Exemple #4
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["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";
Exemple #5
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";
Exemple #6
0
             $name = $db->GetOne("SELECT e_name_c FROM wind_executive WHERE e_id_s={$pid}");
             $deleting = usun2("wind_executive", "e_id_s", $pid);
             if ($deleting) {
                 update_history_operation("Komornicy", "Usunięcie komornika \"{$name}\"", "wind_executive", 'NULL');
                 $_SESSION['message'][] = "Komornik {$name} usunięty";
             } else {
                 $_SESSION['errors'][] = "Usunięcie komornika {$name} nie powiodło się";
             }
         }
     }
     print "<script>go_to('_executive');</script>";
 }
 if ($submit_x) {
     if (isset($_eID) && $_eID > 0) {
         $_POST["e_modify_d"] = date("Y-m-d H:i:s");
         update2($_POST, "wind_executive", array("submit_x", "submit_y", "_eID", "offset"), "e_id_s", $_eID);
         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) {
Exemple #7
0
function laduj_pliki($_F, $varname = 'foto', $katalog, $ile = 1, $tabela = '', $prefix, $idd)
{
    $_tmp = array();
    for ($i = 1; $i <= $ile; $i++) {
        if (isset($_F[$varname . "_{$i}"]['tmp_name']) and $_F[$varname . "_{$i}"]['tmp_name'] != 'none' and empty($_F[$varname . "_{$i}"]['error'])) {
            $typ = okresl_typ($_F[$varname . "_{$i}"]['type']);
            $name = uniqid();
            $plik = "{$name}.{$typ}";
            if (strlen($tabela)) {
                update2(array("{$prefix}filename" . ($i > 1 ? $i : '') . "_c" => $plik), $tabela, array(), "{$prefix}id_s", $idd);
            }
            $link = $katalog . "/" . $plik;
            move_uploaded_file($_F[$varname . "_{$i}"]['tmp_name'], $link);
            chmod($link, 0644);
            $_tmp[] = $plik;
        }
    }
    return $_tmp;
}
Exemple #8
0
             $name = $db->GetOne("SELECT o_name_c FROM wind_office WHERE o_id_s={$pid}");
             $deleting = usun2("wind_office", "o_id_s", $pid);
             if ($deleting) {
                 update_history_operation("Biura", "Usunięcie biura \"{$name}\"", "wind_office", 'NULL');
                 $_SESSION['message'][] = "Biuro {$name} usunięte";
             } else {
                 $_SESSION['errors'][] = "Usunięcie biura {$name} nie powiodło się";
             }
         }
     }
     print "<script>go_to('_office');</script>";
 }
 if (isset($submit_x) || isset($submit)) {
     if (isset($_offID) && $_offID > 0) {
         $_POST["o_modify_d"] = date("Y-m-d H:i:s");
         update2($_POST, "wind_office", array("submit_x", "submit_y", "_offID", "offset"), "o_id_s", $_offID);
         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) {
Exemple #9
0
                            </form>
<?php 
    $myid = $_SESSION['id'];
    if (isset($_GET['PersonID']) and !empty($_GET['PersonID'])) {
        include "db.php";
        $id = $_GET['PersonID'];
        $connectionStatus = connect_db();
        $query = "select * from events where (myid='{$myid}' AND id='{$id}') AND join='Y'";
        $result = mysqli_query($connectionStatus, $query);
        if (mysqli_affected_rows($connectionStatus) == 0) {
            $connectionStatus = connect_db();
            $query = "select * from events where (myid='{$myid}' AND id='{$id}') AND (join=' ' OR join='N')";
            $result = mysqli_query($connectionStatus, $query);
            if (mysqli_affected_rows($connectionStatus) != 0) {
                $connectionStatus = connect_db();
                update2($connectionStatus, $myid, $id);
                echo "<br>Joining successfully ";
            } else {
                echo "<br>Already joined";
            }
            //$querry = "INSERT INTO friends (id,myid,friendid) VALUES ('','$myid','$fid')";
            //$result = mysqli_query($connectionStatus,$querry);
        } else {
            echo "<br>Already joined";
        }
        //$result=mysqli_query($connectionStatus,$query);
    }
    ///else
    ///echo "<br>Error: Invalid ID";
    ?>
                   </div>                  
Exemple #10
0
         case '2r':
             $exp = mktime(0, 0, 0, $D[2], $D[1], $D[3] + 2);
             break;
         case '3r':
             $exp = mktime(0, 0, 0, $D[2], $D[1], $D[3] + 3);
             break;
         case '10r':
             $exp = mktime(0, 0, 0, $D[2], $D[1], $D[3] + 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];
     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) {
Exemple #11
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["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";
Exemple #12
0
<tr><td><b>&nbsp;Użytkownicy</b></td></tr>
</table>
<br>
<?php 
    $userID = $ID;
    if ($list == 0) {
        if ($submit_x) {
            if (isset($_userID) && $_userID > 0) {
                $_POST["cu_modify_d"] = date("Y-m-d H:i:s");
                $omit = array("submit_x", "submit_y", "_userID", "create", "edit", "del", "cu_password_c2");
                if (strlen($_POST["cu_password_c"]) > 0) {
                    $_POST["cu_password_c"] = md5($_POST["cu_password_c"]);
                } else {
                    $omit[] = "cu_password_c";
                }
                update2($_POST, "wind_users", $omit, "cu_id_s", $_userID);
                update_history_operation("Użytkownicy", "Zmiana użytkownika \"" . $_POST["cu_login_c"] . "\"", "wind_users", $_userID);
                $_SESSION['message'][] = "Użytkownik \"" . $_POST["cu_login_c"] . "\" zmieniony";
            } else {
                $_POST["cu_create_d"] = date("Y-m-d H:i:s");
                $_POST["cu_password_c"] = md5($_POST["cu_password_c"]);
                $_userID = wpisz($_POST, "wind_users", array("submit_x", "submit_y", "create", "edit", "del", "cu_password_c2", "_userID"));
                update_history_operation("Użytkownicy", "Dodanie użytkownika \"" . $_POST["cu_login_c"] . "\"", "wind_users", $_userID);
                $_SESSION['message'][] = "Użytkownik \"" . $_POST["cu_login_c"] . "\" dodany";
            }
            $db->Execute("DELETE FROM wind_acl WHERE acl_u_id_k={$_userID}");
            $P = array();
            $P['acl_u_id_k'] = $_userID;
            foreach ($permtable as $name) {
                $perm = 0;
                if (!in_array($_POST['cu_type_e'], array('p', 'c', 'k', 'r'))) {
Exemple #13
0
             $name = $db->GetOne("SELECT ca_number_c FROM wind_case WHERE ca_id_s={$pid}");
             $deleting = usun2("wind_case", "ca_id_s", $pid);
             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];
 }
Exemple #14
0
     if (count($_POST["check"]) > 0) {
         foreach ($_POST["check"] as $_id => $pid) {
           $pi = $db->GetRow("SELECT pi_amount_f, pi_case_id_k FROM wind_payin WHERE pi_id_s=$pid");
           $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", $pid);
           if ($deleting) 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');
         }
     }
     print "<script>go_to('_payin');</script>";
 }*/
 if (isset($submit_x)) {
     ereg("([0-9]{2}).([0-9]{2}).([0-9]{4})", $_POST['pi_date_d'], $D);
     $_POST['pi_date_d'] = $D[3] . '-' . $D[2] . '-' . $D[1];
     if (isset($_payinID) && $_payinID > 0) {
         $_POST["pi_modify_d"] = date("Y-m-d H:i:s");
         update2($_POST, "wind_payin", array("submit_x", "submit_y", "_payinID", "offset"), "pi_id_s", $_payinID);
         $picase = $db->GetOne("SELECT pi_case_id_k FROM wind_payin WHERE pi_id_s=" . $_payinID);
         $name = $db->GetOne("SELECT ca_number_c FROM wind_case WHERE ca_id_s=" . $picase);
         update_history_operation("Wpłaty", "Zmiana wpłaty do sprawy o numerze \"" . $name . "\"", "wind_payin", $_payinID);
         $_SESSION['message'][] = "Wpłata zmieniona";
     }
     $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) {
Exemple #15
0
             $name = $db->GetOne("SELECT ct_name_c FROM wind_court WHERE ct_id_s={$pid}");
             $deleting = usun2("wind_court", "ct_id_s", $pid);
             if ($deleting) {
                 update_history_operation("Sądy", "Usunięcie sądu \"{$name}\"", "wind_court", 'NULL');
                 $_SESSION['message'][] = "Sąd {$name} usunięty";
             } else {
                 $_SESSION['errors'][] = "Usunięcie sądu {$name} nie powiodło się";
             }
         }
     }
     print "<script>go_to('_court');</script>";
 }
 if ($submit_x) {
     if (isset($_ctID) && $_ctID > 0) {
         $_POST["ct_modify_d"] = date("Y-m-d H:i:s");
         update2($_POST, "wind_court", array("submit_x", "submit_y", "_ctID", "offset"), "ct_id_s", $_ctID);
         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) {
Exemple #16
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());
}
$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";
}