Alba-desarrollo
Threads by month
- ----- 2026 -----
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
July 2007
- 7 participants
- 103 discussions
SVN Alba r4871 - in prosistem/alba/trunk/alba: config data/sql lib/model/map lib/model/om
by commits@pressenter.com.ar 25 Jul '07
by commits@pressenter.com.ar 25 Jul '07
25 Jul '07
Author: josx
Date: 2007-07-25 13:43:37 -0300 (Wed, 25 Jul 2007)
New Revision: 4871
Modified:
prosistem/alba/trunk/alba/config/schema.yml
prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql
prosistem/alba/trunk/alba/data/sql/schema.sql
prosistem/alba/trunk/alba/lib/model/map/RelDivisionActividadDocenteMapBuilder.php
prosistem/alba/trunk/alba/lib/model/om/BaseActividad.php
prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php
prosistem/alba/trunk/alba/lib/model/om/BaseDocente.php
prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php
prosistem/alba/trunk/alba/lib/model/om/BaseRelDivisionActividadDocente.php
prosistem/alba/trunk/alba/lib/model/om/BaseRelDivisionActividadDocentePeer.php
prosistem/alba/trunk/alba/lib/model/om/BaseRepeticion.php
Log:
Cambios al esquema: agregar Delete on Cascade para las tablas que estan relacionadas con los eventos
Modified: prosistem/alba/trunk/alba/config/schema.yml
===================================================================
--- prosistem/alba/trunk/alba/config/schema.yml 2007-07-25 16:28:14 UTC (rev 4870)
+++ prosistem/alba/trunk/alba/config/schema.yml 2007-07-25 16:43:37 UTC (rev 4871)
@@ -1507,25 +1507,7 @@
default: 0
foreignTable: evento
foreignReference: id
- fk_repeticion_id:
- type: integer
- size: 11
- required: false
- default: 0
- foreignTable: repeticion
- foreignReference: id
- fecha_inicio:
- type: timestamp
- required: true
- fecha_fin:
- type: timestamp
- required: true
- hora_inicio:
- type: time
- required: true
- hora_fin:
- type: time
- required: true
+ onDelete: cascade
docente:
_attributes:
idMethod: native
@@ -1692,6 +1674,7 @@
primaryKey: true
foreignTable: evento
foreignReference: id
+ onDelete: cascade
feriado:
_attributes:
idMethod: native
@@ -1746,6 +1729,7 @@
default: 0
foreignTable: evento
foreignReference: id
+ onDelete: cascade
fk_establecimiento_id:
type: INTEGER
required: true
Modified: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql 2007-07-25 16:28:14 UTC (rev 4870)
+++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql 2007-07-25 16:43:37 UTC (rev 4871)
@@ -76,5 +76,15 @@
ALTER TABLE `rel_division_actividad_docente` DROP `fk_repeticion_id` , DROP `fecha_inicio`, DROP `fecha_fin`, DROP `hora_inicio`, DROP `hora_fin`;
+ALTER TABLE rel_division_actividad_docente DROP FOREIGN KEY `fk_evento_id`;
+ALTER TABLE horarioescolar DROP FOREIGN KEY `fk_evento_id`;
+ALTER TABLE docente_horario DROP FOREIGN KEY `fk_evento_id`;
+
+ALTER TABLE `rel_division_actividad_docente` ADD CONSTRAINT `rel_division_actividad_docente_FK_4` FOREIGN KEY (`fk_evento_id`) REFERENCES `evento` (`id`) ON DELETE CASCADE;
+
+ALTER TABLE `horarioescolar` ADD CONSTRAINT `horarioescolar_FK_1` FOREIGN KEY (`fk_evento_id`) REFERENCES `evento` (`id`) ON DELETE CASCADE;
+
+ALTER TABLE `docente_horario` ADD CONSTRAINT `docente_horario_FK_2` FOREIGN KEY (`fk_evento_id`) REFERENCES `evento` (`id`) ON DELETE CASCADE;
+
SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/data/sql/schema.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/schema.sql 2007-07-25 16:28:14 UTC (rev 4870)
+++ prosistem/alba/trunk/alba/data/sql/schema.sql 2007-07-25 16:43:37 UTC (rev 4871)
@@ -1109,11 +1109,6 @@
`fk_actividad_id` INTEGER(11) default 0 NOT NULL,
`fk_docente_id` INTEGER(11) default 0,
`fk_evento_id` INTEGER(11) default 0,
- `fk_repeticion_id` INTEGER(11) default 0,
- `fecha_inicio` DATETIME NOT NULL,
- `fecha_fin` DATETIME NOT NULL,
- `hora_inicio` TIME NOT NULL,
- `hora_fin` TIME NOT NULL,
PRIMARY KEY (`id`),
INDEX `rel_division_actividad_docente_FI_1` (`fk_division_id`),
CONSTRAINT `rel_division_actividad_docente_FK_1`
@@ -1130,11 +1125,8 @@
INDEX `rel_division_actividad_docente_FI_4` (`fk_evento_id`),
CONSTRAINT `rel_division_actividad_docente_FK_4`
FOREIGN KEY (`fk_evento_id`)
- REFERENCES `evento` (`id`),
- INDEX `rel_division_actividad_docente_FI_5` (`fk_repeticion_id`),
- CONSTRAINT `rel_division_actividad_docente_FK_5`
- FOREIGN KEY (`fk_repeticion_id`)
- REFERENCES `repeticion` (`id`)
+ REFERENCES `evento` (`id`)
+ ON DELETE CASCADE
)Type=InnoDB;
#-----------------------------------------------------------------------------
@@ -1254,6 +1246,7 @@
CONSTRAINT `docente_horario_FK_2`
FOREIGN KEY (`fk_evento_id`)
REFERENCES `evento` (`id`)
+ ON DELETE CASCADE
)Type=InnoDB;
#-----------------------------------------------------------------------------
@@ -1298,7 +1291,8 @@
INDEX `horarioescolar_FI_1` (`fk_evento_id`),
CONSTRAINT `horarioescolar_FK_1`
FOREIGN KEY (`fk_evento_id`)
- REFERENCES `evento` (`id`),
+ REFERENCES `evento` (`id`)
+ ON DELETE CASCADE,
INDEX `horarioescolar_FI_2` (`fk_establecimiento_id`),
CONSTRAINT `horarioescolar_FK_2`
FOREIGN KEY (`fk_establecimiento_id`)
Modified: prosistem/alba/trunk/alba/lib/model/map/RelDivisionActividadDocenteMapBuilder.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/map/RelDivisionActividadDocenteMapBuilder.php 2007-07-25 16:28:14 UTC (rev 4870)
+++ prosistem/alba/trunk/alba/lib/model/map/RelDivisionActividadDocenteMapBuilder.php 2007-07-25 16:43:37 UTC (rev 4871)
@@ -42,15 +42,5 @@
$tMap->addForeignKey('FK_EVENTO_ID', 'FkEventoId', 'int', CreoleTypes::INTEGER, 'evento', 'ID', false, 11);
- $tMap->addForeignKey('FK_REPETICION_ID', 'FkRepeticionId', 'int', CreoleTypes::INTEGER, 'repeticion', 'ID', false, 11);
-
- $tMap->addColumn('FECHA_INICIO', 'FechaInicio', 'int', CreoleTypes::TIMESTAMP, true, null);
-
- $tMap->addColumn('FECHA_FIN', 'FechaFin', 'int', CreoleTypes::TIMESTAMP, true, null);
-
- $tMap->addColumn('HORA_INICIO', 'HoraInicio', 'int', CreoleTypes::TIME, true, null);
-
- $tMap->addColumn('HORA_FIN', 'HoraFin', 'int', CreoleTypes::TIME, true, null);
-
}
}
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseActividad.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseActividad.php 2007-07-25 16:28:14 UTC (rev 4870)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseActividad.php 2007-07-25 16:43:37 UTC (rev 4871)
@@ -1211,42 +1211,7 @@
return $this->collRelDivisionActividadDocentes;
}
-
- public function getRelDivisionActividadDocentesJoinRepeticion($criteria = null, $con = null)
- {
- include_once 'lib/model/om/BaseRelDivisionActividadDocentePeer.php';
- if ($criteria === null) {
- $criteria = new Criteria();
- }
- elseif ($criteria instanceof Criteria)
- {
- $criteria = clone $criteria;
- }
-
- if ($this->collRelDivisionActividadDocentes === null) {
- if ($this->isNew()) {
- $this->collRelDivisionActividadDocentes = array();
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID, $this->getId());
-
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinRepeticion($criteria, $con);
- }
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID, $this->getId());
-
- if (!isset($this->lastRelDivisionActividadDocenteCriteria) || !$this->lastRelDivisionActividadDocenteCriteria->equals($criteria)) {
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinRepeticion($criteria, $con);
- }
- }
- $this->lastRelDivisionActividadDocenteCriteria = $criteria;
-
- return $this->collRelDivisionActividadDocentes;
- }
-
-
public function initRelActividadDocentes()
{
if ($this->collRelActividadDocentes === null) {
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php 2007-07-25 16:28:14 UTC (rev 4870)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseDivision.php 2007-07-25 16:43:37 UTC (rev 4871)
@@ -871,39 +871,4 @@
return $this->collRelDivisionActividadDocentes;
}
-
-
- public function getRelDivisionActividadDocentesJoinRepeticion($criteria = null, $con = null)
- {
- include_once 'lib/model/om/BaseRelDivisionActividadDocentePeer.php';
- if ($criteria === null) {
- $criteria = new Criteria();
- }
- elseif ($criteria instanceof Criteria)
- {
- $criteria = clone $criteria;
- }
-
- if ($this->collRelDivisionActividadDocentes === null) {
- if ($this->isNew()) {
- $this->collRelDivisionActividadDocentes = array();
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_DIVISION_ID, $this->getId());
-
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinRepeticion($criteria, $con);
- }
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_DIVISION_ID, $this->getId());
-
- if (!isset($this->lastRelDivisionActividadDocenteCriteria) || !$this->lastRelDivisionActividadDocenteCriteria->equals($criteria)) {
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinRepeticion($criteria, $con);
- }
- }
- $this->lastRelDivisionActividadDocenteCriteria = $criteria;
-
- return $this->collRelDivisionActividadDocentes;
- }
-
}
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseDocente.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseDocente.php 2007-07-25 16:28:14 UTC (rev 4870)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseDocente.php 2007-07-25 16:43:37 UTC (rev 4871)
@@ -1318,42 +1318,7 @@
return $this->collRelDivisionActividadDocentes;
}
-
- public function getRelDivisionActividadDocentesJoinRepeticion($criteria = null, $con = null)
- {
- include_once 'lib/model/om/BaseRelDivisionActividadDocentePeer.php';
- if ($criteria === null) {
- $criteria = new Criteria();
- }
- elseif ($criteria instanceof Criteria)
- {
- $criteria = clone $criteria;
- }
-
- if ($this->collRelDivisionActividadDocentes === null) {
- if ($this->isNew()) {
- $this->collRelDivisionActividadDocentes = array();
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_DOCENTE_ID, $this->getId());
-
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinRepeticion($criteria, $con);
- }
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_DOCENTE_ID, $this->getId());
-
- if (!isset($this->lastRelDivisionActividadDocenteCriteria) || !$this->lastRelDivisionActividadDocenteCriteria->equals($criteria)) {
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinRepeticion($criteria, $con);
- }
- }
- $this->lastRelDivisionActividadDocenteCriteria = $criteria;
-
- return $this->collRelDivisionActividadDocentes;
- }
-
-
public function initRelDocenteEstablecimientos()
{
if ($this->collRelDocenteEstablecimientos === null) {
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php 2007-07-25 16:28:14 UTC (rev 4870)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseEvento.php 2007-07-25 16:43:37 UTC (rev 4871)
@@ -914,42 +914,7 @@
return $this->collRelDivisionActividadDocentes;
}
-
- public function getRelDivisionActividadDocentesJoinRepeticion($criteria = null, $con = null)
- {
- include_once 'lib/model/om/BaseRelDivisionActividadDocentePeer.php';
- if ($criteria === null) {
- $criteria = new Criteria();
- }
- elseif ($criteria instanceof Criteria)
- {
- $criteria = clone $criteria;
- }
-
- if ($this->collRelDivisionActividadDocentes === null) {
- if ($this->isNew()) {
- $this->collRelDivisionActividadDocentes = array();
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_EVENTO_ID, $this->getId());
-
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinRepeticion($criteria, $con);
- }
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_EVENTO_ID, $this->getId());
-
- if (!isset($this->lastRelDivisionActividadDocenteCriteria) || !$this->lastRelDivisionActividadDocenteCriteria->equals($criteria)) {
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinRepeticion($criteria, $con);
- }
- }
- $this->lastRelDivisionActividadDocenteCriteria = $criteria;
-
- return $this->collRelDivisionActividadDocentes;
- }
-
-
public function initDocenteHorarios()
{
if ($this->collDocenteHorarios === null) {
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseRelDivisionActividadDocente.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseRelDivisionActividadDocente.php 2007-07-25 16:28:14 UTC (rev 4870)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseRelDivisionActividadDocente.php 2007-07-25 16:43:37 UTC (rev 4871)
@@ -27,27 +27,7 @@
protected $fk_evento_id = 0;
-
- protected $fk_repeticion_id = 0;
-
-
-
- protected $fecha_inicio;
-
-
-
- protected $fecha_fin;
-
-
-
- protected $hora_inicio;
-
-
-
- protected $hora_fin;
-
-
protected $aDivision;
@@ -60,9 +40,6 @@
protected $aEvento;
- protected $aRepeticion;
-
-
protected $alreadyInSave = false;
@@ -104,101 +81,6 @@
}
- public function getFkRepeticionId()
- {
-
- return $this->fk_repeticion_id;
- }
-
-
- public function getFechaInicio($format = 'Y-m-d H:i:s')
- {
-
- if ($this->fecha_inicio === null || $this->fecha_inicio === '') {
- return null;
- } elseif (!is_int($this->fecha_inicio)) {
- $ts = strtotime($this->fecha_inicio);
- if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse value of [fecha_inicio] as date/time value: " . var_export($this->fecha_inicio, true));
- }
- } else {
- $ts = $this->fecha_inicio;
- }
- if ($format === null) {
- return $ts;
- } elseif (strpos($format, '%') !== false) {
- return strftime($format, $ts);
- } else {
- return date($format, $ts);
- }
- }
-
-
- public function getFechaFin($format = 'Y-m-d H:i:s')
- {
-
- if ($this->fecha_fin === null || $this->fecha_fin === '') {
- return null;
- } elseif (!is_int($this->fecha_fin)) {
- $ts = strtotime($this->fecha_fin);
- if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse value of [fecha_fin] as date/time value: " . var_export($this->fecha_fin, true));
- }
- } else {
- $ts = $this->fecha_fin;
- }
- if ($format === null) {
- return $ts;
- } elseif (strpos($format, '%') !== false) {
- return strftime($format, $ts);
- } else {
- return date($format, $ts);
- }
- }
-
-
- public function getHoraInicio($format = 'H:i:s')
- {
-
- if ($this->hora_inicio === null || $this->hora_inicio === '') {
- return null;
- } elseif (!is_int($this->hora_inicio)) {
- $ts = strtotime($this->hora_inicio);
- if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse value of [hora_inicio] as date/time value: " . var_export($this->hora_inicio, true));
- }
- } else {
- $ts = $this->hora_inicio;
- }
- if ($format === null) {
- return $ts;
- } elseif (strpos($format, '%') !== false) {
- return strftime($format, $ts);
- } else {
- return date($format, $ts);
- }
- }
-
-
- public function getHoraFin($format = 'H:i:s')
- {
-
- if ($this->hora_fin === null || $this->hora_fin === '') {
- return null;
- } elseif (!is_int($this->hora_fin)) {
- $ts = strtotime($this->hora_fin);
- if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse value of [hora_fin] as date/time value: " . var_export($this->hora_fin, true));
- }
- } else {
- $ts = $this->hora_fin;
- }
- if ($format === null) {
- return $ts;
- } elseif (strpos($format, '%') !== false) {
- return strftime($format, $ts);
- } else {
- return date($format, $ts);
- }
- }
-
-
public function setId($v)
{
@@ -285,92 +167,6 @@
}
- public function setFkRepeticionId($v)
- {
-
- if ($v !== null && !is_int($v) && is_numeric($v)) {
- $v = (int) $v;
- }
-
- if ($this->fk_repeticion_id !== $v || $v === 0) {
- $this->fk_repeticion_id = $v;
- $this->modifiedColumns[] = RelDivisionActividadDocentePeer::FK_REPETICION_ID;
- }
-
- if ($this->aRepeticion !== null && $this->aRepeticion->getId() !== $v) {
- $this->aRepeticion = null;
- }
-
- }
-
- public function setFechaInicio($v)
- {
-
- if ($v !== null && !is_int($v)) {
- $ts = strtotime($v);
- if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse date/time value for [fecha_inicio] from input: " . var_export($v, true));
- }
- } else {
- $ts = $v;
- }
- if ($this->fecha_inicio !== $ts) {
- $this->fecha_inicio = $ts;
- $this->modifiedColumns[] = RelDivisionActividadDocentePeer::FECHA_INICIO;
- }
-
- }
-
- public function setFechaFin($v)
- {
-
- if ($v !== null && !is_int($v)) {
- $ts = strtotime($v);
- if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse date/time value for [fecha_fin] from input: " . var_export($v, true));
- }
- } else {
- $ts = $v;
- }
- if ($this->fecha_fin !== $ts) {
- $this->fecha_fin = $ts;
- $this->modifiedColumns[] = RelDivisionActividadDocentePeer::FECHA_FIN;
- }
-
- }
-
- public function setHoraInicio($v)
- {
-
- if ($v !== null && !is_int($v)) {
- $ts = strtotime($v);
- if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse date/time value for [hora_inicio] from input: " . var_export($v, true));
- }
- } else {
- $ts = $v;
- }
- if ($this->hora_inicio !== $ts) {
- $this->hora_inicio = $ts;
- $this->modifiedColumns[] = RelDivisionActividadDocentePeer::HORA_INICIO;
- }
-
- }
-
- public function setHoraFin($v)
- {
-
- if ($v !== null && !is_int($v)) {
- $ts = strtotime($v);
- if ($ts === -1 || $ts === false) { throw new PropelException("Unable to parse date/time value for [hora_fin] from input: " . var_export($v, true));
- }
- } else {
- $ts = $v;
- }
- if ($this->hora_fin !== $ts) {
- $this->hora_fin = $ts;
- $this->modifiedColumns[] = RelDivisionActividadDocentePeer::HORA_FIN;
- }
-
- }
-
public function hydrate(ResultSet $rs, $startcol = 1)
{
try {
@@ -385,21 +181,11 @@
$this->fk_evento_id = $rs->getInt($startcol + 4);
- $this->fk_repeticion_id = $rs->getInt($startcol + 5);
-
- $this->fecha_inicio = $rs->getTimestamp($startcol + 6, null);
-
- $this->fecha_fin = $rs->getTimestamp($startcol + 7, null);
-
- $this->hora_inicio = $rs->getTime($startcol + 8, null);
-
- $this->hora_fin = $rs->getTime($startcol + 9, null);
-
$this->resetModified();
$this->setNew(false);
- return $startcol + 10;
+ return $startcol + 5;
} catch (Exception $e) {
throw new PropelException("Error populating RelDivisionActividadDocente object", $e);
}
@@ -485,14 +271,7 @@
$this->setEvento($this->aEvento);
}
- if ($this->aRepeticion !== null) {
- if ($this->aRepeticion->isModified()) {
- $affectedRows += $this->aRepeticion->save($con);
- }
- $this->setRepeticion($this->aRepeticion);
- }
-
if ($this->isModified()) {
if ($this->isNew()) {
$pk = RelDivisionActividadDocentePeer::doInsert($this, $con);
@@ -565,13 +344,7 @@
}
}
- if ($this->aRepeticion !== null) {
- if (!$this->aRepeticion->validate($columns)) {
- $failureMap = array_merge($failureMap, $this->aRepeticion->getValidationFailures());
- }
- }
-
if (($retval = RelDivisionActividadDocentePeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
@@ -610,21 +383,6 @@
case 4:
return $this->getFkEventoId();
break;
- case 5:
- return $this->getFkRepeticionId();
- break;
- case 6:
- return $this->getFechaInicio();
- break;
- case 7:
- return $this->getFechaFin();
- break;
- case 8:
- return $this->getHoraInicio();
- break;
- case 9:
- return $this->getHoraFin();
- break;
default:
return null;
break;
@@ -640,11 +398,6 @@
$keys[2] => $this->getFkActividadId(),
$keys[3] => $this->getFkDocenteId(),
$keys[4] => $this->getFkEventoId(),
- $keys[5] => $this->getFkRepeticionId(),
- $keys[6] => $this->getFechaInicio(),
- $keys[7] => $this->getFechaFin(),
- $keys[8] => $this->getHoraInicio(),
- $keys[9] => $this->getHoraFin(),
);
return $result;
}
@@ -675,21 +428,6 @@
case 4:
$this->setFkEventoId($value);
break;
- case 5:
- $this->setFkRepeticionId($value);
- break;
- case 6:
- $this->setFechaInicio($value);
- break;
- case 7:
- $this->setFechaFin($value);
- break;
- case 8:
- $this->setHoraInicio($value);
- break;
- case 9:
- $this->setHoraFin($value);
- break;
} }
@@ -702,11 +440,6 @@
if (array_key_exists($keys[2], $arr)) $this->setFkActividadId($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setFkDocenteId($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setFkEventoId($arr[$keys[4]]);
- if (array_key_exists($keys[5], $arr)) $this->setFkRepeticionId($arr[$keys[5]]);
- if (array_key_exists($keys[6], $arr)) $this->setFechaInicio($arr[$keys[6]]);
- if (array_key_exists($keys[7], $arr)) $this->setFechaFin($arr[$keys[7]]);
- if (array_key_exists($keys[8], $arr)) $this->setHoraInicio($arr[$keys[8]]);
- if (array_key_exists($keys[9], $arr)) $this->setHoraFin($arr[$keys[9]]);
}
@@ -719,11 +452,6 @@
if ($this->isColumnModified(RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID)) $criteria->add(RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID, $this->fk_actividad_id);
if ($this->isColumnModified(RelDivisionActividadDocentePeer::FK_DOCENTE_ID)) $criteria->add(RelDivisionActividadDocentePeer::FK_DOCENTE_ID, $this->fk_docente_id);
if ($this->isColumnModified(RelDivisionActividadDocentePeer::FK_EVENTO_ID)) $criteria->add(RelDivisionActividadDocentePeer::FK_EVENTO_ID, $this->fk_evento_id);
- if ($this->isColumnModified(RelDivisionActividadDocentePeer::FK_REPETICION_ID)) $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->fk_repeticion_id);
- if ($this->isColumnModified(RelDivisionActividadDocentePeer::FECHA_INICIO)) $criteria->add(RelDivisionActividadDocentePeer::FECHA_INICIO, $this->fecha_inicio);
- if ($this->isColumnModified(RelDivisionActividadDocentePeer::FECHA_FIN)) $criteria->add(RelDivisionActividadDocentePeer::FECHA_FIN, $this->fecha_fin);
- if ($this->isColumnModified(RelDivisionActividadDocentePeer::HORA_INICIO)) $criteria->add(RelDivisionActividadDocentePeer::HORA_INICIO, $this->hora_inicio);
- if ($this->isColumnModified(RelDivisionActividadDocentePeer::HORA_FIN)) $criteria->add(RelDivisionActividadDocentePeer::HORA_FIN, $this->hora_fin);
return $criteria;
}
@@ -762,17 +490,7 @@
$copyObj->setFkEventoId($this->fk_evento_id);
- $copyObj->setFkRepeticionId($this->fk_repeticion_id);
- $copyObj->setFechaInicio($this->fecha_inicio);
-
- $copyObj->setFechaFin($this->fecha_fin);
-
- $copyObj->setHoraInicio($this->hora_inicio);
-
- $copyObj->setHoraFin($this->hora_fin);
-
-
$copyObj->setNew(true);
$copyObj->setId(NULL);
@@ -916,34 +634,4 @@
return $this->aEvento;
}
-
- public function setRepeticion($v)
- {
-
-
- if ($v === null) {
- $this->setFkRepeticionId('0');
- } else {
- $this->setFkRepeticionId($v->getId());
- }
-
-
- $this->aRepeticion = $v;
- }
-
-
-
- public function getRepeticion($con = null)
- {
- include_once 'lib/model/om/BaseRepeticionPeer.php';
-
- if ($this->aRepeticion === null && ($this->fk_repeticion_id !== null)) {
-
- $this->aRepeticion = RepeticionPeer::retrieveByPK($this->fk_repeticion_id, $con);
-
-
- }
- return $this->aRepeticion;
- }
-
}
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseRelDivisionActividadDocentePeer.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseRelDivisionActividadDocentePeer.php 2007-07-25 16:28:14 UTC (rev 4870)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseRelDivisionActividadDocentePeer.php 2007-07-25 16:43:37 UTC (rev 4871)
@@ -13,7 +13,7 @@
const CLASS_DEFAULT = 'lib.model.RelDivisionActividadDocente';
- const NUM_COLUMNS = 10;
+ const NUM_COLUMNS = 5;
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -35,38 +35,23 @@
const FK_EVENTO_ID = 'rel_division_actividad_docente.FK_EVENTO_ID';
- const FK_REPETICION_ID = 'rel_division_actividad_docente.FK_REPETICION_ID';
-
-
- const FECHA_INICIO = 'rel_division_actividad_docente.FECHA_INICIO';
-
-
- const FECHA_FIN = 'rel_division_actividad_docente.FECHA_FIN';
-
-
- const HORA_INICIO = 'rel_division_actividad_docente.HORA_INICIO';
-
-
- const HORA_FIN = 'rel_division_actividad_docente.HORA_FIN';
-
-
private static $phpNameMap = null;
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('Id', 'FkDivisionId', 'FkActividadId', 'FkDocenteId', 'FkEventoId', 'FkRepeticionId', 'FechaInicio', 'FechaFin', 'HoraInicio', 'HoraFin', ),
- BasePeer::TYPE_COLNAME => array (RelDivisionActividadDocentePeer::ID, RelDivisionActividadDocentePeer::FK_DIVISION_ID, RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID, RelDivisionActividadDocentePeer::FK_DOCENTE_ID, RelDivisionActividadDocentePeer::FK_EVENTO_ID, RelDivisionActividadDocentePeer::FK_REPETICION_ID, RelDivisionActividadDocentePeer::FECHA_INICIO, RelDivisionActividadDocentePeer::FECHA_FIN, RelDivisionActividadDocentePeer::HORA_INICIO, RelDivisionActividadDocentePeer::HORA_FIN, ),
- BasePeer::TYPE_FIELDNAME => array ('id', 'fk_division_id', 'fk_actividad_id', 'fk_docente_id', 'fk_evento_id', 'fk_repeticion_id', 'fecha_inicio', 'fecha_fin', 'hora_inicio', 'hora_fin', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
+ BasePeer::TYPE_PHPNAME => array ('Id', 'FkDivisionId', 'FkActividadId', 'FkDocenteId', 'FkEventoId', ),
+ BasePeer::TYPE_COLNAME => array (RelDivisionActividadDocentePeer::ID, RelDivisionActividadDocentePeer::FK_DIVISION_ID, RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID, RelDivisionActividadDocentePeer::FK_DOCENTE_ID, RelDivisionActividadDocentePeer::FK_EVENTO_ID, ),
+ BasePeer::TYPE_FIELDNAME => array ('id', 'fk_division_id', 'fk_actividad_id', 'fk_docente_id', 'fk_evento_id', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
);
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkDivisionId' => 1, 'FkActividadId' => 2, 'FkDocenteId' => 3, 'FkEventoId' => 4, 'FkRepeticionId' => 5, 'FechaInicio' => 6, 'FechaFin' => 7, 'HoraInicio' => 8, 'HoraFin' => 9, ),
- BasePeer::TYPE_COLNAME => array (RelDivisionActividadDocentePeer::ID => 0, RelDivisionActividadDocentePeer::FK_DIVISION_ID => 1, RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID => 2, RelDivisionActividadDocentePeer::FK_DOCENTE_ID => 3, RelDivisionActividadDocentePeer::FK_EVENTO_ID => 4, RelDivisionActividadDocentePeer::FK_REPETICION_ID => 5, RelDivisionActividadDocentePeer::FECHA_INICIO => 6, RelDivisionActividadDocentePeer::FECHA_FIN => 7, RelDivisionActividadDocentePeer::HORA_INICIO => 8, RelDivisionActividadDocentePeer::HORA_FIN => 9, ),
- BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_division_id' => 1, 'fk_actividad_id' => 2, 'fk_docente_id' => 3, 'fk_evento_id' => 4, 'fk_repeticion_id' => 5, 'fecha_inicio' => 6, 'fecha_fin' => 7, 'hora_inicio' => 8, 'hora_fin' => 9, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, )
+ BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'FkDivisionId' => 1, 'FkActividadId' => 2, 'FkDocenteId' => 3, 'FkEventoId' => 4, ),
+ BasePeer::TYPE_COLNAME => array (RelDivisionActividadDocentePeer::ID => 0, RelDivisionActividadDocentePeer::FK_DIVISION_ID => 1, RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID => 2, RelDivisionActividadDocentePeer::FK_DOCENTE_ID => 3, RelDivisionActividadDocentePeer::FK_EVENTO_ID => 4, ),
+ BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'fk_division_id' => 1, 'fk_actividad_id' => 2, 'fk_docente_id' => 3, 'fk_evento_id' => 4, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
);
@@ -130,16 +115,6 @@
$criteria->addSelectColumn(RelDivisionActividadDocentePeer::FK_EVENTO_ID);
- $criteria->addSelectColumn(RelDivisionActividadDocentePeer::FK_REPETICION_ID);
-
- $criteria->addSelectColumn(RelDivisionActividadDocentePeer::FECHA_INICIO);
-
- $criteria->addSelectColumn(RelDivisionActividadDocentePeer::FECHA_FIN);
-
- $criteria->addSelectColumn(RelDivisionActividadDocentePeer::HORA_INICIO);
-
- $criteria->addSelectColumn(RelDivisionActividadDocentePeer::HORA_FIN);
-
}
const COUNT = 'COUNT(rel_division_actividad_docente.ID)';
@@ -331,34 +306,6 @@
- public static function doCountJoinRepeticion(Criteria $criteria, $distinct = false, $con = null)
- {
- $criteria = clone $criteria;
-
- $criteria->clearSelectColumns()->clearOrderByColumns();
- if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
- $criteria->addSelectColumn(RelDivisionActividadDocentePeer::COUNT_DISTINCT);
- } else {
- $criteria->addSelectColumn(RelDivisionActividadDocentePeer::COUNT);
- }
-
- foreach($criteria->getGroupByColumns() as $column)
- {
- $criteria->addSelectColumn($column);
- }
-
- $criteria->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
-
- $rs = RelDivisionActividadDocentePeer::doSelectRS($criteria, $con);
- if ($rs->next()) {
- return $rs->getInt(1);
- } else {
- return 0;
- }
- }
-
-
-
public static function doSelectJoinDivision(Criteria $c, $con = null)
{
$c = clone $c;
@@ -547,53 +494,6 @@
- public static function doSelectJoinRepeticion(Criteria $c, $con = null)
- {
- $c = clone $c;
-
- if ($c->getDbName() == Propel::getDefaultDB()) {
- $c->setDbName(self::DATABASE_NAME);
- }
-
- RelDivisionActividadDocentePeer::addSelectColumns($c);
- $startcol = (RelDivisionActividadDocentePeer::NUM_COLUMNS - RelDivisionActividadDocentePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
- RepeticionPeer::addSelectColumns($c);
-
- $c->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
- $rs = BasePeer::doSelect($c, $con);
- $results = array();
-
- while($rs->next()) {
-
- $omClass = RelDivisionActividadDocentePeer::getOMClass();
-
- $cls = Propel::import($omClass);
- $obj1 = new $cls();
- $obj1->hydrate($rs);
-
- $omClass = RepeticionPeer::getOMClass();
-
- $cls = Propel::import($omClass);
- $obj2 = new $cls();
- $obj2->hydrate($rs, $startcol);
-
- $newObject = true;
- foreach($results as $temp_obj1) {
- $temp_obj2 = $temp_obj1->getRepeticion(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
- $newObject = false;
- $temp_obj2->addRelDivisionActividadDocente($obj1); break;
- }
- }
- if ($newObject) {
- $obj2->initRelDivisionActividadDocentes();
- $obj2->addRelDivisionActividadDocente($obj1); }
- $results[] = $obj1;
- }
- return $results;
- }
-
-
-
public static function doCountJoinAll(Criteria $criteria, $distinct = false, $con = null)
{
$criteria = clone $criteria;
@@ -618,8 +518,6 @@
$criteria->addJoin(RelDivisionActividadDocentePeer::FK_EVENTO_ID, EventoPeer::ID);
- $criteria->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
-
$rs = RelDivisionActividadDocentePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
@@ -653,9 +551,6 @@
EventoPeer::addSelectColumns($c);
$startcol6 = $startcol5 + EventoPeer::NUM_COLUMNS;
- RepeticionPeer::addSelectColumns($c);
- $startcol7 = $startcol6 + RepeticionPeer::NUM_COLUMNS;
-
$c->addJoin(RelDivisionActividadDocentePeer::FK_DIVISION_ID, DivisionPeer::ID);
$c->addJoin(RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
@@ -664,8 +559,6 @@
$c->addJoin(RelDivisionActividadDocentePeer::FK_EVENTO_ID, EventoPeer::ID);
- $c->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
-
$rs = BasePeer::doSelect($c, $con);
$results = array();
@@ -770,29 +663,6 @@
$obj5->addRelDivisionActividadDocente($obj1);
}
-
-
- $omClass = RepeticionPeer::getOMClass();
-
-
- $cls = Propel::import($omClass);
- $obj6 = new $cls();
- $obj6->hydrate($rs, $startcol6);
-
- $newObject = true;
- for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
- $temp_obj1 = $results[$j];
- $temp_obj6 = $temp_obj1->getRepeticion(); if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
- $newObject = false;
- $temp_obj6->addRelDivisionActividadDocente($obj1); break;
- }
- }
-
- if ($newObject) {
- $obj6->initRelDivisionActividadDocentes();
- $obj6->addRelDivisionActividadDocente($obj1);
- }
-
$results[] = $obj1;
}
return $results;
@@ -822,8 +692,6 @@
$criteria->addJoin(RelDivisionActividadDocentePeer::FK_EVENTO_ID, EventoPeer::ID);
- $criteria->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
-
$rs = RelDivisionActividadDocentePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
@@ -856,8 +724,6 @@
$criteria->addJoin(RelDivisionActividadDocentePeer::FK_EVENTO_ID, EventoPeer::ID);
- $criteria->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
-
$rs = RelDivisionActividadDocentePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
@@ -890,8 +756,6 @@
$criteria->addJoin(RelDivisionActividadDocentePeer::FK_EVENTO_ID, EventoPeer::ID);
- $criteria->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
-
$rs = RelDivisionActividadDocentePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
@@ -924,8 +788,6 @@
$criteria->addJoin(RelDivisionActividadDocentePeer::FK_DOCENTE_ID, DocentePeer::ID);
- $criteria->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
-
$rs = RelDivisionActividadDocentePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
@@ -936,40 +798,6 @@
- public static function doCountJoinAllExceptRepeticion(Criteria $criteria, $distinct = false, $con = null)
- {
- $criteria = clone $criteria;
-
- $criteria->clearSelectColumns()->clearOrderByColumns();
- if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
- $criteria->addSelectColumn(RelDivisionActividadDocentePeer::COUNT_DISTINCT);
- } else {
- $criteria->addSelectColumn(RelDivisionActividadDocentePeer::COUNT);
- }
-
- foreach($criteria->getGroupByColumns() as $column)
- {
- $criteria->addSelectColumn($column);
- }
-
- $criteria->addJoin(RelDivisionActividadDocentePeer::FK_DIVISION_ID, DivisionPeer::ID);
-
- $criteria->addJoin(RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
-
- $criteria->addJoin(RelDivisionActividadDocentePeer::FK_DOCENTE_ID, DocentePeer::ID);
-
- $criteria->addJoin(RelDivisionActividadDocentePeer::FK_EVENTO_ID, EventoPeer::ID);
-
- $rs = RelDivisionActividadDocentePeer::doSelectRS($criteria, $con);
- if ($rs->next()) {
- return $rs->getInt(1);
- } else {
- return 0;
- }
- }
-
-
-
public static function doSelectJoinAllExceptDivision(Criteria $c, $con = null)
{
$c = clone $c;
@@ -990,18 +818,13 @@
EventoPeer::addSelectColumns($c);
$startcol5 = $startcol4 + EventoPeer::NUM_COLUMNS;
- RepeticionPeer::addSelectColumns($c);
- $startcol6 = $startcol5 + RepeticionPeer::NUM_COLUMNS;
-
$c->addJoin(RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
$c->addJoin(RelDivisionActividadDocentePeer::FK_DOCENTE_ID, DocentePeer::ID);
$c->addJoin(RelDivisionActividadDocentePeer::FK_EVENTO_ID, EventoPeer::ID);
- $c->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
-
$rs = BasePeer::doSelect($c, $con);
$results = array();
@@ -1079,28 +902,6 @@
$obj4->addRelDivisionActividadDocente($obj1);
}
- $omClass = RepeticionPeer::getOMClass();
-
-
- $cls = Propel::import($omClass);
- $obj5 = new $cls();
- $obj5->hydrate($rs, $startcol5);
-
- $newObject = true;
- for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
- $temp_obj1 = $results[$j];
- $temp_obj5 = $temp_obj1->getRepeticion(); if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
- $newObject = false;
- $temp_obj5->addRelDivisionActividadDocente($obj1);
- break;
- }
- }
-
- if ($newObject) {
- $obj5->initRelDivisionActividadDocentes();
- $obj5->addRelDivisionActividadDocente($obj1);
- }
-
$results[] = $obj1;
}
return $results;
@@ -1128,18 +929,13 @@
EventoPeer::addSelectColumns($c);
$startcol5 = $startcol4 + EventoPeer::NUM_COLUMNS;
- RepeticionPeer::addSelectColumns($c);
- $startcol6 = $startcol5 + RepeticionPeer::NUM_COLUMNS;
-
$c->addJoin(RelDivisionActividadDocentePeer::FK_DIVISION_ID, DivisionPeer::ID);
$c->addJoin(RelDivisionActividadDocentePeer::FK_DOCENTE_ID, DocentePeer::ID);
$c->addJoin(RelDivisionActividadDocentePeer::FK_EVENTO_ID, EventoPeer::ID);
- $c->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
-
$rs = BasePeer::doSelect($c, $con);
$results = array();
@@ -1217,28 +1013,6 @@
$obj4->addRelDivisionActividadDocente($obj1);
}
- $omClass = RepeticionPeer::getOMClass();
-
-
- $cls = Propel::import($omClass);
- $obj5 = new $cls();
- $obj5->hydrate($rs, $startcol5);
-
- $newObject = true;
- for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
- $temp_obj1 = $results[$j];
- $temp_obj5 = $temp_obj1->getRepeticion(); if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
- $newObject = false;
- $temp_obj5->addRelDivisionActividadDocente($obj1);
- break;
- }
- }
-
- if ($newObject) {
- $obj5->initRelDivisionActividadDocentes();
- $obj5->addRelDivisionActividadDocente($obj1);
- }
-
$results[] = $obj1;
}
return $results;
@@ -1266,18 +1040,13 @@
EventoPeer::addSelectColumns($c);
$startcol5 = $startcol4 + EventoPeer::NUM_COLUMNS;
- RepeticionPeer::addSelectColumns($c);
- $startcol6 = $startcol5 + RepeticionPeer::NUM_COLUMNS;
-
$c->addJoin(RelDivisionActividadDocentePeer::FK_DIVISION_ID, DivisionPeer::ID);
$c->addJoin(RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
$c->addJoin(RelDivisionActividadDocentePeer::FK_EVENTO_ID, EventoPeer::ID);
- $c->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
-
$rs = BasePeer::doSelect($c, $con);
$results = array();
@@ -1355,28 +1124,6 @@
$obj4->addRelDivisionActividadDocente($obj1);
}
- $omClass = RepeticionPeer::getOMClass();
-
-
- $cls = Propel::import($omClass);
- $obj5 = new $cls();
- $obj5->hydrate($rs, $startcol5);
-
- $newObject = true;
- for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
- $temp_obj1 = $results[$j];
- $temp_obj5 = $temp_obj1->getRepeticion(); if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
- $newObject = false;
- $temp_obj5->addRelDivisionActividadDocente($obj1);
- break;
- }
- }
-
- if ($newObject) {
- $obj5->initRelDivisionActividadDocentes();
- $obj5->addRelDivisionActividadDocente($obj1);
- }
-
$results[] = $obj1;
}
return $results;
@@ -1404,18 +1151,13 @@
DocentePeer::addSelectColumns($c);
$startcol5 = $startcol4 + DocentePeer::NUM_COLUMNS;
- RepeticionPeer::addSelectColumns($c);
- $startcol6 = $startcol5 + RepeticionPeer::NUM_COLUMNS;
-
$c->addJoin(RelDivisionActividadDocentePeer::FK_DIVISION_ID, DivisionPeer::ID);
$c->addJoin(RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
$c->addJoin(RelDivisionActividadDocentePeer::FK_DOCENTE_ID, DocentePeer::ID);
- $c->addJoin(RelDivisionActividadDocentePeer::FK_REPETICION_ID, RepeticionPeer::ID);
-
$rs = BasePeer::doSelect($c, $con);
$results = array();
@@ -1493,172 +1235,12 @@
$obj4->addRelDivisionActividadDocente($obj1);
}
- $omClass = RepeticionPeer::getOMClass();
-
-
- $cls = Propel::import($omClass);
- $obj5 = new $cls();
- $obj5->hydrate($rs, $startcol5);
-
- $newObject = true;
- for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
- $temp_obj1 = $results[$j];
- $temp_obj5 = $temp_obj1->getRepeticion(); if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
- $newObject = false;
- $temp_obj5->addRelDivisionActividadDocente($obj1);
- break;
- }
- }
-
- if ($newObject) {
- $obj5->initRelDivisionActividadDocentes();
- $obj5->addRelDivisionActividadDocente($obj1);
- }
-
$results[] = $obj1;
}
return $results;
}
-
- public static function doSelectJoinAllExceptRepeticion(Criteria $c, $con = null)
- {
- $c = clone $c;
-
- if ($c->getDbName() == Propel::getDefaultDB()) {
- $c->setDbName(self::DATABASE_NAME);
- }
-
- RelDivisionActividadDocentePeer::addSelectColumns($c);
- $startcol2 = (RelDivisionActividadDocentePeer::NUM_COLUMNS - RelDivisionActividadDocentePeer::NUM_LAZY_LOAD_COLUMNS) + 1;
-
- DivisionPeer::addSelectColumns($c);
- $startcol3 = $startcol2 + DivisionPeer::NUM_COLUMNS;
-
- ActividadPeer::addSelectColumns($c);
- $startcol4 = $startcol3 + ActividadPeer::NUM_COLUMNS;
-
- DocentePeer::addSelectColumns($c);
- $startcol5 = $startcol4 + DocentePeer::NUM_COLUMNS;
-
- EventoPeer::addSelectColumns($c);
- $startcol6 = $startcol5 + EventoPeer::NUM_COLUMNS;
-
- $c->addJoin(RelDivisionActividadDocentePeer::FK_DIVISION_ID, DivisionPeer::ID);
-
- $c->addJoin(RelDivisionActividadDocentePeer::FK_ACTIVIDAD_ID, ActividadPeer::ID);
-
- $c->addJoin(RelDivisionActividadDocentePeer::FK_DOCENTE_ID, DocentePeer::ID);
-
- $c->addJoin(RelDivisionActividadDocentePeer::FK_EVENTO_ID, EventoPeer::ID);
-
-
- $rs = BasePeer::doSelect($c, $con);
- $results = array();
-
- while($rs->next()) {
-
- $omClass = RelDivisionActividadDocentePeer::getOMClass();
-
- $cls = Propel::import($omClass);
- $obj1 = new $cls();
- $obj1->hydrate($rs);
-
- $omClass = DivisionPeer::getOMClass();
-
-
- $cls = Propel::import($omClass);
- $obj2 = new $cls();
- $obj2->hydrate($rs, $startcol2);
-
- $newObject = true;
- for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
- $temp_obj1 = $results[$j];
- $temp_obj2 = $temp_obj1->getDivision(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
- $newObject = false;
- $temp_obj2->addRelDivisionActividadDocente($obj1);
- break;
- }
- }
-
- if ($newObject) {
- $obj2->initRelDivisionActividadDocentes();
- $obj2->addRelDivisionActividadDocente($obj1);
- }
-
- $omClass = ActividadPeer::getOMClass();
-
-
- $cls = Propel::import($omClass);
- $obj3 = new $cls();
- $obj3->hydrate($rs, $startcol3);
-
- $newObject = true;
- for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
- $temp_obj1 = $results[$j];
- $temp_obj3 = $temp_obj1->getActividad(); if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
- $newObject = false;
- $temp_obj3->addRelDivisionActividadDocente($obj1);
- break;
- }
- }
-
- if ($newObject) {
- $obj3->initRelDivisionActividadDocentes();
- $obj3->addRelDivisionActividadDocente($obj1);
- }
-
- $omClass = DocentePeer::getOMClass();
-
-
- $cls = Propel::import($omClass);
- $obj4 = new $cls();
- $obj4->hydrate($rs, $startcol4);
-
- $newObject = true;
- for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
- $temp_obj1 = $results[$j];
- $temp_obj4 = $temp_obj1->getDocente(); if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
- $newObject = false;
- $temp_obj4->addRelDivisionActividadDocente($obj1);
- break;
- }
- }
-
- if ($newObject) {
- $obj4->initRelDivisionActividadDocentes();
- $obj4->addRelDivisionActividadDocente($obj1);
- }
-
- $omClass = EventoPeer::getOMClass();
-
-
- $cls = Propel::import($omClass);
- $obj5 = new $cls();
- $obj5->hydrate($rs, $startcol5);
-
- $newObject = true;
- for ($j=0, $resCount=count($results); $j < $resCount; $j++) {
- $temp_obj1 = $results[$j];
- $temp_obj5 = $temp_obj1->getEvento(); if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
- $newObject = false;
- $temp_obj5->addRelDivisionActividadDocente($obj1);
- break;
- }
- }
-
- if ($newObject) {
- $obj5->initRelDivisionActividadDocentes();
- $obj5->addRelDivisionActividadDocente($obj1);
- }
-
- $results[] = $obj1;
- }
- return $results;
- }
-
-
public static function getTableMap()
{
return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
Modified: prosistem/alba/trunk/alba/lib/model/om/BaseRepeticion.php
===================================================================
--- prosistem/alba/trunk/alba/lib/model/om/BaseRepeticion.php 2007-07-25 16:28:14 UTC (rev 4870)
+++ prosistem/alba/trunk/alba/lib/model/om/BaseRepeticion.php 2007-07-25 16:43:37 UTC (rev 4871)
@@ -20,12 +20,6 @@
protected $orden = 0;
- protected $collRelDivisionActividadDocentes;
-
-
- protected $lastRelDivisionActividadDocenteCriteria = null;
-
-
protected $alreadyInSave = false;
@@ -177,14 +171,6 @@
}
$this->resetModified(); }
- if ($this->collRelDivisionActividadDocentes !== null) {
- foreach($this->collRelDivisionActividadDocentes as $referrerFK) {
- if (!$referrerFK->isDeleted()) {
- $affectedRows += $referrerFK->save($con);
- }
- }
- }
-
$this->alreadyInSave = false;
}
return $affectedRows;
@@ -226,15 +212,7 @@
}
- if ($this->collRelDivisionActividadDocentes !== null) {
- foreach($this->collRelDivisionActividadDocentes as $referrerFK) {
- if (!$referrerFK->validate($columns)) {
- $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
- }
- }
- }
-
$this->alreadyInValidation = false;
}
@@ -353,15 +331,6 @@
$copyObj->setOrden($this->orden);
- if ($deepCopy) {
- $copyObj->setNew(false);
-
- foreach($this->getRelDivisionActividadDocentes() as $relObj) {
- $copyObj->addRelDivisionActividadDocente($relObj->copy($deepCopy));
- }
-
- }
-
$copyObj->setNew(true);
$copyObj->setId(NULL);
@@ -385,214 +354,4 @@
return self::$peer;
}
-
- public function initRelDivisionActividadDocentes()
- {
- if ($this->collRelDivisionActividadDocentes === null) {
- $this->collRelDivisionActividadDocentes = array();
- }
- }
-
-
- public function getRelDivisionActividadDocentes($criteria = null, $con = null)
- {
- include_once 'lib/model/om/BaseRelDivisionActividadDocentePeer.php';
- if ($criteria === null) {
- $criteria = new Criteria();
- }
- elseif ($criteria instanceof Criteria)
- {
- $criteria = clone $criteria;
- }
-
- if ($this->collRelDivisionActividadDocentes === null) {
- if ($this->isNew()) {
- $this->collRelDivisionActividadDocentes = array();
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->getId());
-
- RelDivisionActividadDocentePeer::addSelectColumns($criteria);
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelect($criteria, $con);
- }
- } else {
- if (!$this->isNew()) {
-
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->getId());
-
- RelDivisionActividadDocentePeer::addSelectColumns($criteria);
- if (!isset($this->lastRelDivisionActividadDocenteCriteria) || !$this->lastRelDivisionActividadDocenteCriteria->equals($criteria)) {
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelect($criteria, $con);
- }
- }
- }
- $this->lastRelDivisionActividadDocenteCriteria = $criteria;
- return $this->collRelDivisionActividadDocentes;
- }
-
-
- public function countRelDivisionActividadDocentes($criteria = null, $distinct = false, $con = null)
- {
- include_once 'lib/model/om/BaseRelDivisionActividadDocentePeer.php';
- if ($criteria === null) {
- $criteria = new Criteria();
- }
- elseif ($criteria instanceof Criteria)
- {
- $criteria = clone $criteria;
- }
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->getId());
-
- return RelDivisionActividadDocentePeer::doCount($criteria, $distinct, $con);
- }
-
-
- public function addRelDivisionActividadDocente(RelDivisionActividadDocente $l)
- {
- $this->collRelDivisionActividadDocentes[] = $l;
- $l->setRepeticion($this);
- }
-
-
-
- public function getRelDivisionActividadDocentesJoinDivision($criteria = null, $con = null)
- {
- include_once 'lib/model/om/BaseRelDivisionActividadDocentePeer.php';
- if ($criteria === null) {
- $criteria = new Criteria();
- }
- elseif ($criteria instanceof Criteria)
- {
- $criteria = clone $criteria;
- }
-
- if ($this->collRelDivisionActividadDocentes === null) {
- if ($this->isNew()) {
- $this->collRelDivisionActividadDocentes = array();
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->getId());
-
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinDivision($criteria, $con);
- }
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->getId());
-
- if (!isset($this->lastRelDivisionActividadDocenteCriteria) || !$this->lastRelDivisionActividadDocenteCriteria->equals($criteria)) {
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinDivision($criteria, $con);
- }
- }
- $this->lastRelDivisionActividadDocenteCriteria = $criteria;
-
- return $this->collRelDivisionActividadDocentes;
- }
-
-
-
- public function getRelDivisionActividadDocentesJoinActividad($criteria = null, $con = null)
- {
- include_once 'lib/model/om/BaseRelDivisionActividadDocentePeer.php';
- if ($criteria === null) {
- $criteria = new Criteria();
- }
- elseif ($criteria instanceof Criteria)
- {
- $criteria = clone $criteria;
- }
-
- if ($this->collRelDivisionActividadDocentes === null) {
- if ($this->isNew()) {
- $this->collRelDivisionActividadDocentes = array();
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->getId());
-
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinActividad($criteria, $con);
- }
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->getId());
-
- if (!isset($this->lastRelDivisionActividadDocenteCriteria) || !$this->lastRelDivisionActividadDocenteCriteria->equals($criteria)) {
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinActividad($criteria, $con);
- }
- }
- $this->lastRelDivisionActividadDocenteCriteria = $criteria;
-
- return $this->collRelDivisionActividadDocentes;
- }
-
-
-
- public function getRelDivisionActividadDocentesJoinDocente($criteria = null, $con = null)
- {
- include_once 'lib/model/om/BaseRelDivisionActividadDocentePeer.php';
- if ($criteria === null) {
- $criteria = new Criteria();
- }
- elseif ($criteria instanceof Criteria)
- {
- $criteria = clone $criteria;
- }
-
- if ($this->collRelDivisionActividadDocentes === null) {
- if ($this->isNew()) {
- $this->collRelDivisionActividadDocentes = array();
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->getId());
-
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinDocente($criteria, $con);
- }
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->getId());
-
- if (!isset($this->lastRelDivisionActividadDocenteCriteria) || !$this->lastRelDivisionActividadDocenteCriteria->equals($criteria)) {
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinDocente($criteria, $con);
- }
- }
- $this->lastRelDivisionActividadDocenteCriteria = $criteria;
-
- return $this->collRelDivisionActividadDocentes;
- }
-
-
-
- public function getRelDivisionActividadDocentesJoinEvento($criteria = null, $con = null)
- {
- include_once 'lib/model/om/BaseRelDivisionActividadDocentePeer.php';
- if ($criteria === null) {
- $criteria = new Criteria();
- }
- elseif ($criteria instanceof Criteria)
- {
- $criteria = clone $criteria;
- }
-
- if ($this->collRelDivisionActividadDocentes === null) {
- if ($this->isNew()) {
- $this->collRelDivisionActividadDocentes = array();
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->getId());
-
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinEvento($criteria, $con);
- }
- } else {
-
- $criteria->add(RelDivisionActividadDocentePeer::FK_REPETICION_ID, $this->getId());
-
- if (!isset($this->lastRelDivisionActividadDocenteCriteria) || !$this->lastRelDivisionActividadDocenteCriteria->equals($criteria)) {
- $this->collRelDivisionActividadDocentes = RelDivisionActividadDocentePeer::doSelectJoinEvento($criteria, $con);
- }
- }
- $this->lastRelDivisionActividadDocenteCriteria = $criteria;
-
- return $this->collRelDivisionActividadDocentes;
- }
-
}
\ No newline at end of file
1
0
SVN Alba r4870 - in prosistem/alba/trunk: . alba/web alba/web/images alba/web/images/installer installer
by commits@pressenter.com.ar 25 Jul '07
by commits@pressenter.com.ar 25 Jul '07
25 Jul '07
Author: ftoledo
Date: 2007-07-25 13:28:14 -0300 (Wed, 25 Jul 2007)
New Revision: 4870
Added:
prosistem/alba/trunk/alba/web/images/installer/
prosistem/alba/trunk/alba/web/images/installer/add.png
prosistem/alba/trunk/alba/web/images/installer/cancel.png
prosistem/alba/trunk/alba/web/images/installer/date.png
prosistem/alba/trunk/alba/web/images/installer/default_icon.png
prosistem/alba/trunk/alba/web/images/installer/delete.png
prosistem/alba/trunk/alba/web/images/installer/delete_icon.png
prosistem/alba/trunk/alba/web/images/installer/edit.png
prosistem/alba/trunk/alba/web/images/installer/edit_icon.png
prosistem/alba/trunk/alba/web/images/installer/error.png
prosistem/alba/trunk/alba/web/images/installer/filter.png
prosistem/alba/trunk/alba/web/images/installer/first.png
prosistem/alba/trunk/alba/web/images/installer/help.png
prosistem/alba/trunk/alba/web/images/installer/last.png
prosistem/alba/trunk/alba/web/images/installer/list.png
prosistem/alba/trunk/alba/web/images/installer/next.png
prosistem/alba/trunk/alba/web/images/installer/ok.png
prosistem/alba/trunk/alba/web/images/installer/previous.png
prosistem/alba/trunk/alba/web/images/installer/reset.png
prosistem/alba/trunk/alba/web/images/installer/save.png
prosistem/alba/trunk/alba/web/images/installer/tick.png
prosistem/alba/trunk/alba/web/install.php
Removed:
prosistem/alba/trunk/install.php
prosistem/alba/trunk/installer/css/
prosistem/alba/trunk/installer/images/
Log:
moviendo instalador
Added: prosistem/alba/trunk/alba/web/images/installer/add.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/add.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/cancel.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/cancel.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/date.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/date.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/default_icon.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/default_icon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/delete.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/delete.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/delete_icon.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/delete_icon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/edit.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/edit.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/edit_icon.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/edit_icon.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/error.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/error.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/filter.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/filter.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/first.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/first.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/help.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/help.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/last.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/last.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/list.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/list.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/next.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/next.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/ok.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/ok.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/previous.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/previous.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/reset.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/reset.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/save.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/save.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: prosistem/alba/trunk/alba/web/images/installer/tick.png
===================================================================
(Binary files differ)
Property changes on: prosistem/alba/trunk/alba/web/images/installer/tick.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Copied: prosistem/alba/trunk/alba/web/install.php (from rev 4869, prosistem/alba/trunk/install.php)
Deleted: prosistem/alba/trunk/install.php
===================================================================
--- prosistem/alba/trunk/install.php 2007-07-25 16:24:14 UTC (rev 4869)
+++ prosistem/alba/trunk/install.php 2007-07-25 16:28:14 UTC (rev 4870)
@@ -1,673 +0,0 @@
-<?php
-/**
- * This file is part of Alba.
- *
- * Alba is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Alba is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Alba; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-/**
- * instalador
- *
- * @package alba
- * @author José Luis Di Biase <josx(a)interorganic.com.ar>
- * @author Héctor Sanchez <hsanchez(a)pressenter.com.ar>
- * @author Fernando Toledo <ftoledo(a)pressenter.com.ar>
- * @version SVN: $Id$
- * @filesource
- * @license GPL
- */
-
-
- define("OS_WINDOWS",((strtoupper(substr(PHP_OS,0,3))=='WIN'))?true:false);
-
- define("APACHE_REQUIRED_VERSION","2.0.0");
- define("PHP_REQUIRED_VERSION","5.0.0");
- define("MEMORY_LIMIT_REQUIRED", "16");
- define("MYSQL_REQUIRED_VERSION","4.1.0");
-
- define("INSTALL_DIR", getcwd().DIRECTORY_SEPARATOR);
-
- chdir("alba".DIRECTORY_SEPARATOR);
- define("ALBA_PATH", getcwd().DIRECTORY_SEPARATOR);
-
- define("INSTALL_COMPLETE_DIR",ALBA_PATH."log");
- define("INSTALL_COMPLETE_FILE",INSTALL_COMPLETE_DIR.DIRECTORY_SEPARATOR."instalacion_completa");
- define("DEBUG_LOG",INSTALL_COMPLETE_DIR.DIRECTORY_SEPARATOR."install.log");
- //define("DEBUG_LOG","install.log");
- define("ALBA_WEB",ALBA_PATH."web".DIRECTORY_SEPARATOR);
- define("CONFIG_PATH", ALBA_PATH."config".DIRECTORY_SEPARATOR);
-
- define("APACHE_CONFIG_DIST", CONFIG_PATH."apache.conf.dist");
- define("DATABASE_CONFIG_DIST", CONFIG_PATH."databases.yml.dist");
- define("PROPEL_CONFIG_DIST", CONFIG_PATH."propel.ini.dist");
- define("HTACCESS_DIST", ALBA_WEB.".htaccess.dist");
- define("SCHEMA_DIST", CONFIG_PATH."schema.xml.dist");
-
- define("APACHE_CONFIG", CONFIG_PATH."apache.conf");
- define("DATABASE_CONFIG", CONFIG_PATH."databases.yml");
- define("PROPEL_CONFIG", CONFIG_PATH."propel.ini");
- define("HTACCESS", ALBA_WEB.".htaccess");
- define("SCHEMA", CONFIG_PATH."schema.xml");
-
- define("SYMFONY_DIR","symfony-1.0.0");
-
- define("IMG_OK", "<img src='installer/images/save.png'>");
- define("IMG_NOT_OK", "<img src='installer/images/delete.png'>");
-
- define("SQL_CREATE_DB", ALBA_PATH."data".DIRECTORY_SEPARATOR."sql".DIRECTORY_SEPARATOR."create-db.sql");
- define("SQL_CREATE", ALBA_PATH."data".DIRECTORY_SEPARATOR."sql".DIRECTORY_SEPARATOR."schema.sql");
- define("SQL_INSERT_INICIAL", ALBA_PATH."data".DIRECTORY_SEPARATOR."sql".DIRECTORY_SEPARATOR."datos_desde_cero.sql");
- define("SQL_INSERT_EJEMPLO", ALBA_PATH."data".DIRECTORY_SEPARATOR."sql".DIRECTORY_SEPARATOR."datos_ejemplo.sql");
-
- define("CURRENT_WEB_DIR",dirname($_SERVER["PHP_SELF"])."/");
- define("SYMFONY_WEB_DIR", "public_html");
-
- define("SERVER","http://" . $_SERVER['SERVER_NAME'].CURRENT_WEB_DIR);
- define("SYMFONY_WINDOWS_WEB_DIR","alba/web"); // directorio directo del web en alba
- define("REDIRECT_URL",(OS_WINDOWS)?SERVER.SYMFONY_WINDOWS_WEB_DIR."/index.php":SERVER.SYMFONY_WEB_DIR."/");
-
-
- if(!file_exists(INSTALL_COMPLETE_FILE)) {
-
- $fp = fopen(DEBUG_LOG, "at" );
- fputs( $fp,date( "d/m/Y H:m:s")." ---- INICIO DE VERIFICACIONES ----\n\n" );
-
- if(OS_WINDOWS) {
- @unlink(ALBA_PATH.".htaccess");
- @unlink(INSTALL_DIR."dist/.htaccess");
- fputs( $fp,date( "d/m/Y H:m:s")." SO: Windows \n\n" );
- }
- else
- fputs( $fp,date( "d/m/Y H:m:s")." SO: Linux \n\n" );
-
- //muchas veces tarda demasiado por lo que es prudente ponerle un infinito tiempo de ejecucion
- set_time_limit(0);
-
-
-
-
- $f_phpversion = function_exists ("phpversion");
- $f_apache_get_version = function_exists ("apache_get_version");
- $f_get_magic_quotes_gpc = function_exists ("get_magic_quotes_gpc");
- $f_mysql_module = function_exists ("mysql_connect");
-
- $msg_phpversion = "";
- $msg_apache_get_version = "";
- $msg_mysql_module = "";
- $msg_mod_rewrite = "";
- $msg_get_magic_quotes_gpc = "";
-
- $bool_mysql_module = false;
- $bool_phpversion = false;
- $bool_apache_get_version = false;
- $bool_gd = estaExtensionPHP("gd");
- $bool_mod_rewrite = false;
- $bool_get_magic_quotes_gpc = false;
-
- $memory_limit = ini_get('memory_limit');
- if($memory_limit != '') {
- $bool_memory_limit = compruebaMemoriaMaxima($memory_limit);
- $bool_memory_no_chequeo = true;
- } else {
- $bool_memory_limit = true;
- $memory_limit = "No se pudo conocer la cantidad de memoria disponible en su PHP.";
- $bool_memory_no_chequeo = false;
- }
- fputs( $fp,date( "d/m/Y H:m:s")." memory_limit: $memory_limit\n\n" );
-
- $bool_cache = tienePermisoEscritura(ALBA_PATH."cache");
- $bool_log = tienePermisoEscritura(ALBA_PATH."log");
- $bool_upload = tienePermisoEscritura(ALBA_WEB."uploads");
- $bool_tmp = tienePermisoEscritura(ALBA_WEB."tmp");
- $bool_config = tienePermisoEscritura(ALBA_PATH."config");
-
- if($f_phpversion) {
- $bool_phpversion = compruebaVersion(phpversion(),PHP_REQUIRED_VERSION);
- $msg_phpversion = "Su versión de PHP es ".phpversion();
- } else {
- $msg_phpversion = "No se pudo verificar la versión de PHP";
-
- }
- fputs( $fp,date( "d/m/Y H:m:s")." phpversion: $msg_phpversion\n\n" );
-
- if($f_apache_get_version) {
- preg_match('!Apache/(.*) !U', apache_get_version(), $v);
- $apache_installed_version = $v[1];
- $bool_apache_get_version = compruebaVersion($apache_installed_version, APACHE_REQUIRED_VERSION);
- $msg_apache_get_version = "Su versión de APACHE es ".$apache_installed_version;
- $bool_mod_rewrite = estaExtensionApache("mod_rewrite");
-
- if($bool_mod_rewrite) {
- $msg_mod_rewrite = "";
- } else {
- $msg_mod_rewrite = "Por favor instale el mod_rewrite en el apache";
- }
-
- } else {
- $msg_apache_get_version = "No se pudo verificar la versión de APACHE";
- $msg_mod_rewrite = "( Al no poder verificar la versión de APACHE, tampoco pudo hacerlo para el mod_rewrite )";
- }
- fputs( $fp,date( "d/m/Y H:m:s")." apache_get_version: $msg_apache_get_version\n\n" );
- fputs( $fp,date( "d/m/Y H:m:s")." mod_rewrite: $msg_mod_rewrite\n\n" );
-
- if($f_mysql_module) {
- $bool_mysql_module = true;
- $msg_mysql_module = "Tiene instalado el modulo MYSQL en PHP";
- } else
- $msg_mysql_module = "No tiene instalado el modulo MYSQL en PHP";
-
- fputs( $fp,date( "d/m/Y H:m:s")." mysql_module: $msg_mysql_module\n\n" );
-
- if($f_get_magic_quotes_gpc) {
- $bool_get_magic_quotes_gpc = get_magic_quotes_gpc();
- if(!$bool_get_magic_quotes_gpc) {
- $bool_get_magic_quotes_gpc = true;
- $msg_get_magic_quotes_gpc = "";
- } else {
- $msg_get_magic_quotes_gpc = "Tiene que cambiar el valor de la variable magic_quotes_gpc de On a Off";
- }
- } else {
- $msg_get_magic_quotes_gpc = " No se pudo verificar si usted tiene (magic_quotes_gpc = off) en el php.ini";
- }
- fputs( $fp,date( "d/m/Y H:m:s")." magic_quotes: $msg_get_magic_quotes_gpc\n\n" );
-
- $hasErrors = false;
- $aError = array();
- $aDb = array( 'server' => '', 'user' => '', 'password' => '', 'name' => '', 'createdb' => '' ) ;
-
- if(!file_exists(SQL_CREATE)) {
- $hasErrors = true;
- $aError['sql_files'] = 'El archivo para el SQL no puede abrirse';
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_CREATE: ".$aError['sql_files']."\n\n" );
- }
- else
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_CREATE: OK \n\n" );
-
- if(!file_exists(SQL_INSERT_INICIAL)){
- $hasErrors = true;
- $aError['sql_files'] = 'El archivo para el SQL no puede abrirse';
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_INSERT_INICIAL: ".$aError['sql_files']."\n\n" );
- }
- else
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_INSERT_INICIAL: OK \n\n" );
-
- if(!file_exists(SQL_INSERT_EJEMPLO)){
- $hasErrors = true;
- $aError['sql_files'] = 'El archivo para el SQL no puede abrirse';
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_INSERT_EJEMPLO: ".$aError['sql_files']."\n\n" );
- }
- else
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_INSERT_EJEMPLO: OK \n\n" );
-
- fputs( $fp,date( "d/m/Y H:m:s")." ---- FIN DE VERIFICACIONES ----\n\n" );
- fputs( $fp,date( "d/m/Y H:m:s")." ---- INICIO DB ----\n\n" );
- if ($_SERVER['REQUEST_METHOD'] == "POST") {
-
- if(!isset($_POST['db']['createdb']))
- $_POST['db']['createdb'] = false;
-
- $db_connection = @mysql_connect( $_POST['db']['server'], $_POST['db']['user'], $_POST['db']['password']);
- if ($db_connection) {
- $mysql_server_version = mysql_get_server_info();
- fputs( $fp,date( "d/m/Y H:m:s")." mysql_server_version: ".$mysql_server_version ."\n\n" );
- if(compruebaVersion($mysql_server_version, MYSQL_REQUIRED_VERSION)) {
- if($_POST['db']['createdb']) {
- fputs( $fp,date( "d/m/Y H:m:s")." -- Create DB --\n\n" );
- if(!@mysql_query('CREATE DATABASE '.$_POST['db']['name'].' DEFAULT CHARACTER SET utf8 COLLATE utf8_bin')) {
- $hasErrors = true;
- $aError['newdb'] = 'No se pudo crear la base de datos ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." newdb: ".$aError['newdb']."\n\n" );
- $aDb = array( 'server' => $_POST['db']['server'] , 'user' => $_POST['db']['user'], 'password' => $_POST['db']['password'], 'name' => $_POST['db']['name'], 'createdb' => $_POST['db']['createdb']) ;
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." Se creo la base de datos OK--\n\n" );
- if(doInstall($fp)) {
- fputs( $fp,date( "d/m/Y H:m:s")." Fin doInstall (create_db): OK \n\n" );
- fclose( $fp );
- header("Location: ".REDIRECT_URL);
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." Fin doInstall (create_db): con Error \n\n" );
- if (!@mysql_query('DROP DATABASE '.$_POST['db']['name'])){
- $aError['insert_create'] = 'No se pudo eliminar la base de datos creada ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." insert_create (create_db): ".$aError['insert_create']."\n\n" );
- }
- else {
- $aError['insert_create'] = 'Se elimino la base de datos creada ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." insert_create (create_db): ".$aError['insert_create']."\n\n" );
- }
- $hasErrors = true;
- }
- }
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." -- Select DB --\n\n" );
- if(@mysql_select_db($_POST['db']['name'])) {
- if(doInstall($fp)) {
- fputs( $fp,date( "d/m/Y H:m:s")." Fin doInstall (select_db): OK \n\n" );
- fclose( $fp );
- header("Location: ".REDIRECT_URL);
- } else {
- $aError['insert_create'] = 'No se pudo agregar los datos a la base de datos existente ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." insert_create (select_db): ".$aError['insert_create']."\n\n" );
- $hasErrors = true;
- }
- } else {
- $hasErrors = true;
- $aError['currentdb'] = 'No se pudo usar la base de datos ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." currentdb (select_db): ".$aError['currentdb']."\n\n" );
- $aDb = array( 'server' => $_POST['db']['server'] , 'user' => $_POST['db']['user'], 'password' => $_POST['db']['password'], 'name' => $_POST['db']['name'], 'createdb' => $_POST['db']['createdb']) ;
- }
- }
- } else {
- $hasErrors = true;
- $aError['mysql_version'] = 'Usted tiene una versión de MYSQL inferior a la'.MYSQL_REQUIRED_VERSION. '(Su versión actual es '.$mysql_server_version. ')';
- fputs( $fp,date( "d/m/Y H:m:s")." mysql_server_version: ".$aError['mysql_version']."\n\n" );
- $aDb = array( 'server' => $_POST['db']['server'] , 'user' => $_POST['db']['user'], 'password' => $_POST['db']['password'], 'name' => $_POST['db']['name'], 'createdb' => $_POST['db']['createdb'] );
- }
-
- mysql_close($db_connection);
- } else {
- $hasErrors = true;
- $aError['connect'] = 'No pudo conectarse al Servidor de Base de datos ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." connect: ".$aError['connect']."\n\n" );
- $aDb = array( 'server' => $_POST['db']['server'] , 'user' => $_POST['db']['user'], 'password' => $_POST['db']['password'], 'name' => $_POST['db']['name'], 'createdb' => $_POST['db']['createdb'] );
- }
-
- }
- fclose( $fp );
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-200000126/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <meta name="title" content="Proyecto ALBA" />
- <meta name="robots" content="index, follow" />
- <meta name="description" content="Proyecto de Gestión Educativa ALBA" />
- <meta name="keywords" content="alba, proyecto, software libre, educacion" />
- <meta name="language" content="es" />
- <title>Proyecto ALBA</title>
- <link rel="stylesheet" type="text/css" href="installer/css/main.css"/>
-</head>
-
-<body>
-<div id ="sf_admin_container">
-<h2>Verificaciones necesarias para la instalación</h2>
-<br>
-<h2>Programas</h2>
-
-<table border="0" cellpadding="3" width="600" class="sf_admin_list">
- <thead>
- <tr>
- <th id="sf_admin_list_th_verfica">Verificación</th>
- <th id="sf_admin_list_th_resultado">Resultado</th>
- </tr>
- </thead>
- <tr class="sf_admin_row_0" >
- <td>Versión de PHP >= 5.0.0</td>
- <td>
- <?=($bool_phpversion)?IMG_OK:IMG_NOT_OK?>(<?=$msg_phpversion?>)
- </td>
- </tr>
-
- <tr class="sf_admin_row_1" >
- <td>¿ Esta instalado MYSQL en PHP ?</td>
- <td>
- <?=($bool_mysql_module)?IMG_OK:IMG_NOT_OK?>(<?=$msg_mysql_module?>)
- </td>
- </tr>
-
-
- <tr class="sf_admin_row_0">
- <td>¿ Esta Instalado GD en PHP ? (optativo) </td>
- <td><?=($bool_gd)?IMG_OK:IMG_NOT_OK." (Si queres ver los gráficos de estadísticas necesitas instalar GD - http://www.php.net/manual/es/ref.image.php)";?></td>
- </tr>
-
- <tr class="sf_admin_row_1">
- <td>En php.ini memory_limit >= 32</td>
- <td><?=($bool_memory_limit AND $bool_memory_no_chequeo)?IMG_OK:IMG_NOT_OK;?>(<?=$memory_limit?>)</td>
- </tr>
-
- <tr class="sf_admin_row_1">
- <td>En php.ini magic_quotes_gpc = off</td>
- <td><?=($bool_get_magic_quotes_gpc)?IMG_OK:IMG_NOT_OK;?><?=$msg_get_magic_quotes_gpc?></td>
- </tr>
-
-
-
- <tr class="sf_admin_row_0">
- <td>Versióon de APACHE >= 2.0</td>
- <td><?=($bool_apache_get_version)?IMG_OK:IMG_NOT_OK?>(<?=$msg_apache_get_version?>)</td>
- </tr>
-
- <tr class="sf_admin_row_1">
- <td>¿ Esta instalado MOD_REWRITE en APACHE ?</td>
- <td><?=($bool_mod_rewrite)?IMG_OK:IMG_NOT_OK.$msg_mod_rewrite?></td>
- </tr>
-
-</table>
-<br>
-<h2>Directorios con permisos para escritura:</h2>
-<table border="0" cellpadding="3" width="600" class="sf_admin_list">
- <thead>
- <tr>
- <th id="sf_admin_list_th_dir">Directorios</th>
- <th id="sf_admin_list_th_resultado">Resultados</th>
- </tr>
- </thead>
- <tr class="sf_admin_row_0" >
- <td>/cache</td>
- <td><?=($bool_cache)?IMG_OK:IMG_NOT_OK." (chmod 777 ./alba/cache)";?></td>
- </tr>
- <tr class="sf_admin_row_1">
- <td>/log</td>
- <td><?=($bool_log)?IMG_OK:IMG_NOT_OK." (chmod 777 ./alba/logs)";?></td>
- </tr>
- <tr class="sf_admin_row_0">
- <td>/uploads</td>
- <td><?=($bool_upload)?IMG_OK:IMG_NOT_OK." (chmod 777 ./alba/web/uploads)";?></td>
- </tr>
- <tr class="sf_admin_row_1">
- <td>/config</td>
- <td><?=($bool_config)?IMG_OK:IMG_NOT_OK." (chmod 777 ./alba/config)";?></td>
-<?php // Aqui no deberiamos probar si tienen permisos los archivos databases.yml, propel.ini y web/.htaccess ?>
- </tr>
- <tr class="sf_admin_row_0">
- <td>/tmp</td>
- <td><?=($bool_tmp)?IMG_OK:IMG_NOT_OK." (chmod 777 ./alba/web/tmp)";?></td>
- </tr>
-
-</table>
-
-<?php if($bool_config AND $bool_upload AND $bool_tmp AND $bool_log AND $bool_cache AND $bool_memory_limit AND $bool_apache_get_version AND $bool_phpversion AND $bool_mysql_module AND $bool_mod_rewrite AND $bool_get_magic_quotes_gpc) { ?>
-
-<?php if($hasErrors) { ?>
- <br><br>
- <div class="form-errors">
- <h2>Arreglar errores para continuar</h2>
- <ul>
- <?php foreach ($aError as $idx => $name) { ?>
- <li><?php echo $name; ?></li>
- <?php } ?>
- </ul>
- </div>
-<?php } ?>
-
-
-
-<br>
-<h2>Datos para la instalación</h2>
-<form action="<?=$_SERVER['PHP_SELF']?>" method="POST" >
- <fieldset id="sf_fieldset_base_de_datos" class="">
- <h2>Conección a la base de datos</h2>
- <div class="form-row">
- <label for="db_server" class="required">Servidor:</label><div class="content"><input type="text" name="db[server]" value="<?=$aDb['server']?>" size="64" /></div>
- </div>
- <div class="form-row">
- <label for="db_user" class="required">Usuario:</label><div class="content"><input type="text" name="db[user]" value="<?=$aDb['user']?>" size="64" /></div>
- </div>
- <div class="form-row">
- <label for="db_password" class="required">Contraseña:</label><div class="content"><input type="password" name="db[password]" value="<?=$aDb['password']?>" size="64" /></div>
- </div>
- <div class="form-row">
- <label for="db_name" class="required">Nombre de base de datos:</label><div class="content"><input type="text" name="db[name]" value="<?=$aDb['name']?>" size="64" />
- Crear Base de datos <input type="checkbox" name="db[createdb]" value="crear" <?=($aDb['createdb'])?'checked':''?>>
- </div>
-
- <div class="form-row">
- <label for="db_name" class="required">¿Que datos quiere por defecto?:</label>
- <div class="content">
- Datos mínimos<input type="radio" name="db[datos]" value="minimos" checked >
- Caso de Ejemplo<input type="radio" name="db[datos]" value="ejemplo">
- </div>
- </div>
- </fieldset>
-
- <ul class="sf_admin_actions">
- <li><input type="submit" name="instalar" value="Instalar" class="sf_admin_action_instalar" /></li>
- <li><input type="reset" name="borrar" value="Borrar" class="sf_admin_action_borrar" /></li>
- </ul>
-</form>
-<? } else { ?>
-<br>
-<div align="center"><h2 style="color: #FF0000;">Para poder seguir con la instalción debe pasar completa la verificación.</h2></div>
-<? } ?>
-</div>
-</body>
-</html>
-
-
-<?
-// si existe el archivo de flag para la instacion
-} else { ?>
-<html>
-<body>
-Usted ya ha instalado el Proyetco ALBA. Si quiere volver a instalarlo debe borra el archivo alba/log/instalacion_completa.
-</body>
-</html>
-<? } ?>
-
-
-<?php
-
-/**
-* Funciones del instalador
-*/
-
-function compruebaVersion($instalada, $requireda) {
- return (version_compare($instalada, $requireda, ">="));
-}
-
-
-function compruebaMemoriaMaxima($php_memory) {
- $memory_limit = eregi_replace('[gmk]','',$php_memory);
- return ($memory_limit >= MEMORY_LIMIT_REQUIRED);
-
-}
-
-function estaExtensionPHP($ext) {
- $aExtension = get_loaded_extensions();
- if(count($aExtension)>0) {
- $res = array_search($ext, $aExtension);
- if($res === false) {
- return false;
- } else {
- return true;
- }
- } else {
- return false;
- }
-}
-
-
-function estaExtensionApache($ext) {
- $aApacheModulos = apache_get_modules();
- if(count($aApacheModulos)>0) {
- $res = array_search($ext, $aApacheModulos);
- if($res === false) {
- return false;
- } else {
- return true;
- }
- } else {
- return false;
- }
-}
-
-
-function tienePermisoEscritura($dir) {
- $octalPermiso = substr(sprintf('%o', @fileperms($dir)), -4);
- return ($octalPermiso == "0777" OR $octalPermiso == "1777");
-}
-
-
-function reemplzarArchivo($archivo, $aReemplazo) {
- $contenido = "";
- if(file_exists($archivo)) {
- $contenido = file_get_contents ($archivo);
- foreach($aReemplazo as $indice => $reemplazo) {
- $contenido = str_replace($indice, $reemplazo, $contenido);
- }
- }
- return $contenido;
-}
-
-
-
-// ojo que esto no funciona para cualquier cosa si dentro de un string de un insert hay un dato con ;\n se separa por eso tambien
-function dump2Array($file) {
- $aSql = array();
- $res_sql = "";
- if(file_exists($file)) {
- $sql = file($file);
- foreach($sql as $sql_line) {
- $sql_line = trim($sql_line);
- if (($sql_line != "") && (substr($sql_line, 0, 2) != "--") && (substr($sql_line, 0, 1) != "#") ) {
- $res_sql .= $sql_line."\n";
- }
- }
- $aSql= array_slice(explode(";\n", $res_sql),0,-1);
- }
- return $aSql;
-}
-
-function executeDump($file, $db,$fp) {
- fputs( $fp,date( "d/m/Y H:m:s")." Entrando ExecuteDump: $file - $db \n\n" );
- $aSql = dump2Array($file);
- $error = false;
- if(count($aSql) > 0 AND file_exists($file)) {
- if(mysql_select_db($db)) {
- fputs( $fp,date( "d/m/Y H:m:s")." ejecutando BEGIN \n\n" );
- mysql_query("BEGIN");
- foreach($aSql as $sql_line) {
- $res = mysql_query(trim($sql_line));
- if(!$res) {
- fputs( $fp,date( "d/m/Y H:m:s")." Fallo SQL: $sql_line \n\n" );
- fputs( $fp,date( "d/m/Y H:m:s")." error:". mysql_error()." \n\n" );
- $error = true;
- }
- }
- if($error == true) {
- fputs( $fp,date( "d/m/Y H:m:s")." Se encontraron errores ejecutando ROLLBACK y saliendo \n\n" );
- mysql_query("ROLLBACK");
- return false;
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." Sin errores ejecutando COMMIT y saliendo \n\n" );
- mysql_query("COMMIT");
- return true;
- }
- }
- else {
- fputs( $fp,date( "d/m/Y H:m:s")." Error al seleccionar la base: $db \n\n" );
- return false;
- }
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." Devuele false no ejecuta nada : $db \n\n" );
- return false;
- }
-
-}
-
-function doInstall($fp) {
- global $_POST;
- fputs( $fp,date( "d/m/Y H:m:s")." Entrando doInstall() \n\n" );
- //verifica que base de datos instalar si la del ejemplo o solamente la
- //de los datos_desde_cero iniciales
- switch($_POST['db']['datos']) {
- case "ejemplo": $sql_insert = SQL_INSERT_INICIAL; break;
- case "minimos": $sql_insert = SQL_INSERT_EJEMPLO; break;
- default: $sql_insert = SQL_INSERT_EJEMPLO;
- }
- fputs( $fp,date( "d/m/Y H:m:s")." Utilizando SQL: $sql_insert \n\n" );
- if(executeDump(SQL_CREATE, $_POST['db']['name'],$fp)) {
- if(executeDump($sql_insert, $_POST['db']['name'],$fp)) {
- $aReemplazo = array( 'USERDB' => $_POST['db']['user'], 'PASSDB' => $_POST['db']['password'], 'SERVER' => $_POST['db']['server'], 'DBNAME'=> $_POST['db']['name']);
- $contenido_archivo = reemplzarArchivo(DATABASE_CONFIG_DIST,$aReemplazo);
- file_put_contents(DATABASE_CONFIG, $contenido_archivo);
-
- $aReemplazo = array( 'USERDB' => $_POST['db']['user'], 'PASSDB' => $_POST['db']['password'], 'SERVER' => $_POST['db']['server'], 'DBNAME'=> $_POST['db']['name']);
- $contenido_archivo = reemplzarArchivo(PROPEL_CONFIG_DIST,$aReemplazo);
- file_put_contents(PROPEL_CONFIG, $contenido_archivo);
-
-
- _symlink(INSTALL_DIR."dist/".SYMFONY_DIR."/data/", ALBA_PATH."data/symfony");
- _symlink(INSTALL_DIR."dist/pake/", ALBA_PATH."lib/pake");
- _symlink(INSTALL_DIR."dist/phing.sandbox/", ALBA_PATH."lib/phing");
- _symlink(INSTALL_DIR."dist/".SYMFONY_DIR."/lib/", ALBA_PATH."lib/symfony");
- _symlink(INSTALL_DIR."alba/data/symfony/web/sf/", ALBA_WEB."sf");
- fputs( $fp,date( "d/m/Y H:m:s")." Creando Links \n\n" );
-
- $rewrite_path = (OS_WINDOWS)?CURRENT_WEB_DIR.SYMFONY_WINDOWS_WEB_DIR:CURRENT_WEB_DIR.SYMFONY_WEB_DIR;
-
- if(!OS_WINDOWS)
- _symlink(ALBA_WEB, INSTALL_DIR.SYMFONY_WEB_DIR); // crea nuevo link afuera de la estructura de alba
-
- $aReemplazo = Array('REWRITE_PATH' => $rewrite_path);
- $contenido_archivo = reemplzarArchivo(HTACCESS_DIST,$aReemplazo);
- file_put_contents(HTACCESS, $contenido_archivo);
- touch(INSTALL_COMPLETE_FILE);
- fputs( $fp,date( "d/m/Y H:m:s")." Creando bandera INSTALL_COMPLETE_FILE \n\n" );
- return true;
- }
- fputs( $fp,date( "d/m/Y H:m:s")." Fallo ejecutando: $sql_insert \n\n" );
- return false;
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." Fallo ejecutando: SQL_CREATE \n\n" );
- return false;
- }
-
-}
-
-
-function doUninstall() {
-
-}
-
-function _symlink( $target, $link ) {
- if (OS_WINDOWS) {
- @dircopy($target, $link);
- } else {
- @symlink($target,$link);
- }
-}
-
-
-function dircopy($srcdir, $dstdir, $verbose = false) {
- $num = 0;
- if(!is_dir($dstdir)) mkdir($dstdir);
- if($curdir = opendir($srcdir)) {
- while($file = readdir($curdir)) {
- if($file != '.' && $file != '..') {
- $srcfile = $srcdir . DIRECTORY_SEPARATOR . $file;
- $dstfile = $dstdir . DIRECTORY_SEPARATOR . $file;
- if(is_file($srcfile)) {
- if(is_file($dstfile)) $ow = filemtime($srcfile) - filemtime($dstfile); else $ow = 1;
- if($ow > 0) {
- if($verbose) echo "Copying '$srcfile' to '$dstfile'...";
- if(copy($srcfile, $dstfile)) {
- touch($dstfile, filemtime($srcfile)); $num++;
- if($verbose) echo "OK\n";
- }
- else echo "Error: File '$srcfile' could not be copied!\n";
- }
- }
- else if(is_dir($srcfile)) {
- $num += dircopy($srcfile, $dstfile, $verbose);
- }
- }
- }
- closedir($curdir);
- }
- return $num;
-}
-?>
\ No newline at end of file
1
0
25 Jul '07
Author: ftoledo
Date: 2007-07-25 13:24:14 -0300 (Wed, 25 Jul 2007)
New Revision: 4869
Added:
prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql
prosistem/alba/trunk/install.php
Removed:
prosistem/alba/trunk/index.php
Log:
moviendo archivos del installer y nuevo archivos de schema sql
Added: prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql 2007-07-25 15:47:05 UTC (rev 4868)
+++ prosistem/alba/trunk/alba/data/sql/lib.model.schema.sql 2007-07-25 16:24:14 UTC (rev 4869)
@@ -0,0 +1,1417 @@
+
+# This is a fix for InnoDB in MySQL >= 4.1.x
+# It "suspends judgement" for fkey relationships until are tables are set.
+SET FOREIGN_KEY_CHECKS = 0;
+
+#-----------------------------------------------------------------------------
+#-- locacion
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `locacion`;
+
+
+CREATE TABLE `locacion`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255),
+ `direccion` VARCHAR(128) default 'null' NOT NULL,
+ `ciudad` VARCHAR(128) default 'null' NOT NULL,
+ `codigo_postal` VARCHAR(20) default 'null',
+ `fk_provincia_id` INTEGER default 0 NOT NULL,
+ `fk_tipolocacion_id` INTEGER default 0 NOT NULL,
+ `telefono` VARCHAR(20),
+ `fax` VARCHAR(20),
+ `encargado` VARCHAR(128),
+ `encargado_telefono` VARCHAR(20),
+ `principal` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `locacion_FI_1` (`fk_provincia_id`),
+ CONSTRAINT `locacion_FK_1`
+ FOREIGN KEY (`fk_provincia_id`)
+ REFERENCES `provincia` (`id`),
+ INDEX `locacion_FI_2` (`fk_tipolocacion_id`),
+ CONSTRAINT `locacion_FK_2`
+ FOREIGN KEY (`fk_tipolocacion_id`)
+ REFERENCES `tipolocacion` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- modulo
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `modulo`;
+
+
+CREATE TABLE `modulo`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `titulo` VARCHAR(128),
+ `descripcion` VARCHAR(255),
+ `activo` INTEGER default 1 NOT NULL,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- espacio
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `espacio`;
+
+
+CREATE TABLE `espacio`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `m2` FLOAT,
+ `capacidad` VARCHAR(255),
+ `descripcion` VARCHAR(255),
+ `estado` VARCHAR(255),
+ `fk_tipoespacio_id` INTEGER(11),
+ `fk_locacion_id` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `espacio_FI_1` (`fk_tipoespacio_id`),
+ CONSTRAINT `espacio_FK_1`
+ FOREIGN KEY (`fk_tipoespacio_id`)
+ REFERENCES `tipoespacio` (`id`),
+ INDEX `espacio_FI_2` (`fk_locacion_id`),
+ CONSTRAINT `espacio_FK_2`
+ FOREIGN KEY (`fk_locacion_id`)
+ REFERENCES `locacion` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- tipoespacio
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `tipoespacio`;
+
+
+CREATE TABLE `tipoespacio`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255) default 'null',
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- tipolocacion
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `tipolocacion`;
+
+
+CREATE TABLE `tipolocacion`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255) default 'null',
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- distritoescolar
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `distritoescolar`;
+
+
+CREATE TABLE `distritoescolar`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `direccion` VARCHAR(128),
+ `telefono` VARCHAR(20),
+ `ciudad` VARCHAR(128),
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- establecimiento
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `establecimiento`;
+
+
+CREATE TABLE `establecimiento`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255),
+ `fk_distritoescolar_id` INTEGER default 0 NOT NULL,
+ `fk_organizacion_id` INTEGER default 0 NOT NULL,
+ `fk_niveltipo_id` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `establecimiento_FI_1` (`fk_distritoescolar_id`),
+ CONSTRAINT `establecimiento_FK_1`
+ FOREIGN KEY (`fk_distritoescolar_id`)
+ REFERENCES `distritoescolar` (`id`),
+ INDEX `establecimiento_FI_2` (`fk_organizacion_id`),
+ CONSTRAINT `establecimiento_FK_2`
+ FOREIGN KEY (`fk_organizacion_id`)
+ REFERENCES `organizacion` (`id`),
+ INDEX `establecimiento_FI_3` (`fk_niveltipo_id`),
+ CONSTRAINT `establecimiento_FK_3`
+ FOREIGN KEY (`fk_niveltipo_id`)
+ REFERENCES `niveltipo` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- niveltipo
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `niveltipo`;
+
+
+CREATE TABLE `niveltipo`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255),
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- organizacion
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `organizacion`;
+
+
+CREATE TABLE `organizacion`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255),
+ `razon_social` VARCHAR(128) default 'null' NOT NULL,
+ `cuit` VARCHAR(20) default 'null' NOT NULL,
+ `direccion` VARCHAR(128) default 'null' NOT NULL,
+ `ciudad` VARCHAR(128) default 'null' NOT NULL,
+ `codigo_postal` VARCHAR(20) default 'null' NOT NULL,
+ `telefono` VARCHAR(20) default 'null',
+ `fk_provincia_id` INTEGER default 0 NOT NULL,
+ `fk_tipoiva_id` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `organizacion_FI_1` (`fk_provincia_id`),
+ CONSTRAINT `organizacion_FK_1`
+ FOREIGN KEY (`fk_provincia_id`)
+ REFERENCES `provincia` (`id`),
+ INDEX `organizacion_FI_2` (`fk_tipoiva_id`),
+ CONSTRAINT `organizacion_FK_2`
+ FOREIGN KEY (`fk_tipoiva_id`)
+ REFERENCES `tipoiva` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- pais
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `pais`;
+
+
+CREATE TABLE `pais`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre_largo` VARCHAR(128) default 'null' NOT NULL,
+ `nombre_corto` VARCHAR(32) default 'null' NOT NULL,
+ `orden` INTEGER default 0,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- permiso
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `permiso`;
+
+
+CREATE TABLE `permiso`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255),
+ `fk_modulo_id` INTEGER default 0 NOT NULL,
+ `credencial` VARCHAR(32),
+ PRIMARY KEY (`id`),
+ INDEX `permiso_FI_1` (`fk_modulo_id`),
+ CONSTRAINT `permiso_FK_1`
+ FOREIGN KEY (`fk_modulo_id`)
+ REFERENCES `modulo` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- preferencia
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `preferencia`;
+
+
+CREATE TABLE `preferencia`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `valor_por_defecto` VARCHAR(128),
+ `activo` INTEGER default 1 NOT NULL,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rel_establecimiento_locacion
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rel_establecimiento_locacion`;
+
+
+CREATE TABLE `rel_establecimiento_locacion`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `fk_establecimiento_id` INTEGER default 0 NOT NULL,
+ `fk_locacion_id` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `rel_establecimiento_locacion_FI_1` (`fk_establecimiento_id`),
+ CONSTRAINT `rel_establecimiento_locacion_FK_1`
+ FOREIGN KEY (`fk_establecimiento_id`)
+ REFERENCES `establecimiento` (`id`),
+ INDEX `rel_establecimiento_locacion_FI_2` (`fk_locacion_id`),
+ CONSTRAINT `rel_establecimiento_locacion_FK_2`
+ FOREIGN KEY (`fk_locacion_id`)
+ REFERENCES `locacion` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rel_rol_permiso
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rel_rol_permiso`;
+
+
+CREATE TABLE `rel_rol_permiso`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `fk_rol_id` INTEGER default 0 NOT NULL,
+ `fk_permiso_id` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `rel_rol_permiso_FI_1` (`fk_rol_id`),
+ CONSTRAINT `rel_rol_permiso_FK_1`
+ FOREIGN KEY (`fk_rol_id`)
+ REFERENCES `rol` (`id`),
+ INDEX `rel_rol_permiso_FI_2` (`fk_permiso_id`),
+ CONSTRAINT `rel_rol_permiso_FK_2`
+ FOREIGN KEY (`fk_permiso_id`)
+ REFERENCES `permiso` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rel_usuario_permiso
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rel_usuario_permiso`;
+
+
+CREATE TABLE `rel_usuario_permiso`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `fk_usuario_id` INTEGER default 0 NOT NULL,
+ `fk_permiso_id` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `rel_usuario_permiso_FI_1` (`fk_usuario_id`),
+ CONSTRAINT `rel_usuario_permiso_FK_1`
+ FOREIGN KEY (`fk_usuario_id`)
+ REFERENCES `usuario` (`id`),
+ INDEX `rel_usuario_permiso_FI_2` (`fk_permiso_id`),
+ CONSTRAINT `rel_usuario_permiso_FK_2`
+ FOREIGN KEY (`fk_permiso_id`)
+ REFERENCES `permiso` (`id`)
+ ON DELETE CASCADE
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rel_usuario_preferencia
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rel_usuario_preferencia`;
+
+
+CREATE TABLE `rel_usuario_preferencia`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `fk_usuario_id` INTEGER default 0 NOT NULL,
+ `fk_preferencia_id` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rol
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rol`;
+
+
+CREATE TABLE `rol`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255) default 'null',
+ `activo` INTEGER default 1 NOT NULL,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- usuario
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `usuario`;
+
+
+CREATE TABLE `usuario`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `usuario` VARCHAR(32) default 'null' NOT NULL,
+ `clave` VARCHAR(48) default 'null' NOT NULL,
+ `correo_publico` INTEGER default 1,
+ `activo` INTEGER default 1 NOT NULL,
+ `fecha_creado` DATETIME NOT NULL,
+ `fecha_actualizado` DATETIME NOT NULL,
+ `seguridad_pregunta` VARCHAR(128),
+ `seguridad_respuesta` VARCHAR(128),
+ `email` VARCHAR(128),
+ `fk_establecimiento_id` INTEGER default 0 NOT NULL,
+ `borrado` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `usuario_FI_1` (`fk_establecimiento_id`),
+ CONSTRAINT `usuario_FK_1`
+ FOREIGN KEY (`fk_establecimiento_id`)
+ REFERENCES `establecimiento` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- tipoiva
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `tipoiva`;
+
+
+CREATE TABLE `tipoiva`
+(
+ `id` INTEGER NOT NULL,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255) default 'null',
+ `orden` INTEGER default 0,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- provincia
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `provincia`;
+
+
+CREATE TABLE `provincia`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre_corto` VARCHAR(32) default 'null' NOT NULL,
+ `nombre_largo` VARCHAR(128) default 'null' NOT NULL,
+ `fk_pais_id` INTEGER default 0 NOT NULL,
+ `orden` INTEGER default 0,
+ PRIMARY KEY (`id`),
+ INDEX `provincia_FI_1` (`fk_pais_id`),
+ CONSTRAINT `provincia_FK_1`
+ FOREIGN KEY (`fk_pais_id`)
+ REFERENCES `pais` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- cuenta
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `cuenta`;
+
+
+CREATE TABLE `cuenta`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `razon_social` VARCHAR(128) default 'null' NOT NULL,
+ `cuit` VARCHAR(20) default 'null' NOT NULL,
+ `direccion` VARCHAR(128) default 'null' NOT NULL,
+ `ciudad` VARCHAR(128) default 'null' NOT NULL,
+ `codigo_postal` VARCHAR(20) default 'null' NOT NULL,
+ `telefono` VARCHAR(20) default 'null',
+ `fk_provincia_id` INTEGER default 0 NOT NULL,
+ `fk_tipoiva_id` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `cuenta_FI_1` (`fk_provincia_id`),
+ CONSTRAINT `cuenta_FK_1`
+ FOREIGN KEY (`fk_provincia_id`)
+ REFERENCES `provincia` (`id`),
+ INDEX `cuenta_FI_2` (`fk_tipoiva_id`),
+ CONSTRAINT `cuenta_FK_2`
+ FOREIGN KEY (`fk_tipoiva_id`)
+ REFERENCES `tipoiva` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- alumno
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `alumno`;
+
+
+CREATE TABLE `alumno`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `apellido` VARCHAR(128) default 'null' NOT NULL,
+ `fecha_nacimiento` DATETIME NOT NULL,
+ `direccion` VARCHAR(128) default 'null' NOT NULL,
+ `ciudad` VARCHAR(128) default 'null' NOT NULL,
+ `codigo_postal` VARCHAR(20) default 'null' NOT NULL,
+ `fk_provincia_id` INTEGER default 0 NOT NULL,
+ `telefono` VARCHAR(20) default 'null',
+ `lugar_nacimiento` VARCHAR(128) default 'null',
+ `fk_tipodocumento_id` INTEGER(11) default 0 NOT NULL,
+ `nro_documento` VARCHAR(16) default 'null' NOT NULL,
+ `sexo` CHAR(1) NOT NULL,
+ `email` VARCHAR(128) default 'null' NOT NULL,
+ `distancia_escuela` INTEGER default 0,
+ `hermanos_escuela` INTEGER default 0 NOT NULL,
+ `hijo_maestro_escuela` INTEGER default 0 NOT NULL,
+ `fk_establecimiento_id` INTEGER default 0 NOT NULL,
+ `fk_cuenta_id` INTEGER default 0 NOT NULL,
+ `certificado_medico` INTEGER default 0 NOT NULL,
+ `activo` INTEGER default 1 NOT NULL,
+ `fk_conceptobaja_id` INTEGER,
+ `fk_pais_id` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `alumno_FI_1` (`fk_provincia_id`),
+ CONSTRAINT `alumno_FK_1`
+ FOREIGN KEY (`fk_provincia_id`)
+ REFERENCES `provincia` (`id`),
+ INDEX `alumno_FI_2` (`fk_tipodocumento_id`),
+ CONSTRAINT `alumno_FK_2`
+ FOREIGN KEY (`fk_tipodocumento_id`)
+ REFERENCES `tipodocumento` (`id`),
+ INDEX `alumno_FI_3` (`fk_establecimiento_id`),
+ CONSTRAINT `alumno_FK_3`
+ FOREIGN KEY (`fk_establecimiento_id`)
+ REFERENCES `establecimiento` (`id`),
+ INDEX `alumno_FI_4` (`fk_cuenta_id`),
+ CONSTRAINT `alumno_FK_4`
+ FOREIGN KEY (`fk_cuenta_id`)
+ REFERENCES `cuenta` (`id`),
+ INDEX `alumno_FI_5` (`fk_conceptobaja_id`),
+ CONSTRAINT `alumno_FK_5`
+ FOREIGN KEY (`fk_conceptobaja_id`)
+ REFERENCES `conceptobaja` (`id`),
+ INDEX `alumno_FI_6` (`fk_pais_id`),
+ CONSTRAINT `alumno_FK_6`
+ FOREIGN KEY (`fk_pais_id`)
+ REFERENCES `pais` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- responsable
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `responsable`;
+
+
+CREATE TABLE `responsable`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `apellido` VARCHAR(128) default 'null' NOT NULL,
+ `direccion` VARCHAR(128) default 'null',
+ `ciudad` VARCHAR(128) default 'null',
+ `codigo_postal` VARCHAR(20) default 'null',
+ `fk_provincia_id` INTEGER default 0 NOT NULL,
+ `telefono` VARCHAR(20) default 'null',
+ `telefono_movil` VARCHAR(20) default 'null',
+ `nro_documento` VARCHAR(20) default 'null' NOT NULL,
+ `fk_tipodocumento_id` INTEGER default 0 NOT NULL,
+ `sexo` CHAR(1) NOT NULL,
+ `email` VARCHAR(128) default 'null',
+ `observacion` VARCHAR(255) default 'null',
+ `autorizacion_retiro` INTEGER default 0 NOT NULL,
+ `fk_cuenta_id` INTEGER default 0 NOT NULL,
+ `fk_rolresponsable_id` INTEGER default 1 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `responsable_FI_1` (`fk_provincia_id`),
+ CONSTRAINT `responsable_FK_1`
+ FOREIGN KEY (`fk_provincia_id`)
+ REFERENCES `provincia` (`id`),
+ INDEX `responsable_FI_2` (`fk_tipodocumento_id`),
+ CONSTRAINT `responsable_FK_2`
+ FOREIGN KEY (`fk_tipodocumento_id`)
+ REFERENCES `tipodocumento` (`id`),
+ INDEX `responsable_FI_3` (`fk_cuenta_id`),
+ CONSTRAINT `responsable_FK_3`
+ FOREIGN KEY (`fk_cuenta_id`)
+ REFERENCES `cuenta` (`id`),
+ INDEX `responsable_FI_4` (`fk_rolresponsable_id`),
+ CONSTRAINT `responsable_FK_4`
+ FOREIGN KEY (`fk_rolresponsable_id`)
+ REFERENCES `rol_responsable` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- ciclolectivo
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `ciclolectivo`;
+
+
+CREATE TABLE `ciclolectivo`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_establecimiento_id` INTEGER(11) NOT NULL,
+ `fecha_inicio` DATETIME NOT NULL,
+ `fecha_fin` DATETIME NOT NULL,
+ `descripcion` VARCHAR(255) default 'null' NOT NULL,
+ `actual` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `ciclolectivo_FI_1` (`fk_establecimiento_id`),
+ CONSTRAINT `ciclolectivo_FK_1`
+ FOREIGN KEY (`fk_establecimiento_id`)
+ REFERENCES `establecimiento` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- turnos
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `turnos`;
+
+
+CREATE TABLE `turnos`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_ciclolectivo_id` INTEGER(11) NOT NULL,
+ `hora_inicio` TIME NOT NULL,
+ `hora_fin` TIME NOT NULL,
+ `descripcion` VARCHAR(255) default 'null' NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `turnos_FI_1` (`fk_ciclolectivo_id`),
+ CONSTRAINT `turnos_FK_1`
+ FOREIGN KEY (`fk_ciclolectivo_id`)
+ REFERENCES `ciclolectivo` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- periodo
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `periodo`;
+
+
+CREATE TABLE `periodo`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_ciclolectivo_id` INTEGER(11) NOT NULL,
+ `fecha_inicio` DATETIME NOT NULL,
+ `fecha_fin` DATETIME NOT NULL,
+ `descripcion` VARCHAR(255) default 'null' NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `periodo_FI_1` (`fk_ciclolectivo_id`),
+ CONSTRAINT `periodo_FK_1`
+ FOREIGN KEY (`fk_ciclolectivo_id`)
+ REFERENCES `ciclolectivo` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- conceptobaja
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `conceptobaja`;
+
+
+CREATE TABLE `conceptobaja`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) NOT NULL,
+ `descripcion` VARCHAR(255) default 'null',
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- tipodocente
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `tipodocente`;
+
+
+CREATE TABLE `tipodocente`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) NOT NULL,
+ `descripcion` VARCHAR(255) default 'null',
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- cargobaja
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `cargobaja`;
+
+
+CREATE TABLE `cargobaja`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) NOT NULL,
+ `descripcion` VARCHAR(255) default 'null',
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- calendariovacunacion
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `calendariovacunacion`;
+
+
+CREATE TABLE `calendariovacunacion`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) NOT NULL,
+ `descripcion` VARCHAR(255),
+ `periodo` VARCHAR(128),
+ `observacion` VARCHAR(255) default 'null',
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rel_calendariovacunacion_alumno
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rel_calendariovacunacion_alumno`;
+
+
+CREATE TABLE `rel_calendariovacunacion_alumno`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_alumno_id` INTEGER(11) NOT NULL,
+ `fk_calendariovacunacion_id` INTEGER(11) NOT NULL,
+ `observacion` VARCHAR(255),
+ `comprobante` INTEGER default 0 NOT NULL,
+ `fecha` DATETIME,
+ PRIMARY KEY (`id`),
+ INDEX `rel_calendariovacunacion_alumno_FI_1` (`fk_alumno_id`),
+ CONSTRAINT `rel_calendariovacunacion_alumno_FK_1`
+ FOREIGN KEY (`fk_alumno_id`)
+ REFERENCES `alumno` (`id`),
+ INDEX `rel_calendariovacunacion_alumno_FI_2` (`fk_calendariovacunacion_id`),
+ CONSTRAINT `rel_calendariovacunacion_alumno_FK_2`
+ FOREIGN KEY (`fk_calendariovacunacion_id`)
+ REFERENCES `calendariovacunacion` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- legajopedagogico
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `legajopedagogico`;
+
+
+CREATE TABLE `legajopedagogico`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_alumno_id` INTEGER(11) NOT NULL,
+ `titulo` VARCHAR(255) NOT NULL,
+ `resumen` LONGBLOB NOT NULL,
+ `texto` LONGBLOB NOT NULL,
+ `fecha` DATETIME NOT NULL,
+ `fk_usuario_id` INTEGER(11) NOT NULL,
+ `fk_legajocategoria_id` INTEGER(11) NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `legajopedagogico_FI_1` (`fk_alumno_id`),
+ CONSTRAINT `legajopedagogico_FK_1`
+ FOREIGN KEY (`fk_alumno_id`)
+ REFERENCES `alumno` (`id`),
+ INDEX `legajopedagogico_FI_2` (`fk_usuario_id`),
+ CONSTRAINT `legajopedagogico_FK_2`
+ FOREIGN KEY (`fk_usuario_id`)
+ REFERENCES `usuario` (`id`),
+ INDEX `legajopedagogico_FI_3` (`fk_legajocategoria_id`),
+ CONSTRAINT `legajopedagogico_FK_3`
+ FOREIGN KEY (`fk_legajocategoria_id`)
+ REFERENCES `legajocategoria` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- legajocategoria
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `legajocategoria`;
+
+
+CREATE TABLE `legajocategoria`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `descripcion` VARCHAR(255) NOT NULL,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- legajoadjunto
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `legajoadjunto`;
+
+
+CREATE TABLE `legajoadjunto`
+(
+ `fk_legajopedagogico_id` INTEGER(11) NOT NULL,
+ `fk_adjunto_id` INTEGER(11) NOT NULL,
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`),
+ INDEX `legajoadjunto_FI_1` (`fk_legajopedagogico_id`),
+ CONSTRAINT `legajoadjunto_FK_1`
+ FOREIGN KEY (`fk_legajopedagogico_id`)
+ REFERENCES `legajopedagogico` (`id`),
+ INDEX `legajoadjunto_FI_2` (`fk_adjunto_id`),
+ CONSTRAINT `legajoadjunto_FK_2`
+ FOREIGN KEY (`fk_adjunto_id`)
+ REFERENCES `adjunto` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- adjunto
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `adjunto`;
+
+
+CREATE TABLE `adjunto`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `descripcion` VARCHAR(255),
+ `titulo` VARCHAR(255),
+ `nombre_archivo` VARCHAR(255) NOT NULL,
+ `tipo_archivo` VARCHAR(64) NOT NULL,
+ `ruta` VARCHAR(255) NOT NULL,
+ `fecha` DATETIME NOT NULL,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- asistencia
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `asistencia`;
+
+
+CREATE TABLE `asistencia`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_alumno_id` INTEGER(11) NOT NULL,
+ `fk_tipoasistencia_id` INTEGER(11) NOT NULL,
+ `fecha` DATETIME NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `asistencia_FI_1` (`fk_alumno_id`),
+ CONSTRAINT `asistencia_FK_1`
+ FOREIGN KEY (`fk_alumno_id`)
+ REFERENCES `alumno` (`id`),
+ INDEX `asistencia_FI_2` (`fk_tipoasistencia_id`),
+ CONSTRAINT `asistencia_FK_2`
+ FOREIGN KEY (`fk_tipoasistencia_id`)
+ REFERENCES `tipoasistencia` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- concepto
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `concepto`;
+
+
+CREATE TABLE `concepto`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_establecimiento_id` INTEGER(11) default 0 NOT NULL,
+ `nombre` VARCHAR(128) NOT NULL,
+ `descripcion` VARCHAR(255),
+ PRIMARY KEY (`id`),
+ INDEX `concepto_FI_1` (`fk_establecimiento_id`),
+ CONSTRAINT `concepto_FK_1`
+ FOREIGN KEY (`fk_establecimiento_id`)
+ REFERENCES `establecimiento` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- escalanota
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `escalanota`;
+
+
+CREATE TABLE `escalanota`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_establecimiento_id` INTEGER(11) default 0 NOT NULL,
+ `nombre` VARCHAR(128) NOT NULL,
+ `descripcion` VARCHAR(255),
+ `orden` INTEGER(11) NOT NULL,
+ `aprobado` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `escalanota_FI_1` (`fk_establecimiento_id`),
+ CONSTRAINT `escalanota_FK_1`
+ FOREIGN KEY (`fk_establecimiento_id`)
+ REFERENCES `establecimiento` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- boletin_conceptual
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `boletin_conceptual`;
+
+
+CREATE TABLE `boletin_conceptual`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_escalanota_id` INTEGER(11) default 0 NOT NULL,
+ `fk_alumno_id` INTEGER(11) default 0 NOT NULL,
+ `fk_concepto_id` INTEGER(11) default 0 NOT NULL,
+ `fk_periodo_id` INTEGER(11) default 0 NOT NULL,
+ `observacion` LONGBLOB NOT NULL,
+ `fecha` DATETIME NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `boletin_conceptual_FI_1` (`fk_escalanota_id`),
+ CONSTRAINT `boletin_conceptual_FK_1`
+ FOREIGN KEY (`fk_escalanota_id`)
+ REFERENCES `escalanota` (`id`),
+ INDEX `boletin_conceptual_FI_2` (`fk_alumno_id`),
+ CONSTRAINT `boletin_conceptual_FK_2`
+ FOREIGN KEY (`fk_alumno_id`)
+ REFERENCES `alumno` (`id`),
+ INDEX `boletin_conceptual_FI_3` (`fk_concepto_id`),
+ CONSTRAINT `boletin_conceptual_FK_3`
+ FOREIGN KEY (`fk_concepto_id`)
+ REFERENCES `concepto` (`id`),
+ INDEX `boletin_conceptual_FI_4` (`fk_periodo_id`),
+ CONSTRAINT `boletin_conceptual_FK_4`
+ FOREIGN KEY (`fk_periodo_id`)
+ REFERENCES `periodo` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- boletin_actividades
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `boletin_actividades`;
+
+
+CREATE TABLE `boletin_actividades`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_escalanota_id` INTEGER(11) default 0 NOT NULL,
+ `fk_alumno_id` INTEGER(11) default 0 NOT NULL,
+ `fk_actividad_id` INTEGER(11) default 0 NOT NULL,
+ `fk_periodo_id` INTEGER(11) default 0 NOT NULL,
+ `observacion` LONGBLOB NOT NULL,
+ `fecha` DATETIME NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `boletin_actividades_FI_1` (`fk_escalanota_id`),
+ CONSTRAINT `boletin_actividades_FK_1`
+ FOREIGN KEY (`fk_escalanota_id`)
+ REFERENCES `escalanota` (`id`),
+ INDEX `boletin_actividades_FI_2` (`fk_alumno_id`),
+ CONSTRAINT `boletin_actividades_FK_2`
+ FOREIGN KEY (`fk_alumno_id`)
+ REFERENCES `alumno` (`id`),
+ INDEX `boletin_actividades_FI_3` (`fk_actividad_id`),
+ CONSTRAINT `boletin_actividades_FK_3`
+ FOREIGN KEY (`fk_actividad_id`)
+ REFERENCES `actividad` (`id`),
+ INDEX `boletin_actividades_FI_4` (`fk_periodo_id`),
+ CONSTRAINT `boletin_actividades_FK_4`
+ FOREIGN KEY (`fk_periodo_id`)
+ REFERENCES `periodo` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- examen
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `examen`;
+
+
+CREATE TABLE `examen`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_escalanota_id` INTEGER(11) default 0 NOT NULL,
+ `fk_alumno_id` INTEGER(11) default 0 NOT NULL,
+ `fk_actividad_id` INTEGER(11) default 0 NOT NULL,
+ `fk_periodo_id` INTEGER(11) default 0 NOT NULL,
+ `nombre` VARCHAR(255) default 'null' NOT NULL,
+ `observacion` LONGBLOB NOT NULL,
+ `fecha` DATETIME NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `examen_FI_1` (`fk_escalanota_id`),
+ CONSTRAINT `examen_FK_1`
+ FOREIGN KEY (`fk_escalanota_id`)
+ REFERENCES `escalanota` (`id`),
+ INDEX `examen_FI_2` (`fk_alumno_id`),
+ CONSTRAINT `examen_FK_2`
+ FOREIGN KEY (`fk_alumno_id`)
+ REFERENCES `alumno` (`id`),
+ INDEX `examen_FI_3` (`fk_actividad_id`),
+ CONSTRAINT `examen_FK_3`
+ FOREIGN KEY (`fk_actividad_id`)
+ REFERENCES `actividad` (`id`),
+ INDEX `examen_FI_4` (`fk_periodo_id`),
+ CONSTRAINT `examen_FK_4`
+ FOREIGN KEY (`fk_periodo_id`)
+ REFERENCES `periodo` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- anio
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `anio`;
+
+
+CREATE TABLE `anio`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_establecimiento_id` INTEGER(11) default 0 NOT NULL,
+ `descripcion` VARCHAR(255) default 'null' NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `anio_FI_1` (`fk_establecimiento_id`),
+ CONSTRAINT `anio_FK_1`
+ FOREIGN KEY (`fk_establecimiento_id`)
+ REFERENCES `establecimiento` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- division
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `division`;
+
+
+CREATE TABLE `division`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_anio_id` INTEGER(11) default 0 NOT NULL,
+ `descripcion` VARCHAR(255) default 'null' NOT NULL,
+ `fk_turnos_id` INTEGER(11) default 0 NOT NULL,
+ `orden` INTEGER default 0,
+ PRIMARY KEY (`id`),
+ INDEX `division_FI_1` (`fk_anio_id`),
+ CONSTRAINT `division_FK_1`
+ FOREIGN KEY (`fk_anio_id`)
+ REFERENCES `anio` (`id`),
+ INDEX `division_FI_2` (`fk_turnos_id`),
+ CONSTRAINT `division_FK_2`
+ FOREIGN KEY (`fk_turnos_id`)
+ REFERENCES `turnos` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- repeticion
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `repeticion`;
+
+
+CREATE TABLE `repeticion`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `descripcion` VARCHAR(255) default 'null' NOT NULL,
+ `orden` INTEGER(11) default 0 NOT NULL,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- actividad
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `actividad`;
+
+
+CREATE TABLE `actividad`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_establecimiento_id` INTEGER(11) default 0 NOT NULL,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255),
+ PRIMARY KEY (`id`),
+ INDEX `actividad_FI_1` (`fk_establecimiento_id`),
+ CONSTRAINT `actividad_FK_1`
+ FOREIGN KEY (`fk_establecimiento_id`)
+ REFERENCES `establecimiento` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rel_anio_actividad
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rel_anio_actividad`;
+
+
+CREATE TABLE `rel_anio_actividad`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_anio_id` INTEGER(11) default 0 NOT NULL,
+ `fk_actividad_id` INTEGER(11) default 0 NOT NULL,
+ `horas` DECIMAL(10,2) default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `rel_anio_actividad_FI_1` (`fk_anio_id`),
+ CONSTRAINT `rel_anio_actividad_FK_1`
+ FOREIGN KEY (`fk_anio_id`)
+ REFERENCES `anio` (`id`),
+ INDEX `rel_anio_actividad_FI_2` (`fk_actividad_id`),
+ CONSTRAINT `rel_anio_actividad_FK_2`
+ FOREIGN KEY (`fk_actividad_id`)
+ REFERENCES `actividad` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rel_alumno_division
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rel_alumno_division`;
+
+
+CREATE TABLE `rel_alumno_division`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_division_id` INTEGER(11) default 0 NOT NULL,
+ `fk_alumno_id` INTEGER(11) default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `rel_alumno_division_FI_1` (`fk_division_id`),
+ CONSTRAINT `rel_alumno_division_FK_1`
+ FOREIGN KEY (`fk_division_id`)
+ REFERENCES `division` (`id`),
+ INDEX `rel_alumno_division_FI_2` (`fk_alumno_id`),
+ CONSTRAINT `rel_alumno_division_FK_2`
+ FOREIGN KEY (`fk_alumno_id`)
+ REFERENCES `alumno` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rel_division_actividad_docente
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rel_division_actividad_docente`;
+
+
+CREATE TABLE `rel_division_actividad_docente`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_division_id` INTEGER(11) default 0,
+ `fk_actividad_id` INTEGER(11) default 0 NOT NULL,
+ `fk_docente_id` INTEGER(11) default 0,
+ `fk_evento_id` INTEGER(11) default 0,
+ `fk_repeticion_id` INTEGER(11) default 0,
+ `fecha_inicio` DATETIME NOT NULL,
+ `fecha_fin` DATETIME NOT NULL,
+ `hora_inicio` TIME NOT NULL,
+ `hora_fin` TIME NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `rel_division_actividad_docente_FI_1` (`fk_division_id`),
+ CONSTRAINT `rel_division_actividad_docente_FK_1`
+ FOREIGN KEY (`fk_division_id`)
+ REFERENCES `division` (`id`),
+ INDEX `rel_division_actividad_docente_FI_2` (`fk_actividad_id`),
+ CONSTRAINT `rel_division_actividad_docente_FK_2`
+ FOREIGN KEY (`fk_actividad_id`)
+ REFERENCES `actividad` (`id`),
+ INDEX `rel_division_actividad_docente_FI_3` (`fk_docente_id`),
+ CONSTRAINT `rel_division_actividad_docente_FK_3`
+ FOREIGN KEY (`fk_docente_id`)
+ REFERENCES `docente` (`id`),
+ INDEX `rel_division_actividad_docente_FI_4` (`fk_evento_id`),
+ CONSTRAINT `rel_division_actividad_docente_FK_4`
+ FOREIGN KEY (`fk_evento_id`)
+ REFERENCES `evento` (`id`),
+ INDEX `rel_division_actividad_docente_FI_5` (`fk_repeticion_id`),
+ CONSTRAINT `rel_division_actividad_docente_FK_5`
+ FOREIGN KEY (`fk_repeticion_id`)
+ REFERENCES `repeticion` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- docente
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `docente`;
+
+
+CREATE TABLE `docente`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `apellido` VARCHAR(128) default 'null' NOT NULL,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `sexo` CHAR(1) NOT NULL,
+ `fecha_nacimiento` DATETIME NOT NULL,
+ `fk_tipodocumento_id` INTEGER(11) default 0 NOT NULL,
+ `nro_documento` VARCHAR(16) default 'null' NOT NULL,
+ `direccion` VARCHAR(128) default 'null',
+ `ciudad` VARCHAR(128) default 'null',
+ `codigo_postal` VARCHAR(20) default 'null',
+ `email` VARCHAR(255) default 'null',
+ `telefono` VARCHAR(20) default 'null',
+ `telefono_movil` VARCHAR(20) default 'null',
+ `titulo` VARCHAR(128) default 'null' NOT NULL,
+ `libreta_sanitaria` INTEGER default 0,
+ `psicofisico` INTEGER default 0,
+ `activo` INTEGER default 1,
+ `fk_provincia_id` INTEGER(11) default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `docente_FI_1` (`fk_tipodocumento_id`),
+ CONSTRAINT `docente_FK_1`
+ FOREIGN KEY (`fk_tipodocumento_id`)
+ REFERENCES `tipodocumento` (`id`),
+ INDEX `docente_FI_2` (`fk_provincia_id`),
+ CONSTRAINT `docente_FK_2`
+ FOREIGN KEY (`fk_provincia_id`)
+ REFERENCES `provincia` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rel_docente_establecimiento
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rel_docente_establecimiento`;
+
+
+CREATE TABLE `rel_docente_establecimiento`
+(
+ `fk_establecimiento_id` INTEGER(11) default 0 NOT NULL,
+ `fk_docente_id` INTEGER(11) default 0 NOT NULL,
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ PRIMARY KEY (`id`),
+ INDEX `rel_docente_establecimiento_FI_1` (`fk_establecimiento_id`),
+ CONSTRAINT `rel_docente_establecimiento_FK_1`
+ FOREIGN KEY (`fk_establecimiento_id`)
+ REFERENCES `establecimiento` (`id`),
+ INDEX `rel_docente_establecimiento_FI_2` (`fk_docente_id`),
+ CONSTRAINT `rel_docente_establecimiento_FK_2`
+ FOREIGN KEY (`fk_docente_id`)
+ REFERENCES `docente` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- tipodocumento
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `tipodocumento`;
+
+
+CREATE TABLE `tipodocumento`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255) default 'null',
+ `orden` INTEGER(11) default 0,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rel_actividad_docente
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rel_actividad_docente`;
+
+
+CREATE TABLE `rel_actividad_docente`
+(
+ `fk_actividad_id` INTEGER(11) NOT NULL,
+ `fk_docente_id` INTEGER(11) NOT NULL,
+ PRIMARY KEY (`fk_actividad_id`,`fk_docente_id`),
+ CONSTRAINT `rel_actividad_docente_FK_1`
+ FOREIGN KEY (`fk_actividad_id`)
+ REFERENCES `actividad` (`id`),
+ INDEX `rel_actividad_docente_FI_2` (`fk_docente_id`),
+ CONSTRAINT `rel_actividad_docente_FK_2`
+ FOREIGN KEY (`fk_docente_id`)
+ REFERENCES `docente` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- docente_horario
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `docente_horario`;
+
+
+CREATE TABLE `docente_horario`
+(
+ `fk_docente_id` INTEGER(11) NOT NULL,
+ `fk_evento_id` INTEGER(11) NOT NULL,
+ PRIMARY KEY (`fk_docente_id`,`fk_evento_id`),
+ CONSTRAINT `docente_horario_FK_1`
+ FOREIGN KEY (`fk_docente_id`)
+ REFERENCES `docente` (`id`),
+ INDEX `docente_horario_FI_2` (`fk_evento_id`),
+ CONSTRAINT `docente_horario_FK_2`
+ FOREIGN KEY (`fk_evento_id`)
+ REFERENCES `evento` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- feriado
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `feriado`;
+
+
+CREATE TABLE `feriado`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) NOT NULL,
+ `fecha` DATETIME NOT NULL,
+ `repeticion_anual` INTEGER default 0,
+ `inamovible` INTEGER default 0,
+ `fk_ciclolectivo_id` INTEGER(11) default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `feriado_FI_1` (`fk_ciclolectivo_id`),
+ CONSTRAINT `feriado_FK_1`
+ FOREIGN KEY (`fk_ciclolectivo_id`)
+ REFERENCES `ciclolectivo` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- horarioescolar
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `horarioescolar`;
+
+
+CREATE TABLE `horarioescolar`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) NOT NULL,
+ `descripcion` VARCHAR(255),
+ `fk_evento_id` INTEGER default 0 NOT NULL,
+ `fk_establecimiento_id` INTEGER default 0 NOT NULL,
+ `fk_turnos_id` INTEGER default 0 NOT NULL,
+ `fk_horarioescolartipo_id` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`),
+ INDEX `horarioescolar_FI_1` (`fk_evento_id`),
+ CONSTRAINT `horarioescolar_FK_1`
+ FOREIGN KEY (`fk_evento_id`)
+ REFERENCES `evento` (`id`),
+ INDEX `horarioescolar_FI_2` (`fk_establecimiento_id`),
+ CONSTRAINT `horarioescolar_FK_2`
+ FOREIGN KEY (`fk_establecimiento_id`)
+ REFERENCES `establecimiento` (`id`),
+ INDEX `horarioescolar_FI_3` (`fk_turnos_id`),
+ CONSTRAINT `horarioescolar_FK_3`
+ FOREIGN KEY (`fk_turnos_id`)
+ REFERENCES `turnos` (`id`),
+ INDEX `horarioescolar_FI_4` (`fk_horarioescolartipo_id`),
+ CONSTRAINT `horarioescolar_FK_4`
+ FOREIGN KEY (`fk_horarioescolartipo_id`)
+ REFERENCES `horarioescolartipo` (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- horarioescolartipo
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `horarioescolartipo`;
+
+
+CREATE TABLE `horarioescolartipo`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255),
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- tipoasistencia
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `tipoasistencia`;
+
+
+CREATE TABLE `tipoasistencia`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(10) NOT NULL,
+ `descripcion` VARCHAR(255) default 'null',
+ `valor` DECIMAL(4,2) default 1 NOT NULL,
+ `grupo` VARCHAR(30) default 'null',
+ `defecto` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rol_responsable
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rol_responsable`;
+
+
+CREATE TABLE `rol_responsable`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `nombre` VARCHAR(128) default 'null' NOT NULL,
+ `descripcion` VARCHAR(255) default 'null',
+ `activo` INTEGER default 1 NOT NULL,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- evento
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `evento`;
+
+
+CREATE TABLE `evento`
+(
+ `id` INTEGER NOT NULL AUTO_INCREMENT,
+ `titulo` VARCHAR(128) NOT NULL,
+ `fecha_inicio` DATETIME NOT NULL,
+ `fecha_fin` DATETIME NOT NULL,
+ `tipo` INTEGER default 0 NOT NULL,
+ `frecuencia` INTEGER default 0 NOT NULL,
+ `frecuencia_intervalo` INTEGER default 0 NOT NULL,
+ `recurrencia_fin` VARCHAR(16) default 'null',
+ `recurrencia_dias` INTEGER default 0 NOT NULL,
+ `estado` INTEGER default 0 NOT NULL,
+ PRIMARY KEY (`id`)
+)Type=InnoDB;
+
+#-----------------------------------------------------------------------------
+#-- rel_rolresponsable_responsable
+#-----------------------------------------------------------------------------
+
+DROP TABLE IF EXISTS `rel_rolresponsable_responsable`;
+
+
+CREATE TABLE `rel_rolresponsable_responsable`
+(
+ `id` INTEGER(11) NOT NULL AUTO_INCREMENT,
+ `fk_rolresponsable_id` INTEGER(11) default 0 NOT NULL,
+ `fk_responsable_id` INTEGER(11) default 0 NOT NULL,
+ `fk_alumno_id` INTEGER(11) default 0 NOT NULL,
+ `descripcion` VARCHAR(255) default 'null',
+ PRIMARY KEY (`id`),
+ INDEX `rel_rolresponsable_responsable_FI_1` (`fk_rolresponsable_id`),
+ CONSTRAINT `rel_rolresponsable_responsable_FK_1`
+ FOREIGN KEY (`fk_rolresponsable_id`)
+ REFERENCES `rol_responsable` (`id`),
+ INDEX `rel_rolresponsable_responsable_FI_2` (`fk_responsable_id`),
+ CONSTRAINT `rel_rolresponsable_responsable_FK_2`
+ FOREIGN KEY (`fk_responsable_id`)
+ REFERENCES `responsable` (`id`),
+ INDEX `rel_rolresponsable_responsable_FI_3` (`fk_alumno_id`),
+ CONSTRAINT `rel_rolresponsable_responsable_FK_3`
+ FOREIGN KEY (`fk_alumno_id`)
+ REFERENCES `alumno` (`id`)
+)Type=InnoDB;
+
+# This restores the fkey checks, after having unset them earlier
+SET FOREIGN_KEY_CHECKS = 1;
Deleted: prosistem/alba/trunk/index.php
===================================================================
--- prosistem/alba/trunk/index.php 2007-07-25 15:47:05 UTC (rev 4868)
+++ prosistem/alba/trunk/index.php 2007-07-25 16:24:14 UTC (rev 4869)
@@ -1,673 +0,0 @@
-<?php
-/**
- * This file is part of Alba.
- *
- * Alba is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Alba is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Alba; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-
-/**
- * instalador
- *
- * @package alba
- * @author José Luis Di Biase <josx(a)interorganic.com.ar>
- * @author Héctor Sanchez <hsanchez(a)pressenter.com.ar>
- * @author Fernando Toledo <ftoledo(a)pressenter.com.ar>
- * @version SVN: $Id$
- * @filesource
- * @license GPL
- */
-
-
- define("OS_WINDOWS",((strtoupper(substr(PHP_OS,0,3))=='WIN'))?true:false);
-
- define("APACHE_REQUIRED_VERSION","2.0.0");
- define("PHP_REQUIRED_VERSION","5.0.0");
- define("MEMORY_LIMIT_REQUIRED", "16");
- define("MYSQL_REQUIRED_VERSION","4.1.0");
-
- define("INSTALL_DIR", getcwd().DIRECTORY_SEPARATOR);
-
- chdir("alba".DIRECTORY_SEPARATOR);
- define("ALBA_PATH", getcwd().DIRECTORY_SEPARATOR);
-
- define("INSTALL_COMPLETE_DIR",ALBA_PATH."log");
- define("INSTALL_COMPLETE_FILE",INSTALL_COMPLETE_DIR.DIRECTORY_SEPARATOR."instalacion_completa");
- define("DEBUG_LOG",INSTALL_COMPLETE_DIR.DIRECTORY_SEPARATOR."install.log");
- //define("DEBUG_LOG","install.log");
- define("ALBA_WEB",ALBA_PATH."web".DIRECTORY_SEPARATOR);
- define("CONFIG_PATH", ALBA_PATH."config".DIRECTORY_SEPARATOR);
-
- define("APACHE_CONFIG_DIST", CONFIG_PATH."apache.conf.dist");
- define("DATABASE_CONFIG_DIST", CONFIG_PATH."databases.yml.dist");
- define("PROPEL_CONFIG_DIST", CONFIG_PATH."propel.ini.dist");
- define("HTACCESS_DIST", ALBA_WEB.".htaccess.dist");
- define("SCHEMA_DIST", CONFIG_PATH."schema.xml.dist");
-
- define("APACHE_CONFIG", CONFIG_PATH."apache.conf");
- define("DATABASE_CONFIG", CONFIG_PATH."databases.yml");
- define("PROPEL_CONFIG", CONFIG_PATH."propel.ini");
- define("HTACCESS", ALBA_WEB.".htaccess");
- define("SCHEMA", CONFIG_PATH."schema.xml");
-
- define("SYMFONY_DIR","symfony-1.0.0");
-
- define("IMG_OK", "<img src='installer/images/save.png'>");
- define("IMG_NOT_OK", "<img src='installer/images/delete.png'>");
-
- define("SQL_CREATE_DB", ALBA_PATH."data".DIRECTORY_SEPARATOR."sql".DIRECTORY_SEPARATOR."create-db.sql");
- define("SQL_CREATE", ALBA_PATH."data".DIRECTORY_SEPARATOR."sql".DIRECTORY_SEPARATOR."schema.sql");
- define("SQL_INSERT_INICIAL", ALBA_PATH."data".DIRECTORY_SEPARATOR."sql".DIRECTORY_SEPARATOR."datos_desde_cero.sql");
- define("SQL_INSERT_EJEMPLO", ALBA_PATH."data".DIRECTORY_SEPARATOR."sql".DIRECTORY_SEPARATOR."datos_ejemplo.sql");
-
- define("CURRENT_WEB_DIR",dirname($_SERVER["PHP_SELF"])."/");
- define("SYMFONY_WEB_DIR", "public_html");
-
- define("SERVER","http://" . $_SERVER['SERVER_NAME'].CURRENT_WEB_DIR);
- define("SYMFONY_WINDOWS_WEB_DIR","alba/web"); // directorio directo del web en alba
- define("REDIRECT_URL",(OS_WINDOWS)?SERVER.SYMFONY_WINDOWS_WEB_DIR."/index.php":SERVER.SYMFONY_WEB_DIR."/");
-
-
- if(!file_exists(INSTALL_COMPLETE_FILE)) {
-
- $fp = fopen(DEBUG_LOG, "at" );
- fputs( $fp,date( "d/m/Y H:m:s")." ---- INICIO DE VERIFICACIONES ----\n\n" );
-
- if(OS_WINDOWS) {
- @unlink(ALBA_PATH.".htaccess");
- @unlink(INSTALL_DIR."dist/.htaccess");
- fputs( $fp,date( "d/m/Y H:m:s")." SO: Windows \n\n" );
- }
- else
- fputs( $fp,date( "d/m/Y H:m:s")." SO: Linux \n\n" );
-
- //muchas veces tarda demasiado por lo que es prudente ponerle un infinito tiempo de ejecucion
- set_time_limit(0);
-
-
-
-
- $f_phpversion = function_exists ("phpversion");
- $f_apache_get_version = function_exists ("apache_get_version");
- $f_get_magic_quotes_gpc = function_exists ("get_magic_quotes_gpc");
- $f_mysql_module = function_exists ("mysql_connect");
-
- $msg_phpversion = "";
- $msg_apache_get_version = "";
- $msg_mysql_module = "";
- $msg_mod_rewrite = "";
- $msg_get_magic_quotes_gpc = "";
-
- $bool_mysql_module = false;
- $bool_phpversion = false;
- $bool_apache_get_version = false;
- $bool_gd = estaExtensionPHP("gd");
- $bool_mod_rewrite = false;
- $bool_get_magic_quotes_gpc = false;
-
- $memory_limit = ini_get('memory_limit');
- if($memory_limit != '') {
- $bool_memory_limit = compruebaMemoriaMaxima($memory_limit);
- $bool_memory_no_chequeo = true;
- } else {
- $bool_memory_limit = true;
- $memory_limit = "No se pudo conocer la cantidad de memoria disponible en su PHP.";
- $bool_memory_no_chequeo = false;
- }
- fputs( $fp,date( "d/m/Y H:m:s")." memory_limit: $memory_limit\n\n" );
-
- $bool_cache = tienePermisoEscritura(ALBA_PATH."cache");
- $bool_log = tienePermisoEscritura(ALBA_PATH."log");
- $bool_upload = tienePermisoEscritura(ALBA_WEB."uploads");
- $bool_tmp = tienePermisoEscritura(ALBA_WEB."tmp");
- $bool_config = tienePermisoEscritura(ALBA_PATH."config");
-
- if($f_phpversion) {
- $bool_phpversion = compruebaVersion(phpversion(),PHP_REQUIRED_VERSION);
- $msg_phpversion = "Su versión de PHP es ".phpversion();
- } else {
- $msg_phpversion = "No se pudo verificar la versión de PHP";
-
- }
- fputs( $fp,date( "d/m/Y H:m:s")." phpversion: $msg_phpversion\n\n" );
-
- if($f_apache_get_version) {
- preg_match('!Apache/(.*) !U', apache_get_version(), $v);
- $apache_installed_version = $v[1];
- $bool_apache_get_version = compruebaVersion($apache_installed_version, APACHE_REQUIRED_VERSION);
- $msg_apache_get_version = "Su versión de APACHE es ".$apache_installed_version;
- $bool_mod_rewrite = estaExtensionApache("mod_rewrite");
-
- if($bool_mod_rewrite) {
- $msg_mod_rewrite = "";
- } else {
- $msg_mod_rewrite = "Por favor instale el mod_rewrite en el apache";
- }
-
- } else {
- $msg_apache_get_version = "No se pudo verificar la versión de APACHE";
- $msg_mod_rewrite = "( Al no poder verificar la versión de APACHE, tampoco pudo hacerlo para el mod_rewrite )";
- }
- fputs( $fp,date( "d/m/Y H:m:s")." apache_get_version: $msg_apache_get_version\n\n" );
- fputs( $fp,date( "d/m/Y H:m:s")." mod_rewrite: $msg_mod_rewrite\n\n" );
-
- if($f_mysql_module) {
- $bool_mysql_module = true;
- $msg_mysql_module = "Tiene instalado el modulo MYSQL en PHP";
- } else
- $msg_mysql_module = "No tiene instalado el modulo MYSQL en PHP";
-
- fputs( $fp,date( "d/m/Y H:m:s")." mysql_module: $msg_mysql_module\n\n" );
-
- if($f_get_magic_quotes_gpc) {
- $bool_get_magic_quotes_gpc = get_magic_quotes_gpc();
- if(!$bool_get_magic_quotes_gpc) {
- $bool_get_magic_quotes_gpc = true;
- $msg_get_magic_quotes_gpc = "";
- } else {
- $msg_get_magic_quotes_gpc = "Tiene que cambiar el valor de la variable magic_quotes_gpc de On a Off";
- }
- } else {
- $msg_get_magic_quotes_gpc = " No se pudo verificar si usted tiene (magic_quotes_gpc = off) en el php.ini";
- }
- fputs( $fp,date( "d/m/Y H:m:s")." magic_quotes: $msg_get_magic_quotes_gpc\n\n" );
-
- $hasErrors = false;
- $aError = array();
- $aDb = array( 'server' => '', 'user' => '', 'password' => '', 'name' => '', 'createdb' => '' ) ;
-
- if(!file_exists(SQL_CREATE)) {
- $hasErrors = true;
- $aError['sql_files'] = 'El archivo para el SQL no puede abrirse';
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_CREATE: ".$aError['sql_files']."\n\n" );
- }
- else
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_CREATE: OK \n\n" );
-
- if(!file_exists(SQL_INSERT_INICIAL)){
- $hasErrors = true;
- $aError['sql_files'] = 'El archivo para el SQL no puede abrirse';
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_INSERT_INICIAL: ".$aError['sql_files']."\n\n" );
- }
- else
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_INSERT_INICIAL: OK \n\n" );
-
- if(!file_exists(SQL_INSERT_EJEMPLO)){
- $hasErrors = true;
- $aError['sql_files'] = 'El archivo para el SQL no puede abrirse';
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_INSERT_EJEMPLO: ".$aError['sql_files']."\n\n" );
- }
- else
- fputs( $fp,date( "d/m/Y H:m:s")." SQL_INSERT_EJEMPLO: OK \n\n" );
-
- fputs( $fp,date( "d/m/Y H:m:s")." ---- FIN DE VERIFICACIONES ----\n\n" );
- fputs( $fp,date( "d/m/Y H:m:s")." ---- INICIO DB ----\n\n" );
- if ($_SERVER['REQUEST_METHOD'] == "POST") {
-
- if(!isset($_POST['db']['createdb']))
- $_POST['db']['createdb'] = false;
-
- $db_connection = @mysql_connect( $_POST['db']['server'], $_POST['db']['user'], $_POST['db']['password']);
- if ($db_connection) {
- $mysql_server_version = mysql_get_server_info();
- fputs( $fp,date( "d/m/Y H:m:s")." mysql_server_version: ".$mysql_server_version ."\n\n" );
- if(compruebaVersion($mysql_server_version, MYSQL_REQUIRED_VERSION)) {
- if($_POST['db']['createdb']) {
- fputs( $fp,date( "d/m/Y H:m:s")." -- Create DB --\n\n" );
- if(!@mysql_query('CREATE DATABASE '.$_POST['db']['name'].' DEFAULT CHARACTER SET utf8 COLLATE utf8_bin')) {
- $hasErrors = true;
- $aError['newdb'] = 'No se pudo crear la base de datos ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." newdb: ".$aError['newdb']."\n\n" );
- $aDb = array( 'server' => $_POST['db']['server'] , 'user' => $_POST['db']['user'], 'password' => $_POST['db']['password'], 'name' => $_POST['db']['name'], 'createdb' => $_POST['db']['createdb']) ;
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." Se creo la base de datos OK--\n\n" );
- if(doInstall($fp)) {
- fputs( $fp,date( "d/m/Y H:m:s")." Fin doInstall (create_db): OK \n\n" );
- fclose( $fp );
- header("Location: ".REDIRECT_URL);
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." Fin doInstall (create_db): con Error \n\n" );
- if (!@mysql_query('DROP DATABASE '.$_POST['db']['name'])){
- $aError['insert_create'] = 'No se pudo eliminar la base de datos creada ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." insert_create (create_db): ".$aError['insert_create']."\n\n" );
- }
- else {
- $aError['insert_create'] = 'Se elimino la base de datos creada ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." insert_create (create_db): ".$aError['insert_create']."\n\n" );
- }
- $hasErrors = true;
- }
- }
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." -- Select DB --\n\n" );
- if(@mysql_select_db($_POST['db']['name'])) {
- if(doInstall($fp)) {
- fputs( $fp,date( "d/m/Y H:m:s")." Fin doInstall (select_db): OK \n\n" );
- fclose( $fp );
- header("Location: ".REDIRECT_URL);
- } else {
- $aError['insert_create'] = 'No se pudo agregar los datos a la base de datos existente ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." insert_create (select_db): ".$aError['insert_create']."\n\n" );
- $hasErrors = true;
- }
- } else {
- $hasErrors = true;
- $aError['currentdb'] = 'No se pudo usar la base de datos ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." currentdb (select_db): ".$aError['currentdb']."\n\n" );
- $aDb = array( 'server' => $_POST['db']['server'] , 'user' => $_POST['db']['user'], 'password' => $_POST['db']['password'], 'name' => $_POST['db']['name'], 'createdb' => $_POST['db']['createdb']) ;
- }
- }
- } else {
- $hasErrors = true;
- $aError['mysql_version'] = 'Usted tiene una versión de MYSQL inferior a la'.MYSQL_REQUIRED_VERSION. '(Su versión actual es '.$mysql_server_version. ')';
- fputs( $fp,date( "d/m/Y H:m:s")." mysql_server_version: ".$aError['mysql_version']."\n\n" );
- $aDb = array( 'server' => $_POST['db']['server'] , 'user' => $_POST['db']['user'], 'password' => $_POST['db']['password'], 'name' => $_POST['db']['name'], 'createdb' => $_POST['db']['createdb'] );
- }
-
- mysql_close($db_connection);
- } else {
- $hasErrors = true;
- $aError['connect'] = 'No pudo conectarse al Servidor de Base de datos ('.mysql_error().')';
- fputs( $fp,date( "d/m/Y H:m:s")." connect: ".$aError['connect']."\n\n" );
- $aDb = array( 'server' => $_POST['db']['server'] , 'user' => $_POST['db']['user'], 'password' => $_POST['db']['password'], 'name' => $_POST['db']['name'], 'createdb' => $_POST['db']['createdb'] );
- }
-
- }
- fclose( $fp );
-?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/2000/REC-xhtml1-200000126/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <meta name="title" content="Proyecto ALBA" />
- <meta name="robots" content="index, follow" />
- <meta name="description" content="Proyecto de Gestión Educativa ALBA" />
- <meta name="keywords" content="alba, proyecto, software libre, educacion" />
- <meta name="language" content="es" />
- <title>Proyecto ALBA</title>
- <link rel="stylesheet" type="text/css" href="installer/css/main.css"/>
-</head>
-
-<body>
-<div id ="sf_admin_container">
-<h2>Verificaciones necesarias para la instalación</h2>
-<br>
-<h2>Programas</h2>
-
-<table border="0" cellpadding="3" width="600" class="sf_admin_list">
- <thead>
- <tr>
- <th id="sf_admin_list_th_verfica">Verificación</th>
- <th id="sf_admin_list_th_resultado">Resultado</th>
- </tr>
- </thead>
- <tr class="sf_admin_row_0" >
- <td>Versión de PHP >= 5.0.0</td>
- <td>
- <?=($bool_phpversion)?IMG_OK:IMG_NOT_OK?>(<?=$msg_phpversion?>)
- </td>
- </tr>
-
- <tr class="sf_admin_row_1" >
- <td>¿ Esta instalado MYSQL en PHP ?</td>
- <td>
- <?=($bool_mysql_module)?IMG_OK:IMG_NOT_OK?>(<?=$msg_mysql_module?>)
- </td>
- </tr>
-
-
- <tr class="sf_admin_row_0">
- <td>¿ Esta Instalado GD en PHP ? (optativo) </td>
- <td><?=($bool_gd)?IMG_OK:IMG_NOT_OK." (Si queres ver los gráficos de estadísticas necesitas instalar GD - http://www.php.net/manual/es/ref.image.php)";?></td>
- </tr>
-
- <tr class="sf_admin_row_1">
- <td>En php.ini memory_limit >= 32</td>
- <td><?=($bool_memory_limit AND $bool_memory_no_chequeo)?IMG_OK:IMG_NOT_OK;?>(<?=$memory_limit?>)</td>
- </tr>
-
- <tr class="sf_admin_row_1">
- <td>En php.ini magic_quotes_gpc = off</td>
- <td><?=($bool_get_magic_quotes_gpc)?IMG_OK:IMG_NOT_OK;?><?=$msg_get_magic_quotes_gpc?></td>
- </tr>
-
-
-
- <tr class="sf_admin_row_0">
- <td>Versióon de APACHE >= 2.0</td>
- <td><?=($bool_apache_get_version)?IMG_OK:IMG_NOT_OK?>(<?=$msg_apache_get_version?>)</td>
- </tr>
-
- <tr class="sf_admin_row_1">
- <td>¿ Esta instalado MOD_REWRITE en APACHE ?</td>
- <td><?=($bool_mod_rewrite)?IMG_OK:IMG_NOT_OK.$msg_mod_rewrite?></td>
- </tr>
-
-</table>
-<br>
-<h2>Directorios con permisos para escritura:</h2>
-<table border="0" cellpadding="3" width="600" class="sf_admin_list">
- <thead>
- <tr>
- <th id="sf_admin_list_th_dir">Directorios</th>
- <th id="sf_admin_list_th_resultado">Resultados</th>
- </tr>
- </thead>
- <tr class="sf_admin_row_0" >
- <td>/cache</td>
- <td><?=($bool_cache)?IMG_OK:IMG_NOT_OK." (chmod 777 ./alba/cache)";?></td>
- </tr>
- <tr class="sf_admin_row_1">
- <td>/log</td>
- <td><?=($bool_log)?IMG_OK:IMG_NOT_OK." (chmod 777 ./alba/logs)";?></td>
- </tr>
- <tr class="sf_admin_row_0">
- <td>/uploads</td>
- <td><?=($bool_upload)?IMG_OK:IMG_NOT_OK." (chmod 777 ./alba/web/uploads)";?></td>
- </tr>
- <tr class="sf_admin_row_1">
- <td>/config</td>
- <td><?=($bool_config)?IMG_OK:IMG_NOT_OK." (chmod 777 ./alba/config)";?></td>
-<?php // Aqui no deberiamos probar si tienen permisos los archivos databases.yml, propel.ini y web/.htaccess ?>
- </tr>
- <tr class="sf_admin_row_0">
- <td>/tmp</td>
- <td><?=($bool_tmp)?IMG_OK:IMG_NOT_OK." (chmod 777 ./alba/web/tmp)";?></td>
- </tr>
-
-</table>
-
-<?php if($bool_config AND $bool_upload AND $bool_tmp AND $bool_log AND $bool_cache AND $bool_memory_limit AND $bool_apache_get_version AND $bool_phpversion AND $bool_mysql_module AND $bool_mod_rewrite AND $bool_get_magic_quotes_gpc) { ?>
-
-<?php if($hasErrors) { ?>
- <br><br>
- <div class="form-errors">
- <h2>Arreglar errores para continuar</h2>
- <ul>
- <?php foreach ($aError as $idx => $name) { ?>
- <li><?php echo $name; ?></li>
- <?php } ?>
- </ul>
- </div>
-<?php } ?>
-
-
-
-<br>
-<h2>Datos para la instalación</h2>
-<form action="<?=$_SERVER['PHP_SELF']?>" method="POST" >
- <fieldset id="sf_fieldset_base_de_datos" class="">
- <h2>Conección a la base de datos</h2>
- <div class="form-row">
- <label for="db_server" class="required">Servidor:</label><div class="content"><input type="text" name="db[server]" value="<?=$aDb['server']?>" size="64" /></div>
- </div>
- <div class="form-row">
- <label for="db_user" class="required">Usuario:</label><div class="content"><input type="text" name="db[user]" value="<?=$aDb['user']?>" size="64" /></div>
- </div>
- <div class="form-row">
- <label for="db_password" class="required">Contraseña:</label><div class="content"><input type="password" name="db[password]" value="<?=$aDb['password']?>" size="64" /></div>
- </div>
- <div class="form-row">
- <label for="db_name" class="required">Nombre de base de datos:</label><div class="content"><input type="text" name="db[name]" value="<?=$aDb['name']?>" size="64" />
- Crear Base de datos <input type="checkbox" name="db[createdb]" value="crear" <?=($aDb['createdb'])?'checked':''?>>
- </div>
-
- <div class="form-row">
- <label for="db_name" class="required">¿Que datos quiere por defecto?:</label>
- <div class="content">
- Datos mínimos<input type="radio" name="db[datos]" value="minimos" checked >
- Caso de Ejemplo<input type="radio" name="db[datos]" value="ejemplo">
- </div>
- </div>
- </fieldset>
-
- <ul class="sf_admin_actions">
- <li><input type="submit" name="instalar" value="Instalar" class="sf_admin_action_instalar" /></li>
- <li><input type="reset" name="borrar" value="Borrar" class="sf_admin_action_borrar" /></li>
- </ul>
-</form>
-<? } else { ?>
-<br>
-<div align="center"><h2 style="color: #FF0000;">Para poder seguir con la instalción debe pasar completa la verificación.</h2></div>
-<? } ?>
-</div>
-</body>
-</html>
-
-
-<?
-// si existe el archivo de flag para la instacion
-} else { ?>
-<html>
-<body>
-Usted ya ha instalado el Proyetco ALBA. Si quiere volver a instalarlo debe borra el archivo alba/log/instalacion_completa.
-</body>
-</html>
-<? } ?>
-
-
-<?php
-
-/**
-* Funciones del instalador
-*/
-
-function compruebaVersion($instalada, $requireda) {
- return (version_compare($instalada, $requireda, ">="));
-}
-
-
-function compruebaMemoriaMaxima($php_memory) {
- $memory_limit = eregi_replace('[gmk]','',$php_memory);
- return ($memory_limit >= MEMORY_LIMIT_REQUIRED);
-
-}
-
-function estaExtensionPHP($ext) {
- $aExtension = get_loaded_extensions();
- if(count($aExtension)>0) {
- $res = array_search($ext, $aExtension);
- if($res === false) {
- return false;
- } else {
- return true;
- }
- } else {
- return false;
- }
-}
-
-
-function estaExtensionApache($ext) {
- $aApacheModulos = apache_get_modules();
- if(count($aApacheModulos)>0) {
- $res = array_search($ext, $aApacheModulos);
- if($res === false) {
- return false;
- } else {
- return true;
- }
- } else {
- return false;
- }
-}
-
-
-function tienePermisoEscritura($dir) {
- $octalPermiso = substr(sprintf('%o', @fileperms($dir)), -4);
- return ($octalPermiso == "0777" OR $octalPermiso == "1777");
-}
-
-
-function reemplzarArchivo($archivo, $aReemplazo) {
- $contenido = "";
- if(file_exists($archivo)) {
- $contenido = file_get_contents ($archivo);
- foreach($aReemplazo as $indice => $reemplazo) {
- $contenido = str_replace($indice, $reemplazo, $contenido);
- }
- }
- return $contenido;
-}
-
-
-
-// ojo que esto no funciona para cualquier cosa si dentro de un string de un insert hay un dato con ;\n se separa por eso tambien
-function dump2Array($file) {
- $aSql = array();
- $res_sql = "";
- if(file_exists($file)) {
- $sql = file($file);
- foreach($sql as $sql_line) {
- $sql_line = trim($sql_line);
- if (($sql_line != "") && (substr($sql_line, 0, 2) != "--") && (substr($sql_line, 0, 1) != "#") ) {
- $res_sql .= $sql_line."\n";
- }
- }
- $aSql= array_slice(explode(";\n", $res_sql),0,-1);
- }
- return $aSql;
-}
-
-function executeDump($file, $db,$fp) {
- fputs( $fp,date( "d/m/Y H:m:s")." Entrando ExecuteDump: $file - $db \n\n" );
- $aSql = dump2Array($file);
- $error = false;
- if(count($aSql) > 0 AND file_exists($file)) {
- if(mysql_select_db($db)) {
- fputs( $fp,date( "d/m/Y H:m:s")." ejecutando BEGIN \n\n" );
- mysql_query("BEGIN");
- foreach($aSql as $sql_line) {
- $res = mysql_query(trim($sql_line));
- if(!$res) {
- fputs( $fp,date( "d/m/Y H:m:s")." Fallo SQL: $sql_line \n\n" );
- fputs( $fp,date( "d/m/Y H:m:s")." error:". mysql_error()." \n\n" );
- $error = true;
- }
- }
- if($error == true) {
- fputs( $fp,date( "d/m/Y H:m:s")." Se encontraron errores ejecutando ROLLBACK y saliendo \n\n" );
- mysql_query("ROLLBACK");
- return false;
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." Sin errores ejecutando COMMIT y saliendo \n\n" );
- mysql_query("COMMIT");
- return true;
- }
- }
- else {
- fputs( $fp,date( "d/m/Y H:m:s")." Error al seleccionar la base: $db \n\n" );
- return false;
- }
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." Devuele false no ejecuta nada : $db \n\n" );
- return false;
- }
-
-}
-
-function doInstall($fp) {
- global $_POST;
- fputs( $fp,date( "d/m/Y H:m:s")." Entrando doInstall() \n\n" );
- //verifica que base de datos instalar si la del ejemplo o solamente la
- //de los datos_desde_cero iniciales
- switch($_POST['db']['datos']) {
- case "ejemplo": $sql_insert = SQL_INSERT_INICIAL; break;
- case "minimos": $sql_insert = SQL_INSERT_EJEMPLO; break;
- default: $sql_insert = SQL_INSERT_EJEMPLO;
- }
- fputs( $fp,date( "d/m/Y H:m:s")." Utilizando SQL: $sql_insert \n\n" );
- if(executeDump(SQL_CREATE, $_POST['db']['name'],$fp)) {
- if(executeDump($sql_insert, $_POST['db']['name'],$fp)) {
- $aReemplazo = array( 'USERDB' => $_POST['db']['user'], 'PASSDB' => $_POST['db']['password'], 'SERVER' => $_POST['db']['server'], 'DBNAME'=> $_POST['db']['name']);
- $contenido_archivo = reemplzarArchivo(DATABASE_CONFIG_DIST,$aReemplazo);
- file_put_contents(DATABASE_CONFIG, $contenido_archivo);
-
- $aReemplazo = array( 'USERDB' => $_POST['db']['user'], 'PASSDB' => $_POST['db']['password'], 'SERVER' => $_POST['db']['server'], 'DBNAME'=> $_POST['db']['name']);
- $contenido_archivo = reemplzarArchivo(PROPEL_CONFIG_DIST,$aReemplazo);
- file_put_contents(PROPEL_CONFIG, $contenido_archivo);
-
-
- _symlink(INSTALL_DIR."dist/".SYMFONY_DIR."/data/", ALBA_PATH."data/symfony");
- _symlink(INSTALL_DIR."dist/pake/", ALBA_PATH."lib/pake");
- _symlink(INSTALL_DIR."dist/phing.sandbox/", ALBA_PATH."lib/phing");
- _symlink(INSTALL_DIR."dist/".SYMFONY_DIR."/lib/", ALBA_PATH."lib/symfony");
- _symlink(INSTALL_DIR."alba/data/symfony/web/sf/", ALBA_WEB."sf");
- fputs( $fp,date( "d/m/Y H:m:s")." Creando Links \n\n" );
-
- $rewrite_path = (OS_WINDOWS)?CURRENT_WEB_DIR.SYMFONY_WINDOWS_WEB_DIR:CURRENT_WEB_DIR.SYMFONY_WEB_DIR;
-
- if(!OS_WINDOWS)
- _symlink(ALBA_WEB, INSTALL_DIR.SYMFONY_WEB_DIR); // crea nuevo link afuera de la estructura de alba
-
- $aReemplazo = Array('REWRITE_PATH' => $rewrite_path);
- $contenido_archivo = reemplzarArchivo(HTACCESS_DIST,$aReemplazo);
- file_put_contents(HTACCESS, $contenido_archivo);
- touch(INSTALL_COMPLETE_FILE);
- fputs( $fp,date( "d/m/Y H:m:s")." Creando bandera INSTALL_COMPLETE_FILE \n\n" );
- return true;
- }
- fputs( $fp,date( "d/m/Y H:m:s")." Fallo ejecutando: $sql_insert \n\n" );
- return false;
- } else {
- fputs( $fp,date( "d/m/Y H:m:s")." Fallo ejecutando: SQL_CREATE \n\n" );
- return false;
- }
-
-}
-
-
-function doUninstall() {
-
-}
-
-function _symlink( $target, $link ) {
- if (OS_WINDOWS) {
- @dircopy($target, $link);
- } else {
- @symlink($target,$link);
- }
-}
-
-
-function dircopy($srcdir, $dstdir, $verbose = false) {
- $num = 0;
- if(!is_dir($dstdir)) mkdir($dstdir);
- if($curdir = opendir($srcdir)) {
- while($file = readdir($curdir)) {
- if($file != '.' && $file != '..') {
- $srcfile = $srcdir . DIRECTORY_SEPARATOR . $file;
- $dstfile = $dstdir . DIRECTORY_SEPARATOR . $file;
- if(is_file($srcfile)) {
- if(is_file($dstfile)) $ow = filemtime($srcfile) - filemtime($dstfile); else $ow = 1;
- if($ow > 0) {
- if($verbose) echo "Copying '$srcfile' to '$dstfile'...";
- if(copy($srcfile, $dstfile)) {
- touch($dstfile, filemtime($srcfile)); $num++;
- if($verbose) echo "OK\n";
- }
- else echo "Error: File '$srcfile' could not be copied!\n";
- }
- }
- else if(is_dir($srcfile)) {
- $num += dircopy($srcfile, $dstfile, $verbose);
- }
- }
- }
- closedir($curdir);
- }
- return $num;
-}
-?>
\ No newline at end of file
Copied: prosistem/alba/trunk/install.php (from rev 4825, prosistem/alba/trunk/index.php)
1
0
SVN Alba r4868 - prosistem/alba/trunk/alba/apps/principal/modules/division/config
by commits@pressenter.com.ar 25 Jul '07
by commits@pressenter.com.ar 25 Jul '07
25 Jul '07
Author: josx
Date: 2007-07-25 12:47:05 -0300 (Wed, 25 Jul 2007)
New Revision: 4868
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml
Log:
Cambio en el modulo division el nombre del filtro a A?\195?\177o
Modified: prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml 2007-07-25 13:35:00 UTC (rev 4867)
+++ prosistem/alba/trunk/alba/apps/principal/modules/division/config/generator.yml 2007-07-25 15:47:05 UTC (rev 4868)
@@ -17,6 +17,8 @@
list:
title: Listado de Divisiones
+ fields:
+ fk_anioorden_id: { name: Año }
display: [ anio, descripcion, turnos, orden ]
object_actions:
_edit: -
1
0
SVN Alba r4867 - prosistem/alba/trunk/installer/dist/install
by commits@pressenter.com.ar 25 Jul '07
by commits@pressenter.com.ar 25 Jul '07
25 Jul '07
Author: ftoledo
Date: 2007-07-25 10:35:00 -0300 (Wed, 25 Jul 2007)
New Revision: 4867
Modified:
prosistem/alba/trunk/installer/dist/install/alba_loader.txt
Log:
correccion del url de descarga
Modified: prosistem/alba/trunk/installer/dist/install/alba_loader.txt
===================================================================
--- prosistem/alba/trunk/installer/dist/install/alba_loader.txt 2007-07-25 01:24:16 UTC (rev 4866)
+++ prosistem/alba/trunk/installer/dist/install/alba_loader.txt 2007-07-25 13:35:00 UTC (rev 4867)
@@ -8,13 +8,11 @@
#
# URL du paquet de la version STABLE a telecharger
- #define('_URL_PAQUET_ZIP','http://prosistem.opensa.com.ar:3334/~ftoledo/alba-installer/dist/alba-dist.…');
- define('_URL_PAQUET_ZIP','http://alba.ourproject.org/alba-installer/dist/alba-dist.zip');
+ define('_URL_PAQUET_ZIP','http://www.proyectoalba.com.ar/alba-installer/dist/alba-dist.zip');
# Adresse des librairies necessaires a spip_loader
# (pclzip et fichiers de langue)
- #define('_URL_LOADER_DL',"http://prosistem.opensa.com.ar:3334/~ftoledo/alba-installer/dist/install/");
- define('_URL_LOADER_DL',"http://alba.ourproject.org/alba-installer/dist/install/");
+ define('_URL_LOADER_DL',"http://www.proyectoalba.com.ar/alba-installer/dist/install/");
# telecharger a travers un proxy
define('_URL_LOADER_PROXY', '');
1
0
SVN Alba r4865 - in prosistem/alba/trunk/alba/plugins: . albaTasks albaTasks/data albaTasks/data/tasks
by commits@pressenter.com.ar 23 Jul '07
by commits@pressenter.com.ar 23 Jul '07
23 Jul '07
Author: ftoledo
Date: 2007-07-23 17:50:23 -0300 (Mon, 23 Jul 2007)
New Revision: 4865
Added:
prosistem/alba/trunk/alba/plugins/albaTasks/
prosistem/alba/trunk/alba/plugins/albaTasks/data/
prosistem/alba/trunk/alba/plugins/albaTasks/data/tasks/
prosistem/alba/trunk/alba/plugins/albaTasks/data/tasks/albaTasks.php
Log:
tareas de alba (inicial)
Added: prosistem/alba/trunk/alba/plugins/albaTasks/data/tasks/albaTasks.php
===================================================================
--- prosistem/alba/trunk/alba/plugins/albaTasks/data/tasks/albaTasks.php 2007-07-23 20:40:44 UTC (rev 4864)
+++ prosistem/alba/trunk/alba/plugins/albaTasks/data/tasks/albaTasks.php 2007-07-23 20:50:23 UTC (rev 4865)
@@ -0,0 +1,15 @@
+<?php
+
+pake_desc( 'Listado de Usuarios' );
+pake_task( 'alba-list-users', 'project_exists' );
+
+function run_alba_list_users( $task, $args )
+{
+ $users = UsuarioPeer::doSelect(new Criteria());
+ foreach ($users as $user) {
+ pake_echo_action ($user->getId(),$user->getUser());
+ echo "hola";
+ }
+}
+
+?>
Property changes on: prosistem/alba/trunk/alba/plugins/albaTasks/data/tasks/albaTasks.php
___________________________________________________________________
Name: svn:keywords
+ "Id Author Rev Date URL"
1
0
23 Jul '07
Author: josx
Date: 2007-07-23 17:40:44 -0300 (Mon, 23 Jul 2007)
New Revision: 4864
Modified:
prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql
prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
Log:
Agregue datos de ejemplo faltantes para rel_division_actividad_docente
Modified: prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql 2007-07-23 20:26:49 UTC (rev 4863)
+++ prosistem/alba/trunk/alba/data/sql/actualizacion_1.0rc_a_1.0rc2.sql 2007-07-23 20:40:44 UTC (rev 4864)
@@ -74,6 +74,7 @@
ALTER TABLE `horarioescolar` ADD `fk_evento_id` INT NOT NULL ;
ALTER TABLE `horarioescolar` ADD INDEX `fk_evento_FI_1` ( `fk_evento_id` );
-
+ALTER TABLE `rel_division_actividad_docente` DROP `fk_repeticion_id` , DROP `fecha_inicio`, DROP `fecha_fin`, DROP `hora_inicio`, DROP `hora_fin`;
+
SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
Modified: prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql
===================================================================
--- prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql 2007-07-23 20:26:49 UTC (rev 4863)
+++ prosistem/alba/trunk/alba/data/sql/datos_ejemplo.sql 2007-07-23 20:40:44 UTC (rev 4864)
@@ -2981,18 +2981,25 @@
INSERT INTO `rel_calendariovacunacion_alumno` (`id`, `fk_alumno_id`, `fk_calendariovacunacion_id`, `observacion`, `comprobante`, `fecha`) VALUES (4, 1, 3, '', 1, '2006-12-07 00:00:00');
--
--- Volcar la base de datos para la tabla `rel_division_actividad_docente`
+-- Volcar la base de datos para la tabla `ivision_actividad_docente`
--
-INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_repeticion_id`, `fecha_inicio`, `fecha_fin`, `hora_inicio`, `hora_fin`) VALUES (1, 8, 7, 1, '2006-09-11 00:00:00', '2006-09-11 00:00:00', '07:30:00', '08:10:00');
-INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_repeticion_id`, `fecha_inicio`, `fecha_fin`, `hora_inicio`, `hora_fin`) VALUES (2, 8, 7, 1, '2006-09-11 00:00:00', '2006-09-11 00:00:00', '08:10:00', '08:50:00');
-INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_repeticion_id`, `fecha_inicio`, `fecha_fin`, `hora_inicio`, `hora_fin`) VALUES (3, 8, 7, 1, '2006-09-12 00:00:00', '2006-09-12 00:00:00', '07:30:00', '08:10:00');
-INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_repeticion_id`, `fecha_inicio`, `fecha_fin`, `hora_inicio`, `hora_fin`) VALUES (4, 8, 7, 1, '2006-09-12 00:00:00', '2006-09-12 00:00:00', '08:10:00', '08:50:00');
-INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_repeticion_id`, `fecha_inicio`, `fecha_fin`, `hora_inicio`, `hora_fin`) VALUES (5, 8, 7, 1, '2006-09-13 00:00:00', '2006-09-13 00:00:00', '09:50:00', '10:30:00');
-INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_repeticion_id`, `fecha_inicio`, `fecha_fin`, `hora_inicio`, `hora_fin`) VALUES (6, 8, 7, 1, '2006-09-13 00:00:00', '2006-09-13 00:00:00', '10:40:00', '11:20:00');
-INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_repeticion_id`, `fecha_inicio`, `fecha_fin`, `hora_inicio`, `hora_fin`) VALUES (7, 8, 7, 1, '2006-09-14 00:00:00', '2006-09-14 00:00:00', '09:50:00', '10:30:00');
-INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_repeticion_id`, `fecha_inicio`, `fecha_fin`, `hora_inicio`, `hora_fin`) VALUES (8, 8, 7, 1, '2006-09-14 00:00:00', '2006-09-14 00:00:00', '10:40:00', '11:20:00');
+INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_docente_id`, `fk_evento_id`) VALUES (1, 8, 7, 3, 25);
+INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_docente_id`, `fk_evento_id`) VALUES (2, 8, 7, 3, 26);
+
+INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_docente_id`, `fk_evento_id`) VALUES (3, 10, 8, 4, 27);
+
+INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_docente_id`, `fk_evento_id`) VALUES (4, 10, 8, 4, 28);
+
+INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_docente_id`, `fk_evento_id`) VALUES (5, 12, 9, 5, 29);
+
+INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_docente_id`, `fk_evento_id`) VALUES (6, 12, 9, 5, 30);
+
+INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_docente_id`, `fk_evento_id`) VALUES (7, 14, 10, 6, 31);
+
+INSERT INTO `rel_division_actividad_docente` (`id`, `fk_division_id`, `fk_actividad_id`, `fk_docente_id`, `fk_evento_id`) VALUES (8, 14, 10, 6, 32);
+
--
-- Volcar la base de datos para la tabla `rel_docente_establecimiento`
--
@@ -3360,7 +3367,6 @@
INSERT INTO `evento` (`id`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`, `titulo`) VALUES (6, '2007-03-05 07:30:00', '2007-03-05 12:15:00', 1, 5, 1, '2007-12-14 00:00', 62, 1, '');
-
INSERT INTO `evento` (`id`, `titulo`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`) VALUES (7, '', '2007-03-05 07:30:00', '2007-03-05 08:10:00', 1, 5, 1, '2007-12-14 00:00', 62, 1);
INSERT INTO `evento` (`id`, `titulo`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`) VALUES (8, '', '2007-03-05 08:10:00', '2007-03-05 08:50:00', 1, 5, 1, '2007-12-14 00:00', 62, 1);
@@ -3400,5 +3406,25 @@
INSERT INTO `evento` (`id`, `titulo`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`) VALUES (24, '', '2007-03-05 16:30:00', '2007-03-05 17:10:00', 1, 5, 1, '2007-12-14 00:00', 62, 1);
+
+
+INSERT INTO `evento` (`id`, `titulo`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`) VALUES (25, '', '2007-03-05 07:30:00', '2007-03-05 08:10:00', 1, 5, 1, '2007-12-14 00:00', 6, 1);
+
+INSERT INTO `evento` (`id`, `titulo`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`) VALUES (26, '', '2007-03-05 14:50:00', '2007-03-05 15:30:00', 1, 5, 1, '2007-12-14 00:00', 6, 1);
+
+INSERT INTO `evento` (`id`, `titulo`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`) VALUES (27, '', '2007-03-05 07:30:00', '2007-03-05 08:10:00', 1, 5, 1, '2007-12-14 00:00', 6, 1);
+
+INSERT INTO `evento` (`id`, `titulo`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`) VALUES (28, '', '2007-03-05 14:50:00', '2007-03-05 15:30:00', 1, 5, 1, '2007-12-14 00:00', 6, 1);
+
+INSERT INTO `evento` (`id`, `titulo`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`) VALUES (29, '', '2007-03-05 07:30:00', '2007-03-05 08:10:00', 1, 5, 1, '2007-12-14 00:00', 6, 1);
+
+INSERT INTO `evento` (`id`, `titulo`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`) VALUES (30, '', '2007-03-05 14:50:00', '2007-03-05 15:30:00', 1, 5, 1, '2007-12-14 00:00', 6, 1);
+
+INSERT INTO `evento` (`id`, `titulo`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`) VALUES (31, '', '2007-03-05 07:30:00', '2007-03-05 08:10:00', 1, 5, 1, '2007-12-14 00:00', 6, 1);
+
+INSERT INTO `evento` (`id`, `titulo`, `fecha_inicio`, `fecha_fin`, `tipo`, `frecuencia`, `frecuencia_intervalo`, `recurrencia_fin`, `recurrencia_dias`, `estado`) VALUES (32, '', '2007-03-05 14:50:00', '2007-03-05 15:30:00', 1, 5, 1, '2007-12-14 00:00', 6, 1);
+
+
+
SET FOREIGN_KEY_CHECKS = 1;
1
0
SVN Alba r4863 - prosistem/alba/trunk/alba/apps/principal/i18n
by commits@pressenter.com.ar 23 Jul '07
by commits@pressenter.com.ar 23 Jul '07
23 Jul '07
Author: ftoledo
Date: 2007-07-23 17:26:49 -0300 (Mon, 23 Jul 2007)
New Revision: 4863
Modified:
prosistem/alba/trunk/alba/apps/principal/i18n/messages.es.xml
Log:
id's de traduccion repetidos
Modified: prosistem/alba/trunk/alba/apps/principal/i18n/messages.es.xml
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/i18n/messages.es.xml 2007-07-23 20:25:16 UTC (rev 4862)
+++ prosistem/alba/trunk/alba/apps/principal/i18n/messages.es.xml 2007-07-23 20:26:49 UTC (rev 4863)
@@ -74,11 +74,11 @@
<source>edit</source>
<target>Editar</target>
</trans-unit>
- <trans-unit id="18">
+ <trans-unit id="19">
<source>Unassociated</source>
<target>No Asociadas</target>
</trans-unit>
- <trans-unit id="18">
+ <trans-unit id="20">
<source>Associated</source>
<target>Asociadas</target>
</trans-unit>
1
0
SVN Alba r4862 - prosistem/alba/trunk/alba/apps/principal/modules/ciclolectivo/templates
by commits@pressenter.com.ar 23 Jul '07
by commits@pressenter.com.ar 23 Jul '07
23 Jul '07
Author: ftoledo
Date: 2007-07-23 17:25:16 -0300 (Mon, 23 Jul 2007)
New Revision: 4862
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/ciclolectivo/templates/cambiarSuccess.php
Log:
div sf_admin_container
Modified: prosistem/alba/trunk/alba/apps/principal/modules/ciclolectivo/templates/cambiarSuccess.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/ciclolectivo/templates/cambiarSuccess.php 2007-07-23 19:51:27 UTC (rev 4861)
+++ prosistem/alba/trunk/alba/apps/principal/modules/ciclolectivo/templates/cambiarSuccess.php 2007-07-23 20:25:16 UTC (rev 4862)
@@ -1,4 +1,5 @@
<?php use_helper('Object')?>
+<div id="sf_admin_container">
<?php if (count($cicloslectivos) != 0) :?>
<?php echo form_tag('ciclolectivo/actual')?>
@@ -11,4 +12,5 @@
</div>
</form>
-<?php endif;?>
\ No newline at end of file
+<?php endif;?>
+</div>
\ No newline at end of file
1
0
SVN Alba r4861 - prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates
by commits@pressenter.com.ar 23 Jul '07
by commits@pressenter.com.ar 23 Jul '07
23 Jul '07
Author: josx
Date: 2007-07-23 16:51:27 -0300 (Mon, 23 Jul 2007)
New Revision: 4861
Modified:
prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php
Log:
mas modificaiones al calendario vista por dia
Modified: prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php
===================================================================
--- prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php 2007-07-23 19:01:56 UTC (rev 4860)
+++ prosistem/alba/trunk/alba/apps/principal/modules/icalVisualizador/templates/_verPorDia.php 2007-07-23 19:51:27 UTC (rev 4861)
@@ -133,7 +133,7 @@
$newColspan = floor($nbrGridCols / ($event['event_overlap']+1));
?>
-<td rowspan="<?php echo $rowspan?>" width="<?php echo floor(460/($event['event_overlap']+1))?>" colspan="<?php echo floor($nbrGridCols / ($event['event_overlap']+1)) ?>" align="left" valign="top" class="eventbg2_1">
+<td rowspan="<?php echo $rowspan?>" width="<?php echo floor(460/($event['event_overlap']+1))?>" colspan="<?php echo $newColspan ?>" align="left" valign="top" class="eventbg2_1">
<div class="eventfont">
<div class="eventbg_1"><b><?php echo date("H:i A", $event['start_unixtime'])?></b> - <?php echo date("H:i A", $event['end_unixtime'])?></div>
<div class="padd"> <!-- style="width:<?php echo floor(460/($event['event_overlap']+1))?>px"> -->
1
0