/
index.php
45 lines (35 loc) · 1.13 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
//--utf8_encode --
include_once 'cls/conexao.class.php';
include_once "cls/pergunta.class.php";
include_once 'cls/components/combobox.php';
include_once 'inc/comuns.inc.php';
function Main()
{
header('Content-Type: text/html; charset=utf-8');
if (!isset($_COOKIE['siacc_lang']))
$_COOKIE['siacc_lang'] = '1';
$mensagem = $_GET["m"];
$tpl = file_get_contents("tpl/index.html");
$rs = null;
if (!Comuns::ArrayObj("select Codigo, Nome from sisidiomas /*where publicado = 1*/", $rs))
echo($rs);
$cmb = new ComboBox("selIdioma", $rs, "Codigo", "Nome");
$tpl = str_replace("<!--selIdioma-->", $cmb->RenderHTML($_COOKIE['siacc_lang']), $tpl);
if (isset($mensagem) && $mensagem != "")
{
$msg = '<div id="errologin">' . base64_decode($mensagem) . '</div>';
$tpl = str_replace("<!--Mensagem-->", $msg, $tpl);
}
else
{
$tpl = str_replace("<!--Mensagem-->", "", $tpl);
}
if (strpos(strtolower($_SERVER['HTTP_HOST']), "localhost") === false)
$tpl = str_replace("<!--analytics-->", Comuns::GOOGLE_ANALYTICS, $tpl);
else
$tpl = str_replace("<!--analytics-->", "", $tpl);
echo( Comuns::Idioma($tpl, "login") );
}
Main();
?>