if ($permissao == 'FALSE' or $controle_id_empresa != '1') {
    echo '<br><br><strong>Você não tem permissão para acessar essa página</strong>';
    exit;
}
?>
<div id="topo">
    <h1 class="tit"><img src="../images/tit/tit_empresa.png" alt="Título" />Franquia</h1>
    <hr class="tit" />
</div>
<div id="meio">
    <?php 
pt_register('GET', 'id');
pt_register('POST', 'submit');
pt_register('POST', 'submit_correios');
$empresaDAO = new EmpresaDAO();
$correioDAO = new CorreioDAO();
$readonly = !(in_array('1', $id_departamento_p) || in_array('17', $id_departamento_p));
if ($submit_correios) {
    //check for errors
    $error = "";
    $errors = array();
    $error = "<b>Ocorreram os seguintes erros:</b><ul>";
    pt_register('POST', 'id_fichacorreio');
    pt_register('POST', 'quantidade');
    if ($id_fichacorreio == "" || $quantidade == "") {
        if ($id_fichacorreio == "") {
            $errors['id_fichacorreio'] = 1;
        }
        if ($quantidade == "") {
            $errors['quantidade'] = 1;
        }
<?php

if ($controle_id_usuario == "") {
    header("Content-Type: text/html; charset=ISO-8859-1", true);
    require "../includes/funcoes.php";
    require "../includes/verifica_logado_controle.inc.php";
    require "../includes/global.inc.php";
    $departamento_s = explode(',', $controle_id_departamento_s);
    $departamento_p = explode(',', $controle_id_departamento_p);
    $correioDAO = new CorreioDAO();
}
pt_register('GET', 'id_empresa');
$permissao = verifica_permissao('Franquia', $controle_id_departamento_p, $controle_id_departamento_s);
$id_departamento_p = explode(',', $controle_id_departamento_p);
if ($permissao == 'FALSE' or $controle_id_empresa != '1') {
    echo '<br><br><strong>Você não tem permissão para acessar essa página</strong>';
    exit;
}
?>
<form action="#aba6" method="post" name="p_financeiro" id="p_financeiro" enctype="multipart/form-data">
    <input type="hidden" name="p_correios" value="1">
    <table width="800" class="tabela">
        <tr>
            <td colspan="4" class="tabela_tit">Fichas dos Correios</td>
        </tr>
        <tr>
            <td width="150">
                <div align="right"><b>Tipo de Ficha:</b></div>
            </td>
            <td width="180">
                <select name="id_fichacorreio" style="width: 150px" class="form_estilo<?php 
예제 #3
0
<?php

require 'header.php';
$permissao = verifica_permissao('Empresa', $controle_id_departamento_p, $controle_id_departamento_s);
if ($controle_id_empresa != 1) {
    echo '<br><br><strong>Você não tem permissão para acessar essa página</strong>';
    exit;
}
pt_register('GET', 'busca');
pt_register('GET', 'pagina');
$correioDAO = new CorreioDAO();
$empresaDAO = new EmpresaDAO();
if ($controle_id_empresa != 1) {
    $id_empresa = $controle_id_empresa;
} else {
    pt_register('GET', 'id_empresa');
}
$lista = $correioDAO->listar($id_empresa, $busca, $pagina);
?>
<div id="topo">
    <h1 class="tit"><img src="../images/tit/tit_conta.png" alt="Título" /> Agências dos Correios</h1>
    <hr class="tit" />
</div>
<div id="meio">
    <table border="0" height="100%" width="100%">
        <tr>
            <td valign="top">
                <form name="buscador" action="" method="get" ENCTYPE="multipart/form-data">
                    <div>
                        <label>Buscar: </label>
                        <input type="text" class="form_estilo" name="busca" value="<?php 
<?php

$correioDAO = new CorreioDAO();
if (isset($c->submit)) {
    $error = "";
    $errors = array();
    $error = "<b>Ocorreram os seguintes erros:</b><ul>";
    if ($c->id_fichacorreio == "" || $c->quantidade == "") {
        if ($c->id_fichacorreio == "") {
            $errors['id_fichacorreio'] = 1;
        }
        if ($c->quantidade == "") {
            $errors['quantidade'] = 1;
        }
        $error .= "<li><b>Os campos com * são obrigatórios.</b></li>";
    }
    if (count($errors) == 0) {
        $correioDAO->inserirFichaCorreio($c->id_empresa, $controle_id_usuario, $c->id_fichacorreio, $c->quantidade);
        $titulo = 'Mensagem da página web';
        $msg = 'Registro adicionado com sucesso!';
        $pagina = 'franquias_editar.php?id=' . $c->id_empresa;
        $funcJs = "openAlertBox('" . $titulo . "','" . $msg . "','" . $pagina . "');";
        echo '<img src="../images/null.gif" class="nulo" onload="' . $funcJs . '" />';
    } else {
        echo "<script>\n\t\t\tdocument.getElementById('errors').style.display = 'block';\n\t\t\tdocument.getElementById('errors').innerHTML = '<div class=\"erro\">" . $error . "</div><br />';\n\t\t</script>";
    }
}
?>
<label>Tipo de Ficha:</label>
<select name="id_fichacorreio" class="form_estilo<?php 
if ($errors['id_fichacorreio'] == 1) {
예제 #5
0
<?php

require 'header.php';
$permissao = verifica_permissao('Empresa', $controle_id_departamento_p, $controle_id_departamento_s);
if ($controle_id_empresa != 1) {
    echo '<br><br><strong>Você não tem permissão para acessar essa página</strong>';
    exit;
}
?>

<div id="topo">
    <h1 class="tit"><img src="../images/tit/tit_conta.png" alt="Título" />Agências dos Correios</h1>
    <hr class="tit" />
</div>
<div id="meio"><?php 
$correioDAO = new CorreioDAO();
$empresaDAO = new EmpresaDAO();
$lista = $empresaDAO->listarTodasFranquias();
pt_register('GET', 'id');
$con = $correioDAO->selectPorId($id, $controle_id_empresa);
pt_register('POST', 'submit');
if ($submit and $controle_id_empresa == 1) {
    //check for errors
    $errors = array();
    $done = false;
    $error = "<b>Ocorreram os seguintes erros:</b><ul>";
    pt_register('POST', 'id_empresa');
    pt_register('POST', 'nome');
    pt_register('POST', 'agencia');
    pt_register('POST', 'status');
    pt_register('POST', 'data_cartaz');
예제 #6
0
require 'header.php';
$permissao = verifica_permissao('Empresa', $controle_id_departamento_p, $controle_id_departamento_s);
if ($controle_id_empresa != 1) {
    echo '<br><br><strong>Você não tem permissão para acessar essa página</strong>';
    exit;
}
?>

<div id="topo">
    <h1 class="tit"><img src="../images/tit/tit_conta.png" alt="Título" />Agências dos Correios</h1>
    <hr class="tit" />
</div>
<div id="meio">
<?php 
$correioDAO = new CorreioDAO();
$empresaDAO = new EmpresaDAO();
$lista = $empresaDAO->listarTodas();
pt_register('POST', 'submit');
if ($submit) {
    //check for errors
    $errors = array();
    $done = false;
    $error = "<b>Ocorreram os seguintes erros:</b><ul>";
    pt_register('POST', 'id_empresa');
    pt_register('POST', 'nome');
    pt_register('POST', 'agencia');
    pt_register('POST', 'status');
    pt_register('POST', 'data_cartaz');
    pt_register('POST', 'endereco');
    pt_register('POST', 'bairro');