@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | $this->command = new Command('foo'); |
| 27 | 27 | $this->command->addArgument('command'); |
| 28 | 28 | $this->command->addArgument('foo'); |
| 29 | - $this->command->setCode(function ($input, $output) { $output->writeln('foo'); }); |
|
| 29 | + $this->command->setCode(function($input, $output) { $output->writeln('foo'); }); |
|
| 30 | 30 | |
| 31 | 31 | $this->tester = new CommandTester($this->command); |
| 32 | 32 | $this->tester->execute(array('foo' => 'bar'), array('interactive' => false, 'decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | $application->setAutoExit(false); |
| 73 | 73 | |
| 74 | 74 | $command = new Command('foo'); |
| 75 | - $command->setCode(function ($input, $output) { $output->writeln('foo'); }); |
|
| 75 | + $command->setCode(function($input, $output) { $output->writeln('foo'); }); |
|
| 76 | 76 | |
| 77 | 77 | $application->add($command); |
| 78 | 78 | |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $output = $this->getOutputStream(StreamOutput::VERBOSITY_NORMAL); |
| 40 | 40 | |
| 41 | 41 | $executed = false; |
| 42 | - $callback = function () use (&$executed) { $executed = true; }; |
|
| 42 | + $callback = function() use (&$executed) { $executed = true; }; |
|
| 43 | 43 | |
| 44 | 44 | $helper->run($output, 'php -r "echo 42;"', null, $callback); |
| 45 | 45 | $this->assertTrue($executed); |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | array('"quoted"', array('quoted'), '->tokenize() parses quoted arguments'), |
| 66 | 66 | array("'quoted'", array('quoted'), '->tokenize() parses quoted arguments'), |
| 67 | 67 | array("'a\rb\nc\td'", array("a\rb\nc\td"), '->tokenize() parses whitespace chars in strings'), |
| 68 | - array("'a'\r'b'\n'c'\t'd'", array('a','b','c','d'), '->tokenize() parses whitespace chars between args as spaces'), |
|
| 68 | + array("'a'\r'b'\n'c'\t'd'", array('a', 'b', 'c', 'd'), '->tokenize() parses whitespace chars between args as spaces'), |
|
| 69 | 69 | array('\"quoted\"', array('"quoted"'), '->tokenize() parses escaped-quoted arguments'), |
| 70 | 70 | array("\'quoted\'", array('\'quoted\''), '->tokenize() parses escaped-quoted arguments'), |
| 71 | 71 | array('-a', array('-a'), '->tokenize() parses short options'), |
@@ -336,7 +336,7 @@ |
||
| 336 | 336 | public function __toString() |
| 337 | 337 | { |
| 338 | 338 | $self = $this; |
| 339 | - $tokens = array_map(function ($token) use ($self) { |
|
| 339 | + $tokens = array_map(function($token) use ($self) { |
|
| 340 | 340 | if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) { |
| 341 | 341 | return $match[1].$self->escapeToken($match[2]); |
| 342 | 342 | } |
@@ -87,9 +87,9 @@ |
||
| 87 | 87 | |
| 88 | 88 | //valido que no este creada la sesion ò cookie de lang |
| 89 | 89 | if(!isSet($_SESSION['lang']) || !isSet($_COOKIE['lang'])){ |
| 90 | - // register the session and set the cookie |
|
| 91 | - $_SESSION['lang'] = $lang; |
|
| 92 | - setcookie('lang', $lang, time() + (3600 * 24 * 30)); |
|
| 90 | + // register the session and set the cookie |
|
| 91 | + $_SESSION['lang'] = $lang; |
|
| 92 | + setcookie('lang', $lang, time() + (3600 * 24 * 30)); |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | $lang_file = 'lang.'.$lang.'.php'; |
@@ -42,37 +42,37 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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); |
@@ -97,6 +97,14 @@ |
||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | |
| 100 | + /** |
|
| 101 | + * @param string $analytics |
|
| 102 | + * @param string $hostbd |
|
| 103 | + * @param string $nombrebd |
|
| 104 | + * @param string $usuariobd |
|
| 105 | + * @param string $clavebd |
|
| 106 | + * @param string $config |
|
| 107 | + */ |
|
| 100 | 108 | public function paso1($proyecto,$analytics,$hostbd,$nombrebd,$usuariobd,$clavebd,$config){ |
| 101 | 109 | |
| 102 | 110 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | //verificamos la version de php en tu servidor web o local |
| 27 | 27 | if (version_compare(PHP_VERSION, '5.3.20', '<')) |
| 28 | 28 | { |
| 29 | - die('Su Hosting tiene una version < a PHP 5.3.20 debes actualizar para esta version de Calima. su version actual de PHP es: '.PHP_VERSION); |
|
| 29 | + die('Su Hosting tiene una version < a PHP 5.3.20 debes actualizar para esta version de Calima. su version actual de PHP es: '.PHP_VERSION); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | private $_analytics; |
| 46 | 46 | public function __construct() { |
| 47 | 47 | parent::__construct(); |
| 48 | - $this->_basedatos=$this->cargaModelo('instalador'); |
|
| 48 | + $this->_basedatos=$this->cargaModelo('instalador'); |
|
| 49 | 49 | |
| 50 | 50 | $this->_ayuda= new Sisayu\CFPHPAyuda; |
| 51 | 51 | } |
@@ -68,31 +68,31 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | public function verificarBd(){ |
| 70 | 70 | |
| 71 | - $proyecto=$_POST['proyecto']; |
|
| 72 | - if(isset($_POST['analytics'])!=''){ |
|
| 71 | + $proyecto=$_POST['proyecto']; |
|
| 72 | + if(isset($_POST['analytics'])!=''){ |
|
| 73 | 73 | $this->_analytics="'".$_POST['analytics']."'"; |
| 74 | - } |
|
| 75 | - $this->_analytics="'"."UA-xxxxxx"."'"; |
|
| 74 | + } |
|
| 75 | + $this->_analytics="'"."UA-xxxxxx"."'"; |
|
| 76 | 76 | |
| 77 | 77 | |
| 78 | - $analytics=$this->_analytics; |
|
| 79 | - $hostbd="'".$_POST['hostbd']."'"; |
|
| 80 | - $nombrebd="'".$_POST['nombrebd']."'"; |
|
| 81 | - $usuariobd="'".$_POST['usuariobd']."'"; |
|
| 82 | - echo $clavebd="'".$_POST['clavebd']."'"; |
|
| 83 | - $config="'".$_POST['config']."'"; |
|
| 78 | + $analytics=$this->_analytics; |
|
| 79 | + $hostbd="'".$_POST['hostbd']."'"; |
|
| 80 | + $nombrebd="'".$_POST['nombrebd']."'"; |
|
| 81 | + $usuariobd="'".$_POST['usuariobd']."'"; |
|
| 82 | + echo $clavebd="'".$_POST['clavebd']."'"; |
|
| 83 | + $config="'".$_POST['config']."'"; |
|
| 84 | 84 | |
| 85 | - $a= $this->_basedatos->verificarBdM($_POST['nombrebd'],$_POST['usuariobd'],$_POST['clavebd']); |
|
| 85 | + $a= $this->_basedatos->verificarBdM($_POST['nombrebd'],$_POST['usuariobd'],$_POST['clavebd']); |
|
| 86 | 86 | |
| 87 | 87 | |
| 88 | 88 | |
| 89 | - if($a){ |
|
| 89 | + if($a){ |
|
| 90 | 90 | |
| 91 | 91 | $this->paso1($proyecto,$analytics,$hostbd,$nombrebd,$usuariobd,$clavebd,$config); |
| 92 | 92 | |
| 93 | - }else{ |
|
| 94 | - $this->_ayuda->redireccionUrl('instalador?error="Los datos que estas ingresando no coniciden con los de la BD"'); |
|
| 95 | - } |
|
| 93 | + }else{ |
|
| 94 | + $this->_ayuda->redireccionUrl('instalador?error="Los datos que estas ingresando no coniciden con los de la BD"'); |
|
| 95 | + } |
|
| 96 | 96 | |
| 97 | 97 | } |
| 98 | 98 | |
@@ -100,10 +100,10 @@ discard block |
||
| 100 | 100 | public function paso1($proyecto,$analytics,$hostbd,$nombrebd,$usuariobd,$clavebd,$config){ |
| 101 | 101 | |
| 102 | 102 | |
| 103 | - echo $proyecto; |
|
| 103 | + echo $proyecto; |
|
| 104 | 104 | |
| 105 | 105 | chmod (RUTA_NUCLEO."CFConfiguracion.php", 0777); |
| 106 | - //chmod($hostbd.$proyecto."Sistema/Nucleo/CFConfiguracion.php", 0755); |
|
| 106 | + //chmod($hostbd.$proyecto."Sistema/Nucleo/CFConfiguracion.php", 0755); |
|
| 107 | 107 | |
| 108 | 108 | $file = fopen(RUTA_NUCLEO."CFConfiguracion.php", "w"); |
| 109 | 109 | |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | fwrite($file, "/* en el controlador concatena la constante con el llamado a la funcion generarCadenaAleatoria() de Cf_PHPSeguridad */" . PHP_EOL); |
| 182 | 182 | fwrite($file, "define('Cf_CSRF_SECRET','Cfbeta');" . PHP_EOL.PHP_EOL); |
| 183 | 183 | |
| 184 | - fwrite($file, "/* Si usted va a utilizar SSL debe de cambiar a true */" . PHP_EOL); |
|
| 184 | + fwrite($file, "/* Si usted va a utilizar SSL debe de cambiar a true */" . PHP_EOL); |
|
| 185 | 185 | fwrite($file, "define('Cf_SESION_PARAMETRO_SEGURO','false');" . PHP_EOL.PHP_EOL); |
| 186 | 186 | |
| 187 | 187 | fwrite($file, "/* #base de datos */" . PHP_EOL. PHP_EOL); |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | fwrite($file, ""); |
| 197 | 197 | fclose($file); |
| 198 | 198 | |
| 199 | - $this->_ayuda->redireccionUrl('instalador/crearBaseDatos'); |
|
| 199 | + $this->_ayuda->redireccionUrl('instalador/crearBaseDatos'); |
|
| 200 | 200 | |
| 201 | 201 | } |
| 202 | 202 | |
@@ -45,19 +45,19 @@ discard block |
||
| 45 | 45 | private $_analytics; |
| 46 | 46 | public function __construct() { |
| 47 | 47 | parent::__construct(); |
| 48 | - $this->_basedatos=$this->cargaModelo('instalador'); |
|
| 48 | + $this->_basedatos = $this->cargaModelo('instalador'); |
|
| 49 | 49 | |
| 50 | - $this->_ayuda= new Sisayu\CFPHPAyuda; |
|
| 50 | + $this->_ayuda = new Sisayu\CFPHPAyuda; |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | - public function index(){ |
|
| 54 | - $this->_vista->titulo="Instalador de Inicio App"; |
|
| 55 | - $this->_vista->imprimirVista('index','instalador'); |
|
| 53 | + public function index() { |
|
| 54 | + $this->_vista->titulo = "Instalador de Inicio App"; |
|
| 55 | + $this->_vista->imprimirVista('index', 'instalador'); |
|
| 56 | 56 | |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | //metodo para crear la base de datos de inicio de proyecto |
| 60 | - public function crearBaseDatos(){ |
|
| 60 | + public function crearBaseDatos() { |
|
| 61 | 61 | |
| 62 | 62 | |
| 63 | 63 | $this->_basedatos->crearTablas(); |
@@ -66,132 +66,132 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | - public function verificarBd(){ |
|
| 69 | + public function verificarBd() { |
|
| 70 | 70 | |
| 71 | - $proyecto=$_POST['proyecto']; |
|
| 72 | - if(isset($_POST['analytics'])!=''){ |
|
| 73 | - $this->_analytics="'".$_POST['analytics']."'"; |
|
| 71 | + $proyecto = $_POST['proyecto']; |
|
| 72 | + if (isset($_POST['analytics']) != '') { |
|
| 73 | + $this->_analytics = "'".$_POST['analytics']."'"; |
|
| 74 | 74 | } |
| 75 | - $this->_analytics="'"."UA-xxxxxx"."'"; |
|
| 75 | + $this->_analytics = "'"."UA-xxxxxx"."'"; |
|
| 76 | 76 | |
| 77 | 77 | |
| 78 | - $analytics=$this->_analytics; |
|
| 79 | - $hostbd="'".$_POST['hostbd']."'"; |
|
| 80 | - $nombrebd="'".$_POST['nombrebd']."'"; |
|
| 81 | - $usuariobd="'".$_POST['usuariobd']."'"; |
|
| 82 | - echo $clavebd="'".$_POST['clavebd']."'"; |
|
| 83 | - $config="'".$_POST['config']."'"; |
|
| 78 | + $analytics = $this->_analytics; |
|
| 79 | + $hostbd = "'".$_POST['hostbd']."'"; |
|
| 80 | + $nombrebd = "'".$_POST['nombrebd']."'"; |
|
| 81 | + $usuariobd = "'".$_POST['usuariobd']."'"; |
|
| 82 | + echo $clavebd = "'".$_POST['clavebd']."'"; |
|
| 83 | + $config = "'".$_POST['config']."'"; |
|
| 84 | 84 | |
| 85 | - $a= $this->_basedatos->verificarBdM($_POST['nombrebd'],$_POST['usuariobd'],$_POST['clavebd']); |
|
| 85 | + $a = $this->_basedatos->verificarBdM($_POST['nombrebd'], $_POST['usuariobd'], $_POST['clavebd']); |
|
| 86 | 86 | |
| 87 | 87 | |
| 88 | 88 | |
| 89 | - if($a){ |
|
| 89 | + if ($a) { |
|
| 90 | 90 | |
| 91 | - $this->paso1($proyecto,$analytics,$hostbd,$nombrebd,$usuariobd,$clavebd,$config); |
|
| 91 | + $this->paso1($proyecto, $analytics, $hostbd, $nombrebd, $usuariobd, $clavebd, $config); |
|
| 92 | 92 | |
| 93 | - }else{ |
|
| 93 | + } else { |
|
| 94 | 94 | $this->_ayuda->redireccionUrl('instalador?error="Los datos que estas ingresando no coniciden con los de la BD"'); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | |
| 100 | - public function paso1($proyecto,$analytics,$hostbd,$nombrebd,$usuariobd,$clavebd,$config){ |
|
| 100 | + public function paso1($proyecto, $analytics, $hostbd, $nombrebd, $usuariobd, $clavebd, $config) { |
|
| 101 | 101 | |
| 102 | 102 | |
| 103 | 103 | echo $proyecto; |
| 104 | 104 | |
| 105 | - chmod (RUTA_NUCLEO."CFConfiguracion.php", 0777); |
|
| 105 | + chmod(RUTA_NUCLEO."CFConfiguracion.php", 0777); |
|
| 106 | 106 | //chmod($hostbd.$proyecto."Sistema/Nucleo/CFConfiguracion.php", 0755); |
| 107 | 107 | |
| 108 | 108 | $file = fopen(RUTA_NUCLEO."CFConfiguracion.php", "w"); |
| 109 | 109 | |
| 110 | - fwrite($file, "<?php " . PHP_EOL.PHP_EOL); |
|
| 110 | + fwrite($file, "<?php ".PHP_EOL.PHP_EOL); |
|
| 111 | 111 | |
| 112 | - fwrite($file, "/* inicio la configuracion*/" . PHP_EOL); |
|
| 113 | - fwrite($file, "define('Cf_CONFIG_INICIO', $config);" . PHP_EOL.PHP_EOL); |
|
| 112 | + fwrite($file, "/* inicio la configuracion*/".PHP_EOL); |
|
| 113 | + fwrite($file, "define('Cf_CONFIG_INICIO', $config);".PHP_EOL.PHP_EOL); |
|
| 114 | 114 | |
| 115 | - fwrite($file, "/* Defino zona horaria*/" . PHP_EOL); |
|
| 116 | - fwrite($file, "date_default_timezone_set('America/Bogota');" . PHP_EOL.PHP_EOL); |
|
| 115 | + fwrite($file, "/* Defino zona horaria*/".PHP_EOL); |
|
| 116 | + fwrite($file, "date_default_timezone_set('America/Bogota');".PHP_EOL.PHP_EOL); |
|
| 117 | 117 | |
| 118 | 118 | |
| 119 | - fwrite($file, "/* Define una cuenta de correo para uso del app */" . PHP_EOL); |
|
| 120 | - fwrite($file, "define('DESTINO_EMAIL', '[email protected]');" . PHP_EOL.PHP_EOL); |
|
| 119 | + fwrite($file, "/* Define una cuenta de correo para uso del app */".PHP_EOL); |
|
| 120 | + fwrite($file, "define('DESTINO_EMAIL', '[email protected]');".PHP_EOL.PHP_EOL); |
|
| 121 | 121 | |
| 122 | - fwrite($file, "/* Defino el formato de fecha */" . PHP_EOL); |
|
| 123 | - fwrite($file, "define('Cf_FORMATO_FECHA', 'l, d F Y');" . PHP_EOL.PHP_EOL); |
|
| 122 | + fwrite($file, "/* Defino el formato de fecha */".PHP_EOL); |
|
| 123 | + fwrite($file, "define('Cf_FORMATO_FECHA', 'l, d F Y');".PHP_EOL.PHP_EOL); |
|
| 124 | 124 | |
| 125 | - fwrite($file, "/* CalimaFramework clave de licencia */" . PHP_EOL); |
|
| 126 | - fwrite($file, "define('Cf_LICENSE', 'Cf-O17N-JHK8-TDJL-B5AO-8WKA');" . PHP_EOL.PHP_EOL); |
|
| 125 | + fwrite($file, "/* CalimaFramework clave de licencia */".PHP_EOL); |
|
| 126 | + fwrite($file, "define('Cf_LICENSE', 'Cf-O17N-JHK8-TDJL-B5AO-8WKA');".PHP_EOL.PHP_EOL); |
|
| 127 | 127 | |
| 128 | - fwrite($file, "/* mensajes de warnin */" . PHP_EOL); |
|
| 129 | - fwrite($file, "define('CF_DEBUG', TRUE);" . PHP_EOL.PHP_EOL); |
|
| 128 | + fwrite($file, "/* mensajes de warnin */".PHP_EOL); |
|
| 129 | + fwrite($file, "define('CF_DEBUG', TRUE);".PHP_EOL.PHP_EOL); |
|
| 130 | 130 | |
| 131 | - fwrite($file, "/* Idioma local */" . PHP_EOL); |
|
| 132 | - fwrite($file, "define('CF_LOCALE', 'es_ES');" . PHP_EOL.PHP_EOL); |
|
| 131 | + fwrite($file, "/* Idioma local */".PHP_EOL); |
|
| 132 | + fwrite($file, "define('CF_LOCALE', 'es_ES');".PHP_EOL.PHP_EOL); |
|
| 133 | 133 | |
| 134 | 134 | |
| 135 | - fwrite($file, "/* Create una cuenta con google analytics y agrega el UA en la constante */" . PHP_EOL); |
|
| 136 | - fwrite($file, "define('CF_ANALYTICS', $analytics);" . PHP_EOL.PHP_EOL); |
|
| 135 | + fwrite($file, "/* Create una cuenta con google analytics y agrega el UA en la constante */".PHP_EOL); |
|
| 136 | + fwrite($file, "define('CF_ANALYTICS', $analytics);".PHP_EOL.PHP_EOL); |
|
| 137 | 137 | |
| 138 | - fwrite($file, "/* con la siguiente constante podras crear una ip fija de tu empresa para hacer " . PHP_EOL); |
|
| 139 | - fwrite($file, "* pruebas en tu entorno de red basado en tu ip que te ofrece tu proveedor de servicio" . PHP_EOL); |
|
| 140 | - fwrite($file, "*/" . PHP_EOL); |
|
| 141 | - fwrite($file, "define('Cf_IPPRUEBAS', 'x.x.x.x');" . PHP_EOL.PHP_EOL); |
|
| 138 | + fwrite($file, "/* con la siguiente constante podras crear una ip fija de tu empresa para hacer ".PHP_EOL); |
|
| 139 | + fwrite($file, "* pruebas en tu entorno de red basado en tu ip que te ofrece tu proveedor de servicio".PHP_EOL); |
|
| 140 | + fwrite($file, "*/".PHP_EOL); |
|
| 141 | + fwrite($file, "define('Cf_IPPRUEBAS', 'x.x.x.x');".PHP_EOL.PHP_EOL); |
|
| 142 | 142 | |
| 143 | 143 | |
| 144 | - fwrite($file, "/* Transladamos a formato local */" . PHP_EOL); |
|
| 145 | - fwrite($file, "define('CF_FECHA_FORMATO_LOCAL', '%A, %d %B %G');" . PHP_EOL.PHP_EOL); |
|
| 144 | + fwrite($file, "/* Transladamos a formato local */".PHP_EOL); |
|
| 145 | + fwrite($file, "define('CF_FECHA_FORMATO_LOCAL', '%A, %d %B %G');".PHP_EOL.PHP_EOL); |
|
| 146 | 146 | |
| 147 | - fwrite($file, "/* Translatable time format */" . PHP_EOL); |
|
| 148 | - fwrite($file, "define('CF_LOCALE_TIME_FORMAT', ' %T');" . PHP_EOL.PHP_EOL); |
|
| 147 | + fwrite($file, "/* Translatable time format */".PHP_EOL); |
|
| 148 | + fwrite($file, "define('CF_LOCALE_TIME_FORMAT', ' %T');".PHP_EOL.PHP_EOL); |
|
| 149 | 149 | |
| 150 | - fwrite($file, "/* Por defecto almacenamos los datos de la aplicacion. */" . PHP_EOL); |
|
| 151 | - fwrite($file, "define('CF_PATH_DATA', dirname(__FILE__) . '/Cf-data');" . PHP_EOL.PHP_EOL); |
|
| 150 | + fwrite($file, "/* Por defecto almacenamos los datos de la aplicacion. */".PHP_EOL); |
|
| 151 | + fwrite($file, "define('CF_PATH_DATA', dirname(__FILE__) . '/Cf-data');".PHP_EOL.PHP_EOL); |
|
| 152 | 152 | |
| 153 | - fwrite($file, "#Configuracion Basica" . PHP_EOL.PHP_EOL); |
|
| 153 | + fwrite($file, "#Configuracion Basica".PHP_EOL.PHP_EOL); |
|
| 154 | 154 | |
| 155 | - fwrite($file, "/* La siguiente CONSTANTE permite el apuntapiento para archivos js, css, imagenes desde la vista hacia el directorio _public */" . PHP_EOL); |
|
| 156 | - fwrite($file, "define('Cf_BASE_URL', 'http://localhost$proyecto');" . PHP_EOL.PHP_EOL); |
|
| 155 | + fwrite($file, "/* La siguiente CONSTANTE permite el apuntapiento para archivos js, css, imagenes desde la vista hacia el directorio _public */".PHP_EOL); |
|
| 156 | + fwrite($file, "define('Cf_BASE_URL', 'http://localhost$proyecto');".PHP_EOL.PHP_EOL); |
|
| 157 | 157 | |
| 158 | - fwrite($file, "/* definimos un controlador inicial en nuestro proyecto */" . PHP_EOL); |
|
| 159 | - fwrite($file, "define('CONTROLADOR_INICIAL', 'index');" . PHP_EOL.PHP_EOL); |
|
| 158 | + fwrite($file, "/* definimos un controlador inicial en nuestro proyecto */".PHP_EOL); |
|
| 159 | + fwrite($file, "define('CONTROLADOR_INICIAL', 'index');".PHP_EOL.PHP_EOL); |
|
| 160 | 160 | |
| 161 | - fwrite($file, "/* Sedefine una CONSTANTE al directorio adicionales en la vista */" . PHP_EOL); |
|
| 162 | - fwrite($file, "define('ADICIONALES_VISTA', 'adicionales');" . PHP_EOL.PHP_EOL); |
|
| 161 | + fwrite($file, "/* Sedefine una CONSTANTE al directorio adicionales en la vista */".PHP_EOL); |
|
| 162 | + fwrite($file, "define('ADICIONALES_VISTA', 'adicionales');".PHP_EOL.PHP_EOL); |
|
| 163 | 163 | |
| 164 | - fwrite($file, "/* Definimos una CONSTANTE como nombre de aplicacion */" . PHP_EOL); |
|
| 165 | - fwrite($file, "define('CF_AP_NOMBRE', 'CalimaFramework');" . PHP_EOL.PHP_EOL); |
|
| 164 | + fwrite($file, "/* Definimos una CONSTANTE como nombre de aplicacion */".PHP_EOL); |
|
| 165 | + fwrite($file, "define('CF_AP_NOMBRE', 'CalimaFramework');".PHP_EOL.PHP_EOL); |
|
| 166 | 166 | |
| 167 | - fwrite($file, "/* Definimos un Slogan para la aplicacion web */" . PHP_EOL); |
|
| 168 | - fwrite($file, "define('CF_AP_SLOGAN', 'Tu Framework php MVC hispano ');" . PHP_EOL.PHP_EOL); |
|
| 167 | + fwrite($file, "/* Definimos un Slogan para la aplicacion web */".PHP_EOL); |
|
| 168 | + fwrite($file, "define('CF_AP_SLOGAN', 'Tu Framework php MVC hispano ');".PHP_EOL.PHP_EOL); |
|
| 169 | 169 | |
| 170 | - fwrite($file, "/* Empresa de la aplicacion */" . PHP_EOL); |
|
| 171 | - fwrite($file, "define('CF_AP_EMPRESA', 'www.webcol.net');" . PHP_EOL.PHP_EOL); |
|
| 170 | + fwrite($file, "/* Empresa de la aplicacion */".PHP_EOL); |
|
| 171 | + fwrite($file, "define('CF_AP_EMPRESA', 'www.webcol.net');".PHP_EOL.PHP_EOL); |
|
| 172 | 172 | |
| 173 | - fwrite($file, "/* Creditos de la aplicacion */" . PHP_EOL); |
|
| 174 | - fwrite($file, "define('CF_AP_CREDITOS', 'CopyLeft 2015 Debeloped by www.webcol.net');" . PHP_EOL.PHP_EOL); |
|
| 173 | + fwrite($file, "/* Creditos de la aplicacion */".PHP_EOL); |
|
| 174 | + fwrite($file, "define('CF_AP_CREDITOS', 'CopyLeft 2015 Debeloped by www.webcol.net');".PHP_EOL.PHP_EOL); |
|
| 175 | 175 | |
| 176 | - fwrite($file, "#webcol seguridad" . PHP_EOL. PHP_EOL); |
|
| 176 | + fwrite($file, "#webcol seguridad".PHP_EOL.PHP_EOL); |
|
| 177 | 177 | |
| 178 | - fwrite($file, "/* Definimos un indice de clave para concatenar en encriptacion de datos */" . PHP_EOL); |
|
| 179 | - fwrite($file, "define('Cf_KEY_MD5', 'P0L1');" . PHP_EOL.PHP_EOL); |
|
| 178 | + fwrite($file, "/* Definimos un indice de clave para concatenar en encriptacion de datos */".PHP_EOL); |
|
| 179 | + fwrite($file, "define('Cf_KEY_MD5', 'P0L1');".PHP_EOL.PHP_EOL); |
|
| 180 | 180 | |
| 181 | - fwrite($file, "/* en el controlador concatena la constante con el llamado a la funcion generarCadenaAleatoria() de Cf_PHPSeguridad */" . PHP_EOL); |
|
| 182 | - fwrite($file, "define('Cf_CSRF_SECRET','Cfbeta');" . PHP_EOL.PHP_EOL); |
|
| 181 | + fwrite($file, "/* en el controlador concatena la constante con el llamado a la funcion generarCadenaAleatoria() de Cf_PHPSeguridad */".PHP_EOL); |
|
| 182 | + fwrite($file, "define('Cf_CSRF_SECRET','Cfbeta');".PHP_EOL.PHP_EOL); |
|
| 183 | 183 | |
| 184 | - fwrite($file, "/* Si usted va a utilizar SSL debe de cambiar a true */" . PHP_EOL); |
|
| 185 | - fwrite($file, "define('Cf_SESION_PARAMETRO_SEGURO','false');" . PHP_EOL.PHP_EOL); |
|
| 184 | + fwrite($file, "/* Si usted va a utilizar SSL debe de cambiar a true */".PHP_EOL); |
|
| 185 | + fwrite($file, "define('Cf_SESION_PARAMETRO_SEGURO','false');".PHP_EOL.PHP_EOL); |
|
| 186 | 186 | |
| 187 | - fwrite($file, "/* #base de datos */" . PHP_EOL. PHP_EOL); |
|
| 187 | + fwrite($file, "/* #base de datos */".PHP_EOL.PHP_EOL); |
|
| 188 | 188 | |
| 189 | - fwrite($file, "/* Configuracion de tu base de datos */" . PHP_EOL); |
|
| 190 | - fwrite($file, "define('CF_BD_HOST', $hostbd);" . PHP_EOL); |
|
| 191 | - fwrite($file, "define('CF_BD_NOMBRE', $nombrebd);" . PHP_EOL); |
|
| 192 | - fwrite($file, "define('CF_BD_USUARIO', $usuariobd);" . PHP_EOL); |
|
| 193 | - fwrite($file, "define('CF_BD_CLAVE', $clavebd);" . PHP_EOL); |
|
| 194 | - fwrite($file, "define('CF_BD_CHAR', 'utf8');" . PHP_EOL); |
|
| 189 | + fwrite($file, "/* Configuracion de tu base de datos */".PHP_EOL); |
|
| 190 | + fwrite($file, "define('CF_BD_HOST', $hostbd);".PHP_EOL); |
|
| 191 | + fwrite($file, "define('CF_BD_NOMBRE', $nombrebd);".PHP_EOL); |
|
| 192 | + fwrite($file, "define('CF_BD_USUARIO', $usuariobd);".PHP_EOL); |
|
| 193 | + fwrite($file, "define('CF_BD_CLAVE', $clavebd);".PHP_EOL); |
|
| 194 | + fwrite($file, "define('CF_BD_CHAR', 'utf8');".PHP_EOL); |
|
| 195 | 195 | fwrite($file, "define('CF_BD_CONECTOR', 'mysql');"); |
| 196 | 196 | fwrite($file, ""); |
| 197 | 197 | fclose($file); |
@@ -90,7 +90,7 @@ |
||
| 90 | 90 | |
| 91 | 91 | $this->paso1($proyecto,$analytics,$hostbd,$nombrebd,$usuariobd,$clavebd,$config); |
| 92 | 92 | |
| 93 | - }else{ |
|
| 93 | + } else{ |
|
| 94 | 94 | $this->_ayuda->redireccionUrl('instalador?error="Los datos que estas ingresando no coniciden con los de la BD"'); |
| 95 | 95 | } |
| 96 | 96 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | define('CF_LOCALE_TIME_FORMAT', ' %T'); |
| 37 | 37 | |
| 38 | 38 | /* Por defecto almacenamos los datos de la aplicacion. */ |
| 39 | -define('CF_PATH_DATA', dirname(__FILE__) . '/Cf-data'); |
|
| 39 | +define('CF_PATH_DATA', dirname(__FILE__).'/Cf-data'); |
|
| 40 | 40 | |
| 41 | 41 | #Configuracion Basica |
| 42 | 42 | |
@@ -67,10 +67,10 @@ discard block |
||
| 67 | 67 | define('Cf_KEY_MD5', 'P0L1'); |
| 68 | 68 | |
| 69 | 69 | /* en el controlador concatena la constante con el llamado a la funcion generarCadenaAleatoria() de Cf_PHPSeguridad */ |
| 70 | -define('Cf_CSRF_SECRET','Cfbeta'); |
|
| 70 | +define('Cf_CSRF_SECRET', 'Cfbeta'); |
|
| 71 | 71 | |
| 72 | 72 | /* Si usted va a utilizar SSL debe de cambiar a true */ |
| 73 | -define('Cf_SESION_PARAMETRO_SEGURO','false'); |
|
| 73 | +define('Cf_SESION_PARAMETRO_SEGURO', 'false'); |
|
| 74 | 74 | |
| 75 | 75 | /* #base de datos */ |
| 76 | 76 | |