<?
session_name('portal_absa');
session_start();

require_once("conexion/conectar.php");

$conexion = new CONDB();
$conexion->conectar();

$query = "select tema_general,tema_menu,color_fondo,fondo_img,color_fondo_2,fondo_img_2,login_img,fondo_img_check,fondo_img_2_check,slide_superior_check,
slide_centro_check,fondo_img_3,fondo_img_4,alineacion_slide_superior,banner_centro_check,rfc_receptor
 from configpagina LIMIT 1";


$resultConfig = mysqli_query($conexion->CONEXION,$query);



$temp=mysqli_fetch_array($resultConfig,MYSQLI_ASSOC);

$_SESSION['tema_general'] = $temp['tema_general'];
$_SESSION['tema_menu'] = $temp['tema_menu'];
$_SESSION['color_fondo'] = $temp['color_fondo'];
$_SESSION['fondo_img'] = $temp['fondo_img'];
$_SESSION['color_fondo_2'] = $temp['color_fondo_2'];
$_SESSION['fondo_img_2'] = $temp['fondo_img_2'];
$_SESSION['login_img'] = $temp['login_img'];
$_SESSION['fondo_img_check'] = $temp['fondo_img_check'];  //Fondo de Login Check
$_SESSION['fondo_img_2_check'] = $temp['fondo_img_2_check'];  //Fondo General Check
$_SESSION['slide_superior_check'] = $temp['slide_superior_check'];
$_SESSION['slide_centro_check'] = $temp['slide_centro_check'];
$_SESSION['banner_centro_check'] = $temp['banner_centro_check'];
$_SESSION['fondo_img_3'] = $temp['fondo_img_3'];  //Fondo banner superior
$_SESSION['fondo_img_4'] = $temp['fondo_img_4'];  //Fondo banner centro
$_SESSION['alineacion_slide_superior'] = $temp['alineacion_slide_superior'];
$_SESSION['RFC_RECEPTOR_PORTAL']=$temp['rfc_receptor'];

if(file_exists("config.ini")){
	$vlineas = file("config.ini");
	
	foreach ($vlineas as $sLinea) {
			if(substr($sLinea,0,17) == "AVISO_PRIVACIDAD=" && trim($sLinea) == "AVISO_PRIVACIDAD=SI"){
				$_SESSION["aviso"]="SI";
				break;
			}else{
				$_SESSION["aviso"]="NO";
			}
	}
}else{
$_SESSION["aviso"]=="NO";
}

?>


?>

<html>
<head>
<title>Login - Recibe CFD</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<script language="javascript" src="libs/js/jquery.min1-3-2.js"></script>
<script>
var $j_3 = $.noConflict();
</script>
<script language="javascript" src="libs/js/jquery.form.js"></script>
<script language="javascript" src="libs/js/jquery.min1.6.2.js"></script>
<script>
var $j_6 = $.noConflict();
</script>
<link rel="stylesheet" href="libs/jQueryValidation/css/validationEngine.jquery.css" type="text/css"/>
<link rel="stylesheet" href="libs/jQueryValidation/css/template.css" type="text/css"/>
<script src="libs/jQueryValidation/js/languages/jquery.validationEngine-es.js" charset="utf-8" type="text/javascript"></script>
<script src="libs/jQueryValidation/js/jquery.validationEngine.js" charset="utf-8" type="text/javascript"></script>

<!-- Jquery easy ui -->
<link rel="stylesheet" type="text/css" href="libs/jquery-easyui-1.2.4/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="libs/jquery-easyui-1.2.4/themes/icon.css">
<script type="text/javascript" src="libs/jquery-easyui-1.2.4/jquery.easyui.min.js"></script>
<script type="text/javascript" src="libs/js/funciones.js"></script>
<script>
$j_6(document).ready(function(){
	
	$j_6("#Login").validationEngine();
	$j_6("#tbl_1").width($j_6(window).width());
	$j_6("#tbl_1").height($j_6(window).height());
	$j_6("#td_1").width($j_6(window).width());
	$j_6("#td_1").height($j_6(window).height());
	
	if(!$j_3.browser.msie){
		$j_6("#navegadores").hide();
	}
	
	$j_6('#loading').hide();
    $j_6().ajaxStart(function() {
        $j_6('#loading').show();
        $j_6('#resultLogin').hide();
    }).ajaxStop(function() {
        $j_6('#loading').hide();
        $j_6('#resultLogin').fadeIn('slow');
    });
	
	$j_6('#form, #fat, #Login').submit(function() {
        $j_6.ajax({
            type: 'POST',
            url: $j_6(this).attr('action'),
            data: $j_6(this).serialize(),
            success: function(data) {
					$j_6('#resultLogin').html(data);
            }
        })
        
        return false;
    });
		
		
		
});
</script>
<link href="CSS/super_css.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" media="screen" href="grids/jqgrid/src/css/<?=$_SESSION['tema_general']?>/jquery-ui-1.9.1.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="grids/jqgrid/src/css/ui.jqgrid.css" />
<link rel="stylesheet" type="text/css" media="screen" href="grids/jqgrid/src/css/ui.multiselect.css" />

<style type="text/css">
body{font: .75em Arial,sans-serif; background: <?=$_SESSION['color_fondo']?>; color: #333333; 
<?if($_SESSION['fondo_img_check'] != 0 && trim($_SESSION['fondo_img']) != ""){?>background-image: url(Imagenes/imgFondo/<?=$_SESSION['fondo_img']?>);<?}?>  background-size: cover;
        -moz-background-size: cover;
        -webkit-background-size: cover;
        
    background-attachment: fixed;
}
.headDiv{
behavior: url('CSS/ie-css3.htc');
box-shadow: -3px 3px 20px #333333;
-webkit-box-shadow: -3px 3px 20px #333333;
-moz-box-shadow: -3px 3px 20px #333333;
width:100%;
height: 30px;
border:0px;
background-color: #00263C;
font-size: 16px;
color: #CCCCCC;
z-index:200;
position:fixed;
left: 0;
top: 0;
}
html { overflow-x:hidden; overflow-y:hidden;}
</style>
<!--[if lte IE 7]>
<style type="text/css">
.headDiv{
behavior: url('CSS/ie-css3.htc');
box-shadow: -3px 3px 20px #333333;
width:100%;
height: 30px;
border:0px;
background-color: #00263C;
font-size: 16px;
color: #CCCCCC;
z-index:200;
position: absolute;
left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
}
</style>
<![EndIf]-->

</head>

<body>
<div class="headDiv">
Facturaci&oacute;n Electr&oacute;nica - Recibe CFD
</div>
    
<center>
<div id="resultLogin"></div>
<form name="Login" id="Login" method="post" action="login.php?razonSocial=<?=$_GET['razonSocial']?>&usuarioActivar=<?=$_GET['usuario']?>&accion=<?=$_GET['accion']?>">
<table width="100%" height="100%">
    <tr>
        <td valign="center">
      <center>
	  <br/><br/>
	  <table width="536" height="274" border="0" style="background-image:url(Imagenes/imgLogin/<?=$_SESSION['login_img']?>); background-repeat: no-repeat;">
                    <tr><td height="120px"></td>
                    </tr>
                    <tr>
                            <td class="txt_logindat_17" align="right">
                                    &nbsp;Usuario:
                            </td>
                            <td>
                                    <input type="text" name="user" style="font-size:14px" id="user" size="30" class="validate[required] text-input" data-prompt-position="topRight:-70"/>
                            </td>
                    </tr>
                    <tr>
                            <td class="txt_logindat_17" align="right">
                                    &nbsp;Contrase&ntilde;a:
                            </td>
                            <td>
                                    <input type="password" name="pass" style="font-size:14px" id="pass" size="30" class="validate[required] text-input" data-prompt-position="topRight:-30"/>
                            </td>
                    </tr>
                    <tr>
                            <td></td>
                            <td><input type="submit" value="Entrar"/></td>
                    </tr>
                    
                    <tr>
                            <td align="center" colspan="2">
                                <a style="color: #000000; font-weight: bold" href="admin.php?modulo=REGUSUARIOS" target="_self">Registrarse</a>&nbsp;&nbsp;&nbsp;
                                <a style="color: #000000; font-weight: bold" href="admin.php?modulo=RECUERDAPASS" target="_self">&iquest;Olvid&oacute; su contrase&ntilde;a?</a>
                                <td colspan="2" align="center" class="pie"><a class="pie" href="http://www.disxii.com" target="_blank"><img src="Imagenes/poweredby.png" width="42" height="28"></a></td>
                            </td>
                    </tr>
            </table>
			<table>
			<tr>
                        <td>
                            <div id="navegadores">
<table><tr><td style="font-size: 15;" class="pie" align="center">Con los siguientes navegadores se ve mejor</td></tr><tr><td align="center">
<img onClick="window.location.href='https://www.google.com.mx/chrome/?brand=ECSB&installdataindex=no-apps-no-promo&hl=es-419&gclid=CJPB6_fwna4CFYPd4AodYwLddg'" style="cursor: pointer" src="Imagenes/chrome.jpg" width="64" height="64"><img onClick="window.location.href='http://www.mozilla.org/en-US/firefox/new/'" style="cursor: pointer" src="Imagenes/firefox.jpg" width="64" height="64"><img onClick="window.location.href='http://www.apple.com/safari/download/'" style="cursor: pointer" src="Imagenes/safari.jpg" width="64" height="64"><img onClick="window.location.href='http://www.opera.com/download/'" style="cursor: pointer" src="Imagenes/opera.jpg" width="64" height="64">
</td></tr></table></div>
                        </td>
                    </tr>
			</table>
            </center>
        </td>
    </tr>
</table>		
</form>
      
</center>
</body>
</html>
