public function alterar(Ticket $t) { parent::alterar($t); $where = "WHERE " . self::ID . " = '" . $t->getId() . "'"; $dT = new DataHora(); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::NIVEL, $t->getNivel(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::STATUS, $t->getStatus(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::SATISFACAO, $t->getSatisfacao(), $where); $this->con->alterar(Sistema::$BDPrefixo . $this->tabela, self::DATAHORA_ALTERACAO, $dT->mostrar("YmdHi"), $where); }
public function addEmail($email, $nome = '', $cidade = '', $estado = '', $area = '', $dataNasc = '') { if (empty($dataNasc)) { $dataNasc = new DataHora(); } $this->con->executar("SELECT * FROM " . Sistema::$BDPrefixo . "mailing_pacotes_emails WHERE pacote = '" . $this->getId() . "' AND email = '" . $email . "'"); if ($this->con->getTotal() == 0) { $this->con->executar("INSERT INTO " . Sistema::$BDPrefixo . "mailing_pacotes_emails(pacote, email, nome, cidade, estado, area, datanasc) VALUES('" . $this->getId() . "','" . $email . "','" . $nome . "','" . $cidade . "','" . $estado . "','" . $area . "','" . ($dataNasc ? $dataNasc->mostrar("Y-m-d") : '') . "')"); } else { throw new Exception("E-mail já cadastrado"); } }
} $sql .= " GROUP BY p.id"; $con->executar($sqlT); $totalI = $con->getRegistro()['total']; $sql = str_replace("sqlI", $sqlI, $sql); $con->executar($sql); function repeatTemplateByArray($con) { global $iGR; while ($p = $con->getRegistro()) { $iGR->repetir('repetir->Produtos'); $iGR->enterRepeticao()->trocar('codigo.Produto', $p['id']); $iGR->enterRepeticao()->trocar('nome.Produto', $p['nome']); $iGR->enterRepeticao()->trocar('imagens.Produto', $p['imagens']); } } $iGR->createRepeticao('repetir->Produtos'); repeatTemplateByArray($con); $iGR->trocar('total.Produto', $con->getTotal()); $iGR->trocar('total.Imagens', $totalI); $pronto = $iGR->concluir(); echo $pronto; exit; } $tituloPagina = 'Relatórios > Imagens'; $iRel = new IFAdmin(new Arquivos(Sistema::$adminLayoutCaminhoDiretorio . "/SistemaRelatorios/imagens.html")); $dT = new DataHora(); $iRel->trocar('data', $dT->mostrar()); $iRel->createJavaScript(); $javaScript .= $iRel->javaScript->concluir(); $includePagina = $iRel->concluir();
} $caminhoT = Sistema::$adminLayoutCaminhoDiretorio; $tem = new IFAdmin(new Arquivos($caminhoT . "default.html")); if (date("H") >= 06 && date("H") <= 11) { $nomeEntrada = "Bom dia"; } elseif (date("H") >= 12 && date("H") <= 18) { $nomeEntrada = "Boa tarde"; } elseif (date("H") >= 19 || date("H") <= 5) { $nomeEntrada = "Boa noite"; } $nomeEntrada .= " " . $_SESSION['user_login']; $tem->trocar("nomeEntrada", $nomeEntrada); $tem->trocar("idEmpresa", $_SESSION['id']); $tem->trocar("idUsuario", $_SESSION['idUsuario']); $d = new DataHora(); $tem->trocar("data", $d->diaSemanaExtenso() . ", " . $d->mostrar("d") . " de " . $d->mesExtenso() . ", " . $d->mostrar("Y")); $tem->condicao('condicao->1.Nivel', $_SESSION['nivel'] == 1); $tem->condicao('condicao->4.Nivel', $_SESSION['nivel'] == 4); $tem->condicao("condicaoMenu1", ereg('Produtos', $_GET['p'])); $tem->condicao("condicaoMenu2", ereg('Utilidades', $_GET['p'])); $tem->condicao("condicaoMenu3", ereg('Configuracoes', $_GET['p'])); $tem->condicao("condicaoMenu4", ereg('Clientes', $_GET['p'])); $tem->condicao("condicaoMenu5", ereg('Pedidos', $_GET['p'])); $tem->condicao("condicaoMenu6", ereg('Relatorios', $_GET['p'])); $includePagina = true; $tem->condicao("condicaoCorpo", !empty($_GET['p']) && !empty($_GET['a'])); if (!empty($_GET['p']) && !empty($_GET['a'])) { $p = $_GET['p'] . "/" . $_GET['a']; include $p . ".php"; } $tem->trocar("tituloPagina", $tituloPagina);
</tr> <tr class="firstRow"><?php //Add days for the beginning non-month days for ($i = 0; $i < $wdays_counter; $i++) { $day = date("t", $pr_ts) - ($wdays_counter - $i) + 1; $i_ts = mktime(1, 1, 1, $ts_month_nr - 1, $day, $ts_year); echo '<td class="outsideDay" date="' . "{'day': '" . $day . "', 'month': '" . date('n', $i_ts) . "', 'year': '" . date('Y', $i_ts) . "'}" . '">' . $day . '</td>'; } //Add month days $row = 0; for ($i = 1; $i <= $ts_nrodays; $i++) { $i_ts = mktime(1, 1, 1, $ts_month_nr, $i, $ts_year); $mes = strlen($ts_month_nr) == 1 ? "0" . $ts_month_nr : $ts_month_nr; $dia = strlen($i) == 1 ? "0" . $i : $i; $d = new DataHora($ts_year . $mes . $dia); $lE->condicoes('', $d->mostrar("Ymd"), 'data_evento'); $stY = ''; if ($lE->getTotal() > 0) { $stY = 'style="color: #FFF;"'; } echo '<td' . ($i_ts == $pickedDate ? ' class="selected"' : '') . ' ' . "date=\"{'day': '" . $i . "', 'month': '" . $ts_month_nr . "', 'year': '" . $ts_year . "'}\">"; if ($lE->getTotal() > 0) { echo '<a href="./?p=agenda" ' . $stY . '>' . $i . '</a>'; } else { echo $i; } echo '</td>'; if ($wdays_counter == 6 && $i - 1 != $ts_nrodays) { $week_num = date("W", $i_ts) + 1; echo "</tr>\n\t<tr>"; $wdays_counter = -1;
if ($p->getEndereco()->getTotal() > 0) { $end = $p->getEndereco()->listar(); $iGR->enterRepeticao()->trocar('logradouro.Endereco.Cliente', $end->logradouro); $iGR->enterRepeticao()->trocar('numero.Endereco.Cliente', $end->numero); $iGR->enterRepeticao()->trocar('bairro.Endereco.Cliente', $end->bairro); $iGR->enterRepeticao()->trocar('cidade.Endereco.Cliente', $end->cidade); $iGR->enterRepeticao()->trocar('estado.Endereco.Cliente', $end->estado); $iGR->enterRepeticao()->trocar('cep.Endereco.Cliente', $end->getCep()); } if ($p->getEmail()->getTotal() > 0) { $email = $p->getEmail()->listar(); $iGR->enterRepeticao()->trocar('email.Email.Cliente', $email->email); } $iGR->enterRepeticao()->trocar('moeda', "R\$"); $iGR->enterRepeticao()->trocar('valorCompras.Cliente', Numero::__CreateNumero($rs['valorcompras'])->moeda()); } } } $iGR->createRepeticao('repetir->Clientes'); repeatTemplateByArray($con); $pronto = $iGR->concluir(); echo $pronto; exit; } $tituloPagina = 'Relatórios > Clientes'; $iRel = new IFAdmin(new Arquivos(Sistema::$adminLayoutCaminhoDiretorio . "/SistemaRelatorios/clientes.html")); $dT = new DataHora(); $iRel->trocar('data', $dT->mostrar("d/m")); $iRel->createJavaScript(); $javaScript .= $iRel->javaScript->concluir(); $includePagina = $iRel->concluir();