<?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\""); }
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(); array_push($tipos, $texto); $texto = ''; } } } if (!isset($pastaParametro)) { $nome = Vendedor::listaVendedor(1);