|
@@ -42,37 +42,37 @@ discard block |
|
|
block discarded – undo |
|
42
|
42
|
/** Cf directorio separador */ |
|
43
|
43
|
defined('DS') ? null : define('DS', DIRECTORY_SEPARATOR); |
|
44
|
44
|
/** Cf raiz del sitio */ |
|
45
|
|
-defined('SITE_ROOT')? null: define('SITE_ROOT', realpath(dirname(__FILE__)).DS); |
|
|
45
|
+defined('SITE_ROOT') ? null : define('SITE_ROOT', realpath(dirname(__FILE__)).DS); |
|
46
|
46
|
/** Cf PATH del sitio */ |
|
47
|
|
-defined('SITE_PATH') ? NULL : define ('SITE_PATH', realpath(dirname(__FILE__) . DS . '..' . DS) . DS); |
|
|
47
|
+defined('SITE_PATH') ? NULL : define('SITE_PATH', realpath(dirname(__FILE__).DS.'..'.DS).DS); |
|
48
|
48
|
|
|
49
|
49
|
/** Cf definimos constante Ruta directa al nucleo de framework */ |
|
50
|
|
-define('RUTA_NUCLEO', SITE_ROOT . 'Sistema'.DS.'Nucleo' . DS); |
|
|
50
|
+define('RUTA_NUCLEO', SITE_ROOT.'Sistema'.DS.'Nucleo'.DS); |
|
51
|
51
|
|
|
52
|
52
|
# define para mvc erp |
|
53
|
53
|
|
|
54
|
54
|
/** Cf definimos constante directa a la vista del framework */ |
|
55
|
|
-define('VIEW_PATH', SITE_ROOT . 'mvc'.DS.'vistas' . DS); |
|
|
55
|
+define('VIEW_PATH', SITE_ROOT.'mvc'.DS.'vistas'.DS); |
|
56
|
56
|
/** Cf definimos constante directa a los controladores del framework */ |
|
57
|
|
-define('CONTR_PATH', SITE_ROOT . 'mvc'.DS.'controladores' . DS); |
|
|
57
|
+define('CONTR_PATH', SITE_ROOT.'mvc'.DS.'controladores'.DS); |
|
58
|
58
|
/** Cf definimos constante directa a los modelos del framework */ |
|
59
|
|
-define('RUTA_MOD', SITE_ROOT . 'mvc'.DS.'modelos' . DS); |
|
|
59
|
+define('RUTA_MOD', SITE_ROOT.'mvc'.DS.'modelos'.DS); |
|
60
|
60
|
|
|
61
|
61
|
# define ruta a los stilos del public |
|
62
|
62
|
|
|
63
|
63
|
/** Cf definimos constante directa a los css dentro del directorio public_ del framework */ |
|
64
|
|
-define('CSS_PATH', SITE_ROOT . 'public_'.DS.'css' . DS); |
|
|
64
|
+define('CSS_PATH', SITE_ROOT.'public_'.DS.'css'.DS); |
|
65
|
65
|
/** Cf definimos constante directa a los css dentro del directorio public_ del framework */ |
|
66
|
|
-define('IMG_PATH', SITE_ROOT . 'public_'.DS.'img' . DS); |
|
|
66
|
+define('IMG_PATH', SITE_ROOT.'public_'.DS.'img'.DS); |
|
67
|
67
|
/** Cf definimos constante directa a los js dentro del directorio public_ del framework */ |
|
68
|
|
-define('JS_PATH', SITE_ROOT . 'public_'.DS.'js' . DS); |
|
|
68
|
+define('JS_PATH', SITE_ROOT.'public_'.DS.'js'.DS); |
|
69
|
69
|
/** Cf definimos constante directa a las librerias dentro del framework */ |
|
70
|
|
-define('RUTA_LIBS', SITE_ROOT . 'Sistema'.DS.'librerias' . DS); |
|
|
70
|
+define('RUTA_LIBS', SITE_ROOT.'Sistema'.DS.'librerias'.DS); |
|
71
|
71
|
/** Cf definimos constante directa a los ayudantes del framework */ |
|
72
|
|
-define('RUTA_AYUDANTES', SITE_ROOT . 'Sistema'.DS.'ayudantes' . DS); |
|
|
72
|
+define('RUTA_AYUDANTES', SITE_ROOT.'Sistema'.DS.'ayudantes'.DS); |
|
73
|
73
|
|
|
74
|
74
|
/** Cf definimos constante directa a los lenguajes del framework */ |
|
75
|
|
-define('RUTA_LENGUAJES', SITE_ROOT . 'Sistema'.DS.'lenguajes' . DS); |
|
|
75
|
+define('RUTA_LENGUAJES', SITE_ROOT.'Sistema'.DS.'lenguajes'.DS); |
|
76
|
76
|
|
|
77
|
77
|
|
|
78
|
78
|
//LENGUAJES |
|
@@ -80,13 +80,13 @@ discard block |
|
|
block discarded – undo |
|
80
|
80
|
//luego por get capturamos la variable lan al inicio de la aplicacion asi: www.tuapp.com/?lang=de |
|
81
|
81
|
|
|
82
|
82
|
$lang = 'es'; // por defecto el idioma para el app es español puede ser en, bt, de, zh |
|
83
|
|
-if(isSet($_GET['lang'])){ |
|
|
83
|
+if (isSet($_GET['lang'])) { |
|
84
|
84
|
$lang = $_GET['lang']; |
|
85
|
85
|
} |
|
86
|
86
|
//en caso de no cumplir la condicion el $lang va ser "es" |
|
87
|
87
|
|
|
88
|
88
|
//valido que no este creada la sesion ò cookie de lang |
|
89
|
|
-if(!isSet($_SESSION['lang']) || !isSet($_COOKIE['lang'])){ |
|
|
89
|
+if (!isSet($_SESSION['lang']) || !isSet($_COOKIE['lang'])) { |
|
90
|
90
|
// register the session and set the cookie |
|
91
|
91
|
$_SESSION['lang'] = $lang; |
|
92
|
92
|
setcookie('lang', $lang, time() + (3600 * 24 * 30)); |
|
@@ -94,7 +94,7 @@ discard block |
|
|
block discarded – undo |
|
94
|
94
|
|
|
95
|
95
|
$lang_file = 'lang.'.$lang.'.php'; |
|
96
|
96
|
|
|
97
|
|
-include_once RUTA_LENGUAJES . $lang_file; |
|
|
97
|
+include_once RUTA_LENGUAJES.$lang_file; |
|
98
|
98
|
|
|
99
|
99
|
//FIN LENGUAJES |
|
100
|
100
|
|
|
@@ -109,9 +109,9 @@ discard block |
|
|
block discarded – undo |
|
109
|
109
|
|
|
110
|
110
|
# Cargamos la autocarga dinamica y configuraciones |
|
111
|
111
|
//require_once RUTA_NUCLEO . 'Cf_Autocarga.php'; |
|
112
|
|
-require_once RUTA_NUCLEO . 'CFConfiguracion.php'; |
|
|
112
|
+require_once RUTA_NUCLEO.'CFConfiguracion.php'; |
|
113
|
113
|
|
|
114
|
|
-try{ |
|
|
114
|
+try { |
|
115
|
115
|
|
|
116
|
116
|
Nucleo\CFBootstrap::actuar(new Nucleo\CFSolicitud); |
|
117
|
117
|
//CFBootstrap::actuar(new CFSolicitud); |