<?php
	if( strpos(Route::currentRouteName(), 'SysWebPAterrizajePlantillaxClienteVer') !== false ){
		header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1.
		header("Pragma: no-cache"); // HTTP 1.0.
		header("Expires: 0"); // Proxies.
	}
?>
<!DOCTYPE html>
<html lang="es">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta name="robots" content="noindex, nofollow">
		<?php if( strpos(Route::currentRouteName(), 'SysWebPAterrizajePlantillaxClienteVer') !== false || strpos(Route::currentRouteName(), 'SysWebPAterrizajeVentanasEmergentesEditar') !== false ): ?>
		<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
		<meta http-equiv="Pragma" content="no-cache" />
		<meta http-equiv="Expires" content="0" />
		<?php endif; ?>
		<meta name="description" content="Mercadeo en línea basado en resultados">
		<meta name="keywords" content="Sume Clientes">
		<link rel="apple-touch-icon" sizes="57x57" href="<?php echo asset('SysWeb/SumeClientes/Favicons/apple-icon-57x57.png'); ?>">
		<link rel="apple-touch-icon" sizes="60x60" href="<?php echo asset('SysWeb/SumeClientes/Favicons/apple-icon-60x60.png'); ?>">
		<link rel="apple-touch-icon" sizes="72x72" href="<?php echo asset('SysWeb/SumeClientes/Favicons/apple-icon-72x72.png'); ?>">
		<link rel="apple-touch-icon" sizes="76x76" href="<?php echo asset('SysWeb/SumeClientes/Favicons/apple-icon-76x76.png'); ?>">
		<link rel="apple-touch-icon" sizes="114x114" href="<?php echo asset('SysWeb/SumeClientes/Favicons/apple-icon-114x114.png'); ?>">
		<link rel="apple-touch-icon" sizes="120x120" href="<?php echo asset('SysWeb/SumeClientes/Favicons/apple-icon-120x120.png'); ?>">
		<link rel="apple-touch-icon" sizes="144x144" href="<?php echo asset('SysWeb/SumeClientes/Favicons/apple-icon-144x144.png'); ?>">
		<link rel="apple-touch-icon" sizes="152x152" href="<?php echo asset('SysWeb/SumeClientes/Favicons/apple-icon-152x152.png'); ?>">
		<link rel="apple-touch-icon" sizes="180x180" href="<?php echo asset('SysWeb/SumeClientes/Favicons/apple-icon-180x180.png'); ?>">
		<link rel="icon" type="image/png" sizes="192x192"  href="<?php echo asset('SysWeb/SumeClientes/Favicons/android-icon-192x192.png'); ?>">
		<link rel="icon" type="image/png" sizes="32x32" href="<?php echo asset('SysWeb/SumeClientes/Favicons/favicon-32x32.png'); ?>">
		<link rel="icon" type="image/png" sizes="96x96" href="<?php echo asset('SysWeb/SumeClientes/Favicons/favicon-96x96.png'); ?>">
		<link rel="icon" type="image/png" sizes="16x16" href="<?php echo asset('SysWeb/SumeClientes/Favicons/favicon-16x16.png'); ?>">
		<link rel="manifest" href="<?php echo asset('SysWeb/SumeClientes/Favicons/manifest.json'); ?>">
		<meta name="msapplication-TileColor" content="#ffffff">
		<meta name="msapplication-TileImage" content="<?php echo asset('SysWeb/SumeClientes/Favicons/ms-icon-144x144.png'); ?>">
		<meta name="theme-color" content="#ffffff">
		<title> Plataforma Sume Clientes </title>
		<!-- Bootstrap -->
		<?php echo HTML::style('WebPro/bootstrap/css/bootstrap.min.css'); ?>

		<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300' rel='stylesheet' type='text/css'>
		<?php /* HTML::style('WebPro/css/font-awesome.min.css') */ ?>
		<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"> -->
		<?php echo HTML::style('font-awesome-4.7.0/css/font-awesome.min.css'); ?>

		<?php if(
			strpos(Route::currentRouteName(), 'SysWebPAterrizajePlantillaxClienteVer') !== false ||
			strpos(Route::currentRouteName(), 'SysWebPAterrizajeVentanasEmergentesEditar') !== false ||

			strpos(Route::currentRouteName(), 'SysWebSWebSeccionesxClientesEditar') !== false ||
			strpos(Route::currentRouteName(), 'SysWebSWebPaginasxTemaEditar') !== false ||
			strpos(Route::currentRouteName(), 'SysWebSWebPostxPlantillaEditar') !== false
		): ?>
		<?php echo HTML::style('WebPro/css/style2.min.css?v='.date('H:i:s')); ?>

		<?php echo HTML::style('WebPro/css/style-responsive2.min.css'); ?>

		<?php else: ?>
		<?php echo HTML::style('WebPro/css/style.min.css?v='.date('H:i:s')); ?>

		<?php echo HTML::style('WebPro/css/style-responsive.min.css'); ?>

		<?php endif; ?>
		<?php echo HTML::style('PNotify/pnotify.custom.min.css'); ?>

		<?php echo HTML::style('Bootstrap3-dialog/css/bootstrap-dialog.min.css'); ?>

		<?php echo HTML::style('isLoading-jQuery/jquery.isloading.min.css'); ?>

		<?php echo HTML::style('NProgress/nprogress.min.css'); ?>

		<?php echo HTML::style('Webui-Popover/jquery.webui-popover.min.css'); ?>

		<?php echo HTML::style('SysWeb/SumeClientes/boton-ayuda.min.css?v=2.4'); ?>

		<?php echo HTML::style('VideoJS/video-js.min.css'); ?>

		<?php echo HTML::script('VideoJS/videojs-ie8.min.js'); ?>

		<?php /* HTML::style('Intl-Tel-Input/css/intlTelInput.css') */ ?>
		<?php echo HTML::style('Intl-Tel-Input/17.0.3/css/intlTelInput.min.css'); ?>

		<?php echo HTML::style('Perfect-Scrollbar/css/perfect-scrollbar.css'); ?>

		<style>
			.chatHumano {
				display: none;
				text-decoration: none !important;
				padding: 8px 17px;
				border-radius: 4px;
				font-size: 12px;
				font-weight: bold;
				margin-left: 5px;
				margin-top: 0px;
				transition: all 0.3s ease;
			}
			.chatHumano.activo {
				background-color: #4CAF50;
				color: white;
			}
			.chatHumano.inactivo {
				background-color: #FFC107;
				color: #2D2F31;
				position: relative;
				margin-top: 4px;
				border-radius: 24px: 
			}
			@media (min-width: 1024.1px) {
				.texto-movil {
					display: none;
				}
			}
			@media (max-width: 1024px) {
				.texto-escritorio {
					display: none;
				}
			}
			@media (min-width: 768px){
				.ModalCancelar .modal-dialog {width: 600px !important}
			}
			@media (max-width: 1370px){
				.div-groupinput{
					width: 220px !important;
				}
			}
			@media (max-width: 1290px){
				.div-groupinput{
					width: 200px !important;
				}
			}
			@media (max-width: 1170px){
				.div-groupinput{
					width: 190px !important;
				}
			}
			@media (max-width: 1110px){
				.div-groupinput{
					width: 180px !important;
				}
				.dataTables_filter button{
					height: 30px;
				}
			}
			@media (max-width: 1050px){
				.dataTables_filter .btn-default{
					display: none !important;
				}
				.div-groupinput{
					width: 170px !important;
				}
			}
			.div-groupinput{
				min-height: auto !important;
				width: 240px;
			}
			.dataTables_filter{
				display: flex;
				justify-content: center;
			}
			.dataTables_filter button{
				margin-left: 0 !important;
				margin-right: 0 !important;
				opacity: 0.9;
			}
			.col-busqueda input[type=search]{
				min-height: auto !important;
				margin-left: 0 !important;
			}
			.div-groupinput .btn{
				padding: 6px 12px;
			}
			.pagination li{
				display: contents !important;
			}
			.desactivado {
				opacity: 0.65;
				pointer-events: none;
			}
			body.first-login:before {
				content: '';
				height: 100%;
				width: 100%;
				position: fixed;
				background: rgba(0, 0, 0, 0.85);
				z-index: 9999;
			}
			body.first-login #btnAyuda {
				z-index: 10000;
			}
			body.first-login #livechat-compact-container {
				z-index: 9998 !important;
			}
			body.first-login .webui-popover-ayuda {
				z-index: 99999;
			}
			.first-login-tooltip {
				display: none;
			}
			body.first-login .first-login-tooltip {
				position: fixed;
				width: 400px;
				min-height: 110px;
				border: 1px solid #333;
				background: #F2F2F2;
				color: #111;
				top: 50px;
				right: 210px;
				padding: 15px;
				z-index: 10000;
				border-radius: 3px;
				display: block !important;
			}
			body.first-login .first-login-tooltip:before {
				content: "";
				position: absolute;
				top: -8px;
				right: 17px;
				border-style: solid;
				border-width: 0 8px 8px;
				border-color: #F2F2F2 transparent;
				display: block;
				width: 0;
				z-index: 0;
			}
			body.first-login .first-login-tooltip .tooltip-content{
				font-size: 20px;
			}
			.notification-seguimiento .dropdown-alerts > .alert {
				background: none repeat scroll 0 0 #f9f9f9;
				cursor: pointer;
			}
			.notification-seguimiento .alert a > div{
				display: inline-block;
			}
			.notification-seguimiento  .alert a .alert-time{
				float: right;
			}
			.notification-seguimiento .dropdown-menu .navbar-nav li{
				border-left: unset !important;
			}
			.notification-seguimiento .dropdown-menu  li{
				border-left: unset !important;
				border-bottom: 1px solid #ddd;
			}
			.notification-seguimiento.hov .dropdown-menu a:hover {
				color: #000; 
			}
			.notification-seguimiento .dropdown-menu li:last-child {
				position: relative;
			}
			.notification-seguimiento .dropdown-menu {
				height: 235px;
    			overflow-y: auto;
				font-size: 13px;
			}
			.dvVinculosPoliticas {
				font-size: 12px;
				padding-left: 10px;
				color: #505458;
				text-align: center;
			}
			.dvVinculosPoliticas a {
				color: #505458;
			}
			#nav-accordion::-webkit-scrollbar-track {
				-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
				background-color: #F5F5F5;
			}

			#nav-accordion::-webkit-scrollbar {
				width: 6px;
				background-color: #F5F5F5;
			}

			#nav-accordion::-webkit-scrollbar-thumb {
				-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
				background-color: #555;
			}
			<?php if(Auth::guest()): ?>
			<?php else: ?>
			div.widget-visible{
				clip-path: circle(0);
			}
			div.widget-visible > iframe:nth-child(2){
				clip-path: circle(0);
			}
			<?php endif; ?>

		</style>
		<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
		<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
		<!--[if lt IE 9]>
			<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
			<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
		<![endif]-->
		<?php /*@if( App::environment() == 'produccion' && strpos(public_path(), 'desarrollo') !== false )*/ ?>
		<?php if( App::environment() == 'produccion' && !(strpos(public_path(), 'desarrollo') !== false) ): ?>
			<?php if( Auth::user()->tipo != 'A' ): ?>
		<?php echo $__env->make('ExternosHead', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
			<?php endif; ?>
		<?php endif; ?>
		<?php echo $__env->yieldContent('CSS'); ?>
	</head>
	<?php /*<?php if( ( Agent::isTablet() || Agent::isDesktop() ) && Auth::user()->video_bienvenida == 0 ): ?>
	<body class="dark-theme first-login">
	<?php else: ?>
	<body class="dark-theme">
	<?php endif; ?>*/ ?>
	<body class="dark-theme">
		<?php /*<?php if( strpos(Route::currentRouteName(), 'SysWebPAterrizajePlantillaxClienteVer') !== false || strpos(Route::currentRouteName(), 'SysWebPAterrizajeVentanasEmergentesEditar') !== false ): ?>
			<?php echo $__env->make('Preloader', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
		<?php endif; ?>*/ ?>
		
		<div class="header navbar navbar-inverse box-shadow navbar-fixed-top">
			<div class="navbar-inner">
				<div class="header-seperation">
					<ul class="nav navbar-nav">
						<li class="sidebar-toggle-box"> <a href="#"><i class="fa fa-bars"></i></a> </li>
						<li>
							<a href="<?php echo URL::route('SysWebIndex'); ?>" class="sume-vinculo-branding">
								<img src="<?php echo asset('SysWeb/SumeClientes/icon.png'); ?>" style="display: inline;" class="sume-logo-branding">
								<?php if(strpos(public_path(), 'prospector') !== false): ?>
								<strong class="sume-texto-branding"> Prospector </strong>
								<?php else: ?>
								<strong class="sume-texto-branding"> Sume Clientes </strong>
								<?php endif; ?>
								<!--<i class="scif-sumeclientes-full-v3"></i>-->
							</a>
						</li>
						<li class="hidden-xs"> <a href="<?php echo URL::route('SysWebIndex'); ?>"><i class="fa fa-angle-double-left"></i> Ir a la página de inicio </a> </li>
						<?php if( strpos(Route::currentRouteName(), 'SysWebGClientes') !== false && strpos(Route::currentRouteName(), 'Productos') == false && strpos(Route::currentRouteName(), 'Referencias') == false && strpos(Route::currentRouteName(), 'Categorias') == false ): ?>
						<?php
							if(Auth::user()->tipo == 'A'){
								$zona_horaria = 'America/Managua';
								$Cliente = Cliente::find(5);
								$Empleado = Empleado::find(16);
							}
							else{
							$Cliente = (Auth::user()->tipo == 'EC')?Cliente::find(Empleado::select('clientes_id AS id')->where('users_id', '=', Auth::id())->first()->id):Cliente::find(Cliente::select('id')->where('users_id', '=', Auth::id())->first()->id);
							$Empleado = Empleado::find( Empleado::select('id')->where('users_id', '=', Auth::id())->first()->id );
							$zona_horaria = Cliente::select('zona_horaria')->where('id', '=', $Empleado->clientes_id)->first()->zona_horaria;
							}
							//CALCULO LA HORA DE REGISTRO SEGÚN ZONA HORARIA DEL PERFÍL DE CLIENTE ------------------------------------------
							$fecha_actualDT = new DateTime('now', new DateTimeZone($zona_horaria));
							$fecha_inicio = $fecha_actualDT->format('Y-m-d').' 00:00:00';
							$fecha_fin = $fecha_actualDT->format('Y-m-d').' 24:00:00';
							//---------------------------------------------------------------------------------------------------------------
							$fecha_inicio = date(DateTime::ISO8601, strtotime($fecha_inicio));
							$fecha_fin = date(DateTime::ISO8601, strtotime($fecha_fin));
							$eventos = DB::table('seguimientos_x_prospectos AS sp')
							->select('sp.id', 'sp.es AS tipo', 'sp.fecha', 'p.contacto', 'p.nombre', 'p.id AS idP')
							->join('prospectos AS p', 'p.id', '=', 'sp.prospectos_id')
							->where('p.clientes_id', '=', $Cliente->id)
							->where('sp.tipo', '=', 'M')
							->where('sp.programada', '=', 1)
							->whereBetween('sp.fecha', array($fecha_inicio, $fecha_fin))
							->orderBy('sp.fecha', 'ASC');
							if(!($Empleado->cargos_id == 3 || $Empleado->cargos_id == 4)){
								$eventos = $eventos->where('p.asignado_a', '=', $Empleado->id);
							}
							$eventos = $eventos->get();
						?>
						<li class="hidden-xs">
							<div class="hov notification-seguimiento">
								<div class="btn-group">
									<a data-toggle="dropdown" href="" class="con">
										<span class="fa fa-bell"></span>
										<span class="label label-danger"><?php echo count($eventos); ?></span>
									</a>
									<ul role="menu" id="contendor-scroll" class="dropdown-menu pull-right dropdown-alerts">
										<li class="title"><span class="icon icon-bell"></span>&nbsp;&nbsp;Eventos programados del dia...</li>
										<?php if(count($eventos) > 0): ?>
										<?php foreach($eventos as $evento): ?>
										<?php 
											if( $evento->tipo == 'LL' ){
												$titulo =  'Llamada a ';
												$color = '#0197DA';
												$icono = 'fa-phone';
											}
											elseif( $evento->tipo == 'MSJ' ){
												$titulo =  'Mensaje a ';
												$color = '#56BE22';
												$icono = 'fa-comments';
											}
											elseif( $evento->tipo == 'CE' ){
												$titulo =  'Correo electrónico a ';
												$color = '#FF9C00';
												$icono = 'fa-envelope-o';
											}
											elseif( $evento->tipo == 'R' ){
												$titulo =  'Reunión con ';
												$color = '#000479';
												$icono = 'fa-users';
											}
											elseif( $evento->tipo == 'N' ){
												$titulo =  'Nota de ';
												$color = '#FFCF2A';
												$icono = 'fa-file-text';
											}
											else{
												$titulo =  '';
												$color = '#FFCF2A';
												$icono = 'fa fa-calendar-o';
											}
											$ruta = URL::route('SysWebGClientesProspectosSeguimientosEditar', array($evento->idP, $evento->id));
										?>
										<li class="alert">
											<div class="alert-icon alt-default" style="vertical-align: middle;"><span class="fa <?php echo $icono; ?>" style="color: <?php echo $color; ?>;"></span></div>
											<a href="#" onclick="abrirUrl('<?php echo $ruta; ?>')">
												<div class="alert-content" style="width: 70%; word-break: break-word; white-space: normal;"><?php echo $titulo.$evento->contacto; ?></div>
												<div class="alert-time"><?php echo date('h:i a', strtotime($evento->fecha)); ?></div>
											</a>
										</li>
										<?php endforeach; ?>
										<?php else: ?>
										<li class="alert alert-warning" role="alert" style="margin: 20% 10px;">
											<p>No tienes ningún evento programado para este día</p>
										</li>
										<?php endif; ?>
									</ul>
								</div>
								<div class="btn-group notificacionOV">
									<a data-toggle="dropdown" href="" class="con">
										<span class="fa fa-usd"></span>
										<span class="label label-danger lbNOV">0</span>
									</a>
									<ul role="menu" id="contendor-scroll" class="dropdown-menu pull-right dropdown-alerts ulAlertas">
										<li class="title">
											<span class="icon icon-bell"></span>&nbsp;&nbsp;Oportunidades del dia...
										</li>
										<li class="alert alert-warning sinOportunidades" role="alert" style="margin: 20% 10px;">
											<p>No tienes ningúna oportunidad para este día</p>
										</li>
									</ul>
								</div>
							</div>
						</li>
						<?php endif; ?>
						<a data-toggle="dropdown" target="_blank" href="https://sumeclientes.com/soporte" class="chatHumano" id="chatEstadoSpan" style="border-radius: 20px;"></a>
						<li id="last-one">
							<?php echo HTML::decode(HTML::linkRoute('SysWebCerrarSesion', 'Cerrar sesión <i class="fa fa-angle-double-right"></i>', array(), array())); ?>

						</li>
					</ul><!--/nav navbar-nav--> 
				</div><!--/header-seperation--> 
			</div><!--/navbar-inner--> 
		</div><!--/header--> 
		
		<div class="page-container">
			<div class="nav-collapse top-margin fixed box-shadow2 hidden-xs" id="sidebar">
				<div class="leftside-navigation">
					<div class="sidebar-section sidebar-user clearfix">
						<div class="sidebar-user-avatar">
							<?php if( Auth::user()->tipo != 'EC' ): ?>
							<a href="<?php echo URL::route('SysWebPerfil', array(Auth::user()->id)); ?>">
								<?php if(Auth::user()->avatar != '' && File::exists(public_path().'/SysWeb/Usuarios/'.Auth::user()->id.'/Avatar/'.Auth::user()->avatar)): ?>
								<img alt="avatar"  style="object-fit: contain;" src="<?php echo asset('SysWeb/Usuarios/'.Auth::user()->id.'/Avatar/'.Auth::user()->avatar).'?v='.date('H:i:s'); ?>">
								<?php else: ?>
								<img alt="avatar" src="<?php echo asset('SysWeb/SumeClientes/silueta.jpg'); ?>">
								<?php endif; ?>
							</a>
							<?php else: ?>
							<a href="#">
								<img alt="avatar" src="<?php echo asset('SysWeb/SumeClientes/silueta.jpg'); ?>">
							</a>
							<?php endif; ?>
						</div>
						<div class="sidebar-user-name"> <?php echo substr(Auth::user()->username, 0, 12); ?> </div>
						<div class="sidebar-user-links">
							<?php if( Auth::user()->tipo != 'EC' ): ?>
							<a title="" data-placement="bottom" data-toggle="" href="<?php echo URL::route('SysWebPerfil', array(Auth::user()->id)); ?>" data-original-title="User"><i class="fa fa-user"></i></a>
							<?php else: ?>
							<a title="" data-placement="bottom" data-toggle="" href="#" data-original-title="User"><i class="fa fa-user"></i></a>
							<?php endif; ?>
							<!--<a title="" data-placement="bottom" data-toggle="" href="<?php echo URL::route('SysWebMCorreo'); ?>" data-original-title="Messages"><i class="fa fa-envelope-o"></i></a>-->
							<div style="display: inline-block;width: 28px;"> </div>
							<a title="" data-placement="bottom" data-toggle="" href="<?php echo URL::route('SysWebCerrarSesion'); ?>" data-original-title="Logout"><i class="fa fa-sign-out"></i></a>
						</div>
					</div>
					<ul id="nav-accordion" class="sidebar-menu" style="overflow: auto; height: 100%;">
						<li> <h3> Panel de control </h3> </li>
						<?php if( Auth::user()->tipo == 'C' ): ?>
						<?php if( strpos(Route::currentRouteName(), 'SysWebIndex') !== false ): ?>
						<li> <a href="<?php echo URL::route('SysWebIndex'); ?>" class="active"> <i class="fa fa-home"></i> <span> Inicio </span> </a> </li>
						<?php else: ?>
						<li> <a href="<?php echo URL::route('SysWebIndex'); ?>"> <i class="fa fa-home"></i> <span> Inicio </span> </a> </li>
						<?php endif; ?>
						<?php /*<li> <a href="<?php echo URL::route('SysWebCPanel'); ?>"> <i class="fa fa-tasks"></i> <span> CPanel </span> </a> </li>
						<li> <a href="<?php echo URL::route('SysWebSWeb'); ?>"> <i class="fa fa-globe"></i> <span> Sitio web </span> </a> </li>
						<li> <a href="<?php echo URL::route('SysWebMCorreo'); ?>"> <i class="fa fa-envelope-o"></i> <span> Mi Correo </span> </a> </li>*/ ?>
						<?php /* <li> <a href="#" class="active"> <i class="fa fa-envelope-o"></i> <span> E-Mail Marketing </span> </a> </li> */ ?>
						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebEmailMarketing') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-envelope-o"></i> <span> E-Mail marketing </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-envelope-o"></i> <span> E-Mail marketing </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebEmailMarketingConfApiAmazon') !== false ): ?> <!-- <li class="active"> --> <?php else: ?> <!-- <li> --> <?php endif; ?>
									<!-- <?php echo HTML::decode(HTML::linkRoute('SysWebEmailMarketingConfApiAmazon', '<i class="fa fa-angle-right"></i> <span> Integraciones </span>', array(), array())); ?> -->
								<!-- </li> -->
								<?php if( strpos(Route::currentRouteName(), 'SysWebEmailMarketingConfPerfiles') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebEmailMarketingConfPerfiles', '<i class="fa fa-angle-right"></i> <span> Perfiles de correo </span>', array(), array())); ?>

								</li>
								<?php if(strpos(Route::currentRouteName(), 'SysWebEmailMarketingListasSubscriptores') !== false || strpos(Route::currentRouteName(), 'SysWebEmailMarketingFormulario') !== false ): ?>
								<li class="active">
								<?php else: ?>
								<li>
								<?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebEmailMarketingListasSubscriptores', '<i class="fa fa-angle-right"></i> <span> Suscriptores </span>', array(), array())); ?>

								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebEmailMarketingCampanhas') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebEmailMarketingCampanhas', '<i class="fa fa-angle-right"></i> <span> Campañas </span>', array(), array())); ?>

								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebEmailMarketingEtiquetas') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebEmailMarketingEtiquetas', '<i class="fa fa-angle-right"></i> <span> Etiquetas </span>', array(), array())); ?>

								</li>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebEmailMarketingPlantillasCEC') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebEmailMarketingPlantillasCEC', '<i class="fa fa-angle-right"></i> <span> Plantillas guardadas </span>', array(), array())); ?>

								</li>
							</ul>
						</li>
						<?php
							$Cliente = Cliente::find( Cliente::select('id')->where('users_id', '=', Auth::id())->first()->id );
						?>
						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebPAterrizaje') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="icon-sc-landingpageicon"></i> <span> Páginas de captura </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="icon-sc-landingpageicon"></i> <span> Páginas de captura </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebPAterrizajeConfiguracionesGenerales') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebPAterrizajeConfiguracionesGenerales', '<i class="fa fa-angle-right"></i> <span> Configuración general </span>', array(), array())); ?>

								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebPAterrizajePlantillaxCliente') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebPAterrizajePlantillaxCliente', '<i class="fa fa-angle-right"></i> <span> Listado de páginas </span>', array(), array())); ?>

								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebPAterrizajeVariacion') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebPAterrizajeVariacion', '<i class="fa fa-angle-right"></i> <span> Pruebas A/B </span>', array(), array())); ?>

								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebPAterrizajeVentanasEmergentes') !== false ): ?> <li class="active hide"> <?php else: ?> <li class="hide"> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebPAterrizajeVentanasEmergentes', '<i class="fa fa-angle-right"></i> <span> Ventanas emergentes </span>', array(), array())); ?>

								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebPAterrizajeAPIKey') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebPAterrizajeAPIKeys', '<i class="fa fa-angle-right"></i> <span> API Keys </span>', array(), array())); ?>

								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebPAterrizajeDominiosDeConfianza') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebPAterrizajeDominiosDeConfianza', '<i class="fa fa-angle-right"></i> <span> Sitios permitidos </span>', array(), array())); ?>

								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebPAterrizajeGenDeContenido') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebPAterrizajeGenDeContenido', '<i class="fa fa-angle-right"></i> <span> Gen. de contenido </span>', array(), array())); ?>

								</li>
								<?php if( PasarelaPagoPaginaCaptura::where('clientes_id', '=', $Cliente->id)->count() > 0): ?>
								<?php if( strpos(Route::currentRouteName(), 'SysWebPAterrizajeVentasRealizadas') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebPAterrizajeVentasRealizadas', '<i class="fa fa-angle-right"></i> <span> Ventas realizadas </span>', array(), array())); ?>

								</li>
								<?php endif; ?>
							</ul>
						</li>
						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebVEmergentes') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-window-maximize"></i> <span> Ventanas emergentes </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-window-maximize"></i> <span> Ventanas emergentes </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebVEmergentesVentanasEmergentesPA') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebVEmergentesVentanasEmergentesPA', '<i class="fa fa-angle-right"></i> <span> Listado de ventanas </span>', array(), array())); ?>

								</li>
								<?php if(ConfiguracionxSitioWeb::where('clientes_id', '=', $Cliente->id)->count() > 0): ?>
									<?php if( strpos(Route::currentRouteName(), 'SysWebVEmergentesVentanasEmergentesSW') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
										<?php echo HTML::decode(HTML::linkRoute('SysWebVEmergentesVentanasEmergentesSW', '<i class="fa fa-angle-right"></i> <span> Sitio web </span>', array(), array())); ?>

									</li>
								<?php endif; ?>
								<?php if(ConfiguracionTienda::where('clientes_id', '=', $Cliente->id)->count() > 0 || PasarelaPagoPaginaCaptura::where('clientes_id', '=', $Cliente->id)->count() > 0): ?>
									<?php if( strpos(Route::currentRouteName(), 'SysWebVEmergentesVentanasEmergentesTEL') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
										<?php echo HTML::decode(HTML::linkRoute('SysWebVEmergentesVentanasEmergentesTEL', '<i class="fa fa-angle-right"></i> <span> Tienda en línea </span>', array(), array())); ?>

									</li>
								<?php endif; ?>
							</ul>
						</li>
						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebGClientes') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-users"></i> <span> Gestión de prospectos </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-users"></i> <span> Gestión de prospectos </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesProspectos') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesProspectos'); ?>"> <i class="fa fa-angle-right"></i> <span> Prospectos </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesCalendario') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesCalendario'); ?>"> <i class="fa fa-angle-right"></i> <span> Calendario </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesClientes') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesClientes'); ?>"> <i class="fa fa-angle-right"></i> <span> Clientes </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesOportunidades') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesOportunidades'); ?>"> <i class="fa fa-angle-right"></i> <span> Oportunidades </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesProductos') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesProductos'); ?>"> <i class="fa fa-angle-right"></i> <span> Productos/Servicios </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesReferencias') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesReferencias'); ?>"> <i class="fa fa-angle-right"></i> <span> Referencias </span> </a>
								</li>
								<?php /*<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesCategorias') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesCategorias'); ?>"> <i class="fa fa-angle-right"></i> <span> Categorías </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesAtributos') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesAtributos'); ?>"> <i class="fa fa-angle-right"></i> <span> Atributos </span> </a>
								</li>*/ ?>
							</ul>
						</li>
						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebRpt') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-file-pdf-o"></i> <span> Reportes </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-file-pdf-o"></i> <span> Reportes </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebRptGCEfectividad') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebRptGCEfectividad'); ?>"> <i class="fa fa-angle-right"></i> <span> Efectividad </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebRptGCReferencias') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebRptGCReferencias'); ?>"> <i class="fa fa-angle-right"></i> <span> Referencias </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebRptGCRetornoInversion') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebRptGCRetornoInversion'); ?>"> <i class="fa fa-angle-right"></i> <span> ROAS </span> </a>
								</li>
							</ul>
						</li>
						<li class="sub-menu dcjq-parent-li">
								<?php
									$SysWebConfiguraciones = '';
									if( ConfiguracionxSitioWeb::where('clientes_id', '=', Cliente::select('id')->where('users_id', '=', Auth::user()->id)->first()->id)->count() == 1 ){
										$SysWebConfiguraciones = ConfiguracionxSitioWeb::select('temas_sitios_web_id AS idT')->where('clientes_id', '=', Cliente::select('id')->where('users_id', '=', Auth::user()->id)->first()->id)->first()->idT;
									}
								?>
							<?php if( strpos(Route::currentRouteName(), 'SysWebSWeb') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="icons-web-site"></i> <span> Sitio Web </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="icons-web-site"></i> <span> Sitio Web </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebSWebConfiguraciones') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php if( $SysWebConfiguraciones != '' ): ?>
									<?php /* HTML::decode(HTML::linkRoute('SysWebSWebConfiguracionesSEO', '<i class="fa fa-angle-right"></i> <span> Configuraciones </span>', array(), array())) */ ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebSWebConfiguracionesSEO', '<i class="fa fa-angle-right"></i> <span> Configuraciones </span>', array(), array())); ?>

									<?php else: ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebSWebConfiguraciones1', '<i class="fa fa-angle-right"></i> <span> Configuraciones </span>', array(), array())); ?>

									<?php endif; ?>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebSWebPaginasxTema') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php if( $SysWebConfiguraciones != '' ): ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebSWebPaginasxTema', '<i class="fa fa-angle-right"></i> <span> Páginas de sitio </span>', array(), array())); ?>

									<?php else: ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebSWebConfiguraciones1', '<i class="fa fa-angle-right"></i> <span> Páginas de sitio </span>', array(), array())); ?>

									<?php endif; ?>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebSWebSeccionesxClientes') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php if( $SysWebConfiguraciones != '' ): ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebSWebSeccionesxClientes', '<i class="fa fa-angle-right"></i> <span> Secciones </span>', array(), array())); ?>

									<?php else: ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebSWebConfiguraciones1', '<i class="fa fa-angle-right"></i> <span> Secciones </span>', array(), array())); ?>

									<?php endif; ?>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebSWebUsuarios') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php if( $SysWebConfiguraciones != '' ): ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebSWebUsuarios', '<i class="fa fa-angle-right"></i> <span> Usuarios </span>', array(), array())); ?>

									<?php else: ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebSWebConfiguraciones1', '<i class="fa fa-angle-right"></i> <span> Usuarios </span>', array(), array())); ?>

									<?php endif; ?>
								</li>
								<?php if( Cliente::select('correos')->where('users_id', '=', Auth::user()->id)->first()->correos == 1 ): ?>
								<?php if( strpos(Route::currentRouteName(), 'SysWebSWebCorreosElectronicos') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php if( $SysWebConfiguraciones != '' ): ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebSWebCorreosElectronicos', '<i class="fa fa-angle-right"></i> <span> Correos electrónicos </span>', array(), array())); ?>

									<?php else: ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebSWebConfiguraciones1', '<i class="fa fa-angle-right"></i> <span> Correos electrónicos </span>', array(), array())); ?>

									<?php endif; ?>
								</li>
								<?php endif; ?>
							</ul>
						</li>
						<?php
							$version = 2;
							if( Auth::user()->tipo == 'EC'){
								$Cliente = Cliente::find( Cliente::select('id')->where('users_id', '=', Auth::id())->first()->id );
								$version = ConfiguracionTienda::select('version')->where('clientes_id', '=', $Cliente->id)->first()->version;
							}
							//if( ConfiguracionTienda::where('clientes_id', '=', $Cliente->id)->count() > 0 ){
							$confG = ($version > 1)?URL::route('SysWebVentasConfGeneralesV2'):URL::route('SysWebVentasConfGenerales');
							$TELActiva = ConfiguracionTienda::where('clientes_id', '=', Cliente::select('id')->where('users_id', '=', Auth::user()->id)->first()->id)->count();
						?>
						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebVentas') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-shopping-cart"></i> <span> Tienda en línea </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-shopping-cart"></i> <span> Tienda en línea </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebVentasConfGeneralesV2') !== false  || strpos(Route::currentRouteName(), 'SysWebVentasConfGenerales') !== false): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo $confG; ?>"> <i class="fa fa-angle-right"></i> <span> Configs generales </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebVentasConfEnvios') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebVentasConfEnvios'); ?>"> <i class="fa fa-angle-right"></i> <span> Configs de envíos </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebVentasRealizadas') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php if( $TELActiva == 1 ): ?>
									<a href="<?php echo URL::route('SysWebVentasRealizadas'); ?>"> <i class="fa fa-angle-right"></i> <span> Ventas realizadas </span> </a>
									<?php else: ?>
									<a href="<?php echo $confG; ?>"> <i class="fa fa-angle-right"></i> <span> Ventas realizadas </span> </a>
									<?php endif; ?>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebVentasCategorias') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php if( $TELActiva == 1 ): ?>
									<a href="<?php echo URL::route('SysWebVentasCategorias'); ?>"> <i class="fa fa-angle-right"></i> <span> Categorías </span> </a>
									<?php else: ?>
									<a href="<?php echo $confG; ?>"> <i class="fa fa-angle-right"></i> <span> Categorías </span> </a>
									<?php endif; ?>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebVentasAtributos') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php if( $TELActiva == 1 ): ?>
									<a href="<?php echo URL::route('SysWebVentasAtributos'); ?>"> <i class="fa fa-angle-right"></i> <span> Atributos </span> </a>
									<?php else: ?>
									<a href="<?php echo $confG; ?>"> <i class="fa fa-angle-right"></i> <span> Atributos </span> </a>
									<?php endif; ?>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebVentasCampanhas') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php if( $TELActiva == 1 ): ?>
									<a href="<?php echo URL::route('SysWebVentasCampanhas'); ?>"> <i class="fa fa-angle-right"></i> <span> Campañas </span> </a>
									<?php else: ?>
									<a href="<?php echo $confG; ?>"> <i class="fa fa-angle-right"></i> <span> Campañas </span> </a>
									<?php endif; ?>
								</li>
							</ul>
						</li>
						<?php
							//}
						?>

						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebIA') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-magic"></i> <span> Inteligencia Artificial </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-magic"></i> <span> Inteligencia Artificial </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebIAMarketingYVentas') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebIAMarketingYVentas', '<i class="fa fa-angle-right"></i> <span> MTK y Ventas </span>', array(), array())); ?>

								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebIASeguimientos') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebIASeguimientos', '<i class="fa fa-angle-right"></i> <span> Seguimientos </span>', array(), array())); ?>

								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebIAEstrategias') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<?php echo HTML::decode(HTML::linkRoute('SysWebIAEstrategias', '<i class="fa fa-angle-right"></i> <span> Estrategias </span>', array(), array())); ?>

								</li>
							</ul>
						</li>

						<?php /* CLIENTES DE APRENDAMOS MARKETING */ ?>
						<?php if(strpos(public_path(), 'prospector') !== false): ?>
						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebVTutoriales') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-video-camera"></i> <span> Academia </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-video-camera"></i> <span> Academia </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebVTutorialesModulosClientesP1') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebVTutorialesModulosClientesP1'); ?>"> <i class="fa fa-angle-right"></i> <span> Marketing digital </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebVTutorialesModulosClientesP2') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebVTutorialesModulosClientesP2'); ?>"> <i class="fa fa-angle-right"></i> <span> Duplicación </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebVTutorialesModulosClientesCM') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebVTutorialesModulosClientesCM'); ?>"> <i class="fa fa-angle-right"></i> <span> Video conferencias </span> </a>
								</li>
							</ul>
						</li>
						<?php else: ?>
						<li>
							<?php /*<?php if( strpos(Route::currentRouteName(), 'SysWebVTutoriales') !== false ): ?>
							<a href="<?php echo URL::route('SysWebVTutorialesModulosClientes'); ?>" class="active"> <i class="fa fa-video-camera"></i> <span> Vídeo tutoriales </span> </a>
							<?php else: ?>
							<a href="<?php echo URL::route('SysWebVTutorialesModulosClientes'); ?>"> <i class="fa fa-video-camera"></i> <span> Vídeo tutoriales </span> </a>
							<?php endif; ?>*/ ?>
							<?php if( strpos(Route::currentRouteName(), 'SysWebVTutoriales') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-video-camera"></i> <span> Vídeo tutoriales </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-video-camera"></i> <span> Vídeo tutoriales </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebVTutorialesModulosClientesMD') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebVTutorialesModulosClientesMD'); ?>"> <i class="fa fa-angle-right"></i> <span> Marketing digital </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebVTutorialesModulosClientesSC2') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebVTutorialesModulosClientesSC2'); ?>"> <i class="fa fa-angle-right"></i> <span> Guías paso a paso </span> </a>
								</li>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebVTutorialesModulosClientesCM') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebVTutorialesModulosClientesCM'); ?>"> <i class="fa fa-angle-right"></i> <span> Video conferencias </span> </a>
								</li>
							</ul>
						</li>
						<li>
							<a href="#" class="<?php echo strpos(Route::currentRouteName(), 'SysWebSoporte') !== false ? 'active' : ''; ?>"> <i class="fa fa-question-circle"></i> <span> Soporte Plus </span> </a>
							<ul class="sub">
								<li class="<?php echo strpos(Route::currentRouteName(), 'SysWebSoporteVideoconferencias') !== false ? 'active' : ''; ?>"><a href="<?php echo URL::route('SysWebSoporteVideoconferencias'); ?>"><i class="fa fa-angle-right"></i><span> Videoconferencias Zoom </span></a></li>
								<li class="<?php echo strpos(Route::currentRouteName(), 'SysWebSoporteAgendarLlamadaCalendly') !== false ? 'active' : ''; ?>"><a href="<?php echo URL::route('SysWebSoporteAgendarLlamadaCalendly'); ?>"><i class="fa fa-angle-right"></i><span> Videollamadas de soporte </span></a></li>
							</ul>
						</li>
						<?php endif; ?>
						<?php if(
							Cliente::select('planes_sc_id')->where('users_id', '=', Auth::user()->id)->first()->planes_sc_id == 7 ||
							Cliente::select('planes_sc_id')->where('users_id', '=', Auth::user()->id)->first()->planes_sc_id == 8
						): ?>
						<li>
							<a href="https://aprendamosmarketing.com/am-premium" target="_blank" style="text-align: center;">
								<i class="icon-sc-apmkt-apmkt-sc-full" style="font-size: 40px;"></i>
							</a>
						</li>
						<?php elseif( Cliente::select('planes_sc_id')->where('users_id', '=', Auth::user()->id)->first()->planes_sc_id == 10 ): ?>
						<li>
							<a href="https://clickomi.com/" target="_blank" style="text-align: center;">
								<i class="icon-sc-clickcomi-full" style="font-size: 40px;"></i>
							</a>
						</li>
						<?php endif; ?>
						<?php /*<li>
							<?php if( strpos(Route::currentRouteName(), 'SysWebVideosAyudaC') !== false ): ?>
							<a href="<?php echo URL::route('SysWebVideosAyudaC'); ?>" class="active"> <i class="fa fa-question-circle"></i> <span> Videos de ayuda </span> </a>
							<?php else: ?>
							<a href="<?php echo URL::route('SysWebVideosAyudaC'); ?>"> <i class="fa fa-question-circle"></i> <span> Videos de ayuda </span> </a>
							<?php endif; ?>
						</li>*/ ?>

						<?php /*<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebIntegraciones') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-exchange"></i> <span> Integraciones </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-exchange"></i> <span> Integraciones </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebIntegracionesTCO') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebIntegracionesTCO'); ?>"> <i class="fa fa-angle-right"></i> <span> 2CheckOut </span> </a>
								</li>
							</ul>
						</li>*/ ?>

						<?php elseif( Auth::user()->tipo == 'EC' ): ?>
						<?php $Empleado = Empleado::find( Empleado::select('id')->where('users_id', '=', Auth::id())->first()->id ); ?>
						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebGClientes') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-users"></i> <span> Gestión de prospectos </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-users"></i> <span> Gestión de prospectos </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesProspectos') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesProspectos'); ?>"> <i class="fa fa-angle-right"></i> <span> Prospectos </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesCalendario') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesCalendario'); ?>"> <i class="fa fa-angle-right"></i> <span> Calendario </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesOportunidades') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesOportunidades'); ?>"> <i class="fa fa-angle-right"></i> <span> Oportunidades </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesClientes') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesClientes'); ?>"> <i class="fa fa-angle-right"></i> <span> Clientes </span> </a>
								</li>
								<?php if( Cargo::select('nombre')->where('id', '=', $Empleado->cargos_id)->first()->nombre == 'Gerente de ventas' ): ?>
								<?php /* VALIDACIÓN PARA MOSTRAR MENÚ A GERENTES */ ?>
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesProductos') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesProductos'); ?>"> <i class="fa fa-angle-right"></i> <span> Productos/Servicios </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebGClientesReferencias') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebGClientesReferencias'); ?>"> <i class="fa fa-angle-right"></i> <span> Referencias </span> </a>
								</li>
								<?php /* //VALIDACIÓN PARA MOSTRAR MENÚ A GERENTES */ ?>
								<?php endif; ?>
							</ul>
						</li>
						<?php if( Cargo::select('nombre')->where('id', '=', $Empleado->cargos_id)->first()->nombre == 'Gerente de ventas' ): ?>
						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebRpt') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-file-pdf-o"></i> <span> Reportes </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-file-pdf-o"></i> <span> Reportes </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebRptGCEfectividad') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebRptGCEfectividad'); ?>"> <i class="fa fa-angle-right"></i> <span> Efectividad </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebRptGCReferencias') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebRptGCReferencias'); ?>"> <i class="fa fa-angle-right"></i> <span> Referencias </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebRptGCRetornoInversion') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebRptGCRetornoInversion'); ?>"> <i class="fa fa-angle-right"></i> <span> RDI </span> </a>
								</li>
							</ul>
						</li>
						<?php endif; ?>
						<?php elseif( Auth::user()->tipo == 'A' ): ?>
						<!-- <li> <a href="<?php echo URL::route('SysWebUsuarios'); ?>"> <i class="fa fa-users"></i> <span> Usuarios </span> </a> </li> -->
						<li> <a href="<?php echo URL::route('SysWebClientes'); ?>"> <i class="fa fa-smile-o"></i> <span> Clientes </span> </a> </li>
						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebEstAdmin') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-bar-chart"></i> <span> Estadisticas </span> </a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-bar-chart"></i> <span> Estadisticas </span> </a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebEstAdminVisitas') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebEstAdminVisitas'); ?>"> <i class="fa fa-angle-right"></i> <span> Visitas </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebEstAdminEmarketing') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebEstAdminEmarketing'); ?>"> <i class="fa fa-angle-right"></i> <span> Envíos </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebEstAdminEmarketingLimitesEnvios') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebEstAdminEmarketingLimitesEnvios'); ?>"> <i class="fa fa-angle-right"></i> <span> Limites de envíos </span> </a>
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebEstAdmin') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebEstAdminVisitas'); ?>"> <i class="fa fa-angle-right"></i> <span> Colas de tarea </span> </a>
								</li>
							</ul>
						</li>
						<li> <a href="<?php echo URL::route('SysWebAfilSolicitudesComision'); ?>"> <i class="fa fa-users"></i> <span> Afiliados </span> </a> </li>
						<li> <a href="<?php echo URL::route('SysWebIAPrompts'); ?>"> <i class="fa fa-magic"></i> <span> Inteligencia Artificial </span> </a> </li>
						<li> <a href="<?php echo URL::route('SysWebModulosSistema'); ?>"> <i class="fa fa-puzzle-piece"></i> <span> Módulos del sistema </span> </a> </li>
						<li> <a href="<?php echo URL::route('SysWebPlanesSC'); ?>"> <i class="fa fa-puzzle-piece"></i> <span> Planes </span> </a> </li>
						<li> <a href="<?php echo URL::route('SysWebSWebSolicitudesDeCorreos'); ?>"> <i class="fa fa-envelope"></i> <span> Correos de clientes </span> </a> </li>
						<li> <a href="<?php echo URL::route('SysWebVideosAyuda'); ?>"> <i class="fa fa-question-circle"></i> <span> Videos de ayuda </span> </a> </li>
						<li> <?php echo HTML::decode(HTML::linkRoute('SysWebVTutorialesModulos', '<i class="fa fa-video-camera"></i> <span> Video Tutoriales </span>', array(), array())); ?> </li>
						<li> <?php echo HTML::decode(HTML::linkRoute('SysWebPAterrizajePlantilla', '<i class="fa fa-dot-circle-o"></i> <span> Páginas de captura </span>', array(), array())); ?> </li>
						<li> <a href="<?php echo URL::route('SysWebPAterrizajeVentanaEmergente'); ?>"> <i class="fa fa-window-maximize"></i> <span> Ventanas emergentes </span> </a> </li>
						<li> <?php echo HTML::decode(HTML::linkRoute('SysWebSWebTemas', '<i class="icons-web-site"></i> <span> Temas de Sitio Web </span>', array(), array())); ?> </li>
						<li> <?php echo HTML::decode(HTML::linkRoute('SysWebSWebPlantillasCorreosSWTEL', '<i class="fa fa-envelope-square"></i> <span> Correos TEL y SW </span>', array(), array())); ?> </li>
						<li> <?php echo HTML::decode(HTML::linkRoute('SysWebGClientesTemasMembresia', '<i class="fa fa-globe"></i> <span> Sitios de membresia </span>', array(), array())); ?> </li>
						<li> <?php echo HTML::decode(HTML::linkRoute('SysWebEmailMarketingPlantillas', '<i class="fa fa-envelope-o"></i> <span> E-Mail Marketing </span>', array(), array())); ?> </li>
						<li><a href="<?php echo URL::route('SysWebNotificacionesListar'); ?>"><i class="fa fa-bell"></i><span> Notificaciones </span></a></li>
						<li><a href="<?php echo URL::route('SysWebSoporteVideoconferenciasZoomListar'); ?>"><i class="fa fa-video-camera"></i><span> Videoconferencias Zoom </span></a></li>
						<li> <?php echo HTML::decode(HTML::linkRoute('SysWebBibliotecaImagenes', '<i class="fa fa-picture-o"></i> <span> Biblioteca de imágenes </span>', array(), array())); ?> </li>
						<li> <?php echo HTML::decode(HTML::linkRoute('SysWebBibliotecaVideos', '<i class="fa fa-youtube"></i> <span> Biblioteca de videos </span>', array(), array())); ?> </li>
						<li class="sub-menu dcjq-parent-li">
							<?php if( strpos(Route::currentRouteName(), 'SysWebEmailMarketingSrvAWSSES') !== false || strpos(Route::currentRouteName(), 'SysWebSWebSrvCPanel') !== false ): ?>
							<a href="javascript:;" class="dcjq-parent active"> <i class="fa fa-server"></i> <span> AWS SES </span> <span class="dcjq-icon"></span></a>
							<?php else: ?>
							<a href="javascript:;" class="dcjq-parent"> <i class="fa fa-server"></i> <span> AWS SES </span> <span class="dcjq-icon"></span></a>
							<?php endif; ?>
							<ul class="sub">
								<?php if( strpos(Route::currentRouteName(), 'SysWebEmailMarketingSrvAWSSES') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebEmailMarketingSrvAWSSES'); ?>"><i class="fa fa-angle-right"></i> <span> Srvs de AWS </span> </a> 
								</li>
								<?php if( strpos(Route::currentRouteName(), 'SysWebSWebSrvCPanel') !== false ): ?> <li class="active"> <?php else: ?> <li> <?php endif; ?>
									<a href="<?php echo URL::route('SysWebSWebSrvCPanel'); ?>"><i class="fa fa-angle-right"></i> <span> cPanel </span> </a>
								</li>
							</ul>
						</li>
						<?php /* <li> <a href="<?php echo URL::route('SysWebVideosAyuda'); ?>"> <i class="fa fa-paper-plane"></i> <span> Perfiles </span> </a> </li> */ ?>
						<?php endif; ?>
					</ul><!--/nav-accordion sidebar-menu--> 
				</div><!--/leftside-navigation--> 
			</div><!--/sidebar--> 

			<div id="main-content">
				<div class="page-content">
					<?php if( Auth::user()->tipo == 'C' && Cliente::select('planes_sc_id')->where('users_id', '=', Auth::user()->id)->first()->planes_sc_id != 1 ){ /* IF DE CLIENTES DE PAGO */
						$Cliente = Cliente::find( Cliente::select('id')->where('users_id', '=', Auth::user()->id)->first()->id );
						$zona_horaria = $Cliente->zona_horaria;
						if( $zona_horaria == '' ){
							/* CALCULO DE ZONA HORARIA */
							$country = str_replace(' ', '', Locale::getDisplayRegion('-'.$Cliente->pais, 'en'));
							$city = str_replace(' ', '', $Cliente->estado);
							$geocode_stats = file_get_contents("https://maps.googleapis.com/maps/api/geocode/json?address=$city+$country,&sensor=false");
							$output_deals = json_decode($geocode_stats);
							$latLng = $output_deals->results[0]->geometry->location;
							$lat = $latLng->lat;
							$lng = $latLng->lng;
							$google_time = file_get_contents("https://maps.googleapis.com/maps/api/timezone/json?location=$lat,$lng&timestamp=1331161200&key=AIzaSyBM6v8BZP0GOA4pnHYFWNv7wQhJ1SeLyEI");
							$timez = json_decode($google_time);
							$zona_horaria = $timez->timeZoneId;
						}
						$permiso_acceso = ( Auth::user()->permiso_acceso != '' )?strtotime(Auth::user()->permiso_acceso):'';
						if($permiso_acceso != ''){
							$fecha_actualDT = new DateTime(date('Y-m-d', $permiso_acceso), new DateTimeZone($zona_horaria));
							$fecha_actual = $fecha_actualDT->format('d/m/Y');
						}
						//CUENTO SI EL USUARIO NO TIENE PÁGOS PENDIENTES PARA DEFINIR QUE MENSAJE MOSTRAR SI EL DE USUARIO CON CUENTA CANCELADA O CON COBRO FALLIDO
						$idCPadre = Cliente::select('id')->where('users_id', '=', Auth::user()->id)->first()->id;
						if( $Cliente->cliente_padre != '' ){ $idCPadre = $Cliente->cliente_padre; }
						$PSid = PagoSuscripcion::select('id')->where('clientes_id', '=', $idCPadre)->where('realizado', '=', 0)->where('tipo', '=', 'SP')->get();
						if( count($PSid) > 0 ){
							$PagoSuscripcion = PagoSuscripcion::find( $PSid[0]->id );
							$proximo_intentoDT = new DateTime(date('Y-m-d', strtotime($PagoSuscripcion->proxima_fecha_intento)), new DateTimeZone($zona_horaria));
							$proximo_intento = $proximo_intentoDT->format('d/m/Y');
							$urlMetodoPago = URL::route('SysWebActualizarMetodoPago', array($Cliente->tco_sale_id));
							if( $Cliente->fs_subscription_id != '' || $Cliente->fs_subscription_id != 0 ){
								$fsDatosExtra = json_decode($Cliente->fs_datos_extra, true);
								include_once(__DIR__.'/../../commands/fastspring-php/fastspring-sc.php');
								//OBTENCIÓN DE URL DE ACTUALIZACIÓN DE MÉTODO DE PAGO EN FASTSPRING -----------------------------------------------
								$peticion = fastSpringSC('https://api.fastspring.com/accounts/'.$fsDatosExtra['accountId'].'/authenticate', 'GET');
								//-----------------------------------------------------------------------------------------------------------------
								$urlMetodoPago = $peticion['accounts'][0]['url'];
								$fechaPermisoAccesoDT = new DateTime(Auth::user()->permiso_acceso);
								$proximo_intento = $fechaPermisoAccesoDT->format('d/m/Y');
							}
						}
					?>
					<?php if( Auth::user()->estado == 0 && $permiso_acceso != '' && count($PSid) == 0 ): ?>
					<style type="text/css"> .ulAlerta{ list-style: none; padding: 0; } .ulAlerta li{ padding-left: 3.3em; } .ulAlerta li:before{ content: "\f00d"; font-family: FontAwesome; display: inline-block; margin-left: -1.3em; width: 1.3em; } </style>
					<div class="alert alert-danger" role="alert">
						<p> Has cancelado tu cuenta, tendrás acceso a la plataformas hasta el <?php echo $fecha_actual; ?> debido a que cancelaste antes del período de corte. </p>
						<p> Recuerda que al ya no tener acceso a la plataforma: </p>
						<p></p>
						<ul class="ulAlerta">
							<li> Ya no tendras acceso a tus listas de suscriptores </li>
							<li> Tus listas de suscriptores ya no recibirán ningún correo de secuencias de seguimientos ni campañas </li>
							<li> Tus formularios ligados a las listas de suscriptores dejarán de mostrarse en todos tus sitios web vinculados </li>
							<li> Las páginas de capturas dejarán de mostrarse </li>
							<li> Se perderan todos los datos estadisticos de tus pagianas de captura y envío de correos </li>
						</ul>
						<p></p>
						<p> Así que si deseas continuar contando de estos beneficios puedes da clic <a href="#" class="alert-link" style="color: #245269; /*color: #2b542c;*/">acá</a> para renovar tu suscripción </p>
					</div>
					<?php elseif( Auth::user()->estado == 0 && $permiso_acceso != '' && count($PSid) > 0 && $Cliente->cliente_padre == '' ): ?>
					<div class="alert alert-danger actualizar-pago" role="alert">
						<?php /*<p> Ha ocurrio un error al realizar el cobro de tu suscripción, nuestro sistema realizará otro intento el <?php echo $proximo_intento; ?> </p>*/ ?>
						<p>
							Ha ocurrido un error al realizar el cargo automático de tu membresía, pero no te preocupes que tu cuenta se mantiene activa, pero ha entrado en un período de gracia por 10 días para darte tiempo a que puedas solventar este inconveniente.
							<br>
							Por favor haz <a href="<?php echo $urlMetodoPago; ?>" target="_blank">clic aquí</a> o en el vínculo da abajo para pagar o actualizar tu método de pago antes del <?php echo $proximo_intento; ?>.
							<br>
							<a href="<?php echo $urlMetodoPago; ?>" target="_blank"><?php echo $urlMetodoPago; ?></a>
						</p>
					</div>
					<?php elseif( Auth::user()->estado == 0 && $permiso_acceso != '' && count($PSid) > 0 && $Cliente->cliente_padre != '' ): ?>
					<div class="alert alert-danger actualizar-pago" role="alert">
						<p>
							Ha ocurrido un error al realizar el cargo automático de tu membresía, pero no te preocupes que tu cuenta se mantiene activa, pero ha entrado en un período de gracia por 10 días para darte tiempo a que puedas solventar este inconveniente.
							<br>
							Por favor indica al administrador de la cuenta agencia pagar o actualizar su método de pago antes del <?php echo $fecha_actual; ?>, puede realizar ese proceso desde su historial de pagos y/o contactanor para ayudarle.
						</p>
					</div>
					<?php endif; ?>
					<?php /* <div class="alert alert-danger actualizar-pago" role="alert">
						<p>
							<strong>ACCIÓN URGENTE REQUERIDA:</strong> Nos estamos cambiando de servidor para él envió de correos y si creaste un perfil de envío de correos antes del 2 de marzo debes crear un nuevo perfil para tus secuencias de seguimiento y campañas antes del 7 de marzo para no tener inconvenientes con tus envíos. Es muy fácil y rápido <a target="_blank" href="https://doc.sumeclientes.club/nuevo-perfil">mira este vídeo para ver como hacerlo.</a>
						</p>
					</div> */ ?>
					<?php
						//VARIABLES PARA SITIO
						if(Auth::user()->tipo == 'C'){
							$Cliente = Cliente::find( Cliente::select('id')->where('users_id', '=', Auth::user()->id)->first()->id );
							if($Cliente->tco_dominio != null && $Cliente->tco_dominio != ''){
								if( ConfiguracionxSitioWeb::where('clientes_id', '=', Cliente::select('id')->where('users_id', '=', Auth::user()->id)->first()->id)->count() == 1 ){
									$configuracionxsitio = ConfiguracionxSitioWeb::find( ConfiguracionxSitioWeb::select('id')->where('clientes_id', '=', $Cliente->id )->first()->id );
									//$dominioTLD = explode('.', $configuracionxsitio->nombre_dominio);
									$posicionPrimerPunto = strpos($configuracionxsitio->nombre_dominio, '.');
									$dominioTLD = substr($configuracionxsitio->nombre_dominio, $posicionPrimerPunto);
									/*$precio = DominioVenta::select('precioRenovacion')->where('nombre', '=', '.'.$dominioTLD[1])->get();
									$precioReac = DominioVenta::select('precioReactivacion')->where('nombre', '=', '.'.$dominioTLD[1])->get();*/
									$precio = DominioVenta::select('precioRenovacion')->where('nombre', '=', $dominioTLD)->get();
									$precioReac = DominioVenta::select('precioReactivacion')->where('nombre', '=', $dominioTLD)->get();
									$fechaFin = date('d/m/Y', strtotime('+1 years', strtotime($Cliente->fecha_compra_dominio)));
									$fechaRefe = date('Y/m/d', strtotime('+1 years', strtotime($Cliente->fecha_compra_dominio)));
									$fechaM = date('Y/m/d', strtotime('-2 months', strtotime($fechaRefe)));
									$fechaActual = date('Y/m/d');
									$fechaSemana = date('d/m/Y', strtotime('-1 weeks', strtotime($fechaRefe)));
									$fechaFinPDG = date('Y/m/d', strtotime('+1 years', strtotime($Cliente->fecha_compra_dominio)));
									$fechaFinPDG = date('Y/m/d', strtotime('+30 day', strtotime($fechaFinPDG)));
									$fechaFinPDGR = date('d/m/Y', strtotime($fechaFinPDG));
								}
							}
							if($Cliente->correos!= null && $Cliente->correos != ''){
								$precioCorreo = $Cliente->precioRenovacionCorreo;
								$fechaFinC = date('d/m/Y', strtotime('+1 years', strtotime($Cliente->fecha_compra_correo)));
								$fechaRefeC = date('Y/m/d', strtotime('+1 years', strtotime($Cliente->fecha_compra_correo)));
								$fechaMC = date('Y/m/d', strtotime('-2 months', strtotime($fechaRefeC)));
								$fechaActual = date('Y/m/d');
								$fechaSemanaC = date('d/m/Y', strtotime('-1 weeks', strtotime($fechaRefeC)));
								$fechaFinPDGC = date('Y/m/d', strtotime('+1 years', strtotime($Cliente->fecha_compra_correo)));
								$fechaFinPDGC = date('Y/m/d', strtotime('+30 day', strtotime($fechaFinPDGC)));
								$fechaFinPDGRC = date('d/m/Y', strtotime($fechaFinPDGC));
							}
						}
					?>
					<?php if($Cliente->correos != null && $Cliente->correos != '' && $Cliente->fecha_compra_correo != '' && $Cliente->fecha_compra_correo != null ): ?>
							<?php if( strtotime($fechaActual) >= strtotime($fechaMC)): ?>
								<?php if( strtotime($fechaActual) <= strtotime($fechaRefeC)): ?>
									<div class="alert alert-info mensajeAlertaCorreo" role="alert">
										<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
										<?php /* <p> El registro de tu Correo Institucional </b> vencerá <b><?php echo $fechaFinC; ?></b>el precio del correo es <span class="precioD tooltips" data-toggle="tooltip" ><b><?php echo 'USD $'.$precioCorreo; ?></b></span> ,
											Por lo que te solicitamos escribas al <strong><a href="javascript:void(0)" onclick="mostrarChat()">chat de soporte</a></strong>, recuerda que si no realizas el pago de tus correos electrónicos configurados dejarán de funcionar.
										</p> */ ?>
										<p>
											<b>ACCIÓN REQUERIDA:</b> El registro de tu correo institucional vence <b><?php echo $fechaFinC; ?></b>. Debes renovarlo antes de esta fecha para continuar utilizándolo y para que tu correo siga en línea. Escribe al <strong> <a href="javascript:void(0)" onclick="mostrarChat()">chat de soporte</a></strong> ahora para renovarlo, recuerda que el precio de tu paquete de correo es de: <span><b><?php echo 'USD $'.$precioCorreo; ?></b></span>.
											<br><br>
											<b>IMPORTANTE:</b> Si no lo renuevas tu correo antes de <b><?php echo $fechaFinC; ?></b> deberás reactivarlo. El proceso de reactivación tarda entre 24 y 48 horas una vez efectuado el pago, durante ese tiempo tu correo estará fuera de línea y no podras enviar ni recibir mails.
										</p>
									</div>
									<input type="hidden" name="diC" id="idC" value="<?php echo $Cliente->id; ?>">
								<?php endif; ?>
							<?php endif; ?>
							<?php if( strtotime($fechaActual) > strtotime($fechaRefeC)): ?>
								<?php if( strtotime($fechaActual) < strtotime($fechaFinPDGC)): ?>
								<?php /* EN PERÍODO DE GRACIA */ ?>
								<div class="alert alert-danger mensajeAlertaCorreo" role="alert">
									<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
									<?php /* <p> El registro de tu correo</b> venció <b><?php echo $fechaFinC; ?></b> , para continuar utilizándolo  asegúrate de renovarlo escribiendo a nuestro <strong><a href="javascript:void(0)" onclick="mostrarChat()">chat de soporte</a></strong>, recuerda que el precio de tu paquete de correos actual es de <span><b><?php echo 'USD $'.$precioCorreo; ?></b></span>
									</p> */ ?>
									<p>
										<b>AVISO:</b> No renovaste el correo institucional y en estos momentos está en periodo de gracia hasta el <b><?php echo $fechaFinPDGRC; ?></b> por lo cual tus correos  se encuentra fuera de línea y no podras enviar ni recibir emails. Para seguir usando tus correos deberás de reactivarlo escribiendo al <strong><a href="javascript:void(0)" onclick="mostrarChat()">chat de soporte</a></strong>, recuerda que el precio de tu paquete de correos actual es de <span class="precioD tooltips" data-toggle="tooltip" ><b><?php echo 'USD $'.$precioCorreo; ?></b></span>. Una vez reactivado deberás esperar entre 24 y 48 horas para que tus correos esten en línea nuevamente.
										<br><br>
										<b>IMPORTANTE:</b> Si no lo reactivas tus correos antes de <b><?php echo $fechaFinPDGRC; ?></b> Tendras que realizar el proceso de configuracion nuevamente.
									</p>
								</div>
								<?php else: ?>
								<?php /* FUERA DEL PERÍODO DE GRACIA */ ?>
								<div class="alert alert-danger mensajeAlertaCorreo" role="alert">
									<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
									<p>
										<b>AVISO:</b> Tu paquete de correo(s) institucional(es) venció para la renovación y reactivación, puedes escribirnos por el chat de soporte para ver si puede ser adquirido de nuevo o ayudarte a gestionar uno nuevo.
									</p>
								</div>
								<?php endif; ?>
							<?php endif; ?>
					<?php endif; ?>
					<?php if($Cliente->tco_dominio != null && $Cliente->tco_dominio != ''): ?>
						<?php if(ConfiguracionxSitioWeb::where('clientes_id', '=', Cliente::select('id')->where('users_id', '=', Auth::user()->id)->first()->id)->count() == 1 ): ?>
							<?php if( strtotime($fechaActual) >= strtotime($fechaM) ): ?>
								<?php if( strtotime($fechaActual) < strtotime($fechaRefe) ): ?>
									<div class="alert alert-info mensajeAlerta" role="alert">
										<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
										<?php /* <p> El registro de tu dominio: <b><?php echo $configuracionxsitio->nombre_dominio; ?></b> vencerá <b><?php echo $fechaFin; ?></b> , para continuar utilizándolo  asegúrate de tener <span class="precioD tooltips" data-toggle="tooltip" ><b><?php echo 'USD $'.$precio[0]->precioRenovacion; ?></b></span> pues realizaremos un cobro automático en tu método de pago registrado con la plataforma el <b><?php echo $fechaFin; ?></b>, 
											si deseas actualizar tu método de pago has clic acá <a href="#" id="actualizar"><b>Actualizar</b></a> o si ya no deseas renovar este dominio  has clic acá <a href="javascript:Cancelar(<?php echo $Cliente->id; ?>)"><b>Cancelar</b></a> , recuerda que si no realizas el pago de tu dominio todo tu sitio web y correos electrónicos configurados dejarán de funcionar.
										</p> */ ?>
										<p>
											<b>ACCIÓN REQUERIDA:</b> El registro de tu dominio: <b><?php echo $configuracionxsitio->nombre_dominio; ?></b> vence <b><?php echo $fechaFin; ?></b>. Debes renovarlo antes de esta fecha para continuar utilizándolo y para que tu sitio siga en línea. Haz clic <a href="javascript:actualizarNDD('<?php echo $configuracionxsitio->nombre_dominio; ?>', <?php echo $precio[0]->precioRenovacion; ?>, <?php echo $Cliente->id; ?>, 'RN')" id="actualizarNDD"><b>aquí</b></a> ahora para renovarlo.
											<br><br>
											<b>IMPORTANTE:</b> Si no lo renuevas tu dominio antes de <b><?php echo $fechaFin; ?></b> deberás reactivarlo. El proceso de reactivación tarda entre 24 y 48 horas una vez efectuado el pago, durante ese tiempo tu sitio estará fuera de línea.
										</p>
									</div>
									<input type="hidden" name="diC" id="idC" value="<?php echo $Cliente->id; ?>">
								<?php endif; ?>
							<?php endif; ?>
							<?php if( strtotime($fechaActual) > strtotime($fechaRefe)): ?>
								<?php if( $configuracionxsitio->temas_sitios_web_id != null ): ?>
									<?php if( strtotime($fechaActual) < strtotime($fechaFinPDG) ): ?>
									<?php /* EN PERÍODO DE GRACIA */ ?>
									<div class="alert alert-danger mensajeAlerta" role="alert">
										<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
										<?php /* <p> El registro de tu dominio: <b><?php echo $configuracionxsitio->nombre_dominio; ?></b> venció <b><?php echo $fechaFin; ?></b> , para continuar utilizándolo  asegúrate de tener <span class="precioD tooltips" data-toggle="tooltip" ><b><?php echo 'USD $'.$precio[0]->precioRenovacion; ?></b></span> pues realizaremos un cobro automático en tu método de pago registrado con la plataforma el <b><?php echo $fechaFin; ?></b>, 
											si deseas actualizar tu método de pago has clic acá <a href="#" id="actualizar"><b>Actualizar</b></a> o si ya no deseas renovar este dominio  has clic acá <a href="javascript:Cancelar(<?php echo $Cliente->id; ?>)"><b>Cancelar</b></a>, recuerda que si no realizas el pago de tu dominio todo tu sitio web y correos electrónicos configurados dejarán de funcionar.
										</p> */ ?>
										<p>
											<b>AVISO:</b> No renovaste tu nombre de dominio y en estos momentos está en periodo de gracia hasta el <b><?php echo $fechaFinPDGR; ?></b> por lo cual tu sitio se encuentra fuera de línea. Para seguir usando tu dominio deberás de reactivarlo, haz clic <a href="javascript:actualizarNDD('<?php echo $configuracionxsitio->nombre_dominio; ?>', <?php echo $precioReac[0]->precioReactivacion; ?>, <?php echo $Cliente->id; ?>, 'RA')" id="actualizarNDD"><b>aquí</b></a> para reactivarlo. Una vez reactivado deberás esperar entre 24 y 48 horas para que el sitio este en línea nuevamente.
											<br><br>
											<b>IMPORTANTE:</b> Si no lo reactivas tu dominio antes de <b><?php echo $fechaFinPDGR; ?></b> quedará libre para que otra persona pueda tomarlo.
										</p>
									</div>
									<?php else: ?>
									<?php /* FUERA DEL PERÍODO DE GRACIA */ ?>
									<div class="alert alert-danger mensajeAlerta alert-correo" role="alert">
										<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
										<p>
											<b>AVISO:</b> Tu nombre de dominio: <b><?php echo $configuracionxsitio->nombre_dominio; ?></b> venció para la renovación y reactivación, puedes escribirnos por el chat de soporte para ver si puede ser adquirido de nuevo o ayudarte a gestionar uno nuevo.
										</p>
									</div>
									<?php endif; ?>
								<?php endif; ?>
							<?php endif; ?>
<?php
	//$storeFront = 'sume-clientes.onfastspring.com/';
	$renovacionNDD = true;
	$storeFront = 'sumeclientes.onfastspring.com/';
	$fsDebug = "false";
	$pruebasDesarrollo = false;
	//$fsAccessKey = 'D7VVKIMUTU2GQ6MH6O0HNG';
	$fsAccessKey = 'VWI19IETTD2368RX7U30HQ';
	if(App::environment() == 'local' || strpos(public_path(), 'desarrollo')){
		//$storeFront = 'sume-clientes.test.onfastspring.com/';
		$storeFront = 'sumeclientes.test.onfastspring.com/';
		$fsDebug = "true";
		$pruebasDesarrollo = true;
	}
?>
<script
    id="fsc-api"
    type="text/javascript"
    src="https://d1f8f9xcsvx3ha.cloudfront.net/sbl/0.7.6/fastspring-builder.min.js"
    data-storefront="<?php echo $storeFront; ?>popup-nombre-dominio"
    data-popup-closed="onPopupCloseANDD"
    data-access-key="<?php echo $fsAccessKey; ?>"
    data-debug="<?php echo $fsDebug; ?>"
    data-continuous="true">
</script>
						<?php endif; ?>
					<?php endif; ?>
					<?php if($Cliente->correos > 0): ?>
					<?php endif; ?>
					<?php } /* ENDIF DE CLIENTES DE PAGO */ ?>
					<?php echo $__env->yieldContent('Contenido'); ?>
						<?php /* @if( App::environment() == 'local' || ( App::environment() == 'produccion' && (strpos(public_path(), 'desarrollo') !== false) ) ) */ ?>
						<?php $VistaSistema = VistaSistema::select('id', 'nombre')->where('nombre', '=', Route::currentRouteName())->get(); ?>
						<?php /* @if( count($VistaSistema) == 1 ) */ ?>
							<?php if( Agent::isDesktop() ): ?>
								<?php if( strpos(Route::currentRouteName(), 'SysWebIndex') !== false ): ?>
					<div id="btnPDFPasos" class="tooltips" data-toggle="tooltip" data-original-title="PDF 7 Pasos">
						<div class="pasos-button">
							<!--<a href="https://s3-us-west-2.amazonaws.com/instruccionessume/Los+7+pasos.pdf" download target="_blank" class="p-icon">-->
							<?php if(strpos(public_path(), 'prospector') !== false): ?>
							<a href="https://docs.masprospector.com/video-de-bienvenida" target="_blank" class="p-icon">
							<?php else: ?>
							<a href="https://doc.sumeclientes.club/video-de-bienvenida" target="_blank" class="p-icon">
							<?php endif; ?>
								<i class="fa fa-file-pdf-o"></i>
							</a>
						</div>
					</div>
								<?php endif; ?>
					<div id="btnAyuda">
						<div class="question-button">
							<span class="q-icon">
								<i class="fa fa-question" id="btnPopoverAyuda"></i>
								<i class="fa fa-question" id="btnPopoverAyuda2" style="display: none;"></i>
							</span>
						</div>
							<?php /* @endif */ ?>
					</div>
						<?php /* @endif */ ?>
						<?php endif; ?>
				</div>  <!--/page-content end-->
				<?php if(strpos(public_path(), 'prospector') !== false): ?>
				<div class="dvVinculosPoliticas">
					<a href="https://masprospector.com/politicas-de-privacidad" target="_blank">Privacidad</a> | <a href="https://masprospector.com/terminos-y-condiciones" target="_blank">Términos del servicio</a> <?php if(Session::has('ingresoAdminGeneral') && Session::get('ingresoAdminGeneral') === true && Route::currentRouteName() !== 'SysWebPerfilCuentas'): ?> | <a onclick="IniciarSesion(1, 2)"><i class="fa fa-angle-double-left"></i>&nbsp;Regresar al administrador</a> <?php endif; ?>
				</div>
				<?php else: ?>
				<div class="dvVinculosPoliticas">
					<a href="https://sumeclientes.net/politicas-de-privacidad" target="_blank">Privacidad</a> | <a href="https://sumeclientes.net/terminos-y-condiciones" target="_blank">Términos del servicio</a> <?php if(Session::has('ingresoAdminGeneral') && Session::get('ingresoAdminGeneral') === true && Route::currentRouteName() !== 'SysWebPerfilCuentas'): ?> | <a onclick="IniciarSesion(1, 2)"><i class="fa fa-angle-double-left"></i>&nbsp;Regresar al administrador</a> <?php endif; ?>
				</div>
				<?php endif; ?>
			</div><!--/main-content end-->
		</div><!--/page-container end-->
		<?php echo $__env->yieldContent('GenTemplate'); ?>
	
		<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
		<?php /* HTML::script('WebPro/js/jquery-2.0.2.min.js') */ ?>
		<?php /* HTML::script('gentemplate/js/jquery.min.js') */ ?>
		<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.js"></script>
		<?php echo HTML::script('AccountingJS/accounting.min.js'); ?>

		<?php echo HTML::script('MoneyJS/money.min.js'); ?>

		<?php echo HTML::script('country-region-selector/crs.min.js'); ?>

		<?php /* HTML::script('Intl-Tel-Input/js/intlTelInput.min.js') */ ?>
		<?php echo HTML::script('Intl-Tel-Input/17.0.3/js/intlTelInput-jquery17-0-16.min.js'); ?>

		<?php /* HTML::script('SysWeb/SumeClientes/Preloader.js') */ ?>
		<?php /* HTML::script('SysWeb/SumeClientes/Preloader.min.js?=v0.1.1') */ ?>
		<!-- Include all compiled plugins (below), or include individual files as needed -->
		<?php echo HTML::script('WebPro/bootstrap/js/bootstrap.min.js'); ?>

		<?php echo HTML::script('WebPro/js/accordion.js'); ?>

		<?php echo HTML::script('WebPro/js/common-script.js'); ?>

		<?php echo HTML::script('WebPro/js/jquery.nicescroll.js'); ?>

		<!-- Más scripts -->
		<?php echo HTML::script('PNotify/pnotify.custom.min.js'); ?>

		<?php echo HTML::script('Bootstrap3-dialog/js/bootstrap-dialog.min.js'); ?>

		<?php echo HTML::script('isLoading-jQuery/jquery.isloading.min.js'); ?>

		<?php echo HTML::script('NProgress/nprogress.min.js'); ?>

		<?php echo HTML::script('Webui-Popover/jquery.webui-popover.min.js'); ?>

		<?php echo HTML::script('VideoJS/video.min.js'); ?>

		<?php echo HTML::script('js-cookie/js.cookie.min.js'); ?>

		<?php echo HTML::script('Perfect-Scrollbar/dist/perfect-scrollbar.js'); ?>

		<?php echo HTML::script('AccountingJS/accounting.min.js'); ?>

		<?php echo HTML::script('jsURL/url.min.js'); ?>

		<?php echo HTML::script('CustomCountryStateCity/customCountryStateCity.min.js'); ?>

		<?php if( strpos(Route::currentRouteName(), 'SysWebGClientes') !== false && strpos(Route::currentRouteName(), 'Productos') == false && strpos(Route::currentRouteName(), 'Referencias') == false && strpos(Route::currentRouteName(), 'Categorias') == false ): ?>
		<script>
			function abrirUrl(url){
				var url = new Url(url);
				url.query["sc-per"] = 1;
				var nuevaVentana = window.open(url);
				nuevaVentana.onbeforeunload = function(){
					//
				}
			}
			const container = document.querySelector("#contendor-scroll");
			const ps = new PerfectScrollbar(container);
		</script>
		<?php endif; ?>
		<script type="text/javascript">
			$.GET = function(parametro, url){
				if(!url){
					url = window.location.href;
				}
				var results = new RegExp('[\\?&]'+parametro+'=([^&#]*)').exec(url);
				if(!results){
					return undefined;
				}
				return results[1] || undefined;
			}
		</script>
		<?php echo $__env->yieldContent('JS'); ?>
		<?php /*@if( App::environment() == 'produccion' && strpos(public_path(), 'desarrollo') !== false )*/ ?>
		<?php if( App::environment() == 'produccion' && !(strpos(public_path(), 'desarrollo') !== false) ): ?>
			<?php if( Auth::user()->tipo != 'A' ): ?>
		<?php echo $__env->make('ExternosBody', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
			<?php endif; ?>
		<?php endif; ?>
		<!-- OnReady -->
		<script type="text/javascript">
			<?php if(Session::has('ingresoAdminGeneral') && Session::get('ingresoAdminGeneral') === true && Route::currentRouteName() !== 'SysWebPerfilCuentas'): ?>
				function IniciarSesion(id, version){
					var idC = id;
					$.post(
						"<?php echo route('SysWebCambiarSesion'); ?>",
						{idC:id, tipo:"adminSCHack", _token:"<?php echo csrf_token(); ?>", version: version},
						function(data){
							if(data.success){
								new PNotify({ title: "Realizado", text: data.mensaje, type: "success" });
								if (version == 2) {
									setTimeout(function(){ window.location.href = "<?php echo URL::route('SysWebClientes'); ?>" }, 1000);
								}
								else{
									setTimeout(function(){ window.location.href = "<?php echo URL::route('SysWebRedirigirLogueoAdmin'); ?>" }, 1000);
								}
							}
							else{
								if(data.mensaje != ""){ new PNotify({ title: "Error", text: data.mensaje, type: "error" }); }
							}
						},
						"json"
					);
				}
			<?php endif; ?>
			<?php if( Auth::user()->tipo == 'C' && Cliente::select('planes_sc_id')->where('users_id', '=', Auth::user()->id)->first()->planes_sc_id != 1 ): ?>
				<?php if($Cliente->tco_dominio != null && $Cliente->tco_dominio != ""): ?>
					<?php if( ConfiguracionxSitioWeb::where('clientes_id', '=', Cliente::select('id')->where('users_id', '=', Auth::user()->id)->first()->id)->count() == 1 ): ?>
						function convertirMoneda(moneda, precioUSD){
							var moneda = moneda ;
							var precioUSD = precioUSD;
							var conversion = "";
							$.getJSON(
								// NB: using Open Exchange Rates here, but you can use any source!
								"https://openexchangerates.org/api/latest.json?app_id=9ea7b69a0b9b4371b4b1925d4c9254cf",
								function(data){
									// Check money.js has finished loading:
									if( typeof fx !== "undefined" && fx.rates ){
										fx.rates = data.rates;
										fx.base = data.base;

										if( moneda != "SVC" && moneda != "ECS" && moneda != "USD" ){
											var conversion = fx.convert(
												precioUSD,
												{from: "USD", to: moneda}
											);
											conversion = accounting.formatMoney(conversion, {
												symbol: moneda,
												format: "%v %s"
											});
										}
										$(".precioD").attr("data-original-title", "Total en moneda local:  "+ conversion);
										
									}
									else{
										// If not, apply to fxSetup global:
										var fxSetup = {
											rates : data.rates,
											base : data.base
										}
									}
								}
							);		
						}
					<?php endif; ?>
				<?php endif; ?>
			<?php endif; ?>
			var currency = {"BD":"BDT","BE":"EUR","BF":"XOF","BG":"BGN","BA":"BAM","BB":"BBD","WF":"XPF","BL":"EUR","BM":"BMD","BN":"BND","BO":"BOB","BH":"BHD","BI":"BIF","BJ":"XOF","BT":"BTN","JM":"JMD","BV":"NOK","BW":"BWP","WS":"WST","BQ":"USD","BR":"BRL","BS":"BSD","JE":"GBP","BY":"BYR","BZ":"BZD","RU":"RUB","RW":"RWF","RS":"RSD","TL":"USD","RE":"EUR","TM":"TMT","TJ":"TJS","RO":"RON","TK":"NZD","GW":"XOF","GU":"USD","GT":"GTQ","GS":"GBP","GR":"EUR","GQ":"XAF","GP":"EUR","JP":"JPY","GY":"GYD","GG":"GBP","GF":"EUR","GE":"GEL","GD":"XCD","GB":"GBP","GA":"XAF","SV":"USD","GN":"GNF","GM":"GMD","GL":"DKK","GI":"GIP","GH":"GHS","OM":"OMR","TN":"TND","JO":"JOD","HR":"HRK","HT":"HTG","HU":"HUF","HK":"HKD","HN":"HNL","HM":"AUD","VE":"VEF","PR":"USD","PS":"ILS","PW":"USD","PT":"EUR","SJ":"NOK","PY":"PYG","IQ":"IQD","PA":"PAB","PF":"XPF","PG":"PGK","PE":"PEN","PK":"PKR","PH":"PHP","PN":"NZD","PL":"PLN","PM":"EUR","ZM":"ZMK","EH":"MAD","EE":"EUR","EG":"EGP","ZA":"ZAR","EC":"USD","IT":"EUR","VN":"VND","SB":"SBD","ET":"ETB","SO":"SOS","ZW":"ZWL","SA":"SAR","ES":"EUR","ER":"ERN","ME":"EUR","MD":"MDL","MG":"MGA","MF":"EUR","MA":"MAD","MC":"EUR","UZ":"UZS","MM":"MMK","ML":"XOF","MO":"MOP","MN":"MNT","MH":"USD","MK":"MKD","MU":"MUR","MT":"EUR","MW":"MWK","MV":"MVR","MQ":"EUR","MP":"USD","MS":"XCD","MR":"MRO","IM":"GBP","UG":"UGX","TZ":"TZS","MY":"MYR","MX":"MXN","IL":"ILS","FR":"EUR","IO":"USD","SH":"SHP","FI":"EUR","FJ":"FJD","FK":"FKP","FM":"USD","FO":"DKK","NI":"NIO","NL":"EUR","NO":"NOK","NA":"NAD","VU":"VUV","NC":"XPF","NE":"XOF","NF":"AUD","NG":"NGN","NZ":"NZD","NP":"NPR","NR":"AUD","NU":"NZD","CK":"NZD","XK":"EUR","CI":"XOF","CH":"CHF","CO":"COP","CN":"CNY","CM":"XAF","CL":"CLP","CC":"AUD","CA":"CAD","CG":"XAF","CF":"XAF","CD":"CDF","CZ":"CZK","CY":"EUR","CX":"AUD","CR":"CRC","CW":"ANG","CV":"CVE","CU":"CUP","SZ":"SZL","SY":"SYP","SX":"ANG","KG":"KGS","KE":"KES","SS":"SSP","SR":"SRD","KI":"AUD","KH":"KHR","KN":"XCD","KM":"KMF","ST":"STD","SK":"EUR","KR":"KRW","SI":"EUR","KP":"KPW","KW":"KWD","SN":"XOF","SM":"EUR","SL":"SLL","SC":"SCR","KZ":"KZT","KY":"KYD","SG":"SGD","SE":"SEK","SD":"SDG","DO":"DOP","DM":"XCD","DJ":"DJF","DK":"DKK","VG":"USD","DE":"EUR","YE":"YER","DZ":"DZD","US":"USD","UY":"UYU","YT":"EUR","UM":"USD","LB":"LBP","LC":"XCD","LA":"LAK","TV":"AUD","TW":"TWD","TT":"TTD","TR":"TRY","LK":"LKR","LI":"CHF","LV":"EUR","TO":"TOP","LT":"LTL","LU":"EUR","LR":"LRD","LS":"LSL","TH":"THB","TF":"EUR","TG":"XOF","TD":"XAF","TC":"USD","LY":"LYD","VA":"EUR","VC":"XCD","AE":"AED","AD":"EUR","AG":"XCD","AF":"AFN","AI":"XCD","VI":"USD","IS":"ISK","IR":"IRR","AM":"AMD","AL":"ALL","AO":"AOA","AQ":"","AS":"USD","AR":"ARS","AU":"AUD","AT":"EUR","AW":"AWG","IN":"INR","AX":"EUR","AZ":"AZN","IE":"EUR","ID":"IDR","UA":"UAH","QA":"QAR","MZ":"MZN"};
			function Cancelar(id){
				var id = id;
				var mensaje = "<div class='row'> \
					<div class='col-xs-12'> \
						<form id='frmCancelar'> \
							<p> <strong> Al cancelar la renovación de nombre tu dominio se cancelarán los siguientes beneficios: </strong> </p> \
							<div class='ckbox ckbox-danger'>\
								<input type='checkbox' id='ch1' class='chCancelar'>\
								<label for='ch1' style='font-weight: 500;'>\
									El sitio web dejara de funcionar.\
								</label>\
							</div>\
							<div class='ckbox ckbox-danger'>\
								<input type='checkbox' id='ch2' class='chCancelar'>\
								<label for='ch2' style='font-weight: 500;'>\
									Los correo electronicos se cancelaran.\
								</label> \
							</div> \
						</form> \
					</div> \
				</div>";
				BootstrapDialog.show({
					title: "Cancelar Sitio",
					type: BootstrapDialog.TYPE_DANGER,
					message: mensaje,
					draggable: true,
					cssClass: "ModalCancelar",
					onshown:function(dialogRefs){
						dialogRefs.getModalBody().find(".chCancelar").click(function(){
							var activo = 0;
							dialogRefs.getModalBody().find(".chCancelar").each(function(){
								if($(this).is(":checked")){
									activo++
								}
							})
							if(activo == 2){
								$("#btnCancelar").removeClass("desactivado");
							}
							else{
								$("#btnCancelar").addClass("desactivado");
							}
						})
					},
					buttons: [{
						id: "btnCancelar",
						label: "Cancelar Sitio",
						cssClass: "btn-danger desactivado",
						action: function(dialogItself){
							$.isLoading({ text: "Cargando..." }); NProgress.start();
							$.isLoading("hide"); NProgress.done();
							$("#btnCancelar").prop("disabled", true).html('<i class="fa fa-spinner fa-spin"></i> Cancelando');
							$.post(
								"<?php echo URL::route('SysWebCancelarSitio'); ?>",
								function(data){
									$("#btnCancelar").prop("disabled", false).html("Cancelar");
									if(data.success){
										new PNotify({ title: "Felicidades!", text: data.mensaje, type: "success" });
									}
									else{
										new PNotify({ title: "Error!", text: data.mensaje, type: "error" });
									}
									dialogItself.close();
								},
								"json"
							);
						}
					},
					{
						id: "btnCerrar",
						label: "Cerrar",
						cssClass: "btn-default",
						action: function(dialogItself){
							dialogItself.close();
						}
					}]
				});
			}
			NProgress.start();
			$(window).on("load", function() {
				NProgress.done();
			});
			$(document).ready(function(){
				<?php if( Auth::user()->tipo == 'C' && Cliente::select('planes_sc_id')->where('users_id', '=', Auth::user()->id)->first()->planes_sc_id != 1 ): ?>
					<?php if($Cliente->tco_dominio != null && $Cliente->tco_dominio != ''): ?>
						<?php if( ConfiguracionxSitioWeb::where('clientes_id', '=', Cliente::select('id')->where('users_id', '=', Auth::user()->id)->first()->id)->count() == 1 ): ?>
							var pais = "<?php echo $Cliente->pais; ?>";
							var precio = "<?php echo $precio[0]->precio; ?>";
							$.each(currency, function(i, item){
								if( i == pais){
									convertirMoneda( item , precio );
								}
							});
							<?php if( strtotime($fechaActual) >= strtotime($fechaM) ): ?>
								$(".mensajeAlerta").removeClass("alert-warning").addClass("alert-info");
								<?php if( strtotime($fechaActual) >= strtotime($fechaSemana)): ?>
									$(".mensajeAlerta").removeClass("alert-info").addClass("alert-warning");
								<?php endif; ?>
							<?php endif; ?>
						<?php endif; ?>
					<?php endif; ?>
					<?php if($Cliente->correos != null && $Cliente->correos != ''): ?>
						<?php if( strtotime($fechaActual) >= strtotime($fechaMC) ): ?>
							$(".mensajeAlertaCorreo").removeClass("alert-warning").addClass("alert-info");
							<?php if( strtotime($fechaActual) >= strtotime($fechaSemanaC)): ?>
								$(".mensajeAlertaCorreo").removeClass("alert-info").addClass("alert-warning");
							<?php endif; ?>
						<?php endif; ?>
					<?php endif; ?>
				<?php endif; ?>
				<?php /* @if( App::environment() == 'local' || ( App::environment() == 'produccion' && (strpos(public_path(), 'desarrollo') !== false) ) ) */ ?>
					<?php if( count($VistaSistema) == 1 ): ?>
					<?php
						//Videos de ayuda
						//$VideosAyuda = VideoAyudaxVistaSistema::select('videos_ayuda_x_vistas_sistema.id', 'va.id AS idVA', 'va.nombre AS nombre', 'va.ruta AS ruta')->join('videos_ayuda AS va', 'va.id', '=', 'videos_ayuda_x_vistas_sistema.videos_ayuda_id')->where('videos_ayuda_x_vistas_sistema.vistas_sistema_id', '=', $VistaSistema[0]['id'])->get();
						//Páginas de documentación
						$PaginasDocs = DocxVistaSistema::select('doc_x_vistas_sistema.id', 'pd.id AS idPD', 'pd.titulo', 'pd.ruta')->join('paginas_docs AS pd', 'pd.id', '=', 'doc_x_vistas_sistema.paginas_docs_id')->where('doc_x_vistas_sistema.vistas_sistema_id', '=', $VistaSistema[0]['id'])->get();
					?>
				$(".sidebar-toggle-box").on("click", function(){ if( $("#sidebar").hasClass("hide-left-bar") ){ $("#btnAyuda").addClass("barra-oculta"); }else{ $("#btnAyuda").removeClass("barra-oculta"); } });
				<?php /* Videos de ayuda */ ?>
				<?php /* var contenido = '<div class="row"> \
					<div class="col-md-12"> \
						<div class="form light"> \
							<ul class="nav nav-tabs" role="tablist"> \
								<?php foreach($VideosAyuda as $indice => $VideoAyuda): ?> \
								<li role="presentation" <?php if($indice == 0): ?> class="active" <?php endif; ?>> \
									<a class="tooltips" data-original-title="Video<?php echo $VideoAyuda['id']; ?>" style="min-width: 0px;" href="#Video<?php echo $VideoAyuda['id']; ?>" aria-controls="titulo" role="tab" data-toggle="tab"> \
										<?php echo $VideoAyuda['nombre']; ?> \
									</a> \
								</li> \
								<?php endforeach; ?> \
							</ul> \
							<div class="tab-content"> \
							<?php foreach($VideosAyuda as $indice => $VideoAyuda): ?> \
								<div role="tabpanel" class="tab-pane <?php if($indice == 0): ?> active <?php endif; ?>" id="Video<?php echo $VideoAyuda['id']; ?>"> \
									<div class="row"> \
										<div class="col-md-12"> \
											<div class="videocontent"> \
												<video id="VideoAyuda<?php echo $VideoAyuda['id']; ?>" class="video-js vjs-16-9 vjs-default-skin" controls="controls" poster="<?php echo asset('SysWeb/SumeClientes/PreviewVideos.png'); ?>" data-setup="{}"> \
													<source src="<?php echo $VideoAyuda['ruta']; ?>" type="video/mp4"> \
												</video> \
											</div> \
										</div> \
									</div> \
								</div> \
							<?php endforeach; ?> \
							<?php if( strpos(Route::currentRouteName(), 'SysWebIndex') !== false ): ?> \
							<a href="https://s3-us-west-2.amazonaws.com/instruccionessume/Los+7+pasos.pdf" target="_blank" download class="btn btn-verde-sume btn-lg btn-block" style="margin-top: 8px;"> \
								<i class="fa fa-file-pdf-o"> </i> Guía de los 7 pasos para comenzar a usar la plataforma \
							</a> \
							<?php endif; ?> \
							</div> \
						</div> \
					</div> \
				</div>'; */ ?>
				<?php /* /Videos de ayuda */ ?>
				<?php /* Páginas de documentación */ ?>
				<?php if(strpos(public_path(), 'prospector') !== false): ?>
				var rutaVLLSoporte = 'https://calendly.com/masprospector/soporte';
				<?php else: ?>
				var rutaVLLSoporte = '<?php echo route("SysWebSoporteAgendarLlamadaCalendly"); ?>';
				<?php endif; ?>
				var contenido = '<div class="row"> \
					<div class="col-md-12"> \
						<ul class="list-group"> \
						<?php foreach($PaginasDocs as $indice => $PaginaDoc): ?> \
							<li class="list-group-item"> \
								<a href="<?php echo $PaginaDoc['ruta']; ?>" target="_blank"><?php echo $PaginaDoc['titulo']; ?></a> \
							</li> \
						<?php endforeach; ?> \
						</ul> \
					</div> \
					<?php if( strpos(Route::currentRouteName(), 'SysWebIndex') !== false ): ?> \
					<!-- <div class="col-md-12"> \
						<a href="https://s3-us-west-2.amazonaws.com/instruccionessume/Los+7+pasos.pdf" target="_blank" download class="btn btn-verde-sume btn-lg btn-block" style="margin-top: 8px;"> \
							<i class="fa fa-file-pdf-o"> </i> Guía de los 7 pasos para comenzar a usar la plataforma \
						</a> \
					</div> --> \
					<?php endif; ?> \
					<div class="col-md-12"> \
						<a href="'+rutaVLLSoporte+'?back=0" class="btn btn-verde-sume btn-lg btn-block" style="margin-top: 8px;"> \
							<i class="fa fa-calendar"> </i> Agenda una llamada de soporte \
						</a> \
					</div> \
				</div>';
				<?php /* /Páginas de documentación */ ?>
				<?php /* Videos de ayuda */ ?>
				<?php /* var isMobile = false; //initiate as false
				if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|ipad|iris|kindle|Android|Silk|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(navigator.userAgent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(navigator.userAgent.substr(0,4))) isMobile = true;
				width = (isMobile)?"auto":"600";
				height = (isMobile)?"auto":"420";
				titulo = "¿Que puedo hacer en esta pantalla?"; */ ?>
				<?php /* /Videos de ayuda */ ?>
				<?php /* Páginas de documentación */ ?>
				width = "auto";
				height = "auto";
				titulo = "Instrucciones de funciones de esta pantalla";
				<?php /* /Páginas de documentación */ ?>
				$("#btnPopoverAyuda").webuiPopover({
					width: width,
					height: height,
					animation: "pop",
					title: titulo,
					content: contenido,
					closeable: true,
					cache: true,
					style: "ayuda",
					onShow: function($element){
						<?php /* Videos de ayuda */ ?>
						<?php /* $element.find(".video-js").each(function(){
							var id = $(this).attr("id");
							videojs(
								id,
								{ fluid: true, preload: 'metadata' },
								function(){
									//
								}
							);
						}); */ ?>
						<?php /* /Videos de ayuda */ ?>
					},
					onHide: function($element){
						<?php /* Videos de ayuda */ ?>
						<?php /* $element.find(".video-js").each(function(){
							var id = $(this).attr("id");
							if( videojs(id).play() ){ videojs(id).pause(); }
						}); */ ?>
						<?php /* /Videos de ayuda */ ?>
					},
				});
					<?php endif; ?>
				<?php /* @endif */ ?>
				if(
					$('script[src="https://sumeclientes.net/DataTables/jquery.dataTables.min.js"]').length == 1 ||
					$('script[src="https://www.sumeclientes.net/DataTables/jquery.dataTables.min.js"]').length == 1
				){
					$.fn.dataTable.ext.errMode = "none";
				}
				<?php echo $__env->yieldContent('JSOr'); ?>
			});
		</script>
		<?php if( App::environment() == 'produccion' && !(strpos(public_path(), 'desarrollo') !== false) ): ?>
		<!-- <script type="text/javascript" src="https://cdn.ywxi.net/js/1.js" async></script> -->
		<script type="text/javascript">
			$(document).ready(function(e){
				var verificarChat = setInterval(function(){
					if( $("#chat-widget-container").length > 0 ){
						limpiarVerificacionDeChat();
					}
				},
				3000);
				function limpiarVerificacionDeChat(){
					clearInterval( verificarChat );
					setTimeout(function(){
						$("#chat-widget-container").show("slow").addClass("mostrar");
					},
					3000);
				}
			});
		</script>
		<?php endif; ?>
		<?php /* NOTIFICACIÓN DE INSTRUCCIONES PARA CLIENTES */ ?>
		<?php if( Auth::user()->tipo != 'A' ): ?>
			<?php $nombreVista = Route::currentRouteName(); ?>
			<?php if( $nombreVista != 'SysWebIndex' ): ?>
		<script type="text/javascript">
			<?php
				$noExisteCE = true;
				$confExtra = Auth::user()->configuraciones_extra;
				if( $confExtra != '' ){
					$confExtra = json_decode($confExtra, true);
					if( array_key_exists('instruccionesVista', $confExtra) ){
						if( array_key_exists($nombreVista, $confExtra['instruccionesVista']) ){
							$confExtra['instruccionesVista'][$nombreVista]['visitas'] = (int)$confExtra['instruccionesVista'][$nombreVista]['visitas']+1;
						}
						else{
							$confExtra['instruccionesVista'][$nombreVista]['visitas'] = 1;
						}
						$noExisteCE = false;
					}
				}
				if( $noExisteCE ){
					$confExtra['instruccionesVista'] = array(
						$nombreVista => array(
							'visitas' => 1
						)
					);
				}
				$contadorIV = 0;
				foreach( $confExtra['instruccionesVista'] as $indice => $instruccionVista ){
					$contadorIV = $contadorIV+(int)$instruccionVista['visitas'];
				}
				if( $contadorIV < 9 ){
					$uConfV = User::find( Auth::user()->id );
					$uConfV->configuraciones_extra = json_encode( $confExtra );
					$uConfV->save();
				}
			?>
				<?php if( $contadorIV < 3 ): ?>
			$("#btnPopoverAyuda").hide();
			$("#btnPopoverAyuda2").show();
			$("#btnPopoverAyuda2").webuiPopover({
				container: document.body,
				trigger: "click",
				title: "Instrucciones de Plataforma Sume Clientes",
				content: '<div class="alert alert-warning" role="alert"> \
					<p style="font-size: 16;">En caso que tengas alguna duda sobre lo que puedes hacer en esta pantalla y como hacerlo, recuerda que tienes las instrucciones disponibles aquí siempre para ayudarte.</p> \
				<div>',
				closeable: true,
				backdrop: true,
				style: "ayuda",
				width: 500,
				multi: true,
				onHide: function($element){
					$("#btnPopoverAyuda").show();
					$("#btnPopoverAyuda2").hide();
				}
			});
			$("#btnPopoverAyuda2").webuiPopover("show");
			$("#btnPopoverAyuda2").click(function(e){
				$("#btnPopoverAyuda2").webuiPopover("hide");
				$("#btnPopoverAyuda").webuiPopover("show");
			});
				<?php endif; ?>
		</script>
			<?php endif; ?>
		<?php endif; ?>
		<?php if( strpos(Route::currentRouteName(), 'SysWebGClientes') !== false && strpos(Route::currentRouteName(), 'Productos') == false && strpos(Route::currentRouteName(), 'Referencias') == false && strpos(Route::currentRouteName(), 'Categorias') == false ): ?>
		<?php
			$fecha_actualDT = new DateTime('now', new DateTimeZone($zona_horaria));
			$fecha_inicio = $fecha_actualDT->format('Y-m-d');
			$fecha_fin = $fecha_actualDT->format('Y-m-d');
		?>
		<script type="text/javascript">
			function notificacionOV(){
				var urlProspectosAgregar = "<?php echo URL::route('SysWebGClientesProspectosAgregar'); ?>";
				var inputs = {
					tipo: "vigentes",
					fInicio: "<?php echo $fecha_inicio; ?>",
					fFin: "<?php echo $fecha_fin; ?>",
					movil: <?php echo (Agent::isDesktop())?0:1; ?>,
					usuario: <?php echo $Empleado->id; ?>,
					tipoOV: "Todos"
				};
				<?php if( $Empleado->cargos_id == 3 || $Empleado->cargos_id == 4 ): ?>
				inputs.usuario = 0;
				<?php endif; ?>
				var infoOportunidad = '<li class="alert liOportunidadV"> \
					<!-- <div class="alert-icon alt-default" style="vertical-align: middle;"> \
						<span class="fa fa-money"></span> \
					</div> --> \
					<a href="{%urlAprovecharOV%}" class="aOportunidadV"> \
						<div class="alert-content" style="width: 70%; word-break: break-word; white-space: normal;"> \
							{%nombreCliente%} &nbsp;&nbsp; <span class="spPrecio" data-valor="{%PrecioOportunidad%}">{%PrecioOportunidad%}</span> \
						</div> \
						<!-- <div class="alert-time"></div> --> \
					</a> \
				</li>';
				$.post(
					"<?php echo URL::route('SysWebGClientesOportunidades'); ?>",
					inputs,
					function(data){
						$.each(data.oportunidades, function(iO, oportunidad){
							var fOportunidad = iO;
							if( inputs.fInicio.indexOf(fOportunidad) > -1 ){
								$(".notificacionOV .liOportunidadV").remove();
								$(".notificacionOV .sinOportunidades").show();
								if( parseInt(oportunidad.oportunidades) > 0 ){
									$(".notificacionOV .lbNOV").html( oportunidad.oportunidades );
									$(".notificacionOV .sinOportunidades").hide();
									$.each(oportunidad.clientes, function(iC, cliente){
										var sumaTotalP = 0;
										$.each(cliente.productos, function(iP, producto){
											sumaTotalP = sumaTotalP + parseFloat( producto.precio );
										});
										var infoOportunidadI = infoOportunidad.replace(/{%nombreCliente%}/g, cliente.cliente.nombre);
										var codigoMoneda = "<?php echo $Cliente->codigo_moneda; ?>";
										var simboloMoneda = "<?php echo $Cliente->simbolo_moneda; ?>";
										var precioF = accounting.formatMoney(sumaTotalP, {
											symbol: codigoMoneda+" "+simboloMoneda,
											precision: 2,
											decimal : ".",
											thousand: ".",
											format: "%s%v"
										});
										infoOportunidadI = infoOportunidadI.replace(/{%PrecioOportunidad%}/g, precioF);
										infoOportunidadI = infoOportunidadI
										var idsOV = cliente.oportunidades.join();
										var idsP = new Array();
										$.each(cliente.productos, function(iP, producto){
											idsP.push(producto.idPS);
										});
										var url = new Url(urlProspectosAgregar);
										url.query["idC"] = iC;
										url.query["sc-cer"] = 1;
										url.query["sc-cer-ruta"] = "<?php echo URL::route('SysWebGClientesOportunidades'); ?>";
										url.query["idsOV"] = idsOV;
										url.query["idsP"] = idsP.join();
										infoOportunidadI = infoOportunidadI.replace(/{%urlAprovecharOV%}/g, url);
										$(".notificacionOV .ulAlertas").append( infoOportunidadI );
									});
									$(".notificacionOV .aOportunidadV").each(function(e){
										$(this).off("click").click(function(e){
											e.preventDefault();
											var el = $(this);
											var url = new Url($(this).attr("href"));
											var nuevaVentana = window.open(url);
											nuevaVentana.onbeforeunload = function(){
												notificacionOV();
											}
										});
									});
								}
							}
						});
					},
					"json"
				);
			}
			notificacionOV();
		</script>
		<?php endif; ?>
<?php if( Auth::user()->tipo == 'C' ): ?>
	<?php if( isset($renovacionNDD) ): ?>
		<script type="text/javascript">
			function actualizarNDD(NDD, precio, idC, RNoRA){
				//alert( NDD+" "+precio+" "+idC );
				var jsonData = {
					domainName: NDD,
					idC: idC,
					precio: precio
				};
				if(RNoRA == "RN"){
					jsonData.scRenovarDominio = 1;
				}
				else{
					jsonData.scReactivarDominio = 1;
				}
				fastspring.builder.tag(jsonData);
				var precioDominioF = parseFloat(precio),
				displayFS = "Compra del dominio "+NDD;
				var s = {
					reset: true,
					products : [{
						path: "sc-nombre-dominio",
						quantity: 1
					}],
					checkout: true
				}
				fastspring.builder.recognize({
					"email": "<?php echo $Cliente->correo_electronico; ?>",
					"firstName": "<?php echo $Cliente->nombre_completo; ?>", 
					"lastName": " ",
					"phone": "<?php echo $Cliente->telefono; ?>"
				});
				<?php //$pruebasDesarrollo = false;  ?>
				<?php if($pruebasDesarrollo): ?>
				//PROCESO SOLO PARA PRUEBAS Y DESARROLLO -------
				var nonEncryptedJSON = {
					items: [{
						product: "sc-nombre-dominio",
						quantity: 1,
						pricing: {
							price: {
								"USD": precioDominioF
							}
						},
						display: {
							"EN": displayFS,
							"ES": displayFS
						}
					}]
				}
				fastspring.builder.secure(nonEncryptedJSON, "");
				fastspring.builder.push(s);
				//----------------------------------------------
				<?php else: ?>
				//PROCESO SOLO PARA PRODUCCIÓN -----------------------------------------
				var formData = new FormData();
				formData.append("accion", "encriptarDataFS");
				formData.append("price", precioDominioF);
				formData.append("display", displayFS);
				$.ajax({
					method: "POST",
					url: "<?php echo URL::route('SysWebSWebConfiguraciones1'); ?>",
					data: formData,
					cache: false,
					contentType: false,
					processData: false,
					dataType: "json",
					success: function(data){
						console.log(data);
						if( data.success ){
							fastspring.builder.secure(data.securedData, data.secureKey);
							fastspring.builder.push(s);
						}
					},
					error: function(jqXHR, textStatus, errorThrown){
						console.log("error");
					}
				});
				//----------------------------------------------------------------------
				<?php endif; ?>
			}
			function onPopupCloseANDD(data){
				if(data){
					console.log(data.reference);
					fastspring.builder.reset();
					new PNotify({
						title: "Felicidades!",
						text: "El pago de tu renovación/reactivación de nombre de dominio ha sido exitoso, en un par de minutos desaparecerá la notificación de renovación/actuvacuib y en caso de no desaparecer por favor escríbenos por el chat de soporte para revisar la aplicación de tu pago.",
						type: "success"
					});
				}
				else{
					console.log("no order ID");
				}
			}
		</script>
	<?php endif; ?>
<?php endif; ?>
<script>
	function mostrarChat(){
		window.Tawk_API.maximize();
	}
</script>
<script type="text/javascript">
	$("#btnAddEtiqueta").click(function(e){
		var slEtiquetas = $(this).closest(".form-group").find(".selectpicker").attr("id");
		var dvEtiquetas = $(this).closest(".form-group").find("span.text-danger + div").attr("id");
			var mensaje = '<div class="row"> \
								<div class="col-sm-12">\
									<div class="col-sm-12">\
										<div class="input-group">\
											<input type="text" placeholder="Agregar etiqueta..." class="form-control" id="txtEtiqueta">\
											<div class="input-group-btn"> <button id="btnTxtEtiqueta" class="btn btn-default" type="button"> <i class="fa fa-plus"></i> </button> </div>\
										</div>\
										<span class="text-danger" id="errcampo"> </span>\
										<div class="alert alert-warning" role="alert" style="margin-top: 10px;">\
											<strong>IMPORTANTE:</strong> Los campos tienen un limite de 40 caracteres y no pueden llevar caracteres especiales (¡#?)\
											<br>\
										</div>\
									</div>\
								</div>\
							</div>';
			BootstrapDialog.show({
			title: "Agregar Nueva Etiqueta (Opcional)",
			type: BootstrapDialog.TYPE_DANGER,
			message: mensaje,
			draggable: true,
			closeByBackdrop: false,
			cssClass: "ModalEtiqueta color-head-modal mdAvatar",
			onshown: function(dialogItself){
				$("body").addClass("modal-open");
				$("#btnTxtEtiqueta").click(function(){
					$.isLoading({ text: "Cargando..." }); NProgress.start();
					$.post(
						"<?php echo URL::route('SysWebEmailMarketingEtiquetasAgregar'); ?>",
						{etiqueta: $("#txtEtiqueta").val()},
						function(data){
							if(data.success){
							var OpEtiquetas= $("#"+slEtiquetas).val();
								if(OpEtiquetas != null ){
									OpEtiquetas.push(data.Etiqueta.id);
								}
								else{
									OpEtiquetas = data.Etiqueta.id;
								}
								$("#"+slEtiquetas).append($("<option></option>").attr("value", data.Etiqueta.id).text(data.Etiqueta.nombre).attr("id", "op"+data.Etiqueta.id));
								$("#"+slEtiquetas).selectpicker("val", OpEtiquetas);
								$("#"+slEtiquetas).selectpicker("refresh");
								dialogItself.close();
								new PNotify({ title: "Realizado", text: "Etiqueta creada con Exito.", type: "success" });
								data.Etiqueta.nombre,
								$("#"+dvEtiquetas).append(' \
									<span class="label label-info" data-valor="'+data.Etiqueta.nombre+'"> \
										'+data.Etiqueta.nombre+' \
									</span> &nbsp; \
								');
							}
							else{
								if(data.mensaje != ""){ new PNotify({ title: "Error", text: data.mensaje, type: "error" }); }
								$.each(data.errMensajes, function(key, value){ if(value != ''){ $("#err"+key).html(value); } else{ $("#err"+key).html(""); } });
							}
							$("#txtEtiqueta").val("");
						},
						"json"
					);
					$(".tooltips").tooltip();
					$.isLoading("hide"); NProgress.done();
				});
		},
		onhidden: function(dialogItself){
			$("body").removeClass("modal-open");
			}
		});
	});
</script>
<script>
	$.fn.DataTable.ext.pager.numbers_length = 5;
	$.extend( $.fn.dataTable.defaults, {
		dom: "<'row'<'col-sm-3 col-mostrar'l><'col-sm-4 col-busqueda'f><'col-sm-5 col-paginacion'p>>" +
			"<'row datatable-general'<'col-sm-12'tr>>" +
		"<'row'<'col-sm-5'i><'col-sm-7'p>>",
		initComplete: function(){
			var input = $(".dataTables_filter input").unbind();
			$(".dataTables_filter").html('');
			var self = this.api(),
			$searchButton = $('<button class="btn btn-primary tooltips" style="margin-left: 5px;" data-toggle="tooltip" data-original-title="Buscar">').html('<i class="fa fa-search"></i>').click(function(){
				self.search(input.val().trim()).draw();
			}),
			$clearButton = $('<button class="btn btn-default tooltips" style="margin-left: 5px;" data-toggle="tooltip" data-original-title="Limpiar">').html('<i class="fa fa-paint-brush"></i>').click(function(){
				input.val('');
				$searchButton.click(); 
			});
			divInputGroup = $('<div class="input-group div-groupinput">'+
				'<div class="input-group-btn div-groupbutton">'+
				'</div>'+
			'</div>');
			$(".dataTables_filter").append(divInputGroup);
			$(".div-groupinput").prepend(input);
			$(".div-groupbutton").append($searchButton, $clearButton);
			$("body").tooltip({selector: "[data-toggle='tooltip']"});
			$("input[type=search]").attr("placeholder", "Buscar...");
			detectarPantalla();
		}
	} );
	function detectarPantalla() {
		var anchoPantalla = window.innerWidth;
		if(anchoPantalla <= 1110){
			$(".col-busqueda").find("button").addClass("btn-sm");
			$(".col-paginacion").find("li").addClass("btn-sm");
			$(".col-busqueda").find("input").addClass("input-sm");
		}
		else{
			$(".col-busqueda").find("button").removeClass("btn-sm");
			$(".col-paginacion").find("li").removeClass("btn-sm");
			$(".col-busqueda").find("input").removeClass("input-sm");
		}
	}
	$(window).resize(function() {
		if($(".datatable-general").length){
			detectarPantalla();
		}
	});
</script>
<script>
	function verificarSesion(){
		let tiempoAdvertencia;
		let tiempoInactividad;
		// Tiempo en milisegundos: Minutos x segundos x milisegundos
		if(<?php echo (int)Session::has('ingresoAdminGeneral'); ?> == 1 && <?php echo (int)Session::get('ingresoAdminGeneral'); ?> == 1){
			tiempoAdvertencia = 119 * 60 * 1000;
			tiempoInactividad = 120 * 60 * 1000;
			//Agregado para modificar tiempos en caso de necesitar realizar pruebas
		}
		else{
			tiempoAdvertencia = 119 * 60 * 1000;
			tiempoInactividad = 120 * 60 * 1000;
		}
		let contadorAdvertencia;
		let contadorCierreSesion;
		let contador;
		let tiempoCuentaAtras = 60;
		function mostrarAdvertenciaCierre() {
			localStorage.setItem("estadoSesion","advertencia");
			BootstrapDialog.show(opcionesModalSesion);
			contadorCierreSesion = setTimeout(cerrarSesionExpirada, (tiempoInactividad-tiempoAdvertencia));
			contador = setInterval(cuentaAtras, 1000);
		}
		function cuentaAtras(){
			tiempoCuentaAtras--;
			$("#contador").text(tiempoCuentaAtras);
			if(tiempoCuentaAtras <= 0){
				clearInterval(contador);
			}
		}
		function reiniciarContadores() {
			tiempoCuentaAtras = 60;
			clearTimeout(contadorAdvertencia);
			clearTimeout(contadorCierreSesion);
			clearInterval(contador);
			contadorAdvertencia = setTimeout(mostrarAdvertenciaCierre, tiempoAdvertencia);
			localStorage.setItem("ultimaActividad", Date.now());
			localStorage.setItem("estadoSesion", "abierta");
		}
		function cerrarSesionExpirada() {
			localStorage.setItem("estadoSesion", "expirada");
			window.location.href = "<?php echo route("SysWebCerrarSesion"); ?>";
		}
		$(document).on("mousemove keydown click", reiniciarContadores);
		reiniciarContadores();
		window.addEventListener("storage", function(event) {
			if (event.key == "estadoSesion" && event.newValue == "expirada") {
				window.location.href = "<?php echo route("SysWebCerrarSesion"); ?>";
			}
			else if (event.key == "estadoSesion" && event.newValue == "abierta") {
				reiniciarContadores();
				$(".avisoSesion").modal("hide");
			}
			if (event.key == "ultimaActividad") {
				const ultimaActividad = parseInt(event.newValue);
				const tiempoActual = Date.now();
				if (tiempoActual - ultimaActividad <= tiempoInactividad) {
					reiniciarContadores();
				}
			}
		});
		var mensajeAvisoSesion = "<div class='row'> \
			<div class='col-md-12' style='text-align:center;'> \
				<h4><p style='display: inline;'>El sistema ha detectado un periodo largo de inactividad en tu cuenta. Por seguridad, tu sesión se cerrará automáticamente en</p> <p id='contador' style='display: inline;'></p><p style='display: inline;'> segundos. ¿Deseas mantener tu sesión abierta?</p></h4>\
			</div> \
		</div>";
		var opcionesModalSesion = {
			cssClass: "avisoSesion",
			title: "<i class='fa fa-exclamation-triangle'></i>  Aviso: Tu sesión está a punto de cerrarse",
			message: mensajeAvisoSesion,
			draggable: true,
			type: BootstrapDialog.TYPE_DANGER,
			buttons: [{
				id: "btnReanudar",
				label: "Mantener sesión abierta",
				cssClass: "botones-aviso-sesion btn-success",
				action: function(dialogItself) {
					dialogItself.close();
					reiniciarContadores();
				}
			},
			{
				id: "btnCerrarSesion",
				label: "Cerrar Sesión",
				cssClass: "botones-aviso-sesion btn-danger",
				action: function(dialogItself) {
					cerrarSesionExpirada();
				}
			}],
			onshown: function(dialogRef) {
				$(document).off("mousemove keydown click", reiniciarContadores);
			},
			onhide: function(dialogRef) {
				$(document).on("mousemove keydown click", reiniciarContadores);
			}
		}
	}
	$(document).ready(function(){verificarSesion();});
</script>
	</body>
</html>