Skip to content

Commit

Permalink
Merge pull request #2499 from portabilis/mc-analytics
Browse files Browse the repository at this point in the history
Configura o analytics no i-educar
  • Loading branch information
MarceloCajueiro authored Dec 28, 2017
2 parents 8e07ebd + e90f2de commit e30ab5a
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 133 deletions.
2 changes: 2 additions & 0 deletions ieducar/intranet/include/clsBase.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ function MakeHeadHtml()
{

$saida = $this->OpenTpl('htmlhead');
$saida = str_replace("<!-- #&CORE_EXT_CONFIGURATION_ENV&# -->", CORE_EXT_CONFIGURATION_ENV, $saida);
$saida = str_replace("<!-- #&USER_ID&# -->", $_SESSION['id_pessoa'], $saida);
$saida = str_replace("<!-- #&TITULO&# -->", $this->titulo, $saida);

if ($this->refresh) {
Expand Down
1 change: 1 addition & 0 deletions ieducar/intranet/include/clsControlador.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ protected function renderLoginPage() {
if ($requiresHumanAccessValidation)
$templateText = str_replace( "<!-- #&RECAPTCHA&# -->", Portabilis_Utils_ReCaptcha::getWidget(), $templateText);

$templateText = str_replace( "<!-- #&CORE_EXT_CONFIGURATION_ENV&# -->", CORE_EXT_CONFIGURATION_ENV, $templateText);
$templateText = str_replace( "<!-- #&MENSAGENS&# -->", $this->administrativeMessagesFetcher->getMessages(), $templateText);
$templateText = str_replace( "<!-- #&BRASAO&# -->", $this->administrativeInfoFetcher->getLoginLogo(), $templateText);
$templateText = str_replace( "<!-- #&NOME_ENTIDADE&# -->", $this->administrativeInfoFetcher->getEntityName(), $templateText);
Expand Down
261 changes: 130 additions & 131 deletions ieducar/intranet/templates/login.tpl
Original file line number Diff line number Diff line change
@@ -1,131 +1,130 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Intranet</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">

<link rel=stylesheet type='text/css' href='styles/login.css?5' />
<link rel=stylesheet type='text/css' href='styles/font-awesome.css?5' />
<script type='text/javascript' src='scripts/jquery/jquery-1.8.3.min.js?5'></script>
<script type='text/javascript' src='scripts/jquery/jquery-1.8.3.min.js?5'></script>

<script type="text/javascript">
var $j = jQuery.noConflict();
function currentSO() {
var so = undefined;
if (navigator && navigator.platform) {
var platform = navigator.platform.toLowerCase();
if (platform.indexOf('win') > -1)
so = 'windows';
else if (platform.indexOf('linux') > -1)
so = 'linux';
else if (platform.indexOf('mac') > -1)
so = 'macOS';
else if (platform.indexOf('x11') > -1)
so = 'unix';
else
so = platform;
}
return so;
}
function loginpage_onload() {
var domainName = window.location.hostname;
if (domainName.indexOf('treinamento') < 0 && domainName.indexOf('demonstracao') < 0)
$j('.only-for-clients').show();
$j('.fade-in').fadeIn('slow');
$j('#login').focus();
// used for support links
if (currentSO() == 'windows')
$j('.visible-for-windows-so').show();
else
$j('.visible-for-non-windows-so').show();
}
// set up google analytics
var domainName = "#&GOOGLE_ANALYTICS_DOMAIN_NAME&#";
// track only production requests.
if (domainName.indexOf('local.') < 0 && domainName.indexOf('test.') < 0) {
var _gaq = _gaq || [];
_gaq.push(['_setAccount', '***REMOVED***']);
_gaq.push(['_setDomainName', domainName]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js?5';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
}
</script>

</head>
<body onload="loginpage_onload();" class="hidden fade-in">
<div id="flash-container">

<!-- #&PENDENCIA_ADMINISTRATIVA&# -->

</div>

<div id="corpo">
<div class="box" id="mensagens" style="">
<!-- #&MENSAGENS&# -->
</div>

<div>
<!-- #&BRASAO&# -->
</div>

<h2><!-- #&NOME_ENTIDADE&# --></h2>

<!-- #&ERROLOGIN&# -->

<div id="login-form" class="box shadow">
<h1>Acesse sua conta</h1>
<!-- #&CRIARCONTA&# -->
<form action="" method="post">
<label class="" for="login">Matrícula:</label>
<input type="text" name="login" id="login">

<label class="" for="senha">Senha:</label>
<input type="password" name="senha" id="senha">

<!-- #&RECAPTCHA&# -->

<input type="submit" class="submit" src="imagens/nvp_bot_entra_webmail.jpg" value="Entrar">
<p class="forget-password"><a class="light small" href="/module/Usuario/RedefinirSenha">Esqueceu sua senha?</a></p>
</p>
</form>

</div> <!-- end login-form -->

</div> <!-- end corpo -->

<div id="rodape" class="texto-normal">
<p>
<!-- #&RODAPE_LOGIN&# -->
</p>

<div class="rodape-social">
<!-- #&RODAPE_EXTERNO&# -->
<div class="social-icons">
<!-- #&LINKS_SOCIAL&# -->
</div>
</div>
</div> <!-- end rodape -->

</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Intranet</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">

<link rel=stylesheet type='text/css' href='styles/login.css?5' />
<link rel=stylesheet type='text/css' href='styles/font-awesome.css?5' />
<script type='text/javascript' src='scripts/jquery/jquery-1.8.3.min.js?5'></script>
<script type='text/javascript' src='scripts/jquery/jquery-1.8.3.min.js?5'></script>

<script type="text/javascript">
window.ambiente = '<!-- #&CORE_EXT_CONFIGURATION_ENV&# -->';
var $j = jQuery.noConflict();
function currentSO() {
var so = undefined;
if (navigator && navigator.platform) {
var platform = navigator.platform.toLowerCase();
if (platform.indexOf('win') > -1) {
so = 'windows';
} else if (platform.indexOf('linux') > -1) {
so = 'linux';
} else if (platform.indexOf('mac') > -1) {
so = 'macOS';
} else if (platform.indexOf('x11') > -1) {
so = 'unix';
} else {
so = platform;
}
}
return so;
}
function loginpage_onload() {
var domainName = window.location.hostname;
if (domainName.indexOf('treinamento') < 0 && domainName.indexOf('demonstracao') < 0) {
$j('.only-for-clients').show();
}
$j('.fade-in').fadeIn('slow');
$j('#login').focus();
// used for support links
if (currentSO() == 'windows') {
$j('.visible-for-windows-so').show();
} else {
$j('.visible-for-non-windows-so').show();
}
}
</script>

<script async src="https://www.googletagmanager.com/gtag/js?id=***REMOVED***"></script>
<script>
if (window.ambiente == 'production') {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('set', {'content_group1': window.location.hostname});
gtag('config', '***REMOVED***');
}
</script>

</head>
<body onload="loginpage_onload();" class="hidden fade-in">
<div id="flash-container">

<!-- #&PENDENCIA_ADMINISTRATIVA&# -->

</div>

<div id="corpo">
<div class="box" id="mensagens" style="">
<!-- #&MENSAGENS&# -->
</div>

<div>
<!-- #&BRASAO&# -->
</div>

<h2><!-- #&NOME_ENTIDADE&# --></h2>

<!-- #&ERROLOGIN&# -->

<div id="login-form" class="box shadow">
<h1>Acesse sua conta</h1>
<!-- #&CRIARCONTA&# -->
<form action="" method="post">
<label class="" for="login">Matrícula:</label>
<input type="text" name="login" id="login">

<label class="" for="senha">Senha:</label>
<input type="password" name="senha" id="senha">

<!-- #&RECAPTCHA&# -->

<input type="submit" class="submit" src="imagens/nvp_bot_entra_webmail.jpg" value="Entrar">
<p class="forget-password"><a class="light small" href="/module/Usuario/RedefinirSenha">Esqueceu sua senha?</a></p>
</p>
</form>

</div> <!-- end login-form -->

</div> <!-- end corpo -->

<div id="rodape" class="texto-normal">
<p>
<!-- #&RODAPE_LOGIN&# -->
</p>

<div class="rodape-social">
<!-- #&RODAPE_EXTERNO&# -->
<div class="social-icons">
<!-- #&LINKS_SOCIAL&# -->
</div>
</div>
</div> <!-- end rodape -->

</body>
</html>
22 changes: 20 additions & 2 deletions ieducar/intranet/templates/nvp_htmlhead.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="pt" class="no-js">
<head>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
Expand Down Expand Up @@ -41,6 +40,8 @@
<script type="text/javascript" src="scripts/scriptaculous/effects.js?5"></script>
<script type="text/javascript" src="scripts/jquery.mask.min.js?5"></script>
<script type="text/javascript">
window.ambiente = '<!-- #&CORE_EXT_CONFIGURATION_ENV&# -->';
var running = false;
var altura = null;
Expand Down Expand Up @@ -95,6 +96,23 @@
}
</script>
<script async src="https://www.googletagmanager.com/gtag/js?id=***REMOVED***"></script>
<script>
if (window.ambiente == 'production') {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('set', {'content_group1': window.location.hostname});
user_id = '<!-- #&USER_ID&# -->';
if (user_id) {
gtag('set', {'user_id': user_id});
}
gtag('config', '***REMOVED***');
}
</script>
<!-- #&SCRIPT&# -->
<script type="text/javascript">
Expand Down

0 comments on commit e30ab5a

Please sign in to comment.