示例#1
0
         $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>";
 }
 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']));
 }
示例#2
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) {
         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']));
 }
示例#3
0
<?php

if ($_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"] != 999 && $_SESSION["fh49ty58u893ytf83902g758902djr4cf302ty5798"]["id"] > 0) {
    if (isset($del_log)) {
        $deleting = usun2('wind_logged', 'l_id_s', $del_log);
    }
    ?>
<table width='90%' cellpadding=0 cellspacing=0 border=1 bordercolor="#cfcfcf" rules="none">
<tr><td><b>&nbsp;Aktualnie zalogowani</b></td></tr>
</table>
<br>
<?php 
    $razem = $db->GetOne("select count(*) as ile from wind_logged");
    $query = "SELECT l_id_s, cu_login_c, l_ip_c, UNIX_TIMESTAMP(l_datetime_dt) AS l_datetime_dt FROM wind_logged, wind_users WHERE cu_id_s=l_cu_id_k ORDER BY l_datetime_dt DESC";
    $sql = $db->SelectLimit($query, 100, 0);
    ?>
<br><table width='90%' cellpadding=0 cellspacing=0 border=1 bordercolor="#cfcfcf" rules="rows">
<tr class="szare">
<td class="p10c">Użytkownik</td>
<td class="p10c" width="25%">Zalogowany od</td>
<td class="p10c" width="20%">IP</td>
<td class="p10c" width="5%">&nbsp;</td>
</tr>
<?php 
    if ($sql) {
        if ($sql->RecordCount() > 0) {
            while ($X = $sql->FetchRow()) {
                print "<form method=\"post\" name=\"delete_" . $X["l_id_s"] . "\" action=\"logged_history\">";
                print hidden("del_log", $X["l_id_s"]);
                print "</form>";
            }
示例#4
0
文件: frn.php 项目: bogorya/kancbfl
            $_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) {
                    $_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">
示例#5
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) {
                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">
示例#6
0
文件: users.php 项目: bogorya/kancbfl
             }
             if ($_POST['edit'][$name] == 'on') {
                 $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}");
 }
 ?>
示例#7
0
文件: case.php 项目: bogorya/kancbfl
           ?>
 <?php 
           print print_calendar('ca_statement_exec_d', 'ca_statement_exec_d_handle');
           ?>
 </script>
 <?php 
       }
       update_case_history($caID, 1);
   }
   //}}}
   if ($list == 1) {
       if (isset($submit2_x) || isset($submit2)) {
           if (count($_POST["check"]) > 0) {
               foreach ($_POST["check"] as $_id => $pid) {
                   $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}");
示例#8
0
文件: payin.php 项目: bogorya/kancbfl
     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) {
             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>";
示例#9
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, 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";
}
示例#10
0
文件: court.php 项目: bogorya/kancbfl
         $_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) {
         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']));
 }
 ?>