Skip to content

Commit 2887e5f

Browse files
committed
upload template project CI3 files
1 parent 44b512f commit 2887e5f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+4698
-0
lines changed

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
root = true
4+
5+
[*]
6+
end_of_line = lf
7+
charset = utf-8
8+
indent_style = tab
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
* text=auto
2+
*.* text eol=lf
3+
4+
*.gz binary
5+
*.jpg binary
6+
*.jpeg binary
7+
*.gif binary
8+
*.png binary
9+
*.t3x binary
10+
*.t3d binary
11+
*.exe binary
12+
*.data binary
13+
*.ttf binary
14+
*.eof binary
15+
*.eot binary
16+
*.swf binary
17+
*.mov binary
18+
*.mp4 binary
19+
*.mp3 binary
20+
*.map binary
21+
*.ogg binary
22+
*.flv binary
23+
*.woff binary
24+
*.mwb binary
25+
*.db binary
26+

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# ---> CodeIgniter
2+
*/config/development
3+
*/logs/log-*.php
4+
!*/logs/index.html
5+
*/cache/*
6+
!*/cache/index.html
7+
!*/cache/.htaccess
8+
9+
# ---> SVN
10+
.svn/
11+
12+
*.bak
13+
14+

ENV_CI3

Whitespace-only changes.

ENV_DEVEL

Whitespace-only changes.

license.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
Copyright (c) 2008 - 2011, EllisLab, Inc.
2+
All rights reserved.
3+
4+
This license is a legal agreement between you and EllisLab Inc. for the use
5+
of CodeIgniter Software (the "Software"). By obtaining the Software you
6+
agree to comply with the terms and conditions of this license.
7+
8+
PERMITTED USE
9+
You are permitted to use, copy, modify, and distribute the Software and its
10+
documentation, with or without modification, for any purpose, provided that
11+
the following conditions are met:
12+
13+
1. A copy of this license agreement must be included with the distribution.
14+
15+
2. Redistributions of source code must retain the above copyright notice in
16+
all source code files.
17+
18+
3. Redistributions in binary form must reproduce the above copyright notice
19+
in the documentation and/or other materials provided with the distribution.
20+
21+
4. Any files that have been modified must carry notices stating the nature
22+
of the change and the names of those who changed them.
23+
24+
5. Products derived from the Software must include an acknowledgment that
25+
they are derived from CodeIgniter in their documentation and/or other
26+
materials provided with the distribution.
27+
28+
6. Products derived from the Software may not be called "CodeIgniter",
29+
nor may "CodeIgniter" appear in their name, without prior written
30+
permission from EllisLab, Inc.
31+
32+
INDEMNITY
33+
You agree to indemnify and hold harmless the authors of the Software and
34+
any contributors for any direct, indirect, incidental, or consequential
35+
third-party claims, actions or suits, as well as any related expenses,
36+
liabilities, damages, settlements or fees arising from your use or misuse
37+
of the Software, or a violation of any terms of this license.
38+
39+
DISCLAIMER OF WARRANTY
40+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESSED OR
41+
IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF QUALITY, PERFORMANCE,
42+
NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
43+
44+
LIMITATIONS OF LIABILITY
45+
YOU ASSUME ALL RISK ASSOCIATED WITH THE INSTALLATION AND USE OF THE SOFTWARE.
46+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS OF THE SOFTWARE BE LIABLE
47+
FOR CLAIMS, DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION
48+
WITH THE SOFTWARE. LICENSE HOLDERS ARE SOLELY RESPONSIBLE FOR DETERMINING THE
49+
APPROPRIATENESS OF USE AND ASSUME ALL RISKS ASSOCIATED WITH ITS USE, INCLUDING
50+
BUT NOT LIMITED TO THE RISKS OF PROGRAM ERRORS, DAMAGE TO EQUIPMENT, LOSS OF
51+
DATA OR SOFTWARE PROGRAMS, OR UNAVAILABILITY OR INTERRUPTION OF OPERATIONS.

webappdb/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
Directorio de DB txt
3+
4+
## Base de Datos
5+
6+
La documentacion del sistema se divide en dos partes:
7+
8+
* Documentacion de desarrollo DB: [webappwebdb-README.md](webappwebdb-README.md)
9+
* Documentacion ODBC saint: [odbc-README.md](odbc-README.md)
10+
* Modulacion datos `mproductos` explicado: [oasis_productos.md](oasis_productos.md)
11+
12+
### Diseño
13+
14+
El diseño requiere uso de `mysql-workbench` para visualizar el archivo "mwb" .
15+
16+
* `webappwebdb.png` [webappwebdb.png](webappwebdb.png)
17+
* `webappweb.mwb` [webappweb.mwb](webappweb.mwb)
18+
19+
### Diccionario datos
20+
21+
El diccionario de datos esta incluido en el scrip SQL, oasis no tiene aun:
22+
23+
* `webappwebdb.sql` [webappwebdb.sql](webappwebdb.sql)
24+
25+
### Script SQL
26+
27+
El script se puede ejecutar completo y creara la DB/schema pero no un usuario.
28+
29+
* `webappwebdb.sql` [webappwebdb.sql](webappwebdb.sql)
30+
31+

webappdb/odbc-README.md

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
[webappwebdb-README.md](webappwebdb-README.md)
2+
3+
# ODBC EN general
4+
5+
*"Open Database Connectivity"* `ODBC`, es una especificacion abierta para llmadas SQL desde otros lenguajes de programacion.
6+
y **en php es solo una capa de manejo de las llamadas** por lo que no espere resultados especiales.
7+
**Esto significa que es mejor hacer la mayor parte en codigo php que con trucos sql**.
8+
9+
El proyecto **"webappweb"** se conecta a **DBMS Sybase y SQLserver**, por lo que un ODBC **FreeTDS** o Sybase es necesario.
10+
11+
Una vez cubierto todo este contenido leer y seguir con [webappwebdb-README.md](webappwebdb-README.md)
12+
13+
**NOTA IMPORTANTE** aqui solo se explica relacionado a UNIX/Linux para **otros OS es innecesaria la explicacion si son populares**.
14+
15+
## ODBC installacion y configuracion
16+
17+
`apt-get install unixodbc tdsodbc`
18+
19+
El DSN es el nombre de la conexcion, y se guarda en archivos "odbc.ini"
20+
En linux hay dos alcances de un DSN, por sistema o por usuario:
21+
22+
* si configura el DSN en `/etc/odbc.ini` lo vera todo el mundo.
23+
* si configure el DSN en `~/.odbc.ini` lo vera solo el usuario.
24+
25+
**NOTA:** el usuario del webserver es `www-data` y este no tiene un home por seguridad, por lo que no existe.
26+
27+
### El modulo ODBC inst
28+
29+
Para trabajar con **Oasis** y **Saint** se requiere el "driver" modulo ODBC de **FreeTDS**, este al instalar
30+
se registra en `/etc/odbcinst.ini` para poder usarse como librerias de conectividad, quedando asi aproximadamente:
31+
32+
``` ini
33+
34+
[FreeTDS]
35+
Description= FreeTDS Driver for Linux using guindosers DBs
36+
Driver= /usr/lib/odbc/libtdsodbc.so
37+
Setup= /usr/lib/odbc/libtdsS.so
38+
UsageCount= 1
39+
```
40+
41+
**IMPORTANTE** las rutas de "Driver" dependen de la version de linux si soporta multiarch.
42+
43+
### Configuracion DSN ODBC
44+
45+
Se usa la libreria de acceso `FreeTDS` registrada en el `/etc/odbcinst.ini` para la definicion del DSN,
46+
en el archivo `/etc/odbc.ini` con los parametros de conexcion a la base de datos
47+
48+
Se muestra coneciones a db local en MySQL/MAriaDB, a Nomina en SQLserver y a Oasis en Sybase:
49+
50+
``` ini
51+
[dblocal]
52+
Driver= MySQL
53+
Database= mysql
54+
Server= localhost
55+
Port= 2638
56+
ReadOnly= No
57+
58+
[oasisdb]
59+
Driver= FreeTDS
60+
Database= sybasedemo
61+
Server= 10.10.200.10
62+
Port= 2638
63+
ReadOnly= No
64+
TDS_Version= 5.0
65+
66+
[saintcnx]
67+
Driver= FreeTDS
68+
Database= saintnonmina
69+
Server= 192.168.1.100
70+
Port= 1723
71+
ReadOnly= Yes
72+
TDS_Version= 8.0
73+
```
74+
75+
### Probando en ODBC configurado
76+
77+
El paquete UnixODBC tiene un programa llamado `isql` el cual se puede usar para probar, debe
78+
usarse desde el contexto del usuario, es decir si se configura en un "home" se debe hacer la
79+
llamada del programa desde el usuario y no desde otro usuario o administrador.
80+
81+
**IMPORTANTE** Las credenciales se deben pasar, no toma las del DSN configurado.
82+
83+
``` bash
84+
85+
% isql saintcnx sa saclave
86+
+---------------------------------------+
87+
| Connected! |
88+
| |
89+
| sql-statement |
90+
| help [tablename] |
91+
| quit |
92+
| |
93+
+---------------------------------------+
94+
SQL>select * from users
95+
```
96+
97+
## Usar el DSN en Codeigniter
98+
99+
Debe definirse en el archivo `config/database.php` del directorio de aplicacion, aqui solo se muestran las
100+
primeras 5 lineas de una conexcion, en el archivo esta en las primeras lineas la eplicacion de como se usa
101+
sin mayores problemas..
102+
103+
Cuando se configura el DNS el usuario y clave no sirve guardarlo, siempre debe pasarse en el string de conexcion.
104+
105+
106+
``` php
107+
$db['saintdb']['hostname'] = 'dsn=saintcnx;uid=sa;pwd=saclave';
108+
$db['saintdb']['username'] = 'sa';
109+
$db['saintdb']['password'] = 'saclave';
110+
$db['saintdb']['database'] = 'XX99';
111+
$db['saintdb']['dbdriver'] = 'odbc';
112+
113+
```
114+
115+
De aqui en adelante leer el archivo [webappwebdb-README.md](webappwebdb-README.md).
116+

webappfiles/css/index.html

Whitespace-only changes.

webappfiles/files/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<html>
2+
<head>
3+
<title>403 Forbidden</title>
4+
</head>
5+
<body>
6+
7+
<p>Directory access is forbidden.</p>
8+
9+
</body>
10+
</html>

0 commit comments

Comments
 (0)