| Server IP : 20.75.53.88 / Your IP : 216.73.217.72 [ 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/juridico/quixada/modulos/empresa/ |
Upload File : |
<?php
/**
* Created by PhpStorm.
* User: RalpAlves
* Date: 12/04/2016
* Time: 10:07
*/
// session_start("3b71c625dfc95ca336cac7f27b3c2b0b");
// $idusu = $_SESSION['idusu'];
ini_set('display_errors', 'off');
//$conn = conexao::getInstance();
$var = $_GET['var'];
$id = $_POST['codigo'];
$cnpj = $_POST['cnpj'];
$empresa = strtoupper($_POST['empresa']);
$endereco = strtoupper($_POST['endereco']);
$complemento = strtoupper($_POST['complemento']);
$bairro = strtoupper($_POST['bairro']);
$cidade = strtoupper($_POST['cidade']);
$cep = $_POST['cep'];
$fone = $_POST['fone'];
$fax = $_POST['fax'];
$email = $_POST['email'];
$site = $_POST['site'];
$smtp = $_POST['smtp'];
$id = $_POST['id'];
$senhaemail = $_POST['senhaemail'];
$porta = $_POST['porta'];
if ($var=='incluir') {
try {
$grava = $conn->prepare("insert into empresa
(empresa,endereco,fone,fax,bairro,cep,email,site,cnpj,cidade,complemento,
smtp,id,senhaemail,porta)
value
($empresa,$endereco,$fone,$fax,$bairro,$cep,$email,$site,$cnpj,$cidade,$complemento)");
$grava->execute();
$a = new aviso();
$a->avisoSucesso('?page=empresa/empresa', 'Jurisprudencia <strong>' . $materia . '</strong > adicionada com sucesso!', 'Inclusão de registro');
} catch (PDOException $e) {
$a = new aviso();
$a->avisoErro('?page=empresa/empresa', '<strong>' . $e->getMessage() . '</strong >', 'Erro ao incluir registro');
}
}
if ($var=='editar') {
try {
$grava = $conn->prepare("update empresa set
empresa='$empresa', endereco='$endereco',fone='$fone',fax='$fax',bairro='$bairro',
cep='$cep',email='$email',site='$site',cnpj='$cnpj',cidade='$cidade',complemento='$complemento',
smtp='$smtp',id='$id',senhaemail='$senhaemail',porta='$porta',
usanet='1',sendmail='1',msnniver='1',verificaagenda='1',n1='1',l='1',n2='1',maxi='1',autenticacao='1',
separar_honorarios='1',verificacpf='1',mescontrato='1',anocontrato='2016',lancar_contratos='1',
cod_fat='1',usa_tls='S', logo='1',usa_ssl='S'
where codigo='$id'");
$grava->execute();
$a = new aviso();
$a->avisoSucesso('?page=empresa/empresa', 'Empresa <strong>' . $empresa . '</strong > alterada com sucesso!', 'Edição de registro');
} catch (PDOException $e) {
$a = new aviso();
$a->avisoErro('?page=empresa/empresa', '<strong>' . $e->getMessage() . '</strong >', 'Erro ao editar registro');
}
}