-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit ba536db
Showing
1,769 changed files
with
122,414 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Laranja: #cc6411 | ||
Azul mais escuro: #00377e | ||
Azul do meio: #0a579f | ||
Azul mais claro: #5f9e97 | ||
Verde: #77ac5b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
function calcularIdade($data){ | ||
|
||
$idade = 0; | ||
$data_nascimento = date('Y-m-d', strtotime($data)); | ||
|
||
list($anoNasc, $mesNasc, $diaNasc) = explode('-', $data_nascimento); | ||
|
||
$idade = date("Y") - $anoNasc; | ||
|
||
if (date("m") < $mesNasc){ | ||
$idade -= 1; | ||
} elseif ((date("m") == $mesNasc) && (date("d") <= $diaNasc) ){ | ||
$idade -= 1; | ||
} | ||
|
||
return $idade; | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
function formatarData($dataRecebida){ | ||
$data = explode('-', $dataRecebida); | ||
|
||
return $data[2].'/'.$data[1].'/'.$data[0]; | ||
} | ||
|
||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
<?php | ||
|
||
include("controllerGerarGraficoSexo.php"); | ||
include("controllerGerarGraficoIdade.php"); | ||
include("controllerGerarGraficoContato.php"); | ||
include("controllerGerarGraficoTipoLead.php"); | ||
|
||
?> | ||
|
||
<script type="text/javascript"> | ||
|
||
google.charts.load('current', {'packages':['corechart']}); | ||
|
||
function gerarGrafico(tipo){ | ||
|
||
$('.janela-modal-grafico').slideToggle(); | ||
|
||
gerarGraficoSexo(tipo); | ||
gerarGraficoIdade(tipo); | ||
gerarGraficoContato(tipo); | ||
gerarGraficoTipoLead(tipo); | ||
} | ||
|
||
function gerarGraficoSexo(tipo) { | ||
var data = google.visualization.arrayToDataTable([ | ||
['Sexo', 'Quantidade'], | ||
['Masculino', <?= $masculino?>], | ||
['Feminino', <?= $feminino?>], | ||
]); | ||
|
||
var options = { | ||
title: 'Sexo', | ||
curveType: 'function', | ||
legend: { position: 'bottom' } | ||
}; | ||
|
||
if(tipo == 0){ | ||
var chart = new google.visualization.PieChart(document.getElementById('sexo_chart')); | ||
}else if(tipo == 1){ | ||
var chart = new google.visualization.BarChart(document.getElementById('sexo_chart')); | ||
}else{ | ||
var chart = new google.visualization.ScatterChart(document.getElementById('sexo_chart')); | ||
} | ||
|
||
chart.draw(data, options); | ||
} | ||
|
||
function gerarGraficoIdade(tipo) { | ||
var data = google.visualization.arrayToDataTable([ | ||
['Idade', 'Quantidade'], | ||
['18-24', <?= $entre18e24?>], | ||
['25-34', <?= $entre25e34?>], | ||
['35-44', <?= $entre35e44?>], | ||
['45-54', <?= $entre45e54?>], | ||
['55-64', <?= $entre55e64?>], | ||
['65+', <?= $mais65?>], | ||
]); | ||
|
||
var options = { | ||
title: 'Idade', | ||
curveType: 'function', | ||
legend: { position: 'bottom' } | ||
}; | ||
|
||
if(tipo == 0){ | ||
var chart = new google.visualization.PieChart(document.getElementById('idade_chart')); | ||
}else if(tipo == 1){ | ||
var chart = new google.visualization.BarChart(document.getElementById('idade_chart')); | ||
}else{ | ||
var chart = new google.visualization.ScatterChart(document.getElementById('idade_chart')); | ||
} | ||
|
||
chart.draw(data, options); | ||
} | ||
|
||
function gerarGraficoContato(tipo) { | ||
var data = google.visualization.arrayToDataTable([ | ||
['Origem do contato', 'Quantidade'], | ||
['Base', <?= $base?>], | ||
['Indicação', <?= $indicacao?>], | ||
['Indicação Parceiro', <?= $indicacaoParceiro?>], | ||
['Doctoraria', <?= $doctoraria?>], | ||
['Google', <?= $google?>], | ||
['Facebook', <?= $facebook?>], | ||
['Instagram', <?= $instagram?>], | ||
['Youtube', <?= $youtube?>], | ||
['Site', <?= $site?>], | ||
['Radio', <?= $radio?>], | ||
['TV', <?= $tv?>], | ||
['Jornal', <?= $jornal?>], | ||
['Revista', <?= $revista?>], | ||
['Outdoor', <?= $outdoor?>], | ||
['Panfleto', <?= $panfleto?>], | ||
]); | ||
|
||
var options = { | ||
title: 'Contato', | ||
curveType: 'function', | ||
legend: { position: 'bottom' } | ||
}; | ||
|
||
if(tipo == 0){ | ||
var chart = new google.visualization.PieChart(document.getElementById('contato_chart')); | ||
}else if(tipo == 1){ | ||
var chart = new google.visualization.BarChart(document.getElementById('contato_chart')); | ||
}else{ | ||
var chart = new google.visualization.ScatterChart(document.getElementById('contato_chart')); | ||
} | ||
|
||
chart.draw(data, options); | ||
} | ||
|
||
function gerarGraficoTipoLead(tipo) { | ||
var data = google.visualization.arrayToDataTable([ | ||
['Origem do contato', 'Quantidade'], | ||
['Entrou em contato', <?= $entrouContato?>], | ||
['Marcou consulta', <?= $marcouConsulta?>], | ||
['Agendou tratamento', <?= $agendouTratamento?>], | ||
]); | ||
|
||
var options = { | ||
title: 'Tipo de Lead', | ||
curveType: 'function', | ||
legend: { position: 'bottom' } | ||
}; | ||
|
||
if(tipo == 0){ | ||
var chart = new google.visualization.PieChart(document.getElementById('tipo_lead_chart')); | ||
}else if(tipo == 1){ | ||
var chart = new google.visualization.BarChart(document.getElementById('tipo_lead_chart')); | ||
}else{ | ||
var chart = new google.visualization.ScatterChart(document.getElementById('tipo_lead_chart')); | ||
} | ||
|
||
chart.draw(data, options); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
$base = 0; | ||
$indicacao = 0; | ||
$indicacaoParceiro= 0; | ||
$doctoraria = 0; | ||
$google = 0; | ||
$facebook = 0; | ||
$instagram = 0; | ||
$youtube = 0; | ||
$site = 0; | ||
$radio = 0; | ||
$tv = 0; | ||
$jornal = 0; | ||
$revista = 0; | ||
$outdoor = 0; | ||
$panfleto = 0; | ||
|
||
for($i = 0; $i < count($totalLeads); $i++){ | ||
if($totalLeads[$i]['origem_servico_lead'] == 'base'){ | ||
$base++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'indicacao'){ | ||
$indicacao++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'indicacao-parceiro'){ | ||
$indicacaoParceiro++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'doctoraria'){ | ||
$doctoraria++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'google'){ | ||
$google++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'facebook'){ | ||
$facebook++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'instagram'){ | ||
$instagram++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'youtube'){ | ||
$youtube++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'site'){ | ||
$site++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'radio'){ | ||
$radio++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'tv'){ | ||
$tv++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'jornal'){ | ||
$jornal++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'revista'){ | ||
$revista++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'outdoor'){ | ||
$outdoor++; | ||
}else if($totalLeads[$i]['origem_servico_lead'] == 'panfleto'){ | ||
$panfleto++; | ||
} | ||
|
||
} | ||
|
||
|
||
?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
$entre18e24 = 0; | ||
$entre25e34 = 0; | ||
$entre35e44 = 0; | ||
$entre45e54 = 0; | ||
$entre55e64 = 0; | ||
$mais65 = 0; | ||
|
||
for($i = 0; $i < count($totalLeads); $i++){ | ||
if($totalLeads[$i]['idade_lead'] <= 24){ | ||
$entre18e24++; | ||
}else if($totalLeads[$i]['idade_lead'] <= 34){ | ||
$entre25e34++; | ||
}else if($totalLeads[$i]['idade_lead'] <= 44){ | ||
$entre35e44++; | ||
}else if($totalLeads[$i]['idade_lead'] <= 54){ | ||
$entre45e54++; | ||
}else if($totalLeads[$i]['idade_lead'] <= 64){ | ||
$entre55e64++; | ||
}else if($totalLeads[$i]['idade_lead'] > 64){ | ||
$mais65++; | ||
} | ||
} | ||
|
||
|
||
?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
$masculino = 0; | ||
$feminino = 0; | ||
|
||
for($i = 0; $i < count($totalLeads); $i++){ | ||
if($totalLeads[$i]['sexo_lead'] == "masculino"){ | ||
$masculino++; | ||
}else{ | ||
$feminino++; | ||
} | ||
} | ||
|
||
|
||
?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?php | ||
|
||
$entrouContato = 0; | ||
$marcouConsulta = 0; | ||
$agendouTratamento = 0; | ||
|
||
for($i = 0; $i < count($totalLeads); $i++){ | ||
if($totalLeads[$i]['entrou_contato_tipo_lead'] == 'Entrou em contato'){ | ||
$entrouContato++; | ||
} | ||
if($totalLeads[$i]['marcou_consulta_tipo_lead'] == 'Marcou consulta'){ | ||
$marcouConsulta++; | ||
} | ||
if($totalLeads[$i]['agendou_tratamento_tipo_lead'] == 'Agendou tratamento'){ | ||
$agendouTratamento++; | ||
} | ||
} | ||
|
||
?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?php | ||
//ARQUIVO PARA VERIFICAR OS DADOS DO USUARIO NO MOMENTO DO LOGIN | ||
|
||
$contErro = 0; | ||
for($i=0;$i<count($totalUsuarios);$i++){ | ||
if(isset($_POST['login']) and isset($_POST['senha'])){ | ||
if($totalUsuarios[$i]['nome_usuario'] == trim($_POST['login']) and $totalUsuarios[$i]['senha_usuario'] == $_POST['senha']){ | ||
|
||
//AQUI EU COMEÇO A PEGAR ALGUNS DADOS DA TABELA DE USUARIO | ||
//PARA USAR POSTERIORMENTE EM OUTRAS PARTES DO SISTEMA | ||
|
||
$idUsuarioLogado = $totalUsuarios[$i]['id_usuario']; | ||
|
||
include_once("MVC/Model/modelStatusUsuario.php"); | ||
|
||
$usuarioLogado = $_POST['login']; | ||
$nomeUsuario = $totalUsuarios[$i]['nome_usuario']; | ||
$tipoUsuario = $totalUsuarios[$i]['tipo_usuario']; | ||
//$nomeCliente = $totalUsuarios[$i]['nome_cliente']; | ||
$imgUsuario = $totalUsuarios[$i]['imagem_usuario']; | ||
|
||
$_SESSION['id-usuario-logado'] = $idUsuarioLogado; | ||
$_SESSION['login'] = $usuarioLogado; | ||
$_SESSION['nome'] = $nomeUsuario; | ||
$_SESSION['tipo-usuario'] = $tipoUsuario; | ||
//$_SESSION['nome-cliente'] = $nomeCliente; | ||
$_SESSION['imagem-usuario'] = $imgUsuario; | ||
|
||
//header('Location: MVC/View/viewPainelAdministrativo.php'); | ||
|
||
echo "<script>document.location='MVC/View/viewPainelAdministrativo.php'</script>"; | ||
} | ||
else{ | ||
if($contErro == 0){ | ||
$contErro += 1; | ||
echo "DADOS INCORRETOS!"; | ||
} | ||
} | ||
} | ||
} | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
//ARQUIVO PARA FAZER O LOGOUT DO SISTEMA E LIMPAR AS SESSÕES | ||
|
||
include("../Model/modelBancoDeDados.php"); | ||
|
||
session_start(); | ||
$logout = $_SESSION['login']; | ||
$idUsuarioLogado = $_SESSION['id-usuario-logado']; | ||
|
||
$_SESSION['login'] = array(); | ||
|
||
$atualizarStatus = $pdo->prepare("UPDATE usuarios SET logado_usuario = '0' WHERE id_usuario = '$idUsuarioLogado'"); | ||
|
||
$atualizarStatus->execute(); | ||
|
||
//header("Location: ../../index.php"); | ||
echo "<script>document.location='../../index.php'</script>"; | ||
exit(); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
function verificarTipoLead($tipo, $totalLeads){ | ||
$contagemLeads = 0; | ||
|
||
for($i = 0; $i < count($totalLeads); $i++){ | ||
if($tipo == "Entrou em contato"){ | ||
if($totalLeads[$i]['entrou_contato_tipo_lead'] == $tipo){ | ||
$contagemLeads++; | ||
} | ||
}else if($tipo == "Marcou consulta"){ | ||
if($totalLeads[$i]['marcou_consulta_tipo_lead'] == $tipo){ | ||
$contagemLeads++; | ||
} | ||
}else{ | ||
if($totalLeads[$i]['agendou_tratamento_tipo_lead'] == $tipo){ | ||
$contagemLeads++; | ||
} | ||
} | ||
} | ||
|
||
return $contagemLeads; | ||
} | ||
|
||
?> |
Oops, something went wrong.