alterações 07-04-26
This commit is contained in:
BIN
dados/dados.xlsx
BIN
dados/dados.xlsx
Binary file not shown.
@@ -1,7 +1,8 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
|
||||||
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4?1234"></script>
|
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4?1234"></script>
|
||||||
<link rel="stylesheet" href="/style.css" class="style">
|
<link rel="stylesheet" href="/ius/style.css" class="style">
|
||||||
|
|
||||||
|
<script src="/ius/js/cookie.js"></script>
|
||||||
<link href="https://cdn.jsdelivr.net/npm/flowbite@3.1.2/dist/flowbite.min.css?1234" rel="stylesheet" />
|
<link href="https://cdn.jsdelivr.net/npm/flowbite@3.1.2/dist/flowbite.min.css?1234" rel="stylesheet" />
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -32,7 +33,8 @@
|
|||||||
/* Estilização para inputs mobile */
|
/* Estilização para inputs mobile */
|
||||||
input[type="text"],
|
input[type="text"],
|
||||||
input[type="date"] {
|
input[type="date"] {
|
||||||
font-size: 16px !important; /* Previne zoom em iOS */
|
font-size: 16px !important;
|
||||||
|
/* Previne zoom em iOS */
|
||||||
padding: 0.75rem !important;
|
padding: 0.75rem !important;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
|
|||||||
191
index.php
191
index.php
@@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
if(isset($_COOKIE['index']) || (isset($_COOKIE['cadastro']) && $_COOKIE['cadastro'] === 'true')) {
|
if (isset($_COOKIE['index']) || (isset($_COOKIE['cadastro']) && $_COOKIE['cadastro'] === 'true')) {
|
||||||
header('Location: play.php');
|
header('Location: play.php');
|
||||||
exit();
|
exit();
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ if(isset($_COOKIE['index']) || (isset($_COOKIE['cadastro']) && $_COOKIE['cadastr
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="pt-BR">
|
<html lang="pt-BR">
|
||||||
<?php include 'header.php'; ?>
|
<?php include 'header.php'; ?>
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
@@ -21,7 +22,8 @@ if(isset($_COOKIE['index']) || (isset($_COOKIE['cadastro']) && $_COOKIE['cadastr
|
|||||||
|
|
||||||
.fade-transition.show {
|
.fade-transition.show {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
max-height: 500px; /* altura máxima suficiente para o conteúdo */
|
max-height: 500px;
|
||||||
|
/* altura máxima suficiente para o conteúdo */
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-backdrop {
|
.modal-backdrop {
|
||||||
@@ -41,20 +43,22 @@ if(isset($_COOKIE['index']) || (isset($_COOKIE['cadastro']) && $_COOKIE['cadastr
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="bg-gray-100" app="form">
|
<body class="bg-gray-100" app="form">
|
||||||
<!-- Modal Inicial -->
|
<!-- Modal Inicial -->
|
||||||
<div id="welcomeModal" class="fixed inset-0 z-50 overflow-y-auto modal-backdrop hidden">
|
<div id="welcomeModal" class="fixed inset-0 z-50 overflow-y-auto modal-backdrop hidden">
|
||||||
<div class="flex items-center justify-center min-h-screen px-4">
|
<div class="flex items-center justify-center min-h-screen px-4">
|
||||||
<div class="modal-content bg-white rounded-lg shadow-xl max-w-md w-full p-6 relative">
|
<div class="modal-content bg-white rounded-lg shadow-xl max-w-md w-full p-6 relative">
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h2 class="text-2xl font-bold text-gray-900 mb-4">Siemens: Rode a Roleta e Ganhe Prêmios!</h2>
|
<h2 class="text-2xl font-bold text-gray-900 mb-4">Seu conhecimento em SST vale prêmios!</h2>
|
||||||
<div class="text-gray-600 mb-6 space-y-4">
|
<div class="text-gray-600 mb-6 space-y-4">
|
||||||
<p>Bem-vindo ao nosso estande! Participe do jogo <strong>Rode a Roleta</strong> e concorra a prêmios exclusivos.</p>
|
<p>Você é fera em Saúde e Segurança do Trabalho? Chegou a hora de provar! Participe do nosso
|
||||||
<p>Cadastre-se rapidamente no formulário abaixo e, em seguida, rode a roleta para descobrir qual prêmio você pode ganhar.</p>
|
Quiz, teste seus conhecimentos e concorra a prêmios exclusivos.</p>
|
||||||
<p>Não perca essa chance de se divertir e conhecer as soluções Siemens!</p>
|
<p>Segurança em primeiro lugar, prêmios logo em seguida. Participe agora!</p>
|
||||||
</div>
|
</div>
|
||||||
<button id="startTourBtn" class="w-full bg-gold-xcmg text-white font-bold py-3 px-6 rounded-lg hover:bg-yellow-600 transition duration-300">
|
<button id="startTourBtn"
|
||||||
Quero me cadastrar e rodar a roleta!
|
class="w-full bg-gold-xcmg text-white font-bold py-3 px-6 rounded-lg hover:opacity-90 transition duration-300">
|
||||||
|
Quero me cadastrar e participar!
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -63,88 +67,133 @@ if(isset($_COOKIE['index']) || (isset($_COOKIE['cadastro']) && $_COOKIE['cadastr
|
|||||||
|
|
||||||
<div class="min-h-screen flex items-center justify-center" id="registrationFormContainer">
|
<div class="min-h-screen flex items-center justify-center" id="registrationFormContainer">
|
||||||
<div class="bg-white p-8 rounded-lg shadow-md w-full max-w-md">
|
<div class="bg-white p-8 rounded-lg shadow-md w-full max-w-md">
|
||||||
<h2 class="text-2xl font-bold mb-6 text-center">Roleta de Prêmios - Cadastro</h2>
|
<h2 class="text-2xl font-bold mb-6 text-center">Quiz - Cadastro</h2>
|
||||||
<form action="salvar.php" method="POST" class="space-y-4" id="registrationForm">
|
<form action="salvar.php" method="POST" class="space-y-4" id="registrationForm">
|
||||||
<div class="relative z-0 w-full mb-5 group">
|
<div class="relative z-0 w-full mb-5 group">
|
||||||
<input type="text" name="nome" id="nome" class="peer block py-2.5 px-3 w-full text-sm text-gray-900 rounded-lg border border-gray-900 focus:border-gold-xcmg bg-transparent focus:ring-0" placeholder=" " required />
|
<input type="text" name="nome" id="nome"
|
||||||
<label for="nome" class="absolute text-sm text-gray-500 duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-focus:px-2 peer-focus:text-gold-xcmg peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 start-1">Nome e sobrenome</label>
|
class="peer block py-2.5 px-3 w-full text-sm text-gray-900 rounded-lg border border-gray-900 focus:border-gold-xcmg bg-transparent focus:ring-0"
|
||||||
|
placeholder=" " required />
|
||||||
|
<label for="nome"
|
||||||
|
class="absolute text-sm text-gray-500 duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-focus:px-2 peer-focus:text-gold-xcmg peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 start-1">Nome</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="relative z-0 w-full mb-5 group">
|
<div class="relative z-0 w-full mb-5 group">
|
||||||
<input type="text" name="telefone" id="telefone" class="peer block py-2.5 px-3 w-full text-sm text-gray-900 rounded-lg border border-gray-900 focus:border-gold-xcmg bg-transparent focus:ring-0" placeholder=" " required />
|
<input type="email" name="email" id="email"
|
||||||
<label for="telefone" class="absolute text-sm text-gray-500 duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-focus:px-2 peer-focus:text-gold-xcmg peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 start-1">Telefone</label>
|
class="peer block py-2.5 px-3 w-full text-sm text-gray-900 rounded-lg border border-gray-900 focus:border-gold-xcmg bg-transparent focus:ring-0"
|
||||||
|
placeholder=" " required />
|
||||||
|
<label for="email"
|
||||||
|
class="absolute text-sm text-gray-500 duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-focus:px-2 peer-focus:text-gold-xcmg peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 start-1">E-mail</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="relative z-0 w-full mb-5 group">
|
<div class="relative z-0 w-full mb-5 group">
|
||||||
<input type="text" name="email" id="email" class="peer block py-2.5 px-3 w-full text-sm text-gray-900 rounded-lg border border-gray-900 focus:border-gold-xcmg bg-transparent focus:ring-0" placeholder=" " required />
|
<input type="text" name="empresa" id="empresa"
|
||||||
<label for="email" class="absolute text-sm text-gray-500 duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-focus:px-2 peer-focus:text-gold-xcmg peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 start-1">E-mail</label>
|
class="peer block py-2.5 px-3 w-full text-sm text-gray-900 rounded-lg border border-gray-900 focus:border-gold-xcmg bg-transparent focus:ring-0"
|
||||||
</div>
|
placeholder=" " required />
|
||||||
<div class="relative z-0 w-full mb-5 group">
|
<label for="empresa"
|
||||||
<input type="text" name="empresa" id="empresa" class="peer block py-2.5 px-3 w-full text-sm text-gray-900 rounded-lg border border-gray-900 focus:border-gold-xcmg bg-transparent focus:ring-0" placeholder=" " required />
|
class="absolute text-sm text-gray-500 duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-focus:px-2 peer-focus:text-gold-xcmg peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 start-1">Empresa</label>
|
||||||
<label for="empresa" class="absolute text-sm text-gray-500 duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-focus:px-2 peer-focus:text-gold-xcmg peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 start-1">Empresa</label>
|
|
||||||
</div>
|
|
||||||
<div class="relative z-0 w-full mb-5 group">
|
|
||||||
<input type="text" name="cargo" id="cargo" class="peer block py-2.5 px-3 w-full text-sm text-gray-900 rounded-lg border border-gray-900 focus:border-gold-xcmg bg-transparent focus:ring-0" placeholder=" " required />
|
|
||||||
<label for="cargo" class="absolute text-sm text-gray-500 duration-300 transform -translate-y-4 scale-75 top-2 z-10 origin-[0] bg-white px-2 peer-focus:px-2 peer-focus:text-gold-xcmg peer-placeholder-shown:scale-100 peer-placeholder-shown:-translate-y-1/2 peer-placeholder-shown:top-1/2 peer-focus:top-2 peer-focus:scale-75 peer-focus:-translate-y-4 start-1">Setor</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-2">Gostaria de ser contatado por um de nossos especialistas?</label>
|
<label for="cargo" class="block mb-2 text-sm font-medium text-gray-700">Qual seu cargo</label>
|
||||||
<div class="flex items-center space-x-6">
|
<select id="cargo" name="cargo" required
|
||||||
<div class="flex items-center">
|
class="bg-gray-50 border border-gray-900 text-gray-900 text-sm rounded-lg focus:ring-gold-xcmg focus:border-gold-xcmg block w-full p-2.5">
|
||||||
<input id="contato-sim" name="contato_especialista" type="radio" value="Sim" class="h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500">
|
<option value="" disabled selected>Selecione seu cargo</option>
|
||||||
<label for="contato-sim" class="ml-2 block text-sm text-gray-900">Sim</label>
|
<option value="Analista">Analista</option>
|
||||||
</div>
|
<option value="Técnico">Técnico</option>
|
||||||
<div class="flex items-center">
|
<option value="Assistente">Assistente</option>
|
||||||
<input id="contato-nao" name="contato_especialista" type="radio" value="Não" class="h-4 w-4 text-blue-600 border-gray-300 focus:ring-blue-500" checked>
|
<option value="Engenheiro">Engenheiro</option>
|
||||||
<label for="contato-nao" class="ml-2 block text-sm text-gray-900">Não</label>
|
<option value="Especialista">Especialista</option>
|
||||||
</div>
|
<option value="Supervisor/coordenador">Supervisor/coordenador</option>
|
||||||
</div>
|
<option value="Gestor/Gerente">Gestor/Gerente</option>
|
||||||
|
<option value="Diretor">Diretor</option>
|
||||||
|
<option value="Consultor de sistema de gestão">Consultor de sistema de gestão</option>
|
||||||
|
<option value="Estudante">Estudante</option>
|
||||||
|
<option value="Outro">Outro</option>
|
||||||
|
<option value="Consultor">Consultor</option>
|
||||||
|
<option value="Aposentado">Aposentado</option>
|
||||||
|
<option value="Autônomo">Autônomo</option>
|
||||||
|
<option value="Socio/proprietário">Socio/proprietário</option>
|
||||||
|
<option value="CEO/Presidente">CEO/Presidente</option>
|
||||||
|
<option value="Advogado">Advogado</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-2">Tópicos de interesse:</label>
|
<label for="setor" class="block mb-2 text-sm font-medium text-gray-700">Qual seu setor</label>
|
||||||
<div class="space-y-2">
|
<select id="setor" name="setor" required
|
||||||
<div>
|
class="bg-gray-50 border border-gray-900 text-gray-900 text-sm rounded-lg focus:ring-gold-xcmg focus:border-gold-xcmg block w-full p-2.5">
|
||||||
<input type="checkbox" id="topico_automacao" name="topicos[]" value="Automação e Otimização de Processos" class="mr-2">
|
<option value="" disabled selected>Selecione seu setor</option>
|
||||||
<label for="topico_automacao">Acionamentos</label>
|
<option value="Qualidade">Qualidade</option>
|
||||||
</div>
|
<option value="Meio ambiente">Meio ambiente</option>
|
||||||
<div>
|
<option value="Segurança do trabalho">Segurança do trabalho</option>
|
||||||
<input type="checkbox" id="topico_ciberseguranca" name="topicos[]" value="Cibersegurança, IoT e Redes Industriais" class="mr-2">
|
<option value="SGI">SGI</option>
|
||||||
<label for="topico_ciberseguranca">Cibersegurança, IoT e Redes Industriais</label>
|
<option value="Regulatório jurídico">Regulatório jurídico</option>
|
||||||
</div>
|
<option value="ESG">ESG</option>
|
||||||
<div>
|
<option value="SS/MA/Q">SS/MA/Q</option>
|
||||||
<input type="checkbox" id="topico_convergencia" name="topicos[]" value="Convergência TI e TA" class="mr-2">
|
<option value="Tecnologia/TI">Tecnologia/TI</option>
|
||||||
<label for="topico_convergencia">Automação de Pontes Rolantes</label>
|
<option value="Administrativo">Administrativo</option>
|
||||||
</div>
|
<option value="Compliance">Compliance</option>
|
||||||
<div>
|
<option value="RH">RH</option>
|
||||||
<input type="checkbox" id="topico_eletrificacao" name="topicos[]" value="Eletrificação e soluções para subestações e eletrocentros" class="mr-2">
|
<option value="Suprimentos">Suprimentos</option>
|
||||||
<label for="topico_eletrificacao">Eletrificação e soluções para subestações e eletrocentros</label>
|
<option value="Outros">Outros</option>
|
||||||
</div>
|
</select>
|
||||||
<div>
|
|
||||||
<input type="checkbox" id="topico_gemeos" name="topicos[]" value="Gêmeos Digitais" class="mr-2">
|
|
||||||
<label for="topico_gemeos">Gêmeos Digitais</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="checkbox" id="topico_instrumentacao" name="topicos[]" value="Instrumentação de Processos" class="mr-2">
|
|
||||||
<label for="topico_instrumentacao">Instrumentação de Processos</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="checkbox" id="topico_manutencao" name="topicos[]" value="Manutenções Preditivas baseadas em IA" class="mr-2">
|
|
||||||
<label for="topico_manutencao">Manutenções Preditivas baseadas em IA</label>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<input type="checkbox" id="tsolucoes_em_baixa_tensão" name="topicos[]" value="Soluções em baixa tensão" class="mr-2">
|
|
||||||
<label for="topico_manutencao">Soluções em baixa tensão</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-5">
|
||||||
|
<label for="segmento" class="block mb-2 text-sm font-medium text-gray-700">Segmento da
|
||||||
|
empresa</label>
|
||||||
|
<select id="segmento" name="segmento" required
|
||||||
|
class="bg-gray-50 border border-gray-900 text-gray-900 text-sm rounded-lg focus:ring-gold-xcmg focus:border-gold-xcmg block w-full p-2.5">
|
||||||
|
<option value="" disabled selected>Selecione o segmento</option>
|
||||||
|
<option value="Agronegócio">Agronegócio</option>
|
||||||
|
<option value="Alimentos">Alimentos</option>
|
||||||
|
<option value="Atividades administrativas/escritório">Atividades administrativas/escritório
|
||||||
|
</option>
|
||||||
|
<option value="Automotivo">Automotivo</option>
|
||||||
|
<option value="Construção civil">Construção civil</option>
|
||||||
|
<option value="Energia">Energia</option>
|
||||||
|
<option value="Engenharia">Engenharia</option>
|
||||||
|
<option value="Gerenciamento de resíduos">Gerenciamento de resíduos</option>
|
||||||
|
<option value="Indústria em geral">Indústria em geral</option>
|
||||||
|
<option value="Indústria química">Indústria química</option>
|
||||||
|
<option value="Logística e armazenamento de mercadorias/produtos">Logística e armazenamento de
|
||||||
|
mercadorias/produtos</option>
|
||||||
|
<option value="Logística portuária">Logística portuária</option>
|
||||||
|
<option value="Manutenção de máquinas e equipamentos">Manutenção de máquinas e equipamentos
|
||||||
|
</option>
|
||||||
|
<option value="Metalúrgica">Metalúrgica</option>
|
||||||
|
<option value="Mineração">Mineração</option>
|
||||||
|
<option value="Petróleo e Gás">Petróleo e Gás</option>
|
||||||
|
<option value="Serviços de saúde">Serviços de saúde</option>
|
||||||
|
<option value="Transporte em geral">Transporte em geral</option>
|
||||||
|
<option value="Outros">Outros</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-5">
|
||||||
|
<label for="funcionarios" class="block mb-2 text-sm font-medium text-gray-700">Número de
|
||||||
|
funcionários</label>
|
||||||
|
<select id="funcionarios" name="funcionarios" required
|
||||||
|
class="bg-gray-50 border border-gray-900 text-gray-900 text-sm rounded-lg focus:ring-gold-xcmg focus:border-gold-xcmg block w-full p-2.5">
|
||||||
|
<option value="" disabled selected>Selecione o número de funcionários</option>
|
||||||
|
<option value="1 a 10">1 a 10</option>
|
||||||
|
<option value="11 a 50">11 a 50</option>
|
||||||
|
<option value="51 a 200">51 a 200</option>
|
||||||
|
<option value="201 a 500">201 a 500</option>
|
||||||
|
<option value="Mais de 500">Mais de 500</option>
|
||||||
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<input type="hidden" id="codigo" name="codigo" value="">
|
<input type="hidden" id="codigo" name="codigo" value="">
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="w-full text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center">
|
class="w-full text-white bg-gold-xcmg hover:opacity-90 focus:ring-4 focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center">
|
||||||
Enviar
|
Enviar
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<p class="text-xs text-gray-500 mt-4">
|
<p class="text-xs text-gray-500 mt-4">
|
||||||
As informações coletadas por meio deste formulário serão tratadas estritamente para realização do evento, do sorteio e para atualização da nossa base de contatos, com todas as medidas técnicas e administrativas de segurança disponíveis. Em caso de quaisquer dúvidas/solicitações acerca do tratamento dos seus dados, contate a Organização de Privacidade de Dados da Siemens via e-mail <a href="mailto:dataprivacy.br@siemens.com" class="underline text-blue-600">dataprivacy.br@siemens.com</a>.
|
As informações coletadas por meio deste formulário serão tratadas estritamente para realização do
|
||||||
|
evento, do sorteio e para atualização da nossa base de contatos, com todas as medidas técnicas e
|
||||||
|
administrativas de segurança disponíveis. Em caso de quaisquer dúvidas/solicitações acerca do tratamento
|
||||||
|
dos seus dados, contate a Organização de Privacidade de Dados da IUS via e-mail <a
|
||||||
|
href="mailto:marketing@iusnatura.com.br"
|
||||||
|
class="underline text-blue-600">marketing@iusnatura.com.br</a>.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -155,7 +204,7 @@ if(isset($_COOKIE['index']) || (isset($_COOKIE['cadastro']) && $_COOKIE['cadastr
|
|||||||
document.getElementById("registrationFormContainer").classList.add("visible");
|
document.getElementById("registrationFormContainer").classList.add("visible");
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
const modal = document.getElementById('welcomeModal');
|
const modal = document.getElementById('welcomeModal');
|
||||||
const startTourBtn = document.getElementById('startTourBtn');
|
const startTourBtn = document.getElementById('startTourBtn');
|
||||||
const modalContent = modal.querySelector('.modal-content');
|
const modalContent = modal.querySelector('.modal-content');
|
||||||
@@ -169,7 +218,7 @@ if(isset($_COOKIE['index']) || (isset($_COOKIE['cadastro']) && $_COOKIE['cadastr
|
|||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
// Fechar o modal e iniciar o cadastro
|
// Fechar o modal e iniciar o cadastro
|
||||||
startTourBtn.addEventListener('click', function() {
|
startTourBtn.addEventListener('click', function () {
|
||||||
modalContent.classList.remove('show');
|
modalContent.classList.remove('show');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
modal.classList.add('hidden');
|
modal.classList.add('hidden');
|
||||||
|
|||||||
Binary file not shown.
@@ -9,8 +9,12 @@ if ($conn->connect_error) {
|
|||||||
die("Conexão falhou: " . $conn->connect_error);
|
die("Conexão falhou: " . $conn->connect_error);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Buscar cadastros não ativados
|
// Verificar se deve mostrar os ativados
|
||||||
$sql = "SELECT id, nome, empresa, cargo, telefone, dados_adicionais, codigo FROM cadastros WHERE status = 0";
|
$show_activated = isset($_GET['ativados']) && $_GET['ativados'] === 'true';
|
||||||
|
$status_filter = $show_activated ? "status IN (0, 1)" : "status = 0";
|
||||||
|
|
||||||
|
// Buscar cadastros (filtrados pelo status)
|
||||||
|
$sql = "SELECT id, nome, empresa, cargo, telefone, dados_adicionais, codigo, status FROM cadastros WHERE $status_filter ORDER BY id DESC";
|
||||||
$result = $conn->query($sql);
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
$cadastros = array();
|
$cadastros = array();
|
||||||
|
|||||||
BIN
lista/cadastros.xlsx
Normal file
BIN
lista/cadastros.xlsx
Normal file
Binary file not shown.
@@ -1,22 +1,21 @@
|
|||||||
|
import json
|
||||||
from openpyxl import Workbook
|
from openpyxl import Workbook
|
||||||
|
|
||||||
import mysql.connector
|
import mysql.connector
|
||||||
|
|
||||||
|
|
||||||
def export_cadastros_to_excel():
|
def export_cadastros_to_excel():
|
||||||
# Configurações de conexão com o MySQL
|
# Configurações de conexão com o MySQL
|
||||||
conn = mysql.connector.connect(
|
conn = mysql.connector.connect(
|
||||||
host="localhost", # altere para o host do seu banco de dados
|
host="localhost", # Como o PHP chamará este script no servidor, usamos localhost
|
||||||
user="root", # altere para o usuário do seu banco
|
user="root",
|
||||||
password="", # altere para a senha do seu banco
|
password="",
|
||||||
database="xcmg" # altere para o nome do seu banco de dados
|
database="xcmg"
|
||||||
)
|
)
|
||||||
|
|
||||||
cursor = conn.cursor()
|
cursor = conn.cursor()
|
||||||
|
|
||||||
# Consulta da tabela cadastros
|
# Consulta da tabela cadastros (incluindo dados_adicionais)
|
||||||
cursor.execute("""
|
cursor.execute("""
|
||||||
SELECT id, nome, empresa, cargo, telefone, cliente_xcmg, usa_banco_xcmg, codigo, ativado, gerado, status
|
SELECT id, nome, empresa, cargo, telefone, codigo, ativado, gerado, status, dados_adicionais
|
||||||
FROM cadastros
|
FROM cadastros
|
||||||
""")
|
""")
|
||||||
rows = cursor.fetchall()
|
rows = cursor.fetchall()
|
||||||
@@ -27,17 +26,45 @@ def export_cadastros_to_excel():
|
|||||||
# Cria um arquivo Excel
|
# Cria um arquivo Excel
|
||||||
wb = Workbook()
|
wb = Workbook()
|
||||||
ws = wb.active
|
ws = wb.active
|
||||||
ws.title = "Cadastros"
|
ws.title = "Cadastros IUS"
|
||||||
|
|
||||||
# Cabeçalho da planilha
|
# Cabeçalho da planilha (incluindo novos campos)
|
||||||
headers = ['id', 'nome', 'empresa', 'cargo', 'telefone', 'cliente_xcmg', 'usa_banco_xcmg', 'codigo', 'ativado', 'gerado', 'status']
|
headers = [
|
||||||
|
'ID', 'Nome', 'Empresa', 'Cargo', 'E-mail',
|
||||||
|
'Setor', 'Segmento', 'Funcionários',
|
||||||
|
'Telefone', 'Código', 'Ativado', 'Data Cadastro', 'Status'
|
||||||
|
]
|
||||||
ws.append(headers)
|
ws.append(headers)
|
||||||
|
|
||||||
# Insere os dados na planilha
|
# Insere os dados na planilha
|
||||||
for row in rows:
|
for row in rows:
|
||||||
ws.append(row)
|
(id_db, nome, empresa, cargo, telefone, codigo, ativado, gerado, status, dados_json_raw) = row
|
||||||
|
|
||||||
# Salva a planilha em um arquivo Excel
|
email = ""
|
||||||
|
setor = ""
|
||||||
|
segmento = ""
|
||||||
|
funcionarios = ""
|
||||||
|
|
||||||
|
if dados_json_raw:
|
||||||
|
try:
|
||||||
|
# O banco armazena aspas simples duplicadas ('') como escape do MySQL
|
||||||
|
json_clean = dados_json_raw.replace("''", "'")
|
||||||
|
extras = json.loads(json_clean)
|
||||||
|
email = extras.get('email', '')
|
||||||
|
setor = extras.get('setor', '')
|
||||||
|
segmento = extras.get('segmento', '')
|
||||||
|
funcionarios = extras.get('funcionarios', '')
|
||||||
|
except Exception as e:
|
||||||
|
print(f"Erro ao processar JSON para ID {id_db}: {e}")
|
||||||
|
|
||||||
|
# Monta a linha para o Excel
|
||||||
|
ws.append([
|
||||||
|
id_db, nome, empresa, cargo, email,
|
||||||
|
setor, segmento, funcionarios,
|
||||||
|
telefone, codigo, ativado, gerado, status
|
||||||
|
])
|
||||||
|
|
||||||
|
# Salva a planilha
|
||||||
wb.save("cadastros.xlsx")
|
wb.save("cadastros.xlsx")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
28
lista/gerar_excel.php
Executable file
28
lista/gerar_excel.php
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
// lista/gerar_excel.php
|
||||||
|
|
||||||
|
// Executa o script Python para gerar a planilha
|
||||||
|
$output = shell_exec("python3 converterTabelaEmPlanilha.py 2>&1");
|
||||||
|
|
||||||
|
$arquivo = "cadastros.xlsx";
|
||||||
|
|
||||||
|
if (file_exists($arquivo)) {
|
||||||
|
// Definir headers para o download do arquivo
|
||||||
|
header('Content-Description: File Transfer');
|
||||||
|
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
|
||||||
|
header('Content-Disposition: attachment; filename="' . basename($arquivo) . '"');
|
||||||
|
header('Expires: 0');
|
||||||
|
header('Cache-Control: must-revalidate');
|
||||||
|
header('Pragma: public');
|
||||||
|
header('Content-Length: ' . filesize($arquivo));
|
||||||
|
|
||||||
|
// Ler e enviar o arquivo
|
||||||
|
readfile($arquivo);
|
||||||
|
|
||||||
|
// Remover o arquivo temporário após o download (opcional)
|
||||||
|
// unlink($arquivo);
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
echo "Erro ao gerar o arquivo. Saída do log: <pre>$output</pre>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
158
lista/index.php
158
lista/index.php
@@ -39,94 +39,106 @@ $result = $conn->query($sql);
|
|||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="p-6 bg-gray-100" app="lista">
|
<body class="p-6 bg-gray-100" app="lista">
|
||||||
<h2 class="text-xl font-bold mb-4">Lista de Cadastros</h2>
|
<div class="flex items-center justify-between mb-6 bg-white p-4 rounded shadow">
|
||||||
|
<h2 class="text-xl font-bold !text-gray-800">Lista de Cadastros</h2>
|
||||||
|
<div class="flex items-center space-x-6">
|
||||||
|
<!-- Toggle Ativados -->
|
||||||
|
<label class="inline-flex items-center cursor-pointer">
|
||||||
|
<input type="checkbox" id="toggleAtvados" class="sr-only peer">
|
||||||
|
<div class="relative w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-green-300 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:start-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-green-600"></div>
|
||||||
|
<span class="ms-3 text-sm font-medium text-gray-700">Mostrar Ativados</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<!-- Download Button -->
|
||||||
|
<a href="gerar_excel.php" class="bg-gray-800 hover:bg-gray-900 text-white px-4 py-2 rounded-lg text-sm font-medium transition flex items-center shadow-md">
|
||||||
|
<svg class="w-4 h-4 me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg>
|
||||||
|
Download Excel
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="cadastros">
|
<div id="cadastros">
|
||||||
<?php while ($row = $result->fetch_assoc()) : ?>
|
<!-- Itens serão carregados via polling -->
|
||||||
<div class="row-dados p-4 bg-white shadow rounded mb-2 flex justify-between items-center"
|
|
||||||
id="cadastro-<?= $row['id'] ?>">
|
|
||||||
<div class="col-codigo">
|
|
||||||
<p><strong><?= $row['codigo'] ?></strong></p>
|
|
||||||
</div>
|
|
||||||
<div class="col-dados">
|
|
||||||
<p><strong><?= $row['nome'] ?></strong></p>
|
|
||||||
<p><?= $row['empresa'] ?></p>
|
|
||||||
<?php
|
|
||||||
// extrair email de dados_adicionais (se presente)
|
|
||||||
$email = '';
|
|
||||||
if (!empty($row['dados_adicionais'])) {
|
|
||||||
// restaurar aspas simples duplicadas e decodificar JSON
|
|
||||||
$json = str_replace("''", "'", $row['dados_adicionais']);
|
|
||||||
$extras = json_decode($json, true);
|
|
||||||
if (json_last_error() === JSON_ERROR_NONE && is_array($extras) && !empty($extras['email'])) {
|
|
||||||
$email = htmlspecialchars($extras['email']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php if ($email !== ''): ?>
|
|
||||||
<p class="text-sm text-gray-200">Email: <span class="font-medium"><?= $email ?></span></p>
|
|
||||||
<?php else: ?>
|
|
||||||
<p class="text-sm text-gray-500">Email: <span class="italic">(não informado)</span></p>
|
|
||||||
<?php endif; ?>
|
|
||||||
</div>
|
|
||||||
<button class="bg-green-500 text-white px-4 py-2 rounded activate"
|
|
||||||
data-id="<?= $row['id'] ?>">Ativar</button>
|
|
||||||
</div>
|
|
||||||
<?php endwhile; ?>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="../js/jquery.js"></script>
|
<script src="../js/jquery.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
let showActivated = false;
|
||||||
$(".activate").click(function () {
|
|
||||||
console.log('ativar');
|
|
||||||
let id = $(this).data("id");
|
|
||||||
|
|
||||||
$.post("ativar.php", {
|
function refreshList() {
|
||||||
id: id
|
$.getJSON("atualiza.php?rand=" + Math.random() + "&ativados=" + showActivated, function (data) {
|
||||||
}, function (response) {
|
const container = $("#cadastros");
|
||||||
console.log(response);
|
container.empty();
|
||||||
if (response == "success") {
|
|
||||||
$("#cadastro-" + id).fadeOut();
|
if (data.length === 0) {
|
||||||
} else {
|
container.append('<p class="text-center text-gray-400 py-10 italic">Nenhum cadastro encontrado.</p>');
|
||||||
alert("Erro ao ativar!");
|
return;
|
||||||
}
|
}
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
setInterval(function () {
|
|
||||||
$.getJSON("atualiza.php?rand=" + Math.random(), function (data) {
|
|
||||||
$("#cadastros").empty();
|
|
||||||
$.each(data, function (key, val) {
|
$.each(data, function (key, val) {
|
||||||
$("#cadastros").append(
|
const isActivated = val.status == 1;
|
||||||
`<div class="row-dados p-4 bg-white shadow rounded mb-2 flex justify-between items-center" id="cadastro-${val.id}">
|
const rowClass = isActivated ? 'opacity-50 grayscale bg-gray-50' : 'bg-white';
|
||||||
<div class="col-codigo">
|
|
||||||
<p><strong>${val.codigo}</strong></p>
|
|
||||||
</div>
|
|
||||||
<div class="col-dados">
|
|
||||||
<p><strong>${val.nome}</strong></p>
|
|
||||||
<p>${val.empresa}</p>
|
|
||||||
${val.email ? `<p class="text-sm text-gray-200">Email: <span class="font-medium">${val.email}</span></p>` : `<p class="text-sm text-gray-500">Email: <span class="italic">(não informado)</span></p>`}
|
|
||||||
</div>
|
|
||||||
<button class="bg-green-500 text-white px-4 py-2 rounded activate" data-id="${val.id}">Ativar</button>
|
|
||||||
</div>`
|
|
||||||
);
|
|
||||||
});$(".activate").click(function () {
|
|
||||||
console.log('ativar');
|
|
||||||
let id = $(this).data("id");
|
|
||||||
|
|
||||||
$.post("ativar.php", {
|
container.append(`
|
||||||
id: id
|
<div class="row-dados p-4 shadow rounded mb-2 flex justify-between items-center ${rowClass}" id="cadastro-${val.id}">
|
||||||
}, function (response) {
|
<div class="col-codigo text-gray-800">
|
||||||
console.log(response);
|
<strong>${val.codigo}</strong>
|
||||||
|
</div>
|
||||||
|
<div class="col-dados flex-grow px-8">
|
||||||
|
<p class="text-gray-900 font-bold text-lg">${val.nome}</p>
|
||||||
|
<p class="text-gray-600">${val.empresa}</p>
|
||||||
|
${val.email ?
|
||||||
|
`<p class="text-sm text-gray-500">Email: <span class="font-medium">${val.email}</span></p>` :
|
||||||
|
`<p class="text-sm text-gray-400 italic">Email: (não informado)</p>`
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
<div class="col-acao">
|
||||||
|
${!isActivated ?
|
||||||
|
`<button class="bg-green-600 hover:bg-green-700 text-white px-6 py-2 rounded-lg font-bold shadow-sm activate" data-id="${val.id}">Ativar</button>` :
|
||||||
|
`<span class="text-green-700 font-bold bg-green-100 px-3 py-1 rounded-full text-sm">✓ Ativado</span>`
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Reatribui eventos
|
||||||
|
bindEvents();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function bindEvents() {
|
||||||
|
$(".activate").off('click').on('click', function () {
|
||||||
|
let id = $(this).data("id");
|
||||||
|
let btn = $(this);
|
||||||
|
btn.prop('disabled', true).addClass('opacity-50');
|
||||||
|
|
||||||
|
$.post("ativar.php", { id: id }, function (response) {
|
||||||
if (response == "success") {
|
if (response == "success") {
|
||||||
$("#cadastro-" + id).fadeOut();
|
if (!showActivated) {
|
||||||
|
$("#cadastro-" + id).fadeOut(300);
|
||||||
|
} else {
|
||||||
|
refreshList();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
alert("Erro ao ativar!");
|
alert("Erro ao ativar!");
|
||||||
|
btn.prop('disabled', false).removeClass('opacity-50');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
}, 10000);
|
$(document).ready(function () {
|
||||||
|
// Inicializa Polling
|
||||||
|
refreshList();
|
||||||
|
setInterval(refreshList, 5000); // Polling a cada 5 segundos
|
||||||
|
|
||||||
|
// Toggle Ativados
|
||||||
|
$("#toggleAtvados").on('change', function() {
|
||||||
|
showActivated = $(this).is(':checked');
|
||||||
|
refreshList();
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
|
|||||||
14
main.js
14
main.js
@@ -62,21 +62,9 @@ if (currApp == 'form') {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Aplica a máscara ao campo de telefone após o carregamento do DOM
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
|
||||||
var phoneInput = document.getElementById('telefone');
|
|
||||||
maskPhone(phoneInput);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Validação do formulário antes do envio
|
// Validação do formulário antes do envio
|
||||||
document.getElementById('registrationForm').addEventListener('submit', function (e) {
|
document.getElementById('registrationForm').addEventListener('submit', function (e) {
|
||||||
var phoneInput = document.getElementById('telefone');
|
// Validações adicionais se necessário
|
||||||
var phone = phoneInput.value.replace(/\D/g, '');
|
|
||||||
|
|
||||||
if (phone.length < 10 || phone.length > 11) {
|
|
||||||
e.preventDefault();
|
|
||||||
alert('Por favor, insira um número de telefone válido (DDD + número)');
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
// Salva o cookie após o envio do formulário (quando o cadastro for completado)
|
// Salva o cookie após o envio do formulário (quando o cadastro for completado)
|
||||||
// document.getElementById('registrationForm').addEventListener('submit', function (e) {
|
// document.getElementById('registrationForm').addEventListener('submit', function (e) {
|
||||||
|
|||||||
10
play.php
10
play.php
@@ -9,7 +9,7 @@
|
|||||||
content="width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=no, orientation=portrait">
|
content="width=device-width, initial-scale=1.0, viewport-fit=cover, user-scalable=no, orientation=portrait">
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||||
<meta name="mobile-web-app-capable" content="yes">
|
<meta name="mobile-web-app-capable" content="yes">
|
||||||
<title>Siemens - Cadastro Roleta</title>
|
<title>IUS - Cadastro Roleta</title>
|
||||||
<!-- <script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script>
|
<!-- <script src="https://aframe.io/releases/1.5.0/aframe.min.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/mind-ar@1.2.5/dist/mindar-image-aframe.prod.js"></script> -->
|
<script src="https://cdn.jsdelivr.net/npm/mind-ar@1.2.5/dist/mindar-image-aframe.prod.js"></script> -->
|
||||||
<!-- Include necessary JS files for cookie checking -->
|
<!-- Include necessary JS files for cookie checking -->
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
<div class="finalScreen" id="finalScreen" style="display: none;">
|
<div class="finalScreen" id="finalScreen" style="display: none;">
|
||||||
<!-- <h2>Parabéns!</h2>
|
<!-- <h2>Parabéns!</h2>
|
||||||
<p>Você completou o desafio e desbloqueou sua recompensa.</p>
|
<p>Você completou o desafio e desbloqueou sua recompensa.</p>
|
||||||
<p>Passe no balcão do stand da SIEMENS e garanta seu prêmio!</p>
|
<p>Passe no balcão do stand da IUS e garanta seu prêmio!</p>
|
||||||
-->
|
-->
|
||||||
<span>CÓDIGO PARA JOGAR</span>
|
<span>CÓDIGO PARA JOGAR</span>
|
||||||
<h1 id="codigoPremio"></h1>
|
<h1 id="codigoPremio"></h1>
|
||||||
@@ -358,7 +358,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: 8000;
|
z-index: 8000;
|
||||||
color: white;
|
color: white;
|
||||||
background-color: #000028;
|
background-color: var(--cor-fundo-escuro);
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer-svg {
|
.footer-svg {
|
||||||
@@ -403,7 +403,7 @@
|
|||||||
h2 {
|
h2 {
|
||||||
font-size: 4em;
|
font-size: 4em;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: #00f4bc;
|
color: var(--cor-texto-principal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -431,7 +431,7 @@ div#finalScreen {
|
|||||||
}
|
}
|
||||||
|
|
||||||
h1#codigoPremio {
|
h1#codigoPremio {
|
||||||
color: #00f4bc;
|
color: var(--cor-texto-principal);
|
||||||
font-size: 5em;
|
font-size: 5em;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -286,7 +286,7 @@ S.derrotas = 0;
|
|||||||
S.play("success1", 1)
|
S.play("success1", 1)
|
||||||
S.v5by5 = false
|
S.v5by5 = false
|
||||||
}
|
}
|
||||||
S.setupTransitionOut();
|
//S.setupTransitionOut();
|
||||||
}, S.transitionDuration);
|
}, S.transitionDuration);
|
||||||
}, 3000)
|
}, 3000)
|
||||||
} else {
|
} else {
|
||||||
@@ -299,7 +299,7 @@ S.derrotas = 0;
|
|||||||
S.showGame = false
|
S.showGame = false
|
||||||
S.lose = true
|
S.lose = true
|
||||||
S.play('wawawa', 0.5)
|
S.play('wawawa', 0.5)
|
||||||
S.setupTransitionOut();
|
//S.setupTransitionOut();
|
||||||
}, S.transitionDuration);
|
}, S.transitionDuration);
|
||||||
}, 3000)
|
}, 3000)
|
||||||
}
|
}
|
||||||
|
|||||||
93
salvar.php
93
salvar.php
@@ -8,7 +8,8 @@ use PhpOffice\PhpSpreadsheet\Spreadsheet;
|
|||||||
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
|
||||||
|
|
||||||
// Função para embaralhar um código
|
// Função para embaralhar um código
|
||||||
function embaralharCodigo($codigo) {
|
function embaralharCodigo($codigo)
|
||||||
|
{
|
||||||
$alpha = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
$alpha = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||||
$alphaReverso = strrev($alpha);
|
$alphaReverso = strrev($alpha);
|
||||||
$codigoArray = str_split($codigo);
|
$codigoArray = str_split($codigo);
|
||||||
@@ -37,6 +38,15 @@ try {
|
|||||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||||
$arquivo = "dados/dados.xlsx";
|
$arquivo = "dados/dados.xlsx";
|
||||||
|
|
||||||
|
// Sanitiza os dados básicos
|
||||||
|
$nome = isset($_POST["nome"]) ? $conn->real_escape_string($_POST["nome"]) : "";
|
||||||
|
$email = isset($_POST["email"]) ? $conn->real_escape_string($_POST["email"]) : "";
|
||||||
|
$empresa = isset($_POST["empresa"]) ? $conn->real_escape_string($_POST["empresa"]) : "";
|
||||||
|
$cargo = isset($_POST["cargo"]) ? $conn->real_escape_string($_POST["cargo"]) : "";
|
||||||
|
$setor = isset($_POST["setor"]) ? $conn->real_escape_string($_POST["setor"]) : "";
|
||||||
|
$segmento = isset($_POST["segmento"]) ? $conn->real_escape_string($_POST["segmento"]) : "";
|
||||||
|
$funcionarios = isset($_POST["funcionarios"]) ? $conn->real_escape_string($_POST["funcionarios"]) : "";
|
||||||
|
|
||||||
// Verifica se o arquivo existe
|
// Verifica se o arquivo existe
|
||||||
if (file_exists($arquivo)) {
|
if (file_exists($arquivo)) {
|
||||||
$planilha = \PhpOffice\PhpSpreadsheet\IOFactory::load($arquivo);
|
$planilha = \PhpOffice\PhpSpreadsheet\IOFactory::load($arquivo);
|
||||||
@@ -44,44 +54,27 @@ try {
|
|||||||
} else {
|
} else {
|
||||||
$planilha = new Spreadsheet();
|
$planilha = new Spreadsheet();
|
||||||
$sheet = $planilha->getActiveSheet();
|
$sheet = $planilha->getActiveSheet();
|
||||||
$sheet->setCellValue("A1", "Nome");
|
$sheet->setCellValue("A1", "Data");
|
||||||
$sheet->setCellValue("B1", "Empresa");
|
$sheet->setCellValue("B1", "Nome");
|
||||||
$sheet->setCellValue("C1", "Cargo");
|
$sheet->setCellValue("C1", "Email");
|
||||||
$sheet->setCellValue("D1", "Telefone");
|
$sheet->setCellValue("D1", "Empresa");
|
||||||
$sheet->setCellValue("E1", "Email");
|
$sheet->setCellValue("E1", "Cargo");
|
||||||
$sheet->setCellValue("F1", "Cliente XCMG");
|
$sheet->setCellValue("F1", "Setor");
|
||||||
$sheet->setCellValue("G1", "Usa Banco XCMG");
|
$sheet->setCellValue("G1", "Segmento");
|
||||||
|
$sheet->setCellValue("H1", "Funcionários");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sanitiza os dados básicos
|
// Email validation
|
||||||
$nome = $conn->real_escape_string($_POST["nome"]);
|
|
||||||
$empresa = $conn->real_escape_string($_POST["empresa"]);
|
|
||||||
$cargo = $conn->real_escape_string($_POST["cargo"]);
|
|
||||||
$telefone = $conn->real_escape_string($_POST["telefone"]);
|
|
||||||
|
|
||||||
// Determina se é cliente XCMG
|
|
||||||
$cliente_xcmg = "Não";
|
|
||||||
if (isset($_POST["conhece_xcmg"]) && isset($_POST["adquiriu_xcmg"])) {
|
|
||||||
$cliente_xcmg = "Sim";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Determina se usa banco XCMG
|
|
||||||
$usa_banco_xcmg = "Não";
|
|
||||||
if (isset($_POST["conhece_banco_xcmg"]) && isset($_POST["interesse_financiar_xcmg"])) {
|
|
||||||
$usa_banco_xcmg = "Sim";
|
|
||||||
}
|
|
||||||
|
|
||||||
// Email (mantemos no dados_adicionais para não requerer alteração da tabela)
|
|
||||||
$email = isset($_POST['email']) ? trim($_POST['email']) : '';
|
|
||||||
// validação simples do formato do e-mail (se informado)
|
|
||||||
if ($email !== '' && !filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
if ($email !== '' && !filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
||||||
throw new Exception('E-mail inválido');
|
throw new Exception('E-mail inválido');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cria array com dados adicionais (incluindo e-mail)
|
// Cria array com dados adicionais
|
||||||
$dados_adicionais = [
|
$dados_adicionais = [
|
||||||
'email' => $email,
|
'email' => $email,
|
||||||
'topicos' => isset($_POST['topicos']) ? (array)$_POST['topicos'] : [],
|
'setor' => $setor,
|
||||||
|
'segmento' => $segmento,
|
||||||
|
'funcionarios' => $funcionarios,
|
||||||
'data_cadastro' => date('Y-m-d H:i:s'),
|
'data_cadastro' => date('Y-m-d H:i:s'),
|
||||||
'ip_address' => $_SERVER['REMOTE_ADDR'],
|
'ip_address' => $_SERVER['REMOTE_ADDR'],
|
||||||
'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''
|
'user_agent' => isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : ''
|
||||||
@@ -92,18 +85,22 @@ try {
|
|||||||
|
|
||||||
// Salva na planilha
|
// Salva na planilha
|
||||||
$linha = $sheet->getHighestRow() + 1;
|
$linha = $sheet->getHighestRow() + 1;
|
||||||
$sheet->setCellValue("A$linha", $nome);
|
$sheet->setCellValue("A$linha", date('d/m/Y H:i:s'));
|
||||||
$sheet->setCellValue("B$linha", $empresa);
|
$sheet->setCellValue("B$linha", $nome);
|
||||||
$sheet->setCellValue("C$linha", $cargo);
|
$sheet->setCellValue("C$linha", $email);
|
||||||
$sheet->setCellValue("D$linha", $telefone);
|
$sheet->setCellValue("D$linha", $empresa);
|
||||||
$sheet->setCellValue("E$linha", $email);
|
$sheet->setCellValue("E$linha", $cargo);
|
||||||
$sheet->setCellValue("F$linha", $cliente_xcmg);
|
$sheet->setCellValue("F$linha", $setor);
|
||||||
$sheet->setCellValue("G$linha", $usa_banco_xcmg);
|
$sheet->setCellValue("G$linha", $segmento);
|
||||||
|
$sheet->setCellValue("H$linha", $funcionarios);
|
||||||
|
|
||||||
$escritor = new Xlsx($planilha);
|
$escritor = new Xlsx($planilha);
|
||||||
$escritor->save($arquivo);
|
$escritor->save($arquivo);
|
||||||
|
|
||||||
// Insere no banco
|
// Insere no banco (mantendo colunas antigas com valores padrão para evitar erros de esquema)
|
||||||
|
$telefone_vazio = "";
|
||||||
|
$xcmg_vazio = "Não";
|
||||||
|
|
||||||
$sql = "INSERT INTO cadastros (
|
$sql = "INSERT INTO cadastros (
|
||||||
nome, empresa, cargo, telefone,
|
nome, empresa, cargo, telefone,
|
||||||
cliente_xcmg, usa_banco_xcmg, dados_adicionais,
|
cliente_xcmg, usa_banco_xcmg, dados_adicionais,
|
||||||
@@ -111,9 +108,15 @@ try {
|
|||||||
) VALUES (?, ?, ?, ?, ?, ?, ?, 0, 0)";
|
) VALUES (?, ?, ?, ?, ?, ?, ?, 0, 0)";
|
||||||
|
|
||||||
$stmt = $conn->prepare($sql);
|
$stmt = $conn->prepare($sql);
|
||||||
$stmt->bind_param("sssssss",
|
$stmt->bind_param(
|
||||||
$nome, $empresa, $cargo, $telefone,
|
"sssssss",
|
||||||
$cliente_xcmg, $usa_banco_xcmg, $dados_json
|
$nome,
|
||||||
|
$empresa,
|
||||||
|
$cargo,
|
||||||
|
$telefone_vazio,
|
||||||
|
$xcmg_vazio,
|
||||||
|
$xcmg_vazio,
|
||||||
|
$dados_json
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!$stmt->execute()) {
|
if (!$stmt->execute()) {
|
||||||
@@ -132,8 +135,10 @@ try {
|
|||||||
throw new Exception("Erro ao atualizar código: " . $stmt_update->error);
|
throw new Exception("Erro ao atualizar código: " . $stmt_update->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($stmt_update)) $stmt_update->close();
|
if (isset($stmt_update))
|
||||||
if (isset($stmt)) $stmt->close();
|
$stmt_update->close();
|
||||||
|
if (isset($stmt))
|
||||||
|
$stmt->close();
|
||||||
$conn->close();
|
$conn->close();
|
||||||
|
|
||||||
// Limpa qualquer saída anterior
|
// Limpa qualquer saída anterior
|
||||||
|
|||||||
65
style.css
65
style.css
@@ -1,7 +1,22 @@
|
|||||||
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');
|
:root {
|
||||||
|
--cor-fundo-principal: #83B81A;
|
||||||
|
--cor-fundo-escuro: #537813;
|
||||||
|
--cor-texto-principal: #FFFFFF;
|
||||||
|
--cor-accent: #537813;
|
||||||
|
--tw-scale-x: 99% !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
@font-face {
|
||||||
|
font-family: 'General Sans';
|
||||||
|
src: url('quiz/lib/ionic/css/GeneralSans-Variable.ttf');
|
||||||
|
}
|
||||||
|
@font-face {
|
||||||
|
font-family: 'Inter';
|
||||||
|
src: url('quiz/lib/ionic/css/Inter-VariableFont_opsz\,wght.ttf');
|
||||||
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
font-family: poppins;
|
font-family: 'Inter';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Definindo o fade-in */
|
/* Definindo o fade-in */
|
||||||
@@ -20,10 +35,11 @@ p#codigo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #f8f9fa;
|
background-color: var(--cor-fundo-principal);
|
||||||
background-image: url(img/bg.jpg);
|
background-image: url(/ius/quiz/img/quiz_patternBG.png);
|
||||||
background-size: cover;
|
background-size: 600px;
|
||||||
background-position: bottom;
|
background-repeat: repeat;
|
||||||
|
background-position: center;
|
||||||
touch-action: manipulation;
|
touch-action: manipulation;
|
||||||
-ms-touch-action: manipulation;
|
-ms-touch-action: manipulation;
|
||||||
-webkit-user-select: none;
|
-webkit-user-select: none;
|
||||||
@@ -32,9 +48,14 @@ body {
|
|||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-family: 'General Sans';
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
#login button {
|
#login button {
|
||||||
background-color: #007bff;
|
background-color: var(--cor-fundo-escuro);
|
||||||
color: #fff;
|
color: var(--cor-texto-principal);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Estilos específicos para mobile */
|
/* Estilos específicos para mobile */
|
||||||
@@ -44,30 +65,40 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
input[type="text"],
|
input[type="text"],
|
||||||
input[type="date"] {
|
input[type="date"],
|
||||||
|
input[type="email"],
|
||||||
|
select {
|
||||||
font-size: 16px !important; /* Previne zoom em iOS */
|
font-size: 16px !important; /* Previne zoom em iOS */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
:root {
|
|
||||||
--tw-scale-x: 99% !important;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
button {
|
||||||
background-color: #0a0791;
|
background-color: var(--cor-fundo-escuro);
|
||||||
|
transition: transform 0.2s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:active {
|
||||||
|
transform: scale(0.98);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-gold-xcmg {
|
||||||
|
background-color: var(--cor-fundo-escuro) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-gold-xcmg, .peer-focus\:dark\:text-gold-xcmg {
|
.text-gold-xcmg, .peer-focus\:dark\:text-gold-xcmg {
|
||||||
color: #00f4bc;
|
color: var(--cor-fundo-escuro);
|
||||||
}
|
}
|
||||||
|
|
||||||
.border-gold-xcmg {
|
.border-gold-xcmg {
|
||||||
border-color: #00f4bc;
|
border-color: var(--cor-fundo-escuro);
|
||||||
}
|
}
|
||||||
|
|
||||||
.focus\:border-gold-xcmg, .dark\:border-gold-xcmg {
|
.focus\:border-gold-xcmg, .dark\:border-gold-xcmg {
|
||||||
border-color: #00f4bc ;
|
border-color: var(--cor-fundo-escuro) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
.peer-focus\:text-gold-xcmg {
|
||||||
|
color: var(--cor-fundo-escuro) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.peer-focus\:-translate-y-4 {
|
.peer-focus\:-translate-y-4 {
|
||||||
|
|||||||
Reference in New Issue
Block a user