Exemplo n.º 1
0
include_once '../configs/sm.php';
include_once '../model/Vendedor.php';
include_once '../model/Transita.php';
include_once '../model/Joia.php';
include_once '../model/Tipo.php';
include_once '../model/Cor.php';
include_once '../model/Pedra.php';
include_once '../model/Loja.php';
include_once '../model/Usuario.php';
session_start();
if ($_SESSION['login'] == "true") {
    $usuario = Usuario::listaUsuario($_SESSION['usuario']);
    $sm->assign("usuario", $usuario);
    $vendedor = Vendedor::listaVendedores();
    $sm->assign("vendedores", $vendedor);
    $dados = Transita::listaTransitas();
    $joias = array();
    $tipos = array();
    $texto = "";
    $precoTotal = 0.0;
    if ($dados) {
        foreach ($dados as $dado) {
            $joia = Joia::listaJoiaQR($dado->getNome_transita(), 1);
            array_push($joias, $joia);
            if ($joia != null) {
                $precoTotal += $joia->getPreco_venda();
                $texto = "-------------------------";
                $texto = $texto . "\nProduto: " . Tipo::listaTipo($joia->getTipo())->getNome_tipo() . "\n";
                $texto = $texto . "Pedra: " . Pedra::listaPedra($joia->getPedra())->getNome_pedra() . "\n";
                $texto = $texto . "Cor: " . Cor::listaCor($joia->getCor())->getNome_cor() . "\n";
                $texto = $texto . "Fornecedor: " . Loja::listaLoja($joia->getLoja())->getNome_loja();
Exemplo n.º 2
0
<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
include_once '../model/Transita.php';
include_once '../model/Joia.php';
session_start();
if ($_SESSION['login'] == "true") {
    $cod = $_POST['s'];
    $teste = $_POST['read'];
    Transita::insereTransita($cod);
    $joia = Joia::listaJoiaQR($cod, 0);
    $joia->setValida(0);
    Joia::EditaValida($joia);
    header("location:../controller/controllerEstojo.php");
} else {
    header("location:../index.php?&erro=\"Login\"");
}
Exemplo n.º 3
0
<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
include_once '../model/Joia.php';
include_once '../model/JoiaEstojo.php';
include_once '../model/Transita.php';
session_start();
if ($_SESSION['login'] == "true") {
    $vendedor = $_POST['v1'];
    $pasta = $_POST['pastas'];
    $dados = Transita::listaTransitas();
    if ($dados) {
        foreach ($dados as $dado) {
            $joia = Joia::listaJoiaQR($dado->getNome_transita(), 1);
            JoiaEstojo::EstojoinsereJoia($joia);
            Joia::deletaJoia($joia->getId_joia());
            Transita::deletaTransita();
        }
    }
    echo $vendedor;
    echo $pasta;
} else {
    header("location:../index.php?&erro=\"Login\"");
}