Exemplo n.º 1
0
<?php

require_once '../../includes/initialize.php';
if (!$session->is_logged_in()) {
    redirect_to("login.php");
}
$predlozak = new Predlozak();
$predlozak = Predlozak::find_by_id($_GET['id']);
?>
<div id="success"></div>
<form name="postForm" id="predlozakForm" method="POST">
    <div class="form-horizontal">
        <table>
            <tr>
                <th>Promjeni podatke u nalogu</th>
            </tr>
            <tbody>
<?php 
include 'predlozakForm.php';
?>
<tr><td><tr><td>
            </tbody>
        </table>
        <input type="hidden" name="Edit" value="edit">
        <input type="submit" name="submit" value="Promjeni"> <input class="odustani" type="button" value="Zatvori">
    </div>
</form>
</div>
Exemplo n.º 2
0
<?php

require_once '../../includes/initialize.php';
if (!$session->is_logged_in()) {
    redirect_to("login.php");
}
include_layout_template('admin_header.php');
include_layout_template('sidebar.php');
$predlosci = Predlozak::nalozi(0, 'FALSE');
//$predlosci = Predlozak::nalozi($_SESSION['racun_id'],'FALSE');
?>
<div class="span12">
   <?php 
?>
<?php// echo output_message($message); ?>
    <table class="table" id="predlosci">
        <thead>
        <tr>
        <th hidden>Pid</th>
        <th>Naziv Predloška</th>
        <th>Račun odobrenja</th>
        <th>Račun zaduženja</th>
        <th hidden>Iznos</th>
        <th hidden>Namjena</th>
        <th hidden>Opis</th>
        <th><input type="text" class="search-query span2" placeholder="Pretraži" id="search"></th>
        </tr>
        </thead>
        <tbody id="pretrazi">
        <?php 
if ($predlosci) {
Exemplo n.º 3
0
<?php

require_once '../../includes/initialize.php';
if (!$session->is_logged_in()) {
    redirect_to("login.php");
}
include_layout_template('admin_header.php');
include_layout_template('sidebar.php');
//$predlosci = Predlozak::nalozi($_SESSION['racun_id']);
$predlosci = Predlozak::nalozi(0, 'TRUE');
?>
<div class="span12">
    <?php 
echo output_message($message);
?>
    <table class="table">
        <thead>
        <tr>
        <th>Račun odobrenja</th>
        <th>Račun zaduženja</th>
        <th>Iznos</th>
        <th>Namjena</th>
        <th><input type="text" class="search-query span2" placeholder="Pretraži" id="search"></th>
        </tr>
        </thead>
        <tbody>
        <?php 
if ($predlosci) {
    foreach ($predlosci as $predlozak) {
        echo "<tr id={$predlozak->pid}><td><a href=create.php?id={$predlozak->pid}>{$predlozak->platitelj} {$predlozak->iban}</a></td>";
        echo "<td>{$predlozak->iban_primatelja}</td>";
Exemplo n.º 4
0
        //$predlozak->potpisivanje = $_POST['potpisivanje'];
        /*$predlozak->created_at = date('YMd hms');
          $predlozak->updated_at = date('YMd hms');*/
        if ($placanje->save()) {
            $session->message = "Placanje je uspješno dodano !!!";
            redirect_to('create.php');
        } else {
            //Neuspješno
            $message = join("<div class=alert alert-error>{$placanje->errors}</div><br>");
        }
    } else {
        //Neuspješno
        $message = join("<div class=alert alert-error>{$predlozak->errors}</div><br>");
    }
} else {
    $predlozak = Predlozak::find_by_id(0);
    $placanje = new Placanje();
}
include_layout_template('admin_header.php');
include_layout_template('sidebar.php');
?>

<div class="span12">
    <form name="postForm" id="predložakForm" method="POST">
        <div class="form-horizontal">
            <table>
                <tr>
                    <th>Unos novog predloška</th>
                </tr>
                <tbody>
                <?php 
Exemplo n.º 5
0
<?php

if (!$session->is_logged_in()) {
    redirect_to("login.php");
}
$placanje = new Placanje();
if (isset($_POST['submit'])) {
    $predlozak = Predlozak::find_by_id2($_POST['id']);
    $predlozak->id = $_POST['id'];
    $predlozak->naziv = $_POST['naziv'];
    $predlozak->platitelj_id = $_POST['platitelj_id'];
    $predlozak->model_odobrenja_id = $_POST['model_odobrenja_id'];
    $predlozak->broj_odobrenja = $_POST['broj_odobrenja'];
    $predlozak->iban_primatelja = $_POST['iban_prefix'] . $_POST['iban'];
    //$predlozak->primatelj_id = $_POST['primatelj_id'];
    $predlozak->model_zaduzenja_id = $_POST['model_zaduzenja_id'];
    $predlozak->broj_zaduzenja = $_POST['broj_zaduzenja'];
    //$predlozak->korisnik_id = $_SESSION['user_id'];
    if ($predlozak->save()) {
        $session->message = "Predložak je uspješno dodan !!!";
        $placanje = Placanje::find_by_id2($predlozak->id);
        $placanje->iznos = $_POST['iznos'];
        $placanje->sifra_valute_id = $_POST['valuta'];
        $placanje->sifra_namjene_id = $_POST['sifra_namjene_id'];
        $placanje->opis = $_POST['opis_placanja'];
        $placanje->datum_izvrsenja = $_POST['datum_izvrsenja'];
        // 0 je predlo�ak 1 je nalog
        $placanje->predlozak_nalog = 0;
        //$predlozak->potpisivanje = $_POST['potpisivanje'];
        /*$predlozak->created_at = date('YMd hms');
        $predlozak->updated_at = date('YMd hms');*/