<tr>
				<td class="tabela_tit"><strong>ID </strong></td>
				<td class="tabela_tit"><strong>Cliente </strong></td>
				<td class="tabela_tit"><strong>Data </strong></td>
				<td class="tabela_tit"><strong>Erros </strong></td>
				<td class="tabela_tit"><strong>Excel </strong></td>
			</tr>
			<?php 
$arquivoitemDAO = new ArquivoItemDAO();
$lista = $arquivoitemDAO->listaRemessaC($controle_id_empresa);
$p_valor = '';
foreach ($lista as $l) {
    $p_valor .= '
					<tr>
						<td class="result_celula"> ' . $l->id_arquivo . '</td>
						<td class="result_celula"> ' . $l->nome . '</td>
						<td class="result_celula"> ' . invert($l->data, '/', 'PHP') . '</td>
						<td class="result_celula"> <a href="pedido_remessa_cc.php?id_arquivo=' . $l->id_arquivo . '">' . $l->erros . '</a></td>
						<td class="result_celula"> <a href="gera_remessa_c.php?id_arquivo=' . $l->id_arquivo . '" target="_blank">Download</a></td>
					</tr>';
}
echo $p_valor;
?>
		</table>
		</center>
		</td>
	</tr>
</table>
</div>
			<?php 
require 'footer.php';
Exemplo n.º 2
0
    if (!is_id($id) || !in_array($key, $glk_forums)) {
        die('The id or the key is not valid!');
    }
    $result = $db->query("SELECT `f_{$key}` AS `{$key}`, gid FROM {$db->pre}fgroups WHERE fid = '{$id}' LIMIT 1", __LINE__, __FILE__);
    $perm = $db->fetch_assoc($result);
    if ($db->num_rows($result) == 0) {
        die('Not found!');
    }
    if (in_array($key, $guest_limitation)) {
        $result = $db->query("SELECT id FROM {$db->pre}groups WHERE guest = '1' LIMIT 1");
        $row = $db->fetch_assoc($result);
        if ($perm['gid'] == $row['id']) {
            die('Guests can not vote or edit posts!');
        }
    }
    $perm = invert($perm[$key]);
    $db->query("UPDATE {$db->pre}fgroups SET `f_{$key}` = '{$perm}' WHERE fid = '{$id}' LIMIT 1", __LINE__, __FILE__);
    $delobj = $scache->load('fgroups');
    $delobj->delete();
    die(strval($perm));
} elseif ($job == 'rights_add') {
    echo head();
    $id = $gpc->get('id', int);
    if ($id == 0) {
        error('admin.pgp?action=forums&job=manage', 'Forum not found');
    }
    $result = $db->query("SELECT id, name FROM {$db->pre}groups ORDER BY admin DESC , guest ASC , core ASC", __LINE__, __FILE__);
    $result2 = $db->query("SELECT gid FROM {$db->pre}fgroups WHERE bid = '{$id}'", __LINE__, __FILE__);
    $cache = array();
    $cache2 = array();
    while ($row = $db->fetch_num($result2)) {
Exemplo n.º 3
0
    ?>
"></td>
	  </tr>
	 </table>
	</form>
	<?php 
    echo foot();
} elseif ($job == 'sitestatus2') {
    echo head();
    $c->getdata();
    $c->updateconfig('foffline', int);
    $filesystem->file_put_contents('data/offline.php', $gpc->get('template', none));
    $c->savedata();
    ok('admin.php?action=settings&job=settings');
} elseif ($job == 'ajax_sitestatus') {
    $new = invert($config['foffline']);
    $c->getdata();
    $c->updateconfig('foffline', int, $new);
    $c->savedata();
    die(strval($new));
} elseif ($job == 'datetime') {
    echo head();
    $config = $gpc->prepare($config);
    ?>
	<form name="form" method="post" action="admin.php?action=settings&job=datetime2">
	 <table class="border" border="0" cellspacing="0" cellpadding="4" align="center">
	  <tr>
	   <td class="obox" colspan="2"><b><?php 
    echo $lang->phrase('admin_date_time_edit');
    ?>
</b></td>
foreach ($empresas as $emp) {
    $id_empresa = $emp->id_empresa;
    echo "\n " . $emp->fantasia . " ";
    $nomeArquivo = 'clientes_' . md5(date("Ymdhms")) . "_" . $emp->id_empresa . ".xls";
    $arquivoDiretorio = "../relatorios/clientes/" . $nomeArquivo;
    $pedidos = $pedidoDAO->listaPedidosClientePJ($emp->id_empresa, $data_i, $data_f);
    if (count($pedidos) == 0) {
        continue;
    }
    $excel = new ExcelWriter($arquivoDiretorio);
    if (!$excel) {
        echo $excel->error;
        continue;
    }
    $excel->writeLine(array('Ranking de Clientes da unidade ' . $emp->fantasia));
    $excel->writeLine(array('Referente ' . invert($data_i, '/', 'PHP') . ' até ' . invert($data_f, '/', 'PHP')));
    $excel->writeLine(array(""));
    $excel->writeLine(array("CLIENTE", "CNPJ", "TOTAL", "PEDIDOS"));
    foreach ($pedidos as $p) {
        $excel->writeLine(array($p->nome, $p->cpf, $p->total, $p->pedidos));
        #grava no banco de dados
        $dados = new stdClass();
        $dados->id_empresa = $emp->id_empresa;
        $dados->data = $ano_mes . '-' . $ultimo_dia;
        $dados->cliente = $p->nome;
        $dados->cnpj = $p->cpf;
        $dados->total = $p->total;
        $dados->pedidos = $p->pedidos;
        $relatorioDAO->insereDadosClientes($dados);
    }
    $excel->close();
Exemplo n.º 5
0
function writeGPIO($target, $state)
{
    return invert($target, exec("/usr/bin/gpio write " . $target["gpioNumber"] . " " . invert($target, $state)));
}
Exemplo n.º 6
0
     $j++;
 }
 if ($busca_e_cidade == 'on') {
     $worksheet->write($i, $j, $l->certidao_cidade, $styleleft);
     $j++;
 }
 if ($busca_e_atividade == 'on') {
     $worksheet->write($i, $j, $l->atividade, $styleleft);
     $j++;
 }
 if ($busca_e_status == 'on') {
     $worksheet->write($i, $j, $l->status, $styleleft);
     $j++;
 }
 if ($busca_e_agenda == 'on') {
     $worksheet->write($i, $j, invert($l->data_i, '/', 'PHP'), $stylecenter);
     $j++;
 }
 if ($busca_e_valor == 'on') {
     $worksheet->write($i, $j, $l->valor, $stylereal);
     $j++;
 }
 if ($busca_e_departamento == 'on') {
     $worksheet->write($i, $j, $l->departamento, $styleleft);
     $j++;
 }
 if ($busca_e_atendimento == 'on') {
     $worksheet->write($i, $j, $l->atendente, $styleleft);
     $j++;
 }
 if ($busca_e_responsavel == 'on') {
Exemplo n.º 7
0
<?php

if (defined('VISCACHA_CORE') == false) {
    die('Error: Hacking Attempt');
}
// PK: MultiLangAdmin
$lang->group("admin/frames");
if ($job == 'menu') {
    $interface = $gpc->get('interface', int);
    if ($interface == 1) {
        $my->settings['admin_interface'] = invert($my->settings['admin_interface']);
    }
    ?>
	<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
	<html>
	<head>
	<title><?php 
    echo $lang->phrase("admin_navigationtitle");
    ?>
</title>
	<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
	<meta http-equiv="pragma" content="no-cache">
	<link rel="stylesheet" type="text/css" href="admin/html/menu.css">
	<link rel="copyright" href="http://www.viscacha.org">
	<script src="templates/global.js" language="Javascript" type="text/javascript"></script>
	<script src="admin/html/admin.js" language="Javascript" type="text/javascript"></script>
	</head>
	<body onload="init()">
	<p class="center"><a href="admin.php?action=index" target="Main"><img src="admin/html/images/logo.png" alt="Viscacha" /></a></p>
	<p class="stext center"><a href="admin.php?action=frames&amp;job=menu&amp;interface=1" target="_self"><?php 
    echo $lang->phrase(iif($my->settings['admin_interface'] == 1, 'admin_switch_simple', 'admin_switch_extended'));
foreach ($dt as $b => $res) {
    $mostrar = 0;
    if ($exp_item->id_usuario == 1) {
        $mostrar = 1;
    }
    if (in_array(29, $exp_item->id_departamento_p) && $mostrar == 0) {
        $mostrar = 1;
    }
    if ($mostrar == 0 && $res->id_usuario == $exp_item->id_usuario) {
        $mostrar = 1;
    }
    $color = $color == '#FFF' ? '#F8F8F8' : '#FFF';
    echo '<tr>';
    if ($mostrar == 1) {
        echo '<td class="result_celula" style="text-align:center;background-color:' . $color . '"><a href="fichas-editar.php?id_ficha=' . $res->id_ficha . '&aba=3">' . $res->id_ficha . '</a></td>';
    } else {
        echo '<td class="result_celula" style="text-align:center;background-color:' . $color . '">' . $res->id_ficha . '</td>';
    }
    echo '<td class="result_celula" style="text-align:center;background-color:' . $color . '">' . invert($res->agenda, '/', 'PHP') . '</td>';
    echo '<td class="result_celula" style="background-color:' . $color . '">' . ucwords(strtolower($res->cliente)) . '</td>';
    echo '<td class="result_celula" style="background-color:' . $color . '">' . ucwords(strtolower($res->consultor)) . '</td>';
    echo '<td class="result_celula" style="background-color:' . $color . '">' . ucwords(strtolower($res->relacionamento)) . '</td>';
    echo '<td class="result_celula" style="text-align:center;background-color:' . $color . '">' . $res->status1 . '</td>';
    echo '</tr>';
    echo '<tr>';
    echo '<td colspan="6" class="result_celula" style="background-color:' . $color . ';border-bottom:2px #D5D5D5 dashed"><b>Observação: </b>' . strtolower($res->obs) . '<br />&nbsp;</td>';
    echo '</tr>';
}
?>
</table>
    if ($dias < $item[$i]['dias']) {
        $dias = $item[$i]['dias'];
    }
}
$prazo = somar_dias_uteis($pedido->data, $dias);
$financeiroDAO = new FinanceiroDAO();
$recebimentos = $financeiroDAO->listarRecebimentos($id_pedido);
$sinal = 0;
foreach ($recebimentos as $r) {
    $sinal = (double) $sinal + (double) $r->financeiro_valor;
}
$saldo = $valor - $sinal;
if ($pdf->GetY() >= 20) {
    $pdf->AddPage();
}
$pdf->setY(21);
$pdf->Cell(5, 0.7, 'Prazo de Entrega ' . invert($prazo, '/', 'PHP') . ' ', '', 0);
$pdf->setY(22);
$pdf->setX(12.65);
$pdf->Cell(5, 0.7, 'Total: R$', '', 0, 'R');
$pdf->Cell(2.5, 0.5, $valor != 0 ? number_format($valor, 2) : '', 'B', 1, 'R');
$pdf->setX(12.65);
$pdf->Cell(5, 0.7, 'Sinal: R$', '', 0, 'R');
$pdf->Cell(2.5, 0.5, $sinal != 0 ? number_format($sinal, 2) : '', 'B', 1, 'R');
$pdf->setX(12.65);
$pdf->Cell(5, 0.7, 'Saldo: R$', '', 0, 'R');
$pdf->Cell(2.5, 0.5, $saldo != 0 && $sinal != 0 ? number_format($saldo, 2) : '', 'B', 1, 'R');
$pdf->Cell(10, 0.5, 'Assinatura do cliente', 'T', 1);
$pdf->SetY(25.5);
$pdf->Cell(0, 0.5, $responsavel_empresa, 0, 1, 'C');
$pdf->Output();
require "../includes/funcoes.php";
require "../includes/global.inc.php";
pt_register('GET', 'id_financeiro');
pt_register('GET', 'id_pedido_item');
if ($id_financeiro != '' and $id_pedido_item != '') {
    $sql = "SELECT f.*, uu.nome FROM vsites_financeiro as f, vsites_user_usuario as uu where f.id_pedido_item='{$id_pedido_item}' and f.id_financeiro='{$id_financeiro}' and f.financeiro_tipo='Desembolso' and f.id_usuario = uu.id_usuario";
    $query = $objQuery->SQLQuery($sql);
    $res = mysql_fetch_array($query);
    $nome = $res['nome'];
    $financeiro_tipo = $res['financeiro_tipo'];
    $financeiro_data = $res['financeiro_data'];
    $financeiro_data = invert($financeiro_data, '/', 'php') . ' ' . substr($res["financeiro_data"], 11, 8);
    $financeiro_nossa_conta = $res['financeiro_nossa_conta'];
    $financeiro_autorizacao = $res['financeiro_autorizacao'];
    $financeiro_autorizacao_data = $res['financeiro_autorizacao_data'];
    $financeiro_autorizacao_data = invert($financeiro_autorizacao_data, '/', 'php') . ' ' . substr($res["financeiro_autorizacao_data"], 11, 8);
    $financeiro_conferido = $res['financeiro_conferido'];
    $financeiro_classificacao = $res['financeiro_classificacao'];
    $financeiro_banco = $res['financeiro_banco'];
    $financeiro_agencia = $res['financeiro_agencia'];
    $financeiro_conta = $res['financeiro_conta'];
    $financeiro_identificacao = $res['financeiro_identificacao'];
    $financeiro_favorecido = $res['financeiro_favorecido'];
    $financeiro_cpf = $res['financeiro_cpf'];
    $financeiro_descricao = $res['financeiro_descricao'];
    $financeiro_desembolsado = $res['financeiro_desembolsado'];
    $financeiro_troco = $res['financeiro_troco'];
    $res['financeiro_valor'] = strlen($res['financeiro_valor']) > 0 ? $res['financeiro_valor'] : 0;
    $res['financeiro_sedex'] = strlen($res['financeiro_sedex']) > 0 ? $res['financeiro_sedex'] : 0;
    $res['financeiro_rateio'] = strlen($res['financeiro_rateio']) > 0 ? $res['financeiro_rateio'] : 0;
    $financeiro_valor = number_format($res['financeiro_valor'], 2, ".", "");
<?php

require "../includes/verifica_logado_ajax.inc.php";
require "../includes/funcoes.php";
require "../includes/global.inc.php";
require "../includes/geraexcel/excelwriter.inc.php";
pt_register('POST', 'datai');
pt_register('POST', 'dataf');
$datai_sql = invert($datai, '-', 'SQL') . ' ' . substr($datai, 11, 8);
$dataf_sql = invert($dataf, '-', 'SQL') . ' ' . substr($dataf, 11, 8);
//Você pode colocar aqui o nome do arquivo que você deseja salvar.
$arquivoDiretorio = "./exporta/" . $controle_id_usuario . ".xls";
$nomeArquivo = $controle_id_usuario . ".xls";
$excel = new ExcelWriter($arquivoDiretorio);
if ($excel == false) {
    echo $excel->error;
    exit;
}
//Escreve o nome dos campos de uma tabela
$myArr = array('COMISSIONADO', 'PEDIDO', 'CLIENTE', 'VALOR RECEBIDO', 'COMISSÃO');
$excel->writeLine($myArr);
$sql = $objQuery->SQLQuery("SELECT SUM(f.financeiro_valor) as valor, SUM(f.financeiro_valor/100*1.5) as comissao, pi.ordem, pi.id_pedido, c.nome as nome_cli, ucom.nome, ucom.id_usuario from\n    vsites_pedido_item as pi, vsites_pedido as p, (select u.id_usuario, u.id_empresa from vsites_user_usuario as u) as u, vsites_user_usuario as ucom, vsites_financeiro as f, (select * from vsites_user_cliente as c where c.id_usuario_com<>'' group by cpf) as c where\n    u.id_empresa='" . $controle_id_empresa . "' and\n\tu.id_usuario = pi.id_usuario and\n\tpi.id_status != '14' and\n\tpi.id_pedido = p.id_pedido and\n\tp.cpf = c.cpf and\n\tp.cpf!='000.000.000-00' and \n\tp.cpf!='00.000.000/0000-00' and \n\tp.cpf!='' and\n\tc.id_usuario_com=ucom.id_usuario and\n\tpi.id_pedido_item=f.id_pedido_item and\n\tf.financeiro_tipo='Recebimento' and\n    f.financeiro_autorizacao='Aprovado' and\n    f.financeiro_autorizacao_data >= '" . $datai_sql . "' and\n    f.financeiro_autorizacao_data <= '" . $dataf_sql . "'\n\tgroup by f.id_pedido_item\n    order by ucom.nome, pi.id_pedido, pi.ordem");
$total_comissao = 0;
$total = 0;
$cont = 0;
$old_id_usuario = '';
while ($res = mysql_fetch_array($sql)) {
    $id_usuario = $res['id_usuario'];
    if ($old_id_usuario != $id_usuario and $cont >= '1') {
        $myArr = array('', '', 'Total', $total, $total_comissao);
        $excel->writeLine($myArr);
}
if (strlen($dia) == 1) {
    $dia2 = '0' . $dia;
} else {
    $dia2 = $dia;
}
if ($controle_id_usuario != 1 && $controle_id_usuario != 56 && $controle_id_usuario != 272 && $controle_id_usuario != 1245) {
    $onde = " and id_user_alt='" . $controle_id_usuario . "'";
} else {
    $onde = '';
}
$sql = "select id_ficha, id_user_alt as id_usuario, observacao as obs, data_reuniao as agenda from site_ficha_cadastro_historico as e where date_format(data_reuniao,'%Y-%m-%d')='" . $ano . "-" . $mes2 . "-" . $dia2 . "' and data_reuniao!='0000-00-00' " . $onde;
$query = $objQuery->SQLQuery($sql);
?>
<h2>Dia <?php 
echo (int) $dia;
?>
 de <?php 
echo mes_ext($mes);
?>
 de <?php 
echo (int) $ano;
?>
</h2>
<ul>
<?php 
while ($res = mysql_fetch_array($query)) {
    echo '<li><a href="expansao_interessados_edit.php?id=' . $res['id_ficha'] . '"><b>' . invert($res['agenda'], '/', 'PHP') . '</b></a> - ' . $res['obs'] . '</li>';
}
?>
</ul>
$worksheet =& $workbook->addWorksheet('ordem');
for ($j = 0; $j < count($titulo); $j++) {
    $estilo = $style1;
    if ($j == count($titulo) - 1) {
        $estilo = $style2;
    }
    $worksheet->write(0, $j, $titulo[$j], $estilo);
    $worksheet->setColumn(1, $j, $size[$j]);
}
$conveniado = $ConveniadoDAO->GeraExportaTodos();
$i = 0;
foreach ($conveniado as $c => $conv) {
    $i++;
    $cpf = ' ';
    $cnpj = ' ';
    if ($conv->certidao_cnpj != '') {
        $cnpj = formatarCPF_CNPJ($conv->certidao_cnpj, true);
    }
    if ($conv->certidao_cpf != '') {
        $cpf = formatarCPF_CNPJ($conv->certidao_cpf, true);
    }
    $texto = array(' #' . $conv->id_pedido . '/' . $conv->ordem, invert($conv->inicio, '/', 'PHP'), invert($conv->data_prazo, '/', 'PHP'), invert($conv->data_atividade, '/', 'PHP'), invert($conv->operacional, '/', 'PHP'), $cpf, $cnpj, ucwords(strtolower($conv->certidao_nome)), ucwords(strtolower($conv->certidao_devedor)), ucwords(strtolower($conv->servico)), strtoupper($conv->certidao_estado), ucwords(strtolower($conv->certidao_cidade)), ucwords(strtolower($conv->atividade)), ucwords(strtolower($conv->status)), ucwords(strtolower($conv->atendente)), ucwords(strtolower($conv->responsavel)), ucwords(strtolower($conv->certidao_resultado)));
    for ($j = 0; $j < count($titulo); $j++) {
        $estilo = $style3;
        if ($j == count($titulo) - 1) {
            $estilo = $style4;
        }
        $worksheet->write($i, $j, $texto[$j], $estilo);
    }
}
$workbook->close();
 /**
  * verifica permissão de alterar pedido
  * @param int $id_pedido_item
  * @param int $id_empresa
  * @param array $departamento_p
  * @param array $departamento_s
  * @param array $p
  */
 public function verificaPermissaoEdit($id_pedido_item, $id_empresa, $departamento_p, $departamento_s, $p)
 {
     $p_valor = array();
     $this->sql = "SELECT pi.inicio, pi.dias, sd.id_departamento_resp, pi.id_status, pi.encerramento, pi.id_empresa_resp, pi.operacional, pi.id_usuario, pi.id_usuario_op from\n\t\t\t\tvsites_pedido_item as pi, vsites_servico_departamento as sd where\n\t\t\t\t\tpi.id_pedido_item=? and\n\t\t\t\t\tpi.id_servico_departamento = sd.id_servico_departamento";
     $this->values = array($id_pedido_item);
     $cont = $this->fetch();
     $id_status = $cont[0]->id_status;
     $operacional = $cont[0]->operacional;
     $dias_old = $cont[0]->dias;
     $inicio = $cont[0]->inicio;
     $encerramento = $cont[0]->encerramento;
     $id_departamento_resp = $cont[0]->id_departamento_resp;
     $id_usuario = $cont[0]->id_usuario;
     $id_usuario_op = $cont[0]->id_usuario_op;
     $id_empresa_resp = $cont[0]->id_empresa_resp;
     #verifica se o departamento tem permissão de alterar o pedido
     if (in_array('6', $departamento_p) != 1 and in_array('2', $departamento_p) != 1 and in_array('3', $departamento_p) != 1 and in_array('4', $departamento_p) != 1 and in_array('5', $departamento_p) != 1 and in_array('8', $departamento_p) != 1 and in_array('9', $departamento_p) != 1 and in_array('11', $departamento_p) != 1 and in_array('12', $departamento_p) != 1 and in_array('15', $departamento_p) != 1 and in_array('16', $departamento_p) != 1) {
         $p_valor['error'] .= '<li><b>Você não tem permissão para realizar essa operação!</b></li>';
         return $p_valor;
     }
     #verifica se tem permissão de alterar o pedido do departamento
     if (in_array($id_departamento_resp, $departamento_p) != 1 and in_array('6', $departamento_p) != 1 and in_array('2', $departamento_p) != 1) {
         $p_valor['error'] .= '<li><b>Você não tem permissão para realizar essa operação, esse pedido pertence a outro departamento.</b></li>';
         return $p_valor;
     }
     #verifica se a franquia tem permissão de alterar o pedido que está em execução por outra unidade
     if ($operacional == '0000-00-00' and $id_empresa_resp != '0' and $id_empresa_resp != $id_empresa and $id_status != 12) {
         $p_valor['error'] .= '<li><b>Você não tem permissão para realizar essa operação, porque outra franquia foi selecionada para executar o serviço.</b></li>';
         return $p_valor;
     }
     #verifica se o pedido foi concluido operacional e se a franquia pode alterar
     if ($operacional != '0000-00-00' and $id_empresa_resp != '0' and $id_empresa_resp == $id_empresa and $id_empresa != '1') {
         $p_valor['error'] .= '<li><b>Esse pedido já foi concluído por sua unidade e foi liberado para a franquia responsável pelo cadastro.</b></li>';
         return $p_valor;
     }
     #verifica se o pedido foi concluido a mais de 30 dias
     $data_atual = invert(SubtrairData(date('d/m/Y'), 30, 0, 0), '-', 'SQL') . ' 00:00:00';
     if ($encerramento != "0000-00-00 00:00:00" and $encerramento <= $data_atual and $id_empresa != 1) {
         $p_valor['error'] .= "<li><b>Esse pedido não pode ser alterado porque foi concluído a mais de 30 dias.</b></li>";
         return $p_valor;
     }
     #verifica alteração do valor
     if ($id_empresa_resp != '0' and $id_empresa_resp == $id_empresa and $p->valor != $p->old_valor) {
         $p_valor['error'] .= "<li><b>O campo \"valor\" não pode ser alterado porque o pedido já foi enviado para outra franquia. O valor deve ser cadastrado corretamente antes de enviar para a franquia.</b></li>";
         return $p_valor;
     }
     #verifica alteração do valor caso tenha sido liberado para o financeiro
     if ($p->valor != $p->old_valor and $operacional != '0000-00-00' and in_array('2', $departamento_p) != 1 and in_array('1', $departamento_p) != 1) {
         $p_valor['error'] .= "<li><b>O campo \"valor\" não pode ser alterado porque o pedido já foi concluído pelo operacional.</b></li>";
         return $p_valor;
     }
     #verifica alteração do valor caso tenha sido liberado para o financeiro
     if ($p->valor != $p->old_valor and $inicio != '0000-00-00 00:00:00' and in_array($id_departamento_resp, $departamento_s) != 1 and in_array('2', $departamento_p) != 1 and in_array('1', $departamento_p) != 1) {
         $p_valor['error'] .= "<li><b>O campo \"valor\" só pode ser alterado pelo supervisor do operacional ou financeiro.</b></li>";
         return $p_valor;
     }
     #verifica campo valor caso já tenha sido faturado .
     if ($p->valor != $p->old_valor and $p->id_fatura == 1) {
         $p_valor['error'] .= "<li><b>Essa ordem já foi faturada.<br>O campo \"valor\" não pode ser alterado.</b></li>";
         return $p_valor;
     }
     #verifica se o atendimento ainda pode alterar o pedido
     if ($id_status != 1 and $id_status != 2 and $id_status != 11 and $id_status != 12 and $id_status != 16 and in_array($id_departamento_resp, $departamento_p) != 1 and in_array('6', $departamento_p) == 1 and in_array('2', $departamento_p) != 1) {
         $p_valor['error'] .= "<li><b>Esse serviço já foi enviado para o departamento operacional e você não pode mais alterá-lo</b></li>";
         return $p_valor;
     }
     #verifica se o campo valor foi preenchido
     if ($p->valor == "" or $p->valor == "0") {
         $p_valor['error'] .= "<li><b>O campo \"valor\" precisa ser preenchido.</b></li>";
     }
     #verifica se a variação foi selecionada
     if ($p->id_servico_var == '' or $p->id_servico_var == '0') {
         $p_valor['error'] .= "<li><b>Selecione a variação do serviço.</b></li>";
     }
     #verifica se campo estado e cidade foram selecionados - 07/02/2013 - Rafael
     if (isset($p->certidao_estado)) {
         $erros_servico = 0;
         switch ($p->id_servico) {
             case 17:
                 $erros_servico = 1;
                 break;
         }
         if ($erros_servico == 0) {
             if (strlen($p->certidao_estado) == 0 or strlen($p->certidao_cidade) == 0) {
                 if (strlen($p->certidao_estado) == 0) {
                     $p_valor['error'] .= "<li><b>Preencha o campo UF.</b></li>";
                 }
                 if (strlen($p->certidao_cidade) == 0) {
                     $p_valor['error'] .= "<li><b>Preencha o campo Cidade.</b></li>";
                 }
             }
         }
     }
     $p_valor['data_prazo'] = somar_dias_uteis($inicio, $p->dias);
     return $p_valor;
 }
Exemplo n.º 15
0
     $p_valor .= '<td class="result_celula' . $class . '">' . $res["certidao_devedor"] . '</td>';
 }
 if ($busca_e_inicio == '') {
     $p_valor .= '<td class="result_celula' . $class . ' result_celula' . $erro_restricao . '" align="center" nowrap>' . invert($res["inicio"], '/', 'PHP') . '</td>';
 }
 if ($busca_e_conclu == '') {
     $p_valor .= '<td class="result_celula' . $class . ' result_celula' . $erro_atraso_op . '" align="center" nowrap>' . $data_operacional . '</td>';
 }
 if ($busca_e_prazo == '') {
     $p_valor .= '<td class="result_celula' . $class . ' result_celula' . $erro_atraso . '" align="center" nowrap>' . $data_prazo . '</td>';
 }
 if ($busca_e_agenda == '') {
     $p_valor .= '<td class="result_celula' . $class . '" align="center" nowrap>' . $data_agenda . ' ' . $status_hora . '</td>';
 }
 if ($busca_e_data_atividade == '') {
     $p_valor .= '<td class="result_celula' . $class . '" align="center" nowrap>' . invert($res["data_atividade"], '/', 'PHP') . '</td>';
 }
 if ($busca_e_valor == '') {
     $p_valor .= '<td class="result_celula' . $class . '" align="right" nowrap>' . $valor . '</td>';
 }
 if ($busca_e_departamento == '') {
     $p_valor .= '<td class="result_celula' . $class . '" nowrap>' . $res["departamento"] . '</td>';
 }
 if ($busca_e_servico == '') {
     $p_valor .= '<td class="result_celula' . $class . '" nowrap>' . $res["servico"] . '</td>';
 }
 if ($busca_e_cidade == '') {
     $p_valor .= '<td class="result_celula' . $class . '" align="center" nowrap>' . $res["certidao_cidade"] . '</td>';
 }
 if ($busca_e_estado == '') {
     $p_valor .= '<td class="result_celula' . $class . '" align="center" nowrap>' . $res["certidao_estado"] . '</td>';
Exemplo n.º 16
0
 $num_valor_google_c = '';
 $num_google_con = '';
 $num_valor_google_con = '';
 $num_google_f = '';
 $num_valor_google_f = '';
 #total de pedidos
 $query = $objQuery->SQLQuery("SELECT pi.data_prazo, pi.data, pi.inicio, pi.operacional, pi.dias, pi.id_status, pi.encerramento, pi.valor, pi.valor_rec as recebido, p.origem FROM \n\t\t\tvsites_pedido_item as pi,\n\t\t\tvsites_pedido as p, \n\t\t\tvsites_user_usuario as u \n\t\t\twhere \n\t\t\t\tpi.data >= '" . $ano . "-" . $mes . "-" . $dia . " 00:00:00' and  \n\t\t\t\tpi.data <= '" . $ano . "-" . $mes . "-" . $dia . " 23:59:59' and \n\t\t\t\tpi.id_usuario=u.id_usuario and u.id_empresa='" . $id_empresa . "' and \n\t\t\t\tpi.id_pedido=p.id_pedido " . $onde);
 $num_total = mysql_num_rows($query);
 $hoje = date('Y-m-d');
 while ($res = mysql_fetch_array($query)) {
     $data = $res['data'];
     $data = invert($data, '/', 'PHP');
     $data_prazo = invert($res['data_prazo'], '/', 'PHP');
     $data_prazo = invert($data_prazo, '-', 'SQL');
     $data_encerramento = invert($res['encerramento'], '/', 'PHP');
     $data_encerramento = invert($data_encerramento, '-', 'SQL');
     $data_operacional = $res['operacional'];
     $id_status = $res['id_status'];
     $num_valor_recebido = $res['recebido'];
     $origem = $res['origem'];
     if ($data_prazo < $hoje and $data_encerramento == '0000-00-00' or $data_prazo < $data_encerramento and $data_encerramento != '0000-00-00') {
         $num_atraso++;
     } else {
         $num_prazo++;
     }
     if ($data_prazo < $hoje and $data_operacional == '0000-00-00' or $data_prazo < $data_operacional and $data_operacional != '0000-00-00') {
         $num_atraso_op++;
     } else {
         $num_prazo_op++;
     }
     if ($id_status == 1 or $id_status == 16) {
Exemplo n.º 17
0
 $worksheet->write(2, 2, 'Início', $styletitulo3);
 $worksheet->write(2, 3, 'Prazo', $styletitulo3);
 $worksheet->write(2, 4, 'Valor', $styletitulo3);
 $worksheet->write(2, 5, 'Valor Recebido', $styletitulo3);
 $worksheet->write(2, 6, 'Status', $styletitulo3);
 $cont = 0;
 $i = 3;
 foreach ($ret as $r) {
     $j = 0;
     $worksheet->write($i, $j, $r->nome, $styleleft);
     $j++;
     $worksheet->write($i, $j, $r->id_pedido . '/' . $r->ordem, $stylecenter);
     $j++;
     $worksheet->write($i, $j, invert($r->inicio, '/', 'PHP'), $stylecenter);
     $j++;
     $worksheet->write($i, $j, invert($r->prazo, '/', 'PHP'), $stylecenter);
     $j++;
     $worksheet->write($i, $j, $r->valor, $stylereal);
     $j++;
     $worksheet->write($i, $j, $r->valor_rec, $stylereal);
     $j++;
     $worksheet->write($i, $j, $r->status, $styleleft);
     $j++;
     $i++;
     $total->valor = (double) $total->valor + (double) $r->valor;
     $total->valor_rec = (double) $total->valor_rec + (double) $r->valor_rec;
 }
 $j = 0;
 $worksheet->write($i, $j, '', $stylebg);
 $j++;
 $worksheet->write($i, $j, '', $stylebg);
Exemplo n.º 18
0
			</tr>
			<tr>
				<td align="center" width="80" class="result_menu"><b>Cod. Protesto</b></td>
				<td align="left" class="result_menu"><b>Portador</b></td>
				<td align="center" width="80" class="result_menu"><b>Movimento</b></td>
				<td align="center" width="80" class="result_menu"><b>Devedores</b></td>
				<td align="center" width="80" class="result_menu"><b>Gerar</b></td>
				<td align="center" width="80" class="result_menu"><b>Editar</b></td>
			</tr>

			<?php 
$p_valor = '';
foreach ($protestos as $protesto) {
    $p_valor .= '<tr><td class="result_celula">' . $protesto->id_protesto . '</a></td>';
    $p_valor .= '<td class="result_celula" align="left">' . $protesto->portador . ' -' . $protesto->portador_nome . '</a></td>';
    $p_valor .= '<td class="result_celula" align="center">' . invert($protesto->data_movimento, '/', 'PHP') . '</a></td>';
    $p_valor .= '<td class="result_celula" align="center"><a href="protesto_rem.php?id=' . $protesto->id_protesto . '"><img src="../images/botao_editar.png" title="Editar" border="0"/></a></td>';
    $p_valor .= '<td class="result_celula" align="center"><a href="gera_protesto_rem.php?id=' . $protesto->id_protesto . '"><img src="../images/botao_editar.png" title="Editar" border="0"/></a></td>';
    $p_valor .= '<td class="result_celula" align="center"><a href="protesto_edit.php?id=' . $protesto->id_protesto . '"><img src="../images/botao_editar.png" title="Editar" border="0"/></a></td>';
    $p_valor .= '</tr>';
}
echo $p_valor;
?>
			<tr>
				<td colspan="9" class="barra_busca"><?php 
$protestoDAO->QTDPagina();
?>
</td>
			</tr>
		</table>
		</td>
Exemplo n.º 19
0
				<div class="form_estilo_r" style="width:130px; font-weight:bold; float:left">Agenda</div>
				<div class="form_estilo_r" style="width:130px; font-weight:bold; float:left">Atividade</div>
				<div class="form_estilo_r" style="width:130px; font-weight:bold; float:left">Nome</div>
				<div class="form_estilo_r" style="width:200px; font-weight:bold; float:left">Obs</div><br />';
$ativs = $atividadeDAO->listaAtividadesPedido($id_pedido_item);
foreach ($ativs as $ati) {
    if ($ati->status_dias != 0 or $ati->status_hora != '00:00:00') {
        $data_agenda = somar_dias_uteis($ati->data_i, $ati->status_dias);
        $data_agenda = invert($data_agenda, '/', 'PHP') . ' ' . $ati->status_hora;
    } else {
        $data_agenda = '';
    }
    $status_obs_ativ = str_replace("'", '', str_replace('"', '', substr($ati->status_obs, 0, 27)));
    $nome_ativ = str_replace("'", '', str_replace('"', '', substr($ati->nome, 0, 27)));
    $p_valor .= '
					<div style="width:130px; float:left; clear:left" class="form_estilo_r"/>' . invert($ati->data_i, '/', 'PHP') . ' ' . substr($ati->data_i, 11, 8) . '</div>
					<div style="width:130px; float:left" class="form_estilo_r"/>' . $data_agenda . '</div>
					<div style="width:130px; float:left" class="form_estilo_r"/>' . substr($ati->atividade, 0, 15) . '</div>
					<div style="width:130px; float:left" class="form_estilo_r"/>' . substr($nome_ativ, 0, 15) . '</div>
					<div style="width:200px; float:left" class="form_estilo_r"/>' . $status_obs_ativ . '</div>
					<input type="button" name="Ler_' . $ati->id_pedido_status . '" value="Ler" onclick="carrega_pedido_status(\'' . $ati->id_pedido_status . '\'); $(\'#windowMensagem\').show();" class="button_busca" style="width:35px; float:left;" ><br />';
}
echo $p_valor;
?>
</td>
	</tr>
	<tr>
		<td colspan="4" id="carrega_log_ativ">
		<a href="javascript:void();" onclick="carrega_atividade_log('<?php 
echo $id_pedido_item;
?>
<?php

$errors = 0;
$result = '';
if (in_array('2', $departamento_p) != 1) {
    $errors = 1;
    $result .= '<br><br><strong>Você não tem permissão para realizar essa operação.</strong>';
    exit;
}
pt_register('POST', 'financeiro_descricao');
pt_register('POST', 'financeiro_forma');
pt_register('POST', 'financeiro_data_p');
pt_register('POST', 'financeiro_identificacao');
pt_register('POST', 'financeiro_nossa_conta');
pt_register('POST', 'financeiro_classificacao');
$financeiro_data_p = invert($financeiro_data_p, '-', 'SQL');
$f->financeiro_descricao = $financeiro_descricao;
$f->financeiro_forma = $financeiro_forma;
$f->financeiro_data_p = $financeiro_data_p;
$f->financeiro_identificacao = $financeiro_identificacao;
$f->financeiro_nossa_conta = $financeiro_nossa_conta;
$f->financeiro_classificacao = $financeiro_classificacao;
if ($financeiro_nossa_conta == "") {
    $errors = 1;
    $result .= '<div class="erro"><strong>O campo conta é obrigatório.</strong><br>
		<a href="conta.php">Cadastrar Conta</a></div>';
}
if ($financeiro_forma == "") {
    $errors = 1;
    $result .= '<div class="erro"><strong>O campo forma é obrigatório.</strong><br>
		<a href="conta.php">Cadastrar Conta</a></div>';
Exemplo n.º 21
0
  </tr>
  <tr>
   <td class="ubox" width="100%" colspan=2 align="center"><input type="submit" name="Submit" value="<?php 
    echo $lang->phrase('admin_bbc_add');
    ?>
"></td>
  </tr>
 </table>
</form>
	<?php 
    echo foot();
} elseif ($job == 'smileys_ajax_pos') {
    $id = $gpc->get('id', int);
    $result = $db->query("SELECT b.show FROM {$db->pre}smileys AS b WHERE id = '{$id}' LIMIT 1");
    $use = $db->fetch_assoc($result);
    $use = invert($use['show']);
    $db->query("UPDATE {$db->pre}smileys AS b SET b.show = '{$use}' WHERE id = '{$id}' LIMIT 1");
    $delobj = $scache->load('smileys');
    $delobj->delete();
    echo strval($use);
    exit;
} elseif ($job == 'smileys_add') {
    echo head();
    $error = array();
    $path = 'temp/';
    $dir = realpath($path);
    $insertuploads = array();
    $inserterrors = array();
    require "classes/class.upload.php";
    $img = $gpc->get('img', str);
    $has_upload = false;
    $p_valor .= '
			<tr>
			<td class="result_celula" align="center" nowrap>
			<input type="hidden" name="acao_' . $cont . '" value="' . $id_re . '"/>
			<input type="hidden" name="acao_pedido_' . $cont . '" value="' . $l->id_pedido . '/' . $l->ordem . '"/>
			<input type="checkbox" name="acao_sel_' . $cont . '" value="' . $id_re . '" onclick="if(this.checked==true) { createCookie(\'ff_id_pedido_item\',\'' . $id_re . ',\',\'1\',\'1\'); createCookie(\'ff_id_pedido\',\'#' . $l->id_pedido . '/' . $l->ordem . ',\',\'1\',\'1\'); } else {eraseCookieItem(\'ff_id_pedido_item\',\'' . $id_re . '\'); eraseCookieItem(\'ff_id_pedido\',\'#' . $l->id_pedido . '/' . $l->ordem . '\'); }" ' . $item_checked . ' />
			</td>
			<td class="result_celula" align="center"><a href="pedido_edit.php?id=' . $l->id_pedido . '&ordem=' . $l->ordem . '" target="_blank"><img src="../images/botao_editar.png" title="Editar" border="0"/></a></td>
			<td class="result_celula" align="center" nowrap>#' . $l->id_pedido . '/' . $l->ordem . '</td>
			<td class="result_celula" nowrap>' . $l->fantasia . '</td>
			<td class="result_celula" nowrap>R$ ' . $l->financeiro_custas . '</td>
			<td class="result_celula" nowrap>R$ ' . $l->financeiro_sedex . '</td>
			<td class="result_celula" nowrap>R$ ' . $l->financeiro_rateio . '</td>
			<td class="result_celula" nowrap>R$ ' . $l->financeiro_valor . '</td>
			<td class="result_celula" align="center" nowrap>R$ ' . $financeiro_valor_f . '</td>
			<td class="result_celula" nowrap>' . invert($l->financeiro_autorizacao_data, '/', 'PHP') . '</td>
			<td class="result_celula" nowrap>' . $l->servico . '</td>
			</tr>';
}
$financeiro_valor_f_total = 'R$ ' . number_format($financeiro_valor_f_total, 2, ".", ",");
$financeiro_valor_total = 'R$ ' . number_format($financeiro_valor_total, 2, ".", ",");
$financeiro_valor_stotal = 'R$ ' . number_format($financeiro_valor_stotal, 2, ".", ",");
$financeiro_valor_vtotal = 'R$ ' . number_format($financeiro_valor_vtotal, 2, ".", ",");
$financeiro_valor_rtotal = 'R$ ' . number_format($financeiro_valor_rtotal, 2, ".", ",");
$comissao_total = 'R$ ' . number_format($comissao_total, 2, ".", ",");
$p_valor .= '
		<tr>
		<td class="result_celula" align="center" nowrap></td>
		<td class="result_celula" align="center" nowrap></td>
		<td class="result_celula" align="center" nowrap></td>
		<td class="result_celula" align="right" nowrap>Total</td>
Exemplo n.º 23
0
foreach ($pagamentos as $p) {
    $classe = $p->dt_vencimento < date("Y-m-d") && $p->dt_pagamento == '//' ? 'result_celula_erro' : '';
    if ($p->fisico == '1') {
        $fisico = 'Sim';
    } else {
        $fisico = 'Não';
    }
    $p_valor .= '<tr>
                                <td class="result_celula" align="center"><a href="pagamento_edit.php?id_pagamento=' . $p->id_pagamento . '"><img src="../images/botao_editar.png" title="Editar" border="0"/></a></td>
                                <td class="result_celula">' . $p->id_pagamento . '</td>
                                <td class="result_celula">' . $p->parcela . '/' . $p->qt_parcelas . '</td>
                                <td class="result_celula">' . $p->favorecido . '</td>
                                <td class="result_celula">' . $p->descricao . '</td>
                                <td class="result_celula">' . $p->forma_pagamento . '</td>
                                <td class="result_celula ' . $classe . '" align="right">' . $fisico . '</td>
                                <td class="result_celula">' . invert($p->dt_vencimento, '/', 'PHP') . '</td>
                                <td class="result_celula ' . $classe . '" align="right">R$ ' . $p->valor . '</td>
                                <td class="result_celula ' . $classe . '" align="right">R$ ' . $p->desconto . '</td>
                                <td class="result_celula ' . $classe . '" align="right">R$ ' . $p->vlr_multa . '</td>
                                <td class="result_celula ' . $classe . '" align="right">R$ ' . $p->valor_pg . '</td>
                                <td class="result_celula" align="center" id="exc_' . $p->id_pagamento . '">
                                    <a href="javascript:void();" onclick="' . $condicional . $p->id_pagamento . '\');"><img src="../images/botao_delete.png" title="Editar" border="0"/></a>
                                </td>
                            </tr>';
}
$res = $pagamentoDAO->result();
$p_valor .= '<tr>
                                <td class="result_celula" align="center"></td>
                                <td class="result_celula"></td>
                                <td class="result_celula"></td>
                                <td class="result_celula"></td>
 #header
 $worksheet->write(2, 0, 'Dia', $styletitulo3);
 $worksheet->write(2, 1, 'Faturamento', $styletitulo3);
 $worksheet->write(2, 2, 'Royalties', $styletitulo3);
 $worksheet->write(2, 3, 'FPP', $styletitulo3);
 $worksheet->write(2, 4, '', $stylebg);
 $p_valor = '';
 $num_fat = 0;
 $t_num_fat = 0;
 $t_num_royalties = 0;
 $t_num_propaganda = 0;
 $dia = 1;
 $pedidos = '';
 $done_roy = '';
 #meses entre data de hoje e data de inicio das atividades
 $qtddMeses = mesesEntreDatas(invert($emp->inicio, '/', 'PHP'), '01/' . $mes_referencia);
 if ($qtddMeses > 1) {
     $qtddMeses--;
 }
 #inicia as variaveis que vão ser gravadas no banco de dados
 $dados = new stdClass();
 $dados->id_empresa = $emp->id_empresa;
 $dados->data = $ano_mes . '-01';
 $dados->valor_royalties = 0;
 $dados->valor_propaganda = 0;
 $dados->faturamento = 0;
 $dados->imposto = $imposto;
 $dados->roy = $royalties;
 $dados->despesa = 0;
 $dados->fixo = '';
 $linha = 2;
Exemplo n.º 25
0
	<?php 
    echo foot();
} elseif ($job == 'ajax_publicuse') {
    $id = $gpc->get('id', int);
    $result = $db->query("SELECT publicuse FROM {$db->pre}language WHERE id = '{$id}' LIMIT 1");
    $use = $db->fetch_assoc($result);
    if ($use['publicuse'] == 1) {
        if ($id == $config['langdir']) {
            die($lang->phrase('admin_lang_cannot_unpublish_until_defined_other_lang'));
        }
        $result = $db->query("SELECT * FROM {$db->pre}language WHERE publicuse = '1'");
        if ($db->num_rows($result) == 1) {
            die($lang->phrase('admin_lang_cannot_unpublish_because_no_other_lang'));
        }
    }
    $use = invert($use['publicuse']);
    $db->query("UPDATE {$db->pre}language SET publicuse = '{$use}' WHERE id = '{$id}' LIMIT 1");
    $delobj = $scache->load('loadlanguage');
    $delobj->delete();
    die(strval($use));
} elseif ($job == 'import') {
    echo head();
    $file = $gpc->get('file', str);
    $result = $db->query('SELECT id, language FROM ' . $db->pre . 'language ORDER BY language');
    ?>
<form name="form2" method="post" enctype="multipart/form-data" action="admin.php?action=language&job=import2">
 <table class="border" cellpadding="4" cellspacing="0" border="0">
  <tr><td class="obox" colspan="2"><?php 
    echo $lang->phrase('admin_lang_import_langpack');
    ?>
</td></tr>
        <input type="checkbox" name="acao_sel_' . $cont . '" value="' . $p->id_pedido_item . '" onclick="if(this.checked==true) { createCookie(\'dir_id_pedido_item\',\'' . $p->id_pedido_item . ',\',\'1\',\'1\'); createCookie(\'p_id_pedido_item\',\'' . $p->id_pedido_item . ',\',\'1\',\'1\'); createCookie(\'p_id_pedido\',\'#' . $p->id_pedido . '/' . $p->ordem . ',\',\'1\',\'1\'); } else { eraseCookieItem(\'dir_id_pedido_item\',\'' . $p->id_pedido_item . '\'); eraseCookieItem(\'p_id_pedido_item\',\'' . $p->id_pedido_item . '\'); eraseCookieItem(\'dir_id_pedido\',\'#' . $p->id_pedido . '/' . $p->ordem . '\'); eraseCookieItem(\'p_id_pedido\',\'#' . $p->id_pedido . '/' . $p->ordem . '\'); }" ' . $item_checked . ' />
		</td>
        <td class="result_celula' . $class . '" align="center"><a href="pedido_edit.php?id=' . $p->id_pedido . '&ordem=' . $p->ordem . '" target="_blank"><img src="../images/botao_editar.png" title="Editar" border="0"/></a></td>
		<td class="result_celula' . $class . '" align="center">#' . $p->id_pedido . '/' . $p->ordem . '</a></td>
		<td class="result_celula' . $class . '">' . $nome . ' </td>';
    if ($busca_e_devedor == '') {
        $p_valor .= '<td class="result_celula' . $class . '">' . $p->certidao_devedor . '</td>';
    }
    if ($busca_e_inicio == '') {
        $p_valor .= '<td class="result_celula' . $class . ' result_celula' . $erro_restricao . '" align="center" nowrap>' . invert($p->inicio, '/', 'PHP') . '</td>';
    }
    if ($busca_e_prazo == '') {
        $p_valor .= '<td class="result_celula' . $class . ' result_celula' . $erro_atraso . '" align="center" nowrap>' . invert($p->data_prazo, '/', 'PHP') . '</td>';
    }
    if ($busca_e_data_atividade == '') {
        $p_valor .= '<td class="result_celula' . $class . '" nowrap>' . invert($p->data_atividade, '/', 'PHP') . '</td>';
    }
    if ($busca_e_status == '') {
        $p_valor .= '<td class="result_celula' . $class . '" nowrap>' . $p->status . '</td>';
    }
    if ($busca_e_atividade == '') {
        $p_valor .= '<td class="result_celula' . $class . '" nowrap>' . $p->atividade . '</td>';
    }
    if ($busca_e_servico == '') {
        $p_valor .= '<td class="result_celula' . $class . '" nowrap>' . $p->desc_servico . '</td>';
    }
    if ($busca_e_cidade == '') {
        $p_valor .= '<td class="result_celula' . $class . '" align="center" nowrap>' . $p->certidao_cidade . '</td>';
    }
    if ($busca_e_estado == '') {
        $p_valor .= '<td class="result_celula' . $class . '" align="center" nowrap>' . $p->certidao_estado . '</td>';
Exemplo n.º 27
0
<tr><td class="ubox" colspan="2" align="center"><input accesskey="s" type="submit" value="Upload &amp; Add" /></td></tr>
</table>
</form>
	<?php 
    echo foot();
} elseif ($job == 'feedcreator_active') {
    $d = $gpc->get('id', str);
    $key = $gpc->get('key', int);
    if ($key == 3 || $key == 4) {
        $data = file('data/feedcreator.inc.php');
        $n = array();
        foreach ($data as $r) {
            $row = explode('|', $r);
            $row = array_map('trim', $row);
            if (strtoupper($row[0]) == strtoupper($d)) {
                $row[$key] = invert($row[$key]);
            }
            $n[] = implode('|', $row);
        }
        $filesystem->file_put_contents('data/feedcreator.inc.php', implode("\n", $n));
    }
    viscacha_header('Location: admin.php?action=misc&job=feedcreator');
} elseif ($job == 'feedcreator_add') {
    echo head();
    $name = $gpc->get('name', str);
    $class = $gpc->get('class', str);
    $active = $gpc->get('active', str);
    $dl = $gpc->get('dl', str);
    $dir = realpath('./classes/feedcreator/') . DIRECTORY_SEPARATOR;
    $inserterrors = array();
    require "classes/class.upload.php";
			<tr>
				<td>
				<div align="right"><strong>Declaração do Portador: </strong></div>
				</td>
				<td><input type="text" name="decla_portador"
					value="<?php 
echo $devedor->decla_portador;
?>
" style="width: 200px"
					maxlength="1" class="form_estilo" /></td>
				<td>
				<div align="right"><strong>Ocorr&ecirc;ncia.: </strong></div>
				</td>
				<td><input type="text" name="data_ocorrencia"
					value="<?php 
echo invert($devedor->data_ocorrencia, '/', 'PHP');
?>
"
					onKeyUp="masc_numeros(this,'##/##/####');" style="width: 150px"
					class="form_estilo" /></td>
			</tr>
			<tr>
				<td>
				<div align="right"><strong>Tipo da Ocorr.: </strong></div>
				</td>
				<td><input type="text" name="oco_tipo"
					value="<?php 
echo $devedor->oco_tipo;
?>
" style="width: 200px" maxlength="1"
					class="form_estilo" /></td>
Exemplo n.º 29
0
  <tr>
   <td class="ubox" width="100%" colspan="8" align="center"><input type="submit" name="Submit" value="<?php 
    echo $lang->phrase('admin_cms_form_delete');
    ?>
"></td>
  </tr>
 </table>
</form>
<?php 
    echo foot();
} elseif ($job == 'doc_ajax_active') {
    $id = $gpc->get('id', int);
    $lid = $gpc->get('lid', int);
    $result = $db->query("SELECT active FROM {$db->pre}documents_content WHERE did = '{$id}' AND lid = '{$lid}' LIMIT 1");
    $use = $db->fetch_assoc($result);
    $use = invert($use['active']);
    $db->query("UPDATE {$db->pre}documents_content SET active = '{$use}' WHERE did = '{$id}' AND lid = '{$lid}' LIMIT 1");
    $delobj = $scache->load('wraps');
    $delobj->delete();
    die(strval($use));
} elseif ($job == 'doc_add') {
    echo head();
    $type = doctypes();
    $parser = array('0' => $lang->phrase('admin_cms_doc_no_parser'), '1' => $lang->phrase('admin_cms_doc_html'), '2' => $lang->phrase('admin_cms_doc_php_html'), '3' => $lang->phrase('admin_cms_doc_bbcodes'));
    ?>
 <table class="border" border="0" cellspacing="0" cellpadding="4" align="center">
  <tr>
   <td class="obox" colspan="4"><?php 
    echo $lang->phrase('admin_cms_create_doc_step_1');
    ?>
</td>
                                <textarea name="notificacao" style="width:512px; height:100px" class="form_estilo"><?php 
    echo $emp->notificacao;
    ?>
</textarea>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" class="tabela_tit">Informações Complementares</td>
                        </tr>
                        <tr>
                            <td>
                                <div align="right"><strong>Liberação do Sistema:</strong></div>
                            </td>
                            <td colspan="3">
                                <input type="text" name="inicio" value="<?php 
    echo $emp->inicio != '' ? invert($emp->inicio, '/', 'PHP') : '';
    ?>
" style="width:150px" onkeyup="masc_numeros(this,'##/##/####');" class="form_estilo"/>
                                <strong>&nbsp;&nbsp;&nbsp;Royalties:</strong>
                                <input type="text" id="royalties" name="royalties"	value="<?php 
    echo $emp->royalties;
    ?>
" style="width: 50px" onkeyup="moeda(event.keyCode,this.value,'royalties'); $('#royfixo').html(this.value); $('#royfixo2').html(this.value);" class="form_estilo <?php 
    echo isset($errors['royalties']) ? 'form_estilo_erro' : '';
    ?>
" <?php 
    echo $readonly ? 'readonly="readonly"' : '';
    ?>
>% 

                                <strong>Deduzir Impostos de:</strong>