Esempio n. 1
0
     </form>
        -->
     <?php 
 } else {
     if ($_GET["funkcija"] == "stranka") {
         if (isset($_GET["id"])) {
             $id = $_GET["id"];
         } else {
             $email = $_GET["email"];
             $id = DBTrgovina::findIdStranke($email);
         }
         ?>
     <h1>Posodabljanje</h1>
     <?php 
         try {
             $row = DBTrgovina::getStranka($id);
             // POIZVEDBA V PB
         } catch (Exception $e) {
             echo "Napaka pri poizvedbi: " . $e->getMessage();
         }
         $email = $row["email"];
         $geslo = $row["geslo"];
         $naslov = $row["naslov"];
         $telefon = $row["telefon"];
         $status = $row["status"];
         $ime = $row["ime"];
         $priimek = $row["priimek"];
         $id_posta = $row["id_poste"];
         $posta = DBTrgovina::getPosta($id_posta);
         ?>
     <h2>Urejanje atributov osebe z id = <?php 
Esempio n. 2
0
            echo $stanje;
            ?>
" />
                <input type="submit" value="Preklici narocilo" />
                </form>
                <?php 
            //echo "<p><b> id narocila: $id_narocila stranka: $ime $priimek datum: $datum </b>[<a href='$url'>Potrdi narocilo</a>]  [<a href='$url2'>Preklici narocilo</a>]</p>\n";
        }
    } else {
        if ($stanje == "potrjeno") {
            foreach ($narocila as $num => $row) {
                $url = $_SERVER["PHP_SELF"] . "?method=post&do=storniraj&tip=neobdelano&izvor=znotraj&id=" . $row["id_narocila"];
                $id_narocila = $row["id_narocila"];
                $id = $row["id_stranke"];
                $datum = $row["datum"];
                $stranka = DBTrgovina::getStranka($id);
                $ime = $stranka["ime"];
                $priimek = $stranka["priimek"];
                echo "id narocila: {$id_narocila} stranka: {$ime} {$priimek} datum: {$datum} ";
                ?>
                <form action="<?php 
                echo $_SERVER["PHP_SELF"];
                ?>
" method="post" style="display: inline;">
                <input type="hidden" name="do" value="storniraj" />
                <input type="hidden" name="izvor" value="znotraj" />
                <input type="hidden" name="tip" value="potrjeno" />
                <input type="hidden" name="id" value="<?php 
                echo $id_narocila;
                ?>
" />