/trunk/documentation/diagramme_classe .xmi |
---|
File deleted |
/trunk/documentation/IMAGE TABLE.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/documentation/model_reverse_engineered.xml |
---|
File deleted |
/trunk/documentation/image classe.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/documentation/gtt_migration_v3_v4.sql |
---|
New file |
0,0 → 1,41 |
ALTER TABLE gestion_v4.`gestion_absence` CHANGE `ga_id_abscence` `ga_id_abscence` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT ; |
INSERT INTO gestion_v4.gestion_absence |
( ga_ce_absence_motif, ga_ce_utilisateur, ga_date_debut, ga_date_fin, ga_date_envoi_lettre ) |
SELECT gma_id_motif, gu_id_utilisateur, ga_date_debut, ga_date_fin, ga_date_envoi_lettre FROM gestion_v3.gestion_absence; |
ALTER TABLE gestion_v4.`gestion_absence` CHANGE `ga_id_abscence` `ga_id_abscence` INT( 11 ) UNSIGNED NOT NULL ; |
INSERT INTO gestion_v4.gestion_absence_motif |
SELECT gma_id_motif, gma_libelle_motif, gma_type_rtt, (gma_nb_heures_supprim * 7) FROM gestion_v3.gestion_motif_absence; |
INSERT INTO gestion_v4.gestion_projet |
SELECT gp_id_projet, gc_id_categorie, gp_nom_projet, gp_description, gp_date_debut, gp_duree_prevue, gp_avancement FROM gestion_v3.gestion_projet; |
ALTER TABLE gestion_v4.`gestion_projet` ORDER BY `gp_id_projet` ; |
INSERT INTO gestion_v4.gestion_projet_categorie |
( gpc_id_categorie, gpc_libelle ) |
SELECT gc_id_categorie, gc_libelle_categorie FROM gestion_v3.gestion_categorie; |
ALTER TABLE gestion_v4.`gestion_projet_categorie` ORDER BY `gpc_id_categorie` ; |
INSERT INTO gestion_v4.gestion_projet_tache |
( gpt_id_tache, gpt_ce_projet, gpt_libelle, gpt_description, gpt_date_debut, gpt_duree_prevue, gpt_avancement) |
SELECT gt.gt_id_tache, gt.gp_id_projet, REPLACE(gt.gt_nom_tache,'é','é'), IFNULL(gt.gt_description_tache,''), gt.gt_date_debut_tache, gt.gt_duree_prevue, gt.gt_avancement |
FROM gestion_v3.gestion_taches AS gt ; |
REPLACE gestion_v4.gestion_projet_tache |
( gpt_id_tache, gpt_ce_tache_precedente, gpt_ce_projet, gpt_libelle, gpt_description, gpt_date_debut, gpt_duree_prevue, gpt_avancement) |
SELECT gt.gt_id_tache, gp.gpred_id_pred, gt.gp_id_projet, REPLACE(gt.gt_nom_tache,'é','é'), IFNULL(gt.gt_description_tache,''), gt.gt_date_debut_tache, gt.gt_duree_prevue, gt.gt_avancement |
FROM gestion_v3.gestion_taches AS gt, gestion_v3.gestion_predecesseurs AS gp |
WHERE gt.gt_id_tache = gp.gt_id_tache; |
INSERT INTO gestion_v4.gestion_travail_projet |
SELECT gu_id_utilisateur, gt_id_tache, gt_date_travail, gt_duree_travail FROM gestion_v3.gestion_travail; |
INSERT INTO gestion_v4.gestion_utilisateur |
SELECT gu_id_utilisateur, gs_id_statut, gu_nom, gu_prenom, gu_password, gu_email, gu_telephone, gu_adresse, gu_code_postal, gu_ville, gu_quota_heures_supp, gu_conges_payes, gu_temps_de_travail, gu_admin, gu_admin2, gu_notes |
FROM gestion_v3.gestion_utilisateur; |
ALTER TABLE gestion_v4.`gestion_utilisateur` ORDER BY `gu_id_utilisateur` ; |
INSERT INTO gestion_v4.gestion_utilisateur_a_projet |
SELECT gp_id_utilisateur, gp_id_projet FROM gestion_v3.gestion_preferences; |
INSERT INTO gestion_v4.gestion_utilisateur_statut |
SELECT gs_id_statut, gs_libelle_statut FROM gestion_v3.gestion_statut; |
/trunk/documentation/gtt_v4.xml |
---|
New file |
0,0 → 1,912 |
<?xml version="1.0" standalone="yes" ?> |
<DBMODEL Version="4.0"> |
<SETTINGS> |
<GLOBALSETTINGS ModelName="model_reverse_engineered" IDModel="0" IDVersion="0" VersionStr="1.0.0.0" Comments="" UseVersionHistroy="1" AutoIncVersion="1" DatabaseType="MySQL" ZoomFac="100.00" XPos="0" YPos="24" DefaultDataType="5" DefaultTablePrefix="0" DefSaveDBConn="" DefSyncDBConn="" DefQueryDBConn="" Printer="" HPageCount="4.0" PageAspectRatio="1.440892512336408" PageOrientation="1" PageFormat="A4 (210x297 mm, 8.26x11.7 inches)" SelectedPages="" UsePositionGrid="0" PositionGridX="20" PositionGridY="20" TableNameInRefs="0" DefaultTableType="0" ActivateRefDefForNewRelations="1" FKPrefix="" FKPostfix="" CreateFKRefDefIndex="0" DBQuoteCharacter="`" CreateSQLforLinkedObjects="0" DefModelFont="Nimbus Sans L" CanvasWidth="4096" CanvasHeight="2842" /> |
<DATATYPEGROUPS> |
<DATATYPEGROUP Name="Numeric Types" Icon="1" /> |
<DATATYPEGROUP Name="Date and Time Types" Icon="2" /> |
<DATATYPEGROUP Name="String Types" Icon="3" /> |
<DATATYPEGROUP Name="Blob and Text Types" Icon="4" /> |
<DATATYPEGROUP Name="User defined Types" Icon="5" /> |
<DATATYPEGROUP Name="Geographic Types" Icon="6" /> |
</DATATYPEGROUPS> |
<DATATYPES> |
<DATATYPE ID="1" IDGroup="0" TypeName="TINYINT" Description="A very small integer. The signed range is -128 to 127. The unsigned range is 0 to 255." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="1" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="2" IDGroup="0" TypeName="SMALLINT" Description="A small integer. The signed range is -32768 to 32767. The unsigned range is 0 to 65535." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="1" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="3" IDGroup="0" TypeName="MEDIUMINT" Description="A medium-size integer. The signed range is -8388608 to 8388607. The unsigned range is 0 to 16777215." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="1" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="4" IDGroup="0" TypeName="INT" Description="A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="1" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="0" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="5" IDGroup="0" TypeName="INTEGER" Description="A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="1" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="1" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="6" IDGroup="0" TypeName="BIGINT" Description="A large integer. The signed range is -9223372036854775808 to 9223372036854775807. The unsigned range is 0 to 18446744073709551615." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="0" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="7" IDGroup="0" TypeName="FLOAT" Description="A small (single-precision) floating-point number. Cannot be unsigned. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="precision" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="8" IDGroup="0" TypeName="FLOAT" Description="A small (single-precision) floating-point number. Cannot be unsigned. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="9" IDGroup="0" TypeName="DOUBLE" Description="A normal-size (double-precision) floating-point number. Cannot be unsigned. Allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="10" IDGroup="0" TypeName="DOUBLE PRECISION" Description="This is a synonym for DOUBLE." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="11" IDGroup="0" TypeName="REAL" Description="This is a synonym for DOUBLE." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="12" IDGroup="0" TypeName="DECIMAL" Description="An unpacked floating-point number. Cannot be unsigned. Behaves like a CHAR column." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="3" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="13" IDGroup="0" TypeName="NUMERIC" Description="This is a synonym for DECIMAL." ParamCount="2" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="3" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="14" IDGroup="1" TypeName="DATE" Description="A date. The supported range is \a1000-01-01\a to \a9999-12-31\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="15" IDGroup="1" TypeName="DATETIME" Description="A date and time combination. The supported range is \a1000-01-01 00:00:00\a to \a9999-12-31 23:59:59\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="16" IDGroup="1" TypeName="TIMESTAMP" Description="A timestamp. The range is \a1970-01-01 00:00:00\a to sometime in the year 2037. The length can be 14 (or missing), 12, 10, 8, 6, 4, or 2 representing YYYYMMDDHHMMSS, ... , YYYYMMDD, ... , YY formats." ParamCount="1" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
</DATATYPE> |
<DATATYPE ID="17" IDGroup="1" TypeName="TIME" Description="A time. The range is \a-838:59:59\a to \a838:59:59\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="18" IDGroup="1" TypeName="YEAR" Description="A year in 2- or 4-digit format (default is 4-digit)." ParamCount="1" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
</DATATYPE> |
<DATATYPE ID="19" IDGroup="2" TypeName="CHAR" Description="A fixed-length string (1 to 255 characters) that is always right-padded with spaces to the specified length when stored. values are sorted and compared in case-insensitive fashion according to the default character set unless the BINARY keyword is given." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="BINARY" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="20" IDGroup="2" TypeName="VARCHAR" Description="A variable-length string (1 to 255 characters). Values are sorted and compared in case-sensitive fashion unless the BINARY keyword is given." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="BINARY" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="21" IDGroup="2" TypeName="BIT" Description="This is a synonym for CHAR(1)." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="22" IDGroup="2" TypeName="BOOL" Description="This is a synonym for CHAR(1)." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="23" IDGroup="3" TypeName="TINYBLOB" Description="A column maximum length of 255 (2^8 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="24" IDGroup="3" TypeName="BLOB" Description="A column maximum length of 65535 (2^16 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="25" IDGroup="3" TypeName="MEDIUMBLOB" Description="A column maximum length of 16777215 (2^24 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="26" IDGroup="3" TypeName="LONGBLOB" Description="A column maximum length of 4294967295 (2^32 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="27" IDGroup="3" TypeName="TINYTEXT" Description="A column maximum length of 255 (2^8 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="28" IDGroup="3" TypeName="TEXT" Description="A column maximum length of 65535 (2^16 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="29" IDGroup="3" TypeName="MEDIUMTEXT" Description="A column maximum length of 16777215 (2^24 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="30" IDGroup="3" TypeName="LONGTEXT" Description="A column maximum length of 4294967295 (2^32 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="31" IDGroup="3" TypeName="ENUM" Description="An enumeration. A string object that can have only one value, chosen from the list of values." ParamCount="1" OptionCount="0" ParamRequired="1" EditParamsAsString="1" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="values" /> |
</PARAMS> |
</DATATYPE> |
<DATATYPE ID="32" IDGroup="3" TypeName="SET" Description="A set. A string object that can have zero or more values, each of which must be chosen from the list of values." ParamCount="1" OptionCount="0" ParamRequired="1" EditParamsAsString="1" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="values" /> |
</PARAMS> |
</DATATYPE> |
<DATATYPE ID="33" IDGroup="4" TypeName="Varchar(20)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<OPTIONS> |
<OPTION Name="BINARY" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="34" IDGroup="4" TypeName="Varchar(45)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<OPTIONS> |
<OPTION Name="BINARY" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="35" IDGroup="4" TypeName="Varchar(255)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<OPTIONS> |
<OPTION Name="BINARY" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="36" IDGroup="5" TypeName="GEOMETRY" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="38" IDGroup="5" TypeName="LINESTRING" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="39" IDGroup="5" TypeName="POLYGON" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="40" IDGroup="5" TypeName="MULTIPOINT" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="41" IDGroup="5" TypeName="MULTILINESTRING" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="42" IDGroup="5" TypeName="MULTIPOLYGON" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="43" IDGroup="5" TypeName="GEOMETRYCOLLECTION" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
</DATATYPES> |
<COMMON_DATATYPES> |
<COMMON_DATATYPE ID="5" /> |
<COMMON_DATATYPE ID="8" /> |
<COMMON_DATATYPE ID="20" /> |
<COMMON_DATATYPE ID="15" /> |
<COMMON_DATATYPE ID="22" /> |
<COMMON_DATATYPE ID="28" /> |
<COMMON_DATATYPE ID="26" /> |
<COMMON_DATATYPE ID="33" /> |
<COMMON_DATATYPE ID="34" /> |
<COMMON_DATATYPE ID="35" /> |
</COMMON_DATATYPES> |
<TABLEPREFIXES> |
<TABLEPREFIX Name="Default (no prefix)" /> |
</TABLEPREFIXES> |
<REGIONCOLORS> |
<REGIONCOLOR Color="Red=#FFEEEC" /> |
<REGIONCOLOR Color="Yellow=#FEFDED" /> |
<REGIONCOLOR Color="Green=#EAFFE5" /> |
<REGIONCOLOR Color="Cyan=#ECFDFF" /> |
<REGIONCOLOR Color="Blue=#F0F1FE" /> |
<REGIONCOLOR Color="Magenta=#FFEBFA" /> |
</REGIONCOLORS> |
<POSITIONMARKERS> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
</POSITIONMARKERS> |
</SETTINGS> |
<METADATA> |
<REGIONS> |
</REGIONS> |
<TABLES> |
<TABLE ID="1394" Tablename="gestion_absence" PrevTableName="" XPos="693" YPos="727" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="2" > |
<COLUMNS> |
<COLUMN ID="1598" ColName="ga_id_abscence" PrevColName="" Pos="5" idDatatype="5" DatatypeParams="(11)" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1731" ColName="ga_ce_absence_motif" PrevColName="" Pos="1" idDatatype="1" DatatypeParams="(3)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1588" ColName="ga_ce_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1411" ColName="ga_date_debut" PrevColName="" Pos="3" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1412" ColName="ga_date_fin" PrevColName="" Pos="4" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1413" ColName="ga_date_envoi_lettre" PrevColName="" Pos="5" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1583" /> |
<RELATION_END ID="1585" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1414" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1598" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1395" Tablename="gestion_projet_categorie" PrevTableName="gestion_categorie" XPos="57" YPos="71" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="3" > |
<COLUMNS> |
<COLUMN ID="1415" ColName="gpc_id_categorie" PrevColName="gc_id_categorie" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1416" ColName="gpc_libelle" PrevColName="gc_libelle_categorie" Pos="2" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1564" /> |
</RELATIONS_START> |
<INDICES> |
<INDEX ID="1417" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1415" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1396" Tablename="gestion_frais_km" PrevTableName="gestion_composer_utilisateur_frais_kilometrique" XPos="1027" YPos="349" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="4" > |
<COLUMNS> |
<COLUMN ID="1605" ColName="gfk_id_frais_km" PrevColName="gcufk_id_frais_km" Pos="7" idDatatype="5" DatatypeParams="(11)" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1737" ColName="gfkt_id_frais_km_taux" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1639" ColName="gfk_ce_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1420" ColName="gfk_date" PrevColName="gcufk_date_frais" Pos="3" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1421" ColName="gfk_nbre_km" PrevColName="gcufk_nb_kilometre" Pos="4" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1422" ColName="gfk_objet" PrevColName="gcufk_objet" Pos="5" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1423" ColName="gfk_trajet" PrevColName="gcufk_trajet" Pos="6" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1424" ColName="gfk_montant_total" PrevColName="gcufk_montant_total" Pos="7" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1503" /> |
<RELATION_END ID="1505" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1425" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1605" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1397" Tablename="gestion_note_frais_ligne" PrevTableName="gestion_depense" XPos="1025" YPos="651" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="5" > |
<COLUMNS> |
<COLUMN ID="1617" ColName="gnfl_id_note_frais_ligne" PrevColName="gld_id_ligne_depense" Pos="3" idDatatype="5" DatatypeParams="(11)" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1634" ColName="gnfl_ce_note_frais" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1428" ColName="gnfl_date" PrevColName="gd_date_depense" Pos="3" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1429" ColName="gnfl_montant_ht" PrevColName="gd_montant_ht" Pos="4" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1620" ColName="gnfl_taux_tva" PrevColName="gld_taux_tva" Pos="5" idDatatype="7" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1430" ColName="gnfl_montant_ttc" PrevColName="gd_montant_ttc" Pos="5" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1500" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1431" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1617" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1398" Tablename="gestion_frais_km_taux" PrevTableName="gestion_frais_kilometrique" XPos="1027" YPos="245" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="6" > |
<COLUMNS> |
<COLUMN ID="1432" ColName="gfkt_id_frais_km_taux" PrevColName="gfk_id_frais_kilometrique" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1433" ColName="gfkt_taux" PrevColName="gfk_taux_kilometre" Pos="2" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1505" /> |
</RELATIONS_START> |
<INDICES> |
<INDEX ID="1434" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1432" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1399" Tablename="gestion_absence_motif" PrevTableName="gestion_motif_absence" XPos="703" YPos="900" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="7" > |
<COLUMNS> |
<COLUMN ID="1435" ColName="gam_id_absence_motif" PrevColName="gma_id_motif" Pos="1" idDatatype="1" DatatypeParams="(3)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1436" ColName="gam_libelle" PrevColName="gma_libelle_motif" Pos="2" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1437" ColName="gam_mark_rtt" PrevColName="gma_type_rtt" Pos="3" idDatatype="22" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1725" ColName="gam_nbre_heure" PrevColName="" Pos="3" idDatatype="4" DatatypeParams="(11)" Width="-1" Prec="-1" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1583" /> |
</RELATIONS_START> |
<INDICES> |
<INDEX ID="1438" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1435" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1402" Tablename="gestion_utilisateur_a_projet" PrevTableName="gestion_preferences" XPos="378" YPos="326" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="10" > |
<COLUMNS> |
<COLUMN ID="1631" ColName="guap_id_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1632" ColName="guap_id_projet" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1494" /> |
<RELATION_END ID="1498" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1447" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1631" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1632" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1404" Tablename="gestion_projet" PrevTableName="" XPos="44" YPos="195" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="12" > |
<COLUMNS> |
<COLUMN ID="1522" ColName="gp_id_projet" PrevColName="" Pos="6" idDatatype="5" DatatypeParams="(11)" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1629" ColName="gp_ce_categorie" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1455" ColName="gp_nom_projet" PrevColName="" Pos="3" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1456" ColName="gp_description" PrevColName="" Pos="4" idDatatype="28" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1457" ColName="gp_date_debut" PrevColName="" Pos="5" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1458" ColName="gp_duree_prevue" PrevColName="" Pos="6" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1459" ColName="gp_avancement" PrevColName="" Pos="7" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1498" /> |
<RELATION_START ID="1511" /> |
<RELATION_START ID="1514" /> |
</RELATIONS_START> |
<RELATIONS_END> |
<RELATION_END ID="1564" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1625" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1522" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1405" Tablename="gestion_utilisateur_statut" PrevTableName="gestion_statut" XPos="700" YPos="238" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="13" > |
<COLUMNS> |
<COLUMN ID="1461" ColName="gus_id_utilisateur_statut" PrevColName="gs_id_statut" Pos="1" idDatatype="1" DatatypeParams="(3)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1462" ColName="gus_libelle" PrevColName="gs_libelle_statut" Pos="2" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1592" /> |
</RELATIONS_START> |
<INDICES> |
<INDEX ID="1463" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1461" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1406" Tablename="gestion_projet_tache" PrevTableName="gestion_taches" XPos="17" YPos="546" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="14" > |
<COLUMNS> |
<COLUMN ID="1464" ColName="gpt_id_tache" PrevColName="gt_id_tache" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1732" ColName="gpt_ce_tache_precedente" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1695" ColName="gpt_ce_projet" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1466" ColName="gpt_libelle" PrevColName="gt_nom_tache" Pos="3" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1467" ColName="gpt_description" PrevColName="gt_description_tache" Pos="4" idDatatype="28" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1468" ColName="gpt_date_debut" PrevColName="gt_date_debut_tache" Pos="5" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1469" ColName="gpt_duree_prevue" PrevColName="gt_duree_prevue" Pos="6" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1470" ColName="gpt_avancement" PrevColName="gt_avancement" Pos="7" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1690" /> |
<RELATION_START ID="1754" /> |
</RELATIONS_START> |
<RELATIONS_END> |
<RELATION_END ID="1514" /> |
<RELATION_END ID="1690" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1655" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1464" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1407" Tablename="gestion_travail_projet" PrevTableName="gestion_travail" XPos="373" YPos="462" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="15" > |
<COLUMNS> |
<COLUMN ID="1742" ColName="gtp_id_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1743" ColName="gtp_id_projet" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1474" ColName="gtp_id_date_travail" PrevColName="gt_date_travail" Pos="3" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1475" ColName="gtp_duree" PrevColName="gt_duree_travail" Pos="4" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1510" /> |
<RELATION_END ID="1511" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1476" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1742" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1743" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1474" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1408" Tablename="gestion_utilisateur" PrevTableName="" XPos="686" YPos="365" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="16" > |
<COLUMNS> |
<COLUMN ID="1477" ColName="gu_id_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1735" ColName="gus_id_utilisateur_statut" PrevColName="" Pos="1" idDatatype="1" DatatypeParams="(3)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1479" ColName="gu_nom" PrevColName="" Pos="3" idDatatype="20" DatatypeParams="(100)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1480" ColName="gu_prenom" PrevColName="" Pos="4" idDatatype="20" DatatypeParams="(100)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1481" ColName="gu_password" PrevColName="" Pos="5" idDatatype="20" DatatypeParams="(32)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1482" ColName="gu_email" PrevColName="" Pos="6" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1483" ColName="gu_telephone" PrevColName="" Pos="7" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1484" ColName="gu_adresse" PrevColName="" Pos="8" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1485" ColName="gu_code_postal" PrevColName="" Pos="9" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1486" ColName="gu_ville" PrevColName="" Pos="10" idDatatype="20" DatatypeParams="(50)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1487" ColName="gu_quota_heures_supp" PrevColName="" Pos="11" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1488" ColName="gu_conges_payes" PrevColName="" Pos="12" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1489" ColName="gu_temps_de_travail" PrevColName="" Pos="13" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1490" ColName="gu_mark_admin" PrevColName="gu_admin" Pos="14" idDatatype="22" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1491" ColName="gu_mark_recapitulatif" PrevColName="gu_admin2" Pos="15" idDatatype="22" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1492" ColName="gu_notes" PrevColName="" Pos="16" idDatatype="28" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1494" /> |
<RELATION_START ID="1503" /> |
<RELATION_START ID="1510" /> |
<RELATION_START ID="1585" /> |
<RELATION_START ID="1612" /> |
<RELATION_START ID="1757" /> |
</RELATIONS_START> |
<RELATIONS_END> |
<RELATION_END ID="1592" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1493" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1477" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1400" Tablename="gestion_note_frais" PrevTableName="" XPos="1030" YPos="525" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="8" > |
<COLUMNS> |
<COLUMN ID="1439" ColName="gnf_id_note_frais" PrevColName="gnf_id_frais" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1614" ColName="gnf_ce_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1440" ColName="gnf_libelle" PrevColName="gnf_libelle_frais" Pos="2" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1500" /> |
</RELATIONS_START> |
<RELATIONS_END> |
<RELATION_END ID="1612" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1441" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1439" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1745" Tablename="gestion_travail_tache" PrevTableName="Table_14" XPos="374" YPos="622" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="29" > |
<COLUMNS> |
<COLUMN ID="1759" ColName="gtt_id_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1756" ColName="gtt_id_tache" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1747" ColName="gtt_id_date_travail" PrevColName="" Pos="0" idDatatype="14" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1750" ColName="gtt_duree" PrevColName="" Pos="1" idDatatype="7" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1754" /> |
<RELATION_END ID="1757" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1748" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1759" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1756" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1747" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
</TABLES> |
<RELATIONS> |
<RELATION ID="1494" RelationName="fk_gu_guap" Kind="1" SrcTable="1408" DestTable="1402" FKFields="gu_id_utilisateur=guap_id_utilisateur\n" FKFieldsComments="\n" relDirection="4" MidOffset="-13" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="48" CaptionOffsetY="-33" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="17" /> |
<RELATION ID="1498" RelationName="fk_gp_guap" Kind="1" SrcTable="1404" DestTable="1402" FKFields="gp_id_projet=guap_id_projet\n" FKFieldsComments="\n" relDirection="2" MidOffset="19" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-53" CaptionOffsetY="-24" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="18" /> |
<RELATION ID="1503" RelationName="fk_gu_gfk" Kind="2" SrcTable="1408" DestTable="1396" FKFields="gu_id_utilisateur=gfk_ce_utilisateur\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="22" /> |
<RELATION ID="1505" RelationName="fk_gfkt_gfk" Kind="2" SrcTable="1398" DestTable="1396" FKFields="gfkt_id_frais_km_taux=gfkt_id_frais_km_taux\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-59" CaptionOffsetY="-22" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="23" /> |
<RELATION ID="1510" RelationName="fk_gu_gtp" Kind="1" SrcTable="1408" DestTable="1407" FKFields="gu_id_utilisateur=gtp_id_utilisateur\n" FKFieldsComments="\n" relDirection="4" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-1" CaptionOffsetY="-46" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="26" /> |
<RELATION ID="1511" RelationName="fk_gp_gtp" Kind="1" SrcTable="1404" DestTable="1407" FKFields="gp_id_projet=gtp_id_projet\n" FKFieldsComments="\n" relDirection="2" MidOffset="-12" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="48" CaptionOffsetY="-23" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="27" /> |
<RELATION ID="1514" RelationName="fk_gp_gpt" Kind="5" SrcTable="1404" DestTable="1406" FKFields="gp_id_projet=gpt_ce_projet\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="47" CaptionOffsetY="-23" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="30" /> |
<RELATION ID="1564" RelationName="fk_gpc_gp" Kind="5" SrcTable="1395" DestTable="1404" FKFields="gpc_id_categorie=gp_ce_categorie\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-47" CaptionOffsetY="-22" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="32" /> |
<RELATION ID="1583" RelationName="fk_gam_ga" Kind="2" SrcTable="1399" DestTable="1394" FKFields="gam_id_absence_motif=ga_ce_absence_motif\n" FKFieldsComments="\n" relDirection="1" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-47" CaptionOffsetY="-22" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="31" /> |
<RELATION ID="1585" RelationName="fk_gu_ga" Kind="5" SrcTable="1408" DestTable="1394" FKFields="gu_id_utilisateur=ga_ce_utilisateur\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-45" CaptionOffsetY="-22" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="32" /> |
<RELATION ID="1592" RelationName="fk_gs_gu" Kind="2" SrcTable="1405" DestTable="1408" FKFields="gus_id_utilisateur_statut=gus_id_utilisateur_statut\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-41" CaptionOffsetY="-24" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="32" /> |
<RELATION ID="1500" RelationName="fk_gnf_gnfl" Kind="5" SrcTable="1400" DestTable="1397" FKFields="gnf_id_note_frais=gnfl_ce_note_frais\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-48" CaptionOffsetY="-25" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="20" /> |
<RELATION ID="1612" RelationName="fk_gu_gnf" Kind="2" SrcTable="1408" DestTable="1400" FKFields="gu_id_utilisateur=gnf_ce_utilisateur\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="32" /> |
<RELATION ID="1690" RelationName="fk_gpt_gpt_predecesseur" Kind="2" SrcTable="1406" DestTable="1406" FKFields="gpt_id_tache=gpt_ce_tache_precedente\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-84" CaptionOffsetY="-23" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="29" /> |
<RELATION ID="1754" RelationName="fk_gpt_gtt" Kind="1" SrcTable="1406" DestTable="1745" FKFields="gpt_id_tache=gtt_id_tache\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="30" /> |
<RELATION ID="1757" RelationName="fk_gu_gtt" Kind="1" SrcTable="1408" DestTable="1745" FKFields="gu_id_utilisateur=gtt_id_utilisateur\n" FKFieldsComments="\n" relDirection="4" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="31" /> |
</RELATIONS> |
<NOTES> |
</NOTES> |
<IMAGES> |
</IMAGES> |
</METADATA> |
<PLUGINDATA> |
<PLUGINDATARECORDS> |
</PLUGINDATARECORDS> |
</PLUGINDATA> |
<QUERYDATA> |
<QUERYRECORDS> |
</QUERYRECORDS> |
</QUERYDATA> |
<LINKEDMODELS> |
</LINKEDMODELS> |
</DBMODEL> |
/trunk/documentation/gtt_v4.mwb |
---|
New file |
0,0 → 1,2505 |
<?xml version="1.0"?> |
<data> |
<value type="dict" struct-name="db.workbench.Workbench"> |
<value type="string" key="_id">{07180351-4040-4183-ADE0-6A6BF3D440E8}</value> |
<value type="dict" struct-name="db.mysql.Catalog" key="catalog"> |
<value type="string" key="_id">{2D24F156-7745-4D0A-B90F-AC14642DBA76}</value> |
<value type="list" content-type="string" content-struct-name="db.CharacterSet" key="characterSets" option="ref"> |
<value type="string">{43903B6E-F2D0-4529-9B67-E0717BF4EF9F}</value> |
<value type="string">{3AC6FA9A-82A4-4F7A-98B9-1F12CFB202BF}</value> |
<value type="string">{9D4131DD-68A4-40BC-9D3F-82B4F7FA17B1}</value> |
<value type="string">{6ABFE754-D874-49FF-AC49-386F49B841AC}</value> |
<value type="string">{E2E563B6-7240-4D2B-A665-CE22EBD29E9F}</value> |
<value type="string">{AEFED982-F313-40D4-ABA9-11583190507F}</value> |
<value type="string">{A4E5546A-E0F8-4601-9DC3-D39C7DE1FD72}</value> |
<value type="string">{2F780E59-D0CF-4175-8473-C86D73B33ED6}</value> |
<value type="string">{E986FF81-4A4E-4A5D-B792-8D70F05A1BDE}</value> |
<value type="string">{41103BE4-2115-4129-A4F3-0EC70E1A7CA6}</value> |
<value type="string">{9069C68C-56AA-40EA-9C14-1542D5226355}</value> |
<value type="string">{A9BCA02E-A707-4832-A9A2-61F0A56F25C2}</value> |
<value type="string">{091F9B2C-FC20-47D4-B7EC-E31EF07828FF}</value> |
<value type="string">{FECE8C4D-B95C-4D06-B5E5-7C685B512607}</value> |
<value type="string">{52DEA621-FBB4-4FC5-88C6-936CC3F53579}</value> |
<value type="string">{FD0CE66F-4075-48FB-AF79-C75453274791}</value> |
<value type="string">{AF1906F2-20B5-491C-8450-14F730DBECD8}</value> |
<value type="string">{2BA9756D-C757-4770-B795-B1A4943359EC}</value> |
<value type="string">{B5603A47-2936-4144-BA74-5D4B6959F47F}</value> |
<value type="string">{A50D3C42-2BE0-49C7-A751-59ADDC334F01}</value> |
<value type="string">{38416973-B84F-48DF-A766-01022A48B7CB}</value> |
<value type="string">{FEDC8872-11CC-47CA-810A-6CCC2FAC6624}</value> |
<value type="string">{B37E43B5-C83C-49A6-81FD-21424E22A0CC}</value> |
<value type="string">{69774387-87EB-4929-95F7-666E7081C341}</value> |
<value type="string">{EFA25F7E-F252-4083-A7E7-0E0B51D2C7A6}</value> |
<value type="string">{82133B64-E91A-4EAB-96E7-5211E354E818}</value> |
<value type="string">{3006DAE4-DDE9-4979-B982-8284D885ED2A}</value> |
<value type="string">{6C8C05CC-8859-4974-B756-497697DB875F}</value> |
<value type="string">{99441A25-E2A8-4B71-A311-AA46C216D6A9}</value> |
<value type="string">{B670A3DE-8FD2-4508-A437-4EE82D3F184A}</value> |
<value type="string">{EF353851-0BAE-450A-8751-D96E58402C08}</value> |
<value type="string">{25D735B3-3DBA-4EF7-95C9-B94E5A480D40}</value> |
<value type="string">{F312E41B-8ECF-4B2D-B084-B22186F114AE}</value> |
<value type="string">{7A92AB4C-BB3F-47B9-BC98-4F55CF8690A3}</value> |
<value type="string">{3EE67D94-4290-4A37-A0A3-73E2602C2971}</value> |
<value type="string">{EF2A81A5-CB47-46E3-9FC5-203D7DA8EA10}</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName"></value> |
<value type="string" key="defaultCollationName"></value> |
<value type="string" key="name">default</value> |
<value type="string" key="oldName">default</value> |
<value type="string" key="owner" option="ref">{07180351-4040-4183-ADE0-6A6BF3D440E8}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Schema" key="schemata"> |
<value type="dict" struct-name="db.mysql.Schema"> |
<value type="string" key="_id">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="comment"></value> |
<value type="int" key="commentedOut">0</value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_general_ci</value> |
<value type="string" key="name">gestion_v4</value> |
<value type="string" key="oldName">gestion_v4</value> |
<value type="string" key="owner" option="ref">{2D24F156-7745-4D0A-B90F-AC14642DBA76}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.RoutineGroup" key="routineGroups"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Routine" key="routines"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Sequence" key="sequences"/> |
<value type="string" key="sql"></value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.StructuredDatatype" key="structuredTypes"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Synonym" key="synonyms"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Table" key="tables"> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{33484728-36CA-4148-B172-6ADF5D05B2A2}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{6C3A95D3-41A0-4F89-944F-E3FE5C104177}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gu_id_utilisateur</value> |
<value type="string" key="oldName">gu_id_utilisateur</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{0A94E3EE-B13E-4C73-9A7A-8D2FB026441F}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">TINYINT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gma_id_motif</value> |
<value type="string" key="oldName">gma_id_motif</value> |
<value type="int" key="precision">3</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{3C75C19F-FCA4-44DE-8881-F477FEA32E62}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{C026ABF5-EE80-452B-8B12-C8B781834337}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">DATE</value> |
<value type="string" key="defaultValue">'0000-00-00'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">ga_date_debut</value> |
<value type="string" key="oldName">ga_date_debut</value> |
<value type="string" key="simpleType" option="ref">{E3ACD2FE-A26F-4BB8-ADA6-433F92B0570D}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{30A6541F-0527-42ED-B368-5D6AB2417FFB}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">DATE</value> |
<value type="string" key="defaultValue">'0000-00-00'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">ga_date_fin</value> |
<value type="string" key="oldName">ga_date_fin</value> |
<value type="string" key="simpleType" option="ref">{E3ACD2FE-A26F-4BB8-ADA6-433F92B0570D}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{0176E84D-04F1-4332-A3AC-6EDA84548C21}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">DATE</value> |
<value type="string" key="defaultValue">'0000-00-00'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">ga_date_envoi_lettre</value> |
<value type="string" key="oldName">ga_date_envoi_lettre</value> |
<value type="string" key="simpleType" option="ref">{E3ACD2FE-A26F-4BB8-ADA6-433F92B0570D}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{5C287D70-3AB7-4CE4-8524-CB78F167E93C}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{780B6C6D-DDC4-4611-87FF-11B4BF24BED8}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gu_id_utilisateur</value> |
<value type="string" key="owner" option="ref">{5C287D70-3AB7-4CE4-8524-CB78F167E93C}</value> |
<value type="string" key="referedColumn" option="ref">{6C3A95D3-41A0-4F89-944F-E3FE5C104177}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{D4AD4D51-6CB9-49A7-AD46-E5B6A208BE02}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gma_id_motif</value> |
<value type="string" key="owner" option="ref">{5C287D70-3AB7-4CE4-8524-CB78F167E93C}</value> |
<value type="string" key="referedColumn" option="ref">{0A94E3EE-B13E-4C73-9A7A-8D2FB026441F}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{1620ADB5-9D0B-46CE-8360-2D2BB8787D91}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">ga_date_debut</value> |
<value type="string" key="owner" option="ref">{5C287D70-3AB7-4CE4-8524-CB78F167E93C}</value> |
<value type="string" key="referedColumn" option="ref">{C026ABF5-EE80-452B-8B12-C8B781834337}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{33484728-36CA-4148-B172-6ADF5D05B2A2}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_absence</value> |
<value type="string" key="oldName">gestion_absence</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{5C287D70-3AB7-4CE4-8524-CB78F167E93C}</value> |
<value type="string" key="rowFormat">Fixed</value> |
<value type="string" key="sql">CREATE TABLE `gestion_absence` ( |
`gu_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gma_id_motif` tinyint(3) unsigned NOT NULL default '0', |
`ga_date_debut` date NOT NULL default '0000-00-00', |
`ga_date_fin` date NOT NULL default '0000-00-00', |
`ga_date_envoi_lettre` date NOT NULL default '0000-00-00', |
PRIMARY KEY (`gu_id_utilisateur`,`gma_id_motif`,`ga_date_debut`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{CDD0F37D-3F47-4D88-805E-0A15DAEE31D8}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{8A6B38F3-E211-46A8-B024-16E423B08686}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gc_id_categorie</value> |
<value type="string" key="oldName">gc_id_categorie</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{8E9332A8-AF0A-4D4B-BEFD-C6FC3576E743}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gc_libelle_categorie</value> |
<value type="string" key="oldName">gc_libelle_categorie</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{925E56EF-F278-48EF-BDBE-C156160FCD5E}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{7266DC22-FD1C-4936-8039-23E39E18D30F}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gc_id_categorie</value> |
<value type="string" key="owner" option="ref">{925E56EF-F278-48EF-BDBE-C156160FCD5E}</value> |
<value type="string" key="referedColumn" option="ref">{8A6B38F3-E211-46A8-B024-16E423B08686}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{CDD0F37D-3F47-4D88-805E-0A15DAEE31D8}</value> |
<value type="int" key="unique">1</value> |
</value> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{C3D434BD-FEDB-4B34-8BEC-FE486FA7036D}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{62945D52-5916-4EAC-AB7C-B460AAB2285F}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gc_libelle_categorie</value> |
<value type="string" key="owner" option="ref">{C3D434BD-FEDB-4B34-8BEC-FE486FA7036D}</value> |
<value type="string" key="referedColumn" option="ref">{8E9332A8-AF0A-4D4B-BEFD-C6FC3576E743}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">UNIQUE</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="string" key="name">gc_libelle_categorie</value> |
<value type="string" key="oldName">gc_libelle_categorie</value> |
<value type="string" key="owner" option="ref">{CDD0F37D-3F47-4D88-805E-0A15DAEE31D8}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_categorie</value> |
<value type="string" key="oldName">gestion_categorie</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{925E56EF-F278-48EF-BDBE-C156160FCD5E}</value> |
<value type="string" key="rowFormat">Dynamic</value> |
<value type="string" key="sql">CREATE TABLE `gestion_categorie` ( |
`gc_id_categorie` int(10) unsigned NOT NULL default '0', |
`gc_libelle_categorie` varchar(255) default NULL, |
PRIMARY KEY (`gc_id_categorie`), |
UNIQUE KEY `gc_libelle_categorie` (`gc_libelle_categorie`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{8FF7CC72-8BFD-41B6-8876-D0A1D147A975}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{E3FE7BCD-6C1F-4638-B6E2-FDF9C54E37B5}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gcufk_id_frais_kilometrique</value> |
<value type="string" key="oldName">gcufk_id_frais_kilometrique</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{1347A530-A6A1-48FD-9DAF-AEBC6594B8D1}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gcufk_id_utilisateur</value> |
<value type="string" key="oldName">gcufk_id_utilisateur</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{5B8A43C5-928F-458D-AF17-6816AB4BA2C4}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">DATE</value> |
<value type="string" key="defaultValue">'0000-00-00'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gcufk_date_frais</value> |
<value type="string" key="oldName">gcufk_date_frais</value> |
<value type="string" key="simpleType" option="ref">{E3ACD2FE-A26F-4BB8-ADA6-433F92B0570D}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{5C4FDCA0-CFB9-4A31-90A6-43FCFDD2B710}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gcufk_nb_kilometre</value> |
<value type="string" key="oldName">gcufk_nb_kilometre</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{2E50E9B9-98D3-4A50-925C-4758CDF3CCB9}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gcufk_objet</value> |
<value type="string" key="oldName">gcufk_objet</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{108ADF6C-C085-4F74-A6B3-8E34066B3101}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gcufk_trajet</value> |
<value type="string" key="oldName">gcufk_trajet</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{DE9FFD25-CD87-4D8B-BBA2-AFB1B4229648}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gcufk_montant_total</value> |
<value type="string" key="oldName">gcufk_montant_total</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{EC5C7A68-DE86-434D-8590-46943D6B7912}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{66262BF7-4397-4395-900E-0AB123757964}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gcufk_id_frais_kilometrique</value> |
<value type="string" key="owner" option="ref">{EC5C7A68-DE86-434D-8590-46943D6B7912}</value> |
<value type="string" key="referedColumn" option="ref">{E3FE7BCD-6C1F-4638-B6E2-FDF9C54E37B5}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{9A8F8539-C13A-4222-930F-D0CAEF8F389C}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gcufk_id_utilisateur</value> |
<value type="string" key="owner" option="ref">{EC5C7A68-DE86-434D-8590-46943D6B7912}</value> |
<value type="string" key="referedColumn" option="ref">{1347A530-A6A1-48FD-9DAF-AEBC6594B8D1}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{B629C1C8-797B-4C53-892A-437142821515}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gcufk_date_frais</value> |
<value type="string" key="owner" option="ref">{EC5C7A68-DE86-434D-8590-46943D6B7912}</value> |
<value type="string" key="referedColumn" option="ref">{5B8A43C5-928F-458D-AF17-6816AB4BA2C4}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{8FF7CC72-8BFD-41B6-8876-D0A1D147A975}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_composer_utilisateur_frais_kilometrique</value> |
<value type="string" key="oldName">gestion_composer_utilisateur_frais_kilometrique</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{EC5C7A68-DE86-434D-8590-46943D6B7912}</value> |
<value type="string" key="rowFormat">Dynamic</value> |
<value type="string" key="sql">CREATE TABLE `gestion_composer_utilisateur_frais_kilometrique` ( |
`gcufk_id_frais_kilometrique` int(10) unsigned NOT NULL default '0', |
`gcufk_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gcufk_date_frais` date NOT NULL default '0000-00-00', |
`gcufk_nb_kilometre` float default NULL, |
`gcufk_objet` varchar(255) default NULL, |
`gcufk_trajet` varchar(255) default NULL, |
`gcufk_montant_total` float NOT NULL default '0', |
PRIMARY KEY (`gcufk_id_frais_kilometrique`,`gcufk_id_utilisateur`,`gcufk_date_frais`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{F1117948-EC22-4098-BF48-C5A14ADBA868}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{C3D2AFC3-4ACB-4AC6-A27C-AE7AF3C76964}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gu_id_utilisateur</value> |
<value type="string" key="oldName">gu_id_utilisateur</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{C0B340C0-2386-418B-88C3-43188330FA57}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gnf_id_frais</value> |
<value type="string" key="oldName">gnf_id_frais</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{43C3D1C0-AB3C-4BC9-B2E9-66F2AA08C0DA}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">DATE</value> |
<value type="string" key="defaultValue">'0000-00-00'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gd_date_depense</value> |
<value type="string" key="oldName">gd_date_depense</value> |
<value type="string" key="simpleType" option="ref">{E3ACD2FE-A26F-4BB8-ADA6-433F92B0570D}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{1F92EDC8-C3AC-4688-81D0-6F91DD7384E4}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gd_montant_ht</value> |
<value type="string" key="oldName">gd_montant_ht</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{F8F88910-A841-412E-83CE-8FF846B8C6DF}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gd_montant_ttc</value> |
<value type="string" key="oldName">gd_montant_ttc</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{7A91E134-F1BC-413D-A75E-E176987D3E60}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{AC73EAA2-51CD-43F9-AE4A-BA787948F906}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gu_id_utilisateur</value> |
<value type="string" key="owner" option="ref">{7A91E134-F1BC-413D-A75E-E176987D3E60}</value> |
<value type="string" key="referedColumn" option="ref">{C3D2AFC3-4ACB-4AC6-A27C-AE7AF3C76964}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{CB7FF449-7C02-4BFD-B72B-4B66B6ED304D}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gnf_id_frais</value> |
<value type="string" key="owner" option="ref">{7A91E134-F1BC-413D-A75E-E176987D3E60}</value> |
<value type="string" key="referedColumn" option="ref">{C0B340C0-2386-418B-88C3-43188330FA57}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{0E146B8E-59A7-4262-A695-5ECF2CDFAB81}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gd_date_depense</value> |
<value type="string" key="owner" option="ref">{7A91E134-F1BC-413D-A75E-E176987D3E60}</value> |
<value type="string" key="referedColumn" option="ref">{43C3D1C0-AB3C-4BC9-B2E9-66F2AA08C0DA}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{F1117948-EC22-4098-BF48-C5A14ADBA868}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_depense</value> |
<value type="string" key="oldName">gestion_depense</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{7A91E134-F1BC-413D-A75E-E176987D3E60}</value> |
<value type="string" key="rowFormat">Fixed</value> |
<value type="string" key="sql">CREATE TABLE `gestion_depense` ( |
`gu_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gnf_id_frais` int(10) unsigned NOT NULL default '0', |
`gd_date_depense` date NOT NULL default '0000-00-00', |
`gd_montant_ht` float default NULL, |
`gd_montant_ttc` float NOT NULL default '0', |
PRIMARY KEY (`gu_id_utilisateur`,`gnf_id_frais`,`gd_date_depense`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{9EAA1835-034F-46B7-A7B2-A721333D50A0}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{03A75502-76DB-49ED-A492-2FD820A88A2B}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gfk_id_frais_kilometrique</value> |
<value type="string" key="oldName">gfk_id_frais_kilometrique</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{F4521CE3-3D63-4F58-B46F-152EE8A22683}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gfk_taux_kilometre</value> |
<value type="string" key="oldName">gfk_taux_kilometre</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{ABE91781-C730-4AAD-8D2C-7B6BFB070A0E}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{119C8418-2E15-4B46-8942-025CDCF396F8}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gfk_id_frais_kilometrique</value> |
<value type="string" key="owner" option="ref">{ABE91781-C730-4AAD-8D2C-7B6BFB070A0E}</value> |
<value type="string" key="referedColumn" option="ref">{03A75502-76DB-49ED-A492-2FD820A88A2B}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{9EAA1835-034F-46B7-A7B2-A721333D50A0}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_frais_kilometrique</value> |
<value type="string" key="oldName">gestion_frais_kilometrique</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{ABE91781-C730-4AAD-8D2C-7B6BFB070A0E}</value> |
<value type="string" key="rowFormat">Fixed</value> |
<value type="string" key="sql">CREATE TABLE `gestion_frais_kilometrique` ( |
`gfk_id_frais_kilometrique` int(10) unsigned NOT NULL default '0', |
`gfk_taux_kilometre` float NOT NULL default '0', |
PRIMARY KEY (`gfk_id_frais_kilometrique`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{79E37616-F0D5-4CFB-9DC8-079424B0DD6D}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{3A63A27B-57BC-464E-8BAA-E99E6A3B647F}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">TINYINT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gma_id_motif</value> |
<value type="string" key="oldName">gma_id_motif</value> |
<value type="int" key="precision">3</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{3C75C19F-FCA4-44DE-8881-F477FEA32E62}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{67BB1F79-803C-4FC6-8143-F86831C0864C}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="string" key="defaultValue">''</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gma_libelle_motif</value> |
<value type="string" key="oldName">gma_libelle_motif</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{F59046CB-0093-4F03-8C77-57190A196BAF}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gma_nb_heures_supprim</value> |
<value type="string" key="oldName">gma_nb_heures_supprim</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{A2B93BC3-07C5-41EE-9F40-3EB1C16D02C3}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">CHAR</value> |
<value type="string" key="defaultValue">''</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="int" key="length">1</value> |
<value type="string" key="name">gma_type_rtt</value> |
<value type="string" key="oldName">gma_type_rtt</value> |
<value type="string" key="simpleType" option="ref">{4B160881-85B7-4C25-BBD1-36C9CA1A0E80}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{32DA6B49-CDC7-4B45-B7C8-C273E083E0FA}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{C703F4AC-D383-4F14-B2E3-F13EAA99C7A0}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gma_id_motif</value> |
<value type="string" key="owner" option="ref">{32DA6B49-CDC7-4B45-B7C8-C273E083E0FA}</value> |
<value type="string" key="referedColumn" option="ref">{3A63A27B-57BC-464E-8BAA-E99E6A3B647F}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{79E37616-F0D5-4CFB-9DC8-079424B0DD6D}</value> |
<value type="int" key="unique">1</value> |
</value> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{E50FAA44-DB20-495B-97A8-89E971640D5F}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{EDE5B2EE-EDA7-4F59-9AF0-ADBC6FB30764}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gma_libelle_motif</value> |
<value type="string" key="owner" option="ref">{E50FAA44-DB20-495B-97A8-89E971640D5F}</value> |
<value type="string" key="referedColumn" option="ref">{67BB1F79-803C-4FC6-8143-F86831C0864C}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">UNIQUE</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="string" key="name">gma_libelle_motif</value> |
<value type="string" key="oldName">gma_libelle_motif</value> |
<value type="string" key="owner" option="ref">{79E37616-F0D5-4CFB-9DC8-079424B0DD6D}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_motif_absence</value> |
<value type="string" key="oldName">gestion_motif_absence</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{32DA6B49-CDC7-4B45-B7C8-C273E083E0FA}</value> |
<value type="string" key="rowFormat">Dynamic</value> |
<value type="string" key="sql">CREATE TABLE `gestion_motif_absence` ( |
`gma_id_motif` tinyint(3) unsigned NOT NULL default '0', |
`gma_libelle_motif` varchar(255) NOT NULL default '', |
`gma_nb_heures_supprim` float default NULL, |
`gma_type_rtt` char(1) NOT NULL default '', |
PRIMARY KEY (`gma_id_motif`), |
UNIQUE KEY `gma_libelle_motif` (`gma_libelle_motif`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{342BF6EF-DB73-4295-AFEF-32E99A116AF6}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{428504AB-512E-435A-B756-B95F57CC63A3}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gnf_id_frais</value> |
<value type="string" key="oldName">gnf_id_frais</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{57DD0662-5927-412F-B1AD-6157D962BDC6}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="string" key="defaultValue">''</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gnf_libelle_frais</value> |
<value type="string" key="oldName">gnf_libelle_frais</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{4C915C02-C47A-4FE8-B05E-347D1744BA30}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{A1857A5C-67B2-428F-B856-CFB2233E73D7}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gnf_id_frais</value> |
<value type="string" key="owner" option="ref">{4C915C02-C47A-4FE8-B05E-347D1744BA30}</value> |
<value type="string" key="referedColumn" option="ref">{428504AB-512E-435A-B756-B95F57CC63A3}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{342BF6EF-DB73-4295-AFEF-32E99A116AF6}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_note_frais</value> |
<value type="string" key="oldName">gestion_note_frais</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{4C915C02-C47A-4FE8-B05E-347D1744BA30}</value> |
<value type="string" key="rowFormat">Dynamic</value> |
<value type="string" key="sql">CREATE TABLE `gestion_note_frais` ( |
`gnf_id_frais` int(10) unsigned NOT NULL default '0', |
`gnf_libelle_frais` varchar(255) NOT NULL default '', |
PRIMARY KEY (`gnf_id_frais`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{56B2B4EB-27AF-4A61-8B8B-B8E504CC976C}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{8B618FAB-1EFE-4A7B-BDFE-6D5507F8CE4D}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gt_id_tache</value> |
<value type="string" key="oldName">gt_id_tache</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{46A25501-B3BB-48DF-9911-5DF1FFB398D4}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gpred_id_pred</value> |
<value type="string" key="oldName">gpred_id_pred</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{977DE6E5-1580-4CD1-AFF6-85AE1537E10A}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{E43150CA-1C77-4F37-ADF4-4C153DE7D8F6}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gt_id_tache</value> |
<value type="string" key="owner" option="ref">{977DE6E5-1580-4CD1-AFF6-85AE1537E10A}</value> |
<value type="string" key="referedColumn" option="ref">{8B618FAB-1EFE-4A7B-BDFE-6D5507F8CE4D}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{442C6EC6-3FA3-4CFF-93DD-1FF8E30A2E77}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gpred_id_pred</value> |
<value type="string" key="owner" option="ref">{977DE6E5-1580-4CD1-AFF6-85AE1537E10A}</value> |
<value type="string" key="referedColumn" option="ref">{46A25501-B3BB-48DF-9911-5DF1FFB398D4}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{56B2B4EB-27AF-4A61-8B8B-B8E504CC976C}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_predecesseurs</value> |
<value type="string" key="oldName">gestion_predecesseurs</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{977DE6E5-1580-4CD1-AFF6-85AE1537E10A}</value> |
<value type="string" key="rowFormat">Fixed</value> |
<value type="string" key="sql">CREATE TABLE `gestion_predecesseurs` ( |
`gt_id_tache` int(10) unsigned NOT NULL default '0', |
`gpred_id_pred` int(10) unsigned NOT NULL default '0', |
PRIMARY KEY (`gt_id_tache`,`gpred_id_pred`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{F4DBCC00-40C8-41C1-9CEC-64F4ECA6AC5D}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{5F99234E-C5CB-443C-A00B-8AA6B1A81B1C}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gp_id_utilisateur</value> |
<value type="string" key="oldName">gp_id_utilisateur</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{79C5978E-132A-445A-94CD-740E10A5BAF8}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gp_id_projet</value> |
<value type="string" key="oldName">gp_id_projet</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{0565DE2B-FE4E-4031-AD89-03BAA25B1059}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{9946D19C-E804-4F37-BD09-1F4EF7805A3E}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gp_id_utilisateur</value> |
<value type="string" key="owner" option="ref">{0565DE2B-FE4E-4031-AD89-03BAA25B1059}</value> |
<value type="string" key="referedColumn" option="ref">{5F99234E-C5CB-443C-A00B-8AA6B1A81B1C}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{2E4C21C6-27AA-4034-835A-1D2162B416E4}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gp_id_projet</value> |
<value type="string" key="owner" option="ref">{0565DE2B-FE4E-4031-AD89-03BAA25B1059}</value> |
<value type="string" key="referedColumn" option="ref">{79C5978E-132A-445A-94CD-740E10A5BAF8}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{F4DBCC00-40C8-41C1-9CEC-64F4ECA6AC5D}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_preferences</value> |
<value type="string" key="oldName">gestion_preferences</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{0565DE2B-FE4E-4031-AD89-03BAA25B1059}</value> |
<value type="string" key="rowFormat">Fixed</value> |
<value type="string" key="sql">CREATE TABLE `gestion_preferences` ( |
`gp_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gp_id_projet` int(10) unsigned NOT NULL default '0', |
PRIMARY KEY (`gp_id_utilisateur`,`gp_id_projet`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{D773607D-F9A9-4A05-9855-96AB3DAA09EA}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{DCE1833D-460D-4F69-8100-61B59F1627B2}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gu_id_utilisateur</value> |
<value type="string" key="oldName">gu_id_utilisateur</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{C05F330C-3DF8-4A13-B603-3C66BC92536C}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gt_id_tache</value> |
<value type="string" key="oldName">gt_id_tache</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{0C908506-FE8D-49C3-8D08-A82A71EED531}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">DATE</value> |
<value type="string" key="defaultValue">'0000-00-00'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gpt_date_prevision</value> |
<value type="string" key="oldName">gpt_date_prevision</value> |
<value type="string" key="simpleType" option="ref">{E3ACD2FE-A26F-4BB8-ADA6-433F92B0570D}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{709D5BC7-CF4E-46F1-AC2B-0F9AB2F0D8C2}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gpt_duree_prevision</value> |
<value type="string" key="oldName">gpt_duree_prevision</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{14049E1B-969B-4E57-B39C-A5058763988A}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{00A1C53D-D7A6-4EE2-BE3B-287F2CBC041C}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gu_id_utilisateur</value> |
<value type="string" key="owner" option="ref">{14049E1B-969B-4E57-B39C-A5058763988A}</value> |
<value type="string" key="referedColumn" option="ref">{DCE1833D-460D-4F69-8100-61B59F1627B2}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{C6338400-B994-461A-A9A9-2622316ABE62}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gt_id_tache</value> |
<value type="string" key="owner" option="ref">{14049E1B-969B-4E57-B39C-A5058763988A}</value> |
<value type="string" key="referedColumn" option="ref">{C05F330C-3DF8-4A13-B603-3C66BC92536C}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{142C2B46-5F58-4300-8080-43506A408226}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gpt_date_prevision</value> |
<value type="string" key="owner" option="ref">{14049E1B-969B-4E57-B39C-A5058763988A}</value> |
<value type="string" key="referedColumn" option="ref">{0C908506-FE8D-49C3-8D08-A82A71EED531}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{D773607D-F9A9-4A05-9855-96AB3DAA09EA}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_prevision_tache</value> |
<value type="string" key="oldName">gestion_prevision_tache</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{14049E1B-969B-4E57-B39C-A5058763988A}</value> |
<value type="string" key="rowFormat">Fixed</value> |
<value type="string" key="sql">CREATE TABLE `gestion_prevision_tache` ( |
`gu_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gt_id_tache` int(10) unsigned NOT NULL default '0', |
`gpt_date_prevision` date NOT NULL default '0000-00-00', |
`gpt_duree_prevision` float NOT NULL default '0', |
PRIMARY KEY (`gu_id_utilisateur`,`gt_id_tache`,`gpt_date_prevision`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{FBF223CC-847A-49C1-8E55-DE5E874A6ABD}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{87B3F09D-648C-4FC0-9BFA-A1DA7E2342A5}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gp_id_projet</value> |
<value type="string" key="oldName">gp_id_projet</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{F4DF1826-40C0-4F87-A024-2BC57422A3DB}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="string" key="defaultValue">''</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gp_nom_projet</value> |
<value type="string" key="oldName">gp_nom_projet</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{DE96B310-4773-4E41-B8F7-4850B5F5C0CB}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gp_description</value> |
<value type="string" key="oldName">gp_description</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{E75E5848-8B88-4322-9AAE-C20137FDD7B2}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">DATE</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gp_date_debut</value> |
<value type="string" key="oldName">gp_date_debut</value> |
<value type="string" key="simpleType" option="ref">{E3ACD2FE-A26F-4BB8-ADA6-433F92B0570D}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{692E74F9-39BE-474D-B737-27F0E836D8AB}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gp_duree_prevue</value> |
<value type="string" key="oldName">gp_duree_prevue</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{F38FC0BD-748F-493A-B219-70C11143CA5D}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gp_avancement</value> |
<value type="string" key="oldName">gp_avancement</value> |
<value type="int" key="precision">11</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{B5BE3401-9B3B-4DD4-B9CB-3688676634AC}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="characterSetName"></value> |
<value type="list" content-type="dict" content-struct-name="db.CheckConstraint" key="checks"/> |
<value type="string" key="collationName"></value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeExplicitParams"></value> |
<value type="string" key="datatypeName"></value> |
<value type="string" key="defaultValue"></value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="int" key="length">0</value> |
<value type="string" key="name">FKgestion_categoriegc_id_categorie</value> |
<value type="string" key="oldName"></value> |
<value type="string" key="owner" option="ref">{FBF223CC-847A-49C1-8E55-DE5E874A6ABD}</value> |
<value type="int" key="precision">0</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref"></value> |
<value type="string" key="structuredDatatype" option="ref"></value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{3FBDF501-BB64-4706-A0BC-22DDF34DD50F}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{7A7FC41E-8CF9-4B48-AFC0-A970C4F1AB51}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gp_id_projet</value> |
<value type="string" key="owner" option="ref">{3FBDF501-BB64-4706-A0BC-22DDF34DD50F}</value> |
<value type="string" key="referedColumn" option="ref">{87B3F09D-648C-4FC0-9BFA-A1DA7E2342A5}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{FBF223CC-847A-49C1-8E55-DE5E874A6ABD}</value> |
<value type="int" key="unique">1</value> |
</value> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{FEEB0586-E5EE-4AB7-B7B5-0525B7713E4A}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{61D25356-7B78-4BA6-9071-02630C88E4BC}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gp_nom_projet</value> |
<value type="string" key="owner" option="ref">{FEEB0586-E5EE-4AB7-B7B5-0525B7713E4A}</value> |
<value type="string" key="referedColumn" option="ref">{F4DF1826-40C0-4F87-A024-2BC57422A3DB}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">UNIQUE</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="string" key="name">gp_nom_projet</value> |
<value type="string" key="oldName">gp_nom_projet</value> |
<value type="string" key="owner" option="ref">{FBF223CC-847A-49C1-8E55-DE5E874A6ABD}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_projet</value> |
<value type="string" key="oldName">gestion_projet</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{3FBDF501-BB64-4706-A0BC-22DDF34DD50F}</value> |
<value type="list" content-type="int" key="routineExpandedHeights"> |
<value type="int">130</value> |
<value type="int">130</value> |
</value> |
<value type="list" content-type="int" key="routineExpandedStates"> |
<value type="int">1</value> |
<value type="int">1</value> |
</value> |
<value type="string" key="rowFormat">Dynamic</value> |
<value type="string" key="sql">CREATE TABLE `gestion_projet` ( |
`gp_id_projet` int(10) unsigned NOT NULL default '0', |
`gc_id_categorie` int(10) unsigned NOT NULL default '0', |
`gp_nom_projet` varchar(255) NOT NULL default '', |
`gp_description` varchar(255) default NULL, |
`gp_date_debut` date default NULL, |
`gp_duree_prevue` float default NULL, |
`gp_avancement` int(11) default NULL, |
PRIMARY KEY (`gp_id_projet`), |
UNIQUE KEY `gp_nom_projet` (`gp_nom_projet`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{F57E75D4-3A8B-4E26-8642-F24068AD7003}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{D1DF2ACD-E495-4577-ADE0-4AA44E2E1C27}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">TINYINT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gs_id_statut</value> |
<value type="string" key="oldName">gs_id_statut</value> |
<value type="int" key="precision">3</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{3C75C19F-FCA4-44DE-8881-F477FEA32E62}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{DC7C494A-EF3C-4EB9-93FE-A8F422932DEF}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="string" key="defaultValue">''</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gs_libelle_statut</value> |
<value type="string" key="oldName">gs_libelle_statut</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{20AE8C29-775F-4C74-8EA3-951041787B82}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{B6F65B40-D484-4382-8103-1605743857F6}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gs_id_statut</value> |
<value type="string" key="owner" option="ref">{20AE8C29-775F-4C74-8EA3-951041787B82}</value> |
<value type="string" key="referedColumn" option="ref">{D1DF2ACD-E495-4577-ADE0-4AA44E2E1C27}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{F57E75D4-3A8B-4E26-8642-F24068AD7003}</value> |
<value type="int" key="unique">1</value> |
</value> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{80BB5820-0BE5-48AA-803A-8D6CFFAD141A}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{72689302-DC31-44CC-BDEC-53BFA98C0E75}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gs_libelle_statut</value> |
<value type="string" key="owner" option="ref">{80BB5820-0BE5-48AA-803A-8D6CFFAD141A}</value> |
<value type="string" key="referedColumn" option="ref">{DC7C494A-EF3C-4EB9-93FE-A8F422932DEF}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">UNIQUE</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="string" key="name">gs_libelle_statut</value> |
<value type="string" key="oldName">gs_libelle_statut</value> |
<value type="string" key="owner" option="ref">{F57E75D4-3A8B-4E26-8642-F24068AD7003}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_statut</value> |
<value type="string" key="oldName">gestion_statut</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{20AE8C29-775F-4C74-8EA3-951041787B82}</value> |
<value type="string" key="rowFormat">Dynamic</value> |
<value type="string" key="sql">CREATE TABLE `gestion_statut` ( |
`gs_id_statut` tinyint(3) unsigned NOT NULL default '0', |
`gs_libelle_statut` varchar(255) NOT NULL default '', |
PRIMARY KEY (`gs_id_statut`), |
UNIQUE KEY `gs_libelle_statut` (`gs_libelle_statut`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{2C40797C-67C8-4231-A187-B49F029F645D}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{4CDB69AB-36E8-46E5-8B17-B5FCDE915FDE}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gt_id_tache</value> |
<value type="string" key="oldName">gt_id_tache</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{0CC103EA-BA98-43ED-AA7C-BA8D61A76735}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gp_id_projet</value> |
<value type="string" key="oldName">gp_id_projet</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{024AD091-CD41-4AEB-B48D-7F4C4F116873}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="string" key="defaultValue">''</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gt_nom_tache</value> |
<value type="string" key="oldName">gt_nom_tache</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{18573F15-DBEE-4E44-BC11-D6D1D946E6AB}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gt_description_tache</value> |
<value type="string" key="oldName">gt_description_tache</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{DC28832D-B6BE-4AE5-AEEC-70544A1204F6}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">DATE</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gt_date_debut_tache</value> |
<value type="string" key="oldName">gt_date_debut_tache</value> |
<value type="string" key="simpleType" option="ref">{E3ACD2FE-A26F-4BB8-ADA6-433F92B0570D}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{64C7ADE4-8C38-446A-86E8-B5749DD18553}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gt_duree_prevue</value> |
<value type="string" key="oldName">gt_duree_prevue</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{4ACDC423-7F2D-4899-A4F9-16B04E9EC94E}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gt_avancement</value> |
<value type="string" key="oldName">gt_avancement</value> |
<value type="int" key="precision">11</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{802A6DFA-056C-49EC-85DE-92F119A0E085}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gt_duree_reelle_tache</value> |
<value type="string" key="oldName">gt_duree_reelle_tache</value> |
<value type="int" key="precision">11</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{F71973AD-346D-4326-8B96-5144225C0D95}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{DBE6B224-34E8-4B98-93F1-62B24A23CE50}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gt_id_tache</value> |
<value type="string" key="owner" option="ref">{F71973AD-346D-4326-8B96-5144225C0D95}</value> |
<value type="string" key="referedColumn" option="ref">{4CDB69AB-36E8-46E5-8B17-B5FCDE915FDE}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{2C40797C-67C8-4231-A187-B49F029F645D}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_taches</value> |
<value type="string" key="oldName">gestion_taches</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{F71973AD-346D-4326-8B96-5144225C0D95}</value> |
<value type="string" key="rowFormat">Dynamic</value> |
<value type="string" key="sql">CREATE TABLE `gestion_taches` ( |
`gt_id_tache` int(10) unsigned NOT NULL default '0', |
`gp_id_projet` int(10) unsigned NOT NULL default '0', |
`gt_nom_tache` varchar(255) NOT NULL default '', |
`gt_description_tache` varchar(255) default NULL, |
`gt_date_debut_tache` date default NULL, |
`gt_duree_prevue` int(10) unsigned default NULL, |
`gt_avancement` int(11) default NULL, |
`gt_duree_reelle_tache` int(11) default NULL, |
PRIMARY KEY (`gt_id_tache`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{8E196167-0ABC-4506-899D-C866145E3D06}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{FE74E7C1-5C6A-4D84-A9A0-810644CE9273}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gt_id_tache</value> |
<value type="string" key="oldName">gt_id_tache</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{BD21C9E7-F245-4DDB-AF81-57E2E477F1F3}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gu_id_utilisateur</value> |
<value type="string" key="oldName">gu_id_utilisateur</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{874A00B5-A556-4079-9B03-F6DD96AE8B7D}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">DATE</value> |
<value type="string" key="defaultValue">'0000-00-00'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gt_date_travail</value> |
<value type="string" key="oldName">gt_date_travail</value> |
<value type="string" key="simpleType" option="ref">{E3ACD2FE-A26F-4BB8-ADA6-433F92B0570D}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{551DA59B-8031-4717-AC41-44975233429C}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gt_duree_travail</value> |
<value type="string" key="oldName">gt_duree_travail</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{556ED4EA-C041-4F51-82B5-AD58C15EE0B5}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{8BE099DF-1CB8-413B-8C7F-305140A03D5B}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gt_id_tache</value> |
<value type="string" key="owner" option="ref">{556ED4EA-C041-4F51-82B5-AD58C15EE0B5}</value> |
<value type="string" key="referedColumn" option="ref">{FE74E7C1-5C6A-4D84-A9A0-810644CE9273}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{B22508C0-EC0D-4271-9F03-C2766492826E}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gu_id_utilisateur</value> |
<value type="string" key="owner" option="ref">{556ED4EA-C041-4F51-82B5-AD58C15EE0B5}</value> |
<value type="string" key="referedColumn" option="ref">{BD21C9E7-F245-4DDB-AF81-57E2E477F1F3}</value> |
</value> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{1DB890F6-80E1-48C3-A2D8-7AEF4B839066}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gt_date_travail</value> |
<value type="string" key="owner" option="ref">{556ED4EA-C041-4F51-82B5-AD58C15EE0B5}</value> |
<value type="string" key="referedColumn" option="ref">{874A00B5-A556-4079-9B03-F6DD96AE8B7D}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{8E196167-0ABC-4506-899D-C866145E3D06}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_travail</value> |
<value type="string" key="oldName">gestion_travail</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{556ED4EA-C041-4F51-82B5-AD58C15EE0B5}</value> |
<value type="string" key="rowFormat">Fixed</value> |
<value type="string" key="sql">CREATE TABLE `gestion_travail` ( |
`gt_id_tache` int(10) unsigned NOT NULL default '0', |
`gu_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gt_date_travail` date NOT NULL default '0000-00-00', |
`gt_duree_travail` float NOT NULL default '0', |
PRIMARY KEY (`gt_id_tache`,`gu_id_utilisateur`,`gt_date_travail`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
<value type="dict" struct-name="db.mysql.Table"> |
<value type="string" key="_id">{8422B893-EBF8-44F2-967B-71D502934AD2}</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Column" key="columns"> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{32F9A308-AB94-4A81-AA1D-7A34D32B3754}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gu_id_utilisateur</value> |
<value type="string" key="oldName">gu_id_utilisateur</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{9174AA6E-191E-4FB5-91AB-1C0A8D7DDC20}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">TINYINT</value> |
<value type="string" key="defaultValue">'0'</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">0</value> |
<value type="string" key="name">gu_ce_statut</value> |
<value type="string" key="oldName">gu_ce_statut</value> |
<value type="int" key="precision">3</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{3C75C19F-FCA4-44DE-8881-F477FEA32E62}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{3574BACC-9672-4B84-A1FB-D3A9C3876116}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="string" key="defaultValue">''</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gu_nom</value> |
<value type="string" key="oldName">gu_nom</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{682A6EF1-A6D2-4546-9E28-5918126A4A05}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="string" key="defaultValue">''</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gu_prenom</value> |
<value type="string" key="oldName">gu_prenom</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{CA9C37EC-C870-46EE-951E-639E6CBD5CB3}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="string" key="defaultValue">''</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gu_password</value> |
<value type="string" key="oldName">gu_password</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{54749E04-4BA9-4DC7-B2E9-583AA9F288C9}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="string" key="defaultValue">''</value> |
<value type="int" key="defaultValueIsNull">0</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">0</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gu_email</value> |
<value type="string" key="oldName">gu_email</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{B339F05D-D8F7-46A1-BAA9-292C86134484}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gu_telephone</value> |
<value type="string" key="oldName">gu_telephone</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{37850722-DF27-415C-91E3-8F8693E1D03E}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gu_adresse</value> |
<value type="string" key="oldName">gu_adresse</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{4B73B8F3-B055-4E17-B4A7-A861D4D90EC1}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">INT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gu_code_postal</value> |
<value type="string" key="oldName">gu_code_postal</value> |
<value type="int" key="precision">10</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{63AE8379-73AC-4A3A-BE1B-09C83DB9C8A6}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gu_ville</value> |
<value type="string" key="oldName">gu_ville</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{57489967-E05E-407B-B0E8-5A65976B667F}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gu_quota_heures_supp</value> |
<value type="string" key="oldName">gu_quota_heures_supp</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{A8F46B82-43E8-4E9B-9EFB-0D0D3778EAD6}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gu_conges_payes</value> |
<value type="string" key="oldName">gu_conges_payes</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{63A0209C-717B-4C79-AE06-2B11A0023AA6}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">FLOAT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gu_temps_de_travail</value> |
<value type="string" key="oldName">gu_temps_de_travail</value> |
<value type="string" key="simpleType" option="ref">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{D7A5B70F-4EC4-40C8-83A5-C27DE1C0725A}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">TINYINT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gu_admin</value> |
<value type="string" key="oldName">gu_admin</value> |
<value type="int" key="precision">3</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{3C75C19F-FCA4-44DE-8881-F477FEA32E62}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{1F78526E-AA2B-4D9F-A86F-E19FF92A28E8}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">TINYINT</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"> |
<value type="string">unsigned</value> |
</value> |
<value type="int" key="isNullable">1</value> |
<value type="string" key="name">gu_admin2</value> |
<value type="string" key="oldName">gu_admin2</value> |
<value type="int" key="precision">3</value> |
<value type="int" key="scale">0</value> |
<value type="string" key="simpleType" option="ref">{3C75C19F-FCA4-44DE-8881-F477FEA32E62}</value> |
</value> |
<value type="dict" struct-name="db.mysql.Column"> |
<value type="string" key="_id">{3DDFB452-2F34-4ABE-8E3F-B9C7C7F89BDC}</value> |
<value type="int" key="autoIncrement">0</value> |
<value type="string" key="collationName">latin1_swedish_ci</value> |
<value type="string" key="comment"></value> |
<value type="string" key="datatypeName">VARCHAR</value> |
<value type="int" key="defaultValueIsNull">1</value> |
<value type="list" content-type="string" key="flags"/> |
<value type="int" key="isNullable">1</value> |
<value type="int" key="length">255</value> |
<value type="string" key="name">gu_notes</value> |
<value type="string" key="oldName">gu_notes</value> |
<value type="string" key="simpleType" option="ref">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="defaultCharacterSetName">latin1</value> |
<value type="string" key="defaultCollationName">latin1_swedish_ci</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.ForeignKey" key="foreignKeys"/> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Index" key="indices"> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{C69DF998-1F59-427F-BEF2-BCEACA969B9B}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{19CDC230-1C12-4460-9EAE-2505616DF8E2}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gu_id_utilisateur</value> |
<value type="string" key="owner" option="ref">{C69DF998-1F59-427F-BEF2-BCEACA969B9B}</value> |
<value type="string" key="referedColumn" option="ref">{32F9A308-AB94-4A81-AA1D-7A34D32B3754}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">PRIMARY</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="int" key="isPrimary">1</value> |
<value type="string" key="name">PRIMARY</value> |
<value type="string" key="oldName">PRIMARY</value> |
<value type="string" key="owner" option="ref">{8422B893-EBF8-44F2-967B-71D502934AD2}</value> |
<value type="int" key="unique">1</value> |
</value> |
<value type="dict" struct-name="db.mysql.Index"> |
<value type="string" key="_id">{F9D51977-E85F-4AE2-A412-F21B3E6894BB}</value> |
<value type="list" content-type="dict" content-struct-name="db.IndexColumn" key="columns"> |
<value type="dict" struct-name="db.mysql.IndexColumn"> |
<value type="string" key="_id">{B9CA2FF0-12C2-4105-9D4D-B539B3CE3F31}</value> |
<value type="int" key="descend">0</value> |
<value type="string" key="name">gu_email</value> |
<value type="string" key="owner" option="ref">{F9D51977-E85F-4AE2-A412-F21B3E6894BB}</value> |
<value type="string" key="referedColumn" option="ref">{54749E04-4BA9-4DC7-B2E9-583AA9F288C9}</value> |
</value> |
</value> |
<value type="string" key="comment"></value> |
<value type="string" key="indexKind">UNIQUE</value> |
<value type="string" key="indexType">BTREE</value> |
<value type="string" key="name">gu_email</value> |
<value type="string" key="oldName">gu_email</value> |
<value type="string" key="owner" option="ref">{8422B893-EBF8-44F2-967B-71D502934AD2}</value> |
<value type="int" key="unique">1</value> |
</value> |
</value> |
<value type="int" key="isTemporary">0</value> |
<value type="string" key="name">gestion_utilisateur</value> |
<value type="string" key="oldName">gestion_utilisateur</value> |
<value type="string" key="owner" option="ref">{20741062-AEAF-42A6-AA6F-44693638A267}</value> |
<value type="string" key="primaryKey" option="ref">{C69DF998-1F59-427F-BEF2-BCEACA969B9B}</value> |
<value type="string" key="rowFormat">Dynamic</value> |
<value type="string" key="sql">CREATE TABLE `gestion_utilisateur` ( |
`gu_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gu_ce_statut` tinyint(3) unsigned NOT NULL default '0', |
`gu_nom` varchar(255) NOT NULL default '', |
`gu_prenom` varchar(255) NOT NULL default '', |
`gu_password` varchar(255) NOT NULL default '', |
`gu_email` varchar(255) NOT NULL default '', |
`gu_telephone` int(10) unsigned default NULL, |
`gu_adresse` varchar(255) default NULL, |
`gu_code_postal` int(10) unsigned default NULL, |
`gu_ville` varchar(255) default NULL, |
`gu_quota_heures_supp` float default NULL, |
`gu_conges_payes` float default NULL, |
`gu_temps_de_travail` float default NULL, |
`gu_admin` tinyint(3) unsigned default NULL, |
`gu_admin2` tinyint(3) unsigned default NULL, |
`gu_notes` varchar(255) default NULL, |
PRIMARY KEY (`gu_id_utilisateur`), |
UNIQUE KEY `gu_email` (`gu_email`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1</value> |
<value type="string" key="tableEngine">MyISAM</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.Trigger" key="triggers"/> |
</value> |
</value> |
<value type="list" content-type="dict" content-struct-name="db.mysql.View" key="views"/> |
</value> |
</value> |
<value type="list" content-type="string" content-struct-name="db.SimpleDatatype" key="simpleDatatypes" option="ref"> |
<value type="string">{3C75C19F-FCA4-44DE-8881-F477FEA32E62}</value> |
<value type="string">{B98335A2-603F-4042-9D59-88248D987309}</value> |
<value type="string">{A5A2A320-DAAD-416E-862C-FAA9AD90DF8C}</value> |
<value type="string">{014AB6FC-CA8A-4FA2-8BD9-E97D7F8D53AE}</value> |
<value type="string">{B96B522A-48FE-431F-A0B4-D5E1B733FE3F}</value> |
<value type="string">{BEA67203-20CC-4A53-A4EC-B2F31E84DE1E}</value> |
<value type="string">{3873BD96-9C60-4BB0-90B4-45F4C76485D9}</value> |
<value type="string">{8CB74E5F-921A-4F6E-95C6-3AD94F2BB36F}</value> |
<value type="string">{4B160881-85B7-4C25-BBD1-36C9CA1A0E80}</value> |
<value type="string">{7198A7BD-968D-4BD9-B85C-4DE7504F0D83}</value> |
<value type="string">{4159AB8E-78E7-41E7-AAFD-0DE3766C2935}</value> |
<value type="string">{CD41C6AA-4BAC-42E8-A4FC-655CAE3534D0}</value> |
<value type="string">{B965148B-8E5B-46E9-999C-252D92B37B2C}</value> |
<value type="string">{52734DB8-D81D-4593-A74C-891967DFAC63}</value> |
<value type="string">{7874D9C1-0F91-487C-822C-3ABC407452BE}</value> |
<value type="string">{BFDB5048-852A-4985-8772-5123FB7C23FE}</value> |
<value type="string">{D2A508F3-9636-400D-816E-68E0A172204C}</value> |
<value type="string">{6A28850F-C54C-4722-80A0-6187798B35C0}</value> |
<value type="string">{EBCCD9D0-1497-4EEE-97FC-0C96DB3D2EBE}</value> |
<value type="string">{6C2E3841-EA8D-48E1-A727-B0B2E71857BF}</value> |
<value type="string">{9A2399C8-F3EA-4B6C-AAB1-830D3BFF164B}</value> |
<value type="string">{E3ACD2FE-A26F-4BB8-ADA6-433F92B0570D}</value> |
<value type="string">{65642303-376E-4C4A-B200-7E0DFAA47344}</value> |
<value type="string">{868AC4F9-F4BB-44AD-8512-4EBAD5E5D661}</value> |
<value type="string">{D8A1FD40-794F-464E-8E4A-E14C38D9C924}</value> |
<value type="string">{DC0345B1-52D4-497C-AFA1-17A00BCAA7FE}</value> |
<value type="string">{739D4BC4-0188-46BB-84AB-DB97CE01B67F}</value> |
<value type="string">{50C760E2-97A4-4BB0-ABA5-E0A2D11E683D}</value> |
<value type="string">{86A060EB-F367-4890-8FFA-00840F281791}</value> |
<value type="string">{04006513-2EA3-4785-A541-8C25E68E5E0A}</value> |
<value type="string">{1D1FE4C9-6A0B-423C-A048-8830C430A93E}</value> |
<value type="string">{E1609E12-9B2A-4EF7-9265-00D6D3BE0026}</value> |
<value type="string">{855F4FED-94F7-4E28-812C-6882B28571AF}</value> |
<value type="string">{F496575F-5F75-4825-A059-7DFC75DB3DFD}</value> |
<value type="string">{D442887A-6402-4873-ADC5-6F875085C0A6}</value> |
<value type="string">{D8F350D8-9522-478F-9233-28C52E26A067}</value> |
</value> |
</value> |
<value type="dict" struct-name="db.mgmt.Connection" key="connection"> |
<value type="string" key="_id">{593505BC-8072-43EE-AAB3-7AC6190BAB48}</value> |
<value type="string" key="driver" option="ref">{D65C7567-0B84-4AC6-A1A4-0A4BB8C9F3F2}</value> |
<value type="dict" key="modules"> |
<value type="string" key="MigrationModule">MigrationGeneric</value> |
<value type="string" key="QueryModule">QueryMysql</value> |
<value type="string" key="ReverseEngineeringModule">ReverseEngineeringMysql</value> |
<value type="string" key="TransformationModule">TransformationMysql</value> |
</value> |
<value type="string" key="name"></value> |
<value type="dict" content-type="string" key="parameterValues"> |
<value type="string" key="host">localhost</value> |
<value type="string" key="password">0000</value> |
<value type="string" key="port">3306</value> |
<value type="string" key="socket"></value> |
<value type="string" key="useAnsiQuotes">0</value> |
<value type="string" key="useCompression">0</value> |
<value type="string" key="useSSL">0</value> |
<value type="string" key="username">root</value> |
</value> |
</value> |
<value type="dict" struct-name="db.workbench.Model" key="model"> |
<value type="string" key="_id">{350D4B91-6D27-4A5B-A934-27F44A7DCB06}</value> |
<value type="string" key="currentView" option="ref">{B7105B48-B136-4FB5-979D-3B572F80AC76}</value> |
<value type="list" content-type="dict" content-struct-name="model.Marker" key="markers"> |
<value type="dict" struct-name="model.Marker"> |
<value type="string" key="_id">{87954771-FF96-4AF0-AC46-477F8EFCA797}</value> |
<value type="string" key="name">Marker10</value> |
<value type="string" key="view" option="ref">{B7105B48-B136-4FB5-979D-3B572F80AC76}</value> |
<value type="int" key="x">0</value> |
<value type="int" key="y">0</value> |
<value type="real" key="zoom">0.666667</value> |
</value> |
</value> |
<value type="dict" struct-name="db.workbench.ModelInfo" key="properties"> |
<value type="string" key="_id">{590C5A76-F2FA-4C6E-BC9A-371C6448BCF8}</value> |
<value type="string" key="author">Jean-Pascal MILCENT</value> |
<value type="string" key="dateChanged">Jun 29, 2006</value> |
<value type="string" key="dateCreated">Jun 29, 2006</value> |
<value type="string" key="description"></value> |
<value type="string" key="modelName">Gestion du Temps de Travail</value> |
<value type="string" key="name">Properties</value> |
<value type="string" key="owner" option="ref">{350D4B91-6D27-4A5B-A934-27F44A7DCB06}</value> |
<value type="string" key="project">GTT</value> |
<value type="string" key="version">4.0</value> |
</value> |
<value type="list" content-type="dict" content-struct-name="model.View" key="views"> |
<value type="dict" struct-name="db.workbench.View"> |
<value type="string" key="_id">{B7105B48-B136-4FB5-979D-3B572F80AC76}</value> |
<value type="string" key="connectionLayoutClass">eer</value> |
<value type="string" key="description"></value> |
<value type="string" key="elementLayoutClass"></value> |
<value type="list" content-type="dict" content-struct-name="model.Element" key="elements"> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{0C4BB43E-EBCB-4D33-AED4-B65A1F80D91B}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">50.000000</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1098.183228</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_absence</value> |
<value type="string" key="table" option="ref">{33484728-36CA-4148-B172-6ADF5D05B2A2}</value> |
<value type="real" key="top">479.939514</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">214.666656</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{9F8F36DC-A50A-4199-9145-391B094598C8}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">281.999989</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">597.876831</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_categorie</value> |
<value type="string" key="table" option="ref">{CDD0F37D-3F47-4D88-805E-0A15DAEE31D8}</value> |
<value type="real" key="top">112.581879</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">253.333313</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{432FC313-6218-4BCF-B6B0-D809F69B569E}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">0</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">308.000010</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1897.005859</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_composer_utilisateur_frais_kilometrique</value> |
<value type="string" key="table" option="ref">{8FF7CC72-8BFD-41B6-8876-D0A1D147A975}</value> |
<value type="real" key="top">25.166656</value> |
<value type="int" key="triggersExpanded">0</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">429.333344</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{C744FAEC-89CF-4353-94F3-2EDE763848C5}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">360.000000</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1064.126343</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_depense</value> |
<value type="string" key="table" option="ref">{F1117948-EC22-4098-BF48-C5A14ADBA868}</value> |
<value type="real" key="top">1074.843262</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">194.666672</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{A6832BB0-BC85-4726-B21C-63B9CBF415F1}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">230.000000</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1107.743286</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_frais_kilometrique</value> |
<value type="string" key="table" option="ref">{9EAA1835-034F-46B7-A7B2-A721333D50A0}</value> |
<value type="real" key="top">235.079834</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">269.333252</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{1A0D7C5B-824C-4166-85A0-424C33BC1839}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">334.000000</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1286.951294</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_motif_absence</value> |
<value type="string" key="table" option="ref">{79E37616-F0D5-4CFB-9DC8-079424B0DD6D}</value> |
<value type="real" key="top">1246.870972</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">249.333374</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{85665715-9988-4A5E-9687-BD99624D5505}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">178.000000</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1884.895630</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_note_frais</value> |
<value type="string" key="table" option="ref">{342BF6EF-DB73-4295-AFEF-32E99A116AF6}</value> |
<value type="real" key="top">427.257507</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">221.333374</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{4EBC8F77-80D4-4967-B48A-6D19372198FC}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">178.000000</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1409.012817</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_predecesseurs</value> |
<value type="string" key="table" option="ref">{56B2B4EB-27AF-4A61-8B8B-B8E504CC976C}</value> |
<value type="real" key="top">241.213043</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">237.333313</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{D6FB693A-CA11-4981-888C-7F9DBBE26A51}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">256.000015</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1652.201416</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_preferences</value> |
<value type="string" key="table" option="ref">{F4DBCC00-40C8-41C1-9CEC-64F4ECA6AC5D}</value> |
<value type="real" key="top">31.936459</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">214.666626</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{8423DECB-4C07-4C36-901C-3AA724302C6A}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">334.000000</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1352.029785</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_prevision_tache</value> |
<value type="string" key="table" option="ref">{D773607D-F9A9-4A05-9855-96AB3DAA09EA}</value> |
<value type="real" key="top">463.856873</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">230.666687</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{D963569B-AC1D-4B72-8813-3590E57FC276}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">0</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">412.000000</value> |
<value type="int" key="indicesExpanded">1</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">242.348602</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_projet</value> |
<value type="string" key="table" option="ref">{FBF223CC-847A-49C1-8E55-DE5E874A6ABD}</value> |
<value type="real" key="top">432.119690</value> |
<value type="int" key="triggersExpanded">0</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">230.666687</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{F2EE90D1-DD94-4C73-A624-76FA28B09A38}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">282.000000</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1119.312256</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_statut</value> |
<value type="string" key="table" option="ref">{F57E75D4-3A8B-4E26-8642-F24068AD7003}</value> |
<value type="real" key="top">33.364941</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">224.000015</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{45072F1E-C5E8-4A8E-BBF6-DE0A8DECEF23}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">334.000000</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1338.812500</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_taches</value> |
<value type="string" key="table" option="ref">{2C40797C-67C8-4231-A187-B49F029F645D}</value> |
<value type="real" key="top">712.592712</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">246.666626</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{E72385EC-AFA8-4860-887E-2779181F245B}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">50.000000</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1062.000000</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_travail</value> |
<value type="string" key="table" option="ref">{8E196167-0ABC-4506-899D-C866145E3D06}</value> |
<value type="real" key="top">828.906494</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">221.333336</value> |
</value> |
<value type="dict" struct-name="db.workbench.TableElement"> |
<value type="string" key="_id">{0A08E2C8-A763-4F0D-824E-D7259D328217}</value> |
<value type="string" key="color"></value> |
<value type="int" key="columnsExpanded">1</value> |
<value type="int" key="enabled">0</value> |
<value type="int" key="expanded">1</value> |
<value type="int" key="foreignKeysExpanded">1</value> |
<value type="string" key="group" option="ref"></value> |
<value type="real" key="height">541.999969</value> |
<value type="int" key="indicesExpanded">0</value> |
<value type="string" key="layer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="layoutClass"></value> |
<value type="real" key="left">1610.068359</value> |
<value type="int" key="locked">0</value> |
<value type="string" key="name">gestion_utilisateur</value> |
<value type="string" key="table" option="ref">{8422B893-EBF8-44F2-967B-71D502934AD2}</value> |
<value type="real" key="top">427.774200</value> |
<value type="int" key="triggersExpanded">1</value> |
<value type="int" key="visible">1</value> |
<value type="real" key="width">241.333252</value> |
</value> |
</value> |
<value type="real" key="height">7000.000000</value> |
<value type="list" content-type="dict" content-struct-name="model.Layer" key="layers"> |
<value type="dict" struct-name="db.workbench.Layer"> |
<value type="string" key="_id">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="string" key="color"></value> |
<value type="string" key="description"></value> |
<value type="list" content-type="string" content-struct-name="model.Element" key="elements" option="ref"> |
<value type="string">{0C4BB43E-EBCB-4D33-AED4-B65A1F80D91B}</value> |
<value type="string">{9F8F36DC-A50A-4199-9145-391B094598C8}</value> |
<value type="string">{432FC313-6218-4BCF-B6B0-D809F69B569E}</value> |
<value type="string">{C744FAEC-89CF-4353-94F3-2EDE763848C5}</value> |
<value type="string">{A6832BB0-BC85-4726-B21C-63B9CBF415F1}</value> |
<value type="string">{1A0D7C5B-824C-4166-85A0-424C33BC1839}</value> |
<value type="string">{85665715-9988-4A5E-9687-BD99624D5505}</value> |
<value type="string">{4EBC8F77-80D4-4967-B48A-6D19372198FC}</value> |
<value type="string">{D6FB693A-CA11-4981-888C-7F9DBBE26A51}</value> |
<value type="string">{8423DECB-4C07-4C36-901C-3AA724302C6A}</value> |
<value type="string">{D963569B-AC1D-4B72-8813-3590E57FC276}</value> |
<value type="string">{F2EE90D1-DD94-4C73-A624-76FA28B09A38}</value> |
<value type="string">{45072F1E-C5E8-4A8E-BBF6-DE0A8DECEF23}</value> |
<value type="string">{E72385EC-AFA8-4860-887E-2779181F245B}</value> |
<value type="string">{0A08E2C8-A763-4F0D-824E-D7259D328217}</value> |
</value> |
<value type="int" key="enabled">0</value> |
<value type="list" content-type="dict" content-struct-name="model.Group" key="groups"/> |
<value type="real" key="height">0.000000</value> |
<value type="real" key="left">0.000000</value> |
<value type="string" key="name">root</value> |
<value type="string" key="owner" option="ref">{350D4B91-6D27-4A5B-A934-27F44A7DCB06}</value> |
<value type="list" content-type="string" content-struct-name="model.Layer" key="subLayers" option="ref"/> |
<value type="real" key="top">0.000000</value> |
<value type="int" key="visible">0</value> |
<value type="real" key="width">0.000000</value> |
</value> |
</value> |
<value type="string" key="name">Main View</value> |
<value type="string" key="owner" option="ref">{350D4B91-6D27-4A5B-A934-27F44A7DCB06}</value> |
<value type="list" content-type="dict" content-struct-name="db.workbench.Relationship" key="relationships"/> |
<value type="string" key="rootLayer" option="ref">{A9812420-A512-46B5-8F75-31EDD4560D01}</value> |
<value type="list" content-type="dict" content-struct-name="model.Element" key="selection"> |
<value type="dict" struct-name="db.workbench.TableElement" link="{D963569B-AC1D-4B72-8813-3590E57FC276}"/> |
</value> |
<value type="real" key="width">10000.000000</value> |
<value type="real" key="x">0.000000</value> |
<value type="real" key="y">0.000000</value> |
<value type="real" key="zoom">1.000000</value> |
</value> |
</value> |
</value> |
<value type="string" key="name">Workbench</value> |
<value type="string" key="rdbms" option="ref">{6D75781B-52CF-4252-9B3D-9F28B75C09F7}</value> |
<value type="int" key="version">2</value> |
</value> |
</data> |
/trunk/documentation/gtt_v3.xml |
---|
New file |
0,0 → 1,902 |
<?xml version="1.0" standalone="yes" ?> |
<DBMODEL Version="4.0"> |
<SETTINGS> |
<GLOBALSETTINGS ModelName="model_reverse_engineered" IDModel="0" IDVersion="0" VersionStr="1.0.0.0" Comments="" UseVersionHistroy="1" AutoIncVersion="1" DatabaseType="MySQL" ZoomFac="100.00" XPos="262" YPos="264" DefaultDataType="5" DefaultTablePrefix="0" DefSaveDBConn="" DefSyncDBConn="" DefQueryDBConn="" Printer="" HPageCount="4.0" PageAspectRatio="1.440892512336408" PageOrientation="1" PageFormat="A4 (210x297 mm, 8.26x11.7 inches)" SelectedPages="" UsePositionGrid="0" PositionGridX="20" PositionGridY="20" TableNameInRefs="0" DefaultTableType="0" ActivateRefDefForNewRelations="1" FKPrefix="" FKPostfix="" CreateFKRefDefIndex="0" DBQuoteCharacter="`" CreateSQLforLinkedObjects="0" DefModelFont="Nimbus Sans L" CanvasWidth="4096" CanvasHeight="2842" /> |
<DATATYPEGROUPS> |
<DATATYPEGROUP Name="Numeric Types" Icon="1" /> |
<DATATYPEGROUP Name="Date and Time Types" Icon="2" /> |
<DATATYPEGROUP Name="String Types" Icon="3" /> |
<DATATYPEGROUP Name="Blob and Text Types" Icon="4" /> |
<DATATYPEGROUP Name="User defined Types" Icon="5" /> |
<DATATYPEGROUP Name="Geographic Types" Icon="6" /> |
</DATATYPEGROUPS> |
<DATATYPES> |
<DATATYPE ID="1" IDGroup="0" TypeName="TINYINT" Description="A very small integer. The signed range is -128 to 127. The unsigned range is 0 to 255." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="1" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="2" IDGroup="0" TypeName="SMALLINT" Description="A small integer. The signed range is -32768 to 32767. The unsigned range is 0 to 65535." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="1" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="3" IDGroup="0" TypeName="MEDIUMINT" Description="A medium-size integer. The signed range is -8388608 to 8388607. The unsigned range is 0 to 16777215." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="1" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="4" IDGroup="0" TypeName="INT" Description="A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="1" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="0" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="5" IDGroup="0" TypeName="INTEGER" Description="A normal-size integer. The signed range is -2147483648 to 2147483647. The unsigned range is 0 to 4294967295." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="1" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="1" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="6" IDGroup="0" TypeName="BIGINT" Description="A large integer. The signed range is -9223372036854775808 to 9223372036854775807. The unsigned range is 0 to 18446744073709551615." ParamCount="1" OptionCount="2" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="UNSIGNED" Default="0" /> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="7" IDGroup="0" TypeName="FLOAT" Description="A small (single-precision) floating-point number. Cannot be unsigned. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="precision" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="8" IDGroup="0" TypeName="FLOAT" Description="A small (single-precision) floating-point number. Cannot be unsigned. Allowable values are -3.402823466E+38 to -1.175494351E-38, 0, and 1.175494351E-38 to 3.402823466E+38." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="9" IDGroup="0" TypeName="DOUBLE" Description="A normal-size (double-precision) floating-point number. Cannot be unsigned. Allowable values are -1.7976931348623157E+308 to -2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="10" IDGroup="0" TypeName="DOUBLE PRECISION" Description="This is a synonym for DOUBLE." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="11" IDGroup="0" TypeName="REAL" Description="This is a synonym for DOUBLE." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="2" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="12" IDGroup="0" TypeName="DECIMAL" Description="An unpacked floating-point number. Cannot be unsigned. Behaves like a CHAR column." ParamCount="2" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="3" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="13" IDGroup="0" TypeName="NUMERIC" Description="This is a synonym for DECIMAL." ParamCount="2" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="3" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
<PARAM Name="decimals" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="ZEROFILL" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="14" IDGroup="1" TypeName="DATE" Description="A date. The supported range is \a1000-01-01\a to \a9999-12-31\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="15" IDGroup="1" TypeName="DATETIME" Description="A date and time combination. The supported range is \a1000-01-01 00:00:00\a to \a9999-12-31 23:59:59\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="16" IDGroup="1" TypeName="TIMESTAMP" Description="A timestamp. The range is \a1970-01-01 00:00:00\a to sometime in the year 2037. The length can be 14 (or missing), 12, 10, 8, 6, 4, or 2 representing YYYYMMDDHHMMSS, ... , YYYYMMDD, ... , YY formats." ParamCount="1" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
</DATATYPE> |
<DATATYPE ID="17" IDGroup="1" TypeName="TIME" Description="A time. The range is \a-838:59:59\a to \a838:59:59\a." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="18" IDGroup="1" TypeName="YEAR" Description="A year in 2- or 4-digit format (default is 4-digit)." ParamCount="1" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
</DATATYPE> |
<DATATYPE ID="19" IDGroup="2" TypeName="CHAR" Description="A fixed-length string (1 to 255 characters) that is always right-padded with spaces to the specified length when stored. values are sorted and compared in case-insensitive fashion according to the default character set unless the BINARY keyword is given." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="BINARY" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="20" IDGroup="2" TypeName="VARCHAR" Description="A variable-length string (1 to 255 characters). Values are sorted and compared in case-sensitive fashion unless the BINARY keyword is given." ParamCount="1" OptionCount="1" ParamRequired="1" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="length" /> |
</PARAMS> |
<OPTIONS> |
<OPTION Name="BINARY" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="21" IDGroup="2" TypeName="BIT" Description="This is a synonym for CHAR(1)." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="22" IDGroup="2" TypeName="BOOL" Description="This is a synonym for CHAR(1)." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="23" IDGroup="3" TypeName="TINYBLOB" Description="A column maximum length of 255 (2^8 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="24" IDGroup="3" TypeName="BLOB" Description="A column maximum length of 65535 (2^16 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="25" IDGroup="3" TypeName="MEDIUMBLOB" Description="A column maximum length of 16777215 (2^24 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="26" IDGroup="3" TypeName="LONGBLOB" Description="A column maximum length of 4294967295 (2^32 - 1) characters. Values are sorted and compared in case-sensitive fashion." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="27" IDGroup="3" TypeName="TINYTEXT" Description="A column maximum length of 255 (2^8 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="28" IDGroup="3" TypeName="TEXT" Description="A column maximum length of 65535 (2^16 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="29" IDGroup="3" TypeName="MEDIUMTEXT" Description="A column maximum length of 16777215 (2^24 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="30" IDGroup="3" TypeName="LONGTEXT" Description="A column maximum length of 4294967295 (2^32 - 1) characters." ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="31" IDGroup="3" TypeName="ENUM" Description="An enumeration. A string object that can have only one value, chosen from the list of values." ParamCount="1" OptionCount="0" ParamRequired="1" EditParamsAsString="1" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="values" /> |
</PARAMS> |
</DATATYPE> |
<DATATYPE ID="32" IDGroup="3" TypeName="SET" Description="A set. A string object that can have zero or more values, each of which must be chosen from the list of values." ParamCount="1" OptionCount="0" ParamRequired="1" EditParamsAsString="1" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<PARAMS> |
<PARAM Name="values" /> |
</PARAMS> |
</DATATYPE> |
<DATATYPE ID="33" IDGroup="4" TypeName="Varchar(20)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<OPTIONS> |
<OPTION Name="BINARY" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="34" IDGroup="4" TypeName="Varchar(45)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<OPTIONS> |
<OPTION Name="BINARY" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="35" IDGroup="4" TypeName="Varchar(255)" Description="" ParamCount="0" OptionCount="1" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
<OPTIONS> |
<OPTION Name="BINARY" Default="0" /> |
</OPTIONS> |
</DATATYPE> |
<DATATYPE ID="36" IDGroup="5" TypeName="GEOMETRY" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="38" IDGroup="5" TypeName="LINESTRING" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="39" IDGroup="5" TypeName="POLYGON" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="40" IDGroup="5" TypeName="MULTIPOINT" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="41" IDGroup="5" TypeName="MULTILINESTRING" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="42" IDGroup="5" TypeName="MULTIPOLYGON" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
<DATATYPE ID="43" IDGroup="5" TypeName="GEOMETRYCOLLECTION" Description="Geographic Datatype" ParamCount="0" OptionCount="0" ParamRequired="0" EditParamsAsString="0" SynonymGroup="0" PhysicalMapping="0" PhysicalTypeName="" > |
</DATATYPE> |
</DATATYPES> |
<COMMON_DATATYPES> |
<COMMON_DATATYPE ID="5" /> |
<COMMON_DATATYPE ID="8" /> |
<COMMON_DATATYPE ID="20" /> |
<COMMON_DATATYPE ID="15" /> |
<COMMON_DATATYPE ID="22" /> |
<COMMON_DATATYPE ID="28" /> |
<COMMON_DATATYPE ID="26" /> |
<COMMON_DATATYPE ID="33" /> |
<COMMON_DATATYPE ID="34" /> |
<COMMON_DATATYPE ID="35" /> |
</COMMON_DATATYPES> |
<TABLEPREFIXES> |
<TABLEPREFIX Name="Default (no prefix)" /> |
</TABLEPREFIXES> |
<REGIONCOLORS> |
<REGIONCOLOR Color="Red=#FFEEEC" /> |
<REGIONCOLOR Color="Yellow=#FEFDED" /> |
<REGIONCOLOR Color="Green=#EAFFE5" /> |
<REGIONCOLOR Color="Cyan=#ECFDFF" /> |
<REGIONCOLOR Color="Blue=#F0F1FE" /> |
<REGIONCOLOR Color="Magenta=#FFEBFA" /> |
</REGIONCOLORS> |
<POSITIONMARKERS> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
<POSITIONMARKER ZoomFac="-1.0" X="0" Y="0" /> |
</POSITIONMARKERS> |
</SETTINGS> |
<METADATA> |
<REGIONS> |
</REGIONS> |
<TABLES> |
<TABLE ID="1394" Tablename="gestion_absence" PrevTableName="" XPos="591" YPos="702" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="2" > |
<COLUMNS> |
<COLUMN ID="1409" ColName="gu_id_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1411" ColName="ga_date_debut" PrevColName="" Pos="3" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1584" ColName="gma_id_motif" PrevColName="" Pos="1" idDatatype="1" DatatypeParams="(3)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1412" ColName="ga_date_fin" PrevColName="" Pos="4" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1413" ColName="ga_date_envoi_lettre" PrevColName="" Pos="5" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1583" /> |
<RELATION_END ID="1585" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1414" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1409" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1411" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1395" Tablename="gestion_categorie" PrevTableName="" XPos="85" YPos="1" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="3" > |
<COLUMNS> |
<COLUMN ID="1415" ColName="gc_id_categorie" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1416" ColName="gc_libelle_categorie" PrevColName="" Pos="2" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1564" /> |
</RELATIONS_START> |
<INDICES> |
<INDEX ID="1417" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1415" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1396" Tablename="gestion_composer_utilisateur_frais_kilometrique" PrevTableName="" XPos="887" YPos="503" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="4" > |
<COLUMNS> |
<COLUMN ID="1418" ColName="gcufk_id_frais_kilometrique" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1419" ColName="gcufk_id_utilisateur" PrevColName="" Pos="2" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1420" ColName="gcufk_date_frais" PrevColName="" Pos="3" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1506" ColName="gfk_id_frais_kilometrique" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1504" ColName="gu_id_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1421" ColName="gcufk_nb_kilometre" PrevColName="" Pos="4" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1422" ColName="gcufk_objet" PrevColName="" Pos="5" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1423" ColName="gcufk_trajet" PrevColName="" Pos="6" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1424" ColName="gcufk_montant_total" PrevColName="" Pos="7" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1503" /> |
<RELATION_END ID="1505" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1425" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1418" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1419" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1420" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1397" Tablename="gestion_depense" PrevTableName="" XPos="330" YPos="105" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="5" > |
<COLUMNS> |
<COLUMN ID="1426" ColName="gu_id_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1427" ColName="gnf_id_frais" PrevColName="" Pos="2" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1428" ColName="gd_date_depense" PrevColName="" Pos="3" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1429" ColName="gd_montant_ht" PrevColName="" Pos="4" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1430" ColName="gd_montant_ttc" PrevColName="" Pos="5" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1499" /> |
<RELATION_END ID="1500" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1431" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1426" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1427" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1428" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1398" Tablename="gestion_frais_kilometrique" PrevTableName="" XPos="849" YPos="264" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="6" > |
<COLUMNS> |
<COLUMN ID="1432" ColName="gfk_id_frais_kilometrique" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1433" ColName="gfk_taux_kilometre" PrevColName="" Pos="2" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1505" /> |
</RELATIONS_START> |
<INDICES> |
<INDEX ID="1434" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1432" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1399" Tablename="gestion_motif_absence" PrevTableName="" XPos="272" YPos="709" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="7" > |
<COLUMNS> |
<COLUMN ID="1435" ColName="gma_id_motif" PrevColName="" Pos="1" idDatatype="1" DatatypeParams="(3)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1436" ColName="gma_libelle_motif" PrevColName="" Pos="2" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1437" ColName="gma_type_rtt" PrevColName="" Pos="3" idDatatype="19" DatatypeParams="(1)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1583" /> |
</RELATIONS_START> |
<INDICES> |
<INDEX ID="1438" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1435" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1400" Tablename="gestion_note_frais" PrevTableName="" XPos="356" YPos="15" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="8" > |
<COLUMNS> |
<COLUMN ID="1439" ColName="gnf_id_frais" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1440" ColName="gnf_libelle_frais" PrevColName="" Pos="2" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1500" /> |
</RELATIONS_START> |
<INDICES> |
<INDEX ID="1441" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1439" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1401" Tablename="gestion_predecesseurs" PrevTableName="" XPos="14" YPos="734" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="9" > |
<COLUMNS> |
<COLUMN ID="1443" ColName="gpred_id_pred" PrevColName="" Pos="2" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1515" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1444" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1443" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1402" Tablename="gestion_preferences" PrevTableName="" XPos="348" YPos="290" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="10" > |
<COLUMNS> |
<COLUMN ID="1445" ColName="gu_id_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1446" ColName="gp_id_projet" PrevColName="" Pos="2" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1494" /> |
<RELATION_END ID="1498" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1447" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1445" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1446" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1403" Tablename="gestion_prevision_tache" PrevTableName="" XPos="310" YPos="587" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="11" > |
<COLUMNS> |
<COLUMN ID="1448" ColName="gu_id_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1450" ColName="gpt_date_prevision" PrevColName="" Pos="3" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1451" ColName="gpt_duree_prevision" PrevColName="" Pos="4" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1512" /> |
<RELATION_END ID="1513" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1452" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1448" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1450" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1404" Tablename="gestion_projet" PrevTableName="" XPos="10" YPos="114" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="12" > |
<COLUMNS> |
<COLUMN ID="1565" ColName="gc_id_categorie" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1522" ColName="gp_id_projet" PrevColName="" Pos="6" idDatatype="5" DatatypeParams="" Width="-1" Prec="-1" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1455" ColName="gp_nom_projet" PrevColName="" Pos="3" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1456" ColName="gp_description" PrevColName="" Pos="4" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1457" ColName="gp_date_debut" PrevColName="" Pos="5" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1458" ColName="gp_duree_prevue" PrevColName="" Pos="6" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1459" ColName="gp_avancement" PrevColName="" Pos="7" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1498" /> |
<RELATION_START ID="1511" /> |
<RELATION_START ID="1514" /> |
</RELATIONS_START> |
<RELATIONS_END> |
<RELATION_END ID="1564" /> |
</RELATIONS_END> |
</TABLE> |
<TABLE ID="1405" Tablename="gestion_statut" PrevTableName="" XPos="580" YPos="64" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="13" > |
<COLUMNS> |
<COLUMN ID="1461" ColName="gs_id_statut" PrevColName="" Pos="1" idDatatype="1" DatatypeParams="(3)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1502" ColName="gu_id_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1462" ColName="gs_libelle_statut" PrevColName="" Pos="2" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1501" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1463" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1461" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1406" Tablename="gestion_taches" PrevTableName="" XPos="-2" YPos="482" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="\n" TableOptions="DelayKeyTblUpdates=0\nPackKeys=0\nRowChecksum=0\nRowFormat=0\nUseRaid=0\nRaidType=0\n" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="14" > |
<COLUMNS> |
<COLUMN ID="1464" ColName="gt_id_tache" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1465" ColName="gp_id_projet" PrevColName="" Pos="2" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1466" ColName="gt_nom_tache" PrevColName="" Pos="3" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1467" ColName="gt_description_tache" PrevColName="" Pos="4" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1468" ColName="gt_date_debut_tache" PrevColName="" Pos="5" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1469" ColName="gt_duree_prevue" PrevColName="" Pos="6" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1470" ColName="gt_avancement" PrevColName="" Pos="7" idDatatype="5" DatatypeParams="(11)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1513" /> |
<RELATION_START ID="1515" /> |
</RELATIONS_START> |
<RELATIONS_END> |
<RELATION_END ID="1514" /> |
</RELATIONS_END> |
</TABLE> |
<TABLE ID="1407" Tablename="gestion_travail" PrevTableName="" XPos="194" YPos="390" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="15" > |
<COLUMNS> |
<COLUMN ID="1472" ColName="gp_id_projet" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1473" ColName="gu_id_utilisateur" PrevColName="" Pos="2" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="1" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1474" ColName="gt_date_travail" PrevColName="" Pos="3" idDatatype="14" DatatypeParams="" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="0000-00-00" Comments=""> |
<OPTIONSELECTED> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1475" ColName="gt_duree_travail" PrevColName="" Pos="4" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_END> |
<RELATION_END ID="1510" /> |
<RELATION_END ID="1511" /> |
</RELATIONS_END> |
<INDICES> |
<INDEX ID="1476" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1472" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1473" LengthParam="0" /> |
<INDEXCOLUMN idColumn="1474" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
<TABLE ID="1408" Tablename="gestion_utilisateur" PrevTableName="" XPos="627" YPos="288" TableType="0" TablePrefix="0" nmTable="0" Temporary="0" UseStandardInserts="0" StandardInserts="" TableOptions="" Comments="" Collapsed="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="16" > |
<COLUMNS> |
<COLUMN ID="1477" ColName="gu_id_utilisateur" PrevColName="" Pos="1" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="1" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1478" ColName="gs_id_statut" PrevColName="" Pos="2" idDatatype="1" DatatypeParams="(3)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1479" ColName="gu_nom" PrevColName="" Pos="3" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1480" ColName="gu_prenom" PrevColName="" Pos="4" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1481" ColName="gu_password" PrevColName="" Pos="5" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1482" ColName="gu_email" PrevColName="" Pos="6" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="1" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1483" ColName="gu_telephone" PrevColName="" Pos="7" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1484" ColName="gu_adresse" PrevColName="" Pos="8" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1485" ColName="gu_code_postal" PrevColName="" Pos="9" idDatatype="5" DatatypeParams="(10)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1486" ColName="gu_ville" PrevColName="" Pos="10" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1487" ColName="gu_quota_heures_supp" PrevColName="" Pos="11" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1488" ColName="gu_conges_payes" PrevColName="" Pos="12" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1489" ColName="gu_temps_de_travail" PrevColName="" Pos="13" idDatatype="7" DatatypeParams="" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1490" ColName="gu_admin" PrevColName="" Pos="14" idDatatype="1" DatatypeParams="(3)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1491" ColName="gu_admin2" PrevColName="" Pos="15" idDatatype="1" DatatypeParams="(3)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="1" /> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
<COLUMN ID="1492" ColName="gu_notes" PrevColName="" Pos="16" idDatatype="20" DatatypeParams="(255)" Width="0" Prec="0" PrimaryKey="0" NotNull="0" AutoInc="0" IsForeignKey="0" DefaultValue="" Comments=""> |
<OPTIONSELECTED> |
<OPTIONSELECT Value="0" /> |
</OPTIONSELECTED> |
</COLUMN> |
</COLUMNS> |
<RELATIONS_START> |
<RELATION_START ID="1494" /> |
<RELATION_START ID="1499" /> |
<RELATION_START ID="1501" /> |
<RELATION_START ID="1503" /> |
<RELATION_START ID="1510" /> |
<RELATION_START ID="1512" /> |
<RELATION_START ID="1585" /> |
</RELATIONS_START> |
<INDICES> |
<INDEX ID="1493" IndexName="PRIMARY" IndexKind="0" FKRefDef_Obj_id="-1"> |
<INDEXCOLUMNS> |
<INDEXCOLUMN idColumn="1477" LengthParam="0" /> |
</INDEXCOLUMNS> |
</INDEX> |
</INDICES> |
</TABLE> |
</TABLES> |
<RELATIONS> |
<RELATION ID="1494" RelationName="avoir_preferences" Kind="2" SrcTable="1408" DestTable="1402" FKFields="gu_id_utilisateur=gu_id_utilisateur\n" FKFieldsComments="\n" relDirection="4" MidOffset="-23" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-3" CaptionOffsetY="-61" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="17" /> |
<RELATION ID="1498" RelationName="fk_gp_gpreferences" Kind="5" SrcTable="1404" DestTable="1402" FKFields="" FKFieldsComments="" relDirection="2" MidOffset="19" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="10" CaptionOffsetY="-33" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="18" /> |
<RELATION ID="1499" RelationName="fk_gu_gd" Kind="5" SrcTable="1408" DestTable="1397" FKFields="gu_id_utilisateur=gu_id_utilisateur\n" FKFieldsComments="\n" relDirection="4" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="19" /> |
<RELATION ID="1500" RelationName="fk_gnf_gd" Kind="5" SrcTable="1400" DestTable="1397" FKFields="gnf_id_frais=gnf_id_frais\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-5" CaptionOffsetY="-23" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="20" /> |
<RELATION ID="1501" RelationName="fk_gu_gs" Kind="5" SrcTable="1408" DestTable="1405" FKFields="gu_id_utilisateur=gu_id_utilisateur\n" FKFieldsComments="\n" relDirection="1" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="30" CaptionOffsetY="11" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="21" /> |
<RELATION ID="1503" RelationName="fk_gu_gcufk" Kind="5" SrcTable="1408" DestTable="1396" FKFields="gu_id_utilisateur=gu_id_utilisateur\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="22" /> |
<RELATION ID="1505" RelationName="fk_gfk_gcufk" Kind="5" SrcTable="1398" DestTable="1396" FKFields="gfk_id_frais_kilometrique=gfk_id_frais_kilometrique\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="23" /> |
<RELATION ID="1510" RelationName="effectuer_travail" Kind="5" SrcTable="1408" DestTable="1407" FKFields="gu_id_utilisateur=gu_id_utilisateur\n" FKFieldsComments="\n" relDirection="4" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-1" CaptionOffsetY="-46" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="26" /> |
<RELATION ID="1511" RelationName="fk_gp_gt" Kind="5" SrcTable="1404" DestTable="1407" FKFields="" FKFieldsComments="" relDirection="3" MidOffset="29" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="83" CaptionOffsetY="14" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="27" /> |
<RELATION ID="1512" RelationName="faire_prevision" Kind="0" SrcTable="1408" DestTable="1403" FKFields="gu_id_utilisateur=gu_id_utilisateur\n" FKFieldsComments="\n" relDirection="4" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="28" /> |
<RELATION ID="1513" RelationName="concerner_tache" Kind="5" SrcTable="1406" DestTable="1403" FKFields="" FKFieldsComments="" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="-28" CaptionOffsetY="32" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="29" /> |
<RELATION ID="1514" RelationName="etre_compose" Kind="5" SrcTable="1404" DestTable="1406" FKFields="" FKFieldsComments="" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="30" /> |
<RELATION ID="1515" RelationName="avoir_predecesseur" Kind="5" SrcTable="1406" DestTable="1401" FKFields="" FKFieldsComments="" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="31" /> |
<RELATION ID="1564" RelationName="Rel_21" Kind="5" SrcTable="1395" DestTable="1404" FKFields="gc_id_categorie=gc_id_categorie\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="32" /> |
<RELATION ID="1583" RelationName="fk_gma_ga" Kind="2" SrcTable="1399" DestTable="1394" FKFields="gma_id_motif=gma_id_motif\n" FKFieldsComments="\n" relDirection="2" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="31" /> |
<RELATION ID="1585" RelationName="fk_gu_ga" Kind="5" SrcTable="1408" DestTable="1394" FKFields="gu_id_utilisateur=gu_id_utilisateur\n" FKFieldsComments="\n" relDirection="3" MidOffset="0" OptionalStart="0" OptionalEnd="0" CaptionOffsetX="0" CaptionOffsetY="0" StartIntervalOffsetX="0" StartIntervalOffsetY="0" EndIntervalOffsetX="0" EndIntervalOffsetY="0" CreateRefDef="1" Invisible="0" RefDef="Matching=0\nOnDelete=3\nOnUpdate=3\n" Comments="" FKRefDefIndex_Obj_id="-1" Splitted="0" IsLinkedObject="0" IDLinkedModel="-1" Obj_id_Linked="-1" OrderPos="32" /> |
</RELATIONS> |
<NOTES> |
</NOTES> |
<IMAGES> |
</IMAGES> |
</METADATA> |
<PLUGINDATA> |
<PLUGINDATARECORDS> |
</PLUGINDATARECORDS> |
</PLUGINDATA> |
<QUERYDATA> |
<QUERYRECORDS> |
</QUERYRECORDS> |
</QUERYDATA> |
<LINKEDMODELS> |
</LINKEDMODELS> |
</DBMODEL> |
/trunk/documentation/gtt_v4.sql |
---|
New file |
0,0 → 1,132 |
DROP DATABASE IF EXISTS `gestion_v4`; |
CREATE DATABASE `gestion_v4` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_absence ( |
ga_id_abscence INTEGER(11) UNSIGNED NOT NULL, |
ga_ce_absence_motif TINYINT(3) UNSIGNED NOT NULL, |
ga_ce_utilisateur INTEGER(11) UNSIGNED NOT NULL, |
ga_date_debut DATE NOT NULL DEFAULT "0000-00-00", |
ga_date_fin DATE NOT NULL DEFAULT "0000-00-00", |
ga_date_envoi_lettre DATE NOT NULL DEFAULT "0000-00-00", |
PRIMARY KEY(ga_id_abscence) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_absence_motif ( |
gam_id_absence_motif TINYINT(3) UNSIGNED NOT NULL, |
gam_libelle VARCHAR(255) NOT NULL, |
gam_mark_rtt BOOL NOT NULL, |
gam_nbre_heure INT(11) NULL, |
PRIMARY KEY(gam_id_absence_motif) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_frais_km ( |
gfk_id_frais_km INTEGER(11) UNSIGNED NOT NULL, |
gfkt_id_frais_km_taux INTEGER(11) UNSIGNED NOT NULL, |
gfk_ce_utilisateur INTEGER(11) UNSIGNED NOT NULL, |
gfk_date DATE NOT NULL DEFAULT "0000-00-00", |
gfk_nbre_km FLOAT NULL, |
gfk_objet VARCHAR(255) NULL, |
gfk_trajet VARCHAR(255) NULL, |
gfk_montant_total FLOAT NOT NULL, |
PRIMARY KEY(gfk_id_frais_km) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_frais_km_taux ( |
gfkt_id_frais_km_taux INTEGER(11) UNSIGNED NOT NULL, |
gfkt_taux FLOAT NOT NULL, |
PRIMARY KEY(gfkt_id_frais_km_taux) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_note_frais ( |
gnf_id_note_frais INTEGER(11) UNSIGNED NOT NULL, |
gnf_ce_utilisateur INTEGER(11) UNSIGNED NOT NULL, |
gnf_libelle VARCHAR(255) NOT NULL, |
PRIMARY KEY(gnf_id_note_frais) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_note_frais_ligne ( |
gnfl_id_note_frais_ligne INTEGER(11) UNSIGNED NOT NULL, |
gnfl_ce_note_frais INTEGER(11) UNSIGNED NOT NULL, |
gnfl_date DATE NOT NULL DEFAULT "0000-00-00", |
gnfl_montant_ht FLOAT NULL, |
gnfl_taux_tva FLOAT NULL, |
gnfl_montant_ttc FLOAT NOT NULL, |
PRIMARY KEY(gnfl_id_note_frais_ligne) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_projet ( |
gp_id_projet INTEGER(11) UNSIGNED NOT NULL, |
gp_ce_categorie INTEGER(11) UNSIGNED NOT NULL, |
gp_nom_projet VARCHAR(255) NOT NULL, |
gp_description TEXT NULL, |
gp_date_debut DATE NULL, |
gp_duree_prevue FLOAT NULL, |
gp_avancement INTEGER(11) NULL, |
PRIMARY KEY(gp_id_projet) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_projet_categorie ( |
gpc_id_categorie INTEGER(11) UNSIGNED NOT NULL, |
gpc_libelle VARCHAR(255) NOT NULL, |
PRIMARY KEY(gpc_id_categorie) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_projet_tache ( |
gpt_id_tache INTEGER(11) UNSIGNED NOT NULL, |
gpt_ce_tache_precedente INTEGER(11) UNSIGNED NOT NULL, |
gpt_ce_projet INTEGER(11) UNSIGNED NOT NULL, |
gpt_libelle VARCHAR(255) NOT NULL, |
gpt_description TEXT NULL, |
gpt_date_debut DATE NULL, |
gpt_duree_prevue INTEGER(11) UNSIGNED NULL, |
gpt_avancement INTEGER(11) NULL, |
PRIMARY KEY(gpt_id_tache) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_travail_projet ( |
gtp_id_utilisateur INTEGER(11) UNSIGNED NOT NULL, |
gtp_id_projet INTEGER(11) UNSIGNED NOT NULL, |
gtp_id_date_travail DATE NOT NULL DEFAULT "0000-00-00", |
gtp_duree FLOAT NOT NULL DEFAULT 0, |
PRIMARY KEY(gtp_id_utilisateur, gtp_id_projet, gtp_id_date_travail) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_travail_tache ( |
gtt_id_utilisateur INTEGER(11) UNSIGNED NOT NULL, |
gtt_id_tache INTEGER(11) UNSIGNED NOT NULL, |
gtt_id_date_travail DATE NOT NULL, |
gtt_duree FLOAT NOT NULL DEFAULT 0, |
PRIMARY KEY(gtt_id_utilisateur, gtt_id_tache, gtt_id_date_travail) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_utilisateur ( |
gu_id_utilisateur INTEGER(11) UNSIGNED NOT NULL, |
gus_id_utilisateur_statut TINYINT(3) UNSIGNED NOT NULL, |
gu_nom VARCHAR(100) NOT NULL, |
gu_prenom VARCHAR(100) NOT NULL, |
gu_password VARCHAR(32) NOT NULL, |
gu_email VARCHAR(255) NOT NULL, |
gu_telephone INTEGER(11) UNSIGNED NULL, |
gu_adresse VARCHAR(255) NULL, |
gu_code_postal INTEGER(11) UNSIGNED NULL, |
gu_ville VARCHAR(50) NULL, |
gu_quota_heures_supp FLOAT NULL, |
gu_conges_payes FLOAT NULL, |
gu_temps_de_travail FLOAT NULL, |
gu_mark_admin BOOL NULL, |
gu_mark_recapitulatif BOOL NULL, |
gu_notes TEXT NULL, |
PRIMARY KEY(gu_id_utilisateur) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_utilisateur_a_projet ( |
guap_id_utilisateur INTEGER(11) UNSIGNED NOT NULL, |
guap_id_projet INTEGER(11) UNSIGNED NOT NULL, |
PRIMARY KEY(guap_id_utilisateur, guap_id_projet) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
CREATE TABLE `gestion_v4`.gestion_utilisateur_statut ( |
gus_id_utilisateur_statut TINYINT(3) UNSIGNED NOT NULL, |
gus_libelle VARCHAR(255) NOT NULL, |
PRIMARY KEY(gus_id_utilisateur_statut) |
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin; |
/trunk/presentation/gtt_calendrier.class.php |
---|
24,10 → 24,7 |
// |@author ABDOOL RAHEEM shaheen <shaheenar50@hotmail.com> | |
// |@version 3 | |
include_once("HTML/Table.php"); |
include_once 'gtt_config.inc.php'; |
include_once CHEMIN_LANGUES.'gtt_langue_fr.inc.php'; |
include_once "HTML/QuickForm.php"; |
include_once 'HTML/Table.php'; |
/** |
*classe calendrier pour gerer le calendrier pour un mois et une annee |
41,8 → 38,6 |
*@param liste de noms des mois |
*@param liste des jours feries du mois |
*/ |
class Calendrier |
{ |
/trunk/presentation/preferences.tpl.html |
---|
New file |
0,0 → 1,15 |
<form id="gestion_admin_pref" action="index.php?action=<?=GTT_ACTION_PREFERENCE_VALIDER;?>" name="gestion_admin_pref" method="post"> |
<input name="champ_nb_total_proj" value="<?=$nbre_projets;?>" type="hidden"/> |
<ul> |
<?foreach ($preferences as $categorie => $projets):?> |
<li><h2><?=$categorie;?></h2> |
<dl> |
<?foreach ($projets as $projet):?> |
<dt><?=$projet['nom'];?></dt> |
<dd><input id="pr:<?=$projet['id'];?>" name="pr:<?=$projet['id'];?>" value="<?=$projet['valeur'];?>" type="checkbox" <?=$projet['coche']?'checked="checked"':'';?>/></dd> |
<?php endforeach; ?> |
</dl></li> |
<?php endforeach; ?> |
<li><input id="btn_valider_editer" name="btn_valider_editer" value="<?=$i18n_general_valider;?>" type="submit" /></li> |
</ul> |
</form> |
/trunk/presentation/principal.tpl.html |
---|
New file |
0,0 → 1,12 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" /> |
<html xmlns="http://www.w3.org/1999/xhtml/" > |
<head> |
<meta http-equiv="Content-Style-Type" content="text/css" /> |
<link rel="stylesheet" type="text/css" href="presentation/gtt_vert.css" media="screen" title="Vert" /> |
<title>Editer Preferences</title> |
</head> |
<body> |
<h1 id="titre_principal"><?=$titre;?></h1> |
<div id="contenu_principal"><?=$contenu_principal;?></div> |
</body> |
</html> |
/trunk/presentation/gtt_vert.css |
---|
223,4 → 223,11 |
border-color: #74C054; |
border-width: 4px; |
border-style: outset; |
} |
#calendrier table {background-color: silver;} |
.selected { |
background-color: yellow; |
} |
.empty { |
color: white; |
} |
/trunk/presentation/gestion.tpl.html |
---|
New file |
0,0 → 1,41 |
<dl> |
<dt>Congés payés restants</dt> |
<dd>22 jours</dd> |
<dt>Heures supp restantes</dt> |
<dd> 2 jours 6heures </dd> |
</dl> |
<div id="calendrier"> |
<p><a href="<?=$url_mois_precedent;?>">Mois précédent</a> - <a href="<?=$url_mois_suivant;?>">Mois suivant</a></p> |
<p><a href="<?=$url_semaine_precedente;?>">Semaine précédente</a> - <a href="<?=$url_semaine_suivante;?>">Semaine suivante</a></p> |
<table> |
<caption><?=$mois_courant_nom;?></caption> |
<thead> |
<tr> |
<th>Lun</th> |
<th>Mar</th> |
<th>Mer</th> |
<th>Jeu</th> |
<th>Ven</th> |
<th>Sam</th> |
<th>Dim</th> |
</tr> |
</thead> |
<tbody> |
<?php foreach ($elements as $semaine) : ?> |
<tr> |
<?php foreach ($semaine as $jour) : ?> |
<td class="<?=$jour['class'];?>"> |
<? if ($jour['class'] == 'empty') :?> |
<?=$jour['jour'];?> |
<? else :?> |
<a href="index.php?action=<?=GTT_ACTION_GESTION;?>&annee=<?=$jour['annee'];?>&mois=<?=$jour['mois'];?>&jour=<?=$jour['jour'];?>"><?=$jour['jour'];?></a> |
<? endif;?> |
</td> |
<?php endforeach; ?> |
</tr> |
<?php endforeach; ?> |
</tbody> |
</table> |
</div> |
/trunk/controleur/gtt_controleur_admin_utilisateur.php |
---|
33,7 → 33,7 |
*@copyright Copyright (C) 2003 Tela-Botanica |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
include_once CHEMIN_FN_GENERIQUE_AFFICHAGE; |
include_once CHEMIN_PRESENTATION.'gtt_fonctions_generique_affichage.php'; |
include_once CHEMIN_MENU.'gtt_menu_admin_utilisateur.php'; |
include_once CHEMIN_CLASSES_METIER.'gtt_utilisateur.class.php'; |
/trunk/classes/Calendrier.class.php |
---|
New file |
0,0 → 1,452 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe Calendrier |
* |
* Description |
* |
*@package Calendrier |
//Auteur original : |
*@version 1 |
*@author Dorian BANNIER <dbannier@aol.com> |
//Autres auteurs : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* Classe calendrier pour gerer le calendrier pour un mois et une annee |
* |
*@param annee |
*@param mois |
*@param premier jour du mois |
*@param semaine |
*@param l'url du resultat affiche |
*@param liste de noms des jours |
*@param liste de noms des mois |
*@param liste des jours feries du mois |
*/ |
class Calendrier |
{ |
private $annee; |
private $mois; |
private $semaine; |
private $jour; |
private $nom_jours = array(); |
private $nom_mois = array(); |
private $liste_feries = array(); |
/** contient le nom des variables que recevra l'url spécifié |
* @var string |
*/ |
var $var_jour = "jour"; |
var $var_mois = "mois"; |
var $var_annee = "annee"; |
/** |
*constructeur de la classe calendrier |
*toutes les variables sont initialises avec les donnees |
*de la date du jour si on ne passe aucune date en parametre |
*sinon on initialise le calendrier avec |
*@param semaine |
*@param annee |
*/ |
public function __construct($semaine = null, $annee = null) |
{ |
if (is_null($semaine)) { |
$semaine = date('W', time()); |
} |
if (is_null($annee)) { |
// TODO : vérifier le standard ISO-8601 |
$annee = date('Y', time()); |
} |
$tableau = $this->donnerLundiEtDimancheSemaine($semaine, $annee); |
$this->jour = date('d',mktime(0,0,0,1,$tableau[0],$annee)); |
$this->semaine = $semaine; |
$this->mois = date('n',mktime(0,0,0,1,$tableau[0],$annee)); |
$this->annee = $annee; |
$this->nom_jours = array (GESTION_LUN_L, GESTION_MAR_L, GESTION_MER_L, GESTION_JEU_L, GESTION_VEN_L, GESTION_SAM_L ,GESTION_DIM_L); |
$this->nom_mois = array(1 => "Janvier","Février","Mars","Avril","Mai","Juin","Juillet", "Août","Septembre","Octobre","Novembre","Décembre"); |
$this->liste_feries = $this->calculerJoursFeries($this->annee); |
} |
public function getAnnee() |
{ |
return $this->annee; |
} |
public function getMois() |
{ |
return $this->mois; |
} |
public function getSemaine() |
{ |
return $this->semaine; |
} |
public function getJour() |
{ |
return $this->jour; |
} |
/** |
*Calcule les dates des jours fériés pour la france. |
*Renvoie un tableau contenant la liste de dates par mois. |
*Les dates sont de la forme timestamp unix. |
* |
*@param integer l'année pour laquelle on veut les jours fériés. |
*@return array tableau des dates fériées. |
*/ |
public function calculerJoursFeries($annee) |
{ |
$tab = array( mktime(0,0,0,1,1,$annee), |
$this->donnerDatePaques($annee), |
mktime(0,0,0,5,1,$annee), |
mktime(0,0,0,5,8,$annee), |
$this->donnerDateAscension($annee), |
$this->donnerDatePentecote($annee), |
mktime(0,0,0,7,14,$annee), |
mktime(0,0,0,8,15,$annee), |
mktime(0,0,0,11,1,$annee), |
mktime(0,0,0,11,11,$annee), |
mktime(0,0,0,12,25,$annee)); |
return $tab; |
} |
/** |
*Calcule la date du lundi de Pâques. |
* |
*@param integer l'année pour laquelle on veut connaître la date de Pâques |
*@return integer le timestamp du lundi de Pâques |
*/ |
public function donnerDatePaques($annee) |
{ |
$date_paques = easter_date($annee); |
$lundi_paques = mktime( date("H", $date_paques), |
date("i", $date_paques), |
date("s", $date_paques), |
date("m", $date_paques), |
date("d", $date_paques) + 1, |
date("Y", $date_paques)); |
return $lundi_paques; |
} |
/** |
*Calcule la date de l'ascension. |
* |
*@param integer l'année pour laquelle on veut connaître la date de l'ascencion |
*@return integer le timestamp de l'ascencion |
*/ |
public function donnerDateAscension($annee) |
{ |
$date_paques = easter_date($annee); |
$date_ascension = mktime( date("H", $date_paques), |
date("i", $date_paques), |
date("s", $date_paques), |
date("m", $date_paques), |
date("d", $date_paques) + 39, |
date("Y", $date_paques)); |
return $date_ascension; |
} |
/** |
*Calcule la date du lundi de la pentecote |
*Renvoie un timestamp |
*renvoie cette derniere |
*/ |
public function donnerDatePentecote($annee) |
{ |
$date_paques = easter_date($annee); |
$date_ascension = $this->donnerDateAscension($annee); |
$date_pentecote = mktime( date("H", $date_ascension), |
date("i", $date_ascension), |
date("s", $date_ascension), |
date("m", $date_ascension), |
date("d", $date_ascension) + 11, |
date("Y", $date_ascension)); |
return $date_pentecote; |
} |
/** |
*Donne le type de jour de la semaine au format numérique du premier jour du mois. |
* |
*@return integer le numéro de 1 (lundi) à 7 (dimanche) correspondant au type du premier jour du mois. |
*/ |
function donnerTypePremierJourMois() |
{ |
$intPremierJour = date("w", mktime(0, 0, 0, $this->getMois(), 1, $this->getAnnee())); |
if ($intPremierJour == 0) { |
$intPremierJour = 7; // si c'est un dimanche |
} |
return $intPremierJour; |
} |
/** |
*Calcule le dernier jour du mois |
*@param : annee, mois |
*renvoie un entier |
*/ |
function donnerDernierJourMois() |
{ |
$h = $this->donnerNbreJoursMois(); |
$intDernierJour = date("w", mktime(0, 0, 0, $this->getMois(), $h, $this->getAnnee())); |
if($intDernierJour == 0) { |
$intDernierJour = 7; // si c'est un dimanche |
} |
return $intDernierJour; |
} |
/** |
*Calcule le nombre de jours dans un mois |
*@return integer le nombre de jour dans le mois. |
*/ |
function donnerNbreJoursMois() |
{ |
return date("t", mktime(0, 0, 0, $this->getMois(), 1, $this->getAnnee())); |
} |
/** |
*Calcule la semaine suivante |
*/ |
function donnerSemaineSuivante() |
{ |
if ($this->getSemaine() == date('W', mktime(0, 0, 0, 12, 31, $this->getAnnee()))) { |
$tab['semaine'] = 1; |
$tab['annee'] = $this->getAnnee() + 1; |
} else { |
$tab['semaine'] = $this->getSemaine() + 1; |
$tab['annee'] = $this->getAnnee(); |
} |
return $tab; |
} |
/** |
*Calule la semaine précédente |
*/ |
function donnerSemainePrecedente() |
{ |
if ($this->getSemaine() == 1) { |
$tab['semaine'] = date('W', mktime(0, 0, 0, 12, 31, ($this->getAnnee() - 1))); |
$tab['annee'] = $this->annee - 1; |
} else { |
$tab['semaine'] = $this->semaine - 1 ; |
$tab['annee'] = $this->annee; |
} |
return $tab; |
} |
/** |
*Calucule le mois suivant |
*renvoie l'annee et le mois suivant sous forme de chiffre |
*dans un tableau |
*/ |
function donnerMoisSuivant() |
{ |
if ($this->mois == 12) { |
$tab['mois'] = 1; |
$tab['annee'] = $this->annee + 1; |
} else { |
$tab['mois'] = $this->mois + 1; |
$tab['annee'] = $this->annee; |
} |
return $tab; |
} |
/** |
*Calcule le mois precedent |
*renvoie l'annee et le mois precedent sous forme de chiffre |
*/ |
function donnerMoisPrecedent() |
{ |
if ($this->mois == 1) { |
$tab['mois'] = 12; |
$tab['annee'] = $this->annee - 1; |
} else { |
$tab['mois'] = $this->mois - 1; |
$tab['annee'] = $this->annee; |
} |
return $tab; |
} |
/** |
*Renvoie la date du lundi et dimanche d'une semaine |
*a partir du numero de semaine |
* |
*@return un tableau contenat le timestamp unix de lundi et dimanche |
*de la semaine en question |
*/ |
function donnerLundiEtDimancheSemaine() |
{ |
if ((date("w", mktime(0, 0, 0, 1, 1, $this->getAnnee())) <= 4) && (date("w", mktime(0, 0, 0, 1, 1, $this->getAnnee())) != 0)) { |
$nbre_jour = ($this->getSemaine() - 1) * 7; |
} else { |
$nbre_jour = ($this->getSemaine()) * 7; |
} |
if (date("w", mktime(0, 0, 0, 1, 1, $this->getAnnee())) == 0) { |
$nbre_jour += 7; |
} else { |
$nbre_jour += 7 - ((date("w", mktime(0, 0, 0, 1, 1, $this->getAnnee())) - 1) % 7); |
} |
$nbre_jour_7 = $nbre_jour - 6; |
return array($nbre_jour_7, $nbre_jour); |
} |
/** |
*Indique si une date est fériée ou non |
*renvoie 1 si férié |
*0 sinon |
*/ |
function etreFerie($date) |
{ |
if (in_array($date, $this->liste_feries)) { |
return 1; |
} else { |
return 0; |
} |
} |
/** |
*Affiche un calendrier naviguable par semaine |
*option pour cliquer sur une semaine donnee |
*utilisation de la bibliotheque HTML/TABLE de PEAR |
*@param numero de semaine et annee |
*/ |
function afficherCalendrier($annee) |
{ |
$id="CALENDRIER"; |
$text=/*"</tr></td>".*/"<div id=\"calendrier\">"; |
//initialisation des donnees |
$intPremierJour = &Calendrier::premierJourMois($this->mois,$this->annee); |
$intNbJoursMois = &Calendrier::nbJourMois($this->mois,$this->annee); |
$prevMonth=&Calendrier::prevMonth($this->mois,$this->annee); |
$intNbJourPrec=&Calendrier::nbJourMois($prevMonth[0],$prevMonth[1]); |
$intDernierJour=&Calendrier::dernierJourMois($this->mois,$this->annee); |
//calcul du lundi et dimanche de la semaine courante |
//calcul de l'annee |
$tabLundiDimanche =& Calendrier::lundiEtDimancheSemaine($this->semaine,$annee); |
//creation de la table HTML representant le calendrier |
$tableAttrs = array("class" =>$id,"width" => "300"); |
//creation de la barre de navigation |
//semaine precedente |
$tabPrevWeek=&Calendrier::prevWeek(); |
$text.="<a href=".$GLOBALS['urlBase'].GESTION_TRAVAIL."&semaine="; |
$text.=$tabPrevWeek[0]."&annee=".$tabPrevWeek[1].">"; |
$text.="<<"."</a>"; |
//semaine courante |
$text.='<button>'; |
$text.=date('d/m/y',mktime(0,0,0,1,$tabLundiDimanche[0],$annee)); |
$text.=' -- '; |
$text.=date('d/m/y',mktime(0,0,0,1,$tabLundiDimanche[1],$annee)); |
$text.='</button>'; |
//semaine suivante |
$tabNextWeek= &Calendrier::nextWeek(); |
$text.="<a href=".$GLOBALS['urlBase'].GESTION_TRAVAIL."&semaine="; |
$text.=$tabNextWeek[0]."&annee=".$tabNextWeek[1].">"; |
$text.=">>"."</a>"; |
$table = new HTML_Table($tableAttrs); |
$table -> setAutoGrow(true); |
$table->addRow($this->nom_jours); |
//remplissage de la premiere ligne |
//test si on est dans la semaine courante |
//si dimanche egale a la fin de la semaine |
$semCourante=(date('d',mktime(0,0,0,1,$tabLundiDimanche[1],$annee))==(7-$intPremierJour+1)); |
$p=1; |
for($i=1; $i<=7;$i++) { |
if ($i<$intPremierJour and $semCourante) {//mois prec et semaine courante |
$elem[$i-1]="<div id=\"moisprecedent\">".($intNbJourPrec-$intPremierJour+$i+1); |
} elseif ($i<$intPremierJour and !$semCourante) {//mois prec et pas semaien courante |
$semaineL=date('W',mktime(0,0,0,$prevMonth[0],($intNbJourPrec-$intPremierJour+$i+1),$prevMonth[1])); |
$elem[$i-1]= "<a href=".$this->url."?action=".GESTION_TRAVAIL."&semaine=$semaineL"."&annee=$prevMonth[1]".">".($intNbJourPrec-$intPremierJour+$i+1)."</a>"; |
} elseif ($i>=$intPremierJour and $semCourante) {//mois courant et semaine courante |
$elem[$i-1] = "<div id=\"jourcourant\">".$p."</div>"; |
$p++; |
} else {//mois courant et pas semaine courante |
$semaineL=date('W',mktime(0,0,0,$this->mois,$p,$this->annee)); |
$elem[$i-1] = "<a href=".$this->url."?action=".GESTION_TRAVAIL."&semaine=$semaineL"; |
$elem[$i-1] .="&annee=".$this->annee.">".$p."</a>"; |
$p++; |
} |
} |
$table->addRow($elem); |
//remplissage du reste des lignes |
$i=0; //indice du tableau |
//lundi de la semaien courante |
// $t=&Calendrier::lundiEtDimancheSemaine($this->semaine,$this->annee); |
$lundiCourant=date('d',mktime(0,0,0,1,$tabLundiDimanche[0],$annee)); |
$semCourante2=0; |
for ($f=$p; $f<=$intNbJoursMois ; $f++) { |
if ($f==$lundiCourant and $i==0) { |
$semCourante2=1;//booleen |
} |
//calcul de la semaine courante |
$semaineL2=date('W',mktime(0,0,0,$this->mois,$f,$this->annee)); |
if ($semCourante2==1) { |
$elem[$i]= "<div id=\"jourcourant\">".$f."</div>"; |
} else { |
$elem[$i]="<a href=".$this->url."?action=".GESTION_TRAVAIL."&semaine=$semaineL2"; |
$elem[$i].="&annee=".$this->annee.">".$f."</a>"; |
} |
if ($i==6) { |
$i=0; |
if ($semCourante2==1) { |
$semCourante2=0; |
} |
$table->addRow($elem); |
} else { |
$i++; |
} |
} |
//remplissage de la derniere ligne |
$semaineL3=date('W',mktime(0,0,0,$this->mois,$intNbJoursMois,$this->annee)); |
if ($semCourante2==0) { |
for ($d=$i; $d<=6;$d++) { |
$s=$d-$i+1; |
$elem[$d]="<a href=".$this->url."?action=".GESTION_TRAVAIL."&semaine=$semaineL2"; |
$elem[$d].="&annee=".$this->annee.">".$s."</a>"; |
} |
} else { |
for ($d=$i; $d<=6;$d++) { |
$elem[$d]= ($d-$i+1); |
} |
} |
$table->addRow($elem); |
$text.=$table->toHtml(); |
$text .= "</div>"; |
return $text; |
} |
} |
?> |
/trunk/classes/Controlleur.class.php |
---|
New file |
0,0 → 1,61 |
<?php |
class Controlleur { |
public function executer($action) |
{ |
if (preg_match('/^(.+?)(?:_(.+)|)$/', $action, $match)) { |
$classe_action = 'GttAction'.ucfirst($match[1]); |
} |
$tab_actions = array(); |
if (isset($match[2])) { |
preg_match_all('/(.+)(?:_|$)/', $match[2], $match_actions); |
$tab_actions = $match_actions[1]; |
} |
$fichier_action = GTT_CHEMIN_ACTION.$classe_action.'.class.php'; |
if (file_exists($fichier_action)) { |
require_once $fichier_action; |
$Action = new $classe_action; |
foreach ($tab_actions as $action) { |
// Vérification des données POST ou GET avant l'appel de l'action |
if (isset($_POST) || isset($_GET)) { |
$methode_verif = 'verifier'.ucfirst($action); |
if (method_exists($Action, $methode_verif)) { |
// Méthode "vérifier" spécifique à une action |
$Action->$methode_verif($Action->getResultat()); |
} |
} |
// Execution de l'action |
$Action->setSuivant(ucfirst($action)); |
} |
$Action->demarrer(); |
$aso_principal['principal']['contenu_principal'] = $this->rendre($Action->getResultat()); |
$Resultats = $Action->getResultat(); |
$aso_principal['principal']['titre'] = $Resultats->getTitre(); |
$Resultats->setEspaces(array()); |
$Resultats->setSquelettes(array()); |
$Resultats->setDonnees(array()); |
$Resultats->ajouterEspace('Principal', 'principal'); |
$Resultats->ajouterSquelette('principal', 'principal.tpl.html'); |
$Resultats->ajouterDonnee('principal', $aso_principal['principal']); |
return $this->rendre($Resultats); |
} |
} |
public function rendre(Resultat $Resultats) |
{ |
$contenu = ''; |
foreach ($Resultats->getEspaces() as $espace_de_nom) { |
ob_start(); |
extract($GLOBALS['_GTT_']['i18n']['general'], EXTR_PREFIX_ALL, 'i18n_general'); |
extract($Resultats->getDonnees($espace_de_nom)); |
include_once GTT_CHEMIN_PRESENTATION.$Resultats->getSquelettes($espace_de_nom); |
$contenu .= ob_get_contents(); |
ob_end_clean(); |
} |
return $contenu; |
} |
} |
?> |
/trunk/classes/GestionnaireErreur.class.php |
---|
New file |
0,0 → 1,330 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.0.4 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore-Debogage. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: GestionnaireErreur.class.php,v 1.1 2005/11/15 17:33:49 jp_milcent Exp $ |
/** |
* Classe de gestion des erreurs. |
* |
* |
* |
*@package eFlore |
*@subpackage Debogage |
//Auteur original : |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
//Autres auteurs : |
*@author aucun |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005/11/15 17:33:49 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/** |
* Classe GestionnaireErreur |
* |
* Gérer les erreurs PHP et SQL. |
*/ |
class GestionnaireErreur |
{ |
/*** Attributes: ***/ |
/** |
* Contient la liste des erreurs. |
* @access private |
*/ |
private $erreurs; |
/** |
* Permet de savoir si on veut faire apparaître ou pas le contexte de l'erreur, |
* c'est à dire le contenu des variables. |
* @access private |
*/ |
private $contexte; |
/** |
* Contient le niveau d'erreur courrant. Celui que l'on donne à la fonction |
* error_reporting(). |
* @access private |
*/ |
private $niveau_erreur_courrant; |
/*** Constructeur: ***/ |
/** |
* Construit le gestionnaire d'erreur. |
* |
* @return void |
* @access public |
*/ |
public function __construct( $contexte = FALSE ) { |
$this->erreurs = array(); |
$this->setContexte($contexte); |
set_error_handler(array($this, 'gererErreur')); |
} // end of member function __construct |
/*** Destructeur: ***/ |
public function __destruct() |
{ |
echo $this->retournerErreur(); |
} |
/*** Accesseurs: ***/ |
/** |
* Récupère le tableau des erreurs. |
* |
* @return array |
* @access public |
*/ |
public function getErreur( ) { |
return $this->erreurs; |
} |
/** |
* Ajoute une erreur à la liste. |
* |
* @param array une_erreur |
* @return void |
* @access public |
*/ |
public function setErreur( $une_erreur ) { |
$tab_erreurs =& $this->getErreur(); |
array_push($tab_erreurs, $une_erreur); |
} |
/** |
* Récupère la valeur du contexte. |
* |
* @return boolean |
* @access public |
*/ |
public function getContexte( ) { |
return $this->contexte; |
} |
/** |
* Définit si oui ou non le contexte sera affiché. |
* |
* @param boolean un_contexte |
* @return void |
* @access public |
*/ |
public function setContexte( $un_contexte ) { |
$this->contexte = $un_contexte; |
} |
/** |
* Récupère le niveau d'erreur courrant. |
* |
* @return int le niveau d'erreur courrant. |
* @access public |
*/ |
public function getNiveauErreurCourrant( ) { |
return (int)$this->niveau_erreur_courrant; |
} |
/** |
* Définit le niveau d'erreur courrant. |
* |
* @param int un niveau d'erreur. |
* @return void |
* @access public |
*/ |
public function setNiveauErreurCourrant( $niveau ) { |
$this->niveau_erreur_courrant = $niveau; |
} |
/*** Méthodes : ***/ |
/** |
* |
* @param int niveau |
* @param string message |
* @param string fichier |
* @param int ligne |
* @param boolean contexte |
* @return void |
* @access public |
*/ |
public function gererErreur( $niveau, $message, $fichier, $ligne, $contexte ) { |
$aso_erreur = array(); |
// Nous vérifions si nous affichons ou pas l'erreur en fonction du niveau demandé |
if ( $niveau <= $this->getNiveauErreurCourrant() ) { |
$aso_erreur['niveau'] = $niveau; |
$aso_erreur['message'] = $message; |
$aso_erreur['fichier'] = $fichier; |
$aso_erreur['ligne'] = $ligne; |
if ($this->getContexte()) { |
$aso_erreur['contexte'] = $contexte; |
} |
$this->setErreur($aso_erreur); |
} |
// Si nous avons à faire à une erreur et non à un warning ou une notice, nous arrêtons l'exécution du script |
if ($niveau == E_USER_ERROR) { |
echo $this->retournerErreur(); |
exit(1); |
} |
} // end of member function gererErreur |
/** |
* Retourne l'erreur PHP formatée en XHTML. |
* |
* @return string |
* @access public |
*/ |
public function retournerErreur() { |
$retour = ''; |
foreach($this->getErreur() as $aso_erreur) { |
if ('<!-- BEGIN sql -->' == substr($aso_erreur['message'], 0, 18)) { |
$retour .= $aso_erreur['message']; |
continue; |
} |
$retour .= '<p class="erreur">'."\n"; |
$retour .= '<strong>ERREUR</strong><br />'."\n"; |
$retour .= '<strong>Niveau : </strong>'.$aso_erreur['niveau'].'<br />'."\n"; |
$retour .= '<strong>Message : </strong>'.$aso_erreur['message'].'<br />'."\n"; |
$retour .= '<strong>Fichier : </strong>'.$aso_erreur['fichier'].'<br />'."\n"; |
$retour .= '<strong>Ligne : </strong>'.$aso_erreur['ligne'].'<br />'."\n"; |
if ($this->getContexte()) { |
$retour .= '<pre>'."\n"; |
$retour .= '<stong>Contexte : </stong>'."\n".print_r($aso_erreur['contexte'], true)."\n"; |
$retour .= '</pre>'."\n"; |
} |
$retour .= '</p>'."\n"; |
} |
return $retour; |
} // end of member function retournerErreur |
/** |
* Retourne l'erreur SQL formatée. |
* |
* @param string fichier |
* @param int ligne |
* @param string message |
* @param string requete |
* @param string autres |
* @return string |
* @static |
* @access public |
*/ |
public static function retournerErreurSql( $fichier, $methode, $message, $requete = NULL, $autres = NULL ) { |
$retour = '<!-- BEGIN sql -->'; |
$retour .= '<div id="zone_erreur">'."\n"; |
$retour .= '<h1 > ERREUR SQL </h1><br />'."\n"; |
$retour .= '<dl>'."\n"; |
$retour .= '<dt> Fichier : </dt> '; |
$retour .= '<dd> '.$fichier.'</dd>'."\n"; |
$retour .= '<dt> Méthode : </dt> '; |
$retour .= '<dd> '.$methode.'</dd>'."\n"; |
$retour .= '<dt> Message erreur : </dt> '; |
$retour .= '<dd> '.$message.'</dd>'."\n"; |
if (!is_null($requete)) { |
$retour .= '<dt> Requete : </dt> '; |
$retour .= '<dd> '.$requete.' </dd>'."\n"; |
} |
if (!is_null($autres)) { |
$retour .= '<dt> Autres infos : </dt> '; |
$retour .= '<dd> '.$autres.' </dd>'."\n"; |
} |
$retour .= '</dl>'."\n"; |
$retour .= '</div>'."\n"; |
$retour .= '<!-- END sql -->'."\n"; |
return $retour; |
} // end of member function retournerErreurSql |
/** |
* Retourne l'erreur SQL formatée selon le format demandé. |
* |
* @param string fichier |
* @param int ligne |
* @param string message |
* @param string format : txt. |
* @return string |
* @static |
* @access public |
*/ |
public static function formaterMessageErreur( $message, $fichier = null, $ligne = null, $format = 'txt' ) |
{ |
$retour = ''; |
if ($format == 'txt') { |
$retour .= "\n"; |
if (!is_null($fichier)) { |
$retour .= "\t".'Fichier : '.$fichier."\n"; |
} |
if (!is_null($ligne)) { |
$retour .= "\t".'Ligne : '.$ligne."\n"; |
} |
$retour .= "\t".'Message : '.$message."\n"; |
} |
return $retour; |
} |
} // end of GestionnaireErreur |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: GestionnaireErreur.class.php,v $ |
* Revision 1.1 2005/11/15 17:33:49 jp_milcent |
* Ajout de classe Système pour le débogage. |
* Ces classes sont à améliorer! |
* |
* Revision 1.3 2005/10/10 07:28:07 jp_milcent |
* Utilisation du webservice Yahoo-Image. |
* |
* Revision 1.2 2005/10/04 16:34:03 jp_milcent |
* Début gestion de la chorologie. |
* Ajout de la bibliothèque de cartographie (à améliorer!). |
* |
* Revision 1.1 2005/08/04 15:51:45 jp_milcent |
* Implémentation de la gestion via DAO. |
* Fin page d'accueil. |
* Fin formulaire recherche taxonomique. |
* |
* Revision 1.3 2005/08/02 16:19:33 jp_milcent |
* Amélioration des requetes de recherche de noms. |
* |
* Revision 1.2 2005/08/01 16:18:39 jp_milcent |
* Début gestion résultat de la recherche par nom. |
* |
* Revision 1.1 2005/07/28 15:37:56 jp_milcent |
* Début gestion des squelettes et de l'API eFlore. |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/pear/Calendar/tests/hour_test.php |
---|
New file |
0,0 → 1,98 |
<?php |
// $Id: hour_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./calendar_test.php'); |
class TestOfHour extends TestOfCalendar { |
function TestOfHour() { |
$this->UnitTestCase('Test of Hour'); |
} |
function setUp() { |
$this->cal = new Calendar_Hour(2003,10,25,13); |
} |
function testPrevDay_Array () { |
$this->assertEqual( |
array( |
'year' => 2003, |
'month' => 10, |
'day' => 24, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevDay('array')); |
} |
function testPrevMinute () { |
$this->assertEqual(59,$this->cal->prevMinute()); |
} |
function testThisMinute () { |
$this->assertEqual(0,$this->cal->thisMinute()); |
} |
function testNextMinute () { |
$this->assertEqual(1,$this->cal->nextMinute()); |
} |
function testPrevSecond () { |
$this->assertEqual(59,$this->cal->prevSecond()); |
} |
function testThisSecond () { |
$this->assertEqual(0,$this->cal->thisSecond()); |
} |
function testNextSecond () { |
$this->assertEqual(1,$this->cal->nextSecond()); |
} |
function testGetTimeStamp() { |
$stamp = mktime(13,0,0,10,25,2003); |
$this->assertEqual($stamp,$this->cal->getTimeStamp()); |
} |
} |
class TestOfHourBuild extends TestOfHour { |
function TestOfHourBuild() { |
$this->UnitTestCase('Test of Hour::build()'); |
} |
function testSize() { |
$this->cal->build(); |
$this->assertEqual(60,$this->cal->size()); |
} |
function testFetch() { |
$this->cal->build(); |
$i=0; |
while ( $Child = $this->cal->fetch() ) { |
$i++; |
} |
$this->assertEqual(60,$i); |
} |
function testFetchAll() { |
$this->cal->build(); |
$children = array(); |
$i = 0; |
while ( $Child = $this->cal->fetch() ) { |
$children[$i]=$Child; |
$i++; |
} |
$this->assertEqual($children,$this->cal->fetchAll()); |
} |
function testSelection() { |
require_once(CALENDAR_ROOT . 'Minute.php'); |
$selection = array(new Calendar_Minute(2003,10,25,13,32)); |
$this->cal->build($selection); |
$i = 0; |
while ( $Child = $this->cal->fetch() ) { |
if ( $i == 32 ) |
break; |
$i++; |
} |
$this->assertTrue($Child->isSelected()); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfHour(); |
$test->run(new HtmlReporter()); |
$test = &new TestOfHourBuild(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/week_firstday_0_test.php |
---|
New file |
0,0 → 1,241 |
<?php |
// $Id: week_firstday_0_test.php,v 1.1 2005/10/20 18:57:52 quipo Exp $ |
define('CALENDAR_FIRST_DAY_OF_WEEK', 0); //force firstDay = Sunday |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./calendar_test.php'); |
class TestOfWeek_firstday_0 extends TestOfCalendar { |
function TestOfWeek_firstday_0() { |
$this->UnitTestCase('Test of Week - Week Starting on Sunday'); |
} |
function setUp() { |
$this->cal = Calendar_Factory::create('Week', 2003, 10, 9); |
//print_r($this->cal); |
} |
function testPrevDay () { |
$this->assertEqual(8, $this->cal->prevDay()); |
} |
function testPrevDay_Array () { |
$this->assertEqual( |
array( |
'year' => 2003, |
'month' => 10, |
'day' => 8, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevDay('array')); |
} |
function testThisDay () { |
$this->assertEqual(9, $this->cal->thisDay()); |
} |
function testNextDay () { |
$this->assertEqual(10, $this->cal->nextDay()); |
} |
function testPrevHour () { |
$this->assertEqual(23, $this->cal->prevHour()); |
} |
function testThisHour () { |
$this->assertEqual(0, $this->cal->thisHour()); |
} |
function testNextHour () { |
$this->assertEqual(1, $this->cal->nextHour()); |
} |
function testPrevMinute () { |
$this->assertEqual(59, $this->cal->prevMinute()); |
} |
function testThisMinute () { |
$this->assertEqual(0, $this->cal->thisMinute()); |
} |
function testNextMinute () { |
$this->assertEqual(1, $this->cal->nextMinute()); |
} |
function testPrevSecond () { |
$this->assertEqual(59, $this->cal->prevSecond()); |
} |
function testThisSecond () { |
$this->assertEqual(0, $this->cal->thisSecond()); |
} |
function testNextSecond () { |
$this->assertEqual(1, $this->cal->nextSecond()); |
} |
function testGetTimeStamp() { |
$stamp = mktime(0,0,0,10,9,2003); |
$this->assertEqual($stamp,$this->cal->getTimeStamp()); |
} |
function testNewTimeStamp() { |
$stamp = mktime(0,0,0,7,28,2004); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual('29 2004', date('W Y', $this->cal->prevWeek(true))); |
$this->assertEqual('30 2004', date('W Y', $this->cal->thisWeek(true))); |
$this->assertEqual('31 2004', date('W Y', $this->cal->nextWeek(true))); |
} |
function testPrevWeekInMonth() { |
$this->assertEqual(1, $this->cal->prevWeek()); |
$stamp = mktime(0,0,0,2,3,2005); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(0, $this->cal->prevWeek()); |
} |
function testThisWeekInMonth() { |
$this->assertEqual(2, $this->cal->thisWeek()); |
$stamp = mktime(0,0,0,2,3,2005); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(1, $this->cal->thisWeek()); |
$stamp = mktime(0,0,0,1,1,2005); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(1, $this->cal->thisWeek()); |
$stamp = mktime(0,0,0,1,3,2005); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(2, $this->cal->thisWeek()); |
} |
function testNextWeekInMonth() { |
$this->assertEqual(3, $this->cal->nextWeek()); |
$stamp = mktime(0,0,0,2,3,2005); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(2, $this->cal->nextWeek()); |
} |
function testPrevWeekInYear() { |
$this->assertEqual(date('W', $this->cal->prevWeek('timestamp')), $this->cal->prevWeek('n_in_year')); |
$stamp = mktime(0,0,0,1,1,2004); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(date('W', $this->cal->nextWeek('timestamp')), $this->cal->nextWeek('n_in_year')); |
} |
function testThisWeekInYear() { |
$this->assertEqual(date('W', $this->cal->thisWeek('timestamp')), $this->cal->thisWeek('n_in_year')); |
$stamp = mktime(0,0,0,1,1,2004); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(date('W', $this->cal->thisWeek('timestamp')), $this->cal->thisWeek('n_in_year')); |
} |
function testFirstWeekInYear() { |
$stamp = mktime(0,0,0,1,4,2004); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(1, $this->cal->thisWeek('n_in_year')); |
} |
function testNextWeekInYear() { |
$this->assertEqual(date('W', $this->cal->nextWeek('timestamp')), $this->cal->nextWeek('n_in_year')); |
} |
function testPrevWeekArray() { |
$testArray = array( |
'year'=>2003, |
'month'=>9, |
'day'=>28, |
'hour'=>0, |
'minute'=>0, |
'second'=>0 |
); |
$this->assertEqual($testArray, $this->cal->prevWeek('array')); |
} |
function testThisWeekArray() { |
$testArray = array( |
'year'=>2003, |
'month'=>10, |
'day'=>5, |
'hour'=>0, |
'minute'=>0, |
'second'=>0 |
); |
$this->assertEqual($testArray, $this->cal->thisWeek('array')); |
} |
function testNextWeekArray() { |
$testArray = array( |
'year'=>2003, |
'month'=>10, |
'day'=>12, |
'hour'=>0, |
'minute'=>0, |
'second'=>0 |
); |
$this->assertEqual($testArray, $this->cal->nextWeek('array')); |
} |
function testPrevWeekObject() { |
$testWeek = Calendar_Factory::create('Week', 2003,9,28); |
$Week = $this->cal->prevWeek('object'); |
$this->assertEqual($testWeek->getTimeStamp(),$Week->getTimeStamp()); |
} |
function testThisWeekObject() { |
$testWeek = Calendar_Factory::create('Week', 2003,10,5); |
$Week = $this->cal->thisWeek('object'); |
$this->assertEqual($testWeek->getTimeStamp(),$Week->getTimeStamp()); |
} |
function testNextWeekObject() { |
$testWeek = Calendar_Factory::create('Week', 2003,10,12); |
$Week = $this->cal->nextWeek('object'); |
$this->assertEqual($testWeek->getTimeStamp(),$Week->getTimeStamp()); |
} |
} |
class TestOfWeek_firstday_0_Build extends TestOfWeek_firstday_0 { |
function TestOfWeek_firstday_0_Build() { |
$this->UnitTestCase('Test of Week::build() - FirstDay = Sunday'); |
} |
function testSize() { |
$this->cal->build(); |
$this->assertEqual(7, $this->cal->size()); |
} |
function testFetch() { |
$this->cal->build(); |
$i=0; |
while ($Child = $this->cal->fetch()) { |
$i++; |
} |
$this->assertEqual(7, $i); |
} |
function testFetchAll() { |
$this->cal->build(); |
$children = array(); |
$i = 1; |
while ( $Child = $this->cal->fetch() ) { |
$children[$i]=$Child; |
$i++; |
} |
$this->assertEqual($children,$this->cal->fetchAll()); |
} |
function testSelection() { |
require_once(CALENDAR_ROOT . 'Day.php'); |
$selection = array(Calendar_Factory::create('Day', 2003, 10, 6)); |
$this->cal->build($selection); |
$i = 1; |
while ($Child = $this->cal->fetch()) { |
if ($i == 2) { |
break; //06-10-2003 is the 2nd day of the week |
} |
$i++; |
} |
$this->assertTrue($Child->isSelected()); |
} |
function testSelectionCornerCase() { |
require_once(CALENDAR_ROOT . 'Day.php'); |
$selectedDays = array( |
Calendar_Factory::create('Day', 2003, 12, 28), |
Calendar_Factory::create('Day', 2003, 12, 29), |
Calendar_Factory::create('Day', 2003, 12, 30), |
Calendar_Factory::create('Day', 2003, 12, 31), |
Calendar_Factory::create('Day', 2004, 01, 01), |
Calendar_Factory::create('Day', 2004, 01, 02), |
Calendar_Factory::create('Day', 2004, 01, 03) |
); |
$this->cal = Calendar_Factory::create('Week', 2003, 12, 31, 0); |
$this->cal->build($selectedDays); |
while ($Day = $this->cal->fetch()) { |
$this->assertTrue($Day->isSelected()); |
} |
$this->cal = Calendar_Factory::create('Week', 2004, 1, 1, 0); |
$this->cal->build($selectedDays); |
while ($Day = $this->cal->fetch()) { |
$this->assertTrue($Day->isSelected()); |
} |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfWeek_firstday_0(); |
$test->run(new HtmlReporter()); |
$test = &new TestOfWeek_firstday_0_Build(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/helper_test.php |
---|
New file |
0,0 → 1,83 |
<?php |
// $Id: helper_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
Mock::generate('Calendar_Engine_Interface','Mock_Calendar_Engine'); |
Mock::generate('Calendar_Second','Mock_Calendar_Second'); |
class TestOfTableHelper extends UnitTestCase { |
var $mockengine; |
var $mockcal; |
function TestOfTableHelper() { |
$this->UnitTestCase('Test of Calendar_Table_Helper'); |
} |
function setUp() { |
$this->mockengine = new Mock_Calendar_Engine($this); |
$this->mockengine->setReturnValue('getMinYears',1970); |
$this->mockengine->setReturnValue('getMaxYears',2037); |
$this->mockengine->setReturnValue('getMonthsInYear',12); |
$this->mockengine->setReturnValue('getDaysInMonth',31); |
$this->mockengine->setReturnValue('getHoursInDay',24); |
$this->mockengine->setReturnValue('getMinutesInHour',60); |
$this->mockengine->setReturnValue('getSecondsInMinute',60); |
$this->mockengine->setReturnValue('getWeekDays',array(0,1,2,3,4,5,6)); |
$this->mockengine->setReturnValue('getDaysInWeek',7); |
$this->mockengine->setReturnValue('getFirstDayOfWeek',1); |
$this->mockengine->setReturnValue('getFirstDayInMonth',3); |
$this->mockcal = new Mock_Calendar_Second($this); |
$this->mockcal->setReturnValue('thisYear',2003); |
$this->mockcal->setReturnValue('thisMonth',10); |
$this->mockcal->setReturnValue('thisDay',15); |
$this->mockcal->setReturnValue('thisHour',13); |
$this->mockcal->setReturnValue('thisMinute',30); |
$this->mockcal->setReturnValue('thisSecond',45); |
$this->mockcal->setReturnValue('getEngine',$this->mockengine); |
} |
function testGetFirstDay() { |
for ( $i = 0; $i <= 7; $i++ ) { |
$Helper = & new Calendar_Table_Helper($this->mockcal,$i); |
$this->assertEqual($Helper->getFirstDay(),$i); |
} |
} |
function testGetDaysOfWeekMonday() { |
$Helper = & new Calendar_Table_Helper($this->mockcal); |
$this->assertEqual($Helper->getDaysOfWeek(),array(1,2,3,4,5,6,0)); |
} |
function testGetDaysOfWeekSunday() { |
$Helper = & new Calendar_Table_Helper($this->mockcal,0); |
$this->assertEqual($Helper->getDaysOfWeek(),array(0,1,2,3,4,5,6)); |
} |
function testGetDaysOfWeekThursday() { |
$Helper = & new Calendar_Table_Helper($this->mockcal,4); |
$this->assertEqual($Helper->getDaysOfWeek(),array(4,5,6,0,1,2,3)); |
} |
function testGetNumWeeks() { |
$Helper = & new Calendar_Table_Helper($this->mockcal); |
$this->assertEqual($Helper->getNumWeeks(),5); |
} |
function testGetNumTableDaysInMonth() { |
$Helper = & new Calendar_Table_Helper($this->mockcal); |
$this->assertEqual($Helper->getNumTableDaysInMonth(),35); |
} |
function testGetEmptyDaysBefore() { |
$Helper = & new Calendar_Table_Helper($this->mockcal); |
$this->assertEqual($Helper->getEmptyDaysBefore(),2); |
} |
function testGetEmptyDaysAfter() { |
$Helper = & new Calendar_Table_Helper($this->mockcal); |
$this->assertEqual($Helper->getEmptyDaysAfter(),33); |
} |
function testGetEmptyDaysAfterOffset() { |
$Helper = & new Calendar_Table_Helper($this->mockcal); |
$this->assertEqual($Helper->getEmptyDaysAfterOffset(),5); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfTableHelper(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/calendar_engine_tests.php |
---|
New file |
0,0 → 1,20 |
<?php |
// $Id: calendar_engine_tests.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
class CalendarEngineTests extends GroupTest { |
function CalendarEngineTests() { |
$this->GroupTest('Calendar Engine Tests'); |
$this->addTestFile('peardate_engine_test.php'); |
$this->addTestFile('unixts_engine_test.php'); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new CalendarEngineTests(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/month_weekdays_test.php |
---|
New file |
0,0 → 1,130 |
<?php |
// $Id: month_weekdays_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./calendar_test.php'); |
class TestOfMonthWeekdays extends TestOfCalendar { |
function TestOfMonthWeekdays() { |
$this->UnitTestCase('Test of Month Weekdays'); |
} |
function setUp() { |
$this->cal = new Calendar_Month_Weekdays(2003,10); |
} |
function testPrevDay () { |
$this->assertEqual(30,$this->cal->prevDay()); |
} |
function testPrevDay_Array () { |
$this->assertEqual( |
array( |
'year' => 2003, |
'month' => 9, |
'day' => 30, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevDay('array')); |
} |
function testThisDay () { |
$this->assertEqual(1,$this->cal->thisDay()); |
} |
function testNextDay () { |
$this->assertEqual(2,$this->cal->nextDay()); |
} |
function testPrevHour () { |
$this->assertEqual(23,$this->cal->prevHour()); |
} |
function testThisHour () { |
$this->assertEqual(0,$this->cal->thisHour()); |
} |
function testNextHour () { |
$this->assertEqual(1,$this->cal->nextHour()); |
} |
function testPrevMinute () { |
$this->assertEqual(59,$this->cal->prevMinute()); |
} |
function testThisMinute () { |
$this->assertEqual(0,$this->cal->thisMinute()); |
} |
function testNextMinute () { |
$this->assertEqual(1,$this->cal->nextMinute()); |
} |
function testPrevSecond () { |
$this->assertEqual(59,$this->cal->prevSecond()); |
} |
function testThisSecond () { |
$this->assertEqual(0,$this->cal->thisSecond()); |
} |
function testNextSecond () { |
$this->assertEqual(1,$this->cal->nextSecond()); |
} |
function testGetTimeStamp() { |
$stamp = mktime(0,0,0,10,1,2003); |
$this->assertEqual($stamp,$this->cal->getTimeStamp()); |
} |
} |
class TestOfMonthWeekdaysBuild extends TestOfMonthWeekdays { |
function TestOfMonthWeekdaysBuild() { |
$this->UnitTestCase('Test of Month_Weekdays::build()'); |
} |
function testSize() { |
$this->cal->build(); |
$this->assertEqual(35,$this->cal->size()); |
} |
function testFetch() { |
$this->cal->build(); |
$i=0; |
while ( $Child = $this->cal->fetch() ) { |
$i++; |
} |
$this->assertEqual(35,$i); |
} |
function testFetchAll() { |
$this->cal->build(); |
$children = array(); |
$i = 1; |
while ( $Child = $this->cal->fetch() ) { |
$children[$i]=$Child; |
$i++; |
} |
$this->assertEqual($children,$this->cal->fetchAll()); |
} |
function testSelection() { |
require_once(CALENDAR_ROOT . 'Day.php'); |
$selection = array(new Calendar_Day(2003,10,25)); |
$this->cal->build($selection); |
$i = 1; |
while ( $Child = $this->cal->fetch() ) { |
if ( $i == 27 ) |
break; |
$i++; |
} |
$this->assertTrue($Child->isSelected()); |
} |
function testEmptyCount() { |
$this->cal->build(); |
$empty = 0; |
while ( $Child = $this->cal->fetch() ) { |
if ( $Child->isEmpty() ) |
$empty++; |
} |
$this->assertEqual(4,$empty); |
} |
function testEmptyDaysBefore_AfterAdjust() { |
$this->cal = new Calendar_Month_Weekdays(2004,0); |
$this->cal->build(); |
$this->assertEqual(0,$this->cal->tableHelper->getEmptyDaysBefore()); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfMonthWeekdays(); |
$test->run(new HtmlReporter()); |
$test = &new TestOfMonthWeekdaysBuild(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/month_test.php |
---|
New file |
0,0 → 1,119 |
<?php |
// $Id: month_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./calendar_test.php'); |
class TestOfMonth extends TestOfCalendar { |
function TestOfMonth() { |
$this->UnitTestCase('Test of Month'); |
} |
function setUp() { |
$this->cal = new Calendar_Month(2003,10); |
} |
function testPrevMonth_Object() { |
$this->assertEqual(new Calendar_Month(2003, 9), $this->cal->prevMonth('object')); |
} |
function testPrevDay () { |
$this->assertEqual(30,$this->cal->prevDay()); |
} |
function testPrevDay_Array () { |
$this->assertEqual( |
array( |
'year' => 2003, |
'month' => 9, |
'day' => 30, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevDay('array')); |
} |
function testThisDay () { |
$this->assertEqual(1,$this->cal->thisDay()); |
} |
function testNextDay () { |
$this->assertEqual(2,$this->cal->nextDay()); |
} |
function testPrevHour () { |
$this->assertEqual(23,$this->cal->prevHour()); |
} |
function testThisHour () { |
$this->assertEqual(0,$this->cal->thisHour()); |
} |
function testNextHour () { |
$this->assertEqual(1,$this->cal->nextHour()); |
} |
function testPrevMinute () { |
$this->assertEqual(59,$this->cal->prevMinute()); |
} |
function testThisMinute () { |
$this->assertEqual(0,$this->cal->thisMinute()); |
} |
function testNextMinute () { |
$this->assertEqual(1,$this->cal->nextMinute()); |
} |
function testPrevSecond () { |
$this->assertEqual(59,$this->cal->prevSecond()); |
} |
function testThisSecond () { |
$this->assertEqual(0,$this->cal->thisSecond()); |
} |
function testNextSecond () { |
$this->assertEqual(1,$this->cal->nextSecond()); |
} |
function testGetTimeStamp() { |
$stamp = mktime(0,0,0,10,1,2003); |
$this->assertEqual($stamp,$this->cal->getTimeStamp()); |
} |
} |
class TestOfMonthBuild extends TestOfMonth { |
function TestOfMonthBuild() { |
$this->UnitTestCase('Test of Month::build()'); |
} |
function testSize() { |
$this->cal->build(); |
$this->assertEqual(31,$this->cal->size()); |
} |
function testFetch() { |
$this->cal->build(); |
$i=0; |
while ( $Child = $this->cal->fetch() ) { |
$i++; |
} |
$this->assertEqual(31,$i); |
} |
function testFetchAll() { |
$this->cal->build(); |
$children = array(); |
$i = 1; |
while ( $Child = $this->cal->fetch() ) { |
$children[$i]=$Child; |
$i++; |
} |
$this->assertEqual($children,$this->cal->fetchAll()); |
} |
function testSelection() { |
require_once(CALENDAR_ROOT . 'Day.php'); |
$selection = array(new Calendar_Day(2003,10,25)); |
$this->cal->build($selection); |
$i = 1; |
while ( $Child = $this->cal->fetch() ) { |
if ( $i == 25 ) |
break; |
$i++; |
} |
$this->assertTrue($Child->isSelected()); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfMonth(); |
$test->run(new HtmlReporter()); |
$test = &new TestOfMonthBuild(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/week_test.php |
---|
New file |
0,0 → 1,241 |
<?php |
// $Id: week_test.php,v 1.4 2005/10/20 18:56:21 quipo Exp $ |
define('CALENDAR_FIRST_DAY_OF_WEEK', 1); //force firstDay = monday |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./calendar_test.php'); |
class TestOfWeek extends TestOfCalendar { |
function TestOfWeek() { |
$this->UnitTestCase('Test of Week'); |
} |
function setUp() { |
$this->cal = Calendar_Factory::create('Week', 2003, 10, 9); |
//print_r($this->cal); |
} |
function testPrevDay () { |
$this->assertEqual(8, $this->cal->prevDay()); |
} |
function testPrevDay_Array () { |
$this->assertEqual( |
array( |
'year' => 2003, |
'month' => 10, |
'day' => 8, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevDay('array')); |
} |
function testThisDay () { |
$this->assertEqual(9, $this->cal->thisDay()); |
} |
function testNextDay () { |
$this->assertEqual(10, $this->cal->nextDay()); |
} |
function testPrevHour () { |
$this->assertEqual(23, $this->cal->prevHour()); |
} |
function testThisHour () { |
$this->assertEqual(0, $this->cal->thisHour()); |
} |
function testNextHour () { |
$this->assertEqual(1, $this->cal->nextHour()); |
} |
function testPrevMinute () { |
$this->assertEqual(59, $this->cal->prevMinute()); |
} |
function testThisMinute () { |
$this->assertEqual(0, $this->cal->thisMinute()); |
} |
function testNextMinute () { |
$this->assertEqual(1, $this->cal->nextMinute()); |
} |
function testPrevSecond () { |
$this->assertEqual(59, $this->cal->prevSecond()); |
} |
function testThisSecond () { |
$this->assertEqual(0, $this->cal->thisSecond()); |
} |
function testNextSecond () { |
$this->assertEqual(1, $this->cal->nextSecond()); |
} |
function testGetTimeStamp() { |
$stamp = mktime(0,0,0,10,9,2003); |
$this->assertEqual($stamp,$this->cal->getTimeStamp()); |
} |
function testNewTimeStamp() { |
$stamp = mktime(0,0,0,7,28,2004); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual('30 2004', date('W Y', $this->cal->prevWeek(true))); |
$this->assertEqual('31 2004', date('W Y', $this->cal->thisWeek(true))); |
$this->assertEqual('32 2004', date('W Y', $this->cal->nextWeek(true))); |
} |
function testPrevWeekInMonth() { |
$this->assertEqual(1, $this->cal->prevWeek()); |
$stamp = mktime(0,0,0,2,3,2005); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(0, $this->cal->prevWeek()); |
} |
function testThisWeekInMonth() { |
$this->assertEqual(2, $this->cal->thisWeek()); |
$stamp = mktime(0,0,0,2,3,2005); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(1, $this->cal->thisWeek()); |
$stamp = mktime(0,0,0,1,1,2005); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(1, $this->cal->thisWeek()); |
$stamp = mktime(0,0,0,1,3,2005); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(2, $this->cal->thisWeek()); |
} |
function testNextWeekInMonth() { |
$this->assertEqual(3, $this->cal->nextWeek()); |
$stamp = mktime(0,0,0,2,3,2005); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(2, $this->cal->nextWeek()); |
} |
function testPrevWeekInYear() { |
$this->assertEqual(date('W', $this->cal->prevWeek('timestamp')), $this->cal->prevWeek('n_in_year')); |
$stamp = mktime(0,0,0,1,1,2004); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(date('W', $this->cal->nextWeek('timestamp')), $this->cal->nextWeek('n_in_year')); |
} |
function testThisWeekInYear() { |
$this->assertEqual(date('W', $this->cal->thisWeek('timestamp')), $this->cal->thisWeek('n_in_year')); |
$stamp = mktime(0,0,0,1,1,2004); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(date('W', $this->cal->thisWeek('timestamp')), $this->cal->thisWeek('n_in_year')); |
} |
function testFirstWeekInYear() { |
$stamp = mktime(0,0,0,1,4,2004); |
$this->cal->setTimestamp($stamp); |
$this->assertEqual(1, $this->cal->thisWeek('n_in_year')); |
} |
function testNextWeekInYear() { |
$this->assertEqual(date('W', $this->cal->nextWeek('timestamp')), $this->cal->nextWeek('n_in_year')); |
} |
function testPrevWeekArray() { |
$testArray = array( |
'year'=>2003, |
'month'=>9, |
'day'=>29, |
'hour'=>0, |
'minute'=>0, |
'second'=>0 |
); |
$this->assertEqual($testArray, $this->cal->prevWeek('array')); |
} |
function testThisWeekArray() { |
$testArray = array( |
'year'=>2003, |
'month'=>10, |
'day'=>6, |
'hour'=>0, |
'minute'=>0, |
'second'=>0 |
); |
$this->assertEqual($testArray, $this->cal->thisWeek('array')); |
} |
function testNextWeekArray() { |
$testArray = array( |
'year'=>2003, |
'month'=>10, |
'day'=>13, |
'hour'=>0, |
'minute'=>0, |
'second'=>0 |
); |
$this->assertEqual($testArray, $this->cal->nextWeek('array')); |
} |
function testPrevWeekObject() { |
$testWeek = Calendar_Factory::create('Week', 2003, 9, 29); //week starts on monday |
$Week = $this->cal->prevWeek('object'); |
$this->assertEqual($testWeek->getTimeStamp(), $Week->getTimeStamp()); |
} |
function testThisWeekObject() { |
$testWeek = Calendar_Factory::create('Week', 2003, 10, 6); //week starts on monday |
$Week = $this->cal->thisWeek('object'); |
$this->assertEqual($testWeek->getTimeStamp(), $Week->getTimeStamp()); |
} |
function testNextWeekObject() { |
$testWeek = Calendar_Factory::create('Week', 2003, 10, 13); //week starts on monday |
$Week = $this->cal->nextWeek('object'); |
$this->assertEqual($testWeek->getTimeStamp(), $Week->getTimeStamp()); |
} |
} |
class TestOfWeekBuild extends TestOfWeek { |
function TestOfWeekBuild() { |
$this->UnitTestCase('Test of Week::build()'); |
} |
function testSize() { |
$this->cal->build(); |
$this->assertEqual(7, $this->cal->size()); |
} |
function testFetch() { |
$this->cal->build(); |
$i=0; |
while ($Child = $this->cal->fetch()) { |
$i++; |
} |
$this->assertEqual(7, $i); |
} |
function testFetchAll() { |
$this->cal->build(); |
$children = array(); |
$i = 1; |
while ( $Child = $this->cal->fetch() ) { |
$children[$i]=$Child; |
$i++; |
} |
$this->assertEqual($children,$this->cal->fetchAll()); |
} |
function testSelection() { |
require_once(CALENDAR_ROOT . 'Day.php'); |
$selection = array(Calendar_Factory::create('Day', 2003, 10, 7)); |
$this->cal->build($selection); |
$i = 1; |
while ($Child = $this->cal->fetch()) { |
if ($i == 2) { |
break; //07-10-2003 is the 2nd day of the week (starting on monday) |
} |
$i++; |
} |
$this->assertTrue($Child->isSelected()); |
} |
function testSelectionCornerCase() { |
require_once(CALENDAR_ROOT . 'Day.php'); |
$selectedDays = array( |
Calendar_Factory::create('Day', 2003, 12, 29), |
Calendar_Factory::create('Day', 2003, 12, 30), |
Calendar_Factory::create('Day', 2003, 12, 31), |
Calendar_Factory::create('Day', 2004, 01, 01), |
Calendar_Factory::create('Day', 2004, 01, 02), |
Calendar_Factory::create('Day', 2004, 01, 03), |
Calendar_Factory::create('Day', 2004, 01, 04) |
); |
$this->cal = Calendar_Factory::create('Week', 2003, 12, 31, 0); |
$this->cal->build($selectedDays); |
while ($Day = $this->cal->fetch()) { |
$this->assertTrue($Day->isSelected()); |
} |
$this->cal = Calendar_Factory::create('Week', 2004, 1, 1, 0); |
$this->cal->build($selectedDays); |
while ($Day = $this->cal->fetch()) { |
$this->assertTrue($Day->isSelected()); |
} |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfWeek(); |
$test->run(new HtmlReporter()); |
$test = &new TestOfWeekBuild(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/calendar_tests.php |
---|
New file |
0,0 → 1,25 |
<?php |
// $Id: calendar_tests.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
class CalendarTests extends GroupTest { |
function CalendarTests() { |
$this->GroupTest('Calendar Tests'); |
$this->addTestFile('calendar_test.php'); |
$this->addTestFile('year_test.php'); |
$this->addTestFile('month_test.php'); |
$this->addTestFile('day_test.php'); |
$this->addTestFile('hour_test.php'); |
$this->addTestFile('minute_test.php'); |
$this->addTestFile('second_test.php'); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new CalendarTests(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/util_uri_test.php |
---|
New file |
0,0 → 1,54 |
<?php |
// $Id: util_uri_test.php,v 1.1 2004/08/16 08:55:24 hfuecks Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
Mock::generate('Calendar_Day','Mock_Calendar_Day'); |
Mock::generate('Calendar_Engine_Interface','Mock_Calendar_Engine'); |
class TestOfUtilUri extends UnitTestCase { |
var $MockCal; |
function TestOfUtilUri() { |
$this->UnitTestCase('Test of Calendar_Util_Uri'); |
} |
function setUp() { |
$this->MockCal = & new Mock_Calendar_Day($this); |
$this->MockCal->setReturnValue('getEngine',new Mock_Calendar_Engine($this)); |
} |
function testFragments() { |
$Uri = new Calendar_Util_Uri('y','m','d','h','m','s'); |
$Uri->setFragments('year','month','day','hour','minute','second'); |
$this->assertEqual( |
'year=&month=&day=&hour=&minute=&second=', |
$Uri->this($this->MockCal, 'second') |
); |
} |
function testScalarFragments() { |
$Uri = new Calendar_Util_Uri('year','month','day','hour','minute','second'); |
$Uri->scalar = true; |
$this->assertEqual( |
'&&&&&', |
$Uri->this($this->MockCal, 'second') |
); |
} |
function testSetSeperator() { |
$Uri = new Calendar_Util_Uri('year','month','day','hour','minute','second'); |
$Uri->separator = '/'; |
$this->assertEqual( |
'year=/month=/day=/hour=/minute=/second=', |
$Uri->this($this->MockCal, 'second') |
); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfUtilUri(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/util_tests.php |
---|
New file |
0,0 → 1,20 |
<?php |
// $Id: util_tests.php,v 1.2 2004/08/16 12:56:10 hfuecks Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
class UtilTests extends GroupTest { |
function UtilTests() { |
$this->GroupTest('Util Tests'); |
$this->addTestFile('util_uri_test.php'); |
$this->addTestFile('util_textual_test.php'); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new UtilTests(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/minute_test.php |
---|
New file |
0,0 → 1,99 |
<?php |
// $Id: minute_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./calendar_test.php'); |
class TestOfMinute extends TestOfCalendar { |
function TestOfMinute() { |
$this->UnitTestCase('Test of Minute'); |
} |
function setUp() { |
$this->cal = new Calendar_Minute(2003,10,25,13,32); |
} |
function testPrevDay_Array () { |
$this->assertEqual( |
array( |
'year' => 2003, |
'month' => 10, |
'day' => 24, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevDay('array')); |
} |
function testPrevSecond () { |
$this->assertEqual(59,$this->cal->prevSecond()); |
} |
function testThisSecond () { |
$this->assertEqual(0,$this->cal->thisSecond()); |
} |
function testThisSecond_Timestamp () { |
$this->assertEqual($this->cal->cE->dateToStamp( |
2003, 10, 25, 13, 32, 0), |
$this->cal->thisSecond('timestamp')); |
} |
function testNextSecond () { |
$this->assertEqual(1,$this->cal->nextSecond()); |
} |
function testNextSecond_Timestamp () { |
$this->assertEqual($this->cal->cE->dateToStamp( |
2003, 10, 25, 13, 32, 1), |
$this->cal->nextSecond('timestamp')); |
} |
function testGetTimeStamp() { |
$stamp = mktime(13,32,0,10,25,2003); |
$this->assertEqual($stamp,$this->cal->getTimeStamp()); |
} |
} |
class TestOfMinuteBuild extends TestOfMinute { |
function TestOfMinuteBuild() { |
$this->UnitTestCase('Test of Minute::build()'); |
} |
function testSize() { |
$this->cal->build(); |
$this->assertEqual(60,$this->cal->size()); |
} |
function testFetch() { |
$this->cal->build(); |
$i=0; |
while ( $Child = $this->cal->fetch() ) { |
$i++; |
} |
$this->assertEqual(60,$i); |
} |
function testFetchAll() { |
$this->cal->build(); |
$children = array(); |
$i = 0; |
while ( $Child = $this->cal->fetch() ) { |
$children[$i]=$Child; |
$i++; |
} |
$this->assertEqual($children,$this->cal->fetchAll()); |
} |
function testSelection() { |
require_once(CALENDAR_ROOT . 'Second.php'); |
$selection = array(new Calendar_Second(2003,10,25,13,32,43)); |
$this->cal->build($selection); |
$i = 0; |
while ( $Child = $this->cal->fetch() ) { |
if ( $i == 43 ) |
break; |
$i++; |
} |
$this->assertTrue($Child->isSelected()); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfMinute(); |
$test->run(new HtmlReporter()); |
$test = &new TestOfMinuteBuild(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/decorator_uri_test.php |
---|
New file |
0,0 → 1,37 |
<?php |
// $Id: decorator_uri_test.php,v 1.2 2004/07/08 10:18:48 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./decorator_test.php'); |
class TestOfDecoratorUri extends TestOfDecorator { |
function TestOfDecoratorUri() { |
$this->UnitTestCase('Test of Calendar_Decorator_Uri'); |
} |
function testFragments() { |
$Uri = new Calendar_Decorator_Uri($this->mockcal); |
$Uri->setFragments('year','month','day','hour','minute','second'); |
$this->assertEqual('year=&month=&day=&hour=&minute=&second=',$Uri->this('second')); |
} |
function testScalarFragments() { |
$Uri = new Calendar_Decorator_Uri($this->mockcal); |
$Uri->setFragments('year','month','day','hour','minute','second'); |
$Uri->setScalar(); |
$this->assertEqual('&&&&&',$Uri->this('second')); |
} |
function testSetSeperator() { |
$Uri = new Calendar_Decorator_Uri($this->mockcal); |
$Uri->setFragments('year','month','day','hour','minute','second'); |
$Uri->setSeparator('/'); |
$this->assertEqual('year=/month=/day=/hour=/minute=/second=',$Uri->this('second')); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfDecoratorUri(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/calendar_tabular_tests.php |
---|
New file |
0,0 → 1,22 |
<?php |
// $Id: calendar_tabular_tests.php,v 1.2 2005/10/20 18:59:45 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
class CalendarTabularTests extends GroupTest { |
function CalendarTabularTests() { |
$this->GroupTest('Calendar Tabular Tests'); |
$this->addTestFile('month_weekdays_test.php'); |
$this->addTestFile('month_weeks_test.php'); |
$this->addTestFile('week_test.php'); |
//$this->addTestFile('week_firstday_0_test.php'); //switch with the above |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new CalendarTabularTests(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/calendar_test.php |
---|
New file |
0,0 → 1,115 |
<?php |
// $Id: calendar_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
class TestOfCalendar extends UnitTestCase { |
var $cal; |
function TestOfCalendar($name='Test of Calendar') { |
$this->UnitTestCase($name); |
} |
function setUp() { |
$this->cal = new Calendar(2003,10,25,13,32,43); |
} |
function tearDown() { |
unset($this->cal); |
} |
function testPrevYear () { |
$this->assertEqual(2002,$this->cal->prevYear()); |
} |
function testPrevYear_Array () { |
$this->assertEqual( |
array( |
'year' => 2002, |
'month' => 1, |
'day' => 1, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevYear('array')); |
} |
function testThisYear () { |
$this->assertEqual(2003,$this->cal->thisYear()); |
} |
function testNextYear () { |
$this->assertEqual(2004,$this->cal->nextYear()); |
} |
function testPrevMonth () { |
$this->assertEqual(9,$this->cal->prevMonth()); |
} |
function testPrevMonth_Array () { |
$this->assertEqual( |
array( |
'year' => 2003, |
'month' => 9, |
'day' => 1, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevMonth('array')); |
} |
function testThisMonth () { |
$this->assertEqual(10,$this->cal->thisMonth()); |
} |
function testNextMonth () { |
$this->assertEqual(11,$this->cal->nextMonth()); |
} |
function testPrevDay () { |
$this->assertEqual(24,$this->cal->prevDay()); |
} |
function testPrevDay_Array () { |
$this->assertEqual( |
array( |
'year' => 2003, |
'month' => 10, |
'day' => 24, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevDay('array')); |
} |
function testThisDay () { |
$this->assertEqual(25,$this->cal->thisDay()); |
} |
function testNextDay () { |
$this->assertEqual(26,$this->cal->nextDay()); |
} |
function testPrevHour () { |
$this->assertEqual(12,$this->cal->prevHour()); |
} |
function testThisHour () { |
$this->assertEqual(13,$this->cal->thisHour()); |
} |
function testNextHour () { |
$this->assertEqual(14,$this->cal->nextHour()); |
} |
function testPrevMinute () { |
$this->assertEqual(31,$this->cal->prevMinute()); |
} |
function testThisMinute () { |
$this->assertEqual(32,$this->cal->thisMinute()); |
} |
function testNextMinute () { |
$this->assertEqual(33,$this->cal->nextMinute()); |
} |
function testPrevSecond () { |
$this->assertEqual(42,$this->cal->prevSecond()); |
} |
function testThisSecond () { |
$this->assertEqual(43,$this->cal->thisSecond()); |
} |
function testNextSecond () { |
$this->assertEqual(44,$this->cal->nextSecond()); |
} |
function testSetTimeStamp() { |
$stamp = mktime(13,32,43,10,25,2003); |
$this->cal->setTimeStamp($stamp); |
$this->assertEqual($stamp,$this->cal->getTimeStamp()); |
} |
function testGetTimeStamp() { |
$stamp = mktime(13,32,43,10,25,2003); |
$this->assertEqual($stamp,$this->cal->getTimeStamp()); |
} |
} |
?> |
/trunk/classes/pear/Calendar/tests/peardate_engine_test.php |
---|
New file |
0,0 → 1,124 |
<?php |
// $Id: peardate_engine_test.php,v 1.2 2004/08/16 11:36:51 hfuecks Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
class TestOfPearDateEngine extends UnitTestCase { |
var $engine; |
function TestOfPearDateEngine() { |
$this->UnitTestCase('Test of Calendar_Engine_PearDate'); |
} |
function setUp() { |
$this->engine = new Calendar_Engine_PearDate(); |
} |
function testGetSecondsInMinute() { |
$this->assertEqual($this->engine->getSecondsInMinute(),60); |
} |
function testGetMinutesInHour() { |
$this->assertEqual($this->engine->getMinutesInHour(),60); |
} |
function testGetHoursInDay() { |
$this->assertEqual($this->engine->getHoursInDay(),24); |
} |
function testGetFirstDayOfWeek() { |
$this->assertEqual($this->engine->getFirstDayOfWeek(),1); |
} |
function testGetWeekDays() { |
$this->assertEqual($this->engine->getWeekDays(),array(0,1,2,3,4,5,6)); |
} |
function testGetDaysInWeek() { |
$this->assertEqual($this->engine->getDaysInWeek(),7); |
} |
function testGetWeekNInYear() { |
$this->assertEqual($this->engine->getWeekNInYear(2003, 11, 3), 45); |
} |
function testGetWeekNInMonth() { |
$this->assertEqual($this->engine->getWeekNInMonth(2003, 11, 3), 2); |
} |
function testGetWeeksInMonth0() { |
$this->assertEqual($this->engine->getWeeksInMonth(2003, 11, 0), 6); //week starts on sunday |
} |
function testGetWeeksInMonth1() { |
$this->assertEqual($this->engine->getWeeksInMonth(2003, 11, 1), 5); //week starts on monday |
} |
function testGetWeeksInMonth2() { |
$this->assertEqual($this->engine->getWeeksInMonth(2003, 2, 6), 4); //week starts on saturday |
} |
function testGetWeeksInMonth3() { |
// Unusual cases that can cause fails (shows up with example 21.php) |
$this->assertEqual($this->engine->getWeeksInMonth(2004,2,1),5); |
$this->assertEqual($this->engine->getWeeksInMonth(2004,8,1),6); |
} |
function testGetDayOfWeek() { |
$this->assertEqual($this->engine->getDayOfWeek(2003, 11, 18), 2); |
} |
function testGetFirstDayInMonth() { |
$this->assertEqual($this->engine->getFirstDayInMonth(2003,10),3); |
} |
function testGetDaysInMonth() { |
$this->assertEqual($this->engine->getDaysInMonth(2003,10),31); |
} |
function testGetMinYears() { |
$this->assertEqual($this->engine->getMinYears(),0); |
} |
function testGetMaxYears() { |
$this->assertEqual($this->engine->getMaxYears(),9999); |
} |
function testDateToStamp() { |
$stamp = '2003-10-15 13:30:45'; |
$this->assertEqual($this->engine->dateToStamp(2003,10,15,13,30,45),$stamp); |
} |
function testStampToSecond() { |
$stamp = '2003-10-15 13:30:45'; |
$this->assertEqual($this->engine->stampToSecond($stamp),45); |
} |
function testStampToMinute() { |
$stamp = '2003-10-15 13:30:45'; |
$this->assertEqual($this->engine->stampToMinute($stamp),30); |
} |
function testStampToHour() { |
$stamp = '2003-10-15 13:30:45'; |
$this->assertEqual($this->engine->stampToHour($stamp),13); |
} |
function testStampToDay() { |
$stamp = '2003-10-15 13:30:45'; |
$this->assertEqual($this->engine->stampToDay($stamp),15); |
} |
function testStampToMonth() { |
$stamp = '2003-10-15 13:30:45'; |
$this->assertEqual($this->engine->stampToMonth($stamp),10); |
} |
function testStampToYear() { |
$stamp = '2003-10-15 13:30:45'; |
$this->assertEqual($this->engine->stampToYear($stamp),2003); |
} |
function testAdjustDate() { |
$stamp = '2004-01-01 13:30:45'; |
$y = $this->engine->stampToYear($stamp); |
$m = $this->engine->stampToMonth($stamp); |
$d = $this->engine->stampToDay($stamp); |
//the first day of the month should be thursday |
$this->assertEqual($this->engine->getDayOfWeek($y, $m, $d), 4); |
$m--; // 2004-00-01 => 2003-12-01 |
$this->engine->adjustDate($y, $m, $d, $dummy, $dummy, $dummy); |
$this->assertEqual($y, 2003); |
$this->assertEqual($m, 12); |
$this->assertEqual($d, 1); |
// get last day and check if it's wednesday |
$d = $this->engine->getDaysInMonth($y, $m); |
$this->assertEqual($this->engine->getDayOfWeek($y, $m, $d), 3); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfPearDateEngine(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/second_test.php |
---|
New file |
0,0 → 1,34 |
<?php |
// $Id: second_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./calendar_test.php'); |
class TestOfSecond extends TestOfCalendar { |
function TestOfSecond() { |
$this->UnitTestCase('Test of Second'); |
} |
function setUp() { |
$this->cal = new Calendar_Second(2003,10,25,13,32,43); |
} |
function testPrevDay_Array () { |
$this->assertEqual( |
array( |
'year' => 2003, |
'month' => 10, |
'day' => 24, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevDay('array')); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfSecond(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/day_test.php |
---|
New file |
0,0 → 1,107 |
<?php |
// $Id: day_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./calendar_test.php'); |
class TestOfDay extends TestOfCalendar { |
function TestOfDay() { |
$this->UnitTestCase('Test of Day'); |
} |
function setUp() { |
$this->cal = new Calendar_Day(2003,10,25); |
} |
function testPrevDay_Array () { |
$this->assertEqual( |
array( |
'year' => 2003, |
'month' => 10, |
'day' => 24, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevDay('array')); |
} |
function testPrevHour () { |
$this->assertEqual(23,$this->cal->prevHour()); |
} |
function testThisHour () { |
$this->assertEqual(0,$this->cal->thisHour()); |
} |
function testNextHour () { |
$this->assertEqual(1,$this->cal->nextHour()); |
} |
function testPrevMinute () { |
$this->assertEqual(59,$this->cal->prevMinute()); |
} |
function testThisMinute () { |
$this->assertEqual(0,$this->cal->thisMinute()); |
} |
function testNextMinute () { |
$this->assertEqual(1,$this->cal->nextMinute()); |
} |
function testPrevSecond () { |
$this->assertEqual(59,$this->cal->prevSecond()); |
} |
function testThisSecond () { |
$this->assertEqual(0,$this->cal->thisSecond()); |
} |
function testNextSecond () { |
$this->assertEqual(1,$this->cal->nextSecond()); |
} |
function testGetTimeStamp() { |
$stamp = mktime(0,0,0,10,25,2003); |
$this->assertEqual($stamp,$this->cal->getTimeStamp()); |
} |
} |
class TestOfDayBuild extends TestOfDay { |
function TestOfDayBuild() { |
$this->UnitTestCase('Test of Day::build()'); |
} |
function testSize() { |
$this->cal->build(); |
$this->assertEqual(24,$this->cal->size()); |
} |
function testFetch() { |
$this->cal->build(); |
$i=0; |
while ( $Child = $this->cal->fetch() ) { |
$i++; |
} |
$this->assertEqual(24,$i); |
} |
function testFetchAll() { |
$this->cal->build(); |
$children = array(); |
$i = 0; |
while ( $Child = $this->cal->fetch() ) { |
$children[$i]=$Child; |
$i++; |
} |
$this->assertEqual($children,$this->cal->fetchAll()); |
} |
function testSelection() { |
require_once(CALENDAR_ROOT . 'Hour.php'); |
$selection = array(new Calendar_Hour(2003,10,25,13)); |
$this->cal->build($selection); |
$i = 0; |
while ( $Child = $this->cal->fetch() ) { |
if ( $i == 13 ) |
break; |
$i++; |
} |
$this->assertTrue($Child->isSelected()); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfDay(); |
$test->run(new HtmlReporter()); |
$test = &new TestOfDayBuild(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/calendar_include.php |
---|
New file |
0,0 → 1,28 |
<?php |
// $Id: calendar_include.php,v 1.4 2004/08/16 12:56:10 hfuecks Exp $ |
if ( !@include 'Calendar/Calendar.php' ) { |
@define('CALENDAR_ROOT','../'); |
} |
require_once(CALENDAR_ROOT . 'Year.php'); |
require_once(CALENDAR_ROOT . 'Month.php'); |
require_once(CALENDAR_ROOT . 'Day.php'); |
require_once(CALENDAR_ROOT . 'Week.php'); |
require_once(CALENDAR_ROOT . 'Hour.php'); |
require_once(CALENDAR_ROOT . 'Minute.php'); |
require_once(CALENDAR_ROOT . 'Second.php'); |
require_once(CALENDAR_ROOT . 'Month.php'); |
require_once(CALENDAR_ROOT . 'Decorator.php'); |
require_once(CALENDAR_ROOT . 'Month/Weekdays.php'); |
require_once(CALENDAR_ROOT . 'Month/Weeks.php'); |
require_once(CALENDAR_ROOT . 'Validator.php'); |
require_once(CALENDAR_ROOT . 'Engine/Interface.php'); |
require_once(CALENDAR_ROOT . 'Engine/UnixTs.php'); |
require_once(CALENDAR_ROOT . 'Engine/PearDate.php'); |
require_once(CALENDAR_ROOT . 'Table/Helper.php'); |
require_once(CALENDAR_ROOT . 'Decorator/Textual.php'); |
require_once(CALENDAR_ROOT . 'Decorator/Uri.php'); |
require_once(CALENDAR_ROOT . 'Decorator/Weekday.php'); |
require_once(CALENDAR_ROOT . 'Decorator/Wrapper.php'); |
require_once(CALENDAR_ROOT . 'Util/Uri.php'); |
require_once(CALENDAR_ROOT . 'Util/Textual.php'); |
?> |
/trunk/classes/pear/Calendar/tests/unixts_engine_test.php |
---|
New file |
0,0 → 1,104 |
<?php |
// $Id: unixts_engine_test.php,v 1.2 2004/08/16 11:36:51 hfuecks Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
class TestOfUnixTsEngine extends UnitTestCase { |
var $engine; |
function TestOfUnixTsEngine() { |
$this->UnitTestCase('Test of Calendar_Engine_UnixTs'); |
} |
function setUp() { |
$this->engine = new Calendar_Engine_UnixTs(); |
} |
function testGetSecondsInMinute() { |
$this->assertEqual($this->engine->getSecondsInMinute(),60); |
} |
function testGetMinutesInHour() { |
$this->assertEqual($this->engine->getMinutesInHour(),60); |
} |
function testGetHoursInDay() { |
$this->assertEqual($this->engine->getHoursInDay(),24); |
} |
function testGetFirstDayOfWeek() { |
$this->assertEqual($this->engine->getFirstDayOfWeek(),1); |
} |
function testGetWeekDays() { |
$this->assertEqual($this->engine->getWeekDays(),array(0,1,2,3,4,5,6)); |
} |
function testGetDaysInWeek() { |
$this->assertEqual($this->engine->getDaysInWeek(),7); |
} |
function testGetWeekNInYear() { |
$this->assertEqual($this->engine->getWeekNInYear(2003, 11, 3), 45); |
} |
function testGetWeekNInMonth() { |
$this->assertEqual($this->engine->getWeekNInMonth(2003, 11, 3), 2); |
} |
function testGetWeeksInMonth0() { |
$this->assertEqual($this->engine->getWeeksInMonth(2003, 11, 0), 6); //week starts on sunday |
} |
function testGetWeeksInMonth1() { |
$this->assertEqual($this->engine->getWeeksInMonth(2003, 11, 1), 5); //week starts on monday |
} |
function testGetWeeksInMonth2() { |
$this->assertEqual($this->engine->getWeeksInMonth(2003, 2, 6), 4); //week starts on saturday |
} |
function testGetWeeksInMonth3() { |
// Unusual cases that can cause fails (shows up with example 21.php) |
$this->assertEqual($this->engine->getWeeksInMonth(2004,2,1),5); |
$this->assertEqual($this->engine->getWeeksInMonth(2004,8,1),6); |
} |
function testGetDayOfWeek() { |
$this->assertEqual($this->engine->getDayOfWeek(2003, 11, 18), 2); |
} |
function testGetFirstDayInMonth() { |
$this->assertEqual($this->engine->getFirstDayInMonth(2003,10),3); |
} |
function testGetDaysInMonth() { |
$this->assertEqual($this->engine->getDaysInMonth(2003,10),31); |
} |
function testGetMinYears() { |
$test = strpos(PHP_OS, 'WIN') >= 0 ? 1970 : 1902; |
$this->assertEqual($this->engine->getMinYears(),$test); |
} |
function testGetMaxYears() { |
$this->assertEqual($this->engine->getMaxYears(),2037); |
} |
function testDateToStamp() { |
$stamp = mktime(0,0,0,10,15,2003); |
$this->assertEqual($this->engine->dateToStamp(2003,10,15,0,0,0),$stamp); |
} |
function testStampToSecond() { |
$stamp = mktime(13,30,45,10,15,2003); |
$this->assertEqual($this->engine->stampToSecond($stamp),45); |
} |
function testStampToMinute() { |
$stamp = mktime(13,30,45,10,15,2003); |
$this->assertEqual($this->engine->stampToMinute($stamp),30); |
} |
function testStampToHour() { |
$stamp = mktime(13,30,45,10,15,2003); |
$this->assertEqual($this->engine->stampToHour($stamp),13); |
} |
function testStampToDay() { |
$stamp = mktime(13,30,45,10,15,2003); |
$this->assertEqual($this->engine->stampToDay($stamp),15); |
} |
function testStampToMonth() { |
$stamp = mktime(13,30,45,10,15,2003); |
$this->assertEqual($this->engine->stampToMonth($stamp),10); |
} |
function testStampToYear() { |
$stamp = mktime(13,30,45,10,15,2003); |
$this->assertEqual($this->engine->stampToYear($stamp),2003); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfUnixTsEngine(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/decorator_test.php |
---|
New file |
0,0 → 1,268 |
<?php |
// $Id: decorator_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
Mock::generate('Calendar_Engine_Interface','Mock_Calendar_Engine'); |
Mock::generate('Calendar_Second','Mock_Calendar_Second'); |
Mock::generate('Calendar_Week','Mock_Calendar_Week'); |
Mock::generate('Calendar_Day','Mock_Calendar_Day'); |
class TestOfDecorator extends UnitTestCase { |
var $mockengine; |
var $mockcal; |
var $decorator; |
function TestOfDecorator() { |
$this->UnitTestCase('Test of Calendar_Decorator'); |
} |
function setUp() { |
$this->mockengine = new Mock_Calendar_Engine($this); |
$this->mockcal = new Mock_Calendar_Second($this); |
$this->mockcal->setReturnValue('prevYear',2002); |
$this->mockcal->setReturnValue('thisYear',2003); |
$this->mockcal->setReturnValue('nextYear',2004); |
$this->mockcal->setReturnValue('prevMonth',9); |
$this->mockcal->setReturnValue('thisMonth',10); |
$this->mockcal->setReturnValue('nextMonth',11); |
$this->mockcal->setReturnValue('prevDay',14); |
$this->mockcal->setReturnValue('thisDay',15); |
$this->mockcal->setReturnValue('nextDay',16); |
$this->mockcal->setReturnValue('prevHour',12); |
$this->mockcal->setReturnValue('thisHour',13); |
$this->mockcal->setReturnValue('nextHour',14); |
$this->mockcal->setReturnValue('prevMinute',29); |
$this->mockcal->setReturnValue('thisMinute',30); |
$this->mockcal->setReturnValue('nextMinute',31); |
$this->mockcal->setReturnValue('prevSecond',44); |
$this->mockcal->setReturnValue('thisSecond',45); |
$this->mockcal->setReturnValue('nextSecond',46); |
$this->mockcal->setReturnValue('getEngine',$this->mockengine); |
$this->mockcal->setReturnValue('getTimestamp',12345); |
} |
function tearDown() { |
unset ( $this->engine ); |
unset ( $this->mockcal ); |
} |
function testPrevYear() { |
$this->mockcal->expectOnce('prevYear',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(2002,$Decorator->prevYear()); |
} |
function testThisYear() { |
$this->mockcal->expectOnce('thisYear',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(2003,$Decorator->thisYear()); |
} |
function testNextYear() { |
$this->mockcal->expectOnce('nextYear',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(2004,$Decorator->nextYear()); |
} |
function testPrevMonth() { |
$this->mockcal->expectOnce('prevMonth',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(9,$Decorator->prevMonth()); |
} |
function testThisMonth() { |
$this->mockcal->expectOnce('thisMonth',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(10,$Decorator->thisMonth()); |
} |
function testNextMonth() { |
$this->mockcal->expectOnce('nextMonth',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(11,$Decorator->nextMonth()); |
} |
function testPrevWeek() { |
$mockweek = & new Mock_Calendar_Week($this); |
$mockweek->setReturnValue('prevWeek',1); |
$mockweek->expectOnce('prevWeek',array('n_in_month')); |
$Decorator =& new Calendar_Decorator($mockweek); |
$this->assertEqual(1,$Decorator->prevWeek()); |
} |
function testThisWeek() { |
$mockweek = & new Mock_Calendar_Week($this); |
$mockweek->setReturnValue('thisWeek',2); |
$mockweek->expectOnce('thisWeek',array('n_in_month')); |
$Decorator =& new Calendar_Decorator($mockweek); |
$this->assertEqual(2,$Decorator->thisWeek()); |
} |
function testNextWeek() { |
$mockweek = & new Mock_Calendar_Week($this); |
$mockweek->setReturnValue('nextWeek',3); |
$mockweek->expectOnce('nextWeek',array('n_in_month')); |
$Decorator =& new Calendar_Decorator($mockweek); |
$this->assertEqual(3,$Decorator->nextWeek()); |
} |
function testPrevDay() { |
$this->mockcal->expectOnce('prevDay',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(14,$Decorator->prevDay()); |
} |
function testThisDay() { |
$this->mockcal->expectOnce('thisDay',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(15,$Decorator->thisDay()); |
} |
function testNextDay() { |
$this->mockcal->expectOnce('nextDay',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(16,$Decorator->nextDay()); |
} |
function testPrevHour() { |
$this->mockcal->expectOnce('prevHour',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(12,$Decorator->prevHour()); |
} |
function testThisHour() { |
$this->mockcal->expectOnce('thisHour',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(13,$Decorator->thisHour()); |
} |
function testNextHour() { |
$this->mockcal->expectOnce('nextHour',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(14,$Decorator->nextHour()); |
} |
function testPrevMinute() { |
$this->mockcal->expectOnce('prevMinute',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(29,$Decorator->prevMinute()); |
} |
function testThisMinute() { |
$this->mockcal->expectOnce('thisMinute',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(30,$Decorator->thisMinute()); |
} |
function testNextMinute() { |
$this->mockcal->expectOnce('nextMinute',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(31,$Decorator->nextMinute()); |
} |
function testPrevSecond() { |
$this->mockcal->expectOnce('prevSecond',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(44,$Decorator->prevSecond()); |
} |
function testThisSecond() { |
$this->mockcal->expectOnce('thisSecond',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(45,$Decorator->thisSecond()); |
} |
function testNextSecond() { |
$this->mockcal->expectOnce('nextSecond',array('int')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(46,$Decorator->nextSecond()); |
} |
function testGetEngine() { |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertIsA($Decorator->getEngine(),'Mock_Calendar_Engine'); |
} |
function testSetTimestamp() { |
$this->mockcal->expectOnce('setTimestamp',array('12345')); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$Decorator->setTimestamp('12345'); |
} |
function testGetTimestamp() { |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual(12345,$Decorator->getTimestamp()); |
} |
function testSetSelected() { |
$this->mockcal->expectOnce('setSelected',array(true)); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$Decorator->setSelected(); |
} |
function testIsSelected() { |
$this->mockcal->setReturnValue('isSelected',true); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertTrue($Decorator->isSelected()); |
} |
function testAdjust() { |
$this->mockcal->expectOnce('adjust',array()); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$Decorator->adjust(); |
} |
function testToArray() { |
$this->mockcal->expectOnce('toArray',array(12345)); |
$testArray = array('foo'=>'bar'); |
$this->mockcal->setReturnValue('toArray',$testArray); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual($testArray,$Decorator->toArray(12345)); |
} |
function testReturnValue() { |
$this->mockcal->expectOnce('returnValue',array('a','b','c','d')); |
$this->mockcal->setReturnValue('returnValue','foo'); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$this->assertEqual('foo',$Decorator->returnValue('a','b','c','d')); |
} |
function testSetFirst() { |
$mockday = & new Mock_Calendar_Day($this); |
$mockday->expectOnce('setFirst',array(true)); |
$Decorator =& new Calendar_Decorator($mockday); |
$Decorator->setFirst(); |
} |
function testSetLast() { |
$mockday = & new Mock_Calendar_Day($this); |
$mockday->expectOnce('setLast',array(true)); |
$Decorator =& new Calendar_Decorator($mockday); |
$Decorator->setLast(); |
} |
function testIsFirst() { |
$mockday = & new Mock_Calendar_Day($this); |
$mockday->setReturnValue('isFirst',TRUE); |
$Decorator =& new Calendar_Decorator($mockday); |
$this->assertTrue($Decorator->isFirst()); |
} |
function testIsLast() { |
$mockday = & new Mock_Calendar_Day($this); |
$mockday->setReturnValue('isLast',TRUE); |
$Decorator =& new Calendar_Decorator($mockday); |
$this->assertTrue($Decorator->isLast()); |
} |
function testSetEmpty() { |
$mockday = & new Mock_Calendar_Day($this); |
$mockday->expectOnce('setEmpty',array(true)); |
$Decorator =& new Calendar_Decorator($mockday); |
$Decorator->setEmpty(); |
} |
function testIsEmpty() { |
$mockday = & new Mock_Calendar_Day($this); |
$mockday->setReturnValue('isEmpty',TRUE); |
$Decorator =& new Calendar_Decorator($mockday); |
$this->assertTrue($Decorator->isEmpty()); |
} |
function testBuild() { |
$testArray=array('foo'=>'bar'); |
$this->mockcal->expectOnce('build',array($testArray)); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$Decorator->build($testArray); |
} |
function testFetch() { |
$this->mockcal->expectOnce('fetch',array()); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$Decorator->fetch(); |
} |
function testFetchAll() { |
$this->mockcal->expectOnce('fetchAll',array()); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$Decorator->fetchAll(); |
} |
function testSize() { |
$this->mockcal->expectOnce('size',array()); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$Decorator->size(); |
} |
function testIsValid() { |
$this->mockcal->expectOnce('isValid',array()); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$Decorator->isValid(); |
} |
function testGetValidator() { |
$this->mockcal->expectOnce('getValidator',array()); |
$Decorator =& new Calendar_Decorator($this->mockcal); |
$Decorator->getValidator(); |
} |
} |
?> |
/trunk/classes/pear/Calendar/tests/util_textual_test.php |
---|
New file |
0,0 → 1,191 |
<?php |
// $Id: util_textual_test.php,v 1.1 2004/08/16 12:56:10 hfuecks Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./decorator_test.php'); |
class TestOfUtilTextual extends UnitTestCase { |
var $mockengine; |
var $mockcal; |
function TestOfUtilTextual() { |
$this->UnitTestCase('Test of Calendar_Util_Textual'); |
} |
function setUp() { |
$this->mockengine = new Mock_Calendar_Engine($this); |
$this->mockcal = new Mock_Calendar_Second($this); |
$this->mockcal->setReturnValue('prevYear',2002); |
$this->mockcal->setReturnValue('thisYear',2003); |
$this->mockcal->setReturnValue('nextYear',2004); |
$this->mockcal->setReturnValue('prevMonth',9); |
$this->mockcal->setReturnValue('thisMonth',10); |
$this->mockcal->setReturnValue('nextMonth',11); |
$this->mockcal->setReturnValue('prevDay',14); |
$this->mockcal->setReturnValue('thisDay',15); |
$this->mockcal->setReturnValue('nextDay',16); |
$this->mockcal->setReturnValue('prevHour',12); |
$this->mockcal->setReturnValue('thisHour',13); |
$this->mockcal->setReturnValue('nextHour',14); |
$this->mockcal->setReturnValue('prevMinute',29); |
$this->mockcal->setReturnValue('thisMinute',30); |
$this->mockcal->setReturnValue('nextMinute',31); |
$this->mockcal->setReturnValue('prevSecond',44); |
$this->mockcal->setReturnValue('thisSecond',45); |
$this->mockcal->setReturnValue('nextSecond',46); |
$this->mockcal->setReturnValue('getEngine',$this->mockengine); |
$this->mockcal->setReturnValue('getTimestamp',12345); |
} |
function tearDown() { |
unset ( $this->engine ); |
unset ( $this->mockcal ); |
} |
function testMonthNamesLong() { |
$monthNames = array( |
1=>'January', |
2=>'February', |
3=>'March', |
4=>'April', |
5=>'May', |
6=>'June', |
7=>'July', |
8=>'August', |
9=>'September', |
10=>'October', |
11=>'November', |
12=>'December', |
); |
$this->assertEqual($monthNames,Calendar_Util_Textual::monthNames()); |
} |
function testMonthNamesShort() { |
$monthNames = array( |
1=>'Jan', |
2=>'Feb', |
3=>'Mar', |
4=>'Apr', |
5=>'May', |
6=>'Jun', |
7=>'Jul', |
8=>'Aug', |
9=>'Sep', |
10=>'Oct', |
11=>'Nov', |
12=>'Dec', |
); |
$this->assertEqual($monthNames,Calendar_Util_Textual::monthNames('short')); |
} |
function testMonthNamesTwo() { |
$monthNames = array( |
1=>'Ja', |
2=>'Fe', |
3=>'Ma', |
4=>'Ap', |
5=>'Ma', |
6=>'Ju', |
7=>'Ju', |
8=>'Au', |
9=>'Se', |
10=>'Oc', |
11=>'No', |
12=>'De', |
); |
$this->assertEqual($monthNames,Calendar_Util_Textual::monthNames('two')); |
} |
function testMonthNamesOne() { |
$monthNames = array( |
1=>'J', |
2=>'F', |
3=>'M', |
4=>'A', |
5=>'M', |
6=>'J', |
7=>'J', |
8=>'A', |
9=>'S', |
10=>'O', |
11=>'N', |
12=>'D', |
); |
$this->assertEqual($monthNames,Calendar_Util_Textual::monthNames('one')); |
} |
function testWeekdayNamesLong() { |
$weekdayNames = array( |
0=>'Sunday', |
1=>'Monday', |
2=>'Tuesday', |
3=>'Wednesday', |
4=>'Thursday', |
5=>'Friday', |
6=>'Saturday', |
); |
$this->assertEqual($weekdayNames,Calendar_Util_Textual::weekdayNames()); |
} |
function testWeekdayNamesShort() { |
$weekdayNames = array( |
0=>'Sun', |
1=>'Mon', |
2=>'Tue', |
3=>'Wed', |
4=>'Thu', |
5=>'Fri', |
6=>'Sat', |
); |
$this->assertEqual($weekdayNames,Calendar_Util_Textual::weekdayNames('short')); |
} |
function testWeekdayNamesTwo() { |
$weekdayNames = array( |
0=>'Su', |
1=>'Mo', |
2=>'Tu', |
3=>'We', |
4=>'Th', |
5=>'Fr', |
6=>'Sa', |
); |
$this->assertEqual($weekdayNames,Calendar_Util_Textual::weekdayNames('two')); |
} |
function testWeekdayNamesOne() { |
$weekdayNames = array( |
0=>'S', |
1=>'M', |
2=>'T', |
3=>'W', |
4=>'T', |
5=>'F', |
6=>'S', |
); |
$this->assertEqual($weekdayNames,Calendar_Util_Textual::weekdayNames('one')); |
} |
function testPrevMonthNameShort() { |
$this->assertEqual('Sep',Calendar_Util_Textual::prevMonthName($this->mockcal,'short')); |
} |
function testThisMonthNameShort() { |
$this->assertEqual('Oct',Calendar_Util_Textual::thisMonthName($this->mockcal,'short')); |
} |
function testNextMonthNameShort() { |
$this->assertEqual('Nov',Calendar_Util_Textual::nextMonthName($this->mockcal,'short')); |
} |
function testThisDayNameShort() { |
$this->assertEqual('Wed',Calendar_Util_Textual::thisDayName($this->mockcal,'short')); |
} |
function testOrderedWeekdaysShort() { |
$weekdayNames = array( |
0=>'Sun', |
1=>'Mon', |
2=>'Tue', |
3=>'Wed', |
4=>'Thu', |
5=>'Fri', |
6=>'Sat', |
); |
$this->assertEqual($weekdayNames,Calendar_Util_Textual::orderedWeekdays($this->mockcal,'short')); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfUtilTextual(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/month_weeks_test.php |
---|
New file |
0,0 → 1,125 |
<?php |
// $Id: month_weeks_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./calendar_test.php'); |
class TestOfMonthWeeks extends TestOfCalendar { |
function TestOfMonthWeeks() { |
$this->UnitTestCase('Test of Month Weeks'); |
} |
function setUp() { |
$this->cal = new Calendar_Month_Weeks(2003,10); |
} |
function testPrevDay () { |
$this->assertEqual(30,$this->cal->prevDay()); |
} |
function testPrevDay_Array () { |
$this->assertEqual( |
array( |
'year' => 2003, |
'month' => 9, |
'day' => 30, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevDay('array')); |
} |
function testThisDay () { |
$this->assertEqual(1,$this->cal->thisDay()); |
} |
function testNextDay () { |
$this->assertEqual(2,$this->cal->nextDay()); |
} |
function testPrevHour () { |
$this->assertEqual(23,$this->cal->prevHour()); |
} |
function testThisHour () { |
$this->assertEqual(0,$this->cal->thisHour()); |
} |
function testNextHour () { |
$this->assertEqual(1,$this->cal->nextHour()); |
} |
function testPrevMinute () { |
$this->assertEqual(59,$this->cal->prevMinute()); |
} |
function testThisMinute () { |
$this->assertEqual(0,$this->cal->thisMinute()); |
} |
function testNextMinute () { |
$this->assertEqual(1,$this->cal->nextMinute()); |
} |
function testPrevSecond () { |
$this->assertEqual(59,$this->cal->prevSecond()); |
} |
function testThisSecond () { |
$this->assertEqual(0,$this->cal->thisSecond()); |
} |
function testNextSecond () { |
$this->assertEqual(1,$this->cal->nextSecond()); |
} |
function testGetTimeStamp() { |
$stamp = mktime(0,0,0,10,1,2003); |
$this->assertEqual($stamp,$this->cal->getTimeStamp()); |
} |
} |
class TestOfMonthWeeksBuild extends TestOfMonthWeeks { |
function TestOfMonthWeeksBuild() { |
$this->UnitTestCase('Test of Month_Weeks::build()'); |
} |
function testSize() { |
$this->cal->build(); |
$this->assertEqual(5,$this->cal->size()); |
} |
function testFetch() { |
$this->cal->build(); |
$i=0; |
while ( $Child = $this->cal->fetch() ) { |
$i++; |
} |
$this->assertEqual(5,$i); |
} |
/* Recusive dependency issue with SimpleTest |
function testFetchAll() { |
$this->cal->build(); |
$children = array(); |
$i = 1; |
while ( $Child = $this->cal->fetch() ) { |
$children[$i]=$Child; |
$i++; |
} |
$this->assertEqual($children,$this->cal->fetchAll()); |
} |
*/ |
function testSelection() { |
require_once(CALENDAR_ROOT . 'Week.php'); |
$selection = array(new Calendar_Week(2003, 10, 12)); |
$this->cal->build($selection); |
$i = 1; |
while ($Child = $this->cal->fetch()) { |
if ($i == 2) { |
break; //12-10-2003 is the 2nd day of the week |
} |
$i++; |
} |
$this->assertTrue($Child->isSelected()); |
} |
function testEmptyDaysBefore_AfterAdjust() { |
$this->cal = new Calendar_Month_Weeks(2004,0); |
$this->cal->build(); |
$this->assertEqual(0,$this->cal->tableHelper->getEmptyDaysBefore()); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfMonthWeeks(); |
$test->run(new HtmlReporter()); |
$test = &new TestOfMonthWeeksBuild(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/validator_unit_test.php |
---|
New file |
0,0 → 1,210 |
<?php |
// $Id: validator_unit_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
Mock::generate('Calendar_Engine_Interface','Mock_Calendar_Engine'); |
Mock::generate('Calendar_Second','Mock_Calendar_Second'); |
class TestOfValidator extends UnitTestCase { |
var $mockengine; |
var $mockcal; |
function TestOfValidator() { |
$this->UnitTestCase('Test of Validator'); |
} |
function setUp() { |
$this->mockengine = new Mock_Calendar_Engine($this); |
$this->mockengine->setReturnValue('getMinYears',1970); |
$this->mockengine->setReturnValue('getMaxYears',2037); |
$this->mockengine->setReturnValue('getMonthsInYear',12); |
$this->mockengine->setReturnValue('getDaysInMonth',30); |
$this->mockengine->setReturnValue('getHoursInDay',24); |
$this->mockengine->setReturnValue('getMinutesInHour',60); |
$this->mockengine->setReturnValue('getSecondsInMinute',60); |
$this->mockcal = new Mock_Calendar_Second($this); |
$this->mockcal->setReturnValue('getEngine',$this->mockengine); |
} |
function tearDown() { |
unset ($this->mockengine); |
unset ($this->mocksecond); |
} |
function testIsValidYear() { |
$this->mockcal->setReturnValue('thisYear',2000); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertTrue($Validator->isValidYear()); |
} |
function testIsValidYearTooSmall() { |
$this->mockcal->setReturnValue('thisYear',1969); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidYear()); |
} |
function testIsValidYearTooLarge() { |
$this->mockcal->setReturnValue('thisYear',2038); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidYear()); |
} |
function testIsValidMonth() { |
$this->mockcal->setReturnValue('thisMonth',10); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertTrue($Validator->isValidMonth()); |
} |
function testIsValidMonthTooSmall() { |
$this->mockcal->setReturnValue('thisMonth',0); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidMonth()); |
} |
function testIsValidMonthTooLarge() { |
$this->mockcal->setReturnValue('thisMonth',13); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidMonth()); |
} |
function testIsValidDay() { |
$this->mockcal->setReturnValue('thisDay',10); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertTrue($Validator->isValidDay()); |
} |
function testIsValidDayTooSmall() { |
$this->mockcal->setReturnValue('thisDay',0); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidDay()); |
} |
function testIsValidDayTooLarge() { |
$this->mockcal->setReturnValue('thisDay',31); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidDay()); |
} |
function testIsValidHour() { |
$this->mockcal->setReturnValue('thisHour',10); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertTrue($Validator->isValidHour()); |
} |
function testIsValidHourTooSmall() { |
$this->mockcal->setReturnValue('thisHour',-1); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidHour()); |
} |
function testIsValidHourTooLarge() { |
$this->mockcal->setReturnValue('thisHour',24); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidHour()); |
} |
function testIsValidMinute() { |
$this->mockcal->setReturnValue('thisMinute',30); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertTrue($Validator->isValidMinute()); |
} |
function testIsValidMinuteTooSmall() { |
$this->mockcal->setReturnValue('thisMinute',-1); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidMinute()); |
} |
function testIsValidMinuteTooLarge() { |
$this->mockcal->setReturnValue('thisMinute',60); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidMinute()); |
} |
function testIsValidSecond() { |
$this->mockcal->setReturnValue('thisSecond',30); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertTrue($Validator->isValidSecond()); |
} |
function testIsValidSecondTooSmall() { |
$this->mockcal->setReturnValue('thisSecond',-1); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidSecond()); |
} |
function testIsValidSecondTooLarge() { |
$this->mockcal->setReturnValue('thisSecond',60); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValidSecond()); |
} |
function testIsValid() { |
$this->mockcal->setReturnValue('thisYear',2000); |
$this->mockcal->setReturnValue('thisMonth',5); |
$this->mockcal->setReturnValue('thisDay',15); |
$this->mockcal->setReturnValue('thisHour',13); |
$this->mockcal->setReturnValue('thisMinute',30); |
$this->mockcal->setReturnValue('thisSecond',40); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertTrue($Validator->isValid()); |
} |
function testIsValidAllWrong() { |
$this->mockcal->setReturnValue('thisYear',2038); |
$this->mockcal->setReturnValue('thisMonth',13); |
$this->mockcal->setReturnValue('thisDay',31); |
$this->mockcal->day = 31; |
$this->mockcal->setReturnValue('thisHour',24); |
$this->mockcal->setReturnValue('thisMinute',60); |
$this->mockcal->setReturnValue('thisSecond',60); |
$Validator = & new Calendar_Validator($this->mockcal); |
$this->assertFalse($Validator->isValid()); |
$i = 0; |
while ( $Validator->fetch() ) { |
$i++; |
} |
$this->assertEqual($i,6); |
} |
} |
class TestOfValidatorLive extends UnitTestCase { |
function TestOfValidatorLive() { |
$this->UnitTestCase('Test of Validator Live'); |
} |
function testYear() { |
$Unit = new Calendar_Year(2038); |
$Validator = & $Unit->getValidator(); |
$this->assertFalse($Validator->isValidYear()); |
} |
function testMonth() { |
$Unit = new Calendar_Month(2000,13); |
$Validator = & $Unit->getValidator(); |
$this->assertFalse($Validator->isValidMonth()); |
} |
/* |
function testWeek() { |
$Unit = new Calendar_Week(2000,12,7); |
$Validator = & $Unit->getValidator(); |
$this->assertFalse($Validator->isValidWeek()); |
} |
*/ |
function testDay() { |
$Unit = new Calendar_Day(2000,12,32); |
$Validator = & $Unit->getValidator(); |
$this->assertFalse($Validator->isValidDay()); |
} |
function testHour() { |
$Unit = new Calendar_Hour(2000,12,20,24); |
$Validator = & $Unit->getValidator(); |
$this->assertFalse($Validator->isValidHour()); |
} |
function testMinute() { |
$Unit = new Calendar_Minute(2000,12,20,23,60); |
$Validator = & $Unit->getValidator(); |
$this->assertFalse($Validator->isValidMinute()); |
} |
function testSecond() { |
$Unit = new Calendar_Second(2000,12,20,23,59,60); |
$Validator = & $Unit->getValidator(); |
$this->assertFalse($Validator->isValidSecond()); |
} |
function testAllBad() { |
$Unit = new Calendar_Second(2000,13,32,24,60,60); |
$this->assertFalse($Unit->isValid()); |
$Validator = & $Unit->getValidator(); |
$i = 0; |
while ( $Validator->fetch() ) { |
$i++; |
} |
$this->assertEqual($i,5); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfValidator(); |
$test->run(new HtmlReporter()); |
$test = &new TestOfValidatorLive(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/decorator_textual_test.php |
---|
New file |
0,0 → 1,174 |
<?php |
// $Id: decorator_textual_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./decorator_test.php'); |
class TestOfDecoratorTextual extends TestOfDecorator { |
function TestOfDecoratorTextual() { |
$this->UnitTestCase('Test of Calendar_Decorator_Textual'); |
} |
function testMonthNamesLong() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$monthNames = array( |
1=>'January', |
2=>'February', |
3=>'March', |
4=>'April', |
5=>'May', |
6=>'June', |
7=>'July', |
8=>'August', |
9=>'September', |
10=>'October', |
11=>'November', |
12=>'December', |
); |
$this->assertEqual($monthNames,$Textual->monthNames()); |
} |
function testMonthNamesShort() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$monthNames = array( |
1=>'Jan', |
2=>'Feb', |
3=>'Mar', |
4=>'Apr', |
5=>'May', |
6=>'Jun', |
7=>'Jul', |
8=>'Aug', |
9=>'Sep', |
10=>'Oct', |
11=>'Nov', |
12=>'Dec', |
); |
$this->assertEqual($monthNames,$Textual->monthNames('short')); |
} |
function testMonthNamesTwo() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$monthNames = array( |
1=>'Ja', |
2=>'Fe', |
3=>'Ma', |
4=>'Ap', |
5=>'Ma', |
6=>'Ju', |
7=>'Ju', |
8=>'Au', |
9=>'Se', |
10=>'Oc', |
11=>'No', |
12=>'De', |
); |
$this->assertEqual($monthNames,$Textual->monthNames('two')); |
} |
function testMonthNamesOne() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$monthNames = array( |
1=>'J', |
2=>'F', |
3=>'M', |
4=>'A', |
5=>'M', |
6=>'J', |
7=>'J', |
8=>'A', |
9=>'S', |
10=>'O', |
11=>'N', |
12=>'D', |
); |
$this->assertEqual($monthNames,$Textual->monthNames('one')); |
} |
function testWeekdayNamesLong() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$weekdayNames = array( |
0=>'Sunday', |
1=>'Monday', |
2=>'Tuesday', |
3=>'Wednesday', |
4=>'Thursday', |
5=>'Friday', |
6=>'Saturday', |
); |
$this->assertEqual($weekdayNames,$Textual->weekdayNames()); |
} |
function testWeekdayNamesShort() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$weekdayNames = array( |
0=>'Sun', |
1=>'Mon', |
2=>'Tue', |
3=>'Wed', |
4=>'Thu', |
5=>'Fri', |
6=>'Sat', |
); |
$this->assertEqual($weekdayNames,$Textual->weekdayNames('short')); |
} |
function testWeekdayNamesTwo() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$weekdayNames = array( |
0=>'Su', |
1=>'Mo', |
2=>'Tu', |
3=>'We', |
4=>'Th', |
5=>'Fr', |
6=>'Sa', |
); |
$this->assertEqual($weekdayNames,$Textual->weekdayNames('two')); |
} |
function testWeekdayNamesOne() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$weekdayNames = array( |
0=>'S', |
1=>'M', |
2=>'T', |
3=>'W', |
4=>'T', |
5=>'F', |
6=>'S', |
); |
$this->assertEqual($weekdayNames,$Textual->weekdayNames('one')); |
} |
function testPrevMonthNameShort() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$this->assertEqual('Sep',$Textual->prevMonthName('short')); |
} |
function testThisMonthNameShort() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$this->assertEqual('Oct',$Textual->thisMonthName('short')); |
} |
function testNextMonthNameShort() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$this->assertEqual('Nov',$Textual->nextMonthName('short')); |
} |
function testThisDayNameShort() { |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$this->assertEqual('Wed',$Textual->thisDayName('short')); |
} |
function testOrderedWeekdaysShort() { |
$weekdayNames = array( |
0=>'Sun', |
1=>'Mon', |
2=>'Tue', |
3=>'Wed', |
4=>'Thu', |
5=>'Fri', |
6=>'Sat', |
); |
$Textual = new Calendar_Decorator_Textual($this->mockcal); |
$this->assertEqual($weekdayNames,$Textual->orderedWeekdays('short')); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfDecoratorTextual(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/all_tests.php |
---|
New file |
0,0 → 1,34 |
<?php |
// $Id: all_tests.php,v 1.2 2004/08/16 08:55:24 hfuecks Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
define("TEST_RUNNING", true); |
require_once('./calendar_tests.php'); |
require_once('./calendar_tabular_tests.php'); |
require_once('./validator_tests.php'); |
require_once('./calendar_engine_tests.php'); |
require_once('./calendar_engine_tests.php'); |
require_once('./table_helper_tests.php'); |
require_once('./decorator_tests.php'); |
require_once('./util_tests.php'); |
class AllTests extends GroupTest { |
function AllTests() { |
$this->GroupTest('All PEAR::Calendar Tests'); |
$this->AddTestCase(new CalendarTests()); |
$this->AddTestCase(new CalendarTabularTests()); |
$this->AddTestCase(new ValidatorTests()); |
$this->AddTestCase(new CalendarEngineTests()); |
$this->AddTestCase(new TableHelperTests()); |
$this->AddTestCase(new DecoratorTests()); |
$this->AddTestCase(new UtilTests()); |
} |
} |
$test = &new AllTests(); |
$test->run(new HtmlReporter()); |
?> |
/trunk/classes/pear/Calendar/tests/simple_include.php |
---|
New file |
0,0 → 1,10 |
<?php |
// $Id: simple_include.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
if (!defined('SIMPLE_TEST')) { |
define('SIMPLE_TEST', '../../../simpletest/'); |
} |
require_once(SIMPLE_TEST . 'unit_tester.php'); |
require_once(SIMPLE_TEST . 'reporter.php'); |
require_once(SIMPLE_TEST . 'mock_objects.php'); |
?> |
/trunk/classes/pear/Calendar/tests/validator_error_test.php |
---|
New file |
0,0 → 1,34 |
<?php |
// $Id: validator_error_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
class TestOfValidationError extends UnitTestCase { |
var $vError; |
function TestOfValidationError() { |
$this->UnitTestCase('Test of Validation Error'); |
} |
function setUp() { |
$this->vError = new Calendar_Validation_Error('foo',20,'bar'); |
} |
function testGetUnit() { |
$this->assertEqual($this->vError->getUnit(),'foo'); |
} |
function testGetValue() { |
$this->assertEqual($this->vError->getValue(),20); |
} |
function testGetMessage() { |
$this->assertEqual($this->vError->getMessage(),'bar'); |
} |
function testToString() { |
$this->assertEqual($this->vError->toString(),'foo = 20 [bar]'); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfValidationError(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/year_test.php |
---|
New file |
0,0 → 1,142 |
<?php |
// $Id: year_test.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
require_once('./calendar_test.php'); |
class TestOfYear extends TestOfCalendar { |
function TestOfYear() { |
$this->UnitTestCase('Test of Year'); |
} |
function setUp() { |
$this->cal = new Calendar_Year(2003); |
} |
function testPrevYear_Object() { |
$this->assertEqual(new Calendar_Year(2002), $this->cal->prevYear('object')); |
} |
function testThisYear_Object() { |
$this->assertEqual(new Calendar_Year(2003), $this->cal->thisYear('object')); |
} |
function testPrevMonth () { |
$this->assertEqual(12,$this->cal->prevMonth()); |
} |
function testPrevMonth_Array () { |
$this->assertEqual( |
array( |
'year' => 2002, |
'month' => 12, |
'day' => 1, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevMonth('array')); |
} |
function testThisMonth () { |
$this->assertEqual(1,$this->cal->thisMonth()); |
} |
function testNextMonth () { |
$this->assertEqual(2,$this->cal->nextMonth()); |
} |
function testPrevDay () { |
$this->assertEqual(31,$this->cal->prevDay()); |
} |
function testPrevDay_Array () { |
$this->assertEqual( |
array( |
'year' => 2002, |
'month' => 12, |
'day' => 31, |
'hour' => 0, |
'minute' => 0, |
'second' => 0), |
$this->cal->prevDay('array')); |
} |
function testThisDay () { |
$this->assertEqual(1,$this->cal->thisDay()); |
} |
function testNextDay () { |
$this->assertEqual(2,$this->cal->nextDay()); |
} |
function testPrevHour () { |
$this->assertEqual(23,$this->cal->prevHour()); |
} |
function testThisHour () { |
$this->assertEqual(0,$this->cal->thisHour()); |
} |
function testNextHour () { |
$this->assertEqual(1,$this->cal->nextHour()); |
} |
function testPrevMinute () { |
$this->assertEqual(59,$this->cal->prevMinute()); |
} |
function testThisMinute () { |
$this->assertEqual(0,$this->cal->thisMinute()); |
} |
function testNextMinute () { |
$this->assertEqual(1,$this->cal->nextMinute()); |
} |
function testPrevSecond () { |
$this->assertEqual(59,$this->cal->prevSecond()); |
} |
function testThisSecond () { |
$this->assertEqual(0,$this->cal->thisSecond()); |
} |
function testNextSecond () { |
$this->assertEqual(1,$this->cal->nextSecond()); |
} |
function testGetTimeStamp() { |
$stamp = mktime(0,0,0,1,1,2003); |
$this->assertEqual($stamp,$this->cal->getTimeStamp()); |
} |
} |
class TestOfYearBuild extends TestOfYear { |
function TestOfYearBuild() { |
$this->UnitTestCase('Test of Year::build()'); |
} |
function testSize() { |
$this->cal->build(); |
$this->assertEqual(12,$this->cal->size()); |
} |
function testFetch() { |
$this->cal->build(); |
$i=0; |
while ( $Child = $this->cal->fetch() ) { |
$i++; |
} |
$this->assertEqual(12,$i); |
} |
function testFetchAll() { |
$this->cal->build(); |
$children = array(); |
$i = 1; |
while ( $Child = $this->cal->fetch() ) { |
$children[$i]=$Child; |
$i++; |
} |
$this->assertEqual($children,$this->cal->fetchAll()); |
} |
function testSelection() { |
require_once(CALENDAR_ROOT . 'Month.php'); |
$selection = array(new Calendar_Month(2003,10)); |
$this->cal->build($selection); |
$i = 1; |
while ( $Child = $this->cal->fetch() ) { |
if ( $i == 10 ) |
break; |
$i++; |
} |
$this->assertTrue($Child->isSelected()); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TestOfYear(); |
$test->run(new HtmlReporter()); |
$test = &new TestOfYearBuild(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/decorator_tests.php |
---|
New file |
0,0 → 1,21 |
<?php |
// $Id: decorator_tests.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
class DecoratorTests extends GroupTest { |
function DecoratorTests() { |
$this->GroupTest('Decorator Tests'); |
$this->addTestFile('decorator_test.php'); |
$this->addTestFile('decorator_textual_test.php'); |
$this->addTestFile('decorator_uri_test.php'); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new DecoratorTests(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/validator_tests.php |
---|
New file |
0,0 → 1,20 |
<?php |
// $Id: validator_tests.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
class ValidatorTests extends GroupTest { |
function ValidatorTests() { |
$this->GroupTest('Validator Tests'); |
$this->addTestFile('validator_unit_test.php'); |
$this->addTestFile('validator_error_test.php'); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new ValidatorTests(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/tests/README |
---|
New file |
0,0 → 1,7 |
These tests require Simple Test: http://www.lastcraft.com/simple_test.php |
Ideally they would use PEAR::PHPUnit but the current version has bugs and |
lacks alot of the functionality (e.g. Mock Objects) which Simple Test |
provides. |
Modifying the simple_include.php script for your simple test install dir |
/trunk/classes/pear/Calendar/tests/table_helper_tests.php |
---|
New file |
0,0 → 1,19 |
<?php |
// $Id: table_helper_tests.php,v 1.1 2004/05/24 22:25:43 quipo Exp $ |
require_once('simple_include.php'); |
require_once('calendar_include.php'); |
class TableHelperTests extends GroupTest { |
function TableHelperTests() { |
$this->GroupTest('Table Helper Tests'); |
$this->addTestFile('helper_test.php'); |
} |
} |
if (!defined('TEST_RUNNING')) { |
define('TEST_RUNNING', true); |
$test = &new TableHelperTests(); |
$test->run(new HtmlReporter()); |
} |
?> |
/trunk/classes/pear/Calendar/Day.php |
---|
New file |
0,0 → 1,197 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Day.php,v 1.1 2004/05/24 22:25:42 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Day.php,v 1.1 2004/05/24 22:25:42 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar base class |
*/ |
require_once CALENDAR_ROOT.'Calendar.php'; |
/** |
* Represents a Day and builds Hours. |
* <code> |
* require_once 'Calendar'.DIRECTORY_SEPARATOR.'Day.php'; |
* $Day = & new Calendar_Day(2003, 10, 21); // Oct 21st 2003 |
* while ($Hour = & $Day->fetch()) { |
* echo $Hour->thisHour().'<br />'; |
* } |
* </code> |
* @package Calendar |
* @access public |
*/ |
class Calendar_Day extends Calendar |
{ |
/** |
* Marks the Day at the beginning of a week |
* @access private |
* @var boolean |
*/ |
var $first = false; |
/** |
* Marks the Day at the end of a week |
* @access private |
* @var boolean |
*/ |
var $last = false; |
/** |
* Used for tabular calendars |
* @access private |
* @var boolean |
*/ |
var $empty = false; |
/** |
* Constructs Calendar_Day |
* @param int year e.g. 2003 |
* @param int month e.g. 8 |
* @param int day e.g. 15 |
* @access public |
*/ |
function Calendar_Day($y, $m, $d) |
{ |
Calendar::Calendar($y, $m, $d); |
} |
/** |
* Builds the Hours of the Day |
* @param array (optional) Caledar_Hour objects representing selected dates |
* @return boolean |
* @access public |
*/ |
function build($sDates = array()) |
{ |
require_once CALENDAR_ROOT.'Hour.php'; |
$hID = $this->cE->getHoursInDay($this->year, $this->month, $this->day); |
for ($i=0; $i < $hID; $i++) { |
$this->children[$i]= |
new Calendar_Hour($this->year, $this->month, $this->day, $i); |
} |
if (count($sDates) > 0) { |
$this->setSelection($sDates); |
} |
return true; |
} |
/** |
* Called from build() |
* @param array |
* @return void |
* @access private |
*/ |
function setSelection($sDates) |
{ |
foreach ($sDates as $sDate) { |
if ($this->year == $sDate->thisYear() |
&& $this->month == $sDate->thisMonth() |
&& $this->day == $sDate->thisDay()) |
{ |
$key = (int)$sDate->thisHour(); |
if (isset($this->children[$key])) { |
$sDate->setSelected(); |
$this->children[$key] = $sDate; |
} |
} |
} |
} |
/** |
* Defines Day object as first in a week |
* Only used by Calendar_Month_Weekdays::build() |
* @param boolean state |
* @return void |
* @access private |
*/ |
function setFirst ($state = true) |
{ |
$this->first = $state; |
} |
/** |
* Defines Day object as last in a week |
* Used only following Calendar_Month_Weekdays::build() |
* @param boolean state |
* @return void |
* @access private |
*/ |
function setLast($state = true) |
{ |
$this->last = $state; |
} |
/** |
* Returns true if Day object is first in a Week |
* Only relevant when Day is created by Calendar_Month_Weekdays::build() |
* @return boolean |
* @access public |
*/ |
function isFirst() { |
return $this->first; |
} |
/** |
* Returns true if Day object is last in a Week |
* Only relevant when Day is created by Calendar_Month_Weekdays::build() |
* @return boolean |
* @access public |
*/ |
function isLast() |
{ |
return $this->last; |
} |
/** |
* Defines Day object as empty |
* Only used by Calendar_Month_Weekdays::build() |
* @param boolean state |
* @return void |
* @access private |
*/ |
function setEmpty ($state = true) |
{ |
$this->empty = $state; |
} |
/** |
* @return boolean |
* @access public |
*/ |
function isEmpty() |
{ |
return $this->empty; |
} |
} |
?> |
/trunk/classes/pear/Calendar/Hour.php |
---|
New file |
0,0 → 1,113 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Hour.php,v 1.1 2004/05/24 22:25:42 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Hour.php,v 1.1 2004/05/24 22:25:42 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar base class |
*/ |
require_once CALENDAR_ROOT.'Calendar.php'; |
/** |
* Represents an Hour and builds Minutes |
* <code> |
* require_once 'Calendar'.DIRECTORY_SEPARATOR.'Hour.php'; |
* $Hour = & new Calendar_Hour(2003, 10, 21, 15); // Oct 21st 2003, 3pm |
* $Hour->build(); // Build Calendar_Minute objects |
* while ($Minute = & $Hour->fetch()) { |
* echo $Minute->thisMinute().'<br />'; |
* } |
* </code> |
* @package Calendar |
* @access public |
*/ |
class Calendar_Hour extends Calendar |
{ |
/** |
* Constructs Calendar_Hour |
* @param int year e.g. 2003 |
* @param int month e.g. 5 |
* @param int day e.g. 11 |
* @param int hour e.g. 13 |
* @access public |
*/ |
function Calendar_Hour($y, $m, $d, $h) |
{ |
Calendar::Calendar($y, $m, $d, $h); |
} |
/** |
* Builds the Minutes in the Hour |
* @param array (optional) Calendar_Minute objects representing selected dates |
* @return boolean |
* @access public |
*/ |
function build($sDates=array()) |
{ |
require_once CALENDAR_ROOT.'Minute.php'; |
$mIH = $this->cE->getMinutesInHour($this->year, $this->month, $this->day, |
$this->hour); |
for ($i=0; $i < $mIH; $i++) { |
$this->children[$i]= |
new Calendar_Minute($this->year, $this->month, $this->day, |
$this->hour, $i); |
} |
if (count($sDates) > 0) { |
$this->setSelection($sDates); |
} |
return true; |
} |
/** |
* Called from build() |
* @param array |
* @return void |
* @access private |
*/ |
function setSelection($sDates) |
{ |
foreach ($sDates as $sDate) { |
if ($this->year == $sDate->thisYear() |
&& $this->month == $sDate->thisMonth() |
&& $this->day == $sDate->thisDay() |
&& $this->hour == $sDate->thisHour()) |
{ |
$key = (int)$sDate->thisMinute(); |
if (isset($this->children[$key])) { |
$sDate->setSelected(); |
$this->children[$key] = $sDate; |
} |
} |
} |
} |
} |
?> |
/trunk/classes/pear/Calendar/Engine/UnixTS.php |
---|
New file |
0,0 → 1,365 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: UnixTS.php,v 1.9 2004/08/20 20:00:55 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: UnixTS.php,v 1.9 2004/08/20 20:00:55 quipo Exp $ |
*/ |
/** |
* Performs calendar calculations based on the PHP date() function and |
* Unix timestamps (using PHP's mktime() function). |
* @package Calendar |
* @access protected |
*/ |
class Calendar_Engine_UnixTS /* implements Calendar_Engine_Interface */ |
{ |
/** |
* Makes sure a given timestamp is only ever parsed once |
* <pre> |
* array ( |
* [0] => year (e.g 2003), |
* [1] => month (e.g 9), |
* [2] => day (e.g 6), |
* [3] => hour (e.g 14), |
* [4] => minute (e.g 34), |
* [5] => second (e.g 45), |
* [6] => num days in month (e.g. 31), |
* [7] => week in year (e.g. 50), |
* [8] => day in week (e.g. 0 for Sunday) |
* ) |
* </pre> |
* Uses a static variable to prevent date() being used twice |
* for a date which is already known |
* @param int Unix timestamp |
* @return array |
* @access protected |
*/ |
function stampCollection($stamp) |
{ |
static $stamps = array(); |
if ( !isset($stamps[$stamp]) ) { |
$date = @date('Y n j H i s t W w',$stamp); |
$stamps[$stamp] = sscanf($date, "%d %d %d %d %d %d %d %d %d"); |
} |
return $stamps[$stamp]; |
} |
/** |
* Returns a numeric year given a timestamp |
* @param int Unix timestamp |
* @return int year (e.g. 2003) |
* @access protected |
*/ |
function stampToYear($stamp) |
{ |
$date = Calendar_Engine_UnixTS::stampCollection($stamp); |
return (int)$date[0]; |
} |
/** |
* Returns a numeric month given a timestamp |
* @param int Unix timestamp |
* @return int month (e.g. 9) |
* @access protected |
*/ |
function stampToMonth($stamp) |
{ |
$date = Calendar_Engine_UnixTS::stampCollection($stamp); |
return (int)$date[1]; |
} |
/** |
* Returns a numeric day given a timestamp |
* @param int Unix timestamp |
* @return int day (e.g. 15) |
* @access protected |
*/ |
function stampToDay($stamp) |
{ |
$date = Calendar_Engine_UnixTS::stampCollection($stamp); |
return (int)$date[2]; |
} |
/** |
* Returns a numeric hour given a timestamp |
* @param int Unix timestamp |
* @return int hour (e.g. 13) |
* @access protected |
*/ |
function stampToHour($stamp) |
{ |
$date = Calendar_Engine_UnixTS::stampCollection($stamp); |
return (int)$date[3]; |
} |
/** |
* Returns a numeric minute given a timestamp |
* @param int Unix timestamp |
* @return int minute (e.g. 34) |
* @access protected |
*/ |
function stampToMinute($stamp) |
{ |
$date = Calendar_Engine_UnixTS::stampCollection($stamp); |
return (int)$date[4]; |
} |
/** |
* Returns a numeric second given a timestamp |
* @param int Unix timestamp |
* @return int second (e.g. 51) |
* @access protected |
*/ |
function stampToSecond($stamp) |
{ |
$date = Calendar_Engine_UnixTS::stampCollection($stamp); |
return (int)$date[5]; |
} |
/** |
* Returns a timestamp |
* @param int year (2003) |
* @param int month (9) |
* @param int day (13) |
* @param int hour (13) |
* @param int minute (34) |
* @param int second (53) |
* @return int Unix timestamp |
* @access protected |
*/ |
function dateToStamp($y, $m, $d, $h=0, $i=0, $s=0) |
{ |
static $dates = array(); |
if ( !isset($dates[$y][$m][$d][$h][$i][$s]) ) { |
$dates[$y][$m][$d][$h][$i][$s] = @mktime($h, $i, $s, $m, $d, $y); |
} |
return $dates[$y][$m][$d][$h][$i][$s]; |
} |
/** |
* The upper limit on years that the Calendar Engine can work with |
* @return int (2037) |
* @access protected |
*/ |
function getMaxYears() |
{ |
return 2037; |
} |
/** |
* The lower limit on years that the Calendar Engine can work with |
* @return int (1970 if it's Windows and 1902 for all other OSs) |
* @access protected |
*/ |
function getMinYears() |
{ |
return $min = strpos(PHP_OS, 'WIN') === false ? 1902 : 1970; |
} |
/** |
* Returns the number of months in a year |
* @return int (12) |
* @access protected |
*/ |
function getMonthsInYear($y=null) |
{ |
return 12; |
} |
/** |
* Returns the number of days in a month, given year and month |
* @param int year (2003) |
* @param int month (9) |
* @return int days in month |
* @access protected |
*/ |
function getDaysInMonth($y, $m) |
{ |
$stamp = Calendar_Engine_UnixTS::dateToStamp($y,$m,1); |
$date = Calendar_Engine_UnixTS::stampCollection($stamp); |
return $date[6]; |
} |
/** |
* Returns numeric representation of the day of the week in a month, |
* given year and month |
* @param int year (2003) |
* @param int month (9) |
* @return int from 0 to 6 |
* @access protected |
*/ |
function getFirstDayInMonth($y, $m) |
{ |
$stamp = Calendar_Engine_UnixTS::dateToStamp($y,$m,1); |
$date = Calendar_Engine_UnixTS::stampCollection($stamp); |
return $date[8]; |
} |
/** |
* Returns the number of days in a week |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int (7) |
* @access protected |
*/ |
function getDaysInWeek($y=NULL, $m=NULL, $d=NULL) |
{ |
return 7; |
} |
/** |
* Returns the number of the week in the year (ISO-8601), given a date |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int week number |
* @access protected |
*/ |
function getWeekNInYear($y, $m, $d) |
{ |
$stamp = Calendar_Engine_UnixTS::dateToStamp($y,$m,$d); |
$date = Calendar_Engine_UnixTS::stampCollection($stamp); |
return $date[7]; |
} |
/** |
* Returns the number of the week in the month, given a date |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @param int first day of the week (default: monday) |
* @return int week number |
* @access protected |
*/ |
function getWeekNInMonth($y, $m, $d, $firstDay=1) |
{ |
$weekEnd = ($firstDay == 0) ? $this->getDaysInWeek()-1 : $firstDay-1; |
$end_of_week = 1; |
while (@date('w', @mktime(0, 0, 0, $m, $end_of_week, $y)) != $weekEnd) { |
++$end_of_week; //find first weekend of the month |
} |
$w = 1; |
while ($d > $end_of_week) { |
++$w; |
$end_of_week += $this->getDaysInWeek(); |
} |
return $w; |
} |
/** |
* Returns the number of weeks in the month |
* @param int year (2003) |
* @param int month (9) |
* @param int first day of the week (default: monday) |
* @return int weeks number |
* @access protected |
*/ |
function getWeeksInMonth($y, $m, $firstDay=1) |
{ |
$FDOM = $this->getFirstDayInMonth($y, $m); |
if ($FDOM == 0) { |
$FDOM = $this->getDaysInWeek(); |
} |
if ($FDOM > $firstDay) { |
$daysInTheFirstWeek = $this->getDaysInWeek() - $FDOM + $firstDay; |
$weeks = 1; |
} else { |
$daysInTheFirstWeek = $firstDay - $FDOM; |
$weeks = 0; |
} |
$daysInTheFirstWeek %= $this->getDaysInWeek(); |
return (int)(ceil(($this->getDaysInMonth($y, $m) - $daysInTheFirstWeek) / |
$this->getDaysInWeek()) + $weeks); |
} |
/** |
* Returns the number of the day of the week (0=sunday, 1=monday...) |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int weekday number |
* @access protected |
*/ |
function getDayOfWeek($y, $m, $d) |
{ |
$stamp = Calendar_Engine_UnixTS::dateToStamp($y,$m,$d); |
$date = Calendar_Engine_UnixTS::stampCollection($stamp); |
return $date[8]; |
} |
/** |
* Returns a list of integer days of the week beginning 0 |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return array (0,1,2,3,4,5,6) 1 = Monday |
* @access protected |
*/ |
function getWeekDays($y=NULL, $m=NULL, $d=NULL) |
{ |
return array(0, 1, 2, 3, 4, 5, 6); |
} |
/** |
* Returns the default first day of the week |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int (default 1 = Monday) |
* @access protected |
*/ |
function getFirstDayOfWeek($y=NULL, $m=NULL, $d=NULL) |
{ |
return 1; |
} |
/** |
* Returns the number of hours in a day |
* @return int (24) |
* @access protected |
*/ |
function getHoursInDay($y=null,$m=null,$d=null) |
{ |
return 24; |
} |
/** |
* Returns the number of minutes in an hour |
* @return int (60) |
* @access protected |
*/ |
function getMinutesInHour($y=null,$m=null,$d=null,$h=null) |
{ |
return 60; |
} |
/** |
* Returns the number of seconds in a minutes |
* @return int (60) |
* @access protected |
*/ |
function getSecondsInMinute($y=null,$m=null,$d=null,$h=null,$i=null) |
{ |
return 60; |
} |
} |
?> |
/trunk/classes/pear/Calendar/Engine/Interface.php |
---|
New file |
0,0 → 1,293 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Interface.php,v 1.5 2004/08/16 12:29:18 hfuecks Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Interface.php,v 1.5 2004/08/16 12:29:18 hfuecks Exp $ |
*/ |
/** |
* The methods the classes implementing the Calendar_Engine must implement. |
* Note this class is not used but simply to help development |
* @package Calendar |
* @access protected |
*/ |
class Calendar_Engine_Interface |
{ |
/** |
* Provides a mechansim to make sure parsing of timestamps |
* into human dates is only performed once per timestamp. |
* Typically called "internally" by methods like stampToYear. |
* Return value can vary, depending on the specific implementation |
* @param int timestamp (depending on implementation) |
* @return mixed |
* @access protected |
*/ |
function stampCollection($stamp) |
{ |
} |
/** |
* Returns a numeric year given a timestamp |
* @param int timestamp (depending on implementation) |
* @return int year (e.g. 2003) |
* @access protected |
*/ |
function stampToYear($stamp) |
{ |
} |
/** |
* Returns a numeric month given a timestamp |
* @param int timestamp (depending on implementation) |
* @return int month (e.g. 9) |
* @access protected |
*/ |
function stampToMonth($stamp) |
{ |
} |
/** |
* Returns a numeric day given a timestamp |
* @param int timestamp (depending on implementation) |
* @return int day (e.g. 15) |
* @access protected |
*/ |
function stampToDay($stamp) |
{ |
} |
/** |
* Returns a numeric hour given a timestamp |
* @param int timestamp (depending on implementation) |
* @return int hour (e.g. 13) |
* @access protected |
*/ |
function stampToHour($stamp) |
{ |
} |
/** |
* Returns a numeric minute given a timestamp |
* @param int timestamp (depending on implementation) |
* @return int minute (e.g. 34) |
* @access protected |
*/ |
function stampToMinute($stamp) |
{ |
} |
/** |
* Returns a numeric second given a timestamp |
* @param int timestamp (depending on implementation) |
* @return int second (e.g. 51) |
* @access protected |
*/ |
function stampToSecond($stamp) |
{ |
} |
/** |
* Returns a timestamp. Can be worth "caching" generated |
* timestamps in a static variable, identified by the |
* params this method accepts, to timestamp will only |
* be calculated once. |
* @param int year (e.g. 2003) |
* @param int month (e.g. 9) |
* @param int day (e.g. 13) |
* @param int hour (e.g. 13) |
* @param int minute (e.g. 34) |
* @param int second (e.g. 53) |
* @return int (depends on implementation) |
* @access protected |
*/ |
function dateToStamp($y,$m,$d,$h,$i,$s) |
{ |
} |
/** |
* The upper limit on years that the Calendar Engine can work with |
* @return int (e.g. 2037) |
* @access protected |
*/ |
function getMaxYears() |
{ |
} |
/** |
* The lower limit on years that the Calendar Engine can work with |
* @return int (e.g 1902) |
* @access protected |
*/ |
function getMinYears() |
{ |
} |
/** |
* Returns the number of months in a year |
* @param int (optional) year to get months for |
* @return int (e.g. 12) |
* @access protected |
*/ |
function getMonthsInYear($y=null) |
{ |
} |
/** |
* Returns the number of days in a month, given year and month |
* @param int year (e.g. 2003) |
* @param int month (e.g. 9) |
* @return int days in month |
* @access protected |
*/ |
function getDaysInMonth($y, $m) |
{ |
} |
/** |
* Returns numeric representation of the day of the week in a month, |
* given year and month |
* @param int year (e.g. 2003) |
* @param int month (e.g. 9) |
* @return int |
* @access protected |
*/ |
function getFirstDayInMonth ($y, $m) |
{ |
} |
/** |
* Returns the number of days in a week |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int (e.g. 7) |
* @access protected |
*/ |
function getDaysInWeek($y=NULL, $m=NULL, $d=NULL) |
{ |
} |
/** |
* Returns the number of the week in the year (ISO-8601), given a date |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int week number |
* @access protected |
*/ |
function getWeekNInYear($y, $m, $d) |
{ |
} |
/** |
* Returns the number of the week in the month, given a date |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @param int first day of the week (default: 1 - monday) |
* @return int week number |
* @access protected |
*/ |
function getWeekNInMonth($y, $m, $d, $firstDay=1) |
{ |
} |
/** |
* Returns the number of weeks in the month |
* @param int year (2003) |
* @param int month (9) |
* @param int first day of the week (default: 1 - monday) |
* @return int weeks number |
* @access protected |
*/ |
function getWeeksInMonth($y, $m) |
{ |
} |
/** |
* Returns the number of the day of the week (0=sunday, 1=monday...) |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int weekday number |
* @access protected |
*/ |
function getDayOfWeek($y, $m, $d) |
{ |
} |
/** |
* Returns the numeric values of the days of the week. |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return array list of numeric values of days in week, beginning 0 |
* @access protected |
*/ |
function getWeekDays($y=NULL, $m=NULL, $d=NULL) |
{ |
} |
/** |
* Returns the default first day of the week as an integer. Must be a |
* member of the array returned from getWeekDays |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int (e.g. 1 for Monday) |
* @see getWeekDays |
* @access protected |
*/ |
function getFirstDayOfWeek($y=NULL, $m=NULL, $d=NULL) |
{ |
} |
/** |
* Returns the number of hours in a day<br> |
* @param int (optional) day to get hours for |
* @return int (e.g. 24) |
* @access protected |
*/ |
function getHoursInDay($y=null,$m=null,$d=null) |
{ |
} |
/** |
* Returns the number of minutes in an hour |
* @param int (optional) hour to get minutes for |
* @return int |
* @access protected |
*/ |
function getMinutesInHour($y=null,$m=null,$d=null,$h=null) |
{ |
} |
/** |
* Returns the number of seconds in a minutes |
* @param int (optional) minute to get seconds for |
* @return int |
* @access protected |
*/ |
function getSecondsInMinute($y=null,$m=null,$d=null,$h=null,$i=null) |
{ |
} |
} |
?> |
/trunk/classes/pear/Calendar/Engine/PearDate.php |
---|
New file |
0,0 → 1,407 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Lorenzo Alberton <l dot alberton at quipo dot it> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: PearDate.php,v 1.8 2004/08/20 20:00:55 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: PearDate.php,v 1.8 2004/08/20 20:00:55 quipo Exp $ |
*/ |
/** |
* Load PEAR::Date class |
*/ |
require_once 'Date.php'; |
/** |
* Performs calendar calculations based on the PEAR::Date class |
* Timestamps are in the ISO-8601 format (YYYY-MM-DD HH:MM:SS) |
* @package Calendar |
* @access protected |
*/ |
class Calendar_Engine_PearDate /* implements Calendar_Engine_Interface */ |
{ |
/** |
* Makes sure a given timestamp is only ever parsed once |
* Uses a static variable to prevent date() being used twice |
* for a date which is already known |
* @param mixed Any timestamp format recognized by Pear::Date |
* @return object Pear::Date object |
* @access protected |
*/ |
function stampCollection($stamp) |
{ |
static $stamps = array(); |
if (!isset($stamps[$stamp])) { |
$stamps[$stamp] = new Date($stamp); |
} |
return $stamps[$stamp]; |
} |
/** |
* Returns a numeric year given a iso-8601 datetime |
* @param string iso-8601 datetime (YYYY-MM-DD HH:MM:SS) |
* @return int year (e.g. 2003) |
* @access protected |
*/ |
function stampToYear($stamp) |
{ |
$date = Calendar_Engine_PearDate::stampCollection($stamp); |
return (int)$date->year; |
} |
/** |
* Returns a numeric month given a iso-8601 datetime |
* @param string iso-8601 datetime (YYYY-MM-DD HH:MM:SS) |
* @return int month (e.g. 9) |
* @access protected |
*/ |
function stampToMonth($stamp) |
{ |
$date = Calendar_Engine_PearDate::stampCollection($stamp); |
return (int)$date->month; |
} |
/** |
* Returns a numeric day given a iso-8601 datetime |
* @param string iso-8601 datetime (YYYY-MM-DD HH:MM:SS) |
* @return int day (e.g. 15) |
* @access protected |
*/ |
function stampToDay($stamp) |
{ |
$date = Calendar_Engine_PearDate::stampCollection($stamp); |
return (int)$date->day; |
} |
/** |
* Returns a numeric hour given a iso-8601 datetime |
* @param string iso-8601 datetime (YYYY-MM-DD HH:MM:SS) |
* @return int hour (e.g. 13) |
* @access protected |
*/ |
function stampToHour($stamp) |
{ |
$date = Calendar_Engine_PearDate::stampCollection($stamp); |
return (int)$date->hour; |
} |
/** |
* Returns a numeric minute given a iso-8601 datetime |
* @param string iso-8601 datetime (YYYY-MM-DD HH:MM:SS) |
* @return int minute (e.g. 34) |
* @access protected |
*/ |
function stampToMinute($stamp) |
{ |
$date = Calendar_Engine_PearDate::stampCollection($stamp); |
return (int)$date->minute; |
} |
/** |
* Returns a numeric second given a iso-8601 datetime |
* @param string iso-8601 datetime (YYYY-MM-DD HH:MM:SS) |
* @return int second (e.g. 51) |
* @access protected |
*/ |
function stampToSecond($stamp) |
{ |
$date = Calendar_Engine_PearDate::stampCollection($stamp); |
return (int)$date->second; |
} |
/** |
* Returns a iso-8601 datetime |
* @param int year (2003) |
* @param int month (9) |
* @param int day (13) |
* @param int hour (13) |
* @param int minute (34) |
* @param int second (53) |
* @return string iso-8601 datetime |
* @access protected |
*/ |
function dateToStamp($y, $m, $d, $h=0, $i=0, $s=0) |
{ |
$r = array(); |
Calendar_Engine_PearDate::adjustDate($y, $m, $d, $h, $i, $s); |
$key = $y.$m.$d.$h.$i.$s; |
if (!isset($r[$key])) { |
$r[$key] = sprintf("%04d-%02d-%02d %02d:%02d:%02d", |
$y, $m, $d, $h, $i, $s); |
} |
return $r[$key]; |
} |
/** |
* Set the correct date values (useful for math operations on dates) |
* @param int year (2003) |
* @param int month (9) |
* @param int day (13) |
* @param int hour (13) |
* @param int minute (34) |
* @param int second (53) |
* @access protected |
*/ |
function adjustDate(&$y, &$m, &$d, &$h, &$i, &$s) |
{ |
if ($s < 0) { |
$m -= floor($s / 60); |
$s = -$s % 60; |
} |
if ($s > 60) { |
$m += floor($s / 60); |
$s %= 60; |
} |
if ($i < 0) { |
$h -= floor($i / 60); |
$i = -$i % 60; |
} |
if ($i > 60) { |
$h += floor($i / 60); |
$i %= 60; |
} |
if ($h < 0) { |
$d -= floor($h / 24); |
$h = -$h % 24; |
} |
if ($h > 24) { |
$d += floor($h / 24); |
$h %= 24; |
} |
for(; $m < 1; $y--, $m+=12); |
for(; $m > 12; $y++, $m-=12); |
while ($d < 1) { |
if ($m > 1) { |
$m--; |
} else { |
$m = 12; |
$y--; |
} |
$d += Date_Calc::daysInMonth($m, $y); |
} |
for ($max_days = Date_Calc::daysInMonth($m, $y); $d > $max_days; ) { |
$d -= $max_days; |
if ($m < 12) { |
$m++; |
} else { |
$m = 1; |
$y++; |
} |
} |
} |
/** |
* The upper limit on years that the Calendar Engine can work with |
* @return int 9999 |
* @access protected |
*/ |
function getMaxYears() |
{ |
return 9999; |
} |
/** |
* The lower limit on years that the Calendar Engine can work with |
* @return int 0 |
* @access protected |
*/ |
function getMinYears() |
{ |
return 0; |
} |
/** |
* Returns the number of months in a year |
* @return int (12) |
* @access protected |
*/ |
function getMonthsInYear($y=null) |
{ |
return 12; |
} |
/** |
* Returns the number of days in a month, given year and month |
* @param int year (2003) |
* @param int month (9) |
* @return int days in month |
* @access protected |
*/ |
function getDaysInMonth($y, $m) |
{ |
return (int)Date_Calc::daysInMonth($m, $y); |
} |
/** |
* Returns numeric representation of the day of the week in a month, |
* given year and month |
* @param int year (2003) |
* @param int month (9) |
* @return int from 0 to 7 |
* @access protected |
*/ |
function getFirstDayInMonth($y, $m) |
{ |
return (int)Date_Calc::dayOfWeek(1, $m, $y); |
} |
/** |
* Returns the number of days in a week |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int (7) |
* @access protected |
*/ |
function getDaysInWeek($y=NULL, $m=NULL, $d=NULL) |
{ |
return 7; |
} |
/** |
* Returns the number of the week in the year (ISO-8601), given a date |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int week number |
* @access protected |
*/ |
function getWeekNInYear($y, $m, $d) |
{ |
return Date_Calc::weekOfYear($d, $m, $y); //beware, Date_Calc doesn't follow ISO-8601 standard! |
} |
/** |
* Returns the number of the week in the month, given a date |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @param int first day of the week (default: monday) |
* @return int week number |
* @access protected |
*/ |
function getWeekNInMonth($y, $m, $d, $firstDay=1) |
{ |
$weekEnd = ($firstDay == 0) ? $this->getDaysInWeek()-1 : $firstDay-1; |
$end_of_week = (int)Date_Calc::nextDayOfWeek($weekEnd, 1, $m, $y, '%e', true); |
$w = 1; |
while ($d > $end_of_week) { |
++$w; |
$end_of_week += $this->getDaysInWeek(); |
} |
return $w; |
} |
/** |
* Returns the number of weeks in the month |
* @param int year (2003) |
* @param int month (9) |
* @param int first day of the week (default: monday) |
* @return int weeks number |
* @access protected |
*/ |
function getWeeksInMonth($y, $m, $firstDay=1) |
{ |
$FDOM = Date_Calc::firstOfMonthWeekday($m, $y); |
if ($FDOM == 0) { |
$FDOM = $this->getDaysInWeek(); |
} |
if ($FDOM > $firstDay) { |
$daysInTheFirstWeek = $this->getDaysInWeek() - $FDOM + $firstDay; |
$weeks = 1; |
} else { |
$daysInTheFirstWeek = $firstDay - $FDOM; |
$weeks = 0; |
} |
$daysInTheFirstWeek %= $this->getDaysInWeek(); |
return (int)(ceil(($this->getDaysInMonth($y, $m) - $daysInTheFirstWeek) / |
$this->getDaysInWeek()) + $weeks); |
} |
/** |
* Returns the number of the day of the week (0=sunday, 1=monday...) |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int weekday number |
* @access protected |
*/ |
function getDayOfWeek($y, $m, $d) |
{ |
return Date_Calc::dayOfWeek($d, $m, $y); |
} |
/** |
* Returns a list of integer days of the week beginning 0 |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return array (0, 1, 2, 3, 4, 5, 6) 1 = Monday |
* @access protected |
*/ |
function getWeekDays($y=NULL, $m=NULL, $d=NULL) |
{ |
return array(0, 1, 2, 3, 4, 5, 6); |
} |
/** |
* Returns the default first day of the week |
* @param int year (2003) |
* @param int month (9) |
* @param int day (4) |
* @return int (default 1 = Monday) |
* @access protected |
*/ |
function getFirstDayOfWeek($y=NULL, $m=NULL, $d=NULL) |
{ |
return 1; |
} |
/** |
* Returns the number of hours in a day |
* @return int (24) |
* @access protected |
*/ |
function getHoursInDay($y=null,$m=null,$d=null) |
{ |
return 24; |
} |
/** |
* Returns the number of minutes in an hour |
* @return int (60) |
* @access protected |
*/ |
function getMinutesInHour($y=null,$m=null,$d=null,$h=null) |
{ |
return 60; |
} |
/** |
* Returns the number of seconds in a minutes |
* @return int (60) |
* @access protected |
*/ |
function getSecondsInMinute($y=null,$m=null,$d=null,$h=null,$i=null) |
{ |
return 60; |
} |
} |
?> |
/trunk/classes/pear/Calendar/Decorator.php |
---|
New file |
0,0 → 1,558 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Decorator.php,v 1.3 2005/10/22 10:29:46 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Decorator.php,v 1.3 2005/10/22 10:29:46 quipo Exp $ |
*/ |
/** |
* Decorates any calendar class. |
* Create a subclass of this class for your own "decoration". |
* Used for "selections" |
* <code> |
* class DayDecorator extends Calendar_Decorator |
* { |
* function thisDay($format = 'int') |
* { |
.* $day = parent::thisDay('timestamp'); |
.* return date('D', $day); |
* } |
* } |
* $Day = & new Calendar_Day(2003, 10, 25); |
* $DayDecorator = & new DayDecorator($Day); |
* echo $DayDecorator->thisDay(); // Outputs "Sat" |
* </code> |
* @abstract |
* @package Calendar |
*/ |
class Calendar_Decorator |
{ |
/** |
* Subclass of Calendar being decorated |
* @var object |
* @access private |
*/ |
var $calendar; |
/** |
* Constructs the Calendar_Decorator |
* @param object subclass to Calendar to decorate |
*/ |
function Calendar_Decorator(& $calendar) |
{ |
$this->calendar = & $calendar; |
} |
/** |
* Defines the calendar by a Unix timestamp, replacing values |
* passed to the constructor |
* @param int Unix timestamp |
* @return void |
* @access public |
*/ |
function setTimestamp($ts) |
{ |
$this->calendar->setTimestamp($ts); |
} |
/** |
* Returns a timestamp from the current date / time values. Format of |
* timestamp depends on Calendar_Engine implementation being used |
* @return int timestamp |
* @access public |
*/ |
function getTimestamp() |
{ |
return $this->calendar->getTimeStamp(); |
} |
/** |
* Defines calendar object as selected (e.g. for today) |
* @param boolean state whether Calendar subclass |
* @return void |
* @access public |
*/ |
function setSelected($state = true) |
{ |
$this->calendar->setSelected($state = true); |
} |
/** |
* True if the calendar subclass object is selected (e.g. today) |
* @return boolean |
* @access public |
*/ |
function isSelected() |
{ |
return $this->calendar->isSelected(); |
} |
/** |
* Adjusts the date (helper method) |
* @return void |
* @access public |
*/ |
function adjust() |
{ |
$this->calendar->adjust(); |
} |
/** |
* Returns the date as an associative array (helper method) |
* @param mixed timestamp (leave empty for current timestamp) |
* @return array |
* @access public |
*/ |
function toArray($stamp=null) |
{ |
return $this->calendar->toArray($stamp); |
} |
/** |
* Returns the value as an associative array (helper method) |
* @param string type of date object that return value represents |
* @param string $format ['int' | 'array' | 'timestamp' | 'object'] |
* @param mixed timestamp (depending on Calendar engine being used) |
* @param int integer default value (i.e. give me the answer quick) |
* @return mixed |
* @access private |
*/ |
function returnValue($returnType, $format, $stamp, $default) |
{ |
return $this->calendar->returnValue($returnType, $format, $stamp, $default); |
} |
/** |
* Defines Day object as first in a week |
* Only used by Calendar_Month_Weekdays::build() |
* @param boolean state |
* @return void |
* @access private |
*/ |
function setFirst ($state = true) |
{ |
if ( method_exists($this->calendar,'setFirst') ) { |
$this->calendar->setFirst($state); |
} |
} |
/** |
* Defines Day object as last in a week |
* Used only following Calendar_Month_Weekdays::build() |
* @param boolean state |
* @return void |
* @access private |
*/ |
function setLast($state = true) |
{ |
if ( method_exists($this->calendar,'setLast') ) { |
$this->calendar->setLast($state); |
} |
} |
/** |
* Returns true if Day object is first in a Week |
* Only relevant when Day is created by Calendar_Month_Weekdays::build() |
* @return boolean |
* @access public |
*/ |
function isFirst() { |
if ( method_exists($this->calendar,'isFirst') ) { |
return $this->calendar->isFirst(); |
} |
} |
/** |
* Returns true if Day object is last in a Week |
* Only relevant when Day is created by Calendar_Month_Weekdays::build() |
* @return boolean |
* @access public |
*/ |
function isLast() |
{ |
if ( method_exists($this->calendar,'isLast') ) { |
return $this->calendar->isLast(); |
} |
} |
/** |
* Defines Day object as empty |
* Only used by Calendar_Month_Weekdays::build() |
* @param boolean state |
* @return void |
* @access private |
*/ |
function setEmpty ($state = true) |
{ |
if ( method_exists($this->calendar,'setEmpty') ) { |
$this->calendar->setEmpty($state); |
} |
} |
/** |
* @return boolean |
* @access public |
*/ |
function isEmpty() |
{ |
if ( method_exists($this->calendar,'isEmpty') ) { |
return $this->calendar->isEmpty(); |
} |
} |
/** |
* Build the children |
* @param array containing Calendar objects to select (optional) |
* @return boolean |
* @access public |
* @abstract |
*/ |
function build($sDates = array()) |
{ |
$this->calendar->build($sDates); |
} |
/** |
* Iterator method for fetching child Calendar subclass objects |
* (e.g. a minute from an hour object). On reaching the end of |
* the collection, returns false and resets the collection for |
* further iteratations. |
* @return mixed either an object subclass of Calendar or false |
* @access public |
*/ |
function fetch() |
{ |
return $this->calendar->fetch(); |
} |
/** |
* Fetches all child from the current collection of children |
* @return array |
* @access public |
*/ |
function fetchAll() |
{ |
return $this->calendar->fetchAll(); |
} |
/** |
* Get the number Calendar subclass objects stored in the internal |
* collection. |
* @return int |
* @access public |
*/ |
function size() |
{ |
return $this->calendar->size(); |
} |
/** |
* Determine whether this date is valid, with the bounds determined by |
* the Calendar_Engine. The call is passed on to |
* Calendar_Validator::isValid |
* @return boolean |
* @access public |
*/ |
function isValid() |
{ |
return $this->calendar->isValid(); |
} |
/** |
* Returns an instance of Calendar_Validator |
* @return Calendar_Validator |
* @access public |
*/ |
function & getValidator() |
{ |
$validator = $this->calendar->getValidator(); |
return $validator; |
} |
/** |
* Returns a reference to the current Calendar_Engine being used. Useful |
* for Calendar_Table_Helper and Calendar_Validator |
* @return object implementing Calendar_Engine_Inteface |
* @access private |
*/ |
function & getEngine() |
{ |
return $this->calendar->getEngine(); |
} |
/** |
* Returns the value for the previous year |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 2002 or timestamp |
* @access public |
*/ |
function prevYear($format = 'int') |
{ |
return $this->calendar->prevYear($format); |
} |
/** |
* Returns the value for this year |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 2003 or timestamp |
* @access public |
*/ |
function thisYear($format = 'int') |
{ |
return $this->calendar->thisYear($format); |
} |
/** |
* Returns the value for next year |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 2004 or timestamp |
* @access public |
*/ |
function nextYear($format = 'int') |
{ |
return $this->calendar->nextYear($format); |
} |
/** |
* Returns the value for the previous month |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 4 or Unix timestamp |
* @access public |
*/ |
function prevMonth($format = 'int') |
{ |
return $this->calendar->prevMonth($format); |
} |
/** |
* Returns the value for this month |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 5 or timestamp |
* @access public |
*/ |
function thisMonth($format = 'int') |
{ |
return $this->calendar->thisMonth($format); |
} |
/** |
* Returns the value for next month |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 6 or timestamp |
* @access public |
*/ |
function nextMonth($format = 'int') |
{ |
return $this->calendar->nextMonth($format); |
} |
/** |
* Returns the value for the previous week |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 4 or Unix timestamp |
* @access public |
*/ |
function prevWeek($format = 'n_in_month') |
{ |
if ( method_exists($this->calendar,'prevWeek') ) { |
return $this->calendar->prevWeek($format); |
} else { |
require_once 'PEAR.php'; |
PEAR::raiseError( |
'Cannot call prevWeek on Calendar object of type: '. |
get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, |
E_USER_NOTICE, 'Calendar_Decorator::prevWeek()'); |
return false; |
} |
} |
/** |
* Returns the value for this week |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 5 or timestamp |
* @access public |
*/ |
function thisWeek($format = 'n_in_month') |
{ |
if ( method_exists($this->calendar,'thisWeek') ) { |
return $this->calendar->thisWeek($format); |
} else { |
require_once 'PEAR.php'; |
PEAR::raiseError( |
'Cannot call thisWeek on Calendar object of type: '. |
get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, |
E_USER_NOTICE, 'Calendar_Decorator::thisWeek()'); |
return false; |
} |
} |
/** |
* Returns the value for next week |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 6 or timestamp |
* @access public |
*/ |
function nextWeek($format = 'n_in_month') |
{ |
if ( method_exists($this->calendar,'nextWeek') ) { |
return $this->calendar->nextWeek($format); |
} else { |
require_once 'PEAR.php'; |
PEAR::raiseError( |
'Cannot call thisWeek on Calendar object of type: '. |
get_class($this->calendar), 133, PEAR_ERROR_TRIGGER, |
E_USER_NOTICE, 'Calendar_Decorator::nextWeek()'); |
return false; |
} |
} |
/** |
* Returns the value for the previous day |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 10 or timestamp |
* @access public |
*/ |
function prevDay($format = 'int') { |
return $this->calendar->prevDay($format); |
} |
/** |
* Returns the value for this day |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 11 or timestamp |
* @access public |
*/ |
function thisDay($format = 'int') |
{ |
return $this->calendar->thisDay($format); |
} |
/** |
* Returns the value for the next day |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 12 or timestamp |
* @access public |
*/ |
function nextDay($format = 'int') |
{ |
return $this->calendar->nextDay($format); |
} |
/** |
* Returns the value for the previous hour |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 13 or timestamp |
* @access public |
*/ |
function prevHour($format = 'int') |
{ |
return $this->calendar->prevHour($format); |
} |
/** |
* Returns the value for this hour |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 14 or timestamp |
* @access public |
*/ |
function thisHour($format = 'int') |
{ |
return $this->calendar->thisHour($format); |
} |
/** |
* Returns the value for the next hour |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 14 or timestamp |
* @access public |
*/ |
function nextHour($format = 'int') |
{ |
return $this->calendar->nextHour($format); |
} |
/** |
* Returns the value for the previous minute |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 23 or timestamp |
* @access public |
*/ |
function prevMinute($format = 'int') |
{ |
return $this->calendar->prevMinute($format); |
} |
/** |
* Returns the value for this minute |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 24 or timestamp |
* @access public |
*/ |
function thisMinute($format = 'int') |
{ |
return $this->calendar->thisMinute($format); |
} |
/** |
* Returns the value for the next minute |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 25 or timestamp |
* @access public |
*/ |
function nextMinute($format = 'int') |
{ |
return $this->calendar->nextMinute($format); |
} |
/** |
* Returns the value for the previous second |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 43 or timestamp |
* @access public |
*/ |
function prevSecond($format = 'int') |
{ |
return $this->calendar->prevSecond($format); |
} |
/** |
* Returns the value for this second |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 44 or timestamp |
* @access public |
*/ |
function thisSecond($format = 'int') |
{ |
return $this->calendar->thisSecond($format); |
} |
/** |
* Returns the value for the next second |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 45 or timestamp |
* @access public |
*/ |
function nextSecond($format = 'int') |
{ |
return $this->calendar->nextSecond($format); |
} |
} |
?> |
/trunk/classes/pear/Calendar/Month.php |
---|
New file |
0,0 → 1,114 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Month.php,v 1.3 2005/10/22 10:10:26 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Month.php,v 1.3 2005/10/22 10:10:26 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar base class |
*/ |
require_once CALENDAR_ROOT.'Calendar.php'; |
/** |
* Represents a Month and builds Days |
* <code> |
* require_once 'Calendar/Month.php'; |
* $Month = & new Calendar_Month(2003, 10); // Oct 2003 |
* $Month->build(); // Build Calendar_Day objects |
* while ($Day = & $Month->fetch()) { |
* echo $Day->thisDay().'<br />'; |
* } |
* </code> |
* @package Calendar |
* @access public |
*/ |
class Calendar_Month extends Calendar |
{ |
/** |
* Constructs Calendar_Month |
* @param int $y year e.g. 2003 |
* @param int $m month e.g. 5 |
* @param int $firstDay first day of the week [optional] |
* @access public |
*/ |
function Calendar_Month($y, $m, $firstDay=null) |
{ |
Calendar::Calendar($y, $m); |
$this->firstDay = $this->defineFirstDayOfWeek($firstDay); |
} |
/** |
* Builds Day objects for this Month. Creates as many Calendar_Day objects |
* as there are days in the month |
* @param array (optional) Calendar_Day objects representing selected dates |
* @return boolean |
* @access public |
*/ |
function build($sDates=array()) |
{ |
require_once CALENDAR_ROOT.'Day.php'; |
$daysInMonth = $this->cE->getDaysInMonth($this->year, $this->month); |
for ($i=1; $i<=$daysInMonth; $i++) { |
$this->children[$i] = new Calendar_Day($this->year, $this->month, $i); |
} |
if (count($sDates) > 0) { |
$this->setSelection($sDates); |
} |
return true; |
} |
/** |
* Called from build() |
* @param array |
* @return void |
* @access private |
*/ |
function setSelection($sDates) |
{ |
foreach ($sDates as $sDate) { |
if ($this->year == $sDate->thisYear() |
&& $this->month == $sDate->thisMonth() |
) { |
$key = $sDate->thisDay(); |
if (isset($this->children[$key])) { |
$sDate->setSelected(); |
$class = strtolower(get_class($sDate)); |
if ($class == 'calendar_day' || $class == 'calendar_decorator') { |
$sDate->setFirst($this->children[$key]->isFirst()); |
$sDate->setLast($this->children[$key]->isLast()); |
} |
$this->children[$key] = $sDate; |
} |
} |
} |
} |
} |
?> |
/trunk/classes/pear/Calendar/Validator.php |
---|
New file |
0,0 → 1,335 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Validator.php,v 1.1 2004/05/24 22:25:42 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Validator.php,v 1.1 2004/05/24 22:25:42 quipo Exp $ |
*/ |
/** |
* Validation Error Messages |
*/ |
if (!defined('CALENDAR_VALUE_TOOSMALL')) { |
define('CALENDAR_VALUE_TOOSMALL', 'Too small: min = '); |
} |
if (!defined('CALENDAR_VALUE_TOOLARGE')) { |
define('CALENDAR_VALUE_TOOLARGE', 'Too large: max = '); |
} |
/** |
* Used to validate any given Calendar date object. Instances of this class |
* can be obtained from any data object using the getValidator method |
* @see Calendar::getValidator() |
* @package Calendar |
* @access public |
*/ |
class Calendar_Validator |
{ |
/** |
* Instance of the Calendar date object to validate |
* @var object |
* @access private |
*/ |
var $calendar; |
/** |
* Instance of the Calendar_Engine |
* @var object |
* @access private |
*/ |
var $cE; |
/** |
* Array of errors for validation failures |
* @var array |
* @access private |
*/ |
var $errors = array(); |
/** |
* Constructs Calendar_Validator |
* @param object subclass of Calendar |
* @access public |
*/ |
function Calendar_Validator(& $calendar) |
{ |
$this->calendar = & $calendar; |
$this->cE = & $calendar->getEngine(); |
} |
/** |
* Calls all the other isValidXXX() methods in the validator |
* @return boolean |
* @access public |
*/ |
function isValid() |
{ |
$checks = array('isValidYear', 'isValidMonth', 'isValidDay', |
'isValidHour', 'isValidMinute', 'isValidSecond'); |
$valid = true; |
foreach ($checks as $check) { |
if (!$this->{$check}()) { |
$valid = false; |
} |
} |
return $valid; |
} |
/** |
* Check whether this is a valid year |
* @return boolean |
* @access public |
*/ |
function isValidYear() |
{ |
$y = $this->calendar->thisYear(); |
$min = $this->cE->getMinYears(); |
if ($min > $y) { |
$this->errors[] = new Calendar_Validation_Error( |
'Year', $y, CALENDAR_VALUE_TOOSMALL.$min); |
return false; |
} |
$max = $this->cE->getMaxYears(); |
if ($y > $max) { |
$this->errors[] = new Calendar_Validation_Error( |
'Year', $y, CALENDAR_VALUE_TOOLARGE.$max); |
return false; |
} |
return true; |
} |
/** |
* Check whether this is a valid month |
* @return boolean |
* @access public |
*/ |
function isValidMonth() |
{ |
$m = $this->calendar->thisMonth(); |
$min = 1; |
if ($min > $m) { |
$this->errors[] = new Calendar_Validation_Error( |
'Month', $m, CALENDAR_VALUE_TOOSMALL.$min); |
return false; |
} |
$max = $this->cE->getMonthsInYear($this->calendar->thisYear()); |
if ($m > $max) { |
$this->errors[] = new Calendar_Validation_Error( |
'Month', $m, CALENDAR_VALUE_TOOLARGE.$max); |
return false; |
} |
return true; |
} |
/** |
* Check whether this is a valid day |
* @return boolean |
* @access public |
*/ |
function isValidDay() |
{ |
$d = $this->calendar->thisDay(); |
$min = 1; |
if ($min > $d) { |
$this->errors[] = new Calendar_Validation_Error( |
'Day', $d, CALENDAR_VALUE_TOOSMALL.$min); |
return false; |
} |
$max = $this->cE->getDaysInMonth( |
$this->calendar->thisYear(), $this->calendar->thisMonth()); |
if ($d > $max) { |
$this->errors[] = new Calendar_Validation_Error( |
'Day', $d, CALENDAR_VALUE_TOOLARGE.$max); |
return false; |
} |
return true; |
} |
/** |
* Check whether this is a valid hour |
* @return boolean |
* @access public |
*/ |
function isValidHour() |
{ |
$h = $this->calendar->thisHour(); |
$min = 0; |
if ($min > $h) { |
$this->errors[] = new Calendar_Validation_Error( |
'Hour', $h, CALENDAR_VALUE_TOOSMALL.$min); |
return false; |
} |
$max = ($this->cE->getHoursInDay($this->calendar->thisDay())-1); |
if ($h > $max) { |
$this->errors[] = new Calendar_Validation_Error( |
'Hour', $h, CALENDAR_VALUE_TOOLARGE.$max); |
return false; |
} |
return true; |
} |
/** |
* Check whether this is a valid minute |
* @return boolean |
* @access public |
*/ |
function isValidMinute() |
{ |
$i = $this->calendar->thisMinute(); |
$min = 0; |
if ($min > $i) { |
$this->errors[] = new Calendar_Validation_Error( |
'Minute', $i, CALENDAR_VALUE_TOOSMALL.$min); |
return false; |
} |
$max = ($this->cE->getMinutesInHour($this->calendar->thisHour())-1); |
if ($i > $max) { |
$this->errors[] = new Calendar_Validation_Error( |
'Minute', $i, CALENDAR_VALUE_TOOLARGE.$max); |
return false; |
} |
return true; |
} |
/** |
* Check whether this is a valid second |
* @return boolean |
* @access public |
*/ |
function isValidSecond() |
{ |
$s = $this->calendar->thisSecond(); |
$min = 0; |
if ($min > $s) { |
$this->errors[] = new Calendar_Validation_Error( |
'Second', $s, CALENDAR_VALUE_TOOSMALL.$min); |
return false; |
} |
$max = ($this->cE->getSecondsInMinute($this->calendar->thisMinute())-1); |
if ($s > $max) { |
$this->errors[] = new Calendar_Validation_Error( |
'Second', $s, CALENDAR_VALUE_TOOLARGE.$max); |
return false; |
} |
return true; |
} |
/** |
* Iterates over any validation errors |
* @return mixed either Calendar_Validation_Error or false |
* @access public |
*/ |
function fetch() |
{ |
$error = each ($this->errors); |
if ($error) { |
return $error['value']; |
} else { |
reset($this->errors); |
return false; |
} |
} |
} |
/** |
* For Validation Error messages |
* @see Calendar::fetch() |
* @package Calendar |
* @access public |
*/ |
class Calendar_Validation_Error |
{ |
/** |
* Date unit (e.g. month,hour,second) which failed test |
* @var string |
* @access private |
*/ |
var $unit; |
/** |
* Value of unit which failed test |
* @var int |
* @access private |
*/ |
var $value; |
/** |
* Validation error message |
* @var string |
* @access private |
*/ |
var $message; |
/** |
* Constructs Calendar_Validation_Error |
* @param string Date unit (e.g. month,hour,second) |
* @param int Value of unit which failed test |
* @param string Validation error message |
* @access protected |
*/ |
function Calendar_Validation_Error($unit,$value,$message) |
{ |
$this->unit = $unit; |
$this->value = $value; |
$this->message = $message; |
} |
/** |
* Returns the Date unit |
* @return string |
* @access public |
*/ |
function getUnit() |
{ |
return $this->unit; |
} |
/** |
* Returns the value of the unit |
* @return int |
* @access public |
*/ |
function getValue() |
{ |
return $this->value; |
} |
/** |
* Returns the validation error message |
* @return string |
* @access public |
*/ |
function getMessage() |
{ |
return $this->message; |
} |
/** |
* Returns a string containing the unit, value and error message |
* @return string |
* @access public |
*/ |
function toString () |
{ |
return $this->unit.' = '.$this->value.' ['.$this->message.']'; |
} |
} |
?> |
/trunk/classes/pear/Calendar/Util/Uri.php |
---|
New file |
0,0 → 1,169 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// | Lorenzo Alberton <l dot alberton at quipo dot it> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Uri.php,v 1.1 2004/08/16 09:03:55 hfuecks Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Uri.php,v 1.1 2004/08/16 09:03:55 hfuecks Exp $ |
*/ |
/** |
* Utility to help building HTML links for navigating the calendar<br /> |
* <code> |
* $Day = new Calendar_Day(2003, 10, 23); |
* $Uri = & new Calendar_Util_Uri('year', 'month', 'day'); |
* echo $Uri->prev($Day,'month'); // Displays year=2003&month=10 |
* echo $Uri->prev($Day,'day'); // Displays year=2003&month=10&day=22 |
* $Uri->seperator = '/'; |
* $Uri->scalar = true; |
* echo $Uri->prev($Day,'month'); // Displays 2003/10 |
* echo $Uri->prev($Day,'day'); // Displays 2003/10/22 |
* </code> |
* @package Calendar |
* @access public |
*/ |
class Calendar_Util_Uri |
{ |
/** |
* Uri fragments for year, month, day etc. |
* @var array |
* @access private |
*/ |
var $uris = array(); |
/** |
* String to separate fragments with. |
* Set to just & for HTML. |
* For a scalar URL you might use / as the seperator |
* @var string (default XHTML &) |
* @access public |
*/ |
var $separator = '&'; |
/** |
* To output a "scalar" string - variable names omitted. |
* Used for urls like index.php/2004/8/12 |
* @var boolean (default false) |
* @access public |
*/ |
var $scalar = false; |
/** |
* Constructs Calendar_Decorator_Uri |
* The term "fragment" means <i>name</i> of a calendar GET variables in the URL |
* @param string URI fragment for year |
* @param string (optional) URI fragment for month |
* @param string (optional) URI fragment for day |
* @param string (optional) URI fragment for hour |
* @param string (optional) URI fragment for minute |
* @param string (optional) URI fragment for second |
* @access public |
*/ |
function Calendar_Util_Uri($y, $m=null, $d=null, $h=null, $i=null, $s=null) |
{ |
$this->setFragments($y, $m, $d, $h, $i, $s); |
} |
/** |
* Sets the URI fragment names |
* @param string URI fragment for year |
* @param string (optional) URI fragment for month |
* @param string (optional) URI fragment for day |
* @param string (optional) URI fragment for hour |
* @param string (optional) URI fragment for minute |
* @param string (optional) URI fragment for second |
* @return void |
* @access public |
*/ |
function setFragments($y, $m=null, $d=null, $h=null, $i=null, $s=null) { |
if (!is_null($y)) $this->uris['Year'] = $y; |
if (!is_null($m)) $this->uris['Month'] = $m; |
if (!is_null($d)) $this->uris['Day'] = $d; |
if (!is_null($h)) $this->uris['Hour'] = $h; |
if (!is_null($i)) $this->uris['Minute'] = $i; |
if (!is_null($s)) $this->uris['Second'] = $s; |
} |
/** |
* Gets the URI string for the previous calendar unit |
* @param object subclassed from Calendar e.g. Calendar_Month |
* @param string calendar unit ( must be year, month, week, day, hour, minute or second) |
* @return string |
* @access public |
*/ |
function prev($Calendar, $unit) |
{ |
$method = 'prev'.$unit; |
$stamp = $Calendar->{$method}('timestamp'); |
return $this->buildUriString($Calendar, $method, $stamp); |
} |
/** |
* Gets the URI string for the current calendar unit |
* @param object subclassed from Calendar e.g. Calendar_Month |
* @param string calendar unit ( must be year, month, week, day, hour, minute or second) |
* @return string |
* @access public |
*/ |
function this($Calendar, $unit) |
{ |
$method = 'this'.$unit; |
$stamp = $Calendar->{$method}('timestamp'); |
return $this->buildUriString($Calendar, $method, $stamp); |
} |
/** |
* Gets the URI string for the next calendar unit |
* @param object subclassed from Calendar e.g. Calendar_Month |
* @param string calendar unit ( must be year, month, week, day, hour, minute or second) |
* @return string |
* @access public |
*/ |
function next($Calendar, $unit) |
{ |
$method = 'next'.$unit; |
$stamp = $Calendar->{$method}('timestamp'); |
return $this->buildUriString($Calendar, $method, $stamp); |
} |
/** |
* Build the URI string |
* @param string method substring |
* @param int timestamp |
* @return string build uri string |
* @access private |
*/ |
function buildUriString($Calendar, $method, $stamp) |
{ |
$uriString = ''; |
$cE = & $Calendar->getEngine(); |
$separator = ''; |
foreach ($this->uris as $unit => $uri) { |
$call = 'stampTo'.$unit; |
$uriString .= $separator; |
if (!$this->scalar) $uriString .= $uri.'='; |
$uriString .= $cE->{$call}($stamp); |
$separator = $this->separator; |
} |
return $uriString; |
} |
} |
?> |
/trunk/classes/pear/Calendar/Util/Textual.php |
---|
New file |
0,0 → 1,239 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// | Lorenzo Alberton <l dot alberton at quipo dot it> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Textual.php,v 1.2 2004/08/16 13:13:09 hfuecks Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Textual.php,v 1.2 2004/08/16 13:13:09 hfuecks Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar decorator base class |
*/ |
require_once CALENDAR_ROOT.'Decorator.php'; |
/** |
* Static utlities to help with fetching textual representations of months and |
* days of the week. |
* @package Calendar |
* @access public |
*/ |
class Calendar_Util_Textual |
{ |
/** |
* Returns an array of 12 month names (first index = 1) |
* @param string (optional) format of returned months (one,two,short or long) |
* @return array |
* @access public |
* @static |
*/ |
function monthNames($format='long') |
{ |
$formats = array('one'=>'%b', 'two'=>'%b', 'short'=>'%b', 'long'=>'%B'); |
if (!array_key_exists($format,$formats)) { |
$format = 'long'; |
} |
$months = array(); |
for ($i=1; $i<=12; $i++) { |
$stamp = mktime(0, 0, 0, $i, 1, 2003); |
$month = strftime($formats[$format], $stamp); |
switch($format) { |
case 'one': |
$month = substr($month, 0, 1); |
break; |
case 'two': |
$month = substr($month, 0, 2); |
break; |
} |
$months[$i] = $month; |
} |
return $months; |
} |
/** |
* Returns an array of 7 week day names (first index = 0) |
* @param string (optional) format of returned days (one,two,short or long) |
* @return array |
* @access public |
* @static |
*/ |
function weekdayNames($format='long') |
{ |
$formats = array('one'=>'%a', 'two'=>'%a', 'short'=>'%a', 'long'=>'%A'); |
if (!array_key_exists($format,$formats)) { |
$format = 'long'; |
} |
$days = array(); |
for ($i=0; $i<=6; $i++) { |
$stamp = mktime(0, 0, 0, 11, $i+2, 2003); |
$day = strftime($formats[$format], $stamp); |
switch($format) { |
case 'one': |
$day = substr($day, 0, 1); |
break; |
case 'two': |
$day = substr($day, 0, 2); |
break; |
} |
$days[$i] = $day; |
} |
return $days; |
} |
/** |
* Returns textual representation of the previous month of the decorated calendar object |
* @param object subclass of Calendar e.g. Calendar_Month |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
* @static |
*/ |
function prevMonthName($Calendar, $format='long') |
{ |
$months = Calendar_Util_Textual::monthNames($format); |
return $months[$Calendar->prevMonth()]; |
} |
/** |
* Returns textual representation of the month of the decorated calendar object |
* @param object subclass of Calendar e.g. Calendar_Month |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
* @static |
*/ |
function thisMonthName($Calendar, $format='long') |
{ |
$months = Calendar_Util_Textual::monthNames($format); |
return $months[$Calendar->thisMonth()]; |
} |
/** |
* Returns textual representation of the next month of the decorated calendar object |
* @param object subclass of Calendar e.g. Calendar_Month |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
* @static |
*/ |
function nextMonthName($Calendar, $format='long') |
{ |
$months = Calendar_Util_Textual::monthNames($format); |
return $months[$Calendar->nextMonth()]; |
} |
/** |
* Returns textual representation of the previous day of week of the decorated calendar object |
* <b>Note:</b> Requires PEAR::Date |
* @param object subclass of Calendar e.g. Calendar_Month |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
* @static |
*/ |
function prevDayName($Calendar, $format='long') |
{ |
$days = Calendar_Util_Textual::weekdayNames($format); |
$stamp = $Calendar->prevDay('timestamp'); |
$cE = $Calendar->getEngine(); |
require_once 'Date/Calc.php'; |
$day = Date_Calc::dayOfWeek($cE->stampToDay($stamp), |
$cE->stampToMonth($stamp), $cE->stampToYear($stamp)); |
return $days[$day]; |
} |
/** |
* Returns textual representation of the day of week of the decorated calendar object |
* <b>Note:</b> Requires PEAR::Date |
* @param object subclass of Calendar e.g. Calendar_Month |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
* @static |
*/ |
function thisDayName($Calendar, $format='long') |
{ |
$days = Calendar_Util_Textual::weekdayNames($format); |
require_once 'Date/Calc.php'; |
$day = Date_Calc::dayOfWeek($Calendar->thisDay(), $Calendar->thisMonth(), $Calendar->thisYear()); |
return $days[$day]; |
} |
/** |
* Returns textual representation of the next day of week of the decorated calendar object |
* @param object subclass of Calendar e.g. Calendar_Month |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
* @static |
*/ |
function nextDayName($Calendar, $format='long') |
{ |
$days = Calendar_Util_Textual::weekdayNames($format); |
$stamp = $Calendar->nextDay('timestamp'); |
$cE = $Calendar->getEngine(); |
require_once 'Date/Calc.php'; |
$day = Date_Calc::dayOfWeek($cE->stampToDay($stamp), |
$cE->stampToMonth($stamp), $cE->stampToYear($stamp)); |
return $days[$day]; |
} |
/** |
* Returns the days of the week using the order defined in the decorated |
* calendar object. Only useful for Calendar_Month_Weekdays, Calendar_Month_Weeks |
* and Calendar_Week. Otherwise the returned array will begin on Sunday |
* @param object subclass of Calendar e.g. Calendar_Month |
* @param string (optional) format of returned months (one,two,short or long) |
* @return array ordered array of week day names |
* @access public |
* @static |
*/ |
function orderedWeekdays($Calendar, $format='long') |
{ |
$days = Calendar_Util_Textual::weekdayNames($format); |
// Not so good - need methods to access this information perhaps... |
if (isset($Calendar->tableHelper)) { |
$ordereddays = $Calendar->tableHelper->daysOfWeek; |
} else { |
$ordereddays = array(0, 1, 2, 3, 4, 5, 6); |
} |
$ordereddays = array_flip($ordereddays); |
$i = 0; |
$returndays = array(); |
foreach ($ordereddays as $key => $value) { |
$returndays[$i] = $days[$key]; |
$i++; |
} |
return $returndays; |
} |
} |
?> |
/trunk/classes/pear/Calendar/Week.php |
---|
New file |
0,0 → 1,394 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// | Lorenzo Alberton <l dot alberton at quipo dot it> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Week.php,v 1.7 2005/10/22 10:26:49 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Week.php,v 1.7 2005/10/22 10:26:49 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar base class |
*/ |
require_once CALENDAR_ROOT.'Calendar.php'; |
/** |
* Represents a Week and builds Days in tabular format<br> |
* <code> |
* require_once 'Calendar'.DIRECTORY_SEPARATOR.'Week.php'; |
* $Week = & new Calendar_Week(2003, 10, 1); Oct 2003, 1st tabular week |
* echo '<tr>'; |
* while ($Day = & $Week->fetch()) { |
* if ($Day->isEmpty()) { |
* echo '<td> </td>'; |
* } else { |
* echo '<td>'.$Day->thisDay().'</td>'; |
* } |
* } |
* echo '</tr>'; |
* </code> |
* @package Calendar |
* @access public |
*/ |
class Calendar_Week extends Calendar |
{ |
/** |
* Instance of Calendar_Table_Helper |
* @var Calendar_Table_Helper |
* @access private |
*/ |
var $tableHelper; |
/** |
* Stores the timestamp of the first day of this week |
* @access private |
* @var object |
*/ |
var $thisWeek; |
/** |
* Stores the timestamp of first day of previous week |
* @access private |
* @var object |
*/ |
var $prevWeek; |
/** |
* Stores the timestamp of first day of next week |
* @access private |
* @var object |
*/ |
var $nextWeek; |
/** |
* Used by build() to set empty days |
* @access private |
* @var boolean |
*/ |
var $firstWeek = false; |
/** |
* Used by build() to set empty days |
* @access private |
* @var boolean |
*/ |
var $lastWeek = false; |
/** |
* First day of the week (0=sunday, 1=monday...) |
* @access private |
* @var boolean |
*/ |
var $firstDay = 1; |
/** |
* Constructs Week |
* @param int year e.g. 2003 |
* @param int month e.g. 5 |
* @param int a day of the desired week |
* @param int (optional) first day of week (e.g. 0 for Sunday, 2 for Tuesday etc.) |
* @access public |
*/ |
function Calendar_Week($y, $m, $d, $firstDay=null) |
{ |
require_once CALENDAR_ROOT.'Table/Helper.php'; |
Calendar::Calendar($y, $m, $d); |
$this->firstDay = $this->defineFirstDayOfWeek($firstDay); |
$this->tableHelper = & new Calendar_Table_Helper($this, $this->firstDay); |
$this->thisWeek = $this->tableHelper->getWeekStart($y, $m, $d, $this->firstDay); |
$this->prevWeek = $this->tableHelper->getWeekStart($y, $m, $d - $this->cE->getDaysInWeek( |
$this->thisYear(), |
$this->thisMonth(), |
$this->thisDay()), $this->firstDay); |
$this->nextWeek = $this->tableHelper->getWeekStart($y, $m, $d + $this->cE->getDaysInWeek( |
$this->thisYear(), |
$this->thisMonth(), |
$this->thisDay()), $this->firstDay); |
} |
/** |
* Defines the calendar by a timestamp (Unix or ISO-8601), replacing values |
* passed to the constructor |
* @param int|string Unix or ISO-8601 timestamp |
* @return void |
* @access public |
*/ |
function setTimestamp($ts) |
{ |
parent::setTimestamp($ts); |
$this->thisWeek = $this->tableHelper->getWeekStart( |
$this->year, $this->month, $this->day, $this->firstDay |
); |
$this->prevWeek = $this->tableHelper->getWeekStart( |
$this->year, $this->month, $this->day - $this->cE->getDaysInWeek( |
$this->thisYear(), |
$this->thisMonth(), |
$this->thisDay()), $this->firstDay |
); |
$this->nextWeek = $this->tableHelper->getWeekStart( |
$this->year, $this->month, $this->day + $this->cE->getDaysInWeek( |
$this->thisYear(), |
$this->thisMonth(), |
$this->thisDay()), $this->firstDay |
); |
} |
/** |
* Builds Calendar_Day objects for this Week |
* @param array (optional) Calendar_Day objects representing selected dates |
* @return boolean |
* @access public |
*/ |
function build($sDates = array()) |
{ |
require_once CALENDAR_ROOT.'Day.php'; |
$year = $this->cE->stampToYear($this->thisWeek); |
$month = $this->cE->stampToMonth($this->thisWeek); |
$day = $this->cE->stampToDay($this->thisWeek); |
$end = $this->cE->getDaysInWeek( |
$this->thisYear(), |
$this->thisMonth(), |
$this->thisDay() |
); |
for ($i=1; $i <= $end; $i++) { |
$stamp = $this->cE->dateToStamp($year, $month, $day++); |
$this->children[$i] = new Calendar_Day( |
$this->cE->stampToYear($stamp), |
$this->cE->stampToMonth($stamp), |
$this->cE->stampToDay($stamp)); |
} |
//set empty days (@see Calendar_Month_Weeks::build()) |
if ($this->firstWeek) { |
$eBefore = $this->tableHelper->getEmptyDaysBefore(); |
for ($i=1; $i <= $eBefore; $i++) { |
$this->children[$i]->setEmpty(); |
} |
} |
if ($this->lastWeek) { |
$eAfter = $this->tableHelper->getEmptyDaysAfterOffset(); |
for ($i = $eAfter+1; $i <= $end; $i++) { |
$this->children[$i]->setEmpty(); |
} |
} |
if (count($sDates) > 0) { |
$this->setSelection($sDates); |
} |
return true; |
} |
/** |
* @param boolean |
* @return void |
* @access private |
*/ |
function setFirst($state=true) |
{ |
$this->firstWeek = $state; |
} |
/** |
* @param boolean |
* @return void |
* @access private |
*/ |
function setLast($state=true) |
{ |
$this->lastWeek = $state; |
} |
/** |
* Called from build() |
* @param array |
* @return void |
* @access private |
*/ |
function setSelection($sDates) |
{ |
foreach ($sDates as $sDate) { |
foreach ($this->children as $key => $child) { |
if ($child->thisDay() == $sDate->thisDay() && |
$child->thisMonth() == $sDate->thisMonth() && |
$child->thisYear() == $sDate->thisYear() |
) { |
$this->children[$key] = $sDate; |
$this->children[$key]->setSelected(); |
} |
} |
} |
reset($this->children); |
} |
/** |
* Gets the value of the previous week, according to the requested format |
* |
* @param string $format ['timestamp' | 'n_in_month' | 'n_in_year' | 'array'] |
* @return mixed |
* @access public |
*/ |
function prevWeek($format = 'n_in_month') |
{ |
switch (strtolower($format)) { |
case 'int': |
case 'n_in_month': |
return ($this->firstWeek) ? null : $this->thisWeek('n_in_month') -1; |
break; |
case 'n_in_year': |
return $this->cE->getWeekNInYear( |
$this->cE->stampToYear($this->prevWeek), |
$this->cE->stampToMonth($this->prevWeek), |
$this->cE->stampToDay($this->prevWeek)); |
break; |
case 'array': |
return $this->toArray($this->prevWeek); |
break; |
case 'object': |
require_once CALENDAR_ROOT.'Factory.php'; |
return Calendar_Factory::createByTimestamp('Week', $this->prevWeek); |
break; |
case 'timestamp': |
default: |
return $this->prevWeek; |
break; |
} |
} |
/** |
* Gets the value of the current week, according to the requested format |
* |
* @param string $format ['timestamp' | 'n_in_month' | 'n_in_year' | 'array'] |
* @return mixed |
* @access public |
*/ |
function thisWeek($format = 'n_in_month') |
{ |
switch (strtolower($format)) { |
case 'int': |
case 'n_in_month': |
if ($this->firstWeek) { |
return 1; |
} |
if ($this->lastWeek) { |
return $this->cE->getWeeksInMonth( |
$this->thisYear(), |
$this->thisMonth(), |
$this->firstDay); |
} |
return $this->cE->getWeekNInMonth( |
$this->thisYear(), |
$this->thisMonth(), |
$this->thisDay(), |
$this->firstDay); |
break; |
case 'n_in_year': |
return $this->cE->getWeekNInYear( |
$this->cE->stampToYear($this->thisWeek), |
$this->cE->stampToMonth($this->thisWeek), |
$this->cE->stampToDay($this->thisWeek)); |
break; |
case 'array': |
return $this->toArray($this->thisWeek); |
break; |
case 'object': |
require_once CALENDAR_ROOT.'Factory.php'; |
return Calendar_Factory::createByTimestamp('Week', $this->thisWeek); |
break; |
case 'timestamp': |
default: |
return $this->thisWeek; |
break; |
} |
} |
/** |
* Gets the value of the following week, according to the requested format |
* |
* @param string $format ['timestamp' | 'n_in_month' | 'n_in_year' | 'array'] |
* @return mixed |
* @access public |
*/ |
function nextWeek($format = 'n_in_month') |
{ |
switch (strtolower($format)) { |
case 'int': |
case 'n_in_month': |
return ($this->lastWeek) ? null : $this->thisWeek('n_in_month') +1; |
break; |
case 'n_in_year': |
return $this->cE->getWeekNInYear( |
$this->cE->stampToYear($this->nextWeek), |
$this->cE->stampToMonth($this->nextWeek), |
$this->cE->stampToDay($this->nextWeek)); |
break; |
case 'array': |
return $this->toArray($this->nextWeek); |
break; |
case 'object': |
require_once CALENDAR_ROOT.'Factory.php'; |
return Calendar_Factory::createByTimestamp('Week', $this->nextWeek); |
break; |
case 'timestamp': |
default: |
return $this->nextWeek; |
break; |
} |
} |
/** |
* Returns the instance of Calendar_Table_Helper. |
* Called from Calendar_Validator::isValidWeek |
* @return Calendar_Table_Helper |
* @access protected |
*/ |
function & getHelper() |
{ |
return $this->tableHelper; |
} |
/** |
* Makes sure theres a value for $this->day |
* @return void |
* @access private |
*/ |
function findFirstDay() |
{ |
if (!count($this->children) > 0) { |
$this->build(); |
foreach ($this->children as $Day) { |
if (!$Day->isEmpty()) { |
$this->day = $Day->thisDay(); |
break; |
} |
} |
} |
} |
} |
?> |
/trunk/classes/pear/Calendar/Decorator/Textual.php |
---|
New file |
0,0 → 1,169 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// | Lorenzo Alberton <l dot alberton at quipo dot it> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Textual.php,v 1.3 2004/08/16 13:02:44 hfuecks Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Textual.php,v 1.3 2004/08/16 13:02:44 hfuecks Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar decorator base class |
*/ |
require_once CALENDAR_ROOT.'Decorator.php'; |
/** |
* Load the Uri utility |
*/ |
require_once CALENDAR_ROOT.'Util'.DIRECTORY_SEPARATOR.'Textual.php'; |
/** |
* Decorator to help with fetching textual representations of months and |
* days of the week. |
* <b>Note:</b> for performance you should prefer Calendar_Util_Textual unless you |
* have a specific need to use a decorator |
* @package Calendar |
* @access public |
*/ |
class Calendar_Decorator_Textual extends Calendar_Decorator |
{ |
/** |
* Constructs Calendar_Decorator_Textual |
* @param object subclass of Calendar |
* @access public |
*/ |
function Calendar_Decorator_Textual(&$Calendar) |
{ |
parent::Calendar_Decorator($Calendar); |
} |
/** |
* Returns an array of 12 month names (first index = 1) |
* @param string (optional) format of returned months (one,two,short or long) |
* @return array |
* @access public |
* @static |
*/ |
function monthNames($format='long') |
{ |
return Calendar_Util_Textual::monthNames($format); |
} |
/** |
* Returns an array of 7 week day names (first index = 0) |
* @param string (optional) format of returned days (one,two,short or long) |
* @return array |
* @access public |
* @static |
*/ |
function weekdayNames($format='long') |
{ |
return Calendar_Util_Textual::weekdayNames($format); |
} |
/** |
* Returns textual representation of the previous month of the decorated calendar object |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
*/ |
function prevMonthName($format='long') |
{ |
return Calendar_Util_Textual::prevMonthName($this->calendar,$format); |
} |
/** |
* Returns textual representation of the month of the decorated calendar object |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
*/ |
function thisMonthName($format='long') |
{ |
return Calendar_Util_Textual::thisMonthName($this->calendar,$format); |
} |
/** |
* Returns textual representation of the next month of the decorated calendar object |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
*/ |
function nextMonthName($format='long') |
{ |
return Calendar_Util_Textual::nextMonthName($this->calendar,$format); |
} |
/** |
* Returns textual representation of the previous day of week of the decorated calendar object |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
*/ |
function prevDayName($format='long') |
{ |
return Calendar_Util_Textual::prevDayName($this->calendar,$format); |
} |
/** |
* Returns textual representation of the day of week of the decorated calendar object |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
*/ |
function thisDayName($format='long') |
{ |
return Calendar_Util_Textual::thisDayName($this->calendar,$format); |
} |
/** |
* Returns textual representation of the next day of week of the decorated calendar object |
* @param string (optional) format of returned months (one,two,short or long) |
* @return string |
* @access public |
*/ |
function nextDayName($format='long') |
{ |
return Calendar_Util_Textual::nextDayName($this->calendar,$format); |
} |
/** |
* Returns the days of the week using the order defined in the decorated |
* calendar object. Only useful for Calendar_Month_Weekdays, Calendar_Month_Weeks |
* and Calendar_Week. Otherwise the returned array will begin on Sunday |
* @param string (optional) format of returned months (one,two,short or long) |
* @return array ordered array of week day names |
* @access public |
*/ |
function orderedWeekdays($format='long') |
{ |
return Calendar_Util_Textual::orderedWeekdays($this->calendar,$format); |
} |
} |
?> |
/trunk/classes/pear/Calendar/Decorator/Weekday.php |
---|
New file |
0,0 → 1,148 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// | Lorenzo Alberton <l dot alberton at quipo dot it> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Weekday.php,v 1.3 2004/08/16 12:25:15 hfuecks Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Weekday.php,v 1.3 2004/08/16 12:25:15 hfuecks Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar decorator base class |
*/ |
require_once CALENDAR_ROOT.'Decorator.php'; |
/** |
* Load a Calendar_Day |
*/ |
require_once CALENDAR_ROOT.'Day.php'; |
/** |
* Decorator for fetching the day of the week |
* <code> |
* $Day = new Calendar_Day(2003, 10, 23); |
* $Weekday = & new Calendar_Decorator_Weekday($Day); |
* $Weekday->setFirstDay(0); // Set first day of week to Sunday (default Mon) |
* echo $Weekday->thisWeekDay(); // Displays 5 - fifth day of week relative to Sun |
* </code> |
* @package Calendar |
* @access public |
*/ |
class Calendar_Decorator_Weekday extends Calendar_Decorator |
{ |
/** |
* First day of week |
* @var int (default = 1 for Monday) |
* @access private |
*/ |
var $firstDay = 1; |
/** |
* Constructs Calendar_Decorator_Weekday |
* @param object subclass of Calendar |
* @access public |
*/ |
function Calendar_Decorator_Weekday(& $Calendar) |
{ |
parent::Calendar_Decorator($Calendar); |
} |
/** |
* Sets the first day of the week (0 = Sunday, 1 = Monday (default) etc) |
* @param int first day of week |
* @return void |
* @access public |
*/ |
function setFirstDay($firstDay) { |
$this->firstDay = (int)$firstDay; |
} |
/** |
* Returns the previous weekday |
* @param string (default = 'int') return value format |
* @return int numeric day of week or timestamp |
* @access public |
*/ |
function prevWeekDay($format = 'int') |
{ |
$ts = $this->calendar->prevDay('timestamp'); |
$Day = new Calendar_Day(2000,1,1); |
$Day->setTimeStamp($ts); |
$day = $this->calendar->cE->getDayOfWeek($Day->thisYear(),$Day->thisMonth(),$Day->thisDay()); |
$day = $this->adjustWeekScale($day); |
return $this->returnValue('Day', $format, $ts, $day); |
} |
/** |
* Returns the current weekday |
* @param string (default = 'int') return value format |
* @return int numeric day of week or timestamp |
* @access public |
*/ |
function thisWeekDay($format = 'int') |
{ |
$ts = $this->calendar->thisDay('timestamp'); |
$day = $this->calendar->cE->getDayOfWeek($this->calendar->year,$this->calendar->month,$this->calendar->day); |
$day = $this->adjustWeekScale($day); |
return $this->returnValue('Day', $format, $ts, $day); |
} |
/** |
* Returns the next weekday |
* @param string (default = 'int') return value format |
* @return int numeric day of week or timestamp |
* @access public |
*/ |
function nextWeekDay($format = 'int') |
{ |
$ts = $this->calendar->nextDay('timestamp'); |
$Day = new Calendar_Day(2000,1,1); |
$Day->setTimeStamp($ts); |
$day = $this->calendar->cE->getDayOfWeek($Day->thisYear(),$Day->thisMonth(),$Day->thisDay()); |
$day = $this->adjustWeekScale($day); |
return $this->returnValue('Day', $format, $ts, $day); |
} |
/** |
* Adjusts the day of the week relative to the first day of the week |
* @param int day of week calendar from Calendar_Engine |
* @return int day of week adjusted to first day |
* @access private |
*/ |
function adjustWeekScale($dayOfWeek) { |
$dayOfWeek = $dayOfWeek - $this->firstDay; |
if ( $dayOfWeek >= 0 ) { |
return $dayOfWeek; |
} else { |
return $this->calendar->cE->getDaysInWeek( |
$this->calendar->year,$this->calendar->month,$this->calendar->day |
) + $dayOfWeek; |
} |
} |
} |
?> |
/trunk/classes/pear/Calendar/Decorator/Uri.php |
---|
New file |
0,0 → 1,151 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// | Lorenzo Alberton <l dot alberton at quipo dot it> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Uri.php,v 1.3 2004/08/16 09:04:20 hfuecks Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Uri.php,v 1.3 2004/08/16 09:04:20 hfuecks Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar decorator base class |
*/ |
require_once CALENDAR_ROOT.'Decorator.php'; |
/** |
* Load the Uri utility |
*/ |
require_once CALENDAR_ROOT.'Util'.DIRECTORY_SEPARATOR.'Uri.php'; |
/** |
* Decorator to help with building HTML links for navigating the calendar<br /> |
* <b>Note:</b> for performance you should prefer Calendar_Util_Uri unless you |
* have a specific need to use a decorator |
* <code> |
* $Day = new Calendar_Day(2003, 10, 23); |
* $Uri = & new Calendar_Decorator_Uri($Day); |
* $Uri->setFragments('year', 'month', 'day'); |
* echo $Uri->getPrev(); // Displays year=2003&month=10&day=22 |
* </code> |
* @see Calendar_Util_Uri |
* @package Calendar |
* @access public |
*/ |
class Calendar_Decorator_Uri extends Calendar_Decorator |
{ |
/** |
* @var Calendar_Util_Uri |
* @access private |
*/ |
var $Uri; |
/** |
* Constructs Calendar_Decorator_Uri |
* @param object subclass of Calendar |
* @access public |
*/ |
function Calendar_Decorator_Uri(&$Calendar) |
{ |
parent::Calendar_Decorator($Calendar); |
} |
/** |
* Sets the URI fragment names |
* @param string URI fragment for year |
* @param string (optional) URI fragment for month |
* @param string (optional) URI fragment for day |
* @param string (optional) URI fragment for hour |
* @param string (optional) URI fragment for minute |
* @param string (optional) URI fragment for second |
* @return void |
* @access public |
*/ |
function setFragments($y, $m=null, $d=null, $h=null, $i=null, $s=null) { |
$this->Uri = & new Calendar_Util_Uri($y, $m, $d, $h, $i, $s); |
} |
/** |
* Sets the separator string between fragments |
* @param string separator e.g. / |
* @return void |
* @access public |
*/ |
function setSeparator($separator) |
{ |
$this->Uri->separator = $separator; |
} |
/** |
* Puts Uri decorator into "scalar mode" - URI variable names are not |
* returned |
* @param boolean (optional) |
* @return void |
* @access public |
*/ |
function setScalar($state=true) |
{ |
$this->Uri->scalar = $state; |
} |
/** |
* Gets the URI string for the previous calendar unit |
* @param string calendar unit to fetch uri for (year,month,week or day etc) |
* @return string |
* @access public |
*/ |
function prev($method) |
{ |
return $this->Uri->prev($this, $method); |
} |
/** |
* Gets the URI string for the current calendar unit |
* @param string calendar unit to fetch uri for (year,month,week or day etc) |
* @return string |
* @access public |
*/ |
function this($method) |
{ |
return $this->Uri->this($this, $method); |
} |
/** |
* Gets the URI string for the next calendar unit |
* @param string calendar unit to fetch uri for (year,month,week or day etc) |
* @return string |
* @access public |
*/ |
function next($method) |
{ |
return $this->Uri->next($this, $method); |
} |
} |
?> |
/trunk/classes/pear/Calendar/Decorator/Wrapper.php |
---|
New file |
0,0 → 1,90 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// | Lorenzo Alberton <l dot alberton at quipo dot it> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Wrapper.php,v 1.2 2005/11/03 20:35:03 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Wrapper.php,v 1.2 2005/11/03 20:35:03 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar decorator base class |
*/ |
require_once CALENDAR_ROOT.'Decorator.php'; |
/** |
* Decorator to help with wrapping built children in another decorator |
* @package Calendar |
* @access public |
*/ |
class Calendar_Decorator_Wrapper extends Calendar_Decorator |
{ |
/** |
* Constructs Calendar_Decorator_Wrapper |
* @param object subclass of Calendar |
* @access public |
*/ |
function Calendar_Decorator_Wrapper(&$Calendar) |
{ |
parent::Calendar_Decorator($Calendar); |
} |
/** |
* Wraps objects returned from fetch in the named Decorator class |
* @param string name of Decorator class to wrap with |
* @return object instance of named decorator |
* @access public |
*/ |
function & fetch($decorator) |
{ |
$Calendar = parent::fetch(); |
if ($Calendar) { |
$ret =& new $decorator($Calendar); |
} else { |
$ret = false; |
} |
return $ret; |
} |
/** |
* Wraps the returned calendar objects from fetchAll in the named decorator |
* @param string name of Decorator class to wrap with |
* @return array |
* @access public |
*/ |
function fetchAll($decorator) |
{ |
$children = parent::fetchAll(); |
foreach ($children as $key => $Calendar) { |
$children[$key] = & new $decorator($Calendar); |
} |
return $children; |
} |
} |
?> |
/trunk/classes/pear/Calendar/Month/Weekdays.php |
---|
New file |
0,0 → 1,189 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Weekdays.php,v 1.4 2005/10/22 10:28:49 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Weekdays.php,v 1.4 2005/10/22 10:28:49 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar base class |
*/ |
require_once CALENDAR_ROOT.'Calendar.php'; |
/** |
* Load base month |
*/ |
require_once CALENDAR_ROOT.'Month.php'; |
/** |
* Represents a Month and builds Days in tabular form<br> |
* <code> |
* require_once 'Calendar/Month/Weekdays.php'; |
* $Month = & new Calendar_Month_Weekdays(2003, 10); // Oct 2003 |
* $Month->build(); // Build Calendar_Day objects |
* while ($Day = & $Month->fetch()) { |
* if ($Day->isFirst()) { |
* echo '<tr>'; |
* } |
* if ($Day->isEmpty()) { |
* echo '<td> </td>'; |
* } else { |
* echo '<td>'.$Day->thisDay().'</td>'; |
* } |
* if ($Day->isLast()) { |
* echo '</tr>'; |
* } |
* } |
* </code> |
* @package Calendar |
* @access public |
*/ |
class Calendar_Month_Weekdays extends Calendar_Month |
{ |
/** |
* Instance of Calendar_Table_Helper |
* @var Calendar_Table_Helper |
* @access private |
*/ |
var $tableHelper; |
/** |
* First day of the week |
* @access private |
* @var string |
*/ |
var $firstDay; |
/** |
* Constructs Calendar_Month_Weekdays |
* @param int year e.g. 2003 |
* @param int month e.g. 5 |
* @param int (optional) first day of week (e.g. 0 for Sunday, 2 for Tuesday etc.) |
* @access public |
*/ |
function Calendar_Month_Weekdays($y, $m, $firstDay=null) |
{ |
Calendar_Month::Calendar_Month($y, $m, $firstDay); |
} |
/** |
* Builds Day objects in tabular form, to allow display of calendar month |
* with empty cells if the first day of the week does not fall on the first |
* day of the month. |
* @see Calendar_Day::isEmpty() |
* @see Calendar_Day_Base::isFirst() |
* @see Calendar_Day_Base::isLast() |
* @param array (optional) Calendar_Day objects representing selected dates |
* @return boolean |
* @access public |
*/ |
function build($sDates=array()) |
{ |
require_once CALENDAR_ROOT.'Table/Helper.php'; |
$this->tableHelper = & new Calendar_Table_Helper($this, $this->firstDay); |
Calendar_Month::build($sDates); |
$this->buildEmptyDaysBefore(); |
$this->shiftDays(); |
$this->buildEmptyDaysAfter(); |
$this->setWeekMarkers(); |
return true; |
} |
/** |
* Prepends empty days before the real days in the month |
* @return void |
* @access private |
*/ |
function buildEmptyDaysBefore() |
{ |
$eBefore = $this->tableHelper->getEmptyDaysBefore(); |
for ($i=0; $i < $eBefore; $i++) { |
$stamp = $this->cE->dateToStamp($this->year, $this->month, -$i); |
$Day = new Calendar_Day( |
$this->cE->stampToYear($stamp), |
$this->cE->stampToMonth($stamp), |
$this->cE->stampToDay($stamp)); |
$Day->setEmpty(); |
$Day->adjust(); |
array_unshift($this->children, $Day); |
} |
} |
/** |
* Shifts the array of children forward, if necessary |
* @return void |
* @access private |
*/ |
function shiftDays() |
{ |
if (isset ($this->children[0])) { |
array_unshift($this->children, null); |
unset($this->children[0]); |
} |
} |
/** |
* Appends empty days after the real days in the month |
* @return void |
* @access private |
*/ |
function buildEmptyDaysAfter() |
{ |
$eAfter = $this->tableHelper->getEmptyDaysAfter(); |
$sDOM = $this->tableHelper->getNumTableDaysInMonth(); |
for ($i = 1; $i <= $sDOM-$eAfter; $i++) { |
$Day = new Calendar_Day($this->year, $this->month+1, $i); |
$Day->setEmpty(); |
$Day->adjust(); |
array_push($this->children, $Day); |
} |
} |
/** |
* Sets the "markers" for the beginning and of a of week, in the |
* built Calendar_Day children |
* @return void |
* @access private |
*/ |
function setWeekMarkers() |
{ |
$dIW = $this->cE->getDaysInWeek( |
$this->thisYear(), |
$this->thisMonth(), |
$this->thisDay() |
); |
$sDOM = $this->tableHelper->getNumTableDaysInMonth(); |
for ($i=1; $i <= $sDOM; $i+= $dIW) { |
$this->children[$i]->setFirst(); |
$this->children[$i+($dIW-1)]->setLast(); |
} |
} |
} |
?> |
/trunk/classes/pear/Calendar/Month/Weeks.php |
---|
New file |
0,0 → 1,139 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// | Lorenzo Alberton <l dot alberton at quipo dot it> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Weeks.php,v 1.3 2005/10/22 10:28:49 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Weeks.php,v 1.3 2005/10/22 10:28:49 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar base class |
*/ |
require_once CALENDAR_ROOT.'Calendar.php'; |
/** |
* Load base month |
*/ |
require_once CALENDAR_ROOT.'Month.php'; |
/** |
* Represents a Month and builds Weeks |
* <code> |
* require_once 'Calendar'.DIRECTORY_SEPARATOR.'Month'.DIRECTORY_SEPARATOR.'Weeks.php'; |
* $Month = & new Calendar_Month_Weeks(2003, 10); // Oct 2003 |
* $Month->build(); // Build Calendar_Day objects |
* while ($Week = & $Month->fetch()) { |
* echo $Week->thisWeek().'<br />'; |
* } |
* </code> |
* @package Calendar |
* @access public |
*/ |
class Calendar_Month_Weeks extends Calendar_Month |
{ |
/** |
* Instance of Calendar_Table_Helper |
* @var Calendar_Table_Helper |
* @access private |
*/ |
var $tableHelper; |
/** |
* First day of the week |
* @access private |
* @var string |
*/ |
var $firstDay; |
/** |
* Constructs Calendar_Month_Weeks |
* @param int year e.g. 2003 |
* @param int month e.g. 5 |
* @param int (optional) first day of week (e.g. 0 for Sunday, 2 for Tuesday etc.) |
* @access public |
*/ |
function Calendar_Month_Weeks($y, $m, $firstDay=null) |
{ |
Calendar_Month::Calendar_Month($y, $m, $firstDay); |
} |
/** |
* Builds Calendar_Week objects for the Month. Note that Calendar_Week |
* builds Calendar_Day object in tabular form (with Calendar_Day->empty) |
* @param array (optional) Calendar_Week objects representing selected dates |
* @return boolean |
* @access public |
*/ |
function build($sDates=array()) |
{ |
require_once CALENDAR_ROOT.'Table/Helper.php'; |
$this->tableHelper = & new Calendar_Table_Helper($this, $this->firstDay); |
require_once CALENDAR_ROOT.'Week.php'; |
$numWeeks = $this->tableHelper->getNumWeeks(); |
for ($i=1, $d=1; $i<=$numWeeks; $i++, |
$d+=$this->cE->getDaysInWeek( |
$this->thisYear(), |
$this->thisMonth(), |
$this->thisDay()) ) { |
$this->children[$i] = new Calendar_Week( |
$this->year, $this->month, $d, $this->tableHelper->getFirstDay()); |
} |
//used to set empty days |
$this->children[1]->setFirst(true); |
$this->children[$numWeeks]->setLast(true); |
// Handle selected weeks here |
if (count($sDates) > 0) { |
$this->setSelection($sDates); |
} |
return true; |
} |
/** |
* Called from build() |
* @param array |
* @return void |
* @access private |
*/ |
function setSelection($sDates) |
{ |
foreach ($sDates as $sDate) { |
if ($this->year == $sDate->thisYear() |
&& $this->month == $sDate->thisMonth()) |
{ |
$key = $sDate->thisWeek('n_in_month'); |
if (isset($this->children[$key])) { |
$this->children[$key]->setSelected(); |
} |
} |
} |
} |
} |
?> |
/trunk/classes/pear/Calendar/Year.php |
---|
New file |
0,0 → 1,113 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Year.php,v 1.4 2005/10/22 10:25:39 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Year.php,v 1.4 2005/10/22 10:25:39 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar base class |
*/ |
require_once CALENDAR_ROOT.'Calendar.php'; |
/** |
* Represents a Year and builds Months<br> |
* <code> |
* require_once 'Calendar'.DIRECTORY_SEPARATOR.'Year.php'; |
* $Year = & new Calendar_Year(2003, 10, 21); // 21st Oct 2003 |
* $Year->build(); // Build Calendar_Month objects |
* while ($Month = & $Year->fetch()) { |
* echo $Month->thisMonth().'<br />'; |
* } |
* </code> |
* @package Calendar |
* @access public |
*/ |
class Calendar_Year extends Calendar |
{ |
/** |
* Constructs Calendar_Year |
* @param int year e.g. 2003 |
* @access public |
*/ |
function Calendar_Year($y) |
{ |
Calendar::Calendar($y); |
} |
/** |
* Builds the Months of the Year.<br> |
* <b>Note:</b> by defining the constant CALENDAR_MONTH_STATE you can |
* control what class of Calendar_Month is built e.g.; |
* <code> |
* require_once 'Calendar/Calendar_Year.php'; |
* define ('CALENDAR_MONTH_STATE',CALENDAR_USE_MONTH_WEEKDAYS); // Use Calendar_Month_Weekdays |
* // define ('CALENDAR_MONTH_STATE',CALENDAR_USE_MONTH_WEEKS); // Use Calendar_Month_Weeks |
* // define ('CALENDAR_MONTH_STATE',CALENDAR_USE_MONTH); // Use Calendar_Month |
* </code> |
* It defaults to building Calendar_Month objects. |
* @param array (optional) array of Calendar_Month objects representing selected dates |
* @param int (optional) first day of week (e.g. 0 for Sunday, 2 for Tuesday etc.) |
* @return boolean |
* @access public |
*/ |
function build($sDates = array(), $firstDay = null) |
{ |
require_once CALENDAR_ROOT.'Factory.php'; |
$this->firstDay = $this->defineFirstDayOfWeek($firstDay); |
$monthsInYear = $this->cE->getMonthsInYear($this->thisYear()); |
for ($i=1; $i <= $monthsInYear; $i++) { |
$this->children[$i] = Calendar_Factory::create('Month', $this->year, $i); |
} |
if (count($sDates) > 0) { |
$this->setSelection($sDates); |
} |
return true; |
} |
/** |
* Called from build() |
* @param array |
* @return void |
* @access private |
*/ |
function setSelection($sDates) { |
foreach ($sDates as $sDate) { |
if ($this->year == $sDate->thisYear()) { |
$key = $sDate->thisMonth(); |
if (isset($this->children[$key])) { |
$sDate->setSelected(); |
$this->children[$key] = $sDate; |
} |
} |
} |
} |
} |
?> |
/trunk/classes/pear/Calendar/Minute.php |
---|
New file |
0,0 → 1,114 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Minute.php,v 1.1 2004/05/24 22:25:42 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Minute.php,v 1.1 2004/05/24 22:25:42 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar base class |
*/ |
require_once CALENDAR_ROOT.'Calendar.php'; |
/** |
* Represents a Minute and builds Seconds |
* <code> |
* require_once 'Calendar'.DIRECTORY_SEPARATOR.'Minute.php'; |
* $Minute = & new Calendar_Minute(2003, 10, 21, 15, 31); // Oct 21st 2003, 3:31pm |
* $Minute->build(); // Build Calendar_Second objects |
* while ($Second = & $Minute->fetch()) { |
* echo $Second->thisSecond().'<br />'; |
* } |
* </code> |
* @package Calendar |
* @access public |
*/ |
class Calendar_Minute extends Calendar |
{ |
/** |
* Constructs Minute |
* @param int year e.g. 2003 |
* @param int month e.g. 5 |
* @param int day e.g. 11 |
* @param int hour e.g. 13 |
* @param int minute e.g. 31 |
* @access public |
*/ |
function Calendar_Minute($y, $m, $d, $h, $i) |
{ |
Calendar::Calendar($y, $m, $d, $h, $i); |
} |
/** |
* Builds the Calendar_Second objects |
* @param array (optional) Calendar_Second objects representing selected dates |
* @return boolean |
* @access public |
*/ |
function build($sDates=array()) |
{ |
require_once CALENDAR_ROOT.'Second.php'; |
$sIM = $this->cE->getSecondsInMinute($this->year, $this->month, |
$this->day, $this->hour, $this->minute); |
for ($i=0; $i < $sIM; $i++) { |
$this->children[$i] = new Calendar_Second($this->year, $this->month, |
$this->day, $this->hour, $this->minute, $i); |
} |
if (count($sDates) > 0) { |
$this->setSelection($sDates); |
} |
return true; |
} |
/** |
* Called from build() |
* @param array |
* @return void |
* @access private |
*/ |
function setSelection($sDates) |
{ |
foreach ($sDates as $sDate) { |
if ($this->year == $sDate->thisYear() |
&& $this->month == $sDate->thisMonth() |
&& $this->day == $sDate->thisDay() |
&& $this->hour == $sDate->thisHour() |
&& $this->minute == $sDate->thisMinute()) |
{ |
$key = (int)$sDate->thisSecond(); |
if (isset($this->children[$key])) { |
$sDate->setSelected(); |
$this->children[$key] = $sDate; |
} |
} |
} |
} |
} |
?> |
/trunk/classes/pear/Calendar/Table/Helper.php |
---|
New file |
0,0 → 1,280 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Helper.php,v 1.5 2005/10/22 09:51:53 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Helper.php,v 1.5 2005/10/22 09:51:53 quipo Exp $ |
*/ |
/** |
* Used by Calendar_Month_Weekdays, Calendar_Month_Weeks and Calendar_Week to |
* help with building the calendar in tabular form |
* @package Calendar |
* @access protected |
*/ |
class Calendar_Table_Helper |
{ |
/** |
* Instance of the Calendar object being helped. |
* @var object |
* @access private |
*/ |
var $calendar; |
/** |
* Instance of the Calendar_Engine |
* @var object |
* @access private |
*/ |
var $cE; |
/** |
* First day of the week |
* @access private |
* @var string |
*/ |
var $firstDay; |
/** |
* The seven days of the week named |
* @access private |
* @var array |
*/ |
var $weekDays; |
/** |
* Days of the week ordered with $firstDay at the beginning |
* @access private |
* @var array |
*/ |
var $daysOfWeek = array(); |
/** |
* Days of the month built from days of the week |
* @access private |
* @var array |
*/ |
var $daysOfMonth = array(); |
/** |
* Number of weeks in month |
* @var int |
* @access private |
*/ |
var $numWeeks = null; |
/** |
* Number of emtpy days before real days begin in month |
* @var int |
* @access private |
*/ |
var $emptyBefore = 0; |
/** |
* Constructs Calendar_Table_Helper |
* @param object Calendar_Month_Weekdays, Calendar_Month_Weeks, Calendar_Week |
* @param int (optional) first day of the week e.g. 1 for Monday |
* @access protected |
*/ |
function Calendar_Table_Helper(& $calendar, $firstDay=null) |
{ |
$this->calendar = & $calendar; |
$this->cE = & $calendar->getEngine(); |
if (is_null($firstDay)) { |
$firstDay = $this->cE->getFirstDayOfWeek( |
$this->calendar->thisYear(), |
$this->calendar->thisMonth(), |
$this->calendar->thisDay() |
); |
} |
$this->firstDay = $firstDay; |
$this->setFirstDay(); |
$this->setDaysOfMonth(); |
} |
/** |
* Constructs $this->daysOfWeek based on $this->firstDay |
* @return void |
* @access private |
*/ |
function setFirstDay() |
{ |
$weekDays = $this->cE->getWeekDays( |
$this->calendar->thisYear(), |
$this->calendar->thisMonth(), |
$this->calendar->thisDay() |
); |
$endDays = array(); |
$tmpDays = array(); |
$begin = false; |
foreach ($weekDays as $day) { |
if ($begin) { |
$endDays[] = $day; |
} else if ($day === $this->firstDay) { |
$begin = true; |
$endDays[] = $day; |
} else { |
$tmpDays[] = $day; |
} |
} |
$this->daysOfWeek = array_merge($endDays, $tmpDays); |
} |
/** |
* Constructs $this->daysOfMonth |
* @return void |
* @access private |
*/ |
function setDaysOfMonth() |
{ |
$this->daysOfMonth = $this->daysOfWeek; |
$daysInMonth = $this->cE->getDaysInMonth( |
$this->calendar->thisYear(), $this->calendar->thisMonth()); |
$firstDayInMonth = $this->cE->getFirstDayInMonth( |
$this->calendar->thisYear(), $this->calendar->thisMonth()); |
$this->emptyBefore=0; |
foreach ($this->daysOfMonth as $dayOfWeek) { |
if ($firstDayInMonth == $dayOfWeek) { |
break; |
} |
$this->emptyBefore++; |
} |
$this->numWeeks = ceil( |
($daysInMonth + $this->emptyBefore) |
/ |
$this->cE->getDaysInWeek( |
$this->calendar->thisYear(), |
$this->calendar->thisMonth(), |
$this->calendar->thisDay() |
) |
); |
for ($i=1; $i < $this->numWeeks; $i++) { |
$this->daysOfMonth = |
array_merge($this->daysOfMonth, $this->daysOfWeek); |
} |
} |
/** |
* Returns the first day of the month |
* @see Calendar_Engine_Interface::getFirstDayOfWeek() |
* @return int |
* @access protected |
*/ |
function getFirstDay() |
{ |
return $this->firstDay; |
} |
/** |
* Returns the order array of days in a week |
* @return int |
* @access protected |
*/ |
function getDaysOfWeek() |
{ |
return $this->daysOfWeek; |
} |
/** |
* Returns the number of tabular weeks in a month |
* @return int |
* @access protected |
*/ |
function getNumWeeks() |
{ |
return $this->numWeeks; |
} |
/** |
* Returns the number of real days + empty days |
* @return int |
* @access protected |
*/ |
function getNumTableDaysInMonth() |
{ |
return count($this->daysOfMonth); |
} |
/** |
* Returns the number of empty days before the real days begin |
* @return int |
* @access protected |
*/ |
function getEmptyDaysBefore() |
{ |
return $this->emptyBefore; |
} |
/** |
* Returns the index of the last real day in the month |
* @todo Potential performance optimization with static |
* @return int |
* @access protected |
*/ |
function getEmptyDaysAfter() |
{ |
// Causes bug when displaying more than one month |
// static $index; |
// if (!isset($index)) { |
$index = $this->getEmptyDaysBefore() + $this->cE->getDaysInMonth( |
$this->calendar->thisYear(), $this->calendar->thisMonth()); |
// } |
return $index; |
} |
/** |
* Returns the index of the last real day in the month, relative to the |
* beginning of the tabular week it is part of |
* @return int |
* @access protected |
*/ |
function getEmptyDaysAfterOffset() |
{ |
$eAfter = $this->getEmptyDaysAfter(); |
return $eAfter - ( |
$this->cE->getDaysInWeek( |
$this->calendar->thisYear(), |
$this->calendar->thisMonth(), |
$this->calendar->thisDay() |
) * ($this->numWeeks-1) ); |
} |
/** |
* Returns the timestamp of the first day of the current week |
*/ |
function getWeekStart($y, $m, $d, $firstDay=1) |
{ |
$dow = $this->cE->getDayOfWeek($y, $m, $d); |
if ($dow > $firstDay) { |
$d -= ($dow - $firstDay); |
} |
if ($dow < $firstDay) { |
$d -= ( |
$this->cE->getDaysInWeek( |
$this->calendar->thisYear(), |
$this->calendar->thisMonth(), |
$this->calendar->thisDay() |
) - $firstDay + $dow); |
} |
return $this->cE->dateToStamp($y, $m, $d); |
} |
} |
?> |
/trunk/classes/pear/Calendar/docs/Readme |
---|
New file |
0,0 → 1,3 |
Readme |
See the PEAR manual at http://pear.php.net/manual/en/package.datetime.calendar.php for details. |
/trunk/classes/pear/Calendar/docs/examples/14.phps |
---|
New file |
0,0 → 1,141 |
<?php |
/** |
* Description: same as 3.php, but using the PEAR::Date engine |
* Note: make sure PEAR::Date is a stable release!!! |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
// Switch to PEAR::Date engine |
define('CALENDAR_ENGINE', 'PearDate'); |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Day.php'; |
// Initialize GET variables if not set |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('m'); |
if (!isset($_GET['d'])) $_GET['d'] = date('d'); |
// Build the month |
$month = new Calendar_Month_Weekdays($_GET['y'], $_GET['m']); |
// Create an array of days which are "selected" |
// Used for Week::build() below |
$selectedDays = array ( |
new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']), |
new Calendar_Day($_GET['y'], 12, 25), |
); |
// Build the days in the month |
$month->build($selectedDays); |
// Construct strings for next/previous links |
$PMonth = $month->prevMonth('object'); // Get previous month as object |
$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
$NMonth = $month->nextMonth('object'); |
$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
$thisDate = new Date($month->thisMonth('timestamp')); |
?> |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Calendar using PEAR::Date Engine </title> |
<style text="text/css"> |
table { |
background-color: silver; |
} |
caption { |
font-family: verdana; |
font-size: 12px; |
background-color: while; |
} |
.prevMonth { |
font-size: 10px; |
text-align: left; |
} |
.nextMonth { |
font-size: 10px; |
text-align: right; |
} |
th { |
font-family: verdana; |
font-size: 11px; |
color: navy; |
text-align: right; |
} |
td { |
font-family: verdana; |
font-size: 11px; |
text-align: right; |
} |
.selected { |
background-color: yellow; |
} |
</style> |
</head> |
<body> |
<h2>Calendar using PEAR::Date Engine</h2> |
<table class="calendar"> |
<caption> |
<?php echo $thisDate->format('%B %Y'); ?> |
</caption> |
<tr> |
<th>M</th> |
<th>T</th> |
<th>W</th> |
<th>T</th> |
<th>F</th> |
<th>S</th> |
<th>S</th> |
</tr> |
<?php |
while ($day = $month->fetch()) { |
// Build a link string for each day |
$link = $_SERVER['PHP_SELF']. |
'?y='.$day->thisYear(). |
'&m='.$day->thisMonth(). |
'&d='.$day->thisDay(); |
// isFirst() to find start of week |
if ($day->isFirst()) |
echo "<tr>\n"; |
if ($day->isSelected()) { |
echo '<td class="selected">'.$day->thisDay().'</td>'."\n"; |
} else if ($day->isEmpty()) { |
echo '<td> </td>'."\n"; |
} else { |
echo '<td><a href="'.$link.'">'.$day->thisDay().'</a></td>'."\n"; |
} |
// isLast() to find end of week |
if ($day->isLast()) { |
echo "</tr>\n"; |
} |
} |
?> |
<tr> |
<td> |
<a href="<?php echo $prev; ?>" class="prevMonth"><< </a> |
</td> |
<td colspan="5"> </td> |
<td> |
<a href="<?php echo $next; ?>" class="nextMonth"> >></a> |
</td> |
</tr> |
</table> |
<?php |
echo '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>'; |
?> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/16.phps |
---|
New file |
0,0 → 1,31 |
<?php |
/** |
* Description: demonstrates using the Uri decorator |
*/ |
if (!@include 'Calendar/Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Decorator/Uri.php'; |
if (!isset($_GET['jahr'])) $_GET['jahr'] = date('Y'); |
if (!isset($_GET['monat'])) $_GET['monat'] = date('m'); |
// Build the month |
$Calendar = new Calendar_Month_Weekdays($_GET['jahr'], $_GET['monat']); |
echo ( '<p>The current month is ' |
.$Calendar->thisMonth().' of year '.$Calendar->thisYear().'</p>'); |
$Uri = & new Calendar_Decorator_Uri($Calendar); |
$Uri->setFragments('jahr','monat'); |
// $Uri->setSeperator('/'); // Default is & |
// $Uri->setScalar(); // Omit variable names |
echo ( "<pre>Previous Uri:\t".$Uri->prev('month')."\n" ); |
echo ( "This Uri:\t".$Uri->this('month')."\n" ); |
echo ( "Next Uri:\t".$Uri->next('month')."\n</pre>" ); |
?> |
<p> |
<a href="<?php echo($_SERVER['PHP_SELF'].'?'.$Uri->prev('month'));?>">Prev</a> : |
<a href="<?php echo($_SERVER['PHP_SELF'].'?'.$Uri->next('month'));?>">Next</a> |
</p> |
/trunk/classes/pear/Calendar/docs/examples/18.phps |
---|
New file |
0,0 → 1,36 |
<?php |
/** |
* Description: demonstrates using the Wrapper decorator |
*/ |
if (!@include 'Calendar/Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Month.php'; |
require_once CALENDAR_ROOT.'Decorator.php'; // Not really needed but added to help this make sense |
require_once CALENDAR_ROOT.'Decorator/Wrapper.php'; |
class MyBoldDecorator extends Calendar_Decorator |
{ |
function MyBoldDecorator(&$Calendar) |
{ |
parent::Calendar_Decorator($Calendar); |
} |
function thisDay() |
{ |
return '<b>'.parent::thisDay().'</b>'; |
} |
} |
$Month = new Calendar_Month(date('Y'), date('n')); |
$Wrapper = & new Calendar_Decorator_Wrapper($Month); |
$Wrapper->build(); |
echo '<h2>The Wrapper decorator</h2>'; |
echo '<i>Day numbers are rendered in bold</i><br /> <br />'; |
while ($DecoratedDay = $Wrapper->fetch('MyBoldDecorator')) { |
echo $DecoratedDay->thisDay().'<br />'; |
} |
?> |
/trunk/classes/pear/Calendar/docs/examples/20.php |
---|
New file |
0,0 → 1,240 |
<?php |
/** |
* Description: demonstrates a decorator used to "attach a payload" to a selection |
* to make it available when iterating over calendar children |
*/ |
//if you use ISO-8601 dates, switch to PearDate engine |
define('CALENDAR_ENGINE', 'PearDate'); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
require_once CALENDAR_ROOT . 'Day.php'; |
require_once CALENDAR_ROOT . 'Decorator.php'; |
// accepts multiple entries |
class DiaryEvent extends Calendar_Decorator |
{ |
var $entries = array(); |
function DiaryEvent($calendar) { |
Calendar_Decorator::Calendar_Decorator($calendar); |
} |
function addEntry($entry) { |
$this->entries[] = $entry; |
} |
function getEntry() { |
$entry = each($this->entries); |
if ($entry) { |
return $entry['value']; |
} else { |
reset($this->entries); |
return false; |
} |
} |
} |
class MonthPayload_Decorator extends Calendar_Decorator |
{ |
//Calendar engine |
var $cE; |
var $tableHelper; |
var $year; |
var $month; |
var $firstDay = false; |
function build($events=array()) |
{ |
require_once CALENDAR_ROOT . 'Day.php'; |
require_once CALENDAR_ROOT . 'Table/Helper.php'; |
$this->tableHelper = & new Calendar_Table_Helper($this, $this->firstDay); |
$this->cE = & $this->getEngine(); |
$this->year = $this->thisYear(); |
$this->month = $this->thisMonth(); |
$daysInMonth = $this->cE->getDaysInMonth($this->year, $this->month); |
for ($i=1; $i<=$daysInMonth; $i++) { |
$Day = new Calendar_Day(2000,1,1); // Create Day with dummy values |
$Day->setTimeStamp($this->cE->dateToStamp($this->year, $this->month, $i)); |
$this->children[$i] = new DiaryEvent($Day); |
} |
if (count($events) > 0) { |
$this->setSelection($events); |
} |
Calendar_Month_Weekdays::buildEmptyDaysBefore(); |
Calendar_Month_Weekdays::shiftDays(); |
Calendar_Month_Weekdays::buildEmptyDaysAfter(); |
Calendar_Month_Weekdays::setWeekMarkers(); |
return true; |
} |
function setSelection($events) |
{ |
$daysInMonth = $this->cE->getDaysInMonth($this->year, $this->month); |
for ($i=1; $i<=$daysInMonth; $i++) { |
$stamp1 = $this->cE->dateToStamp($this->year, $this->month, $i); |
$stamp2 = $this->cE->dateToStamp($this->year, $this->month, $i+1); |
foreach ($events as $event) { |
if (($stamp1 >= $event['start'] && $stamp1 < $event['end']) || |
($stamp2 >= $event['start'] && $stamp2 < $event['end']) || |
($stamp1 <= $event['start'] && $stamp2 > $event['end']) |
) { |
$this->children[$i]->addEntry($event); |
$this->children[$i]->setSelected(); |
} |
} |
} |
} |
function fetch() |
{ |
$child = each($this->children); |
if ($child) { |
return $child['value']; |
} else { |
reset($this->children); |
return false; |
} |
} |
} |
// Calendar instance used to get the dates in the preferred format: |
// you can switch Calendar Engine and the example still works |
$cal = new Calendar; |
$events = array(); |
//add some events |
$events[] = array( |
'start' => $cal->cE->dateToStamp(2004, 6, 1, 10), |
'end' => $cal->cE->dateToStamp(2004, 6, 1, 12), |
'desc' => 'Important meeting' |
); |
$events[] = array( |
'start' => $cal->cE->dateToStamp(2004, 6, 1, 21), |
'end' => $cal->cE->dateToStamp(2004, 6, 1, 23, 59), |
'desc' => 'Dinner with the boss' |
); |
$events[] = array( |
'start' => $cal->cE->dateToStamp(2004, 6, 5), |
'end' => $cal->cE->dateToStamp(2004, 6, 10, 23, 59), |
'desc' => 'Holidays!' |
); |
$Month = & new Calendar_Month_Weekdays(2004, 6); |
$MonthDecorator = new MonthPayload_Decorator($Month); |
$MonthDecorator->build($events); |
?> |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Calendar </title> |
<style text="text/css"> |
table { |
border-collapse: collapse; |
} |
caption { |
font-family: verdana; |
font-size: 14pt; |
padding-bottom: 4pt; |
} |
th { |
font-family: verdana; |
font-size: 11px; |
text-align: center; |
background-color: #e7e3e7; |
padding: 5pt; |
line-height: 150%; |
border: 1px solid #ccc; |
} |
td { |
font-family: verdana; |
font-size: 11px; |
text-align: left; |
vertical-align: top; |
} |
td.calCell { |
border: 1px solid #b5bece; |
padding: 3px; |
} |
td.calCellEmpty { |
background-color: #f3f3f7; |
} |
td.calCellBusy { |
background-color: #efeffa; |
} |
div.dayNumber { |
text-align: right; |
background-color: #f8f8f8; |
border-bottom: 1px solid #ccc; |
} |
ul { |
margin-left: 0; |
margin-top: 5pt; |
padding: 0 10pt 0 12pt; |
list-style-type: square; |
} |
</style> |
</head> |
<body> |
<h2>Sample Calendar Payload Decorator (using <?php echo CALENDAR_ENGINE; ?> engine)</h2> |
<table class="calendar" width="98%" cellspacing="0" cellpadding="0"> |
<caption> |
<?php echo $MonthDecorator->thisMonth().' / '.$MonthDecorator->thisYear(); ?> |
</caption> |
<tr> |
<th>Monday</th> |
<th>Tuesday</th> |
<th>Wednesday</th> |
<th>Thursday</th> |
<th>Friday</th> |
<th>Saturday</th> |
<th>Sunday</th> |
</tr> |
<?php |
while ($Day = $MonthDecorator->fetch()) { |
if ($Day->isFirst()) { |
echo "<tr>\n"; |
} |
echo '<td class="calCell'; |
if ($Day->isSelected()) { |
echo ' calCellBusy'; |
} elseif ($Day->isEmpty()) { |
echo ' calCellEmpty'; |
} |
echo '">'; |
echo '<div class="dayNumber">'.$Day->thisDay().'</div>'; |
if ($Day->isEmpty()) { |
echo ' '; |
} else { |
echo '<div class="dayContents"><ul>'; |
while ($entry = $Day->getEntry()) { |
echo '<li>'.$entry['desc'].'</li>'; |
//you can print the time range as well |
} |
echo '</ul></div>'; |
} |
echo '</td>'; |
if ($Day->isLast()) { |
echo "</tr>\n"; |
} |
} |
?> |
</table> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/21.php |
---|
New file |
0,0 → 1,139 |
<?php |
/** |
* Description: a complete year with numeric week numbers |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if (!@include 'Calendar/Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Year.php'; |
require_once CALENDAR_ROOT.'Month/Weeks.php'; |
define ('CALENDAR_MONTH_STATE',CALENDAR_USE_MONTH_WEEKS); |
if (!isset($_GET['year'])) $_GET['year'] = date('Y'); |
$week_types = array( |
'n_in_year', |
'n_in_month', |
); |
if (!isset($_GET['week_type']) || !in_array($_GET['week_type'],$week_types) ) { |
$_GET['week_type'] = 'n_in_year'; |
} |
$Year = new Calendar_Year($_GET['year']); |
$Year->build(); |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> <?php echo $Year->thisYear(); ?> </title> |
<style type="text/css"> |
body { |
font-family: Georgia, serif; |
} |
caption.year { |
font-weight: bold; |
font-size: 120%; |
font-color: navy; |
} |
caption.month { |
font-size: 110%; |
font-color: navy; |
} |
table.month { |
border: thin groove #800080 |
} |
tr { |
vertical-align: top; |
} |
th, td { |
text-align: right; |
font-size: 70%; |
} |
#prev { |
float: left; |
font-size: 70%; |
} |
#next { |
float: right; |
font-size: 70%; |
} |
#week_type { |
float: none; |
font-size: 70%; |
} |
.weekNumbers { |
background-color: #e5e5f5; |
padding-right: 3pt; |
} |
</style> |
</head> |
<body> |
<table> |
<caption class="year"> |
<?php echo $Year->thisYear(); ?> |
<div id="next"> |
<a href="?year=<?php echo $Year->nextYear(); ?>&week_type=<?php echo $_GET['week_type']; ?>">>></a> |
</div> |
<div id="prev"> |
<a href="?year=<?php echo $Year->prevYear(); ?>&week_type=<?php echo $_GET['week_type']; ?>"><<</a> |
</div> |
<div id="week_type"> |
<a href="?year=<?php echo $Year->thisYear(); ?>&week_type=n_in_year">Weeks by Year</a> : |
<a href="?year=<?php echo $Year->thisYear(); ?>&week_type=n_in_month">Weeks by Month</a> |
</div> |
</caption> |
<?php |
$i = 0; |
while ($Month = $Year->fetch()) { |
switch ($i) { |
case 0: |
echo "<tr>\n"; |
break; |
case 3: |
case 6: |
case 9: |
echo "</tr>\n<tr>\n"; |
break; |
case 12: |
echo "</tr>\n"; |
break; |
} |
echo "<td>\n<table class=\"month\">\n"; |
echo '<caption class="month">'.date('F', $Month->thisMonth(TRUE)).'</caption>'; |
echo '<colgroup><col class="weekNumbers"><col span="7"></colgroup>'."\n"; |
echo "<tr>\n<th>Week</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th>\n</tr>"; |
$Month->build(); |
while ($Week = $Month->fetch()) { |
echo "<tr>\n"; |
echo '<td>'.$Week->thisWeek($_GET['week_type'])."</td>\n"; |
$Week->build(); |
while ($Day = $Week->fetch()) { |
if ($Day->isEmpty()) { |
echo "<td> </td>\n"; |
} else { |
echo "<td>".$Day->thisDay()."</td>\n"; |
} |
} |
} |
echo "</table>\n</td>\n"; |
$i++; |
} |
?> |
</table> |
<p>Took: <?php echo ((getmicrotime()-$start)); ?></p> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/22.php |
---|
New file |
0,0 → 1,46 |
<?php |
/** |
* Description: demonstrates using the Uri util |
*/ |
if (!@include 'Calendar/Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Util/Uri.php'; |
if (!isset($_GET['jahr'])) $_GET['jahr'] = date('Y'); |
if (!isset($_GET['monat'])) $_GET['monat'] = date('m'); |
// Build the month |
$Calendar = new Calendar_Month_Weekdays($_GET['jahr'], $_GET['monat']); |
echo ( '<p>The current month is ' |
.$Calendar->thisMonth().' of year '.$Calendar->thisYear().'</p>'); |
$Uri = & new Calendar_Util_Uri('jahr','monat'); |
$Uri->setFragments('jahr','monat'); |
echo "\"Vector\" URIs<pre>"; |
echo ( "Previous Uri:\t".htmlentities($Uri->prev($Calendar, 'month'))."\n" ); |
echo ( "This Uri:\t".htmlentities($Uri->this($Calendar, 'month'))."\n" ); |
echo ( "Next Uri:\t".htmlentities($Uri->next($Calendar, 'month'))."\n" ); |
echo "</pre>"; |
// Switch to scalar URIs |
$Uri->separator = '/'; // Default is & |
$Uri->scalar = true; // Omit variable names |
echo "\"Scalar\" URIs<pre>"; |
echo ( "Previous Uri:\t".$Uri->prev($Calendar, 'month')."\n" ); |
echo ( "This Uri:\t".$Uri->this($Calendar, 'month')."\n" ); |
echo ( "Next Uri:\t".$Uri->next($Calendar, 'month')."\n" ); |
echo "</pre>"; |
// Restore the vector URIs |
$Uri->separator = '&'; |
$Uri->scalar = false; |
?> |
<p> |
<a href="<?php echo($_SERVER['PHP_SELF'].'?'.$Uri->prev($Calendar, 'month'));?>">Prev</a> : |
<a href="<?php echo($_SERVER['PHP_SELF'].'?'.$Uri->next($Calendar, 'month'));?>">Next</a> |
</p> |
/trunk/classes/pear/Calendar/docs/examples/23.php |
---|
New file |
0,0 → 1,66 |
<?php |
/** |
* Description: demonstrates using the Textual util |
*/ |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Day.php'; |
require_once CALENDAR_ROOT.'Month'.DIRECTORY_SEPARATOR.'Weekdays.php'; |
require_once CALENDAR_ROOT.'Util'.DIRECTORY_SEPARATOR.'Textual.php'; |
// Could change language like this |
// setlocale (LC_TIME, "de_DE"); // Unix based (probably) |
// setlocale (LC_TIME, "ge"); // Windows |
echo "<hr>Calling: Calendar_Util_Textual::monthNames('long');<pre>"; |
print_r(Calendar_Util_Textual::monthNames('long')); |
echo '</pre>'; |
echo "<hr>Calling: Calendar_Util_Textual::weekdayNames('two');<pre>"; |
print_r(Calendar_Util_Textual::weekdayNames('two')); |
echo '</pre>'; |
echo "<hr>Creating: new Calendar_Day(date('Y'), date('n'), date('d'));<br />"; |
$Calendar = new Calendar_Day(date('Y'), date('n'), date('d')); |
echo '<hr>Previous month is: '.Calendar_Util_Textual::prevMonthName($Calendar,'two').'<br />'; |
echo 'This month is: '.Calendar_Util_Textual::thisMonthName($Calendar,'short').'<br />'; |
echo 'Next month is: '.Calendar_Util_Textual::nextMonthName($Calendar).'<br /><hr />'; |
echo 'Previous day is: '.Calendar_Util_Textual::prevDayName($Calendar).'<br />'; |
echo 'This day is: '.Calendar_Util_Textual::thisDayName($Calendar,'short').'<br />'; |
echo 'Next day is: '.Calendar_Util_Textual::nextDayName($Calendar,'one').'<br /><hr />'; |
echo "Creating: new Calendar_Month_Weekdays(date('Y'), date('n'), 6); - Saturday is first day of week<br />"; |
$Calendar = new Calendar_Month_Weekdays(date('Y'), date('n'), 6); |
?> |
<p>Rendering calendar....</p> |
<table> |
<caption><?php echo Calendar_Util_Textual::thisMonthName($Calendar).' '.$Calendar->thisYear(); ?></caption> |
<tr> |
<?php |
$dayheaders = Calendar_Util_Textual::orderedWeekdays($Calendar,'short'); |
foreach ($dayheaders as $dayheader) { |
echo '<th>'.$dayheader.'</th>'; |
} |
?> |
</tr> |
<?php |
$Calendar->build(); |
while ($Day = $Calendar->fetch()) { |
if ($Day->isFirst()) { |
echo "<tr>\n"; |
} |
if ($Day->isEmpty()) { |
echo '<td> </td>'; |
} else { |
echo '<td>'.$Day->thisDay().'</td>'; |
} |
if ($Day->isLast()) { |
echo "</tr>\n"; |
} |
} |
?> |
</table> |
/trunk/classes/pear/Calendar/docs/examples/2.phps |
---|
New file |
0,0 → 1,142 |
<?php |
/** |
* Description: Demonstrates building a calendar for a month using the Week class |
* Uses UnixTs engine |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
// Force UnixTs engine (default setting) |
define('CALENDAR_ENGINE','UnixTS'); |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weeks.php'; |
require_once CALENDAR_ROOT.'Day.php'; |
// Initialize GET variables if not set |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('m'); |
if (!isset($_GET['d'])) $_GET['d'] = date('d'); |
// Build a month object |
$Month = new Calendar_Month_Weeks($_GET['y'], $_GET['m']); |
// Create an array of days which are "selected" |
// Used for Week::build() below |
$selectedDays = array ( |
new Calendar_Day($_GET['y'],$_GET['m'], $_GET['d']), |
new Calendar_Day($_GET['y'], 12, 25), |
new Calendar_Day(date('Y'), date('m'), date('d')), |
); |
// Instruct month to build Week objects |
$Month->build(); |
// Construct strings for next/previous links |
$PMonth = $Month->prevMonth('object'); // Get previous month as object |
$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
$NMonth = $Month->nextMonth('object'); |
$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
?> |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Calendar </title> |
<style text="text/css"> |
table { |
background-color: silver; |
} |
caption { |
font-family: verdana; |
font-size: 12px; |
background-color: while; |
} |
.prevMonth { |
font-size: 10px; |
text-align: left; |
} |
.nextMonth { |
font-size: 10px; |
text-align: right; |
} |
th { |
font-family: verdana; |
font-size: 11px; |
color: navy; |
text-align: right; |
} |
td { |
font-family: verdana; |
font-size: 11px; |
text-align: right; |
} |
.selected { |
background-color: yellow; |
} |
.empty { |
color: white; |
} |
</style> |
</head> |
<body> |
<h2>Build with Calendar_Month_Weeks::build() then Calendar_Week::build()</h2> |
<table class="calendar"> |
<caption> |
<?php echo date('F Y', $Month->getTimeStamp()); ?> |
</caption> |
<tr> |
<th>M</th> |
<th>T</th> |
<th>W</th> |
<th>T</th> |
<th>F</th> |
<th>S</th> |
<th>S</th> |
</tr> |
<?php |
while ($Week = $Month->fetch()) { |
echo "<tr>\n"; |
// Build the days in the week, passing the selected days |
$Week->build($selectedDays); |
while ($Day = $Week->fetch()) { |
// Build a link string for each day |
$link = $_SERVER['PHP_SELF']. |
'?y='.$Day->thisYear(). |
'&m='.$Day->thisMonth(). |
'&d='.$Day->thisDay(); |
// Check to see if day is selected |
if ($Day->isSelected()) { |
echo '<td class="selected">'.$Day->thisDay().'</td>'."\n"; |
// Check to see if day is empty |
} else if ($Day->isEmpty()) { |
echo '<td class="empty">'.$Day->thisDay().'</td>'."\n"; |
} else { |
echo '<td><a href="'.$link.'">'.$Day->thisDay().'</a></td>'."\n"; |
} |
} |
echo '</tr>'."\n"; |
} |
?> |
<tr> |
<td> |
<a href="<?php echo $prev; ?>" class="prevMonth"><< </a> |
</td> |
<td colspan="5"> </td> |
<td> |
<a href="<?php echo $next; ?>" class="nextMonth"> >></a> |
</td> |
</tr> |
</table> |
<?php |
echo '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>'; |
?> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/4.phps |
---|
New file |
0,0 → 1,49 |
<?php |
/** |
* Description: shows how to perform validation with PEAR::Calendar |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(' ', microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Second.php'; |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('n'); |
if (!isset($_GET['d'])) $_GET['d'] = date('j'); |
if (!isset($_GET['h'])) $_GET['h'] = date('H'); |
if (!isset($_GET['i'])) $_GET['i'] = date('i'); |
if (!isset($_GET['s'])) $_GET['s'] = date('s'); |
$Unit = & new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
echo '<p><b>Result:</b> '.$Unit->thisYear().'-'.$Unit->thisMonth().'-'.$Unit->thisDay(). |
' '.$Unit->thisHour().':'.$Unit->thisMinute().':'.$Unit->thisSecond(); |
if ($Unit->isValid()) { |
echo ' is valid!</p>'; |
} else { |
$V= & $Unit->getValidator(); |
echo ' is invalid:</p>'; |
while ($error = $V->fetch()) { |
echo $error->toString() .'<br />'; |
} |
} |
?> |
<p>Enter a date / time to validate:</p> |
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get"> |
Year: <input type="text" name="y" value="2039"><br /> |
Month: <input type="text" name="m" value="13"><br /> |
Day: <input type="text" name="d" value="32"><br /> |
Hour: <input type="text" name="h" value="24"><br /> |
Minute: <input type="text" name="i" value="-1"><br /> |
Second: <input type="text" name="s" value="60"><br /> |
<input type="submit" value="Validate"> |
</form> |
<p><b>Note:</b> Error messages can be controlled with the constants <code>CALENDAR_VALUE_TOOSMALL</code> and <code>CALENDAR_VALUE_TOOLARGE</code> - see <code>Calendar_Validator.php</code></p> |
<?php echo '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>'; ?> |
/trunk/classes/pear/Calendar/docs/examples/6.phps |
---|
New file |
0,0 → 1,210 |
<?php |
/** |
* Description: A "personal planner" with some WML for fun |
* Note this is done the stupid way - a giant if/else for WML or HTML |
* could be greatly simplified with some HTML/WML rendering classes... |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Day.php'; |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('n'); |
if (!isset($_GET['d'])) $_GET['d'] = date('j'); |
$Month = & new Calendar_Month_Weekdays($_GET['y'],$_GET['m']); |
$Day = & new Calendar_Day($_GET['y'],$_GET['m'],$_GET['d']); |
$selection = array($Day); |
#-----------------------------------------------------------------------------# |
if ( isset($_GET['mime']) && $_GET['mime']=='wml' ) { |
header ('Content-Type: text/vnd.wap.wml'); |
echo ( '<?xml version="1.0"?>' ); |
?> |
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> |
<wml> |
<big><strong>Personal Planner Rendered with WML</strong></big> |
<?php |
if ( isset($_GET['viewday']) ) { |
?> |
<p><strong>Viewing <?php echo ( date('l, jS of F, Y',$Day->getTimeStamp()) ); ?></strong></p> |
<p> |
<anchor> |
Back to Month View |
<go href="<?php |
echo ( "?y=".$Day->thisYear()."&m=". |
$Day->thisMonth()."&d=".$Day->thisDay()."&mime=wml" ); |
?>"/> |
</anchor> |
</p> |
<table> |
<?php |
$Day->build(); |
while ( $Hour = & $Day->fetch() ) { |
echo ( "<tr>\n" ); |
echo ( "<td>".date('g a',$Hour->getTimeStamp())."</td><td>Free time!</td>\n" ); |
echo ( "</tr>\n" ); |
} |
?> |
</table> |
<?php |
} else { |
?> |
<p><strong><?php echo ( date('F Y',$Month->getTimeStamp()) ); ?></strong></p> |
<table> |
<tr> |
<td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td><td>S</td> |
</tr> |
<?php |
$Month->build($selection); |
while ( $Day = $Month->fetch() ) { |
if ( $Day->isFirst() ) { |
echo ( "<tr>\n" ); |
} |
if ( $Day->isEmpty() ) { |
echo ( "<td></td>\n" ); |
} else if ( $Day->isSelected() ) { |
echo ( "<td><anchor><strong><u>".$Day->thisDay()."</u></strong>\n<go href=\"".$_SERVER['PHP_SELF']."?viewday=true&y=". |
$Day->thisYear()."&m=".$Day->thisMonth()."&d=".$Day->thisDay(). |
"&mime=wml\" />\n</anchor></td>\n" ); |
} else { |
echo ( "<td><anchor>".$Day->thisDay()."\n<go href=\"?viewday=true&y=". |
$Day->thisYear()."&m=".$Day->thisMonth()."&d=".$Day->thisDay(). |
"&mime=wml\" /></anchor></td>\n" ); |
} |
if ( $Day->isLast() ) { |
echo ( "</tr>\n" ); |
} |
} |
?> |
<tr> |
<td> |
<anchor> |
<< |
<go href="<?php |
echo ( "?y=".$Month->thisYear()."&m=". |
$Month->prevMonth()."&d=".$Month->thisDay()."&mime=wml" ); |
?>"/> |
</anchor> |
</td> |
<td></td><td></td><td></td><td></td><td></td> |
<td> |
<anchor> |
>> |
<go href="<?php |
echo ( "?y=".$Month->thisYear()."&m=". |
$Month->nextMonth()."&d=".$Month->thisDay()."&mime=wml" ); |
?>"/> |
</anchor> |
</td> |
</tr> |
</table> |
<?php |
} |
?> |
<p><a href="<?php echo ( $_SERVER['PHP_SELF'] ); ?>">Back to HTML</a></p> |
<?php echo ( '<p>Took: '.(getmicrotime()-$start).' seconds</p>' ); ?> |
</wml> |
<?php |
#-----------------------------------------------------------------------------# |
} else { |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> HTML (+WML) Personal Planner </title> |
</head> |
<body> |
<h1>Personal Planner Rendered with HTML</h1> |
<p>To view in WML, click <a href="<?php echo ( $_SERVER['PHP_SELF'] ); ?>?mime=wml">here</a> or place a ?mime=wml at the end of any URL. |
Note that <a href="http://www.opera.com/download">Opera</a> supports WML natively and Mozilla / Firefox has the WMLBrowser |
plugin: <a href="http://wmlbrowser.mozdev.org">wmlbrowser.mozdev.org</a></p> |
<?php |
if ( isset($_GET['viewday']) ) { |
?> |
<p><strong>Viewing <?php echo ( date('l, jS of F, Y',$Day->getTimeStamp()) ); ?></strong></p> |
<p> |
<anchor> |
<a href="<?php |
echo ( "?y=".$Day->thisYear()."&m=". |
$Day->thisMonth()."&d=".$Day->thisDay()); |
?>">Back to Month View</a> |
</p> |
<table> |
<?php |
$Day->build(); |
while ( $Hour = & $Day->fetch() ) { |
echo ( "<tr>\n" ); |
echo ( "<td>".date('g a',$Hour->getTimeStamp())."</td><td>Free time!</td>\n" ); |
echo ( "</tr>\n" ); |
} |
?> |
</table> |
<?php |
} else { |
?> |
<p><strong><?php echo ( date('F Y',$Month->getTimeStamp()) ); ?></strong></p> |
<table> |
<tr> |
<td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td><td>S</td> |
</tr> |
<?php |
$Month->build($selection); |
while ( $Day = $Month->fetch() ) { |
if ( $Day->isFirst() ) { |
echo ( "<tr>\n" ); |
} |
if ( $Day->isEmpty() ) { |
echo ( "<td></td>\n" ); |
} else if ( $Day->isSelected() ) { |
echo ( "<td><a href=\"".$_SERVER['PHP_SELF']."?viewday=true&y=". |
$Day->thisYear()."&m=".$Day->thisMonth()."&d=".$Day->thisDay(). |
"&wml\"><strong><u>".$Day->thisDay()."</u></strong></a></td>\n" ); |
} else { |
echo ( "<td><a href=\"".$_SERVER['PHP_SELF']."?viewday=true&y=". |
$Day->thisYear()."&m=".$Day->thisMonth()."&d=".$Day->thisDay(). |
"\">".$Day->thisDay()."</a></td>\n" ); |
} |
if ( $Day->isLast() ) { |
echo ( "</tr>\n" ); |
} |
} |
?> |
<tr> |
<td> |
<a href="<?php |
echo ( "?y=".$Month->thisYear()."&m=". |
$Month->prevMonth()."&d=".$Month->thisDay() ); |
?>"> |
<<</a> |
</td> |
<td></td><td></td><td></td><td></td><td></td> |
<td> |
<a href="<?php |
echo ( "?y=".$Month->thisYear()."&m=". |
$Month->nextMonth()."&d=".$Month->thisDay() ); |
?>">>></a> |
</td> |
</tr> |
</table> |
<?php |
} |
?> |
<?php echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); ?> |
</body> |
</html> |
<?php |
} |
?> |
/trunk/classes/pear/Calendar/docs/examples/8.phps |
---|
New file |
0,0 → 1,70 |
<?php |
/** |
* Description: client for the SOAP Calendar Server |
*/ |
if ( version_compare(phpversion(), "5.0.0", ">") ) { |
die('PHP 5 has problems with PEAR::SOAP Client (8.0RC3) |
- remove @ before include below to see why'); |
} |
if (!@include('SOAP'.DIRECTORY_SEPARATOR.'Client.php')) { |
die('You must have PEAR::SOAP installed'); |
} |
// Just to save manaul modification... |
$basePath = explode('/', $_SERVER['SCRIPT_NAME']); |
array_pop($basePath); |
$basePath = implode('/', $basePath); |
$url = 'http://'.$_SERVER['SERVER_NAME'].$basePath.'/7.php?wsdl'; |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('n'); |
$wsdl = new SOAP_WSDL ($url); |
echo ( '<pre>'.$wsdl->generateProxyCode().'</pre>' ); |
$calendarClient = $wsdl->getProxy(); |
$month = $calendarClient->getMonth((int)$_GET['y'],(int)$_GET['m']); |
if ( PEAR::isError($month) ) { |
die ( $month->toString() ); |
} |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Calendar over the Wire </title> |
</head> |
<body> |
<h1>Calendar Over the Wire (featuring PEAR::SOAP)</h1> |
<table> |
<caption><b><?php echo ( $month->monthname );?></b></caption> |
<tr> |
<th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th> |
</tr> |
<?php |
foreach ( $month->days as $day ) { |
if ( $day->isFirst === 1 ) |
echo ( "<tr>\n" ); |
if ( $day->isEmpty === 1 ) { |
echo ( "<td></td>" ); |
} else { |
echo ( "<td>".$day->day."</td>" ); |
} |
if ( $day->isLast === 1 ) |
echo ( "</tr>\n" ); |
} |
?> |
<tr> |
</table> |
<p>Enter Year and Month to View:</p> |
<form action="<?php echo ( $_SERVER['PHP_SELF'] ); ?>" method="get"> |
Year: <input type="text" size="4" name="y" value="<?php echo ( $_GET['y'] ); ?>"> |
Month: <input type="text" size="2" name="m" value="<?php echo ( $_GET['m'] ); ?>"> |
<input type="submit" value="Fetch Calendar"> |
</form> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/1.php |
---|
New file |
0,0 → 1,92 |
<?php |
/** |
* Description: Passes through all main calendar classes, beginning with year |
* and down to seconds, skipping weeks. Useful to test Calendar is (basically) |
* working correctly |
* |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
if (!isset($_GET['y'])) $_GET['y'] = 2003; |
if (!isset($_GET['m'])) $_GET['m'] = 8; |
if (!isset($_GET['d'])) $_GET['d'] = 9; |
if (!isset($_GET['h'])) $_GET['h'] = 12; |
if (!isset($_GET['i'])) $_GET['i'] = 34; |
if (!isset($_GET['s'])) $_GET['s'] = 46; |
switch ( @$_GET['view'] ) { |
default: |
$_GET['view'] = 'calendar_year'; |
case 'calendar_year': |
require_once CALENDAR_ROOT.'Year.php'; |
$c = new Calendar_Year($_GET['y']); |
break; |
case 'calendar_month': |
require_once CALENDAR_ROOT.'Month.php'; |
$c = new Calendar_Month($_GET['y'],$_GET['m']); |
break; |
case 'calendar_day': |
require_once CALENDAR_ROOT.'Day.php'; |
$c = new Calendar_Day($_GET['y'],$_GET['m'],$_GET['d']); |
break; |
case 'calendar_hour': |
require_once CALENDAR_ROOT.'Hour.php'; |
$c = new Calendar_Hour($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h']); |
break; |
case 'calendar_minute': |
require_once CALENDAR_ROOT.'Minute.php'; |
$c = new Calendar_Minute($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h'],$_GET['i']); |
break; |
case 'calendar_second': |
require_once CALENDAR_ROOT.'Second.php'; |
$c = new Calendar_Second($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h'],$_GET['i'],$_GET['s']); |
break; |
} |
echo ( 'Viewing: '.@$_GET['view'].'<br />' ); |
echo ( 'The time is now: '.date('Y M d H:i:s',$c->getTimestamp()).'<br >' ); |
$i = 1; |
echo ( '<h1>First Iteration</h1>' ); |
echo ( '<p>The first iteration is more "expensive", the calendar data |
structures having to be built.</p>' ); |
$start = getmicrotime(); |
$c->build(); |
while ( $e = $c->fetch() ) { |
$class = strtolower(get_class($e)); |
$link ="&y=".$e->thisYear()."&m=".$e->thisMonth()."&d=".$e->thisDay(). |
"&h=".$e->thisHour()."&i=".$e->thisMinute()."&s=".$e->thisSecond(); |
$method = 'this'.str_replace('calendar_','',$class); |
echo ( "<a href=\"".$_SERVER['PHP_SELF']."?view=".$class.$link."\">".$e->{$method}()."</a> : " ); |
if ( ($i % 10) == 0 ) { |
echo ( '<br>' ); |
} |
$i++; |
} |
echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); |
$i = 1; |
echo ( '<h1>Second Iteration</h1>' ); |
echo ( '<p>This second iteration is faster, the data structures |
being re-used</p>' ); |
$start = getmicrotime(); |
while ( $e = $c->fetch() ) { |
$class = strtolower(get_class($e)); |
$link ="&y=".$e->thisYear()."&m=".$e->thisMonth()."&d=".$e->thisDay(). |
"&h=".$e->thisHour()."&i=".$e->thisMinute()."&s=".$e->thisSecond(); |
$method = 'this'.str_replace('calendar_','',$class); |
echo ( "<a href=\"".$_SERVER['PHP_SELF']."?view=".$class.$link."\">".$e->{$method}()."</a> : " ); |
if ( ($i % 10) == 0 ) { |
echo ( '<br>' ); |
} |
$i++; |
} |
echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); |
?> |
/trunk/classes/pear/Calendar/docs/examples/2.php |
---|
New file |
0,0 → 1,142 |
<?php |
/** |
* Description: Demonstrates building a calendar for a month using the Week class |
* Uses UnixTs engine |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
// Force UnixTs engine (default setting) |
define('CALENDAR_ENGINE','UnixTS'); |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weeks.php'; |
require_once CALENDAR_ROOT.'Day.php'; |
// Initialize GET variables if not set |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('m'); |
if (!isset($_GET['d'])) $_GET['d'] = date('d'); |
// Build a month object |
$Month = new Calendar_Month_Weeks($_GET['y'], $_GET['m']); |
// Create an array of days which are "selected" |
// Used for Week::build() below |
$selectedDays = array ( |
new Calendar_Day($_GET['y'],$_GET['m'], $_GET['d']), |
new Calendar_Day($_GET['y'], 12, 25), |
new Calendar_Day(date('Y'), date('m'), date('d')), |
); |
// Instruct month to build Week objects |
$Month->build(); |
// Construct strings for next/previous links |
$PMonth = $Month->prevMonth('object'); // Get previous month as object |
$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
$NMonth = $Month->nextMonth('object'); |
$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
?> |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Calendar </title> |
<style text="text/css"> |
table { |
background-color: silver; |
} |
caption { |
font-family: verdana; |
font-size: 12px; |
background-color: while; |
} |
.prevMonth { |
font-size: 10px; |
text-align: left; |
} |
.nextMonth { |
font-size: 10px; |
text-align: right; |
} |
th { |
font-family: verdana; |
font-size: 11px; |
color: navy; |
text-align: right; |
} |
td { |
font-family: verdana; |
font-size: 11px; |
text-align: right; |
} |
.selected { |
background-color: yellow; |
} |
.empty { |
color: white; |
} |
</style> |
</head> |
<body> |
<h2>Build with Calendar_Month_Weeks::build() then Calendar_Week::build()</h2> |
<table class="calendar"> |
<caption> |
<?php echo date('F Y', $Month->getTimeStamp()); ?> |
</caption> |
<tr> |
<th>M</th> |
<th>T</th> |
<th>W</th> |
<th>T</th> |
<th>F</th> |
<th>S</th> |
<th>S</th> |
</tr> |
<?php |
while ($Week = $Month->fetch()) { |
echo "<tr>\n"; |
// Build the days in the week, passing the selected days |
$Week->build($selectedDays); |
while ($Day = $Week->fetch()) { |
// Build a link string for each day |
$link = $_SERVER['PHP_SELF']. |
'?y='.$Day->thisYear(). |
'&m='.$Day->thisMonth(). |
'&d='.$Day->thisDay(); |
// Check to see if day is selected |
if ($Day->isSelected()) { |
echo '<td class="selected">'.$Day->thisDay().'</td>'."\n"; |
// Check to see if day is empty |
} else if ($Day->isEmpty()) { |
echo '<td class="empty">'.$Day->thisDay().'</td>'."\n"; |
} else { |
echo '<td><a href="'.$link.'">'.$Day->thisDay().'</a></td>'."\n"; |
} |
} |
echo '</tr>'."\n"; |
} |
?> |
<tr> |
<td> |
<a href="<?php echo $prev; ?>" class="prevMonth"><< </a> |
</td> |
<td colspan="5"> </td> |
<td> |
<a href="<?php echo $next; ?>" class="nextMonth"> >></a> |
</td> |
</tr> |
</table> |
<?php |
echo '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>'; |
?> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/3.php |
---|
New file |
0,0 → 1,134 |
<?php |
/** |
* Description: Performs same behaviour as 2.php but uses Month::buildWeekDays() |
* and is faster |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Day.php'; |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('m'); |
if (!isset($_GET['d'])) $_GET['d'] = date('d'); |
// Build the month |
$Month = new Calendar_Month_Weekdays($_GET['y'],$_GET['m']); |
// Construct strings for next/previous links |
$PMonth = $Month->prevMonth('object'); // Get previous month as object |
$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
$NMonth = $Month->nextMonth('object'); |
$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
?> |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Calendar </title> |
<style text="text/css"> |
table { |
background-color: silver; |
} |
caption { |
font-family: verdana; |
font-size: 12px; |
background-color: while; |
} |
.prevMonth { |
font-size: 10px; |
text-align: left; |
} |
.nextMonth { |
font-size: 10px; |
text-align: right; |
} |
th { |
font-family: verdana; |
font-size: 11px; |
color: navy; |
text-align: right; |
} |
td { |
font-family: verdana; |
font-size: 11px; |
text-align: right; |
} |
.selected { |
background-color: yellow; |
} |
</style> |
</head> |
<body> |
<?php |
$selectedDays = array ( |
new Calendar_Day($_GET['y'],$_GET['m'],$_GET['d']), |
new Calendar_Day($_GET['y'],12,25), |
); |
// Build the days in the month |
$Month->build($selectedDays); |
?> |
<h2>Built with Calendar_Month_Weekday::build()</h2> |
<table class="calendar"> |
<caption> |
<?php echo ( date('F Y',$Month->getTimeStamp())); ?> |
</caption> |
<tr> |
<th>M</th> |
<th>T</th> |
<th>W</th> |
<th>T</th> |
<th>F</th> |
<th>S</th> |
<th>S</th> |
</tr> |
<?php |
while ( $Day = $Month->fetch() ) { |
// Build a link string for each day |
$link = $_SERVER['PHP_SELF']. |
'?y='.$Day->thisYear(). |
'&m='.$Day->thisMonth(). |
'&d='.$Day->thisDay(); |
// isFirst() to find start of week |
if ( $Day->isFirst() ) |
echo ( "<tr>\n" ); |
if ( $Day->isSelected() ) { |
echo ( "<td class=\"selected\">".$Day->thisDay()."</td>\n" ); |
} else if ( $Day->isEmpty() ) { |
echo ( "<td> </td>\n" ); |
} else { |
echo ( "<td><a href=\"".$link."\">".$Day->thisDay()."</a></td>\n" ); |
} |
// isLast() to find end of week |
if ( $Day->isLast() ) |
echo ( "</tr>\n" ); |
} |
?> |
<tr> |
<td> |
<a href="<?php echo ($prev);?>" class="prevMonth"><< </a> |
</td> |
<td colspan="5"> </td> |
<td> |
<a href="<?php echo ($next);?>" class="nextMonth"> >></a> |
</td> |
</tr> |
</table> |
<?php |
echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); |
?> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/4.php |
---|
New file |
0,0 → 1,49 |
<?php |
/** |
* Description: shows how to perform validation with PEAR::Calendar |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(' ', microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Second.php'; |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('n'); |
if (!isset($_GET['d'])) $_GET['d'] = date('j'); |
if (!isset($_GET['h'])) $_GET['h'] = date('H'); |
if (!isset($_GET['i'])) $_GET['i'] = date('i'); |
if (!isset($_GET['s'])) $_GET['s'] = date('s'); |
$Unit = & new Calendar_Second($_GET['y'], $_GET['m'], $_GET['d'], $_GET['h'], $_GET['i'], $_GET['s']); |
echo '<p><b>Result:</b> '.$Unit->thisYear().'-'.$Unit->thisMonth().'-'.$Unit->thisDay(). |
' '.$Unit->thisHour().':'.$Unit->thisMinute().':'.$Unit->thisSecond(); |
if ($Unit->isValid()) { |
echo ' is valid!</p>'; |
} else { |
$V= & $Unit->getValidator(); |
echo ' is invalid:</p>'; |
while ($error = $V->fetch()) { |
echo $error->toString() .'<br />'; |
} |
} |
?> |
<p>Enter a date / time to validate:</p> |
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get"> |
Year: <input type="text" name="y" value="2039"><br /> |
Month: <input type="text" name="m" value="13"><br /> |
Day: <input type="text" name="d" value="32"><br /> |
Hour: <input type="text" name="h" value="24"><br /> |
Minute: <input type="text" name="i" value="-1"><br /> |
Second: <input type="text" name="s" value="60"><br /> |
<input type="submit" value="Validate"> |
</form> |
<p><b>Note:</b> Error messages can be controlled with the constants <code>CALENDAR_VALUE_TOOSMALL</code> and <code>CALENDAR_VALUE_TOOLARGE</code> - see <code>Calendar_Validator.php</code></p> |
<?php echo '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>'; ?> |
/trunk/classes/pear/Calendar/docs/examples/5.php |
---|
New file |
0,0 → 1,132 |
<?php |
/** |
* Description: generating elements of a form with PEAR::Calendar, using |
* selections as well as validating the submission |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Year.php'; |
require_once CALENDAR_ROOT.'Month.php'; |
require_once CALENDAR_ROOT.'Day.php'; |
require_once CALENDAR_ROOT.'Hour.php'; |
require_once CALENDAR_ROOT.'Minute.php'; |
require_once CALENDAR_ROOT.'Second.php'; |
// Initialize if not set |
if (!isset($_POST['y'])) $_POST['y'] = date('Y'); |
if (!isset($_POST['m'])) $_POST['m'] = date('n'); |
if (!isset($_POST['d'])) $_POST['d'] = date('j'); |
if (!isset($_POST['h'])) $_POST['h'] = date('H'); |
if (!isset($_POST['i'])) $_POST['i'] = date('i'); |
if (!isset($_POST['s'])) $_POST['s'] = date('s'); |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Select and Update </title> |
</head> |
<body> |
<h1>Select and Update</h1> |
<?php |
if ( isset($_POST['update']) ) { |
$Second = & new Calendar_Second($_POST['y'],$_POST['m'],$_POST['d'],$_POST['h'],$_POST['i'],$_POST['s']); |
if ( !$Second->isValid() ) { |
$V= & $Second->getValidator(); |
echo ('<p>Validation failed:</p>' ); |
while ( $error = $V->fetch() ) { |
echo ( $error->toString() .'<br>' ); |
} |
} else { |
echo ('<p>Validation success.</p>' ); |
echo ( '<p>New timestamp is: '.$Second->getTimeStamp().' which could be used to update a database, for example'); |
} |
} else { |
$Year = new Calendar_Year($_POST['y']); |
$Month = new Calendar_Month($_POST['y'],$_POST['m']); |
$Day = new Calendar_Day($_POST['y'],$_POST['m'],$_POST['d']); |
$Hour = new Calendar_Hour($_POST['y'],$_POST['m'],$_POST['d'],$_POST['h']); |
$Minute = new Calendar_Minute($_POST['y'],$_POST['m'],$_POST['d'],$_POST['h'],$_POST['i']); |
$Second = new Calendar_Second($_POST['y'],$_POST['m'],$_POST['d'],$_POST['h'],$_POST['i'],$_POST['s']); |
?> |
<p><b>Set the alarm clock</p></p> |
<form action="<?php echo ( $_SERVER['PHP_SELF'] ); ?>" method="post"> |
Year: <input type="text" name="y" value="<?php echo ( $_POST['y'] ); ?>" size="4"> |
Month:<select name="m"> |
<?php |
$selection = array($Month); |
$Year->build($selection); |
while ( $Child = & $Year->fetch() ) { |
if ( $Child->isSelected() ) { |
echo ( "<option value=\"".$Child->thisMonth()."\" selected>".$Child->thisMonth()."\n" ); |
} else { |
echo ( "<option value=\"".$Child->thisMonth()."\">".$Child->thisMonth()."\n" ); |
} |
} |
?> |
</select> |
Day:<select name="d"> |
<?php |
$selection = array($Day); |
$Month->build($selection); |
while ( $Child = & $Month->fetch() ) { |
if ( $Child->isSelected() ) { |
echo ( "<option value=\"".$Child->thisDay()."\" selected>".$Child->thisDay()."\n" ); |
} else { |
echo ( "<option value=\"".$Child->thisDay()."\">".$Child->thisDay()."\n" ); |
} |
} |
?> |
</select> |
Hour:<select name="h"> |
<?php |
$selection = array($Hour); |
$Day->build($selection); |
while ( $Child = & $Day->fetch() ) { |
if ( $Child->isSelected() ) { |
echo ( "<option value=\"".$Child->thisHour()."\" selected>".$Child->thisHour()."\n" ); |
} else { |
echo ( "<option value=\"".$Child->thisHour()."\">".$Child->thisHour()."\n" ); |
} |
} |
?> |
</select> |
Minute:<select name="i"> |
<?php |
$selection = array($Minute); |
$Hour->build($selection); |
while ( $Child = & $Hour->fetch() ) { |
if ( $Child->isSelected() ) { |
echo ( "<option value=\"".$Child->thisMinute()."\" selected>".$Child->thisMinute()."\n" ); |
} else { |
echo ( "<option value=\"".$Child->thisMinute()."\">".$Child->thisMinute()."\n" ); |
} |
} |
?> |
</select> |
Second:<select name="s"> |
<?php |
$selection = array($Second); |
$Minute->build($selection); |
while ( $Child = & $Minute->fetch() ) { |
if ( $Child->isSelected() ) { |
echo ( "<option value=\"".$Child->thisSecond()."\" selected>".$Child->thisSecond()."\n" ); |
} else { |
echo ( "<option value=\"".$Child->thisSecond()."\">".$Child->thisSecond()."\n" ); |
} |
} |
?> |
</select> |
<input type="submit" name="update" value="Set Alarm"><br> |
<?php |
} |
?> |
<?php echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); ?> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/11.phps |
---|
New file |
0,0 → 1,109 |
<?php |
/** |
* Description: demonstrates a decorator used to "attach a payload" to a selection |
* to make it available when iterating over calendar children |
*/ |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Day.php'; |
require_once CALENDAR_ROOT.'Hour.php'; |
require_once CALENDAR_ROOT.'Decorator.php'; |
// Decorator to "attach" functionality to selected hours |
class DiaryEvent extends Calendar_Decorator { |
var $entry; |
function DiaryEvent($calendar) { |
Calendar_Decorator::Calendar_Decorator($calendar); |
} |
function setEntry($entry) { |
$this->entry = $entry; |
} |
function getEntry() { |
return $this->entry; |
} |
} |
// Create a day to view the hours for |
$Day = & new Calendar_Day(2003,10,24); |
// A sample query to get the data for today (NOT ACTUALLY USED HERE) |
$sql = " |
SELECT |
* |
FROM |
diary |
WHERE |
eventtime >= '".$Day->thisDay(TRUE)."' |
AND |
eventtime < '".$Day->nextDay(TRUE)."';"; |
// An array simulating data from a database |
$result = array ( |
array('eventtime'=>mktime(9,0,0,10,24,2003),'entry'=>'Meeting with sales team'), |
array('eventtime'=>mktime(11,0,0,10,24,2003),'entry'=>'Conference call with Widget Inc.'), |
array('eventtime'=>mktime(15,0,0,10,24,2003),'entry'=>'Presentation to board of directors') |
); |
// An array to place selected hours in |
$selection = array(); |
// Loop through the "database result" |
foreach ( $result as $row ) { |
$Hour = new Calendar_Hour(2000,1,1,1); // Create Hour with dummy values |
$Hour->setTimeStamp($row['eventtime']); // Set the real time with setTimeStamp |
// Create the decorator, passing it the Hour |
$DiaryEvent = new DiaryEvent($Hour); |
// Attach the payload |
$DiaryEvent->setEntry($row['entry']); |
// Add the decorator to the selection |
$selection[] = $DiaryEvent; |
} |
// Build the hours in that day, passing the selection |
$Day->build($selection); |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Passing a Selection Payload with a Decorator </title> |
</head> |
<body> |
<h1>Passing a Selection "Payload" using a Decorator</h1> |
<table> |
<caption><b>Your Schedule for <?php echo ( date('D nS F Y',$Day->thisDay(TRUE)) ); ?></b></caption> |
<tr> |
<th width="5%">Time</th> |
<th>Entry</th> |
</tr> |
<?php |
while ( $Hour = & $Day->fetch() ) { |
$hour = $Hour->thisHour(); |
$minute = $Hour->thisMinute(); |
// Office hours only... |
if ( $hour >= 8 && $hour <= 18 ) { |
echo ( "<tr>\n" ); |
echo ( "<td>$hour:$minute</td>\n" ); |
// If the hour is selected, call the decorator method... |
if ( $Hour->isSelected() ) { |
echo ( "<td bgcolor=\"silver\">".$Hour->getEntry()."</td>\n" ); |
} else { |
echo ( "<td> </td>\n" ); |
} |
echo ( "</tr>\n" ); |
} |
} |
?> |
</table> |
<p>The query to fetch this data, with help from PEAR::Calendar, might be;</p> |
<pre> |
<?php echo ( $sql ); ?> |
</pre> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/6.php |
---|
New file |
0,0 → 1,210 |
<?php |
/** |
* Description: A "personal planner" with some WML for fun |
* Note this is done the stupid way - a giant if/else for WML or HTML |
* could be greatly simplified with some HTML/WML rendering classes... |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Day.php'; |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('n'); |
if (!isset($_GET['d'])) $_GET['d'] = date('j'); |
$Month = & new Calendar_Month_Weekdays($_GET['y'],$_GET['m']); |
$Day = & new Calendar_Day($_GET['y'],$_GET['m'],$_GET['d']); |
$selection = array($Day); |
#-----------------------------------------------------------------------------# |
if ( isset($_GET['mime']) && $_GET['mime']=='wml' ) { |
header ('Content-Type: text/vnd.wap.wml'); |
echo ( '<?xml version="1.0"?>' ); |
?> |
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> |
<wml> |
<big><strong>Personal Planner Rendered with WML</strong></big> |
<?php |
if ( isset($_GET['viewday']) ) { |
?> |
<p><strong>Viewing <?php echo ( date('l, jS of F, Y',$Day->getTimeStamp()) ); ?></strong></p> |
<p> |
<anchor> |
Back to Month View |
<go href="<?php |
echo ( "?y=".$Day->thisYear()."&m=". |
$Day->thisMonth()."&d=".$Day->thisDay()."&mime=wml" ); |
?>"/> |
</anchor> |
</p> |
<table> |
<?php |
$Day->build(); |
while ( $Hour = & $Day->fetch() ) { |
echo ( "<tr>\n" ); |
echo ( "<td>".date('g a',$Hour->getTimeStamp())."</td><td>Free time!</td>\n" ); |
echo ( "</tr>\n" ); |
} |
?> |
</table> |
<?php |
} else { |
?> |
<p><strong><?php echo ( date('F Y',$Month->getTimeStamp()) ); ?></strong></p> |
<table> |
<tr> |
<td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td><td>S</td> |
</tr> |
<?php |
$Month->build($selection); |
while ( $Day = $Month->fetch() ) { |
if ( $Day->isFirst() ) { |
echo ( "<tr>\n" ); |
} |
if ( $Day->isEmpty() ) { |
echo ( "<td></td>\n" ); |
} else if ( $Day->isSelected() ) { |
echo ( "<td><anchor><strong><u>".$Day->thisDay()."</u></strong>\n<go href=\"".$_SERVER['PHP_SELF']."?viewday=true&y=". |
$Day->thisYear()."&m=".$Day->thisMonth()."&d=".$Day->thisDay(). |
"&mime=wml\" />\n</anchor></td>\n" ); |
} else { |
echo ( "<td><anchor>".$Day->thisDay()."\n<go href=\"?viewday=true&y=". |
$Day->thisYear()."&m=".$Day->thisMonth()."&d=".$Day->thisDay(). |
"&mime=wml\" /></anchor></td>\n" ); |
} |
if ( $Day->isLast() ) { |
echo ( "</tr>\n" ); |
} |
} |
?> |
<tr> |
<td> |
<anchor> |
<< |
<go href="<?php |
echo ( "?y=".$Month->thisYear()."&m=". |
$Month->prevMonth()."&d=".$Month->thisDay()."&mime=wml" ); |
?>"/> |
</anchor> |
</td> |
<td></td><td></td><td></td><td></td><td></td> |
<td> |
<anchor> |
>> |
<go href="<?php |
echo ( "?y=".$Month->thisYear()."&m=". |
$Month->nextMonth()."&d=".$Month->thisDay()."&mime=wml" ); |
?>"/> |
</anchor> |
</td> |
</tr> |
</table> |
<?php |
} |
?> |
<p><a href="<?php echo ( $_SERVER['PHP_SELF'] ); ?>">Back to HTML</a></p> |
<?php echo ( '<p>Took: '.(getmicrotime()-$start).' seconds</p>' ); ?> |
</wml> |
<?php |
#-----------------------------------------------------------------------------# |
} else { |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> HTML (+WML) Personal Planner </title> |
</head> |
<body> |
<h1>Personal Planner Rendered with HTML</h1> |
<p>To view in WML, click <a href="<?php echo ( $_SERVER['PHP_SELF'] ); ?>?mime=wml">here</a> or place a ?mime=wml at the end of any URL. |
Note that <a href="http://www.opera.com/download">Opera</a> supports WML natively and Mozilla / Firefox has the WMLBrowser |
plugin: <a href="http://wmlbrowser.mozdev.org">wmlbrowser.mozdev.org</a></p> |
<?php |
if ( isset($_GET['viewday']) ) { |
?> |
<p><strong>Viewing <?php echo ( date('l, jS of F, Y',$Day->getTimeStamp()) ); ?></strong></p> |
<p> |
<anchor> |
<a href="<?php |
echo ( "?y=".$Day->thisYear()."&m=". |
$Day->thisMonth()."&d=".$Day->thisDay()); |
?>">Back to Month View</a> |
</p> |
<table> |
<?php |
$Day->build(); |
while ( $Hour = & $Day->fetch() ) { |
echo ( "<tr>\n" ); |
echo ( "<td>".date('g a',$Hour->getTimeStamp())."</td><td>Free time!</td>\n" ); |
echo ( "</tr>\n" ); |
} |
?> |
</table> |
<?php |
} else { |
?> |
<p><strong><?php echo ( date('F Y',$Month->getTimeStamp()) ); ?></strong></p> |
<table> |
<tr> |
<td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td><td>S</td> |
</tr> |
<?php |
$Month->build($selection); |
while ( $Day = $Month->fetch() ) { |
if ( $Day->isFirst() ) { |
echo ( "<tr>\n" ); |
} |
if ( $Day->isEmpty() ) { |
echo ( "<td></td>\n" ); |
} else if ( $Day->isSelected() ) { |
echo ( "<td><a href=\"".$_SERVER['PHP_SELF']."?viewday=true&y=". |
$Day->thisYear()."&m=".$Day->thisMonth()."&d=".$Day->thisDay(). |
"&wml\"><strong><u>".$Day->thisDay()."</u></strong></a></td>\n" ); |
} else { |
echo ( "<td><a href=\"".$_SERVER['PHP_SELF']."?viewday=true&y=". |
$Day->thisYear()."&m=".$Day->thisMonth()."&d=".$Day->thisDay(). |
"\">".$Day->thisDay()."</a></td>\n" ); |
} |
if ( $Day->isLast() ) { |
echo ( "</tr>\n" ); |
} |
} |
?> |
<tr> |
<td> |
<a href="<?php |
echo ( "?y=".$Month->thisYear()."&m=". |
$Month->prevMonth()."&d=".$Month->thisDay() ); |
?>"> |
<<</a> |
</td> |
<td></td><td></td><td></td><td></td><td></td> |
<td> |
<a href="<?php |
echo ( "?y=".$Month->thisYear()."&m=". |
$Month->nextMonth()."&d=".$Month->thisDay() ); |
?>">>></a> |
</td> |
</tr> |
</table> |
<?php |
} |
?> |
<?php echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); ?> |
</body> |
</html> |
<?php |
} |
?> |
/trunk/classes/pear/Calendar/docs/examples/21.phps |
---|
New file |
0,0 → 1,139 |
<?php |
/** |
* Description: a complete year with numeric week numbers |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if (!@include 'Calendar/Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Year.php'; |
require_once CALENDAR_ROOT.'Month/Weeks.php'; |
define ('CALENDAR_MONTH_STATE',CALENDAR_USE_MONTH_WEEKS); |
if (!isset($_GET['year'])) $_GET['year'] = date('Y'); |
$week_types = array( |
'n_in_year', |
'n_in_month', |
); |
if (!isset($_GET['week_type']) || !in_array($_GET['week_type'],$week_types) ) { |
$_GET['week_type'] = 'n_in_year'; |
} |
$Year = new Calendar_Year($_GET['year']); |
$Year->build(); |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> <?php echo $Year->thisYear(); ?> </title> |
<style type="text/css"> |
body { |
font-family: Georgia, serif; |
} |
caption.year { |
font-weight: bold; |
font-size: 120%; |
font-color: navy; |
} |
caption.month { |
font-size: 110%; |
font-color: navy; |
} |
table.month { |
border: thin groove #800080 |
} |
tr { |
vertical-align: top; |
} |
th, td { |
text-align: right; |
font-size: 70%; |
} |
#prev { |
float: left; |
font-size: 70%; |
} |
#next { |
float: right; |
font-size: 70%; |
} |
#week_type { |
float: none; |
font-size: 70%; |
} |
.weekNumbers { |
background-color: #e5e5f5; |
padding-right: 3pt; |
} |
</style> |
</head> |
<body> |
<table> |
<caption class="year"> |
<?php echo $Year->thisYear(); ?> |
<div id="next"> |
<a href="?year=<?php echo $Year->nextYear(); ?>&week_type=<?php echo $_GET['week_type']; ?>">>></a> |
</div> |
<div id="prev"> |
<a href="?year=<?php echo $Year->prevYear(); ?>&week_type=<?php echo $_GET['week_type']; ?>"><<</a> |
</div> |
<div id="week_type"> |
<a href="?year=<?php echo $Year->thisYear(); ?>&week_type=n_in_year">Weeks by Year</a> : |
<a href="?year=<?php echo $Year->thisYear(); ?>&week_type=n_in_month">Weeks by Month</a> |
</div> |
</caption> |
<?php |
$i = 0; |
while ($Month = $Year->fetch()) { |
switch ($i) { |
case 0: |
echo "<tr>\n"; |
break; |
case 3: |
case 6: |
case 9: |
echo "</tr>\n<tr>\n"; |
break; |
case 12: |
echo "</tr>\n"; |
break; |
} |
echo "<td>\n<table class=\"month\">\n"; |
echo '<caption class="month">'.date('F', $Month->thisMonth(TRUE)).'</caption>'; |
echo '<colgroup><col class="weekNumbers"><col span="7"></colgroup>'."\n"; |
echo "<tr>\n<th>Week</th><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th>\n</tr>"; |
$Month->build(); |
while ($Week = $Month->fetch()) { |
echo "<tr>\n"; |
echo '<td>'.$Week->thisWeek($_GET['week_type'])."</td>\n"; |
$Week->build(); |
while ($Day = $Week->fetch()) { |
if ($Day->isEmpty()) { |
echo "<td> </td>\n"; |
} else { |
echo "<td>".$Day->thisDay()."</td>\n"; |
} |
} |
} |
echo "</table>\n</td>\n"; |
$i++; |
} |
?> |
</table> |
<p>Took: <?php echo ((getmicrotime()-$start)); ?></p> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/7.php |
---|
New file |
0,0 → 1,92 |
<?php |
/** |
* Description: a SOAP Calendar Server |
*/ |
if (!@include('SOAP'.DIRECTORY_SEPARATOR.'Server.php')) { |
die('You must have PEAR::SOAP installed'); |
} |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
class Calendar_Server |
{ |
var $__dispatch_map = array(); |
var $__typedef = array(); |
function Calendar_Server() |
{ |
$this->__dispatch_map['getMonth'] = |
array('in' => array('year' => 'int', 'month'=>'int'), |
'out' => array('month' => '{urn:PEAR_SOAP_Calendar}Month'), |
); |
$this->__typedef['Month'] = array ( |
'monthname' => 'string', |
'days' => '{urn:PEAR_SOAP_Calendar}MonthDays' |
); |
$this->__typedef['MonthDays'] = array (array ('{urn:PEAR_SOAP_Calendar}Day')); |
$this->__typedef['Day'] = array ( |
'isFirst' => 'int', |
'isLast' => 'int', |
'isEmpty' => 'int', |
'day' => 'int' ); |
} |
function __dispatch($methodname) |
{ |
if (isset($this->__dispatch_map[$methodname])) |
return $this->__dispatch_map[$methodname]; |
return NULL; |
} |
function getMonth($year, $month) |
{ |
require_once(CALENDAR_ROOT.'Month'.DIRECTORY_SEPARATOR.'Weekdays.php'); |
$Month = & new Calendar_Month_Weekdays($year,$month); |
if (!$Month->isValid()) { |
$V = & $Month->getValidator(); |
$errorMsg = ''; |
while ($error = $V->fetch()) { |
$errorMsg .= $error->toString()."\n"; |
} |
return new SOAP_Fault($errorMsg, 'Client'); |
} else { |
$monthname = date('F Y', $Month->getTimeStamp()); |
$days = array(); |
$Month->build(); |
while ($Day = & $Month->fetch()) { |
$day = array( |
'isFirst' => (int)$Day->isFirst(), |
'isLast' => (int)$Day->isLast(), |
'isEmpty' => (int)$Day->isEmpty(), |
'day' => (int)$Day->thisDay(), |
); |
$days[] = $day; |
} |
return array('monthname' => $monthname, 'days' => $days); |
} |
} |
} |
$server = new SOAP_Server(); |
$server->_auto_translation = true; |
$calendar = new Calendar_Server(); |
$server->addObjectMap($calendar, 'urn:PEAR_SOAP_Calendar'); |
if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') { |
$server->service($GLOBALS['HTTP_RAW_POST_DATA']); |
} else { |
require_once 'SOAP'.DIRECTORY_SEPARATOR.'Disco.php'; |
$disco = new SOAP_DISCO_Server($server, "PEAR_SOAP_Calendar"); |
if (isset($_SERVER['QUERY_STRING']) && |
strcasecmp($_SERVER['QUERY_STRING'], 'wsdl')==0) { |
header("Content-type: text/xml"); |
echo $disco->getWSDL(); |
} else { |
echo 'This is a PEAR::SOAP Calendar Server. For client try <a href="8.php">here</a><br />'; |
echo 'For WSDL try <a href="?wsdl">here</a>'; |
} |
exit; |
} |
?> |
/trunk/classes/pear/Calendar/docs/examples/13.phps |
---|
New file |
0,0 → 1,99 |
<?php |
/** |
* Description: same as 1.php, but using the PEAR::Date engine |
* Notice the use of the CALENDAR_ENGINE constant, which |
* switches the calculation "engine" |
* Note: make sure PEAR::Date is a stable release!!! |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
// Switch to PEAR::Date engine |
define('CALENDAR_ENGINE','PearDate'); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
if (!isset($_GET['y'])) $_GET['y'] = 2003; |
if (!isset($_GET['m'])) $_GET['m'] = 8; |
if (!isset($_GET['d'])) $_GET['d'] = 9; |
if (!isset($_GET['h'])) $_GET['h'] = 12; |
if (!isset($_GET['i'])) $_GET['i'] = 34; |
if (!isset($_GET['s'])) $_GET['s'] = 46; |
switch ( @$_GET['view'] ) { |
default: |
$_GET['view'] = 'calendar_year'; |
case 'calendar_year': |
require_once CALENDAR_ROOT.'Year.php'; |
$c = new Calendar_Year($_GET['y']); |
break; |
case 'calendar_month': |
require_once CALENDAR_ROOT.'Month.php'; |
$c = new Calendar_Month($_GET['y'],$_GET['m']); |
break; |
case 'calendar_day': |
require_once CALENDAR_ROOT.'Day.php'; |
$c = new Calendar_Day($_GET['y'],$_GET['m'],$_GET['d']); |
break; |
case 'calendar_hour': |
require_once CALENDAR_ROOT.'Hour.php'; |
$c = new Calendar_Hour($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h']); |
break; |
case 'calendar_minute': |
require_once CALENDAR_ROOT.'Minute.php'; |
$c = new Calendar_Minute($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h'],$_GET['i']); |
break; |
case 'calendar_second': |
require_once CALENDAR_ROOT.'Second.php'; |
$c = new Calendar_Second($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h'],$_GET['i'],$_GET['s']); |
break; |
} |
// Convert timestamp to human readable date |
$date = new Date($c->getTimestamp()); |
echo ( '<h1>Using PEAR::Date engine</h1>' ); |
echo ( 'Viewing: '.@$_GET['view'].'<br />' ); |
echo ( 'The time is now: '.$date->format('%Y %a %e %T').'<br >' ); |
$i = 1; |
echo ( '<h1>First Iteration</h1>' ); |
echo ( '<p>The first iteration is more "expensive", the calendar data |
structures having to be built.</p>' ); |
$start = getmicrotime(); |
$c->build(); |
while ( $e = $c->fetch() ) { |
$class = strtolower(get_class($e)); |
$link ="&y=".$e->thisYear()."&m=".$e->thisMonth()."&d=".$e->thisDay(). |
"&h=".$e->thisHour()."&i=".$e->thisMinute()."&s=".$e->thisSecond(); |
$method = 'this'.str_replace('calendar_','',$class); |
echo ( "<a href=\"".$_SERVER['PHP_SELF']."?view=".$class.$link."\">".$e->{$method}()."</a> : " ); |
if ( ($i % 10) == 0 ) { |
echo ( '<br>' ); |
} |
$i++; |
} |
echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); |
$i = 1; |
echo ( '<h1>Second Iteration</h1>' ); |
echo ( '<p>This second iteration is faster, the data structures |
being re-used</p>' ); |
$start = getmicrotime(); |
while ( $e = $c->fetch() ) { |
$class = strtolower(get_class($e)); |
$link ="&y=".$e->thisYear()."&m=".$e->thisMonth()."&d=".$e->thisDay(). |
"&h=".$e->thisHour()."&i=".$e->thisMinute()."&s=".$e->thisSecond(); |
$method = 'this'.str_replace('calendar_','',$class); |
echo ( "<a href=\"".$_SERVER['PHP_SELF']."?view=".$class.$link."\">".$e->{$method}()."</a> : " ); |
if ( ($i % 10) == 0 ) { |
echo ( '<br>' ); |
} |
$i++; |
} |
echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); |
?> |
/trunk/classes/pear/Calendar/docs/examples/23.phps |
---|
New file |
0,0 → 1,66 |
<?php |
/** |
* Description: demonstrates using the Textual util |
*/ |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Day.php'; |
require_once CALENDAR_ROOT.'Month'.DIRECTORY_SEPARATOR.'Weekdays.php'; |
require_once CALENDAR_ROOT.'Util'.DIRECTORY_SEPARATOR.'Textual.php'; |
// Could change language like this |
// setlocale (LC_TIME, "de_DE"); // Unix based (probably) |
// setlocale (LC_TIME, "ge"); // Windows |
echo "<hr>Calling: Calendar_Util_Textual::monthNames('long');<pre>"; |
print_r(Calendar_Util_Textual::monthNames('long')); |
echo '</pre>'; |
echo "<hr>Calling: Calendar_Util_Textual::weekdayNames('two');<pre>"; |
print_r(Calendar_Util_Textual::weekdayNames('two')); |
echo '</pre>'; |
echo "<hr>Creating: new Calendar_Day(date('Y'), date('n'), date('d'));<br />"; |
$Calendar = new Calendar_Day(date('Y'), date('n'), date('d')); |
echo '<hr>Previous month is: '.Calendar_Util_Textual::prevMonthName($Calendar,'two').'<br />'; |
echo 'This month is: '.Calendar_Util_Textual::thisMonthName($Calendar,'short').'<br />'; |
echo 'Next month is: '.Calendar_Util_Textual::nextMonthName($Calendar).'<br /><hr />'; |
echo 'Previous day is: '.Calendar_Util_Textual::prevDayName($Calendar).'<br />'; |
echo 'This day is: '.Calendar_Util_Textual::thisDayName($Calendar,'short').'<br />'; |
echo 'Next day is: '.Calendar_Util_Textual::nextDayName($Calendar,'one').'<br /><hr />'; |
echo "Creating: new Calendar_Month_Weekdays(date('Y'), date('n'), 6); - Saturday is first day of week<br />"; |
$Calendar = new Calendar_Month_Weekdays(date('Y'), date('n'), 6); |
?> |
<p>Rendering calendar....</p> |
<table> |
<caption><?php echo Calendar_Util_Textual::thisMonthName($Calendar).' '.$Calendar->thisYear(); ?></caption> |
<tr> |
<?php |
$dayheaders = Calendar_Util_Textual::orderedWeekdays($Calendar,'short'); |
foreach ($dayheaders as $dayheader) { |
echo '<th>'.$dayheader.'</th>'; |
} |
?> |
</tr> |
<?php |
$Calendar->build(); |
while ($Day = $Calendar->fetch()) { |
if ($Day->isFirst()) { |
echo "<tr>\n"; |
} |
if ($Day->isEmpty()) { |
echo '<td> </td>'; |
} else { |
echo '<td>'.$Day->thisDay().'</td>'; |
} |
if ($Day->isLast()) { |
echo "</tr>\n"; |
} |
} |
?> |
</table> |
/trunk/classes/pear/Calendar/docs/examples/8.php |
---|
New file |
0,0 → 1,70 |
<?php |
/** |
* Description: client for the SOAP Calendar Server |
*/ |
if ( version_compare(phpversion(), "5.0.0", ">") ) { |
die('PHP 5 has problems with PEAR::SOAP Client (8.0RC3) |
- remove @ before include below to see why'); |
} |
if (!@include('SOAP'.DIRECTORY_SEPARATOR.'Client.php')) { |
die('You must have PEAR::SOAP installed'); |
} |
// Just to save manaul modification... |
$basePath = explode('/', $_SERVER['SCRIPT_NAME']); |
array_pop($basePath); |
$basePath = implode('/', $basePath); |
$url = 'http://'.$_SERVER['SERVER_NAME'].$basePath.'/7.php?wsdl'; |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('n'); |
$wsdl = new SOAP_WSDL ($url); |
echo ( '<pre>'.$wsdl->generateProxyCode().'</pre>' ); |
$calendarClient = $wsdl->getProxy(); |
$month = $calendarClient->getMonth((int)$_GET['y'],(int)$_GET['m']); |
if ( PEAR::isError($month) ) { |
die ( $month->toString() ); |
} |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Calendar over the Wire </title> |
</head> |
<body> |
<h1>Calendar Over the Wire (featuring PEAR::SOAP)</h1> |
<table> |
<caption><b><?php echo ( $month->monthname );?></b></caption> |
<tr> |
<th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th> |
</tr> |
<?php |
foreach ( $month->days as $day ) { |
if ( $day->isFirst === 1 ) |
echo ( "<tr>\n" ); |
if ( $day->isEmpty === 1 ) { |
echo ( "<td></td>" ); |
} else { |
echo ( "<td>".$day->day."</td>" ); |
} |
if ( $day->isLast === 1 ) |
echo ( "</tr>\n" ); |
} |
?> |
<tr> |
</table> |
<p>Enter Year and Month to View:</p> |
<form action="<?php echo ( $_SERVER['PHP_SELF'] ); ?>" method="get"> |
Year: <input type="text" size="4" name="y" value="<?php echo ( $_GET['y'] ); ?>"> |
Month: <input type="text" size="2" name="m" value="<?php echo ( $_GET['m'] ); ?>"> |
<input type="submit" value="Fetch Calendar"> |
</form> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/15.phps |
---|
New file |
0,0 → 1,58 |
<?php |
/** |
* Shows more on how a week can be used |
*/ |
function getmicrotime() { |
list($usec, $sec) = explode(" ", microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if (!@include 'Calendar/Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Week.php'; |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('m'); |
if (!isset($_GET['d'])) $_GET['d'] = 1; |
// Build the month |
$Week = new Calendar_Week($_GET['y'], $_GET['m'], $_GET['d']); |
/* |
$Validator = $Week->getValidator(); |
if (!$Validator->isValidWeek()) { |
die ('Please enter a valid week!'); |
} |
*/ |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Paging Weeks </title> |
</head> |
<body> |
<h1>Paging Weeks</h1> |
<h2>Week: <?php echo $Week->thisWeek().' '.date('F Y',$Week->thisMonth(true)); ?></h2> |
<?php |
$Week->build(); |
while ($Day = $Week->fetch()) { |
echo '<p>'.date('jS F',$Day->thisDay(true))."</p>\n"; |
} |
$days = $Week->fetchAll(); |
$prevWeek = $Week->prevWeek('array'); |
$prevWeekLink = $_SERVER['PHP_SELF']. |
'?y='.$prevWeek['year']. |
'&m='.$prevWeek['month']. |
'&d='.$prevWeek['day']; |
$nextWeek = $Week->nextWeek('array'); |
$nextWeekLink = $_SERVER['PHP_SELF']. |
'?y='.$nextWeek['year']. |
'&m='.$nextWeek['month']. |
'&d='.$nextWeek['day']; |
?> |
<p><a href="<?php echo $prevWeekLink; ?>"><<</a> | <a href="<?php echo $nextWeekLink; ?>">>></a></p> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/9.php |
---|
New file |
0,0 → 1,16 |
<?php |
/** |
* Description: simple example on i18N |
*/ |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Day.php'; |
$Day = & new Calendar_Day(2003,10,23); |
setlocale (LC_TIME, "de_DE"); // Unix based (probably) |
// setlocale (LC_TIME, "ge"); // Windows |
echo ( strftime('%A %d %B %Y',$Day->getTimeStamp())); |
?> |
/trunk/classes/pear/Calendar/docs/examples/17.phps |
---|
New file |
0,0 → 1,71 |
<?php |
/** |
* Description: demonstrates using the Textual decorator |
*/ |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Day.php'; |
require_once CALENDAR_ROOT.'Month'.DIRECTORY_SEPARATOR.'Weekdays.php'; |
require_once CALENDAR_ROOT.'Decorator'.DIRECTORY_SEPARATOR.'Textual.php'; |
// Could change language like this |
// setlocale (LC_TIME, "de_DE"); // Unix based (probably) |
// setlocale (LC_TIME, "ge"); // Windows |
echo "<hr>Calling: Calendar_Decorator_Textual::monthNames('long');<pre>"; |
print_r(Calendar_Decorator_Textual::monthNames('long')); |
echo '</pre>'; |
echo "<hr>Calling: Calendar_Decorator_Textual::weekdayNames('two');<pre>"; |
print_r(Calendar_Decorator_Textual::weekdayNames('two')); |
echo '</pre>'; |
echo "<hr>Creating: new Calendar_Day(date('Y'), date('n'), date('d'));<br />"; |
$Calendar = new Calendar_Day(date('Y'), date('n'), date('d')); |
// Decorate |
$Textual = & new Calendar_Decorator_Textual($Calendar); |
echo '<hr>Previous month is: '.$Textual->prevMonthName('two').'<br />'; |
echo 'This month is: '.$Textual->thisMonthName('short').'<br />'; |
echo 'Next month is: '.$Textual->nextMonthName().'<br /><hr />'; |
echo 'Previous day is: '.$Textual->prevDayName().'<br />'; |
echo 'This day is: '.$Textual->thisDayName('short').'<br />'; |
echo 'Next day is: '.$Textual->nextDayName('one').'<br /><hr />'; |
echo "Creating: new Calendar_Month_Weekdays(date('Y'), date('n'), 6); - Saturday is first day of week<br />"; |
$Calendar = new Calendar_Month_Weekdays(date('Y'), date('n'), 6); |
// Decorate |
$Textual = & new Calendar_Decorator_Textual($Calendar); |
?> |
<p>Rendering calendar....</p> |
<table> |
<caption><?php echo $Textual->thisMonthName().' '.$Textual->thisYear(); ?></caption> |
<tr> |
<?php |
$dayheaders = $Textual->orderedWeekdays('short'); |
foreach ($dayheaders as $dayheader) { |
echo '<th>'.$dayheader.'</th>'; |
} |
?> |
</tr> |
<?php |
$Calendar->build(); |
while ($Day = $Calendar->fetch()) { |
if ($Day->isFirst()) { |
echo "<tr>\n"; |
} |
if ($Day->isEmpty()) { |
echo '<td> </td>'; |
} else { |
echo '<td>'.$Day->thisDay().'</td>'; |
} |
if ($Day->isLast()) { |
echo "</tr>\n"; |
} |
} |
?> |
</table> |
/trunk/classes/pear/Calendar/docs/examples/19.phps |
---|
New file |
0,0 → 1,24 |
<?php |
/** |
* Description: demonstrates using the Weekday decorator |
*/ |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Day.php'; |
require_once CALENDAR_ROOT.'Decorator/Weekday.php'; |
$Day = new Calendar_Day(date('Y'), date('n'),date('d')); |
$WeekDay = & new Calendar_Decorator_Weekday($Day); |
// $WeekDay->setFirstDay(0); // Make Sunday first Day |
echo 'Yesterday: '.$WeekDay->prevWeekDay().'<br>'; |
echo 'Today: '.$WeekDay->thisWeekDay().'<br>'; |
echo 'Tomorrow: '.$WeekDay->nextWeekDay().'<br>'; |
$WeekDay->build(); |
echo 'Hours today:<br>'; |
while ( $Hour = $WeekDay->fetch() ) { |
echo $Hour->thisHour().'<br>'; |
} |
?> |
/trunk/classes/pear/Calendar/docs/examples/10.php |
---|
New file |
0,0 → 1,93 |
<?php |
/** |
* Description: demonstrates a decorator to provide simple output formatting |
* on the month while still allowing the days to be accessed via the decorator |
* In practice you _wouldn't_ do this - each decorator comes with a performance |
* hit for extra method calls. For this example some simple functions could help |
* format the month while the days are accessed via the normal Month object |
*/ |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Decorator.php'; |
// Decorate a Month with methods to improve formatting |
class MonthDecorator extends Calendar_Decorator { |
/** |
* @param Calendar_Month |
*/ |
function MonthDecorator(& $Month) { |
parent::Calendar_Decorator($Month); |
} |
/** |
* Override the prevMonth method to format the output |
*/ |
function prevMonth() { |
$prevStamp = parent::prevMonth(TRUE); |
// Build the URL for the previous month |
return $_SERVER['PHP_SELF'].'?y='.date('Y',$prevStamp). |
'&m='.date('n',$prevStamp).'&d='.date('j',$prevStamp); |
} |
/** |
* Override the thisMonth method to format the output |
*/ |
function thisMonth() { |
$thisStamp = parent::thisMonth(TRUE); |
// A human readable string from this month |
return date('F Y',$thisStamp); |
} |
/** |
* Override the nextMonth method to format the output |
*/ |
function nextMonth() { |
$nextStamp = parent::nextMonth(TRUE); |
// Build the URL for next month |
return $_SERVER['PHP_SELF'].'?y='.date('Y',$nextStamp). |
'&m='.date('n',$nextStamp).'&d='.date('j',$nextStamp); |
} |
} |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('n'); |
// Creata a month as usual |
$Month = new Calendar_Month_Weekdays($_GET['y'],$_GET['m']); |
// Pass it to the decorator and use the decorator from now on... |
$MonthDecorator = new MonthDecorator($Month); |
$MonthDecorator->build(); |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> A Simple Decorator </title> |
</head> |
<body> |
<h1>A Simple Decorator</h1> |
<table> |
<caption><?php echo ( $MonthDecorator->thisMonth() ); ?></caption> |
<?php |
while ( $Day = $MonthDecorator->fetch() ) { |
if ( $Day->isFirst() ) { |
echo ( "\n<tr>\n" ); |
} |
if ( $Day->isEmpty() ) { |
echo ( "<td> </td>" ); |
} else { |
echo ( "<td>".$Day->thisDay()."</td>" ); |
} |
if ( $Day->isLast() ) { |
echo ( "\n</tr>\n" ); |
} |
} |
?> |
<tr> |
<td><a href="<?php echo ($MonthDecorator->prevMonth()); ?>">Prev</a></td> |
<td colspan="5"> </td> |
<td><a href="<?php echo ($MonthDecorator->nextMonth()); ?>">Next</a></td> |
</tr> |
</table> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/11.php |
---|
New file |
0,0 → 1,109 |
<?php |
/** |
* Description: demonstrates a decorator used to "attach a payload" to a selection |
* to make it available when iterating over calendar children |
*/ |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Day.php'; |
require_once CALENDAR_ROOT.'Hour.php'; |
require_once CALENDAR_ROOT.'Decorator.php'; |
// Decorator to "attach" functionality to selected hours |
class DiaryEvent extends Calendar_Decorator { |
var $entry; |
function DiaryEvent($calendar) { |
Calendar_Decorator::Calendar_Decorator($calendar); |
} |
function setEntry($entry) { |
$this->entry = $entry; |
} |
function getEntry() { |
return $this->entry; |
} |
} |
// Create a day to view the hours for |
$Day = & new Calendar_Day(2003,10,24); |
// A sample query to get the data for today (NOT ACTUALLY USED HERE) |
$sql = " |
SELECT |
* |
FROM |
diary |
WHERE |
eventtime >= '".$Day->thisDay(TRUE)."' |
AND |
eventtime < '".$Day->nextDay(TRUE)."';"; |
// An array simulating data from a database |
$result = array ( |
array('eventtime'=>mktime(9,0,0,10,24,2003),'entry'=>'Meeting with sales team'), |
array('eventtime'=>mktime(11,0,0,10,24,2003),'entry'=>'Conference call with Widget Inc.'), |
array('eventtime'=>mktime(15,0,0,10,24,2003),'entry'=>'Presentation to board of directors') |
); |
// An array to place selected hours in |
$selection = array(); |
// Loop through the "database result" |
foreach ( $result as $row ) { |
$Hour = new Calendar_Hour(2000,1,1,1); // Create Hour with dummy values |
$Hour->setTimeStamp($row['eventtime']); // Set the real time with setTimeStamp |
// Create the decorator, passing it the Hour |
$DiaryEvent = new DiaryEvent($Hour); |
// Attach the payload |
$DiaryEvent->setEntry($row['entry']); |
// Add the decorator to the selection |
$selection[] = $DiaryEvent; |
} |
// Build the hours in that day, passing the selection |
$Day->build($selection); |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Passing a Selection Payload with a Decorator </title> |
</head> |
<body> |
<h1>Passing a Selection "Payload" using a Decorator</h1> |
<table> |
<caption><b>Your Schedule for <?php echo ( date('D nS F Y',$Day->thisDay(TRUE)) ); ?></b></caption> |
<tr> |
<th width="5%">Time</th> |
<th>Entry</th> |
</tr> |
<?php |
while ( $Hour = & $Day->fetch() ) { |
$hour = $Hour->thisHour(); |
$minute = $Hour->thisMinute(); |
// Office hours only... |
if ( $hour >= 8 && $hour <= 18 ) { |
echo ( "<tr>\n" ); |
echo ( "<td>$hour:$minute</td>\n" ); |
// If the hour is selected, call the decorator method... |
if ( $Hour->isSelected() ) { |
echo ( "<td bgcolor=\"silver\">".$Hour->getEntry()."</td>\n" ); |
} else { |
echo ( "<td> </td>\n" ); |
} |
echo ( "</tr>\n" ); |
} |
} |
?> |
</table> |
<p>The query to fetch this data, with help from PEAR::Calendar, might be;</p> |
<pre> |
<?php echo ( $sql ); ?> |
</pre> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/12.php |
---|
New file |
0,0 → 1,116 |
<?php |
/** |
* Description: a complete year |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Year.php'; |
define ('CALENDAR_MONTH_STATE',CALENDAR_USE_MONTH_WEEKDAYS); |
if ( !isset($_GET['year']) ) $_GET['year'] = date('Y'); |
$Year = new Calendar_Year($_GET['year']); |
$Year->build(); |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> <?php echo ( $Year->thisYear() ); ?> </title> |
<style type="text/css"> |
body { |
font-family: Georgia, serif; |
} |
caption.year { |
font-weight: bold; |
font-size: 120%; |
font-color: navy; |
} |
caption.month { |
font-size: 110%; |
font-color: navy; |
} |
table.month { |
border: thin groove #800080 |
} |
tr { |
vertical-align: top; |
} |
th, td { |
text-align: right; |
font-size: 70%; |
} |
#prev { |
float: left; |
font-size: 70%; |
} |
#next { |
float: right; |
font-size: 70%; |
} |
</style> |
</head> |
<body> |
<table> |
<caption class="year"> |
<?php echo ( $Year->thisYear() ); ?> |
<div id="next"> |
<a href="?year=<?php echo ( $Year->nextYear() ); ?>">>></a> |
</div> |
<div id="prev"> |
<a href="?year=<?php echo ( $Year->prevYear() ); ?>"><<</a> |
</div> |
</caption> |
<?php |
$i = 0; |
while ( $Month = $Year->fetch() ) { |
switch ( $i ) { |
case 0: |
echo ( "<tr>\n" ); |
break; |
case 3: |
case 6: |
case 9: |
echo ( "</tr>\n<tr>\n" ); |
break; |
case 12: |
echo ( "</tr>\n" ); |
break; |
} |
echo ( "<td>\n<table class=\"month\">\n" ); |
echo ( "<caption class=\"month\">".date('F',$Month->thisMonth(TRUE))."</caption>" ); |
echo ( "<tr>\n<th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th>\n</tr>" ); |
$Month->build(); |
while ( $Day = $Month->fetch() ) { |
if ( $Day->isFirst() ) { |
echo ( "<tr>\n" ); |
} |
if ( $Day->isEmpty() ) { |
echo ( "<td> </td>\n" ); |
} else { |
echo ( "<td>".$Day->thisDay()."</td>\n" ); |
} |
if ( $Day->isLast() ) { |
echo ( "</tr>\n" ); |
} |
} |
echo ( "</table>\n</td>\n" ); |
$i++; |
} |
?> |
</table> |
<p>Took: <?php echo ((getmicrotime()-$start)); ?></p> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/1.phps |
---|
New file |
0,0 → 1,92 |
<?php |
/** |
* Description: Passes through all main calendar classes, beginning with year |
* and down to seconds, skipping weeks. Useful to test Calendar is (basically) |
* working correctly |
* |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
if (!isset($_GET['y'])) $_GET['y'] = 2003; |
if (!isset($_GET['m'])) $_GET['m'] = 8; |
if (!isset($_GET['d'])) $_GET['d'] = 9; |
if (!isset($_GET['h'])) $_GET['h'] = 12; |
if (!isset($_GET['i'])) $_GET['i'] = 34; |
if (!isset($_GET['s'])) $_GET['s'] = 46; |
switch ( @$_GET['view'] ) { |
default: |
$_GET['view'] = 'calendar_year'; |
case 'calendar_year': |
require_once CALENDAR_ROOT.'Year.php'; |
$c = new Calendar_Year($_GET['y']); |
break; |
case 'calendar_month': |
require_once CALENDAR_ROOT.'Month.php'; |
$c = new Calendar_Month($_GET['y'],$_GET['m']); |
break; |
case 'calendar_day': |
require_once CALENDAR_ROOT.'Day.php'; |
$c = new Calendar_Day($_GET['y'],$_GET['m'],$_GET['d']); |
break; |
case 'calendar_hour': |
require_once CALENDAR_ROOT.'Hour.php'; |
$c = new Calendar_Hour($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h']); |
break; |
case 'calendar_minute': |
require_once CALENDAR_ROOT.'Minute.php'; |
$c = new Calendar_Minute($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h'],$_GET['i']); |
break; |
case 'calendar_second': |
require_once CALENDAR_ROOT.'Second.php'; |
$c = new Calendar_Second($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h'],$_GET['i'],$_GET['s']); |
break; |
} |
echo ( 'Viewing: '.@$_GET['view'].'<br />' ); |
echo ( 'The time is now: '.date('Y M d H:i:s',$c->getTimestamp()).'<br >' ); |
$i = 1; |
echo ( '<h1>First Iteration</h1>' ); |
echo ( '<p>The first iteration is more "expensive", the calendar data |
structures having to be built.</p>' ); |
$start = getmicrotime(); |
$c->build(); |
while ( $e = $c->fetch() ) { |
$class = strtolower(get_class($e)); |
$link ="&y=".$e->thisYear()."&m=".$e->thisMonth()."&d=".$e->thisDay(). |
"&h=".$e->thisHour()."&i=".$e->thisMinute()."&s=".$e->thisSecond(); |
$method = 'this'.str_replace('calendar_','',$class); |
echo ( "<a href=\"".$_SERVER['PHP_SELF']."?view=".$class.$link."\">".$e->{$method}()."</a> : " ); |
if ( ($i % 10) == 0 ) { |
echo ( '<br>' ); |
} |
$i++; |
} |
echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); |
$i = 1; |
echo ( '<h1>Second Iteration</h1>' ); |
echo ( '<p>This second iteration is faster, the data structures |
being re-used</p>' ); |
$start = getmicrotime(); |
while ( $e = $c->fetch() ) { |
$class = strtolower(get_class($e)); |
$link ="&y=".$e->thisYear()."&m=".$e->thisMonth()."&d=".$e->thisDay(). |
"&h=".$e->thisHour()."&i=".$e->thisMinute()."&s=".$e->thisSecond(); |
$method = 'this'.str_replace('calendar_','',$class); |
echo ( "<a href=\"".$_SERVER['PHP_SELF']."?view=".$class.$link."\">".$e->{$method}()."</a> : " ); |
if ( ($i % 10) == 0 ) { |
echo ( '<br>' ); |
} |
$i++; |
} |
echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); |
?> |
/trunk/classes/pear/Calendar/docs/examples/13.php |
---|
New file |
0,0 → 1,99 |
<?php |
/** |
* Description: same as 1.php, but using the PEAR::Date engine |
* Notice the use of the CALENDAR_ENGINE constant, which |
* switches the calculation "engine" |
* Note: make sure PEAR::Date is a stable release!!! |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
// Switch to PEAR::Date engine |
define('CALENDAR_ENGINE','PearDate'); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
if (!isset($_GET['y'])) $_GET['y'] = 2003; |
if (!isset($_GET['m'])) $_GET['m'] = 8; |
if (!isset($_GET['d'])) $_GET['d'] = 9; |
if (!isset($_GET['h'])) $_GET['h'] = 12; |
if (!isset($_GET['i'])) $_GET['i'] = 34; |
if (!isset($_GET['s'])) $_GET['s'] = 46; |
switch ( @$_GET['view'] ) { |
default: |
$_GET['view'] = 'calendar_year'; |
case 'calendar_year': |
require_once CALENDAR_ROOT.'Year.php'; |
$c = new Calendar_Year($_GET['y']); |
break; |
case 'calendar_month': |
require_once CALENDAR_ROOT.'Month.php'; |
$c = new Calendar_Month($_GET['y'],$_GET['m']); |
break; |
case 'calendar_day': |
require_once CALENDAR_ROOT.'Day.php'; |
$c = new Calendar_Day($_GET['y'],$_GET['m'],$_GET['d']); |
break; |
case 'calendar_hour': |
require_once CALENDAR_ROOT.'Hour.php'; |
$c = new Calendar_Hour($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h']); |
break; |
case 'calendar_minute': |
require_once CALENDAR_ROOT.'Minute.php'; |
$c = new Calendar_Minute($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h'],$_GET['i']); |
break; |
case 'calendar_second': |
require_once CALENDAR_ROOT.'Second.php'; |
$c = new Calendar_Second($_GET['y'],$_GET['m'],$_GET['d'],$_GET['h'],$_GET['i'],$_GET['s']); |
break; |
} |
// Convert timestamp to human readable date |
$date = new Date($c->getTimestamp()); |
echo ( '<h1>Using PEAR::Date engine</h1>' ); |
echo ( 'Viewing: '.@$_GET['view'].'<br />' ); |
echo ( 'The time is now: '.$date->format('%Y %a %e %T').'<br >' ); |
$i = 1; |
echo ( '<h1>First Iteration</h1>' ); |
echo ( '<p>The first iteration is more "expensive", the calendar data |
structures having to be built.</p>' ); |
$start = getmicrotime(); |
$c->build(); |
while ( $e = $c->fetch() ) { |
$class = strtolower(get_class($e)); |
$link ="&y=".$e->thisYear()."&m=".$e->thisMonth()."&d=".$e->thisDay(). |
"&h=".$e->thisHour()."&i=".$e->thisMinute()."&s=".$e->thisSecond(); |
$method = 'this'.str_replace('calendar_','',$class); |
echo ( "<a href=\"".$_SERVER['PHP_SELF']."?view=".$class.$link."\">".$e->{$method}()."</a> : " ); |
if ( ($i % 10) == 0 ) { |
echo ( '<br>' ); |
} |
$i++; |
} |
echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); |
$i = 1; |
echo ( '<h1>Second Iteration</h1>' ); |
echo ( '<p>This second iteration is faster, the data structures |
being re-used</p>' ); |
$start = getmicrotime(); |
while ( $e = $c->fetch() ) { |
$class = strtolower(get_class($e)); |
$link ="&y=".$e->thisYear()."&m=".$e->thisMonth()."&d=".$e->thisDay(). |
"&h=".$e->thisHour()."&i=".$e->thisMinute()."&s=".$e->thisSecond(); |
$method = 'this'.str_replace('calendar_','',$class); |
echo ( "<a href=\"".$_SERVER['PHP_SELF']."?view=".$class.$link."\">".$e->{$method}()."</a> : " ); |
if ( ($i % 10) == 0 ) { |
echo ( '<br>' ); |
} |
$i++; |
} |
echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); |
?> |
/trunk/classes/pear/Calendar/docs/examples/14.php |
---|
New file |
0,0 → 1,141 |
<?php |
/** |
* Description: same as 3.php, but using the PEAR::Date engine |
* Note: make sure PEAR::Date is a stable release!!! |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
// Switch to PEAR::Date engine |
define('CALENDAR_ENGINE', 'PearDate'); |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Day.php'; |
// Initialize GET variables if not set |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('m'); |
if (!isset($_GET['d'])) $_GET['d'] = date('d'); |
// Build the month |
$month = new Calendar_Month_Weekdays($_GET['y'], $_GET['m']); |
// Create an array of days which are "selected" |
// Used for Week::build() below |
$selectedDays = array ( |
new Calendar_Day($_GET['y'], $_GET['m'], $_GET['d']), |
new Calendar_Day($_GET['y'], 12, 25), |
); |
// Build the days in the month |
$month->build($selectedDays); |
// Construct strings for next/previous links |
$PMonth = $month->prevMonth('object'); // Get previous month as object |
$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
$NMonth = $month->nextMonth('object'); |
$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
$thisDate = new Date($month->thisMonth('timestamp')); |
?> |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Calendar using PEAR::Date Engine </title> |
<style text="text/css"> |
table { |
background-color: silver; |
} |
caption { |
font-family: verdana; |
font-size: 12px; |
background-color: while; |
} |
.prevMonth { |
font-size: 10px; |
text-align: left; |
} |
.nextMonth { |
font-size: 10px; |
text-align: right; |
} |
th { |
font-family: verdana; |
font-size: 11px; |
color: navy; |
text-align: right; |
} |
td { |
font-family: verdana; |
font-size: 11px; |
text-align: right; |
} |
.selected { |
background-color: yellow; |
} |
</style> |
</head> |
<body> |
<h2>Calendar using PEAR::Date Engine</h2> |
<table class="calendar"> |
<caption> |
<?php echo $thisDate->format('%B %Y'); ?> |
</caption> |
<tr> |
<th>M</th> |
<th>T</th> |
<th>W</th> |
<th>T</th> |
<th>F</th> |
<th>S</th> |
<th>S</th> |
</tr> |
<?php |
while ($day = $month->fetch()) { |
// Build a link string for each day |
$link = $_SERVER['PHP_SELF']. |
'?y='.$day->thisYear(). |
'&m='.$day->thisMonth(). |
'&d='.$day->thisDay(); |
// isFirst() to find start of week |
if ($day->isFirst()) |
echo "<tr>\n"; |
if ($day->isSelected()) { |
echo '<td class="selected">'.$day->thisDay().'</td>'."\n"; |
} else if ($day->isEmpty()) { |
echo '<td> </td>'."\n"; |
} else { |
echo '<td><a href="'.$link.'">'.$day->thisDay().'</a></td>'."\n"; |
} |
// isLast() to find end of week |
if ($day->isLast()) { |
echo "</tr>\n"; |
} |
} |
?> |
<tr> |
<td> |
<a href="<?php echo $prev; ?>" class="prevMonth"><< </a> |
</td> |
<td colspan="5"> </td> |
<td> |
<a href="<?php echo $next; ?>" class="nextMonth"> >></a> |
</td> |
</tr> |
</table> |
<?php |
echo '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>'; |
?> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/index.html |
---|
New file |
0,0 → 1,50 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> |
<head> |
<title>PEAR::Calendar Examples</title> |
<style type="text/css"> |
body { |
font-family: georgia, serif; |
} |
pre { |
background-color: silver; |
} |
code { |
color: navy; |
background-color: #e2e3e4; |
} |
</style> |
</head> |
<body> |
<h1>PEAR::Calendar Examples</h1> |
<p>$Id: index.html,v 1.6 2004/08/17 09:10:53 hfuecks Exp $</p> |
<ul> |
<li><a href="1.php">1.php</a> [<a href="1.phps">src</a>] - shows basic usage, passing all the way down from <code>Calendar_Year</code> to <code>Calendar_Second</code> - more of a quick test it's working</li> |
<li><a href="2.php">2.php</a> [<a href="2.phps">src</a>] - shows how to build a tabular month using <code>Calendar_Month_Weeks</code>, <code>Calendar_Week</code>, <code>Calendar_Day</code> as well as selecting some dates.</li> |
<li><a href="3.php">3.php</a> [<a href="3.phps">src</a>] - shows how to build a tabular month using <code>Calendar_Month_Weekdays</code> and <code>Calendar_Day</code>, as well as selecting some dates (this method is faster).</li> |
<li><a href="4.php">4.php</a> [<a href="4.phps">src</a>] - shows how to use PEAR::Calendar for validation.</li> |
<li><a href="5.php">5.php</a> [<a href="5.phps">src</a>] - shows PEAR::Calendar in use to help generate a form.</li> |
<li><a href="6.php">6.php</a> [<a href="6.phps">src</a>] - a month and day "planner" calendar, which can be rendered both as HTML and WML.</li> |
<li><a href="7.php">7.php</a> [<a href="7.phps">src</a>] - a simple SOAP Calendar Server, using PEAR::SOAP and PEAR::Calendar</li> |
<li><a href="8.php">8.php</a> [<a href="8.phps">src</a>] - a WSDL SOAP client for the SOAP Calendar Server</li> |
<li><a href="9.php">9.php</a> [<a href="9.phps">src</a>] - quick example of i18n with <code>setlocale</code> (not working on SF)</li> |
<li><a href="10.php">10.php</a> [<a href="10.phps">src</a>] - an example of extending <code>Calendar_Decorator</code> to modify output</li> |
<li><a href="11.php">11.php</a> [<a href="11.phps">src</a>] - attaching a "payload" (e.g. results of a DB query) to a calendar using <code>Calendar_Decorator</code> to allow the payload to be available inside the main loop.</li> |
<li><a href="12.php">12.php</a> [<a href="12.phps">src</a>] - a complete year with months.</li> |
<li><a href="13.php">13.php</a> [<a href="13.phps">src</a>] - same as 1.php but using <code>Calendar_Engine_PearDate</code>, (see <a href="http://pear.php.net/Date">PEAR::Date</a>).</li> |
<li><a href="14.php">14.php</a> [<a href="14.phps">src</a>] - same as 3.php but using <code>Calendar_Engine_PearDate</code></li> |
<li><a href="15.php">15.php</a> [<a href="15.phps">src</a>] - paging through weeks </li> |
<li><a href="16.php">16.php</a> [<a href="16.phps">src</a>] - example of <code>Calendar_Decorator_Uri</code>. <i>Note</i> you should prefer <code>Calendar_Util_Uri</code> (see below) in most cases, for performance </li> |
<li><a href="17.php">17.php</a> [<a href="17.phps">src</a>] - example of <code>Calendar_Decorator_Textual</code>. <i>Note</i> you should prefer <code>Calendar_Util_Textual</code> (see below) in most cases, for performance</li> |
<li><a href="18.php">18.php</a> [<a href="18.phps">src</a>] - example of <code>Calendar_Decorator_Wrapper</code>.</li> |
<li><a href="19.php">19.php</a> [<a href="19.phps">src</a>] - example of <code>Calendar_Decorator_Weekday</code>.</li> |
<li><a href="20.php">20.php</a> [<a href="20.phps">src</a>] - shows how to attach a "payload" spanning multiple days, with more than one entry per day</li> |
<li><a href="21.php">21.php</a> [<a href="21.phps">src</a>] - same as 12.php but using <code>Calendar_Month_Weeks</code> instead of <code>Calendar_Month_Weekdays</code> to allow the week in the year or week in the month to be displayed.</li> |
<li><a href="22.php">22.php</a> [<a href="22.phps">src</a>] - demonstrates use of <code>Calendar_Util_Uri</code>.</li> |
<li><a href="23.php">23.php</a> [<a href="23.phps">src</a>] - demonstrates use of <code>Calendar_Util_Textual</code>.</li> |
<li><a href="24.php">24.php</a> [<a href="24.phps">src</a>] - <code>Calendar_Decorator_Weekday</code> combined with <code>Calendar_Decorator_Wrapper</code> to decorate days in the month.</li> |
</ul> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/15.php |
---|
New file |
0,0 → 1,58 |
<?php |
/** |
* Shows more on how a week can be used |
*/ |
function getmicrotime() { |
list($usec, $sec) = explode(" ", microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if (!@include 'Calendar/Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Week.php'; |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('m'); |
if (!isset($_GET['d'])) $_GET['d'] = 1; |
// Build the month |
$Week = new Calendar_Week($_GET['y'], $_GET['m'], $_GET['d']); |
/* |
$Validator = $Week->getValidator(); |
if (!$Validator->isValidWeek()) { |
die ('Please enter a valid week!'); |
} |
*/ |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Paging Weeks </title> |
</head> |
<body> |
<h1>Paging Weeks</h1> |
<h2>Week: <?php echo $Week->thisWeek().' '.date('F Y',$Week->thisMonth(true)); ?></h2> |
<?php |
$Week->build(); |
while ($Day = $Week->fetch()) { |
echo '<p>'.date('jS F',$Day->thisDay(true))."</p>\n"; |
} |
$days = $Week->fetchAll(); |
$prevWeek = $Week->prevWeek('array'); |
$prevWeekLink = $_SERVER['PHP_SELF']. |
'?y='.$prevWeek['year']. |
'&m='.$prevWeek['month']. |
'&d='.$prevWeek['day']; |
$nextWeek = $Week->nextWeek('array'); |
$nextWeekLink = $_SERVER['PHP_SELF']. |
'?y='.$nextWeek['year']. |
'&m='.$nextWeek['month']. |
'&d='.$nextWeek['day']; |
?> |
<p><a href="<?php echo $prevWeekLink; ?>"><<</a> | <a href="<?php echo $nextWeekLink; ?>">>></a></p> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/3.phps |
---|
New file |
0,0 → 1,134 |
<?php |
/** |
* Description: Performs same behaviour as 2.php but uses Month::buildWeekDays() |
* and is faster |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Day.php'; |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('m'); |
if (!isset($_GET['d'])) $_GET['d'] = date('d'); |
// Build the month |
$Month = new Calendar_Month_Weekdays($_GET['y'],$_GET['m']); |
// Construct strings for next/previous links |
$PMonth = $Month->prevMonth('object'); // Get previous month as object |
$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&m='.$PMonth->thisMonth().'&d='.$PMonth->thisDay(); |
$NMonth = $Month->nextMonth('object'); |
$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&m='.$NMonth->thisMonth().'&d='.$NMonth->thisDay(); |
?> |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Calendar </title> |
<style text="text/css"> |
table { |
background-color: silver; |
} |
caption { |
font-family: verdana; |
font-size: 12px; |
background-color: while; |
} |
.prevMonth { |
font-size: 10px; |
text-align: left; |
} |
.nextMonth { |
font-size: 10px; |
text-align: right; |
} |
th { |
font-family: verdana; |
font-size: 11px; |
color: navy; |
text-align: right; |
} |
td { |
font-family: verdana; |
font-size: 11px; |
text-align: right; |
} |
.selected { |
background-color: yellow; |
} |
</style> |
</head> |
<body> |
<?php |
$selectedDays = array ( |
new Calendar_Day($_GET['y'],$_GET['m'],$_GET['d']), |
new Calendar_Day($_GET['y'],12,25), |
); |
// Build the days in the month |
$Month->build($selectedDays); |
?> |
<h2>Built with Calendar_Month_Weekday::build()</h2> |
<table class="calendar"> |
<caption> |
<?php echo ( date('F Y',$Month->getTimeStamp())); ?> |
</caption> |
<tr> |
<th>M</th> |
<th>T</th> |
<th>W</th> |
<th>T</th> |
<th>F</th> |
<th>S</th> |
<th>S</th> |
</tr> |
<?php |
while ( $Day = $Month->fetch() ) { |
// Build a link string for each day |
$link = $_SERVER['PHP_SELF']. |
'?y='.$Day->thisYear(). |
'&m='.$Day->thisMonth(). |
'&d='.$Day->thisDay(); |
// isFirst() to find start of week |
if ( $Day->isFirst() ) |
echo ( "<tr>\n" ); |
if ( $Day->isSelected() ) { |
echo ( "<td class=\"selected\">".$Day->thisDay()."</td>\n" ); |
} else if ( $Day->isEmpty() ) { |
echo ( "<td> </td>\n" ); |
} else { |
echo ( "<td><a href=\"".$link."\">".$Day->thisDay()."</a></td>\n" ); |
} |
// isLast() to find end of week |
if ( $Day->isLast() ) |
echo ( "</tr>\n" ); |
} |
?> |
<tr> |
<td> |
<a href="<?php echo ($prev);?>" class="prevMonth"><< </a> |
</td> |
<td colspan="5"> </td> |
<td> |
<a href="<?php echo ($next);?>" class="nextMonth"> >></a> |
</td> |
</tr> |
</table> |
<?php |
echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); |
?> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/16.php |
---|
New file |
0,0 → 1,31 |
<?php |
/** |
* Description: demonstrates using the Uri decorator |
*/ |
if (!@include 'Calendar/Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Decorator/Uri.php'; |
if (!isset($_GET['jahr'])) $_GET['jahr'] = date('Y'); |
if (!isset($_GET['monat'])) $_GET['monat'] = date('m'); |
// Build the month |
$Calendar = new Calendar_Month_Weekdays($_GET['jahr'], $_GET['monat']); |
echo ( '<p>The current month is ' |
.$Calendar->thisMonth().' of year '.$Calendar->thisYear().'</p>'); |
$Uri = & new Calendar_Decorator_Uri($Calendar); |
$Uri->setFragments('jahr','monat'); |
// $Uri->setSeperator('/'); // Default is & |
// $Uri->setScalar(); // Omit variable names |
echo ( "<pre>Previous Uri:\t".$Uri->prev('month')."\n" ); |
echo ( "This Uri:\t".$Uri->this('month')."\n" ); |
echo ( "Next Uri:\t".$Uri->next('month')."\n</pre>" ); |
?> |
<p> |
<a href="<?php echo($_SERVER['PHP_SELF'].'?'.$Uri->prev('month'));?>">Prev</a> : |
<a href="<?php echo($_SERVER['PHP_SELF'].'?'.$Uri->next('month'));?>">Next</a> |
</p> |
/trunk/classes/pear/Calendar/docs/examples/5.phps |
---|
New file |
0,0 → 1,132 |
<?php |
/** |
* Description: generating elements of a form with PEAR::Calendar, using |
* selections as well as validating the submission |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Year.php'; |
require_once CALENDAR_ROOT.'Month.php'; |
require_once CALENDAR_ROOT.'Day.php'; |
require_once CALENDAR_ROOT.'Hour.php'; |
require_once CALENDAR_ROOT.'Minute.php'; |
require_once CALENDAR_ROOT.'Second.php'; |
// Initialize if not set |
if (!isset($_POST['y'])) $_POST['y'] = date('Y'); |
if (!isset($_POST['m'])) $_POST['m'] = date('n'); |
if (!isset($_POST['d'])) $_POST['d'] = date('j'); |
if (!isset($_POST['h'])) $_POST['h'] = date('H'); |
if (!isset($_POST['i'])) $_POST['i'] = date('i'); |
if (!isset($_POST['s'])) $_POST['s'] = date('s'); |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Select and Update </title> |
</head> |
<body> |
<h1>Select and Update</h1> |
<?php |
if ( isset($_POST['update']) ) { |
$Second = & new Calendar_Second($_POST['y'],$_POST['m'],$_POST['d'],$_POST['h'],$_POST['i'],$_POST['s']); |
if ( !$Second->isValid() ) { |
$V= & $Second->getValidator(); |
echo ('<p>Validation failed:</p>' ); |
while ( $error = $V->fetch() ) { |
echo ( $error->toString() .'<br>' ); |
} |
} else { |
echo ('<p>Validation success.</p>' ); |
echo ( '<p>New timestamp is: '.$Second->getTimeStamp().' which could be used to update a database, for example'); |
} |
} else { |
$Year = new Calendar_Year($_POST['y']); |
$Month = new Calendar_Month($_POST['y'],$_POST['m']); |
$Day = new Calendar_Day($_POST['y'],$_POST['m'],$_POST['d']); |
$Hour = new Calendar_Hour($_POST['y'],$_POST['m'],$_POST['d'],$_POST['h']); |
$Minute = new Calendar_Minute($_POST['y'],$_POST['m'],$_POST['d'],$_POST['h'],$_POST['i']); |
$Second = new Calendar_Second($_POST['y'],$_POST['m'],$_POST['d'],$_POST['h'],$_POST['i'],$_POST['s']); |
?> |
<p><b>Set the alarm clock</p></p> |
<form action="<?php echo ( $_SERVER['PHP_SELF'] ); ?>" method="post"> |
Year: <input type="text" name="y" value="<?php echo ( $_POST['y'] ); ?>" size="4"> |
Month:<select name="m"> |
<?php |
$selection = array($Month); |
$Year->build($selection); |
while ( $Child = & $Year->fetch() ) { |
if ( $Child->isSelected() ) { |
echo ( "<option value=\"".$Child->thisMonth()."\" selected>".$Child->thisMonth()."\n" ); |
} else { |
echo ( "<option value=\"".$Child->thisMonth()."\">".$Child->thisMonth()."\n" ); |
} |
} |
?> |
</select> |
Day:<select name="d"> |
<?php |
$selection = array($Day); |
$Month->build($selection); |
while ( $Child = & $Month->fetch() ) { |
if ( $Child->isSelected() ) { |
echo ( "<option value=\"".$Child->thisDay()."\" selected>".$Child->thisDay()."\n" ); |
} else { |
echo ( "<option value=\"".$Child->thisDay()."\">".$Child->thisDay()."\n" ); |
} |
} |
?> |
</select> |
Hour:<select name="h"> |
<?php |
$selection = array($Hour); |
$Day->build($selection); |
while ( $Child = & $Day->fetch() ) { |
if ( $Child->isSelected() ) { |
echo ( "<option value=\"".$Child->thisHour()."\" selected>".$Child->thisHour()."\n" ); |
} else { |
echo ( "<option value=\"".$Child->thisHour()."\">".$Child->thisHour()."\n" ); |
} |
} |
?> |
</select> |
Minute:<select name="i"> |
<?php |
$selection = array($Minute); |
$Hour->build($selection); |
while ( $Child = & $Hour->fetch() ) { |
if ( $Child->isSelected() ) { |
echo ( "<option value=\"".$Child->thisMinute()."\" selected>".$Child->thisMinute()."\n" ); |
} else { |
echo ( "<option value=\"".$Child->thisMinute()."\">".$Child->thisMinute()."\n" ); |
} |
} |
?> |
</select> |
Second:<select name="s"> |
<?php |
$selection = array($Second); |
$Minute->build($selection); |
while ( $Child = & $Minute->fetch() ) { |
if ( $Child->isSelected() ) { |
echo ( "<option value=\"".$Child->thisSecond()."\" selected>".$Child->thisSecond()."\n" ); |
} else { |
echo ( "<option value=\"".$Child->thisSecond()."\">".$Child->thisSecond()."\n" ); |
} |
} |
?> |
</select> |
<input type="submit" name="update" value="Set Alarm"><br> |
<?php |
} |
?> |
<?php echo ( '<p><b>Took: '.(getmicrotime()-$start).' seconds</b></p>' ); ?> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/17.php |
---|
New file |
0,0 → 1,71 |
<?php |
/** |
* Description: demonstrates using the Textual decorator |
*/ |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Day.php'; |
require_once CALENDAR_ROOT.'Month'.DIRECTORY_SEPARATOR.'Weekdays.php'; |
require_once CALENDAR_ROOT.'Decorator'.DIRECTORY_SEPARATOR.'Textual.php'; |
// Could change language like this |
// setlocale (LC_TIME, "de_DE"); // Unix based (probably) |
// setlocale (LC_TIME, "ge"); // Windows |
echo "<hr>Calling: Calendar_Decorator_Textual::monthNames('long');<pre>"; |
print_r(Calendar_Decorator_Textual::monthNames('long')); |
echo '</pre>'; |
echo "<hr>Calling: Calendar_Decorator_Textual::weekdayNames('two');<pre>"; |
print_r(Calendar_Decorator_Textual::weekdayNames('two')); |
echo '</pre>'; |
echo "<hr>Creating: new Calendar_Day(date('Y'), date('n'), date('d'));<br />"; |
$Calendar = new Calendar_Day(date('Y'), date('n'), date('d')); |
// Decorate |
$Textual = & new Calendar_Decorator_Textual($Calendar); |
echo '<hr>Previous month is: '.$Textual->prevMonthName('two').'<br />'; |
echo 'This month is: '.$Textual->thisMonthName('short').'<br />'; |
echo 'Next month is: '.$Textual->nextMonthName().'<br /><hr />'; |
echo 'Previous day is: '.$Textual->prevDayName().'<br />'; |
echo 'This day is: '.$Textual->thisDayName('short').'<br />'; |
echo 'Next day is: '.$Textual->nextDayName('one').'<br /><hr />'; |
echo "Creating: new Calendar_Month_Weekdays(date('Y'), date('n'), 6); - Saturday is first day of week<br />"; |
$Calendar = new Calendar_Month_Weekdays(date('Y'), date('n'), 6); |
// Decorate |
$Textual = & new Calendar_Decorator_Textual($Calendar); |
?> |
<p>Rendering calendar....</p> |
<table> |
<caption><?php echo $Textual->thisMonthName().' '.$Textual->thisYear(); ?></caption> |
<tr> |
<?php |
$dayheaders = $Textual->orderedWeekdays('short'); |
foreach ($dayheaders as $dayheader) { |
echo '<th>'.$dayheader.'</th>'; |
} |
?> |
</tr> |
<?php |
$Calendar->build(); |
while ($Day = $Calendar->fetch()) { |
if ($Day->isFirst()) { |
echo "<tr>\n"; |
} |
if ($Day->isEmpty()) { |
echo '<td> </td>'; |
} else { |
echo '<td>'.$Day->thisDay().'</td>'; |
} |
if ($Day->isLast()) { |
echo "</tr>\n"; |
} |
} |
?> |
</table> |
/trunk/classes/pear/Calendar/docs/examples/18.php |
---|
New file |
0,0 → 1,36 |
<?php |
/** |
* Description: demonstrates using the Wrapper decorator |
*/ |
if (!@include 'Calendar/Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Month.php'; |
require_once CALENDAR_ROOT.'Decorator.php'; // Not really needed but added to help this make sense |
require_once CALENDAR_ROOT.'Decorator/Wrapper.php'; |
class MyBoldDecorator extends Calendar_Decorator |
{ |
function MyBoldDecorator(&$Calendar) |
{ |
parent::Calendar_Decorator($Calendar); |
} |
function thisDay() |
{ |
return '<b>'.parent::thisDay().'</b>'; |
} |
} |
$Month = new Calendar_Month(date('Y'), date('n')); |
$Wrapper = & new Calendar_Decorator_Wrapper($Month); |
$Wrapper->build(); |
echo '<h2>The Wrapper decorator</h2>'; |
echo '<i>Day numbers are rendered in bold</i><br /> <br />'; |
while ($DecoratedDay = $Wrapper->fetch('MyBoldDecorator')) { |
echo $DecoratedDay->thisDay().'<br />'; |
} |
?> |
/trunk/classes/pear/Calendar/docs/examples/7.phps |
---|
New file |
0,0 → 1,92 |
<?php |
/** |
* Description: a SOAP Calendar Server |
*/ |
if (!@include('SOAP'.DIRECTORY_SEPARATOR.'Server.php')) { |
die('You must have PEAR::SOAP installed'); |
} |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
class Calendar_Server |
{ |
var $__dispatch_map = array(); |
var $__typedef = array(); |
function Calendar_Server() |
{ |
$this->__dispatch_map['getMonth'] = |
array('in' => array('year' => 'int', 'month'=>'int'), |
'out' => array('month' => '{urn:PEAR_SOAP_Calendar}Month'), |
); |
$this->__typedef['Month'] = array ( |
'monthname' => 'string', |
'days' => '{urn:PEAR_SOAP_Calendar}MonthDays' |
); |
$this->__typedef['MonthDays'] = array (array ('{urn:PEAR_SOAP_Calendar}Day')); |
$this->__typedef['Day'] = array ( |
'isFirst' => 'int', |
'isLast' => 'int', |
'isEmpty' => 'int', |
'day' => 'int' ); |
} |
function __dispatch($methodname) |
{ |
if (isset($this->__dispatch_map[$methodname])) |
return $this->__dispatch_map[$methodname]; |
return NULL; |
} |
function getMonth($year, $month) |
{ |
require_once(CALENDAR_ROOT.'Month'.DIRECTORY_SEPARATOR.'Weekdays.php'); |
$Month = & new Calendar_Month_Weekdays($year,$month); |
if (!$Month->isValid()) { |
$V = & $Month->getValidator(); |
$errorMsg = ''; |
while ($error = $V->fetch()) { |
$errorMsg .= $error->toString()."\n"; |
} |
return new SOAP_Fault($errorMsg, 'Client'); |
} else { |
$monthname = date('F Y', $Month->getTimeStamp()); |
$days = array(); |
$Month->build(); |
while ($Day = & $Month->fetch()) { |
$day = array( |
'isFirst' => (int)$Day->isFirst(), |
'isLast' => (int)$Day->isLast(), |
'isEmpty' => (int)$Day->isEmpty(), |
'day' => (int)$Day->thisDay(), |
); |
$days[] = $day; |
} |
return array('monthname' => $monthname, 'days' => $days); |
} |
} |
} |
$server = new SOAP_Server(); |
$server->_auto_translation = true; |
$calendar = new Calendar_Server(); |
$server->addObjectMap($calendar, 'urn:PEAR_SOAP_Calendar'); |
if (strtoupper($_SERVER['REQUEST_METHOD'])=='POST') { |
$server->service($GLOBALS['HTTP_RAW_POST_DATA']); |
} else { |
require_once 'SOAP'.DIRECTORY_SEPARATOR.'Disco.php'; |
$disco = new SOAP_DISCO_Server($server, "PEAR_SOAP_Calendar"); |
if (isset($_SERVER['QUERY_STRING']) && |
strcasecmp($_SERVER['QUERY_STRING'], 'wsdl')==0) { |
header("Content-type: text/xml"); |
echo $disco->getWSDL(); |
} else { |
echo 'This is a PEAR::SOAP Calendar Server. For client try <a href="8.php">here</a><br />'; |
echo 'For WSDL try <a href="?wsdl">here</a>'; |
} |
exit; |
} |
?> |
/trunk/classes/pear/Calendar/docs/examples/19.php |
---|
New file |
0,0 → 1,24 |
<?php |
/** |
* Description: demonstrates using the Weekday decorator |
*/ |
if (!@include 'Calendar'.DIRECTORY_SEPARATOR.'Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Day.php'; |
require_once CALENDAR_ROOT.'Decorator/Weekday.php'; |
$Day = new Calendar_Day(date('Y'), date('n'),date('d')); |
$WeekDay = & new Calendar_Decorator_Weekday($Day); |
// $WeekDay->setFirstDay(0); // Make Sunday first Day |
echo 'Yesterday: '.$WeekDay->prevWeekDay().'<br>'; |
echo 'Today: '.$WeekDay->thisWeekDay().'<br>'; |
echo 'Tomorrow: '.$WeekDay->nextWeekDay().'<br>'; |
$WeekDay->build(); |
echo 'Hours today:<br>'; |
while ( $Hour = $WeekDay->fetch() ) { |
echo $Hour->thisHour().'<br>'; |
} |
?> |
/trunk/classes/pear/Calendar/docs/examples/9.phps |
---|
New file |
0,0 → 1,16 |
<?php |
/** |
* Description: simple example on i18N |
*/ |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Day.php'; |
$Day = & new Calendar_Day(2003,10,23); |
setlocale (LC_TIME, "de_DE"); // Unix based (probably) |
// setlocale (LC_TIME, "ge"); // Windows |
echo ( strftime('%A %d %B %Y',$Day->getTimeStamp())); |
?> |
/trunk/classes/pear/Calendar/docs/examples/10.phps |
---|
New file |
0,0 → 1,93 |
<?php |
/** |
* Description: demonstrates a decorator to provide simple output formatting |
* on the month while still allowing the days to be accessed via the decorator |
* In practice you _wouldn't_ do this - each decorator comes with a performance |
* hit for extra method calls. For this example some simple functions could help |
* format the month while the days are accessed via the normal Month object |
*/ |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Decorator.php'; |
// Decorate a Month with methods to improve formatting |
class MonthDecorator extends Calendar_Decorator { |
/** |
* @param Calendar_Month |
*/ |
function MonthDecorator(& $Month) { |
parent::Calendar_Decorator($Month); |
} |
/** |
* Override the prevMonth method to format the output |
*/ |
function prevMonth() { |
$prevStamp = parent::prevMonth(TRUE); |
// Build the URL for the previous month |
return $_SERVER['PHP_SELF'].'?y='.date('Y',$prevStamp). |
'&m='.date('n',$prevStamp).'&d='.date('j',$prevStamp); |
} |
/** |
* Override the thisMonth method to format the output |
*/ |
function thisMonth() { |
$thisStamp = parent::thisMonth(TRUE); |
// A human readable string from this month |
return date('F Y',$thisStamp); |
} |
/** |
* Override the nextMonth method to format the output |
*/ |
function nextMonth() { |
$nextStamp = parent::nextMonth(TRUE); |
// Build the URL for next month |
return $_SERVER['PHP_SELF'].'?y='.date('Y',$nextStamp). |
'&m='.date('n',$nextStamp).'&d='.date('j',$nextStamp); |
} |
} |
if (!isset($_GET['y'])) $_GET['y'] = date('Y'); |
if (!isset($_GET['m'])) $_GET['m'] = date('n'); |
// Creata a month as usual |
$Month = new Calendar_Month_Weekdays($_GET['y'],$_GET['m']); |
// Pass it to the decorator and use the decorator from now on... |
$MonthDecorator = new MonthDecorator($Month); |
$MonthDecorator->build(); |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> A Simple Decorator </title> |
</head> |
<body> |
<h1>A Simple Decorator</h1> |
<table> |
<caption><?php echo ( $MonthDecorator->thisMonth() ); ?></caption> |
<?php |
while ( $Day = $MonthDecorator->fetch() ) { |
if ( $Day->isFirst() ) { |
echo ( "\n<tr>\n" ); |
} |
if ( $Day->isEmpty() ) { |
echo ( "<td> </td>" ); |
} else { |
echo ( "<td>".$Day->thisDay()."</td>" ); |
} |
if ( $Day->isLast() ) { |
echo ( "\n</tr>\n" ); |
} |
} |
?> |
<tr> |
<td><a href="<?php echo ($MonthDecorator->prevMonth()); ?>">Prev</a></td> |
<td colspan="5"> </td> |
<td><a href="<?php echo ($MonthDecorator->nextMonth()); ?>">Next</a></td> |
</tr> |
</table> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/20.phps |
---|
New file |
0,0 → 1,240 |
<?php |
/** |
* Description: demonstrates a decorator used to "attach a payload" to a selection |
* to make it available when iterating over calendar children |
*/ |
//if you use ISO-8601 dates, switch to PearDate engine |
define('CALENDAR_ENGINE', 'PearDate'); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT . 'Month/Weekdays.php'; |
require_once CALENDAR_ROOT . 'Day.php'; |
require_once CALENDAR_ROOT . 'Decorator.php'; |
// accepts multiple entries |
class DiaryEvent extends Calendar_Decorator |
{ |
var $entries = array(); |
function DiaryEvent($calendar) { |
Calendar_Decorator::Calendar_Decorator($calendar); |
} |
function addEntry($entry) { |
$this->entries[] = $entry; |
} |
function getEntry() { |
$entry = each($this->entries); |
if ($entry) { |
return $entry['value']; |
} else { |
reset($this->entries); |
return false; |
} |
} |
} |
class MonthPayload_Decorator extends Calendar_Decorator |
{ |
//Calendar engine |
var $cE; |
var $tableHelper; |
var $year; |
var $month; |
var $firstDay = false; |
function build($events=array()) |
{ |
require_once CALENDAR_ROOT . 'Day.php'; |
require_once CALENDAR_ROOT . 'Table/Helper.php'; |
$this->tableHelper = & new Calendar_Table_Helper($this, $this->firstDay); |
$this->cE = & $this->getEngine(); |
$this->year = $this->thisYear(); |
$this->month = $this->thisMonth(); |
$daysInMonth = $this->cE->getDaysInMonth($this->year, $this->month); |
for ($i=1; $i<=$daysInMonth; $i++) { |
$Day = new Calendar_Day(2000,1,1); // Create Day with dummy values |
$Day->setTimeStamp($this->cE->dateToStamp($this->year, $this->month, $i)); |
$this->children[$i] = new DiaryEvent($Day); |
} |
if (count($events) > 0) { |
$this->setSelection($events); |
} |
Calendar_Month_Weekdays::buildEmptyDaysBefore(); |
Calendar_Month_Weekdays::shiftDays(); |
Calendar_Month_Weekdays::buildEmptyDaysAfter(); |
Calendar_Month_Weekdays::setWeekMarkers(); |
return true; |
} |
function setSelection($events) |
{ |
$daysInMonth = $this->cE->getDaysInMonth($this->year, $this->month); |
for ($i=1; $i<=$daysInMonth; $i++) { |
$stamp1 = $this->cE->dateToStamp($this->year, $this->month, $i); |
$stamp2 = $this->cE->dateToStamp($this->year, $this->month, $i+1); |
foreach ($events as $event) { |
if (($stamp1 >= $event['start'] && $stamp1 < $event['end']) || |
($stamp2 >= $event['start'] && $stamp2 < $event['end']) || |
($stamp1 <= $event['start'] && $stamp2 > $event['end']) |
) { |
$this->children[$i]->addEntry($event); |
$this->children[$i]->setSelected(); |
} |
} |
} |
} |
function fetch() |
{ |
$child = each($this->children); |
if ($child) { |
return $child['value']; |
} else { |
reset($this->children); |
return false; |
} |
} |
} |
// Calendar instance used to get the dates in the preferred format: |
// you can switch Calendar Engine and the example still works |
$cal = new Calendar; |
$events = array(); |
//add some events |
$events[] = array( |
'start' => $cal->cE->dateToStamp(2004, 6, 1, 10), |
'end' => $cal->cE->dateToStamp(2004, 6, 1, 12), |
'desc' => 'Important meeting' |
); |
$events[] = array( |
'start' => $cal->cE->dateToStamp(2004, 6, 1, 21), |
'end' => $cal->cE->dateToStamp(2004, 6, 1, 23, 59), |
'desc' => 'Dinner with the boss' |
); |
$events[] = array( |
'start' => $cal->cE->dateToStamp(2004, 6, 5), |
'end' => $cal->cE->dateToStamp(2004, 6, 10, 23, 59), |
'desc' => 'Holidays!' |
); |
$Month = & new Calendar_Month_Weekdays(2004, 6); |
$MonthDecorator = new MonthPayload_Decorator($Month); |
$MonthDecorator->build($events); |
?> |
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> Calendar </title> |
<style text="text/css"> |
table { |
border-collapse: collapse; |
} |
caption { |
font-family: verdana; |
font-size: 14pt; |
padding-bottom: 4pt; |
} |
th { |
font-family: verdana; |
font-size: 11px; |
text-align: center; |
background-color: #e7e3e7; |
padding: 5pt; |
line-height: 150%; |
border: 1px solid #ccc; |
} |
td { |
font-family: verdana; |
font-size: 11px; |
text-align: left; |
vertical-align: top; |
} |
td.calCell { |
border: 1px solid #b5bece; |
padding: 3px; |
} |
td.calCellEmpty { |
background-color: #f3f3f7; |
} |
td.calCellBusy { |
background-color: #efeffa; |
} |
div.dayNumber { |
text-align: right; |
background-color: #f8f8f8; |
border-bottom: 1px solid #ccc; |
} |
ul { |
margin-left: 0; |
margin-top: 5pt; |
padding: 0 10pt 0 12pt; |
list-style-type: square; |
} |
</style> |
</head> |
<body> |
<h2>Sample Calendar Payload Decorator (using <?php echo CALENDAR_ENGINE; ?> engine)</h2> |
<table class="calendar" width="98%" cellspacing="0" cellpadding="0"> |
<caption> |
<?php echo $MonthDecorator->thisMonth().' / '.$MonthDecorator->thisYear(); ?> |
</caption> |
<tr> |
<th>Monday</th> |
<th>Tuesday</th> |
<th>Wednesday</th> |
<th>Thursday</th> |
<th>Friday</th> |
<th>Saturday</th> |
<th>Sunday</th> |
</tr> |
<?php |
while ($Day = $MonthDecorator->fetch()) { |
if ($Day->isFirst()) { |
echo "<tr>\n"; |
} |
echo '<td class="calCell'; |
if ($Day->isSelected()) { |
echo ' calCellBusy'; |
} elseif ($Day->isEmpty()) { |
echo ' calCellEmpty'; |
} |
echo '">'; |
echo '<div class="dayNumber">'.$Day->thisDay().'</div>'; |
if ($Day->isEmpty()) { |
echo ' '; |
} else { |
echo '<div class="dayContents"><ul>'; |
while ($entry = $Day->getEntry()) { |
echo '<li>'.$entry['desc'].'</li>'; |
//you can print the time range as well |
} |
echo '</ul></div>'; |
} |
echo '</td>'; |
if ($Day->isLast()) { |
echo "</tr>\n"; |
} |
} |
?> |
</table> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/12.phps |
---|
New file |
0,0 → 1,116 |
<?php |
/** |
* Description: a complete year |
*/ |
function getmicrotime(){ |
list($usec, $sec) = explode(" ",microtime()); |
return ((float)$usec + (float)$sec); |
} |
$start = getmicrotime(); |
if ( !@include 'Calendar/Calendar.php' ) { |
define('CALENDAR_ROOT','../../'); |
} |
require_once CALENDAR_ROOT.'Year.php'; |
define ('CALENDAR_MONTH_STATE',CALENDAR_USE_MONTH_WEEKDAYS); |
if ( !isset($_GET['year']) ) $_GET['year'] = date('Y'); |
$Year = new Calendar_Year($_GET['year']); |
$Year->build(); |
?> |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
<html> |
<head> |
<title> <?php echo ( $Year->thisYear() ); ?> </title> |
<style type="text/css"> |
body { |
font-family: Georgia, serif; |
} |
caption.year { |
font-weight: bold; |
font-size: 120%; |
font-color: navy; |
} |
caption.month { |
font-size: 110%; |
font-color: navy; |
} |
table.month { |
border: thin groove #800080 |
} |
tr { |
vertical-align: top; |
} |
th, td { |
text-align: right; |
font-size: 70%; |
} |
#prev { |
float: left; |
font-size: 70%; |
} |
#next { |
float: right; |
font-size: 70%; |
} |
</style> |
</head> |
<body> |
<table> |
<caption class="year"> |
<?php echo ( $Year->thisYear() ); ?> |
<div id="next"> |
<a href="?year=<?php echo ( $Year->nextYear() ); ?>">>></a> |
</div> |
<div id="prev"> |
<a href="?year=<?php echo ( $Year->prevYear() ); ?>"><<</a> |
</div> |
</caption> |
<?php |
$i = 0; |
while ( $Month = $Year->fetch() ) { |
switch ( $i ) { |
case 0: |
echo ( "<tr>\n" ); |
break; |
case 3: |
case 6: |
case 9: |
echo ( "</tr>\n<tr>\n" ); |
break; |
case 12: |
echo ( "</tr>\n" ); |
break; |
} |
echo ( "<td>\n<table class=\"month\">\n" ); |
echo ( "<caption class=\"month\">".date('F',$Month->thisMonth(TRUE))."</caption>" ); |
echo ( "<tr>\n<th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th>\n</tr>" ); |
$Month->build(); |
while ( $Day = $Month->fetch() ) { |
if ( $Day->isFirst() ) { |
echo ( "<tr>\n" ); |
} |
if ( $Day->isEmpty() ) { |
echo ( "<td> </td>\n" ); |
} else { |
echo ( "<td>".$Day->thisDay()."</td>\n" ); |
} |
if ( $Day->isLast() ) { |
echo ( "</tr>\n" ); |
} |
} |
echo ( "</table>\n</td>\n" ); |
$i++; |
} |
?> |
</table> |
<p>Took: <?php echo ((getmicrotime()-$start)); ?></p> |
</body> |
</html> |
/trunk/classes/pear/Calendar/docs/examples/22.phps |
---|
New file |
0,0 → 1,46 |
<?php |
/** |
* Description: demonstrates using the Uri util |
*/ |
if (!@include 'Calendar/Calendar.php') { |
define('CALENDAR_ROOT', '../../'); |
} |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
require_once CALENDAR_ROOT.'Util/Uri.php'; |
if (!isset($_GET['jahr'])) $_GET['jahr'] = date('Y'); |
if (!isset($_GET['monat'])) $_GET['monat'] = date('m'); |
// Build the month |
$Calendar = new Calendar_Month_Weekdays($_GET['jahr'], $_GET['monat']); |
echo ( '<p>The current month is ' |
.$Calendar->thisMonth().' of year '.$Calendar->thisYear().'</p>'); |
$Uri = & new Calendar_Util_Uri('jahr','monat'); |
$Uri->setFragments('jahr','monat'); |
echo "\"Vector\" URIs<pre>"; |
echo ( "Previous Uri:\t".htmlentities($Uri->prev($Calendar, 'month'))."\n" ); |
echo ( "This Uri:\t".htmlentities($Uri->this($Calendar, 'month'))."\n" ); |
echo ( "Next Uri:\t".htmlentities($Uri->next($Calendar, 'month'))."\n" ); |
echo "</pre>"; |
// Switch to scalar URIs |
$Uri->separator = '/'; // Default is & |
$Uri->scalar = true; // Omit variable names |
echo "\"Scalar\" URIs<pre>"; |
echo ( "Previous Uri:\t".$Uri->prev($Calendar, 'month')."\n" ); |
echo ( "This Uri:\t".$Uri->this($Calendar, 'month')."\n" ); |
echo ( "Next Uri:\t".$Uri->next($Calendar, 'month')."\n" ); |
echo "</pre>"; |
// Restore the vector URIs |
$Uri->separator = '&'; |
$Uri->scalar = false; |
?> |
<p> |
<a href="<?php echo($_SERVER['PHP_SELF'].'?'.$Uri->prev($Calendar, 'month'));?>">Prev</a> : |
<a href="<?php echo($_SERVER['PHP_SELF'].'?'.$Uri->next($Calendar, 'month'));?>">Next</a> |
</p> |
/trunk/classes/pear/Calendar/Factory.php |
---|
New file |
0,0 → 1,145 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// | Lorenzo Alberton <l dot alberton at quipo dot it> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Factory.php,v 1.3 2005/10/22 10:08:47 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Factory.php,v 1.3 2005/10/22 10:08:47 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar base class |
*/ |
require_once CALENDAR_ROOT.'Calendar.php'; |
/** |
* Contains a factory method to return a Singleton instance of a class |
* implementing the Calendar_Engine_Interface.<br> |
* For Month objects, to control type of month returned, use CALENDAR_MONTH_STATE |
* constact e.g.; |
* <code> |
* require_once 'Calendar/Factory.php'; |
* define ('CALENDAR_MONTH_STATE',CALENDAR_USE_MONTH_WEEKDAYS); // Use Calendar_Month_Weekdays |
* // define ('CALENDAR_MONTH_STATE',CALENDAR_USE_MONTH_WEEKS); // Use Calendar_Month_Weeks |
* // define ('CALENDAR_MONTH_STATE',CALENDAR_USE_MONTH); // Use Calendar_Month |
* </code> |
* It defaults to building Calendar_Month objects.<br> |
* Use the constract CALENDAR_FIRST_DAY_OF_WEEK to control the first day of the week |
* for Month or Week objects (e.g. 0 = Sunday, 6 = Saturday) |
* @package Calendar |
* @access protected |
*/ |
class Calendar_Factory |
{ |
/** |
* Creates a calendar object given the type and units |
* @param string class of calendar object to create |
* @param int year |
* @param int month |
* @param int day |
* @param int hour |
* @param int minute |
* @param int second |
* @return object subclass of Calendar |
* @access public |
* @static |
*/ |
function create($type, $y = 2000, $m = 1, $d = 1, $h = 0, $i = 0, $s = 0) |
{ |
$firstDay = defined('CALENDAR_FIRST_DAY_OF_WEEK') ? CALENDAR_FIRST_DAY_OF_WEEK : 1; |
switch ($type) { |
case 'Day': |
require_once CALENDAR_ROOT.'Day.php'; |
return new Calendar_Day($y,$m,$d); |
case 'Month': |
// Set default state for which month type to build |
if (!defined('CALENDAR_MONTH_STATE')) { |
define('CALENDAR_MONTH_STATE', CALENDAR_USE_MONTH); |
} |
switch (CALENDAR_MONTH_STATE) { |
case CALENDAR_USE_MONTH_WEEKDAYS: |
require_once CALENDAR_ROOT.'Month/Weekdays.php'; |
$class = 'Calendar_Month_Weekdays'; |
break; |
case CALENDAR_USE_MONTH_WEEKS: |
require_once CALENDAR_ROOT.'Month/Weeks.php'; |
$class = 'Calendar_Month_Weeks'; |
break; |
case CALENDAR_USE_MONTH: |
default: |
require_once CALENDAR_ROOT.'Month.php'; |
$class = 'Calendar_Month'; |
break; |
} |
return new $class($y, $m, $firstDay); |
case 'Week': |
require_once CALENDAR_ROOT.'Week.php'; |
return new Calendar_Week($y, $m, $d, $firstDay); |
case 'Hour': |
require_once CALENDAR_ROOT.'Hour.php'; |
return new Calendar_Hour($y, $m, $d, $h); |
case 'Minute': |
require_once CALENDAR_ROOT.'Minute.php'; |
return new Calendar_Minute($y, $m, $d, $h, $i); |
case 'Second': |
require_once CALENDAR_ROOT.'Second.php'; |
return new Calendar_Second($y,$m,$d,$h,$i,$s); |
case 'Year': |
require_once CALENDAR_ROOT.'Year.php'; |
return new Calendar_Year($y); |
default: |
require_once 'PEAR.php'; |
PEAR::raiseError( |
'Calendar_Factory::create() unrecognised type: '.$type, null, PEAR_ERROR_TRIGGER, |
E_USER_NOTICE, 'Calendar_Factory::create()'); |
return false; |
} |
} |
/** |
* Creates an instance of a calendar object, given a type and timestamp |
* @param string type of object to create |
* @param mixed timestamp (depending on Calendar engine being used) |
* @return object subclass of Calendar |
* @access public |
* @static |
*/ |
function & createByTimestamp($type, $stamp) |
{ |
$cE = & Calendar_Engine_Factory::getEngine(); |
$y = $cE->stampToYear($stamp); |
$m = $cE->stampToMonth($stamp); |
$d = $cE->stampToDay($stamp); |
$h = $cE->stampToHour($stamp); |
$i = $cE->stampToMinute($stamp); |
$s = $cE->stampToSecond($stamp); |
$cal = Calendar_Factory::create($type, $y, $m, $d, $h, $i, $s); |
return $cal; |
} |
} |
?> |
/trunk/classes/pear/Calendar/Calendar.php |
---|
New file |
0,0 → 1,685 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// | Lorenzo Alberton <l dot alberton at quipo dot it> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Calendar.php,v 1.3 2005/10/22 10:07:11 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Calendar.php,v 1.3 2005/10/22 10:07:11 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Constant which defines the calculation engine to use |
*/ |
if (!defined('CALENDAR_ENGINE')) { |
define('CALENDAR_ENGINE', 'UnixTS'); |
} |
/** |
* Define Calendar Month states |
*/ |
define('CALENDAR_USE_MONTH', 1); |
define('CALENDAR_USE_MONTH_WEEKDAYS', 2); |
define('CALENDAR_USE_MONTH_WEEKS', 3); |
/** |
* Contains a factory method to return a Singleton instance of a class |
* implementing the Calendar_Engine_Interface.<br> |
* <b>Note:</b> this class must be modified to "register" alternative |
* Calendar_Engines. The engine used can be controlled with the constant |
* CALENDAR_ENGINE |
* @see Calendar_Engine_Interface |
* @package Calendar |
* @access protected |
*/ |
class Calendar_Engine_Factory |
{ |
/** |
* Returns an instance of the engine |
* @return object instance of a calendar calculation engine |
* @access protected |
*/ |
function & getEngine() |
{ |
static $engine = false; |
switch (CALENDAR_ENGINE) { |
case 'PearDate': |
$class = 'Calendar_Engine_PearDate'; |
break; |
case 'UnixTS': |
default: |
$class = 'Calendar_Engine_UnixTS'; |
break; |
} |
if (!$engine) { |
if (!class_exists($class)) { |
require_once CALENDAR_ROOT.'Engine'.DIRECTORY_SEPARATOR.CALENDAR_ENGINE.'.php'; |
} |
$engine = new $class; |
} |
return $engine; |
} |
} |
/** |
* Base class for Calendar API. This class should not be instantiated |
* directly. |
* @abstract |
* @package Calendar |
*/ |
class Calendar |
{ |
/** |
* Instance of class implementing calendar engine interface |
* @var object |
* @access private |
*/ |
var $cE; |
/** |
* Instance of Calendar_Validator (lazy initialized when isValid() or |
* getValidor() is called |
* @var Calendar_Validator |
* @access private |
*/ |
var $validator; |
/** |
* Year for this calendar object e.g. 2003 |
* @access private |
* @var int |
*/ |
var $year; |
/** |
* Month for this calendar object e.g. 9 |
* @access private |
* @var int |
*/ |
var $month; |
/** |
* Day of month for this calendar object e.g. 23 |
* @access private |
* @var int |
*/ |
var $day; |
/** |
* Hour of day for this calendar object e.g. 13 |
* @access private |
* @var int |
*/ |
var $hour; |
/** |
* Minute of hour this calendar object e.g. 46 |
* @access private |
* @var int |
*/ |
var $minute; |
/** |
* Second of minute this calendar object e.g. 34 |
* @access private |
* @var int |
*/ |
var $second; |
/** |
* Marks this calendar object as selected (e.g. 'today') |
* @access private |
* @var boolean |
*/ |
var $selected = false; |
/** |
* Collection of child calendar objects created from subclasses |
* of Calendar. Type depends on the object which created them. |
* @access private |
* @var array |
*/ |
var $children = array(); |
/** |
* Constructs the Calendar |
* @param int year |
* @param int month |
* @param int day |
* @param int hour |
* @param int minute |
* @param int second |
* @access protected |
*/ |
function Calendar($y = 2000, $m = 1, $d = 1, $h = 0, $i = 0, $s = 0) |
{ |
static $cE = null; |
if (!isset($cE)) { |
$cE = & Calendar_Engine_Factory::getEngine(); |
} |
$this->cE = & $cE; |
$this->year = (int)$y; |
$this->month = (int)$m; |
$this->day = (int)$d; |
$this->hour = (int)$h; |
$this->minute = (int)$i; |
$this->second = (int)$s; |
} |
/** |
* Defines the calendar by a timestamp (Unix or ISO-8601), replacing values |
* passed to the constructor |
* @param int|string Unix or ISO-8601 timestamp |
* @return void |
* @access public |
*/ |
function setTimestamp($ts) |
{ |
$this->year = $this->cE->stampToYear($ts); |
$this->month = $this->cE->stampToMonth($ts); |
$this->day = $this->cE->stampToDay($ts); |
$this->hour = $this->cE->stampToHour($ts); |
$this->minute = $this->cE->stampToMinute($ts); |
$this->second = $this->cE->stampToSecond($ts); |
} |
/** |
* Returns a timestamp from the current date / time values. Format of |
* timestamp depends on Calendar_Engine implementation being used |
* @return int|string timestamp |
* @access public |
*/ |
function getTimestamp() |
{ |
return $this->cE->dateToStamp( |
$this->year, $this->month, $this->day, |
$this->hour, $this->minute, $this->second); |
} |
/** |
* Defines calendar object as selected (e.g. for today) |
* @param boolean state whether Calendar subclass |
* @return void |
* @access public |
*/ |
function setSelected($state = true) |
{ |
$this->selected = $state; |
} |
/** |
* True if the calendar subclass object is selected (e.g. today) |
* @return boolean |
* @access public |
*/ |
function isSelected() |
{ |
return $this->selected; |
} |
/** |
* Adjusts the date (helper method) |
* @return void |
* @access public |
*/ |
function adjust() |
{ |
$stamp = $this->getTimeStamp(); |
$this->year = $this->cE->stampToYear($stamp); |
$this->month = $this->cE->stampToMonth($stamp); |
$this->day = $this->cE->stampToDay($stamp); |
$this->hour = $this->cE->stampToHour($stamp); |
$this->minute = $this->cE->stampToMinute($stamp); |
$this->second = $this->cE->stampToSecond($stamp); |
} |
/** |
* Returns the date as an associative array (helper method) |
* @param mixed timestamp (leave empty for current timestamp) |
* @return array |
* @access public |
*/ |
function toArray($stamp=null) |
{ |
if (is_null($stamp)) { |
$stamp = $this->getTimeStamp(); |
} |
return array( |
'year' => $this->cE->stampToYear($stamp), |
'month' => $this->cE->stampToMonth($stamp), |
'day' => $this->cE->stampToDay($stamp), |
'hour' => $this->cE->stampToHour($stamp), |
'minute' => $this->cE->stampToMinute($stamp), |
'second' => $this->cE->stampToSecond($stamp) |
); |
} |
/** |
* Returns the value as an associative array (helper method) |
* @param string type of date object that return value represents |
* @param string $format ['int' | 'array' | 'timestamp' | 'object'] |
* @param mixed timestamp (depending on Calendar engine being used) |
* @param int integer default value (i.e. give me the answer quick) |
* @return mixed |
* @access private |
*/ |
function returnValue($returnType, $format, $stamp, $default) |
{ |
switch (strtolower($format)) { |
case 'int': |
return $default; |
case 'array': |
return $this->toArray($stamp); |
break; |
case 'object': |
require_once CALENDAR_ROOT.'Factory.php'; |
return Calendar_Factory::createByTimestamp($returnType,$stamp); |
break; |
case 'timestamp': |
default: |
return $stamp; |
break; |
} |
} |
/** |
* Abstract method for building the children of a calendar object. |
* Implemented by Calendar subclasses |
* @param array containing Calendar objects to select (optional) |
* @return boolean |
* @access public |
* @abstract |
*/ |
function build($sDates = array()) |
{ |
require_once 'PEAR.php'; |
PEAR::raiseError( |
'Calendar::build is abstract', null, PEAR_ERROR_TRIGGER, |
E_USER_NOTICE, 'Calendar::build()'); |
return false; |
} |
/** |
* Abstract method for selected data objects called from build |
* @param array |
* @return boolean |
* @access public |
* @abstract |
*/ |
function setSelection($sDates) |
{ |
require_once 'PEAR.php'; |
PEAR::raiseError( |
'Calendar::setSelection is abstract', null, PEAR_ERROR_TRIGGER, |
E_USER_NOTICE, 'Calendar::setSelection()'); |
return false; |
} |
/** |
* Iterator method for fetching child Calendar subclass objects |
* (e.g. a minute from an hour object). On reaching the end of |
* the collection, returns false and resets the collection for |
* further iteratations. |
* @return mixed either an object subclass of Calendar or false |
* @access public |
*/ |
function fetch() |
{ |
$child = each($this->children); |
if ($child) { |
return $child['value']; |
} else { |
reset($this->children); |
return false; |
} |
} |
/** |
* Fetches all child from the current collection of children |
* @return array |
* @access public |
*/ |
function fetchAll() |
{ |
return $this->children; |
} |
/** |
* Get the number Calendar subclass objects stored in the internal |
* collection. |
* @return int |
* @access public |
*/ |
function size() |
{ |
return count($this->children); |
} |
/** |
* Determine whether this date is valid, with the bounds determined by |
* the Calendar_Engine. The call is passed on to |
* Calendar_Validator::isValid |
* @return boolean |
* @access public |
*/ |
function isValid() |
{ |
$validator = & $this->getValidator(); |
return $validator->isValid(); |
} |
/** |
* Returns an instance of Calendar_Validator |
* @return Calendar_Validator |
* @access public |
*/ |
function & getValidator() |
{ |
if (!isset($this->validator)) { |
require_once CALENDAR_ROOT.'Validator.php'; |
$this->validator = & new Calendar_Validator($this); |
} |
return $this->validator; |
} |
/** |
* Returns a reference to the current Calendar_Engine being used. Useful |
* for Calendar_Table_Helper and Calendar_Validator |
* @return object implementing Calendar_Engine_Inteface |
* @access protected |
*/ |
function & getEngine() |
{ |
return $this->cE; |
} |
/** |
* Set the CALENDAR_FIRST_DAY_OF_WEEK constant to the $firstDay value |
* if the constant is not set yet. |
* @throws E_USER_WARNING this method throws a WARNING if the |
* CALENDAR_FIRST_DAY_OF_WEEK constant is already defined and |
* the $firstDay parameter is set to a different value |
* @param integer $firstDay first day of the week (0=sunday, 1=monday, ...) |
* @return integer |
* @access protected |
*/ |
function defineFirstDayOfWeek($firstDay = null) |
{ |
if (defined('CALENDAR_FIRST_DAY_OF_WEEK')) { |
if (!is_null($firstDay) && ($firstDay != CALENDAR_FIRST_DAY_OF_WEEK)) { |
$msg = 'CALENDAR_FIRST_DAY_OF_WEEK constant already defined.' |
.' The $firstDay parameter will be ignored.'; |
trigger_error($msg, E_USER_WARNING); |
} |
return CALENDAR_FIRST_DAY_OF_WEEK; |
} |
if (is_null($firstDay)) { |
$firstDay = $this->cE->getFirstDayOfWeek( |
$this->thisYear(), |
$this->thisMonth(), |
$this->thisDay() |
); |
} |
define ('CALENDAR_FIRST_DAY_OF_WEEK', $firstDay); |
return CALENDAR_FIRST_DAY_OF_WEEK; |
} |
/** |
* Returns the value for the previous year |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 2002 or timestamp |
* @access public |
*/ |
function prevYear($format = 'int') |
{ |
$ts = $this->cE->dateToStamp($this->year-1, 1, 1, 0, 0, 0); |
return $this->returnValue('Year', $format, $ts, $this->year-1); |
} |
/** |
* Returns the value for this year |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 2003 or timestamp |
* @access public |
*/ |
function thisYear($format = 'int') |
{ |
$ts = $this->cE->dateToStamp($this->year, 1, 1, 0, 0, 0); |
return $this->returnValue('Year', $format, $ts, $this->year); |
} |
/** |
* Returns the value for next year |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 2004 or timestamp |
* @access public |
*/ |
function nextYear($format = 'int') |
{ |
$ts = $this->cE->dateToStamp($this->year+1, 1, 1, 0, 0, 0); |
return $this->returnValue('Year', $format, $ts, $this->year+1); |
} |
/** |
* Returns the value for the previous month |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 4 or Unix timestamp |
* @access public |
*/ |
function prevMonth($format = 'int') |
{ |
$ts = $this->cE->dateToStamp($this->year, $this->month-1, 1, 0, 0, 0); |
return $this->returnValue('Month', $format, $ts, $this->cE->stampToMonth($ts)); |
} |
/** |
* Returns the value for this month |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 5 or timestamp |
* @access public |
*/ |
function thisMonth($format = 'int') |
{ |
$ts = $this->cE->dateToStamp($this->year, $this->month, 1, 0, 0, 0); |
return $this->returnValue('Month', $format, $ts, $this->month); |
} |
/** |
* Returns the value for next month |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 6 or timestamp |
* @access public |
*/ |
function nextMonth($format = 'int') |
{ |
$ts = $this->cE->dateToStamp($this->year, $this->month+1, 1, 0, 0, 0); |
return $this->returnValue('Month', $format, $ts, $this->cE->stampToMonth($ts)); |
} |
/** |
* Returns the value for the previous day |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 10 or timestamp |
* @access public |
*/ |
function prevDay($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day-1, 0, 0, 0); |
return $this->returnValue('Day', $format, $ts, $this->cE->stampToDay($ts)); |
} |
/** |
* Returns the value for this day |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 11 or timestamp |
* @access public |
*/ |
function thisDay($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day, 0, 0, 0); |
return $this->returnValue('Day', $format, $ts, $this->day); |
} |
/** |
* Returns the value for the next day |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 12 or timestamp |
* @access public |
*/ |
function nextDay($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day+1, 0, 0, 0); |
return $this->returnValue('Day', $format, $ts, $this->cE->stampToDay($ts)); |
} |
/** |
* Returns the value for the previous hour |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 13 or timestamp |
* @access public |
*/ |
function prevHour($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day, $this->hour-1, 0, 0); |
return $this->returnValue('Hour', $format, $ts, $this->cE->stampToHour($ts)); |
} |
/** |
* Returns the value for this hour |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 14 or timestamp |
* @access public |
*/ |
function thisHour($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day, $this->hour, 0, 0); |
return $this->returnValue('Hour', $format, $ts, $this->hour); |
} |
/** |
* Returns the value for the next hour |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 14 or timestamp |
* @access public |
*/ |
function nextHour($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day, $this->hour+1, 0, 0); |
return $this->returnValue('Hour', $format, $ts, $this->cE->stampToHour($ts)); |
} |
/** |
* Returns the value for the previous minute |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 23 or timestamp |
* @access public |
*/ |
function prevMinute($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day, |
$this->hour, $this->minute-1, 0); |
return $this->returnValue('Minute', $format, $ts, $this->cE->stampToMinute($ts)); |
} |
/** |
* Returns the value for this minute |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 24 or timestamp |
* @access public |
*/ |
function thisMinute($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day, |
$this->hour, $this->minute, 0); |
return $this->returnValue('Minute', $format, $ts, $this->minute); |
} |
/** |
* Returns the value for the next minute |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 25 or timestamp |
* @access public |
*/ |
function nextMinute($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day, |
$this->hour, $this->minute+1, 0); |
return $this->returnValue('Minute', $format, $ts, $this->cE->stampToMinute($ts)); |
} |
/** |
* Returns the value for the previous second |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 43 or timestamp |
* @access public |
*/ |
function prevSecond($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day, |
$this->hour, $this->minute, $this->second-1); |
return $this->returnValue('Second', $format, $ts, $this->cE->stampToSecond($ts)); |
} |
/** |
* Returns the value for this second |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 44 or timestamp |
* @access public |
*/ |
function thisSecond($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day, |
$this->hour, $this->minute, $this->second); |
return $this->returnValue('Second', $format, $ts, $this->second); |
} |
/** |
* Returns the value for the next second |
* @param string return value format ['int' | 'timestamp' | 'object' | 'array'] |
* @return int e.g. 45 or timestamp |
* @access public |
*/ |
function nextSecond($format = 'int') |
{ |
$ts = $this->cE->dateToStamp( |
$this->year, $this->month, $this->day, |
$this->hour, $this->minute, $this->second+1); |
return $this->returnValue('Second', $format, $ts, $this->cE->stampToSecond($ts)); |
} |
} |
?> |
/trunk/classes/pear/Calendar/Second.php |
---|
New file |
0,0 → 1,98 |
<?php |
/* vim: set expandtab tabstop=4 shiftwidth=4: */ |
// |
// +----------------------------------------------------------------------+ |
// | PHP Version 4 | |
// +----------------------------------------------------------------------+ |
// | Copyright (c) 1997-2002 The PHP Group | |
// +----------------------------------------------------------------------+ |
// | This source file is subject to version 2.02 of the PHP license, | |
// | that is bundled with this package in the file LICENSE, and is | |
// | available at through the world-wide-web at | |
// | http://www.php.net/license/3_0.txt. | |
// | If you did not receive a copy of the PHP license and are unable to | |
// | obtain it through the world-wide-web, please send a note to | |
// | license@php.net so we can mail you a copy immediately. | |
// +----------------------------------------------------------------------+ |
// | Authors: Harry Fuecks <hfuecks@phppatterns.com> | |
// +----------------------------------------------------------------------+ |
// |
// $Id: Second.php,v 1.1 2004/05/24 22:25:42 quipo Exp $ |
// |
/** |
* @package Calendar |
* @version $Id: Second.php,v 1.1 2004/05/24 22:25:42 quipo Exp $ |
*/ |
/** |
* Allows Calendar include path to be redefined |
* @ignore |
*/ |
if (!defined('CALENDAR_ROOT')) { |
define('CALENDAR_ROOT', 'Calendar'.DIRECTORY_SEPARATOR); |
} |
/** |
* Load Calendar base class |
*/ |
require_once CALENDAR_ROOT.'Calendar.php'; |
/** |
* Represents a Second<br /> |
* <b>Note:</b> Seconds do not build other objects |
* so related methods are overridden to return NULL |
* @package Calendar |
*/ |
class Calendar_Second extends Calendar |
{ |
/** |
* Constructs Second |
* @param int year e.g. 2003 |
* @param int month e.g. 5 |
* @param int day e.g. 11 |
* @param int hour e.g. 13 |
* @param int minute e.g. 31 |
* @param int second e.g. 45 |
*/ |
function Calendar_Second($y, $m, $d, $h, $i, $s) |
{ |
Calendar::Calendar($y, $m, $d, $h, $i, $s); |
} |
/** |
* Overwrite build |
* @return NULL |
*/ |
function build() |
{ |
return null; |
} |
/** |
* Overwrite fetch |
* @return NULL |
*/ |
function fetch() |
{ |
return null; |
} |
/** |
* Overwrite fetchAll |
* @return NULL |
*/ |
function fetchAll() |
{ |
return null; |
} |
/** |
* Overwrite size |
* @return NULL |
*/ |
function size() |
{ |
return null; |
} |
} |
?> |
/trunk/classes/aAction.class.php |
---|
New file |
0,0 → 1,65 |
<?php |
abstract class aAction { |
private static $resultat = null; |
private $suivant = null; |
public function getResultat() |
{ |
if (aAction::$resultat == null) { |
aAction::$resultat = new Resultat; |
} else { |
return aAction::$resultat; |
} |
} |
public function getSuivant() |
{ |
return $this->suivant; |
} |
public function setSuivant($s) |
{ |
if (is_array($s)){ |
$this->suivant = $s; |
} else { |
$this->suivant[] = $s; |
} |
} |
public function verifier(Resultat $Resultat) |
{ |
// Nous rassemblons les valeurs du tableau _POST contenat des : dans sous tableau de _POST. |
foreach ($_POST as $cle => $val) { |
$morceau = array(); |
if (preg_match('/^(.+):(.+)$/', $cle, $morceau)) { |
$_POST[$morceau[1]][] = $morceau[2]; |
unset($_POST[$cle]); |
} |
} |
} |
public function demarrer() |
{ |
$Resultat = $this->getResultat(); |
$this->executer($Resultat); |
if ($this->getSuivant() != null) { |
for ($i = 0; $i < count($this->getSuivant()) ; $i++) { |
$liste_actions = $this->getSuivant(); |
if ($liste_actions[$i] instanceof aAction) { |
$liste_actions[$i]->demarrer(); |
} else { |
if ($liste_actions[$i] == '__defaut__') { |
$methode = 'executer'; |
} else { |
$methode = 'executer'.$liste_actions[$i]; |
} |
$this->$methode($Resultat); |
} |
} |
} |
} |
abstract protected function executer(Resultat $Resultat); |
} |
?> |
/trunk/classes/metiers/Absence.class.php |
---|
New file |
0,0 → 1,195 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe Absence |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class Absence : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class Absence extends aGttSql { |
/*** Constantes : */ |
const GA_ID = 'ABSENCE_ID'; |
const GA_ID_MAX = 'ABSENCE_ID_MAX'; |
/*** Attributs : */ |
private $id_abscence; |
private $ce_absence_motif; |
private $ce_utilisateur; |
private $date_debut; |
private $date_fin; |
private $date_envoi_lettre; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_absence'; |
$this->dao_correspondance = array( |
'ga_id_abscence' => 'id_abscence', |
'ga_ce_absence_motif' => 'ce_absence_motif', |
'ga_ce_utilisateur' => 'ce_utilisateur', |
'ga_date_debut' => 'date_debut', |
'ga_date_fin' => 'date_fin', |
'ga_date_envoi_lettre' => 'date_envoi_lettre'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Abscence |
public function getIdAbscence() |
{ |
return $this->id_abscence; |
} |
public function setIdAbscence( $ia ) |
{ |
$this->id_abscence = $ia; |
} |
// Ce Absence Motif |
public function getCeAbsenceMotif() |
{ |
return $this->ce_absence_motif; |
} |
public function setCeAbsenceMotif( $cam ) |
{ |
$this->ce_absence_motif = $cam; |
} |
// Ce Utilisateur |
public function getCeUtilisateur() |
{ |
return $this->ce_utilisateur; |
} |
public function setCeUtilisateur( $cu ) |
{ |
$this->ce_utilisateur = $cu; |
} |
// Date Debut |
public function getDateDebut() |
{ |
return $this->date_debut; |
} |
public function setDateDebut( $dd ) |
{ |
$this->date_debut = $dd; |
} |
// Date Fin |
public function getDateFin() |
{ |
return $this->date_fin; |
} |
public function setDateFin( $df ) |
{ |
$this->date_fin = $df; |
} |
// Date Envoi Lettre |
public function getDateEnvoiLettre() |
{ |
return $this->date_envoi_lettre; |
} |
public function setDateEnvoiLettre( $del ) |
{ |
$this->date_envoi_lettre = $del; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_absence. |
* @return mixed un tableau d'objets Absence s'il y en a plusieurs, l'objet Absence s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
switch ($cmd) { |
case Absence::GA_ID: |
$requete = 'SELECT * '. |
'FROM gestion_absence '. |
'WHERE ga_id_abscence = '.$parametres[0].' '; |
break; |
case Absence::GA_ID_MAX: |
$requete = 'SELECT MAX(ga_id_abscence) '. |
'FROM gestion_absence '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet Absence */ |
function afficherAbsence() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/Projet.class.php |
---|
New file |
0,0 → 1,215 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe Projet |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class Projet : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class Projet extends aGttSql { |
/*** Constantes : */ |
const GP_TOUS = 'PROJET_TOUS'; |
const GP_ID = 'PROJET_ID'; |
const GP_ID_MAX = 'PROJET_ID_MAX'; |
/*** Attributs : */ |
private $id_projet; |
private $ce_categorie; |
private $nom_projet; |
private $description; |
private $date_debut; |
private $duree_prevue; |
private $avancement; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_projet'; |
$this->dao_correspondance = array( |
'gp_id_projet' => 'id_projet', |
'gp_ce_categorie' => 'ce_categorie', |
'gp_nom_projet' => 'nom_projet', |
'gp_description' => 'description', |
'gp_date_debut' => 'date_debut', |
'gp_duree_prevue' => 'duree_prevue', |
'gp_avancement' => 'avancement'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Projet |
public function getIdProjet() |
{ |
return $this->id_projet; |
} |
public function setIdProjet( $ip ) |
{ |
$this->id_projet = $ip; |
} |
// Ce Categorie |
public function getCeCategorie() |
{ |
return $this->ce_categorie; |
} |
public function setCeCategorie( $cc ) |
{ |
$this->ce_categorie = $cc; |
} |
// Nom Projet |
public function getNomProjet() |
{ |
return $this->nom_projet; |
} |
public function setNomProjet( $np ) |
{ |
$this->nom_projet = $np; |
} |
// Description |
public function getDescription() |
{ |
return $this->description; |
} |
public function setDescription( $d ) |
{ |
$this->description = $d; |
} |
// Date Debut |
public function getDateDebut() |
{ |
return $this->date_debut; |
} |
public function setDateDebut( $dd ) |
{ |
$this->date_debut = $dd; |
} |
// Duree Prevue |
public function getDureePrevue() |
{ |
return $this->duree_prevue; |
} |
public function setDureePrevue( $dp ) |
{ |
$this->duree_prevue = $dp; |
} |
// Avancement |
public function getAvancement() |
{ |
return $this->avancement; |
} |
public function setAvancement( $a ) |
{ |
$this->avancement = $a; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_projet. |
* @return mixed un tableau d'objets Projet s'il y en a plusieurs, l'objet Projet s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
if (!is_array($parametres)) { |
$parametres[0] = $parametres; |
} |
switch ($cmd) { |
case Projet::GP_TOUS: |
$requete = 'SELECT * '. |
'FROM gestion_projet '; |
break; |
case Projet::GP_ID: |
$requete = 'SELECT * '. |
'FROM gestion_projet '. |
'WHERE gp_id_projet = '.$parametres[0].' '; |
break; |
case Projet::GP_ID_MAX: |
$requete = 'SELECT MAX(gp_id_projet) '. |
'FROM gestion_projet '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet Projet */ |
function afficherProjet() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/ProjetCategorie.class.php |
---|
New file |
0,0 → 1,150 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe ProjetCategorie |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class ProjetCategorie : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class ProjetCategorie extends aGttSql { |
/*** Constantes : */ |
const GPC_ID = 'PROJETCATEGORIE_ID'; |
const GPC_ID_MAX = 'PROJETCATEGORIE_ID_MAX'; |
/*** Attributs : */ |
private $id_categorie; |
private $libelle; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_projet_categorie'; |
$this->dao_correspondance = array( |
'gpc_id_categorie' => 'id_categorie', |
'gpc_libelle' => 'libelle'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Categorie |
public function getIdCategorie() |
{ |
return $this->id_categorie; |
} |
public function setIdCategorie( $ic ) |
{ |
$this->id_categorie = $ic; |
} |
// Libelle |
public function getLibelle() |
{ |
return $this->libelle; |
} |
public function setLibelle( $l ) |
{ |
$this->libelle = $l; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_projet_categorie. |
* @return mixed un tableau d'objets ProjetCategorie s'il y en a plusieurs, l'objet ProjetCategorie s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
if (!is_array($parametres)) { |
$parametres[0] = $parametres; |
} |
switch ($cmd) { |
case ProjetCategorie::GPC_ID: |
$requete = 'SELECT * '. |
'FROM gestion_projet_categorie '. |
'WHERE gpc_id_categorie = '.$parametres[0].' '; |
break; |
case ProjetCategorie::GPC_ID_MAX: |
$requete = 'SELECT MAX(gpc_id_categorie) '. |
'FROM gestion_projet_categorie '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet ProjetCategorie */ |
function afficherProjetCategorie() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/TravailProjet.class.php |
---|
New file |
0,0 → 1,181 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe TravailProjet |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class TravailProjet : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class TravailProjet extends aGttSql { |
/*** Constantes : */ |
const GTP_ID = 'TRAVAILPROJET_ID'; |
const GTP_ID_MAX_UTILISATEUR = 'TRAVAILPROJET_ID_MAX_UTILISATEUR'; |
const GTP_ID_MAX_PROJET = 'TRAVAILPROJET_ID_MAX_PROJET'; |
const GTP_ID_MAX_DATE_TRAVAIL = 'TRAVAILPROJET_ID_MAX_DATE_TRAVAIL'; |
/*** Attributs : */ |
private $id_utilisateur; |
private $id_projet; |
private $id_date_travail; |
private $duree; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_travail_projet'; |
$this->dao_correspondance = array( |
'gtp_id_utilisateur' => 'id_utilisateur', |
'gtp_id_projet' => 'id_projet', |
'gtp_id_date_travail' => 'id_date_travail', |
'gtp_duree' => 'duree'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Utilisateur |
public function getIdUtilisateur() |
{ |
return $this->id_utilisateur; |
} |
public function setIdUtilisateur( $iu ) |
{ |
$this->id_utilisateur = $iu; |
} |
// Id Projet |
public function getIdProjet() |
{ |
return $this->id_projet; |
} |
public function setIdProjet( $ip ) |
{ |
$this->id_projet = $ip; |
} |
// Id Date Travail |
public function getIdDateTravail() |
{ |
return $this->id_date_travail; |
} |
public function setIdDateTravail( $idt ) |
{ |
$this->id_date_travail = $idt; |
} |
// Duree |
public function getDuree() |
{ |
return $this->duree; |
} |
public function setDuree( $d ) |
{ |
$this->duree = $d; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_travail_projet. |
* @return mixed un tableau d'objets TravailProjet s'il y en a plusieurs, l'objet TravailProjet s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
switch ($cmd) { |
case TravailProjet::GTP_ID: |
$requete = 'SELECT * '. |
'FROM gestion_travail_projet '. |
'WHERE gtp_id_utilisateur = '.$parametres[0].' AND gtp_id_projet = '.$parametres[1].' AND gtp_id_date_travail = '.$parametres[2].' '; |
break; |
case TravailProjet::GTP_ID_MAX_UTILISATEUR: |
$requete = 'SELECT MAX(gtp_id_utilisateur) '. |
'FROM gestion_travail_projet '; |
break; |
case TravailProjet::GTP_ID_MAX_PROJET: |
$requete = 'SELECT MAX(gtp_id_projet) '. |
'FROM gestion_travail_projet '; |
break; |
case TravailProjet::GTP_ID_MAX_DATE_TRAVAIL: |
$requete = 'SELECT MAX(gtp_id_date_travail) '. |
'FROM gestion_travail_projet '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet TravailProjet */ |
function afficherTravailProjet() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/TravailTache.class.php |
---|
New file |
0,0 → 1,181 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe TravailTache |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class TravailTache : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class TravailTache extends aGttSql { |
/*** Constantes : */ |
const GTT_ID = 'TRAVAILTACHE_ID'; |
const GTT_ID_MAX_UTILISATEUR = 'TRAVAILTACHE_ID_MAX_UTILISATEUR'; |
const GTT_ID_MAX_TACHE = 'TRAVAILTACHE_ID_MAX_TACHE'; |
const GTT_ID_MAX_DATE_TRAVAIL = 'TRAVAILTACHE_ID_MAX_DATE_TRAVAIL'; |
/*** Attributs : */ |
private $id_utilisateur; |
private $id_tache; |
private $id_date_travail; |
private $duree; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_travail_tache'; |
$this->dao_correspondance = array( |
'gtt_id_utilisateur' => 'id_utilisateur', |
'gtt_id_tache' => 'id_tache', |
'gtt_id_date_travail' => 'id_date_travail', |
'gtt_duree' => 'duree'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Utilisateur |
public function getIdUtilisateur() |
{ |
return $this->id_utilisateur; |
} |
public function setIdUtilisateur( $iu ) |
{ |
$this->id_utilisateur = $iu; |
} |
// Id Tache |
public function getIdTache() |
{ |
return $this->id_tache; |
} |
public function setIdTache( $it ) |
{ |
$this->id_tache = $it; |
} |
// Id Date Travail |
public function getIdDateTravail() |
{ |
return $this->id_date_travail; |
} |
public function setIdDateTravail( $idt ) |
{ |
$this->id_date_travail = $idt; |
} |
// Duree |
public function getDuree() |
{ |
return $this->duree; |
} |
public function setDuree( $d ) |
{ |
$this->duree = $d; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_travail_tache. |
* @return mixed un tableau d'objets TravailTache s'il y en a plusieurs, l'objet TravailTache s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
switch ($cmd) { |
case TravailTache::GTT_ID: |
$requete = 'SELECT * '. |
'FROM gestion_travail_tache '. |
'WHERE gtt_id_utilisateur = '.$parametres[0].' AND gtt_id_tache = '.$parametres[1].' AND gtt_id_date_travail = '.$parametres[2].' '; |
break; |
case TravailTache::GTT_ID_MAX_UTILISATEUR: |
$requete = 'SELECT MAX(gtt_id_utilisateur) '. |
'FROM gestion_travail_tache '; |
break; |
case TravailTache::GTT_ID_MAX_TACHE: |
$requete = 'SELECT MAX(gtt_id_tache) '. |
'FROM gestion_travail_tache '; |
break; |
case TravailTache::GTT_ID_MAX_DATE_TRAVAIL: |
$requete = 'SELECT MAX(gtt_id_date_travail) '. |
'FROM gestion_travail_tache '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet TravailTache */ |
function afficherTravailTache() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/ProjetTache.class.php |
---|
New file |
0,0 → 1,219 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe ProjetTache |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class ProjetTache : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class ProjetTache extends aGttSql { |
/*** Constantes : */ |
const GPT_ID = 'PROJETTACHE_ID'; |
const GPT_ID_MAX = 'PROJETTACHE_ID_MAX'; |
/*** Attributs : */ |
private $id_tache; |
private $ce_tache_precedente; |
private $ce_projet; |
private $libelle; |
private $description; |
private $date_debut; |
private $duree_prevue; |
private $avancement; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_projet_tache'; |
$this->dao_correspondance = array( |
'gpt_id_tache' => 'id_tache', |
'gpt_ce_tache_precedente' => 'ce_tache_precedente', |
'gpt_ce_projet' => 'ce_projet', |
'gpt_libelle' => 'libelle', |
'gpt_description' => 'description', |
'gpt_date_debut' => 'date_debut', |
'gpt_duree_prevue' => 'duree_prevue', |
'gpt_avancement' => 'avancement'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Tache |
public function getIdTache() |
{ |
return $this->id_tache; |
} |
public function setIdTache( $it ) |
{ |
$this->id_tache = $it; |
} |
// Ce Tache Precedente |
public function getCeTachePrecedente() |
{ |
return $this->ce_tache_precedente; |
} |
public function setCeTachePrecedente( $ctp ) |
{ |
$this->ce_tache_precedente = $ctp; |
} |
// Ce Projet |
public function getCeProjet() |
{ |
return $this->ce_projet; |
} |
public function setCeProjet( $cp ) |
{ |
$this->ce_projet = $cp; |
} |
// Libelle |
public function getLibelle() |
{ |
return $this->libelle; |
} |
public function setLibelle( $l ) |
{ |
$this->libelle = $l; |
} |
// Description |
public function getDescription() |
{ |
return $this->description; |
} |
public function setDescription( $d ) |
{ |
$this->description = $d; |
} |
// Date Debut |
public function getDateDebut() |
{ |
return $this->date_debut; |
} |
public function setDateDebut( $dd ) |
{ |
$this->date_debut = $dd; |
} |
// Duree Prevue |
public function getDureePrevue() |
{ |
return $this->duree_prevue; |
} |
public function setDureePrevue( $dp ) |
{ |
$this->duree_prevue = $dp; |
} |
// Avancement |
public function getAvancement() |
{ |
return $this->avancement; |
} |
public function setAvancement( $a ) |
{ |
$this->avancement = $a; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_projet_tache. |
* @return mixed un tableau d'objets ProjetTache s'il y en a plusieurs, l'objet ProjetTache s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
switch ($cmd) { |
case ProjetTache::GPT_ID: |
$requete = 'SELECT * '. |
'FROM gestion_projet_tache '. |
'WHERE gpt_id_tache = '.$parametres[0].' '; |
break; |
case ProjetTache::GPT_ID_MAX: |
$requete = 'SELECT MAX(gpt_id_tache) '. |
'FROM gestion_projet_tache '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet ProjetTache */ |
function afficherProjetTache() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/NoteFraisLigne.class.php |
---|
New file |
0,0 → 1,195 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe NoteFraisLigne |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class NoteFraisLigne : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class NoteFraisLigne extends aGttSql { |
/*** Constantes : */ |
const GNFL_ID = 'NOTEFRAISLIGNE_ID'; |
const GNFL_ID_MAX = 'NOTEFRAISLIGNE_ID_MAX'; |
/*** Attributs : */ |
private $id_note_frais_ligne; |
private $ce_note_frais; |
private $date; |
private $montant_ht; |
private $taux_tva; |
private $montant_ttc; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_note_frais_ligne'; |
$this->dao_correspondance = array( |
'gnfl_id_note_frais_ligne' => 'id_note_frais_ligne', |
'gnfl_ce_note_frais' => 'ce_note_frais', |
'gnfl_date' => 'date', |
'gnfl_montant_ht' => 'montant_ht', |
'gnfl_taux_tva' => 'taux_tva', |
'gnfl_montant_ttc' => 'montant_ttc'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Note Frais Ligne |
public function getIdNoteFraisLigne() |
{ |
return $this->id_note_frais_ligne; |
} |
public function setIdNoteFraisLigne( $infl ) |
{ |
$this->id_note_frais_ligne = $infl; |
} |
// Ce Note Frais |
public function getCeNoteFrais() |
{ |
return $this->ce_note_frais; |
} |
public function setCeNoteFrais( $cnf ) |
{ |
$this->ce_note_frais = $cnf; |
} |
// Date |
public function getDate() |
{ |
return $this->date; |
} |
public function setDate( $d ) |
{ |
$this->date = $d; |
} |
// Montant Ht |
public function getMontantHt() |
{ |
return $this->montant_ht; |
} |
public function setMontantHt( $mh ) |
{ |
$this->montant_ht = $mh; |
} |
// Taux Tva |
public function getTauxTva() |
{ |
return $this->taux_tva; |
} |
public function setTauxTva( $tt ) |
{ |
$this->taux_tva = $tt; |
} |
// Montant Ttc |
public function getMontantTtc() |
{ |
return $this->montant_ttc; |
} |
public function setMontantTtc( $mt ) |
{ |
$this->montant_ttc = $mt; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_note_frais_ligne. |
* @return mixed un tableau d'objets NoteFraisLigne s'il y en a plusieurs, l'objet NoteFraisLigne s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
switch ($cmd) { |
case NoteFraisLigne::GNFL_ID: |
$requete = 'SELECT * '. |
'FROM gestion_note_frais_ligne '. |
'WHERE gnfl_id_note_frais_ligne = '.$parametres[0].' '; |
break; |
case NoteFraisLigne::GNFL_ID_MAX: |
$requete = 'SELECT MAX(gnfl_id_note_frais_ligne) '. |
'FROM gestion_note_frais_ligne '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet NoteFraisLigne */ |
function afficherNoteFraisLigne() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/NoteFrais.class.php |
---|
New file |
0,0 → 1,159 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe NoteFrais |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class NoteFrais : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class NoteFrais extends aGttSql { |
/*** Constantes : */ |
const GNF_ID = 'NOTEFRAIS_ID'; |
const GNF_ID_MAX = 'NOTEFRAIS_ID_MAX'; |
/*** Attributs : */ |
private $id_note_frais; |
private $ce_utilisateur; |
private $libelle; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_note_frais'; |
$this->dao_correspondance = array( |
'gnf_id_note_frais' => 'id_note_frais', |
'gnf_ce_utilisateur' => 'ce_utilisateur', |
'gnf_libelle' => 'libelle'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Note Frais |
public function getIdNoteFrais() |
{ |
return $this->id_note_frais; |
} |
public function setIdNoteFrais( $inf ) |
{ |
$this->id_note_frais = $inf; |
} |
// Ce Utilisateur |
public function getCeUtilisateur() |
{ |
return $this->ce_utilisateur; |
} |
public function setCeUtilisateur( $cu ) |
{ |
$this->ce_utilisateur = $cu; |
} |
// Libelle |
public function getLibelle() |
{ |
return $this->libelle; |
} |
public function setLibelle( $l ) |
{ |
$this->libelle = $l; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_note_frais. |
* @return mixed un tableau d'objets NoteFrais s'il y en a plusieurs, l'objet NoteFrais s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
switch ($cmd) { |
case NoteFrais::GNF_ID: |
$requete = 'SELECT * '. |
'FROM gestion_note_frais '. |
'WHERE gnf_id_note_frais = '.$parametres[0].' '; |
break; |
case NoteFrais::GNF_ID_MAX: |
$requete = 'SELECT MAX(gnf_id_note_frais) '. |
'FROM gestion_note_frais '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet NoteFrais */ |
function afficherNoteFrais() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/Utilisateur.class.php |
---|
New file |
0,0 → 1,348 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe Utilisateur |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class Utilisateur : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class Utilisateur extends aGttSql { |
/*** Constantes : */ |
const GU_ID = 'UTILISATEUR_ID'; |
const GU_ID_MAX = 'UTILISATEUR_ID_MAX'; |
const GU_MAIL = 'UTILISATEUR_MAIL'; |
/*** Attributs : */ |
private $id_utilisateur; |
private $gus_id_utilisateur_statut; |
private $nom; |
private $prenom; |
private $password; |
private $email; |
private $telephone; |
private $adresse; |
private $code_postal; |
private $ville; |
private $quota_heures_supp; |
private $conges_payes; |
private $temps_de_travail; |
private $mark_admin; |
private $mark_recapitulatif; |
private $notes; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_utilisateur'; |
$this->dao_correspondance = array( |
'gu_id_utilisateur' => 'id_utilisateur', |
'gus_id_utilisateur_statut' => 'gus_id_utilisateur_statut', |
'gu_nom' => 'nom', |
'gu_prenom' => 'prenom', |
'gu_password' => 'password', |
'gu_email' => 'email', |
'gu_telephone' => 'telephone', |
'gu_adresse' => 'adresse', |
'gu_code_postal' => 'code_postal', |
'gu_ville' => 'ville', |
'gu_quota_heures_supp' => 'quota_heures_supp', |
'gu_conges_payes' => 'conges_payes', |
'gu_temps_de_travail' => 'temps_de_travail', |
'gu_mark_admin' => 'mark_admin', |
'gu_mark_recapitulatif' => 'mark_recapitulatif', |
'gu_notes' => 'notes'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Utilisateur |
public function getIdUtilisateur() |
{ |
return $this->id_utilisateur; |
} |
public function setIdUtilisateur( $iu ) |
{ |
$this->id_utilisateur = $iu; |
} |
// Gus Id Utilisateur Statut |
public function getGusIdUtilisateurStatut() |
{ |
return $this->gus_id_utilisateur_statut; |
} |
public function setGusIdUtilisateurStatut( $gius ) |
{ |
$this->gus_id_utilisateur_statut = $gius; |
} |
// Nom |
public function getNom() |
{ |
return $this->nom; |
} |
public function setNom( $n ) |
{ |
$this->nom = $n; |
} |
// Prenom |
public function getPrenom() |
{ |
return $this->prenom; |
} |
public function setPrenom( $p ) |
{ |
$this->prenom = $p; |
} |
// Password |
public function getPassword() |
{ |
return $this->password; |
} |
public function setPassword( $p ) |
{ |
$this->password = $p; |
} |
public function getEmail() |
{ |
return $this->email; |
} |
public function setEmail( $e ) |
{ |
$this->email = $e; |
} |
// Telephone |
public function getTelephone() |
{ |
return $this->telephone; |
} |
public function setTelephone( $t ) |
{ |
$this->telephone = $t; |
} |
// Adresse |
public function getAdresse() |
{ |
return $this->adresse; |
} |
public function setAdresse( $a ) |
{ |
$this->adresse = $a; |
} |
// Code Postal |
public function getCodePostal() |
{ |
return $this->code_postal; |
} |
public function setCodePostal( $cp ) |
{ |
$this->code_postal = $cp; |
} |
// Ville |
public function getVille() |
{ |
return $this->ville; |
} |
public function setVille( $v ) |
{ |
$this->ville = $v; |
} |
// Quota Heures Supp |
public function getQuotaHeuresSupp() |
{ |
return $this->quota_heures_supp; |
} |
public function setQuotaHeuresSupp( $qhs ) |
{ |
$this->quota_heures_supp = $qhs; |
} |
// Conges Payes |
public function getCongesPayes() |
{ |
return $this->conges_payes; |
} |
public function setCongesPayes( $cp ) |
{ |
$this->conges_payes = $cp; |
} |
// Temps De Travail |
public function getTempsDeTravail() |
{ |
return $this->temps_de_travail; |
} |
public function setTempsDeTravail( $tdt ) |
{ |
$this->temps_de_travail = $tdt; |
} |
// Mark Admin |
public function getMarkAdmin() |
{ |
return $this->mark_admin; |
} |
public function setMarkAdmin( $ma ) |
{ |
$this->mark_admin = $ma; |
} |
// Mark Recapitulatif |
public function getMarkRecapitulatif() |
{ |
return $this->mark_recapitulatif; |
} |
public function setMarkRecapitulatif( $mr ) |
{ |
$this->mark_recapitulatif = $mr; |
} |
// Notes |
public function getNotes() |
{ |
return $this->notes; |
} |
public function setNotes( $n ) |
{ |
$this->notes = $n; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_utilisateur. |
* @return mixed un tableau d'objets Utilisateur s'il y en a plusieurs, l'objet Utilisateur s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
switch ($cmd) { |
case Utilisateur::GU_ID: |
$requete = 'SELECT * '. |
'FROM gestion_utilisateur '. |
'WHERE gu_id_utilisateur = '.$parametres[0].' '; |
break; |
case Utilisateur::GU_ID_MAX: |
$requete = 'SELECT MAX(gu_id_utilisateur) '. |
'FROM gestion_utilisateur '; |
break; |
case Utilisateur::GU_MAIL: |
$requete = 'SELECT * '. |
'FROM gestion_utilisateur '. |
'WHERE gu_email = "'.$parametres[0].'" '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet Utilisateur */ |
function afficherUtilisateur() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
/**augmenter le nombre d'heure sup |
*un acces est fait a la bse de donnees pour enregistrer les changements en temps reel |
*/ |
function augmenterQuotaHeuresSup($nb) |
{ |
$this->quota_heures_sup = $this->quota_heures_sup + $nb; |
} |
/**diminuer le nb d'heures sup*/ |
public function diminuerQuotaHeuresSup($nb) |
{ |
$this->quota_heures_sup = $this->quota_heures_sup - $nb; |
/*un quota heure supp negatif implique qu'il y a des heures a rattraper*/ |
} |
/**augmenter le nombre de jours de conges */ |
function augmenterCongesPayes($nb) |
{ |
$this->conges_payes = $this->conges_payes + $nb; |
} |
/**diminuer le nombre de jour de conges */ |
function diminuerCongesPayes($nb) |
{ |
$this->conges_payes = $this->conges_payes - $nb; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/FraisKm.class.php |
---|
New file |
0,0 → 1,219 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe FraisKm |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class FraisKm : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class FraisKm extends aGttSql { |
/*** Constantes : */ |
const GFK_ID = 'FRAISKM_ID'; |
const GFK_ID_MAX = 'FRAISKM_ID_MAX'; |
/*** Attributs : */ |
private $id_frais_km; |
private $gfkt_id_frais_km_taux; |
private $ce_utilisateur; |
private $date; |
private $nbre_km; |
private $objet; |
private $trajet; |
private $montant_total; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_frais_km'; |
$this->dao_correspondance = array( |
'gfk_id_frais_km' => 'id_frais_km', |
'gfkt_id_frais_km_taux' => 'gfkt_id_frais_km_taux', |
'gfk_ce_utilisateur' => 'ce_utilisateur', |
'gfk_date' => 'date', |
'gfk_nbre_km' => 'nbre_km', |
'gfk_objet' => 'objet', |
'gfk_trajet' => 'trajet', |
'gfk_montant_total' => 'montant_total'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Frais Km |
public function getIdFraisKm() |
{ |
return $this->id_frais_km; |
} |
public function setIdFraisKm( $ifk ) |
{ |
$this->id_frais_km = $ifk; |
} |
// Gfkt Id Frais Km Taux |
public function getGfktIdFraisKmTaux() |
{ |
return $this->gfkt_id_frais_km_taux; |
} |
public function setGfktIdFraisKmTaux( $gifkt ) |
{ |
$this->gfkt_id_frais_km_taux = $gifkt; |
} |
// Ce Utilisateur |
public function getCeUtilisateur() |
{ |
return $this->ce_utilisateur; |
} |
public function setCeUtilisateur( $cu ) |
{ |
$this->ce_utilisateur = $cu; |
} |
// Date |
public function getDate() |
{ |
return $this->date; |
} |
public function setDate( $d ) |
{ |
$this->date = $d; |
} |
// Nbre Km |
public function getNbreKm() |
{ |
return $this->nbre_km; |
} |
public function setNbreKm( $nk ) |
{ |
$this->nbre_km = $nk; |
} |
// Objet |
public function getObjet() |
{ |
return $this->objet; |
} |
public function setObjet( $o ) |
{ |
$this->objet = $o; |
} |
// Trajet |
public function getTrajet() |
{ |
return $this->trajet; |
} |
public function setTrajet( $t ) |
{ |
$this->trajet = $t; |
} |
// Montant Total |
public function getMontantTotal() |
{ |
return $this->montant_total; |
} |
public function setMontantTotal( $mt ) |
{ |
$this->montant_total = $mt; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_frais_km. |
* @return mixed un tableau d'objets FraisKm s'il y en a plusieurs, l'objet FraisKm s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
switch ($cmd) { |
case FraisKm::GFK_ID: |
$requete = 'SELECT * '. |
'FROM gestion_frais_km '. |
'WHERE gfk_id_frais_km = '.$parametres[0].' '; |
break; |
case FraisKm::GFK_ID_MAX: |
$requete = 'SELECT MAX(gfk_id_frais_km) '. |
'FROM gestion_frais_km '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet FraisKm */ |
function afficherFraisKm() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/FraisKmTaux.class.php |
---|
New file |
0,0 → 1,147 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe FraisKmTaux |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class FraisKmTaux : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class FraisKmTaux extends aGttSql { |
/*** Constantes : */ |
const GFKT_ID = 'FRAISKMTAUX_ID'; |
const GFKT_ID_MAX = 'FRAISKMTAUX_ID_MAX'; |
/*** Attributs : */ |
private $id_frais_km_taux; |
private $taux; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_frais_km_taux'; |
$this->dao_correspondance = array( |
'gfkt_id_frais_km_taux' => 'id_frais_km_taux', |
'gfkt_taux' => 'taux'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Frais Km Taux |
public function getIdFraisKmTaux() |
{ |
return $this->id_frais_km_taux; |
} |
public function setIdFraisKmTaux( $ifkt ) |
{ |
$this->id_frais_km_taux = $ifkt; |
} |
// Taux |
public function getTaux() |
{ |
return $this->taux; |
} |
public function setTaux( $t ) |
{ |
$this->taux = $t; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_frais_km_taux. |
* @return mixed un tableau d'objets FraisKmTaux s'il y en a plusieurs, l'objet FraisKmTaux s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
switch ($cmd) { |
case FraisKmTaux::GFKT_ID: |
$requete = 'SELECT * '. |
'FROM gestion_frais_km_taux '. |
'WHERE gfkt_id_frais_km_taux = '.$parametres[0].' '; |
break; |
case FraisKmTaux::GFKT_ID_MAX: |
$requete = 'SELECT MAX(gfkt_id_frais_km_taux) '. |
'FROM gestion_frais_km_taux '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet FraisKmTaux */ |
function afficherFraisKmTaux() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/AbsenceMotif.class.php |
---|
New file |
0,0 → 1,171 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe AbsenceMotif |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class AbsenceMotif : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class AbsenceMotif extends aGttSql { |
/*** Constantes : */ |
const GAM_ID = 'ABSENCEMOTIF_ID'; |
const GAM_ID_MAX = 'ABSENCEMOTIF_ID_MAX'; |
/*** Attributs : */ |
private $id_absence_motif; |
private $libelle; |
private $mark_rtt; |
private $nbre_heure; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_absence_motif'; |
$this->dao_correspondance = array( |
'gam_id_absence_motif' => 'id_absence_motif', |
'gam_libelle' => 'libelle', |
'gam_mark_rtt' => 'mark_rtt', |
'gam_nbre_heure' => 'nbre_heure'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Absence Motif |
public function getIdAbsenceMotif() |
{ |
return $this->id_absence_motif; |
} |
public function setIdAbsenceMotif( $iam ) |
{ |
$this->id_absence_motif = $iam; |
} |
// Libelle |
public function getLibelle() |
{ |
return $this->libelle; |
} |
public function setLibelle( $l ) |
{ |
$this->libelle = $l; |
} |
// Mark Rtt |
public function getMarkRtt() |
{ |
return $this->mark_rtt; |
} |
public function setMarkRtt( $mr ) |
{ |
$this->mark_rtt = $mr; |
} |
// Nbre Heure |
public function getNbreHeure() |
{ |
return $this->nbre_heure; |
} |
public function setNbreHeure( $nh ) |
{ |
$this->nbre_heure = $nh; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_absence_motif. |
* @return mixed un tableau d'objets AbsenceMotif s'il y en a plusieurs, l'objet AbsenceMotif s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
switch ($cmd) { |
case AbsenceMotif::GAM_ID: |
$requete = 'SELECT * '. |
'FROM gestion_absence_motif '. |
'WHERE gam_id_absence_motif = '.$parametres[0].' '; |
break; |
case AbsenceMotif::GAM_ID_MAX: |
$requete = 'SELECT MAX(gam_id_absence_motif) '. |
'FROM gestion_absence_motif '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet AbsenceMotif */ |
function afficherAbsenceMotif() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/UtilisateurAProjet.class.php |
---|
New file |
0,0 → 1,161 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe UtilisateurAProjet |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class UtilisateurAProjet : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class UtilisateurAProjet extends aGttSql { |
/*** Constantes : */ |
const GUAP_ID = 'UTILISATEURAPROJET_ID'; |
const GUAP_ID_MAX_UTILISATEUR = 'UTILISATEURAPROJET_ID_MAX_UTILISATEUR'; |
const GUAP_ID_MAX_PROJET = 'UTILISATEURAPROJET_ID_MAX_PROJET'; |
const GUAP_UTILISATEUR = 'UTILISATEURAPROJET_ID_UTILISATEUR'; |
/*** Attributs : */ |
private $id_utilisateur; |
private $id_projet; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_utilisateur_a_projet'; |
$this->dao_correspondance = array( |
'guap_id_utilisateur' => 'id_utilisateur', |
'guap_id_projet' => 'id_projet'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Utilisateur |
public function getIdUtilisateur() |
{ |
return $this->id_utilisateur; |
} |
public function setIdUtilisateur( $iu ) |
{ |
$this->id_utilisateur = $iu; |
} |
// Id Projet |
public function getIdProjet() |
{ |
return $this->id_projet; |
} |
public function setIdProjet( $ip ) |
{ |
$this->id_projet = $ip; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_utilisateur_a_projet. |
* @return mixed un tableau d'objets UtilisateurAProjet s'il y en a plusieurs, l'objet UtilisateurAProjet s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
if (!is_array($parametres)) { |
$parametres[0] = $parametres; |
} |
switch ($cmd) { |
case UtilisateurAProjet::GUAP_ID: |
$requete = 'SELECT * '. |
'FROM gestion_utilisateur_a_projet '. |
'WHERE guap_id_utilisateur = '.$parametres[0].' AND guap_id_projet = '.$parametres[1].' '; |
break; |
case UtilisateurAProjet::GUAP_ID_MAX_UTILISATEUR: |
$requete = 'SELECT MAX(guap_id_utilisateur) '. |
'FROM gestion_utilisateur_a_projet '; |
break; |
case UtilisateurAProjet::GUAP_ID_MAX_PROJET: |
$requete = 'SELECT MAX(guap_id_projet) '. |
'FROM gestion_utilisateur_a_projet '; |
break; |
case UtilisateurAProjet::GUAP_UTILISATEUR: |
$requete = 'SELECT * '. |
'FROM gestion_utilisateur_a_projet '. |
'WHERE guap_id_utilisateur = '.$parametres[0].' '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet UtilisateurAProjet */ |
function afficherUtilisateurAProjet() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/UtilisateurStatut.class.php |
---|
New file |
0,0 → 1,147 |
<?php |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 5.1.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2006 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of eFlore. | |
// | | |
// | Foobar 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. | |
// | | |
// | Foobar 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 Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id$ |
/** |
* Classe UtilisateurStatut |
* |
* Description |
* |
*@package eFlore |
*@subpackage modele |
//Auteur original : |
*@version 3 |
*@author Shaheen ABDOOL RAHEEM <shaheenar50@hotmail.com> |
//Autres auteurs : |
*@version 4 |
*@author Jean-Pascal MILCENT <jpm@clapas.org> |
*@author aucun |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/** |
* class UtilisateurStatut : est à la fois le DAO et le conteneur de la table gestion_utilisateur. |
* classe métier |
*/ |
class UtilisateurStatut extends aGttSql { |
/*** Constantes : */ |
const GUS_ID = 'UTILISATEURSTATUT_ID'; |
const GUS_ID_MAX = 'UTILISATEURSTATUT_ID_MAX'; |
/*** Attributs : */ |
private $id_utilisateur_statut; |
private $libelle; |
/*** Aggregations : */ |
/*** Constructeur : */ |
public function __construct($cmd = null, $parametres = null) |
{ |
$this->dao_table_nom = 'gestion_utilisateur_statut'; |
$this->dao_correspondance = array( |
'gus_id_utilisateur_statut' => 'id_utilisateur_statut', |
'gus_libelle' => 'libelle'); |
// Si l'on veut remplir l'objet à la création on lance la requete correspondante |
if (!is_null($cmd)) { |
$this->consulter($cmd, $parametres, true); |
} |
} |
/*** Accesseurs : */ |
// Id Utilisateur Statut |
public function getIdUtilisateurStatut() |
{ |
return $this->id_utilisateur_statut; |
} |
public function setIdUtilisateurStatut( $ius ) |
{ |
$this->id_utilisateur_statut = $ius; |
} |
// Libelle |
public function getLibelle() |
{ |
return $this->libelle; |
} |
public function setLibelle( $l ) |
{ |
$this->libelle = $l; |
} |
/*** Méthodes : */ |
/** |
* Consulter la table gestion_utilisateur_statut. |
* @return mixed un tableau d'objets UtilisateurStatut s'il y en a plusieurs, l'objet UtilisateurStatut s'il y en a 1 seul sinon false. |
*/ |
public function consulter($cmd = '', $parametres = array(), $instancier = false) |
{ |
switch ($cmd) { |
case UtilisateurStatut::GUS_ID: |
$requete = 'SELECT * '. |
'FROM gestion_utilisateur_statut '. |
'WHERE gus_id_utilisateur_statut = '.$parametres[0].' '; |
break; |
case UtilisateurStatut::GUS_ID_MAX: |
$requete = 'SELECT MAX(gus_id_utilisateur_statut) '. |
'FROM gestion_utilisateur_statut '; |
break; |
default : |
$message = 'Commande '.$cmd.'inconnue!'; |
$e = GestionnaireErreur::formaterMessageErreur(__FILE__, __LINE__, $message); |
trigger_error($e, E_USER_ERROR); |
} |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$tab_resultat = array(); |
while ($donnees =& $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$tab_resultat[] = $this->basculerEnregistrementObjet($donnees, $instancier); |
} |
$resultat_nbre = count($tab_resultat); |
if ($resultat_nbre > 1) { |
return $tab_resultat; |
} else if ($resultat_nbre == 1) { |
return $tab_resultat[0]; |
} else if ($resultat_nbre == 0) { |
return false; |
} |
} |
/** Afficher l'objet UtilisateurStatut */ |
function afficherUtilisateurStatut() |
{ |
echo '<pre>'.print_r($this, true).'</pre>'; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log$ |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/trunk/classes/metiers/aGttSql.class.php |
---|
New file |
0,0 → 1,170 |
<?php |
abstract class aGttSql { |
/*** Attributs : */ |
private $base_de_donnees = GTT_BDD_NOM; |
protected $table_nom; |
protected $correspondance; |
/*** Accesseurs : */ |
// Base De Donnees |
function getBaseDeDonnees() |
{ |
return $this->base_de_donnees; |
} |
function setBaseDeDonnees($bdd) |
{ |
$this->base_de_donnees = $bdd; |
} |
// TableNom |
function getTableNom() |
{ |
return $this->dao_table_nom; |
} |
function setTableNom($tn) |
{ |
$this->dao_table_nom = $tn; |
} |
// Correspondance |
function getCorrespondance() |
{ |
return $this->dao_correspondance; |
} |
function setCorrespondance($c) |
{ |
$this->dao_correspondance = $c; |
} |
/*** Méthodes : */ |
/** Instancie un objet utilisateur à partir d'un enregistrement issu de la base de donnée ou l'inverse. |
* Cette métohode permet de s'abstraire des noms des champs présent dans la base de donnée. |
*/ |
protected function basculerEnregistrementObjet($donnees, $instancier = false) |
{ |
$classe = get_class($this); |
if (is_array($donnees)) { |
if ($instancier) { |
foreach ($this->getCorrespondance() as $champ => $attribut) { |
if (isset($donnees[$champ]) && !is_null($donnees[$champ])) { |
$methode = 'set'.str_replace(' ', '', ucwords(str_replace('_', ' ', $attribut))); |
$this->$methode($donnees[$champ]); |
} |
} |
} else { |
$Objet = new $classe; |
foreach ($this->getCorrespondance() as $champ => $attribut) { |
if (isset($donnees[$champ]) && !is_null($donnees[$champ])) { |
$methode = 'set'.str_replace(' ', '', ucwords(str_replace('_', ' ', $attribut))); |
$Objet->$methode($donnees[$champ]); |
} |
} |
return $Objet; |
} |
} else if ($donnees instanceof $classe) { |
$enregistrement = array(); |
foreach ($this->getCorrespondance() as $champ => $attribut) { |
$methode = 'get'.str_replace(' ', '', ucwords(str_replace('_', ' ', $attribut))); |
if (method_exists($donnees, $methode)) { |
if ($donnees->$methode()) { |
$enregistrement[$champ] = $donnees->$methode(); |
} |
} |
} |
return $enregistrement; |
} |
} |
/** |
* Ajouter un enregistrement dans la base de données. |
* @return true si ok, false si aucun enregistrement effectué |
*/ |
public function ajouter() |
{ |
$enregistrement = $this->basculerEnregistrementObjet($this); |
$sql_attributs = ''; |
$sql_valeurs = ''; |
foreach($enregistrement as $champ => $val) { |
$sql_attributs .= $champ.', '; |
$sql_valeurs .= $val.', '; |
} |
$sql_attributs = trim($sql_attributs, ', '); |
$sql_valeurs = trim($sql_valeurs, ', '); |
$requete = 'INSERT INTO '.$this->getBaseDeDonnees().'.'.$this->getTableNom().' '. |
'( '.$sql_attributs.' ) '. |
'VALUES '. |
'( '.$sql_valeurs.' )'; |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$nbre_enregistrement_ajoute = $GLOBALS['db']->affectedRows(); |
if ($nbre_enregistrement_ajoute == 1) { |
return true; |
} elseif ($nbre_enregistrement_ajoute == 0) { |
return false; |
} |
} |
/** |
* Modifier un enregistrement dans la base de données. |
* @return true si ok, false si aucun enregistrement effectué |
*/ |
public function modifier() |
{ |
$enregistrement = $this->basculerEnregistrementObjet($this); |
$sql_where = ''; |
$sql_set = ''; |
foreach($enregistrement as $champ => $val) { |
if (preg_match('/_id_/', $champ)) { |
$sql_where .= $champ.' = '.$val.' AND '; |
} else { |
$sql_set .= $champ.' = '.$val.', '; |
} |
} |
$sql_set = trim($sql_set, ', ').' '; |
$sql_where = trim($sql_where, ' AND ').' '; |
$requete = 'UPDATE '.$this->getBaseDeDonnees().'.'.$this->getTableNom().' SET '.$sql_set.'WHERE '.$sql_where; |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$nbre_enregistrement_ajoute = $GLOBALS['db']->affectedRows(); |
if ($nbre_enregistrement_ajoute == 1) { |
return true; |
} elseif ($nbre_enregistrement_ajoute == 0) { |
return false; |
} |
} |
/** |
* Supprimer un enregistrement dans la base de données. |
* @return true si ok, false si aucun enregistrement effectué |
*/ |
public function supprimer() |
{ |
$enregistrement = $this->basculerEnregistrementObjet($this); |
$sql_where = ''; |
foreach($enregistrement as $champ => $val) { |
//if (preg_match('/_id_/', $champ)) { |
$sql_where .= $champ.' = '.$val.' AND '; |
//} |
} |
$sql_where = trim($sql_where, ' AND ').' '; |
$requete = 'DELETE FROM '.$this->getBaseDeDonnees().'.'.$this->getTableNom().' WHERE '.$sql_where ; |
$resultat = $GLOBALS['db']->query($requete); |
(DB::isError($resultat)) ? die (GestionnaireErreur::retournerErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '' ; |
$nbre_enregistrement_ajoute = $GLOBALS['db']->affectedRows(); |
if ($nbre_enregistrement_ajoute == 1) { |
return true; |
} elseif ($nbre_enregistrement_ajoute == 0) { |
return false; |
} |
} |
} |
?> |
/trunk/classes/Resultat.class.php |
---|
New file |
0,0 → 1,77 |
<?php |
class Resultat { |
private $titre; |
private $espaces; |
private $donnees; |
private $squelettes; |
public function __construct() |
{ |
} |
// Titre |
public function getTitre() |
{ |
return $this->titre; |
} |
public function setTitre($t) |
{ |
$this->titre = $t; |
} |
// Espaces De Nomage |
public function setEspaces($e) |
{ |
$this->espaces = $e; |
} |
public function ajouterEspace($cle, $val) |
{ |
$this->espaces[$cle] = $val; |
} |
public function getEspaces($cle = null) |
{ |
if ($cle != null) { |
return $this->espaces[$cle]; |
} else { |
return $this->espaces; |
} |
} |
// Donnees |
public function setDonnees($d) |
{ |
$this->donnees = $d; |
} |
public function ajouterDonnee($cle, $val) |
{ |
$this->donnees[$cle] = $val; |
} |
public function getDonnees($cle = null) |
{ |
if ($cle != null) { |
return $this->donnees[$cle]; |
} else { |
return $this->donnees; |
} |
} |
// Squelettes |
public function setSquelettes($s) |
{ |
$this->squelettes = $s; |
} |
public function ajouterSquelette($cle, $val) |
{ |
$this->squelettes[$cle] = $val; |
} |
public function getSquelettes($cle = null) |
{ |
if ($cle != null) { |
return $this->squelettes[$cle]; |
} else { |
return $this->squelettes; |
} |
} |
} |
?> |
/trunk/index.php |
---|
41,24 → 41,26 |
include_once 'HTML/QuickForm.php'; |
include_once 'gtt_config.inc.php'; |
include_once CHEMIN_LANGUES.'gtt_langue_fr.inc.php'; |
include_once CHEMIN_CLASSES.'gtt_authentification.php'; |
include_once CHEMIN_PRESENTATION.'gtt_fonctions_generique_affichage.php'; |
// Création du dsn |
// Test des choix de menu a afficher |
$action = 1; |
if (!empty($_GET['action'])) { |
$action = $_GET['action']; |
} |
if (!preg_match('/^\d+$/', $action)) { |
// Connexion a la base de donnees |
$GLOBALS['db'] = DB::connect($GLOBALS['dsn']); |
$GLOBALS['db'] = DB::connect(GTT_BDD_DSN); |
if (DB::isError($GLOBALS['db'])) { |
$GLOBALS['db']->getMessage(); |
echo "Echec connexion a la base de donnees"; |
} |
$params = array("dsn"=>$GLOBALS['dsn'], |
"table"=>GEST_UTILISATEUR, |
"usernamecol"=>GEST_CHAMPS_EMAIL, |
"passwordcol"=>GEST_CHAMPS_PASSWORD, |
"cryptype"=>"md5", |
"db_fields"=>"*"); |
$params = array('dsn' => GTT_BDD_DSN, |
'table' => GEST_UTILISATEUR, |
'usernamecol' => GEST_CHAMPS_EMAIL, |
'passwordcol' => GEST_CHAMPS_PASSWORD, |
'cryptype' => 'md5', |
'db_fields' => '*'); |
// Création de l'objet auth |
$a = new Auth('DB', $params, 'afficherMenuConnexion', true); |
66,18 → 68,13 |
$a->setExpire(3600*24*30); |
$a->start(); |
echo $a->getStatus(); |
if ($a->getAuth()) { |
// Récuperation d'informations générales |
require_once GTT_CHEMIN_CLASSE.'GestionnaireErreur.class.php'; |
require_once GTT_CHEMIN_METIER.'aGttSql.class.php'; |
require_once GTT_CHEMIN_METIER.'Utilisateur.class.php'; |
$GLOBALS['_GTT_']['Utilisateur'] = new Utilisateur(Utilisateur::GU_MAIL, array($a->getUserName())); |
if ($a->getAuth()) { |
$mail = $a->getUserName(); |
$utilisateur = Utilisateur::recupIDUtilisateurMail($mail); |
$GLOBALS['idCurrentUser'] = $utilisateur; |
// Récuperation de l'identifiant de la personne |
// Test des choix de menu a afficher |
$action = 1; |
if (!empty($_GET['action'])) { |
$action = $_GET['action']; |
} |
if (!preg_match('/^\d+$/', $action)) { |
// Utilisation du mécanisme MVC avec Squelette PHP et objet |
require_once GTT_CHEMIN_CLASSE.'Controlleur.class.php'; |
require_once GTT_CHEMIN_CLASSE.'aAction.class.php'; |
99,6 → 96,36 |
} |
echo $Controlleur->executer($action); |
} else { |
echo afficherMenuConnexion(); |
} |
} else { |
include_once CHEMIN_CLASSES.'gtt_authentification.php'; |
include_once CHEMIN_PRESENTATION.'gtt_fonctions_generique_affichage.php'; |
// Connexion a la base de donnees |
$GLOBALS['db'] = DB::connect($GLOBALS['dsn_v3']); |
if (DB::isError($GLOBALS['db'])) { |
$GLOBALS['db']->getMessage(); |
echo "Echec connexion a la base de donnees"; |
} |
// Création de l'objet auth |
$params = array('dsn'=>$GLOBALS['dsn_v3'], |
'table'=>GEST_UTILISATEUR, |
'usernamecol'=>GEST_CHAMPS_EMAIL, |
'passwordcol'=>GEST_CHAMPS_PASSWORD, |
'cryptype'=>'md5', |
'db_fields'=>'*'); |
$a = new Auth('DB', $params, 'afficherMenuConnexion', true); |
$a->setSessionname('temps_travail'); |
$a->setExpire(3600*24*30); |
$a->start(); |
echo $a->getStatus(); |
if ($a->getAuth()) { |
// Récuperation de l'identifiant de la personne |
$mail = $a->getUserName(); |
$utilisateur = Utilisateur::recupIDUtilisateurMail($mail); |
$GLOBALS['idCurrentUser'] = $utilisateur; |
// Utilisation de l'ancien mécanisme |
switch ($action) { |
// Cas affichage menu travail 1 |
179,9 → 206,8 |
} |
$text .= fermerBalisesFin(); |
echo $text; |
} |
} else { |
echo afficherMenuConnexion(); |
} |
//tester le choix de l'utilisateur |
} |
?> |
/trunk/actions/GttActionGestion.class.php |
---|
New file |
0,0 → 1,89 |
<?php |
require_once GTT_CHEMIN_CLASSE.'Calendrier.class.php'; |
class GttActionGestion extends aAction { |
public function __construct() |
{ |
print_r($this->getResultat()); |
$Resultats = $this->getResultat(); |
$Resultats->ajouterEspace('Gestion', 'gestion'); |
$Resultats->ajouterSquelette('gestion', 'gestion.tpl.html'); |
} |
public function verifier(Resultat $Resultat) |
{ |
} |
public function executer(Resultat $Resultat) |
{ |
$aso_gestion = array(); |
$Resultat->setTitre('Gérer son temps'); |
require_once GTT_CHEMIN_PEAR.'Calendar/Month/Weeks.php'; |
require_once GTT_CHEMIN_PEAR.'Calendar/Day.php'; |
// Initialisation des variables pour le calendrier |
if (!isset($_GET['annee'])) { |
$_GET['annee'] = date('Y'); |
} |
if (!isset($_GET['mois'])) { |
$_GET['mois'] = date('mois'); |
} |
if (!isset($_GET['jour'])) { |
$_GET['jour'] = date('jour'); |
} |
// Construction de l'objet mois |
$Month = new Calendar_Month_Weeks($_GET['annee'], $_GET['mois']); |
// Create an array of days which are "selected" |
// Used for Week::build() below |
$aso_gestion['selectedDays'] = array ( |
//new Calendar_Day($_GET['annee'], $_GET['mois'], $_GET['jour']), |
//new Calendar_Day($_GET['annee'], 12, 25), |
new Calendar_Day(date('Y'), date('m'), date('d')), |
); |
// Instruct month to build Week objects |
$Month->build(); |
$aso_gestion['mois_courant_nom'] = date('F Y', $Month->getTimeStamp());; |
$semaine = 0; |
while ($Week = $Month->fetch()) { |
$Week->build($aso_gestion['selectedDays']); |
while ($Day = $Week->fetch()) { |
$element = array(); |
$element['annee'] = $Day->thisYear(); |
$element['mois'] = $Day->thisMonth(); |
$element['jour'] = $Day->thisDay(); |
// Check to see if day is selected |
if ($Day->isSelected()) { |
$element['class'] = 'selected'; |
} else if ($Day->isEmpty()) { |
$element['class'] = 'empty'; |
} else { |
$element['class'] = 'courrant'; |
} |
$aso_gestion['elements'][$semaine][] = $element; |
} |
$semaine++; |
} |
// Construction de l'url pour les mois précédent/suivant |
$PMonth = $Month->prevMonth('object'); |
$aso_gestion['url_mois_precedent'] = 'index.php?action='.GTT_ACTION_GESTION.'&annee='.$PMonth->thisYear().'&mois='.$PMonth->thisMonth().'&jour='.$PMonth->thisDay(); |
$NMonth = $Month->nextMonth('object'); |
$aso_gestion['url_mois_suivant'] = 'index.php?action='.GTT_ACTION_GESTION.'&annee='.$NMonth->thisYear().'&mois='.$NMonth->thisMonth().'&jour='.$NMonth->thisDay(); |
// Construction de l'url pour les semaines précédente/suivante |
$Week = new Calendar_Week($_GET['annee'], $_GET['mois'], $_GET['jour']); |
$PWeek = $Week->prevWeek('object'); |
$aso_gestion['url_semaine_precedente'] = 'index.php?action='.GTT_ACTION_GESTION.'&annee='.$PWeek->thisYear().'&mois='.$PWeek->thisMonth().'&semaine='.$PWeek->thisWeek('n_in_year').'&jour='.$PWeek->thisDay(); |
$NWeek = $Week->nextWeek('object'); |
$aso_gestion['url_semaine_suivante'] = 'index.php?action='.GTT_ACTION_GESTION.'&annee='.$NWeek->thisYear().'&mois='.$NWeek->thisMonth().'&semaine='.$NWeek->thisWeek('n_in_year').'&jour='.$NWeek->thisDay(); |
//echo '<pre>'.print_r($aso_gestion, true).'</pre>'; |
$Resultat->ajouterDonnee('gestion', $aso_gestion); |
} |
} |
?> |
/trunk/actions/GttActionUtilisateur.class.php |
---|
New file |
0,0 → 1,38 |
<?php |
require_once GTT_CHEMIN_METIER.'Utilisateur.class.php'; |
class GttActionUtilisateur extends aAction { |
public function __construct() |
{ |
print_r($this->getResultat()); |
$Resultats = $this->getResultat(); |
$Resultats->ajouterEspace('Utilisateur', 'utilisateur'); |
$Resultats->ajouterSquelette('utilisateur', 'utilisateur.tpl.html'); |
} |
public function executer(Resultat $Resultat) |
{ |
$Resultat->setTitre('Ajouter un utilisateur'); |
$tab_preferences =& Projet::recupererTableauProjet(); |
$aso_preferences = array(); |
$Preference = new Preferences($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), 5000); |
$aso_preferences['nbre_projets'] = count($tab_preferences); |
// Parcourt du tableau de projets |
for($i = 0; $i < $aso_preferences['nbre_projets']; $i++) { |
$ligne = $tab_preferences[$i]; |
$coche = false; |
if ($Preference->isInPreferences($ligne[GEST_CHAMPS_ID_PROJET])) { |
$coche = true; |
} |
$aso_preferences['preferences'][$ligne[GEST_CHAMPS_LIBELLE_CATEGORIE]][] = array( |
'id' => 'pr['.$ligne[GEST_CHAMPS_ID_PROJET].']', |
'valeur' => $ligne[GEST_CHAMPS_ID_PROJET], |
'nom' => $ligne[GEST_CHAMPS_NOM_PROJET], |
'coche' => $coche); |
} |
$Resultat->ajouterDonnee('preferences', $aso_preferences); |
} |
} |
?> |
/trunk/actions/GttActionPreferences.class.php |
---|
New file |
0,0 → 1,70 |
<?php |
require_once GTT_CHEMIN_METIER.'Projet.class.php'; |
require_once GTT_CHEMIN_METIER.'ProjetCategorie.class.php'; |
require_once GTT_CHEMIN_METIER.'UtilisateurAProjet.class.php'; |
class GttActionPreferences extends aAction { |
public function __construct() |
{ |
print_r($this->getResultat()); |
$Resultats = $this->getResultat(); |
$Resultats->ajouterEspace('Preferences', 'preferences'); |
$Resultats->ajouterSquelette('preferences', 'preferences.tpl.html'); |
} |
public function executer(Resultat $Resultat) |
{ |
$aso_preferences = array(); |
$Resultat->setTitre('Modifier mes préférences'); |
$Projet = new Projet(); |
$tab_projets = $Projet->consulter(Projet::GP_TOUS); |
$aso_preferences['nbre_projets'] = count($tab_projets); |
// Parcourt du tableau de projets |
foreach ($tab_projets as $Projet) { |
// Vérification de la présence du projet dans les préférences de l'utilisateur |
$UtilisateurAProjet = new UtilisateurAProjet(); |
$cmd = UtilisateurAProjet::GUAP_ID; |
$param = array($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur(), $Projet->getIdProjet()); |
$coche = false; |
if ($present = $UtilisateurAProjet->consulter($cmd, $param)) { |
$coche = true; |
} |
// Récupération de la catégorie du projet |
$ProjetCategorie = new ProjetCategorie(); |
$cmd = ProjetCategorie::GPC_ID; |
$param = $Projet->getCeCategorie(); |
$Categorie = $ProjetCategorie->consulter($cmd, $param); |
// Récupération de toutes les infos |
$aso_preferences['preferences'][$Categorie->getLibelle()][] = array( |
'id' => $Projet->getIdProjet(), |
'valeur' => $Projet->getIdProjet(), |
'nom' => $Projet->getNomProjet(), |
'coche' => $coche); |
} |
ksort($aso_preferences['preferences']); |
//echo '<pre>'.print_r($aso_preferences, true).'</pre>'; |
$Resultat->ajouterDonnee('preferences', $aso_preferences); |
} |
public function executerValider(Resultat $Resultat) |
{ |
// Mise à jour des Préférences |
$UtilisateurAProjet = new UtilisateurAProjet(); |
$UtilisateurAProjet->setIdUtilisateur($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur()); |
$UtilisateurAProjet->supprimer(); |
//echo '<pre>'.print_r($_POST, true).'</pre>'; |
foreach ($_POST['pr'] as $pr_id) { |
$UtilisateurAProjet = new UtilisateurAProjet(); |
$UtilisateurAProjet->setIdUtilisateur($GLOBALS['_GTT_']['Utilisateur']->getIdUtilisateur()); |
$UtilisateurAProjet->setIdProjet($pr_id); |
$UtilisateurAProjet->ajouter(); |
} |
// Action suivante |
$this->setSuivant('__defaut__'); |
} |
} |
?> |
/trunk/gtt_config.inc.php |
---|
6,6 → 6,8 |
// Les constantes d'action |
define ('GTT_ACTION_PREFERENCE', 'preferences'); |
define ('GTT_ACTION_PREFERENCE_VALIDER', 'preferences_valider'); |
define ('GTT_ACTION_GESTION', 'gestion'); |
define ('GTT_ACTION_UTILISATEUR', 'utilisateur'); |
// Définition des constantes |
define ('GESTION_TRAVAIL', 1); |
36,6 → 38,7 |
define ('GTT_CHEMIN_APPLI', ''); |
define ('GTT_CHEMIN_CLASSE', GTT_CHEMIN_APPLI.'classes/'); |
define('GTT_CHEMIN_PEAR', GTT_CHEMIN_CLASSE.'pear/'); |
define ('GTT_CHEMIN_METIER', GTT_CHEMIN_CLASSE.'metiers/'); |
define ('GTT_CHEMIN_MODULE', GTT_CHEMIN_APPLI.'modules/'); |
define ('GTT_CHEMIN_ACTION', GTT_CHEMIN_APPLI.'actions/'); |
42,13 → 45,23 |
define ('GTT_CHEMIN_PRESENTATION', GTT_CHEMIN_APPLI.'presentation/'); |
define ('GTT_CHEMIN_VUE', GTT_CHEMIN_APPLI.'vues/'); |
ini_set('include_path',ini_get('include_path').';'.GTT_CHEMIN_PEAR.';'); |
/** |
//==================================== CONSTANTES ================================== |
/* Base de données |
//================================================================================== |
*/ |
define('GTT_BDD_NOM', 'gestion_v4'); |
define('GTT_BDD_DSN', 'mysql://root:0000@localhost/'.GTT_BDD_NOM); |
/** |
//==================================== CONSTANTES ================================== |
/* definition des constantes de plusieurs tests et divers |
//================================================================================== |
*/ |
//$GLOBALS['dsn']="mysql://shaheen:shaheen@162.38.234.6/gestion_test_v3"; |
$GLOBALS['dsn'] = 'mysql://root:0000@localhost/gestion'; |
$GLOBALS['dsn_v3'] = 'mysql://root:0000@localhost/gestion_v3'; |
$GLOBALS['urlBase'] = 'http://localhost/gestion/index.php?action='; |
//on suppose que le nombre d'heure maximum par jour de travail est 23 |
$GLOBALS['limiteJourTravail'] = 24; |
/trunk/installation/gestion_test_v3.sql.zip |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/installation/gestion_test_v3.sql |
---|
New file |
0,0 → 1,444 |
# phpMyAdmin SQL Dump |
# version 2.5.6 |
# http://www.phpmyadmin.net |
# |
# Serveur: localhost |
# Généré le : Mardi 22 Février 2005 à 10:37 |
# Version du serveur: 4.1.9 |
# Version de PHP: 4.3.10 |
# |
# Base de données: `gestion_test_v3` |
# |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_absence` |
# |
CREATE TABLE `gestion_absence` ( |
`gu_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gma_id_motif` tinyint(3) unsigned NOT NULL default '0', |
`ga_date_debut` date NOT NULL default '0000-00-00', |
`ga_date_fin` date NOT NULL default '0000-00-00', |
`ga_date_envoi_lettre` date NOT NULL default '0000-00-00', |
PRIMARY KEY (`gu_id_utilisateur`,`gma_id_motif`,`ga_date_debut`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_absence` |
# |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-01-02', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-01-03', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-04-23', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-04-24', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-11', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-12', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-13', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-14', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-18', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-19', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-20', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-21', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-22', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-25', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-26', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-27', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-28', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 0, '2003-08-29', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 1, '2003-05-02', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 1, '2003-05-09', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 1, '2003-05-30', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 1, '2003-07-28', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 4, '2003-01-01', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 4, '2003-04-21', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 4, '2003-05-01', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 4, '2003-05-08', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 4, '2003-05-29', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 4, '2003-07-14', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (2, 4, '2003-08-15', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-01-01', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-01-02', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-01-03', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-04-11', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-04-12', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-04-13', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-04-14', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-04-15', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-04-16', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-04-17', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-04-18', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-16', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-17', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-18', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-21', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-22', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-23', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-24', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-25', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-27', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-28', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-29', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-30', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-07-31', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-08-01', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-08-04', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-08-05', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-08-06', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-08-07', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-08-08', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 0, '2003-08-11', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 1, '2003-05-02', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 1, '2003-05-09', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 1, '2003-06-06', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 1, '2003-08-12', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 1, '2003-08-13', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 1, '2003-08-14', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 4, '2003-04-21', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 4, '2003-05-01', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 4, '2003-05-08', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 4, '2003-05-29', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 4, '2003-06-09', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 4, '2003-07-14', '0000-00-00', '0000-00-00'); |
INSERT INTO `gestion_absence` VALUES (3, 4, '2003-08-15', '0000-00-00', '0000-00-00'); |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_categorie` |
# |
CREATE TABLE `gestion_categorie` ( |
`gc_id_categorie` int(10) unsigned NOT NULL default '0', |
`gc_libelle_categorie` varchar(255) default NULL, |
PRIMARY KEY (`gc_id_categorie`), |
UNIQUE KEY `gc_libelle_categorie` (`gc_libelle_categorie`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_categorie` |
# |
INSERT INTO `gestion_categorie` VALUES (5, 'Projets inclus convention MEDT'); |
INSERT INTO `gestion_categorie` VALUES (2, 'Fonctionnement interne'); |
INSERT INTO `gestion_categorie` VALUES (3, 'Site internet et outils coopératif'); |
INSERT INTO `gestion_categorie` VALUES (4, 'Animation'); |
INSERT INTO `gestion_categorie` VALUES (6, 'Projet hors convention'); |
INSERT INTO `gestion_categorie` VALUES (7, 'Services pour des tiers'); |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_composer_utilisateur_frais_kilometrique` |
# |
CREATE TABLE `gestion_composer_utilisateur_frais_kilometrique` ( |
`gcufk_id_frais_kilometrique` int(10) unsigned NOT NULL default '0', |
`gcufk_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gcufk_date_frais` date NOT NULL default '0000-00-00', |
`gcufk_nb_kilometre` float default NULL, |
`gcufk_objet` varchar(255) default NULL, |
`gcufk_trajet` varchar(255) default NULL, |
`gcufk_montant_total` float NOT NULL default '0', |
PRIMARY KEY (`gcufk_id_frais_kilometrique`,`gcufk_id_utilisateur`,`gcufk_date_frais`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_composer_utilisateur_frais_kilometrique` |
# |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_depense` |
# |
CREATE TABLE `gestion_depense` ( |
`gu_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gnf_id_frais` int(10) unsigned NOT NULL default '0', |
`gd_date_depense` date NOT NULL default '0000-00-00', |
`gd_montant_ht` float default NULL, |
`gd_montant_ttc` float NOT NULL default '0', |
PRIMARY KEY (`gu_id_utilisateur`,`gnf_id_frais`,`gd_date_depense`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_depense` |
# |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_frais_kilometrique` |
# |
CREATE TABLE `gestion_frais_kilometrique` ( |
`gfk_id_frais_kilometrique` int(10) unsigned NOT NULL default '0', |
`gfk_taux_kilometre` float NOT NULL default '0', |
PRIMARY KEY (`gfk_id_frais_kilometrique`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_frais_kilometrique` |
# |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_motif_absence` |
# |
CREATE TABLE `gestion_motif_absence` ( |
`gma_id_motif` tinyint(3) unsigned NOT NULL default '0', |
`gma_libelle_motif` varchar(255) NOT NULL default '', |
`gma_nb_heures_supprim` float default NULL, |
`gma_type_rtt` char(1) NOT NULL default '', |
PRIMARY KEY (`gma_id_motif`), |
UNIQUE KEY `gma_libelle_motif` (`gma_libelle_motif`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_motif_absence` |
# |
INSERT INTO `gestion_motif_absence` VALUES (0, 'Congés Payés', '1', '0'); |
INSERT INTO `gestion_motif_absence` VALUES (1, 'Récupération', '1', '1'); |
INSERT INTO `gestion_motif_absence` VALUES (2, 'Maladie', '1', '0'); |
INSERT INTO `gestion_motif_absence` VALUES (3, 'Grêve', '1', '1'); |
INSERT INTO `gestion_motif_absence` VALUES (4, 'Ferié', '1', '0'); |
INSERT INTO `gestion_motif_absence` VALUES (5, 'Récup part:1/2j', '0.5', '0'); |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_note_frais` |
# |
CREATE TABLE `gestion_note_frais` ( |
`gnf_id_frais` int(10) unsigned NOT NULL default '0', |
`gnf_libelle_frais` varchar(255) NOT NULL default '', |
PRIMARY KEY (`gnf_id_frais`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_note_frais` |
# |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_predecesseurs` |
# |
CREATE TABLE `gestion_predecesseurs` ( |
`gt_id_tache` int(10) unsigned NOT NULL default '0', |
`gpred_id_pred` int(10) unsigned NOT NULL default '0', |
PRIMARY KEY (`gt_id_tache`,`gpred_id_pred`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_predecesseurs` |
# |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_preferences` |
# |
CREATE TABLE `gestion_preferences` ( |
`gu_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gp_id_projet` int(10) unsigned NOT NULL default '0', |
PRIMARY KEY (`gu_id_utilisateur`,`gp_id_projet`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_preferences` |
# |
INSERT INTO `gestion_preferences` VALUES (7, 10); |
INSERT INTO `gestion_preferences` VALUES (7, 15); |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_prevision_tache` |
# |
CREATE TABLE `gestion_prevision_tache` ( |
`gu_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gt_id_tache` int(10) unsigned NOT NULL default '0', |
`gpt_date_prevision` date NOT NULL default '0000-00-00', |
`gpt_duree_prevision` float NOT NULL default '0', |
PRIMARY KEY (`gu_id_utilisateur`,`gt_id_tache`,`gpt_date_prevision`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_prevision_tache` |
# |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_projet` |
# |
CREATE TABLE `gestion_projet` ( |
`gp_id_projet` int(10) unsigned NOT NULL default '0', |
`gc_id_categorie` int(10) unsigned NOT NULL default '0', |
`gp_nom_projet` varchar(255) NOT NULL default '', |
`gp_description` varchar(255) default NULL, |
`gp_date_debut` date default NULL, |
`gp_duree_prevue` float default NULL, |
`gp_avancement` int(11) default NULL, |
PRIMARY KEY (`gp_id_projet`), |
UNIQUE KEY `gp_nom_projet` (`gp_nom_projet`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_projet` |
# |
INSERT INTO `gestion_projet` VALUES (11, 2, 'Comptablilité', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (9, 2, 'Formation stagiaire', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (10, 2, 'Gestion interne', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (3, 6, 'Base de données nomenclaturale', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (4, 6, 'Index des bryophytes', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (5, 6, 'Index des plantes de la Réunion', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (6, 6, 'Plantes envahissantes', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (7, 7, 'Projet FEEE planetere', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (8, 7, 'projet FEEE - YRE', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (12, 2, 'Déplacement', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (13, 2, 'Formation', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (14, 2, 'Autres', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (15, 3, 'Développement', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (16, 3, 'Contenu du site', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (17, 3, 'Autre', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (18, 5, 'Flore éléctronique', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (19, 5, 'Apprendre la botanique sur internet', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (20, 6, 'Inventaire des herbiers de France', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (21, 3, 'Maintenance informatique', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (22, 4, 'Animation adhérent', '', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (23, 5, 'Phytochorologie', 'Base de données sur la répartition départementale de la flore métropolitaine.', NULL, NULL, NULL); |
INSERT INTO `gestion_projet` VALUES (24, 5, 'Base de données biblio et annuaire', 'Biblio Libra et associations, index des taxons du monde des plantes.', NULL, NULL, NULL); |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_statut` |
# |
CREATE TABLE `gestion_statut` ( |
`gs_id_statut` tinyint(3) unsigned NOT NULL default '0', |
`gs_libelle_statut` varchar(255) NOT NULL default '', |
PRIMARY KEY (`gs_id_statut`), |
UNIQUE KEY `gs_libelle_statut` (`gs_libelle_statut`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_statut` |
# |
INSERT INTO `gestion_statut` VALUES (0, 'Stagiaire'); |
INSERT INTO `gestion_statut` VALUES (1, 'Salarié'); |
INSERT INTO `gestion_statut` VALUES (2, 'Président'); |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_taches` |
# |
CREATE TABLE `gestion_taches` ( |
`gt_id_tache` int(10) unsigned NOT NULL default '0', |
`gp_id_projet` int(10) unsigned NOT NULL default '0', |
`gt_nom_tache` varchar(255) NOT NULL default '', |
`gt_description_tache` varchar(255) default NULL, |
`gt_date_debut_tache` date default NULL, |
`gt_duree_prevue` int(10) unsigned default NULL, |
`gt_avancement` int(11) default NULL, |
`gt_duree_reelle_tache` int(11) default NULL, |
PRIMARY KEY (`gt_id_tache`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_taches` |
# |
INSERT INTO `gestion_taches` VALUES (1, 10, 'général', NULL, NULL, NULL, NULL, NULL); |
INSERT INTO `gestion_taches` VALUES (2, 15, 'général', NULL, NULL, NULL, NULL, NULL); |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_travail` |
# |
CREATE TABLE `gestion_travail` ( |
`gt_id_tache` int(10) unsigned NOT NULL default '0', |
`gu_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gt_date_travail` date NOT NULL default '0000-00-00', |
`gt_duree_travail` float NOT NULL default '0', |
PRIMARY KEY (`gt_id_tache`,`gu_id_utilisateur`,`gt_date_travail`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_travail` |
# |
INSERT INTO `gestion_travail` VALUES (14, 3, '2003-04-23', '3'); |
INSERT INTO `gestion_travail` VALUES (18, 3, '2003-04-23', '3.75'); |
INSERT INTO `gestion_travail` VALUES (22, 3, '2003-04-23', '1'); |
INSERT INTO `gestion_travail` VALUES (18, 3, '2003-04-24', '7'); |
INSERT INTO `gestion_travail` VALUES (22, 3, '2003-04-24', '1'); |
INSERT INTO `gestion_travail` VALUES (18, 3, '2003-04-25', '3.75'); |
INSERT INTO `gestion_travail` VALUES (22, 3, '2003-04-25', '0.75'); |
INSERT INTO `gestion_travail` VALUES (25, 3, '2003-04-25', '2.75'); |
INSERT INTO `gestion_travail` VALUES (18, 3, '2003-04-28', '6.5'); |
# -------------------------------------------------------- |
# |
# Structure de la table `gestion_utilisateur` |
# |
CREATE TABLE `gestion_utilisateur` ( |
`gu_id_utilisateur` int(10) unsigned NOT NULL default '0', |
`gs_id_statut` tinyint(3) unsigned NOT NULL default '0', |
`gu_nom` varchar(255) NOT NULL default '', |
`gu_prenom` varchar(255) NOT NULL default '', |
`gu_password` varchar(255) NOT NULL default '', |
`gu_email` varchar(255) NOT NULL default '', |
`gu_telephone` int(10) unsigned default NULL, |
`gu_adresse` varchar(255) default NULL, |
`gu_code_postal` int(10) unsigned default NULL, |
`gu_ville` varchar(255) default NULL, |
`gu_quota_heures_supp` float default NULL, |
`gu_conges_payes` float default NULL, |
`gu_temps_de_travail` float default NULL, |
`gu_admin` tinyint(3) unsigned default NULL, |
`gu_admin2` tinyint(3) unsigned default NULL, |
`gu_notes` varchar(255) default NULL, |
PRIMARY KEY (`gu_id_utilisateur`), |
UNIQUE KEY `gu_email` (`gu_email`) |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
# |
# Contenu de la table `gestion_utilisateur` |
# |
INSERT INTO `gestion_utilisateur` VALUES (1, 0, 'Bannier', 'Dorian', 'f49f9fa1fc5f1e549d4af6e9fb953922', 'dbannier@aol.com', 6, 'App 86C Résidence de Bissy, Route de Ganges', 34, 'MONTPELLIER', '13', '42', '7', 1, 1, 'A réalisée cette application'); |
INSERT INTO `gestion_utilisateur` VALUES (0, 2, 'Mathieu', 'Daniel', '4aad7a31ef189458ce3f8d87ec973bfb', 'd.math@wanadoo.fr', 6, '26, avenue St Jean', 84, 'AVIGNON', '0', '15.5', '0', 1, 1, NULL); |
INSERT INTO `gestion_utilisateur` VALUES (2, 1, 'Granier', 'Alexandre', '4a7d1ed414474e4033ac29ccb8653d9b', 'alexandre@tela-botanica.org', 4, '300, rue Buffon', 34, 'MONTPELLIER', '13.74', '13.5', '7', 1, 0, ''); |
INSERT INTO `gestion_utilisateur` VALUES (3, 1, 'Milcent', 'Jean-Pascal', 'bb3a0c91229a891187492444c5760e2b', 'jpm@tela-botanica.org', 6, '3, rue du Wineck', 68, 'COLMAR', '54.75', '22', '7', 1, 0, NULL); |
INSERT INTO `gestion_utilisateur` VALUES (6, 0, 'Guillot', 'Marie', '5d41402abc4b2a76b9719d911017c592', 'marie@tela-botanica.org', 467663248, '29 ter rue du plan de l\'Olivier', 0, 'montpellier', '-66', '6.5', '7', 0, 0, NULL); |
INSERT INTO `gestion_utilisateur` VALUES (4, 1, 'Le Bourg', 'Tamara', '202cb962ac59075b964b07152d234b70', 'tamara@tela-botanica.org', 4, '13, square Murillo', 34070, 'Montpellier', '15.02', '19.5', '7', 1, 0, NULL); |
INSERT INTO `gestion_utilisateur` VALUES (5, 1, 'BOURDEL', 'Stéphanie', '405aaff66082ffe7231d7c1f79926c17', 'stephanie@tela-botanica.org', 6, 'Marivaux bât A pte 13 / 42 av. Pic St Loup', 0, 'Montpellier', '-1288.5', '20.5', '7', 1, 0, 'Remplacement Tamara pendant son congé maternité + congé parental.'); |
INSERT INTO `gestion_utilisateur` VALUES (7, 0, 'Abdool Raheem', 'Shaheen', '6142a777667a67d568f674931389f0d9', 'shaheen@tela-botanica.org', 0, '--', 0, 'montpellier', '44', '3', '0', 0, 0, NULL); |
/trunk/installation/gestion_test_v3.zip |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/installation/gestion_test_v3.zip |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |