-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.alt.php
executable file
·249 lines (218 loc) · 6.53 KB
/
index.alt.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
<?php
if ( !file_exists(dirname(__FILE__) . "/core/core.config.os." . strtolower(substr(PHP_OS, 0, 3)) . ".inc.php") ){ header("location: install/install.php"); } else { }
//=====> INICIO_H
include_once("./core/go.login.inc.php");
include_once("./core/core.error.inc.php");
include_once("./core/core.html.inc.php");
include_once("./core/core.init.inc.php");
$theFile = __FILE__;
$permiso = getSIPAKALPermissions($theFile);
if($permiso === false){ header ("location:../404.php?i=999"); }
$_SESSION["current_file"] = addslashes( $theFile );
//<===== FIN_H
//=====================================================================================================
$xHP = new cHPage(EACP_NAME . "{" . getSucursal() . "} - S.A.F.E. V " . $version. "", HP_FORM, "", ".");
$fecha_de_sesion = parametro("f", fechasys());
$MenuParent = parametro("m", 0, MQL_INT);
$isMobile = $xHP->isMobile();
$_SESSION[SYS_CLIENT_MOB] = $isMobile;
$xUser = new cSystemUser(getUsuarioActual());
$xUser->init();
$xUser->getUserRules();
$TasksPage = $xUser->getTasksPage();
/**
* Procedimientos AJAX
*/
$jxc = new TinyAjax();
function jsaGetMoneyChanges(){
if(!isset($_SESSION["money"])){ $_SESSION["money"] = 0; }
$_SESSION["money"] += 100;
return $_SESSION["money"];
}
function jsaGetMenu($subitems){
$xMen = new cHMenu();
$xMen->setID("navigator");
$menu = "";
$xMen->setIsMobile($_SESSION[SYS_CLIENT_MOB]);
if($subitems > 0){
$btn = "";
if($_SESSION[SYS_CLIENT_MOB] == true){
$menu .= "<li><a onclick='var xG = new Gen(); xG.home();'><i class='fa fa-home fa-lg'></i>Inicio</a></li>";
}
$menu .= $xMen->getItems($subitems);
}
return $menu;
}
$jxc ->exportFunction('jsaGetMenu', array('id-KeyEditable'), "#navigator");
$jxc ->exportFunction('jsaGetMoneyChanges', array("idMoneyExist"), "#idMoneyExist");
$jxc ->process();
/* ******************************************************************************************************************
//
//--------------------------------------Verifica las tareas Comunes.------------------------------------------------
//
****************************************************************************************************************** */
if(MODO_DEBUG == true){
} else {
//checar cierre del dia
$xCierre = new cCierreDelDia();
$aCierres = $xCierre->check5Cierres($fecha_de_sesion);
if($aCierres[SYS_ESTADO] == false){
setLog($xCierre->getMessages(), 300);
header("location:utils/frmcierredeldia.php"); exit();
}
//if(CREDITO_CONTROLAR_POR_PERIODOS == true){
$xPerCred = new cPeriodoDeCredito();
if($xPerCred->checkPeriodoVigente($fecha_de_sesion) == false ){
setLog($xPerCred->getMessages(), 300);
header("location:frmcreditos/cambiarperiodo.frm.php?a=1");
}
//}
}
$PATHIMG = "images/common/";
$xHP->setNoCache();
$xHP->setNoDefaultCSS();
$xHP->addCSS("css/general.css");
$xHP->addCSS("css/jmenu.css");
$xHP->addJsFile("js/jquery/jquery.ui.js");
$xHP->addJsFile("js/jmenu/jMenu.jquery.js");
$xHP->addJsFile("js/tinybox.js");
echo $xHP->getHeader();
?>
<style>
html, body, object {
padding: 0 !important;
margin : 0 !important;
}
#header {
text-align: center !important;
}
#banner {
right: 0;
bottom: 0;
position:fixed !important;
}
.menu-trigger {
right: 0;
top: 0;
position:fixed !important;
display:block; text-shadow:0 -1px 1px #222;line-height:1.4em;color:#ffffff; width:3em; background-color:#000821;text-align:center;font-size:1.2em;border-radius:0 0 0 5px;
}
#wprincipal{ width: 100%; max-width: 100%;
}
</style>
<body onload="jsInitComponents();">
<?php
$adsense = (MODO_DEBUG == true) ? "" : getAdsense();
//$xFRM->addToolbar("");
$xMenu = new cHMenu();
$xMenu->setIsMobile($isMobile);
$menu = "";
if($isMobile == false ){
echo "<div id='header'>" . $xMenu->getAll() . "</div>";
echo "<div id='wprincipal'><iframe id=\"idFPrincipal\" src=\"./$TasksPage\" width='100%' height=\"100px\" ></iframe></div>
<div id=\"banner\">$adsense $menu</div>";
} else {
$xMenu->setID("navigator");
$menu = '<div class="jPanelmenu"><nav style="display: none" id="navmenu">' . $xMenu->getAll() . '</nav>
<input type="hidden" id="id-KeyEditable"/></div>';
echo "<a href=\"#menu\" class=\"menu-trigger\"><i class=\"fa fa-reorder fa-3x\"></i></a>";
echo "<div id='wprincipal'>
<iframe id=\"idFPrincipal\" src=\"./$TasksPage\" width='100%' height=\"100%\" ></iframe>
</div>
<div id=\"banner\">$adsense $menu</div>";
}
$jxc ->drawJavaScript(false, true);
?>
<script>
var xG = new Gen();
var smenu = 42;
var mmob = <?php echo ($isMobile == false) ? 'false': 'true'; ?>;
$(document).ready(function(){
if(mmob == false){
$("#jMenu").jMenu({
ulWidth : '200px',
effects : {
effectSpeedOpen : 200,
effectSpeedClose : 200,
effectTypeOpen : 'show',
effectTypeClose : 'hide',
effectOpen : 'slide',
effectClose : 'slide'
},
TimeBeforeOpening : 200,
TimeBeforeClosing : 20,
animatedText : true,
paddingLeft: 1,
openClick : true
});
} else {
smenu = 8;
$("#wprincipal").css("height", xG.alto());
jsGetMenu();
}
});
function setInFrame(sURI){
if(typeof jPanelMenu != "undefined"){
jPanelMenu.close();
}
if( $("#jMenu").length >0){
$("#jMenu").trigger('mouseout');
}
xG.QFrame({ url : sURI, id : 'idFPrincipal' });
}
function jsGetMenuChilds(id){
var mParent = $("#" + id).attr("data-key");
$("#id-KeyEditable").val(mParent);
jsaGetMenu();
jPanelMenu.off();
setTimeout("jsGetMenu(true)", 500);
}
function jsGetMenu(tr){
if(typeof tr == "undefined"){ tr = false; }
jPanelMenu = $.jPanelMenu({
menu: '#navmenu',
animated: false
});
jPanelMenu.on();
if(tr == true){jPanelMenu.trigger(tr);}
}
function jsGetParent(parentID){ window.location = "./index.xul.php?m=" + parentID;}
function getNewTiny(mFile){
if(mFile){
var xG = new Gen();
mFile = mFile + "?";
xG.w({url: mFile, tiny : true});
}
}
function getNewWindow(mFile){
if(mFile){
var xG = new Gen();
xG.w({url: mFile});
}
<?php
if(MODO_DEBUG == false){
echo "if( window.console ) { window.console.log( '' ) }";
}
?>
}
function jsGetMoneyChanges(){
jsaGetMoneyChanges();
//Mostrar el Popup
setTimeout("jsGetMoneyInBox()", 15000);
}
function jsGetMoneyInBox(){
//setTimeout("jsGetMoneyChanges()", 15000);
}
function jsEndSession(){}
function jsInitComponents(){
jsGetMoneyChanges();
var mAlto = xG.alto()-smenu - 5;
$("#idFPrincipal").attr("height", mAlto);
if($('#id-KeyEditable').length >0){
//setTimeout("jsGetMenu()", 500);
}
}
</script>
<?php
$xHP->fin();
?>