<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/templateControle.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>E-TIcons, empresa de tecnologia</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
<link rel="stylesheet" href="./../css/cssCliente.css" media="screen"/>
<link rel="stylesheet" href="./../jquery/skin.css" media="screen" />
<script type="text/javascript" src="./../jquery/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="./../jquery/jquery-ui-1.8.16.custom.min.js"></script>
</head>
<body>
<?php
/*session_id('siscontrole');*/
session_start();
$usuarioLogado = $_SESSION['usuarioRestrito'];
if($usuarioLogado == null or $usuarioLogado == ""){ header('location: ../clientes.php');} else {
$nivel = $_SESSION['nivelRestrito'];
?>
<div class="tudo">
  <div class="topoAdmin">
    <div class="topo_int">
      <div class="opcoes_topo">
        <form action="./../Servico.php" method="post">
          <input type="hidden" name="metodo" value="GerenciadorClientes.sair" />
          <ul>
            <li class="usuario" id="usuario"><?php echo utf8_encode($usuarioLogado); ?></li>
            <li class="separator"></li>
            <li><input type="image" src="./../imagens/exit.gif" title="sair" /></li>
            <li><a href="configuracoes.php" title="Configurações"><img src="./../imagens/config.gif" /></a></li>
            <li class="separator"></li>
            <li><a href="inicio.php" title="Inicio"><img src="./../imagens/home.gif"/></a></li>
          </ul>
        </form>
      </div>
      <!-- opcoes_topo -->
      <div class="logomarca"><img src="./../imagens/controleclientes.png"/></div>
    </div>
    <!-- topo_int --> 
  </div>
  <!-- topo -->
  <div class="menu_sup">
    <ul>
      <li><a href="inicio.php"><img src="./../imagens/home.png" align="absmiddle" /> Home</a></li>
      <li><a href="clientes.php"><img src="./../imagens/clientes.png" align="absmiddle" /> Clientes</a></li>
      <li style="display:<?php echo ($nivel == '2' ? 'block' : 'none'); ?>"><a href="usuarios.php"><img src="./../imagens/usuarios.png" align="absmiddle" /> Usuários</a></li>
      <li><a href="chamados.php"><img src="./../imagens/chamados.png" align="absmiddle" /> Chamados</a></li>
      <li style="display:<?php echo ($nivel == '2' ? 'block' : 'none'); ?>"><a href="registros.php"><img src="./../imagens/registros.gif" align="absmiddle" /> Registros</a></li>
    </ul>
    <div class="titulo_pagina"><!-- InstanceBeginEditable name="titulo" --><div class="ui-widget ui-widget-content ui-corner-all titulo">Minha Conta</div><!-- InstanceEndEditable --></div>
  </div>
  <!-- menu_sup -->
  <div class="conteudo"><!-- InstanceBeginEditable name="conteudo" -->
<script type="text/javascript">
$(function(){
	$('#contaUsuario').load('cadUsuarioRestrito.php?opcao=hidden');
	$('#dialogAletarSenha').dialog({autoOpen: false, width: 500, modal:true});
	$('#dialogCancelarConta').dialog({autoOpen: false, width: 500, modal:true});
	$('#alterarSenha').click(function(){ 
			$('#dialogAletarSenha').dialog('open');
		});
	$('#cancelarConta').click(function(){
			$('#dialogCancelarConta').dialog('open');
		});
});
</script>
<div class="ui-widget ui-widget-content ui-corner-all menu_extra texto-conteudo">
    <input type="button" value="Alterar senha" id="alterarSenha" class="ui-button ui-widget ui-widget-header ui-corner-all"/>
    <input type="button" value="Cancelar conta" id="cancelarConta" class="ui-button ui-widget ui-widget-header ui-corner-all"/>
</div>
<div class="formulario">
<form method="post" action="../Servico.php" name="formAltConta" onsubmit="return verificarCampos();">
<input type="hidden" name="metodo" value="GerenciadorClientes.alterarConta" />

<div id="contaUsuario">carregando...</div>

<div class="ui-widget ui-widget-content ui-corner-all texto-conteudo menu_extra" align="center">
	<input type="button" value="cancelar" id="cancelar" class="ui-button ui-widget ui-widget-header ui-corner-all" onclick="javascript: window.history.back();" />
	<input type="submit" value="alterar" id="alterar" class="ui-button ui-widget ui-widget-header ui-corner-all" />
</div>
</form>
<?php
include '../beans/service/ServiceMessages.class.php';
$service = ServiceMessages::getInstancia();
if($service->getMensagem() != ""){
	echo "<div class=\"ui-widget\">
		  <div class=\"ui-state-highlight  ui-corner-all mensagem\" style=\"padding: 0pt 0.7em;\">
		  <p><span class=\"ui-icon ui-icon-info\" style=\"float: left; margin-right: 0.3em;\"></span> 
		  <strong>".utf8_encode($service->getMensagem())."</strong></p></div></div>";
}
$service->destroy();
?>
</div>

<div id="dialogAletarSenha" title="Alterar Senha">
<p>
<form action="../Servico.php" method="post">
<input type="hidden" name="metodo" value="GerenciadorClientes.alterarSenha"/>
<table>
<tr><td>Senha atual :</td><td><input type="password" name="senhaAtual" class="ui-widget ui-widget-content ui-corner-all" autocomplete="off"/></td></tr>
<tr><td>Senha nova :</td><td><input type="password" name="senhaNova" class="ui-widget ui-widget-content ui-corner-all" autocomplete="off"/></td></tr>
</table>
<div class="ui-widget ui-widget-content ui-corner-all texto-conteudo" align="center">
<input type="button" value="Cancelar" onclick="javascript: $('#dialogAletarSenha').dialog('close');" class="ui-button ui-widget ui-widget-header ui-corner-all" />
<input type="submit" value="OK" class="ui-button ui-widget ui-widget-header ui-corner-all" />
</div>
</form>
<div class="textoMini"><span class="ui-icon ui-icon-alert"></span>Para alterar sua senha é necessário saber a senha atual.</div>
</p>
</div>
<div id="dialogCancelarConta" title="Cancelar Conta">
<p>Você tem certeza que deseja cancelar sua conta?</p>
<form action="../Servico.php" method="post">
<input type="hidden" name="metodo" value="GerenciadorClientes.cancelarConta" />
<div class="ui-widget ui-widget-content ui-corner-all texto-conteudo" align="center">
<input type="button" value="Cancelar" onclick="javascript: $('#dialogCancelarConta').dialog('close');" class="ui-button ui-widget ui-widget-header ui-corner-all" />
<input type="submit" value="OK" class="ui-button ui-widget ui-widget-header ui-corner-all" />
</div>
</form>
</div>
  <!-- InstanceEndEditable --></div>
  <!-- conteudo --> 
</div>
<!-- tudo --> 
<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27091929-1']);
  _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';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>
<?php } ?>
</body>
<!-- InstanceEnd --></html>