DEBUG FASE 2: Identificados problemas críticos en GetRow()
PROBLEMAS CRÍTICOS IDENTIFICADOS: ⚠️ GetRow() devuelve null siempre → empresaId = 0 ⚠️ Warnings PHP en util.class.php:501 (acceso arrays nulos) ⚠️ Compatibilidad MockDatabase vs mysqli real DATOS REALES ENCONTRADOS: ✅ admin@novomoda.com.mx → empresaId = 1 ✅ sonia.velezquez@novomoda.com.mx → empresaId = 15 ✅ gerente@novomoda.com.mx → empresaId = 15 ARCHIVOS NUEVOS: - debug_login.php → Debug de base de datos master - test_login_reales.php → Test con usuarios reales ANÁLISIS: - Usuarios existen en BD master - Consultas SQL funcionan en debug - GetRow() falla en DoLogin() SIGUIENTE PASO: Revisar GetRow() en DB.class.php
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
<?php /* Smarty version Smarty3-b7, created on 2026-01-07 18:42:48
|
||||
compiled from "/var/www/html/ventas/templates/lists/sucursales.tpl" */ ?>
|
||||
<?php /*%%SmartyHeaderCode:886448351695efd884d2185-21380906%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||||
$_smarty_tpl->decodeProperties(array (
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'2c69bbea5cf227f65b4e66d17053d55f08b4868c' =>
|
||||
array (
|
||||
0 => '/var/www/html/ventas/templates/lists/sucursales.tpl',
|
||||
1 => 1767753171,
|
||||
),
|
||||
),
|
||||
'nocache_hash' => '886448351695efd884d2185-21380906',
|
||||
'function' =>
|
||||
array (
|
||||
),
|
||||
'has_nocache_code' => false,
|
||||
)); /*/%%SmartyHeaderCode%%*/?>
|
||||
<?php $_template = new Smarty_Internal_Template("{$_smarty_tpl->getVariable('DOC_ROOT')->value}/templates/items/sucursales-header.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
|
||||
$_template->assign('clase',"Off"); echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
|
||||
|
||||
|
||||
<?php if (count($_smarty_tpl->getVariable('sucursales')->value)){?>
|
||||
<?php $_smarty_tpl->tpl_vars['sucursal'] = new Smarty_Variable;
|
||||
$_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
|
||||
$_from = $_smarty_tpl->getVariable('sucursales')->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||||
if (count($_from) > 0){
|
||||
foreach ($_from as $_smarty_tpl->tpl_vars['sucursal']->key => $_smarty_tpl->tpl_vars['sucursal']->value){
|
||||
$_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['sucursal']->key;
|
||||
?>
|
||||
<?php if ($_smarty_tpl->getVariable('key')->value%2==0){?>
|
||||
<?php $_template = new Smarty_Internal_Template("{$_smarty_tpl->getVariable('DOC_ROOT')->value}/templates/items/sucursales-base.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
|
||||
$_template->assign('clase',"Off"); echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
|
||||
|
||||
<?php }else{ ?>
|
||||
<?php $_template = new Smarty_Internal_Template("{$_smarty_tpl->getVariable('DOC_ROOT')->value}/templates/items/sucursales-base.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
|
||||
$_template->assign('clase',"On"); echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
|
||||
|
||||
<?php }?>
|
||||
<?php }} ?>
|
||||
<?php $_template = new Smarty_Internal_Template("{$_smarty_tpl->getVariable('DOC_ROOT')->value}/templates/lists/pages_ajax.tpl", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
|
||||
$_template->assign('pages',$_smarty_tpl->getVariable('pages')->value); echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
|
||||
|
||||
<?php }else{ ?>
|
||||
<tr><td colspan="5" align="center">Ningún registro encontrado.</td></tr>
|
||||
<?php }?>
|
||||
</table>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php /* Smarty version Smarty3-b7, created on 2026-01-07 18:42:48
|
||||
compiled from "/var/www/html/ventas/templates/lists/pages_ajax.tpl" */ ?>
|
||||
<?php /*%%SmartyHeaderCode:1966434410695efd885a8455-07878179%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||||
$_smarty_tpl->decodeProperties(array (
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'9f7a51167e64afe4bcfd339161960b40e41200d3' =>
|
||||
array (
|
||||
0 => '/var/www/html/ventas/templates/lists/pages_ajax.tpl',
|
||||
1 => 1767753171,
|
||||
),
|
||||
),
|
||||
'nocache_hash' => '1966434410695efd885a8455-07878179',
|
||||
'function' =>
|
||||
array (
|
||||
),
|
||||
'has_nocache_code' => false,
|
||||
)); /*/%%SmartyHeaderCode%%*/?>
|
||||
<?php if (count($_smarty_tpl->getVariable('pages')->value['numbers'])){?>
|
||||
<?php $_smarty_tpl->assign("linktpl","{$_smarty_tpl->getVariable('DOC_ROOT')->value}/templates/links/ajax.tpl",null,null);?>
|
||||
<div class="pages">
|
||||
<?php if ($_smarty_tpl->getVariable('pages')->value['first']){?><?php $_template = new Smarty_Internal_Template($_smarty_tpl->getVariable('linktpl')->value, $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
|
||||
$_template->assign('link',$_smarty_tpl->getVariable('pages')->value['first']);$_template->assign('name',$_smarty_tpl->getVariable('language')->value['first']); echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
|
||||
<?php }?>
|
||||
<?php if ($_smarty_tpl->getVariable('pages')->value['prev']){?><?php $_template = new Smarty_Internal_Template($_smarty_tpl->getVariable('linktpl')->value, $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
|
||||
$_template->assign('link',$_smarty_tpl->getVariable('pages')->value['prev']);$_template->assign('name',$_smarty_tpl->getVariable('language')->value['prev']); echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
|
||||
<?php }?>
|
||||
<?php $_smarty_tpl->tpl_vars['page'] = new Smarty_Variable;
|
||||
$_smarty_tpl->tpl_vars['key'] = new Smarty_Variable;
|
||||
$_from = $_smarty_tpl->getVariable('pages')->value['numbers']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
|
||||
if (count($_from) > 0){
|
||||
foreach ($_from as $_smarty_tpl->tpl_vars['page']->key => $_smarty_tpl->tpl_vars['page']->value){
|
||||
$_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['page']->key;
|
||||
?>
|
||||
<?php if ($_smarty_tpl->getVariable('pages')->value['current']==$_smarty_tpl->getVariable('key')->value){?><span class="p"><?php echo $_smarty_tpl->getVariable('key')->value;?>
|
||||
</span><?php }else{ ?><?php $_template = new Smarty_Internal_Template($_smarty_tpl->getVariable('linktpl')->value, $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
|
||||
$_template->assign('link',$_smarty_tpl->getVariable('page')->value);$_template->assign('name',$_smarty_tpl->getVariable('key')->value); echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
|
||||
<?php }?>
|
||||
<?php }} ?>
|
||||
<?php if ($_smarty_tpl->getVariable('pages')->value['next']){?><?php $_template = new Smarty_Internal_Template($_smarty_tpl->getVariable('linktpl')->value, $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
|
||||
$_template->assign('link',$_smarty_tpl->getVariable('pages')->value['next']);$_template->assign('name',$_smarty_tpl->getVariable('language')->value['next']); echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
|
||||
<?php }?>
|
||||
<?php if ($_smarty_tpl->getVariable('pages')->value['last']){?><?php $_template = new Smarty_Internal_Template($_smarty_tpl->getVariable('linktpl')->value, $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
|
||||
$_template->assign('link',$_smarty_tpl->getVariable('pages')->value['last']);$_template->assign('name',$_smarty_tpl->getVariable('language')->value['last']); echo $_template->getRenderedTemplate();?><?php $_template->updateParentVariables(0);?><?php unset($_template);?>
|
||||
<?php }?>
|
||||
</div>
|
||||
<?php }?>
|
||||
@@ -0,0 +1,41 @@
|
||||
<?php /* Smarty version Smarty3-b7, created on 2026-01-07 18:42:48
|
||||
compiled from "/var/www/html/ventas/templates/items/sucursales-header.tpl" */ ?>
|
||||
<?php /*%%SmartyHeaderCode:2065303339695efd88573ed3-73507570%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||||
$_smarty_tpl->decodeProperties(array (
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'a076112b8fd76e9ace9a050c0240fb77305aa5fa' =>
|
||||
array (
|
||||
0 => '/var/www/html/ventas/templates/items/sucursales-header.tpl',
|
||||
1 => 1767753171,
|
||||
),
|
||||
),
|
||||
'nocache_hash' => '2065303339695efd88573ed3-73507570',
|
||||
'function' =>
|
||||
array (
|
||||
),
|
||||
'has_nocache_code' => false,
|
||||
)); /*/%%SmartyHeaderCode%%*/?>
|
||||
<div align="center">
|
||||
<span id="addSucursal" style="cursor:pointer"><img src="<?php echo $_smarty_tpl->getVariable('WEB_ROOT')->value;?>
|
||||
/images/icons/add.png" border="0" />Agregar Sucursal</span>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<div class="portlet" style="width:95%; padding-left:20px" align="center">
|
||||
|
||||
<div class="portlet-content nopadding">
|
||||
|
||||
<table width="100%" cellpadding="0" cellspacing="0" id="box-table-a" summary="Employee Pay Sheet">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="80" scope="col"><div align="center">No.</div></th>
|
||||
<th width="136" scope="col"><div align="center">RFC</div></th>
|
||||
<th width="" scope="col"><div align="center">Nombre</div></th>
|
||||
<th width="109" scope="col"><div align="center">IVA</div></th>
|
||||
<th width="100" scope="col"><div align="center">Acciones</div></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php /* Smarty version Smarty3-b7, created on 2026-01-07 18:42:48
|
||||
compiled from "/var/www/html/ventas/templates/items/sucursales-base.tpl" */ ?>
|
||||
<?php /*%%SmartyHeaderCode:2076211922695efd8857ef52-82516433%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
|
||||
$_smarty_tpl->decodeProperties(array (
|
||||
'file_dependency' =>
|
||||
array (
|
||||
'f5fb1dff11e1325036c56d7d5543bee3a70c6bcd' =>
|
||||
array (
|
||||
0 => '/var/www/html/ventas/templates/items/sucursales-base.tpl',
|
||||
1 => 1767753171,
|
||||
),
|
||||
),
|
||||
'nocache_hash' => '2076211922695efd8857ef52-82516433',
|
||||
'function' =>
|
||||
array (
|
||||
),
|
||||
'has_nocache_code' => false,
|
||||
)); /*/%%SmartyHeaderCode%%*/?>
|
||||
<tr>
|
||||
<td align="center"><?php echo $_smarty_tpl->getVariable('sucursal')->value['sucursalId'];?>
|
||||
</td>
|
||||
<td align="center"><?php echo $_smarty_tpl->getVariable('sucursal')->value['rfc'];?>
|
||||
</td>
|
||||
<td align="center"><?php echo $_smarty_tpl->getVariable('sucursal')->value['nombre'];?>
|
||||
</td>
|
||||
<td align="center"><?php echo $_smarty_tpl->getVariable('sucursal')->value['iva'];?>
|
||||
%</td>
|
||||
<td align="center">
|
||||
<img src="<?php echo $_smarty_tpl->getVariable('WEB_ROOT')->value;?>
|
||||
/images/icons/details.png" class="spanViewSucursal" id="<?php echo $_smarty_tpl->getVariable('sucursal')->value['sucursalId'];?>
|
||||
" title="Ver Detalles" />
|
||||
<img src="<?php echo $_smarty_tpl->getVariable('WEB_ROOT')->value;?>
|
||||
/images/icons/edit.gif" class="spanEditSucursal" id="<?php echo $_smarty_tpl->getVariable('sucursal')->value['sucursalId'];?>
|
||||
" title="Editar"/>
|
||||
<img src="<?php echo $_smarty_tpl->getVariable('WEB_ROOT')->value;?>
|
||||
/images/icons/delete.gif" class="spanDeleteSucursal" id="<?php echo $_smarty_tpl->getVariable('sucursal')->value['sucursalId'];?>
|
||||
" title="Eliminar"/>
|
||||
</td>
|
||||
</tr>
|
||||
Reference in New Issue
Block a user