#
# Mises à niveau version 0.9.9f
#

#
# Table structure for table `smi_ccat`
#

ALTER TABLE `smi_ccat`  COMMENT = 'Cat�gories clients' ;

#
# Table structure for table `smi_cage`
#

DROP TABLE IF EXISTS `smi_cage`;
CREATE TABLE IF NOT EXISTS `smi_cage` (
  `cage_id` int(10) unsigned NOT NULL auto_increment,
  `cage_datecrea` date NOT NULL default '0000-00-00',
  `cage_datemod` date NOT NULL default '0000-00-00',
  `cage_codeage` varchar(20) NOT NULL,
  `cage_codefonc` varchar(5) NOT NULL,
  `cage_civilite` varchar(5) NOT NULL,
  `cage_prenom` varchar(50) NOT NULL,
  `cage_nom` varchar(50) NOT NULL,
  `cage_telf` varchar(20) NOT NULL,
  `cage_fax` varchar(20) NOT NULL,
  `cage_telp` varchar(20) NOT NULL,
  `cage_email` varchar(50) default NULL,
  `cage_mess` varchar(50) default NULL,
  `cage_nota` text,
  PRIMARY KEY  (`cage_id`),
  KEY `cage_codeage` (`cage_codeage`),
  KEY `cage_codefonc` (`cage_codefonc`),
  KEY `cage_civilite` (`cage_civilite`),
  KEY `cage_nom` (`cage_nom`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Contacts agences';

#
# Dumping data for table `smi_cage`
#

#
# Table structure for table `smi_cdo`
#

DROP TABLE IF EXISTS `smi_cdo`;
CREATE TABLE IF NOT EXISTS `smi_cdo` (
  `cdo_id` int(10) unsigned NOT NULL auto_increment,
  `cdo_datecrea` date NOT NULL default '0000-00-00',
  `cdo_datemod` date NOT NULL default '0000-00-00',
  `cdo_codedo` varchar(20) NOT NULL,
  `cdo_codefonc` varchar(5) NOT NULL,
  `cdo_civilite` varchar(5) NOT NULL,
  `cdo_prenom` varchar(50) NOT NULL,
  `cdo_nom` varchar(50) NOT NULL,
  `cdo_telf` varchar(20) NOT NULL,
  `cdo_fax` varchar(20) NOT NULL,
  `cdo_telp` varchar(20) NOT NULL,
  `cdo_email` varchar(50) default NULL,
  `cdo_mess` varchar(50) default NULL,
  `cdo_nota` text,
  PRIMARY KEY  (`cdo_id`),
  KEY `cdo_codedo` (`cdo_codedo`),
  KEY `cdo_codefonc` (`cdo_codefonc`),
  KEY `cdo_civilite` (`cdo_civilite`),
  KEY `cdo_nom` (`cdo_nom`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Contacts donneurs d''ordres';


#
# Dumping data for table `smi_cdo`
#

#
# Table structure for table `smi_cst`
#

DROP TABLE IF EXISTS `smi_cst`;
CREATE TABLE IF NOT EXISTS `smi_cst` (
  `cst_id` int(10) unsigned NOT NULL auto_increment,
  `cst_datecrea` date NOT NULL default '0000-00-00',
  `cst_datemod` date NOT NULL default '0000-00-00',
  `cst_codest` varchar(20) NOT NULL,
  `cst_codefonc` varchar(5) NOT NULL,
  `cst_civilite` varchar(5) NOT NULL,
  `cst_prenom` varchar(50) NOT NULL,
  `cst_nom` varchar(50) NOT NULL,
  `cst_telf` varchar(20) NOT NULL,
  `cst_fax` varchar(20) NOT NULL,
  `cst_telp` varchar(20) NOT NULL,
  `cst_email` varchar(50) default NULL,
  `cst_mess` varchar(50) default NULL,
  `cst_nota` text,
  PRIMARY KEY  (`cst_id`),
  KEY `cst_codest` (`cst_codest`),
  KEY `cst_codefonc` (`cst_codefonc`),
  KEY `cst_civilite` (`cst_civilite`),
  KEY `cst_nom` (`cst_nom`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Contacts sous-traitants';

#
# Dumping data for table `smi_cst`
#

#
# Table structure for table `smi_dos`
#

DROP TABLE IF EXISTS `smi_dos`;
CREATE TABLE IF NOT EXISTS `smi_dos` (
  `dos_id` int(10) unsigned NOT NULL auto_increment,
  `dos_code` varchar(20) NOT NULL,
  `dos_codecli` varchar(20) NOT NULL,
  `dos_titre` varchar(50) NOT NULL,
  `dos_res` text NOT NULL,
  `dos_datecrea` date NOT NULL default '0000-00-00',
  `dos_codecrea` varchar(20) NOT NULL,
  `dos_datemod` date NOT NULL default '0000-00-00',
  `dos_codemod` varchar(20) NOT NULL,
  `dos_datedde` date NOT NULL default '0000-00-00',
  `dos_datefinp` date NOT NULL default '0000-00-00',
  `dos_codeage` varchar(20) NOT NULL,
  `dos_urg` tinyint(3) unsigned NOT NULL default '0',
  `dos_codesuiv` varchar(20) NOT NULL,
  `dos_codedosc` varchar(5) NOT NULL,
  `dos_codedoss` varchar(5) NOT NULL,
  `dos_proba` tinyint(3) NOT NULL default '0',
  `dos_avance` tinyint(3) NOT NULL default '0',
  `dos_datefin` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`dos_id`),
  KEY `dos_code` (`dos_code`),
  KEY `dos_codecrea` (`dos_codecrea`),
  KEY `dos_codemod` (`dos_codemod`),
  KEY `dos_codedosc` (`dos_codedosc`),
  KEY `dos_codedoss` (`dos_codedoss`),
  KEY `dos_codeage` (`dos_codeage`),
  KEY `dos_codecli` (`dos_codecli`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Dossiers de suivi';


#
# Dumping data for table `smi_dos`
#

#
# Table structure for table `smi_dosc`
#

DROP TABLE IF EXISTS `smi_dosc`;
CREATE TABLE IF NOT EXISTS `smi_dosc` (
  `dosc_id` tinyint(3) unsigned NOT NULL auto_increment,
  `dosc_code` varchar(5) NOT NULL,
  `dosc_desc` varchar(50) NOT NULL,
  `dosc_img` varchar(200) NOT NULL,
  `dosc_delok` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`dosc_id`),
  KEY `dosc_code` (`dosc_code`),
  KEY `dosc_img` (`dosc_img`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Catégories dossiers';


#
# Dumping data for table `smi_dosc`
#

INSERT INTO `smi_dosc` VALUES(1, 'CIAL', 'COMMERCIAL', '../icones/nuvola/ooo_writer_tpl.png', 0);
INSERT INTO `smi_dosc` VALUES(2, 'TEC', 'TECHNIQUE', '../icones/nuvola/kcontrol.png', 0);

#
# Table structure for table `smi_dosd`
#

DROP TABLE IF EXISTS `smi_dosd`;
CREATE TABLE IF NOT EXISTS `smi_dosd` (
  `dosd_id` int(10) unsigned NOT NULL auto_increment,
  `dosd_codedos` varchar(20) NOT NULL,
  `dosd_codedosta` varchar(5) NOT NULL,
  `dosd_dateact` date NOT NULL default '0000-00-00',
  `dosd_heured` time NOT NULL default '00:00:00',
  `dosd_heuref` time NOT NULL default '00:00:00',
  `dosd_obj` text NOT NULL,
  `dosd_res` text,
  `dosd_concl` text,
  `dosd_clos` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`dosd_id`),
  KEY `dosd_codedos` (`dosd_codedos`),
  KEY `dosd_codedosta` (`dosd_codedosta`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Détails des dossiers';

#
# Dumping data for table `smi_dosd`
#

#
# Table structure for table `smi_dosdi`
#

DROP TABLE IF EXISTS `smi_dosdi`;
CREATE TABLE IF NOT EXISTS `smi_dosdi` (
  `dosdi_id` int(10) NOT NULL auto_increment,
  `dosdi_iddosd` int(10) unsigned NOT NULL,
  `dosdi_typinter` tinyint(1) NOT NULL,
  `dosdi_idctact` varchar(10) NOT NULL,
  `dosdi_codeinter` varchar(20) NOT NULL,
  PRIMARY KEY  (`dosdi_id`),
  KEY `dosdi_typinter` (`dosdi_typinter`),
  KEY `dosdi_idctact` (`dosdi_idctact`),
  KEY `dosdi_codeinter` (`dosdi_codeinter`),
  KEY `dosdi_iddosd` (`dosdi_iddosd`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Intervenants détails dossiers';

#
# Dumping data for table `smi_dosdi`
#

#
# Table structure for table `smi_doss`
#

DROP TABLE IF EXISTS `smi_doss`;
CREATE TABLE IF NOT EXISTS `smi_doss` (
  `doss_id` tinyint(3) unsigned NOT NULL auto_increment,
  `doss_code` varchar(5) NOT NULL,
  `doss_desc` varchar(50) NOT NULL,
  `doss_img` varchar(200) NOT NULL,
  `doss_delok` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`doss_id`),
  KEY `doss_code` (`doss_code`),
  KEY `doss_img` (`doss_img`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Statuts dossiers';

#
# Dumping data for table `smi_doss`
#

INSERT INTO `smi_doss` VALUES(1, 'DNT', 'DOSSIER NON TRAITE', '../icones/nuvola/cache.png', 0);
INSERT INTO `smi_doss` VALUES(2, 'INFO', 'PRISE D''INFORMATIONS CLIENT', '../icones/nuvola/help.png', 0);
INSERT INTO `smi_doss` VALUES(3, 'ETU', 'ETUDE EN COURS', '../icones/nuvola/log.png', 0);
INSERT INTO `smi_doss` VALUES(4, 'OAE', 'OFFRE A ETABLIR', '../icones/nuvola/kcalc.png', 0);
INSERT INTO `smi_doss` VALUES(5, 'OE', 'OFFRE ENVOYEE', '../icones/nuvola/mail_post_to.png', 0);
INSERT INTO `smi_doss` VALUES(6, 'OA', 'OFFRE ACCEPTEE', '../icones/EmotiKons/smile.png', 0);
INSERT INTO `smi_doss` VALUES(7, 'OR', 'OFFRE REFUSEE', '../icones/EmotiKons/sad.png', 0);
INSERT INTO `smi_doss` VALUES(8, 'CLOT', 'DOSSIER CLOT', '../icones/nuvola/lock.png', 0);

#
# Table structure for table `smi_dosta`
#

DROP TABLE IF EXISTS `smi_dosta`;
CREATE TABLE IF NOT EXISTS `smi_dosta` (
  `dosta_id` tinyint(3) unsigned NOT NULL auto_increment,
  `dosta_code` varchar(5) NOT NULL,
  `dosta_desc` varchar(50) NOT NULL,
  `dosta_img` varchar(200) NOT NULL,
  `dosta_delok` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`dosta_id`),
  KEY `dosta_code` (`dosta_code`),
  KEY `dosta_img` (`dosta_img`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Types opérations  dossiers';

#
# Dumping data for table `smi_doss`
#

INSERT INTO `smi_dosta` VALUES(1, 'RA', 'REUNION (AGENCE)', '../icones/EmotiKons/boy.png', 0);
INSERT INTO `smi_dosta` VALUES(2, 'RS', 'REUNION (SUR SITE)', '../icones/EmotiKons/boy_hug.png', 0);
INSERT INTO `smi_dosta` VALUES(3, 'AT', 'APPEL TELEPHONIQUE', '../icones/EmotiKons/phone 2.png', 0);
INSERT INTO `smi_dosta` VALUES(4, 'EE', 'ENVOI EMAIL', '../icones/glaze/message.png', 0);
INSERT INTO `smi_dosta` VALUES(5, 'ET', 'ENVOI TELECOPIE', '../icones/glaze/postscript.png', 0);
INSERT INTO `smi_dosta` VALUES(6, 'EC', 'ENVOI COURRIER', '../icones/glaze/mail_forward.png', 0);
INSERT INTO `smi_dosta` VALUES(7, 'DD', 'DEMONSTRATION DISTANTE', '../icones/glaze/network.png', 0);

#
# Table structure for table `smi_cons`
#

ALTER TABLE `smi_cons` ADD `cons_rdos` VARCHAR( 10 ) NOT NULL DEFAULT 'DS08';
ALTER TABLE `smi_cons` ADD `cons_ndos` INT( 10 ) NOT NULL DEFAULT '0';

#
# Table structure for table `smi_barloc`
#

ALTER TABLE `smi_barloc` ADD `barloc_typarr` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `barloc_mult` ;

#
# Table structure for table `smi_pdtlbl`
#

ALTER TABLE `smi_pdtlbl` CHANGE `pdtlbl_qte` `pdtlbl_qte` FLOAT( 10, 2 ) NOT NULL DEFAULT '0.00' ;

#
# Table structure for table `smi_inth`
#

 ALTER TABLE `smi_inth` ADD INDEX ( `inth_codelieu` ) ;


#
# Mises à niveau version 0.9.9g
#


INSERT INTO `smi_txt` VALUES('', '2008-03-25', 'Administrateur', '2008-03-25', 'Administrateur', 'ST_MDP_XXX_ST', '', 'SOUS-TRAITANT : Email envoyé vers le sous-traitant suite � changement de MDP', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%st_nom%</strong><br />\r\n%st_adr1%<br />\r\n%st_adr2%<br />\r\n%cp_st% %ville_st%<br />\r\nTel : %st_telf%<br />\r\nFax : %st_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p><strong>A l''attention de %st_resp_civilite% %st_resp_prenom% %st_resp_nom%</strong></p>\r\n<p>%civiliter1M_st%,<br />\r\n<br />\r\nC''est avec plaisir que nous vous confirmons la mise &agrave;  jour de votre compte.  Voici vos codes de connexion et mot de passe :</p>\r\n<blockquote>Code de connexion : <strong>%st_code%</strong><br />\r\nMot de passe          : <strong>%pass%</strong></blockquote>\r\n<p><br />\r\nConservez pr&eacute;cieusement ces informations pour pouvoir vous connecter et suivre vos dossiers techniques sur notre site <a href="http://%cge_web%">%cge_web%</a> (menu &quot;Espace priv&eacute;&quot;).<br />\r\n<br />\r\nBonne fin de journ&eacute;e.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-03-30', 'Administrateur', '2008-03-30', 'Administrateur', 'DOS_CRE_XXX_AGE', '', 'DOSSIERS : Email envoy� vers l''agence suite � un nouveau dossier', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%age_nom%</strong><br />\r\n%age_adr1%<br />\r\n%age_adr2%<br />\r\n%cp_age% %ville_age%<br />\r\nTel : %age_telf%<br />\r\nFax : %age_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>&nbsp;&nbsp;</p>\r\n<p><strong>A l''attention de %age_resp_civilite% %age_resp_prenom% %age_resp_nom%</strong></p>\r\n<p>%civiliter1M_age%,<br />\r\n<br />\r\nNous vous signalons la saisie d''un nouveau dossier de suivi (N&deg; <strong>%dos_code%</strong>, client %cli_code%).<br />\r\n<br />\r\nBonne fin de journ&eacute;e.</p>\r\n<p>Le centre de gestion.</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-03-30', 'Administrateur', '2008-03-30', 'Administrateur', 'DOS_CRE_XXX_CDG', '', 'DOSSIER : Email envoy� vers le CDG suite à création', '<p>Bonjour,<br />\r\n<br />\r\nNous vous signalons la cr&eacute;ation d''un nouveau dossier de suivi (N&deg; <strong>%dos_code%</strong>).<br />\r\n<br />\r\nBonne fin de journ&eacute;e.</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-03-30', 'Administrateur', '2008-03-30', 'Administrateur', 'DOS_MOD_XXX_CDG', '', 'DOSSIER : Email envoyé vers le CDG suite à modification', '<p>Bonjour,<br />\r\n<br />\r\nNous vous signalons la modification du dossier de suivi N&deg; <strong>%dos_code%</strong>.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-03-30', 'Administrateur', '2008-03-30', 'Administrateur', 'DOS_MOD_XXX_AGE', '', 'DOSSIER : Email envoy� vers l''agence suite � modification', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%age_nom%</strong><br />\r\n%age_adr1%<br />\r\n%age_adr2%<br />\r\n%cp_age% %ville_age%<br />\r\nTel : %age_telf%<br />\r\nFax : %age_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>&nbsp;&nbsp;</p>\r\n<p><strong>A l''attention de %age_resp_civilite% %age_resp_prenom% %age_resp_nom%</strong></p>\r\n<p>%civiliter1M_age%,<br />\r\n<br />\r\nNous vous signalons la mise &agrave; jour du dossier de suivi N&deg; <strong>%dos_code%</strong> (client %cli_code%).<br />\r\n<br />\r\nBonne fin de journ&eacute;e.</p>\r\n<p>Le centre de gestion</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-03-30', 'Administrateur', '2008-03-30', 'Administrateur', 'DOS_DEL_XXX_AGE', '', 'DOS : Email envoy� vers une agence suite � suppression', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%age_nom%</strong><br />\r\n%age_adr1%<br />\r\n%age_adr2%<br />\r\n%cp_age% %ville_age%<br />\r\nTel : %age_telf%<br />\r\nFax : %age_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>&nbsp;&nbsp;</p>\r\n<p><strong>A l''attention de %age_resp_civilite% %age_resp_prenom% %age_resp_nom%</strong></p>\r\n<p>%civiliter1M_age%,<br />\r\n<br />\r\nNous vous signalons l''annulation du dossier de suivi N&deg;<strong> %dos_code%</strong> (client %cli_code%).<br />\r\n<br />\r\nBonne fin de journ&eacute;e.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-03-30', 'Administrateur', '2008-03-30', 'Administrateur', 'DOS_DEL_XXX_CDG', '', 'DOSSIER : Email envoy� vers le CDG suite � suppression', '<p>Bonjour,<br />\r\n<br />\r\nNous vous signalons l''annulation du dossier de suivi N&deg;<strong> %dos_code%</strong>.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.</p>', 0);


#
# Mises à niveau version 0.9.9h
#

#
# Table structure for table `smi_tecpr`
#

DROP TABLE IF EXISTS `smi_tecpr`;
CREATE TABLE IF NOT EXISTS `smi_tecpr` (
  `tecpr_id` int(10) unsigned NOT NULL auto_increment,
  `tecpr_codetec` varchar(20) NOT NULL,
  `tecpr_date` date NOT NULL,
  `tecpr_couth` float(10,2) NOT NULL,
  PRIMARY KEY  (`tecpr_id`),
  KEY `tecpr_codetec` (`tecpr_codetec`),
  KEY `tecpr_date` (`tecpr_date`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Prix de revient techniciens';

#
# Table structure for table `smi_age`
#

ALTER TABLE `smi_age` ADD `age_resp_telp` VARCHAR( 20 ) NULL AFTER `age_resp_telf` ;

#
# Table structure for table `smi_agepr`
#

DROP TABLE IF EXISTS `smi_agepr`;
CREATE TABLE IF NOT EXISTS `smi_agepr` (
  `agepr_id` int(10) unsigned NOT NULL auto_increment,
  `agepr_codeage` varchar(20) NOT NULL,
  `agepr_date` date NOT NULL,
  `agepr_couth` float(10,2) NOT NULL,
  PRIMARY KEY  (`agepr_id`),
  KEY `agepr_codeage` (`agepr_codeage`),
  KEY `agepr_date` (`agepr_date`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Prix de revient resp agence';

#
# Table structure for table `smi_do`
#

ALTER TABLE `smi_do` ADD `do_resp_telp` VARCHAR( 20 ) NULL AFTER `do_resp_telf` ;

#
# Table structure for table `smi_st`
#

ALTER TABLE `smi_st` ADD `st_resp_telp` VARCHAR( 20 ) NULL AFTER `st_resp_telf` ;

#
# Table structure for table `smi_cagepr`
#

DROP TABLE IF EXISTS `smi_cagepr`;
CREATE TABLE IF NOT EXISTS `smi_cagepr` (
  `cagepr_id` int(10) unsigned NOT NULL auto_increment,
  `cagepr_idcage` int(10) unsigned NOT NULL,
  `cagepr_date` date NOT NULL,
  `cagepr_couth` float(10,2) NOT NULL,
  PRIMARY KEY  (`cagepr_id`),
  KEY `cagepr_idcage` (`cagepr_idcage`),
  KEY `cagepr_date` (`cagepr_date`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Prix de revient contacts agence';

#
# Mises à niveau version 0.9.9i
#

#
# Table structure for table `smi_lieu`
#

ALTER TABLE `smi_lieu` ADD `lieu_depl` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `lieu_img` ;

#
# Table structure for table `smi_dosta`
#

ALTER TABLE `smi_dosta` ADD `dosta_depl` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `dosta_img` ;


#
# Table structure for table `smi_inth`
#

ALTER TABLE `smi_inth` ADD `inth_acodemt` VARCHAR( 20 ) NULL ;
ALTER TABLE `smi_inth` ADD `inth_aheured` TIME NOT NULL DEFAULT '00:00:00' ;
ALTER TABLE `smi_inth` ADD `inth_aheuref` TIME NOT NULL DEFAULT '00:00:00';
ALTER TABLE `smi_inth` ADD `inth_akm` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_inth` ADD `inth_acd` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_inth` ADD `inth_afrais` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_inth` ADD `inth_afraisd` TEXT NULL;
ALTER TABLE `smi_inth` ADD `inth_rcodemt` VARCHAR( 20 ) NULL ;
ALTER TABLE `smi_inth` ADD `inth_rheured` TIME NOT NULL DEFAULT '00:00:00';
ALTER TABLE `smi_inth` ADD `inth_rheuref` TIME NOT NULL DEFAULT '00:00:00';
ALTER TABLE `smi_inth` ADD `inth_rkm` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_inth` ADD `inth_rcd` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_inth` ADD `inth_rfrais` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_inth` ADD `inth_rfraisd` TEXT NULL;

#
# Table structure for table `smi_mt`
#

DROP TABLE IF EXISTS `smi_mt`;
CREATE TABLE IF NOT EXISTS `smi_mt` (
  `mt_id` int(10) NOT NULL auto_increment,
  `mt_code` varchar(20) NOT NULL,
  `mt_des` varchar(50) NOT NULL,
  `mt_notes` text,
  `mt_valid` tinyint(1) NOT NULL default '1',
  `mt_coutk` float(10,2) NOT NULL default '0.00',
  `mt_coutf` float(10,2) NOT NULL default '0.00',
  `mt_coutas` tinyint(1) NOT NULL default '0',
  `mt_kmi` float(10,2) NOT NULL default '0.00',
  `mt_kmill` tinyint(1) NOT NULL default '0',
  `mt_kms` float(10,2) NOT NULL default '0.00',
  `mt_coutc` float(10,2) NOT NULL default '0.00',
  `mt_tpsdi` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`mt_id`),
  KEY `mt_code` (`mt_code`),
  KEY `mt_des` (`mt_des`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Moyens de transport';

#
# Table structure for table `smi_dosd`
#

ALTER TABLE `smi_dosd` ADD `dosd_acodemt` VARCHAR( 20 ) NULL ;
ALTER TABLE `smi_dosd` ADD `dosd_aheured` TIME NOT NULL DEFAULT '00:00:00' ;
ALTER TABLE `smi_dosd` ADD `dosd_aheuref` TIME NOT NULL DEFAULT '00:00:00';
ALTER TABLE `smi_dosd` ADD `dosd_akm` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_dosd` ADD `dosd_acd` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_dosd` ADD `dosd_afrais` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_dosd` ADD `dosd_afraisd` TEXT NULL;
ALTER TABLE `smi_dosd` ADD `dosd_rcodemt` VARCHAR( 20 ) NULL ;
ALTER TABLE `smi_dosd` ADD `dosd_rheured` TIME NOT NULL DEFAULT '00:00:00';
ALTER TABLE `smi_dosd` ADD `dosd_rheuref` TIME NOT NULL DEFAULT '00:00:00';
ALTER TABLE `smi_dosd` ADD `dosd_rkm` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_dosd` ADD `dosd_rcd` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_dosd` ADD `dosd_rfrais` FLOAT( 10, 2 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_dosd` ADD `dosd_rfraisd` TEXT NULL;

#
# Mises à niveau version 0.9.9k
#

INSERT INTO `smi_txt` VALUES(183, '2008-05-15', 'Administrateur', '2008-05-15', 'Administrateur', 'INT_CRE_XXX_TEC', '', 'INTERVENTION : Email envoyé vers le tech resp suite à saisie intervention', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%tec_nom%</strong><br />\r\n%tec_adr1%<br />\r\n%tec_adr2%<br />\r\n%cp_tec% %ville_tec%<br />\r\n&nbsp;</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>%civilite1M_tec%,<br />\r\n<br />\r\nNous vous signalons qu''une nouvelle intervention (N&deg;<strong> %int_code%</strong>, client %cli_code%), qui vous a &eacute;t&eacute; affect&eacute;e.<br />\r\n<br />\r\nMerci de rapidement la g&eacute;rer.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);

#
# Mises � niveau version 0.9.9l
#

#
# Table structure for table `smi_tacc`
#

DROP TABLE IF EXISTS `smi_tacc`;
CREATE TABLE IF NOT EXISTS `smi_tacc` (
  `tacc_id` tinyint(3) unsigned NOT NULL auto_increment,
  `tacc_code` varchar(5) NOT NULL,
  `tacc_desc` varchar(50) NOT NULL,
  `tacc_img` varchar(200) NOT NULL,
  `tacc_delok` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`tacc_id`),
  KEY `dosc_code` (`tacc_code`),
  KEY `dosc_img` (`tacc_img`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Cat�gories t�ches';

#
# Dumping data for table `smi_tacc`
#

INSERT INTO `smi_tacc` VALUES(1, 'CIAL', 'COMMERCIAL', '../icones/nuvola/ooo_writer_tpl.png', 0);
INSERT INTO `smi_tacc` VALUES(2, 'TEC', 'TECHNIQUE', '../icones/nuvola/kcontrol.png', 0);


#
# Table structure for table `smi_tac`
#

DROP TABLE IF EXISTS `smi_tac`;
CREATE TABLE IF NOT EXISTS `smi_tac` (
  `tac_id` int(10) unsigned NOT NULL auto_increment,
  `tac_code` varchar(20) NOT NULL,
  `tac_titre` varchar(50) NOT NULL,
  `tac_afaire` text NOT NULL,
  `tac_datecrea` date NOT NULL default '0000-00-00',
  `tac_codecrea` varchar(20) NOT NULL,
  `tac_datemod` date NOT NULL default '0000-00-00',
  `tac_codemod` varchar(20) NOT NULL,
  `tac_typdest` smallint(2) NOT NULL default '0',
  `tac_codedest` varchar(20) NOT NULL,
  `tac_typrat` smallint(2) NOT NULL default '0',
  `tac_coderat` varchar(20) default NULL,
  `tac_datefinp` date NOT NULL default '0000-00-00',
  `tac_urg` tinyint(3) unsigned NOT NULL default '0',
  `tac_codetacc` varchar(5) NOT NULL,
  `tac_avance` tinyint(3) NOT NULL default '0',
  `tac_datefin` date NOT NULL default '0000-00-00',
  PRIMARY KEY  (`tac_id`),
  KEY `tac_code` (`tac_code`),
  KEY `tac_datecrea` (`tac_datecrea`),
  KEY `tac_codecrea` (`tac_codecrea`),
  KEY `tac_datemod` (`tac_datemod`),
  KEY `tac_codemod` (`tac_codemod`),
  KEY `tac_typdest` (`tac_typdest`),
  KEY `tac_codedest` (`tac_codedest`),
  KEY `tac_typrat` (`tac_typrat`),
  KEY `tac_coderat` (`tac_coderat`),
  KEY `tac_datefinp` (`tac_datefinp`),
  KEY `tac_codetacc` (`tac_codetacc`),
  KEY `tac_datefin` (`tac_datefin`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='T�ches';

#
# Dumping data for table `smi_tac`
#


#
# Table structure for table `smi_cons`
#

ALTER TABLE `smi_cons` ADD `cons_rtac` VARCHAR( 10 ) NOT NULL DEFAULT 'TA08';
ALTER TABLE `smi_cons` ADD `cons_ntac` INT( 10 ) NOT NULL DEFAULT '0';

ALTER TABLE `smi_cons` CHANGE `cons_ncer` `cons_ncer` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_cons` CHANGE `cons_ndde` `cons_ndde` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_cons` CHANGE `cons_nrel` `cons_nrel` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_cons` CHANGE `cons_nrlic` `cons_nrlic` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_cons` CHANGE `cons_nrpdt` `cons_nrpdt` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_cons` CHANGE `cons_nord` `cons_nord` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_cons` CHANGE `cons_nretp` `cons_nretp` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_cons` CHANGE `cons_nrete` `cons_nrete` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_cons` CHANGE `cons_nloc` `cons_nloc` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_cons` CHANGE `cons_ndos` `cons_ndos` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_cons` CHANGE `cons_ntac` `cons_ntac` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';

#
# Table structure for table `smi_sclii`
#

DROP TABLE `smi_sclii`;

#
# Table structure for table `smi_int`
#

ALTER TABLE `smi_int` CHANGE `int_idsite` `int_idsite` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_int` ADD INDEX ( `int_idsite` ) ;

#
# Table structure for table `smi_txt`
#


INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_CRE_XXX_TEC', '', 'TACHE : Email envoy� vers un tech suite � saisie t�che', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%tec_nom%</strong><br />\r\n%tec_adr1%<br />\r\n%tec_adr2%<br />\r\n%cp_tec% %ville_tec%<br />\r\n&nbsp;</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>%civilite1M_tec%,<br />\r\n<br />\r\nNous vous signalons qu''une nouvelle t&acirc;che (N&deg;<strong> %tac_code%</strong>) vous a &eacute;t&eacute; affect&eacute;e.<br />\r\n<br />\r\nMerci de rapidement la g&eacute;rer.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_CRE_XXX_AGE', '', 'TACHES : Email envoy� vers l''agence suite � une nouvelle t�che', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%age_nom%</strong><br />\r\n%age_adr1%<br />\r\n%age_adr2%<br />\r\n%cp_age% %ville_age%<br />\r\nTel : %age_telf%<br />\r\nFax : %age_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>&nbsp;&nbsp;</p>\r\n<p><strong>A l''attention de %age_resp_civilite% %age_resp_prenom% %age_resp_nom%</strong></p>\r\n<p>%civiliter1M_age%,<br />\r\n<br />\r\nNous vous signalons qu''une nouvelle t&acirc;che (N&deg; <strong>%tac_code%</strong>) vous a &eacute;t&eacute; affect&eacute;e.<br />\r\n<br />\r\nMerci de la traiter rapidement.</p>\r\n<p>Bonne fin de journ&eacute;e.</p>\r\n<p>Le centre de gestion.</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_CRE_XXX_CDG', '', 'TACHES : Email envoy� vers le CDG suite � nouvelle t�che', '<p>Bonjour,<br />\r\n<br />\r\nNous vous signalons qu''une nouvelle t&acirc;che&nbsp; (N&deg;<strong> %tac_code%</strong>) vous a &eacute;t&eacute; affect&eacute;e.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_CRE_XXX_ST', '', 'TACHES : Email envoy� vers sous-traitant suite � nouvelle t�che', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%st_nom%</strong><br />\r\n%st_adr1%<br />\r\n%st_adr2%<br />\r\n%cp_st% %ville_st%<br />\r\nTel : %st_telf%<br />\r\nFax : %st_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>&nbsp;&nbsp;</p>\r\n<p><strong>A l''attention de %st_resp_civilite% %st_resp_prenom% %st_resp_nom%</strong></p>\r\n<p>%civiliter1M_st%,<br />\r\n<br />\r\nNous vous signalons qu''une nouvelle t&acirc;che&nbsp; (N&deg;<strong> %tac_code%</strong>) vous a &eacute;t&eacute; effect&eacute;e.</p>\r\n<p>Merci de la traiter rapidement.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_MOD_XXX_AGE', '', 'TACHES : Email envoy� vers l''agence suite � modif de t�che', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%age_nom%</strong><br />\r\n%age_adr1%<br />\r\n%age_adr2%<br />\r\n%cp_age% %ville_age%<br />\r\nTel : %age_telf%<br />\r\nFax : %age_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>&nbsp;&nbsp;</p>\r\n<p><strong>A l''attention de %age_resp_civilite% %age_resp_prenom% %age_resp_nom%</strong></p>\r\n<p>%civiliter1M_age%,<br />\r\n<br />\r\nNous vous signalons que la t&acirc;che N&deg; <strong>%tac_code%</strong> a &eacute;t&eacute; modifi&eacute;e.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.</p>\r\n<p>Le centre de gestion.</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_MOD_XXX_CDG', '', 'TACHES : Email envoy� vers le CDG suite � modif de t�che', '<p>Bonjour,<br />\r\n<br />\r\nNous vous signalons que la t&acirc;che&nbsp; N&deg;<strong> %tac_code%</strong> a &eacute;t&eacute; modifi&eacute;e.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_MOD_XXX_ST', '', 'TACHES : Email envoy� vers sous-traitant suite � modif de t�che', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%st_nom%</strong><br />\r\n%st_adr1%<br />\r\n%st_adr2%<br />\r\n%cp_st% %ville_st%<br />\r\nTel : %st_telf%<br />\r\nFax : %st_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>&nbsp;&nbsp;</p>\r\n<p><strong>A l''attention de %st_resp_civilite% %st_resp_prenom% %st_resp_nom%</strong></p>\r\n<p>%civiliter1M_st%,<br />\r\n<br />\r\nNous vous signalons que la t&acirc;che&nbsp; N&deg;<strong> %tac_code%</strong> a &eacute;t&eacute; modifi&eacute;e.</p>\r\n<p>Bonne fin de journ&eacute;e.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_MOD_XXX_TEC', '', 'TACHES : Email envoy� vers un tech suite � modif de t�che', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%tec_nom%</strong><br />\r\n%tec_adr1%<br />\r\n%tec_adr2%<br />\r\n%cp_tec% %ville_tec%<br />\r\n&nbsp;</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>%civilite1M_tec%,<br />\r\n<br />\r\nNous vous signalons que la t&acirc;che N&deg;<strong> %tac_code%</strong> a &eacute;t&eacute; modifi&eacute;e.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_DEL_XXX_AGE', '', 'TACHES : Email envoy� vers l''agence suite � suppression de t�che', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%age_nom%</strong><br />\r\n%age_adr1%<br />\r\n%age_adr2%<br />\r\n%cp_age% %ville_age%<br />\r\nTel : %age_telf%<br />\r\nFax : %age_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>&nbsp;&nbsp;</p>\r\n<p><strong>A l''attention de %age_resp_civilite% %age_resp_prenom% %age_resp_nom%</strong></p>\r\n<p>%civiliter1M_age%,<br />\r\n<br />\r\nNous vous signalons que la t&acirc;che N&deg; <strong>%tac_code%</strong> a &eacute;t&eacute; supprim&eacute;e.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.</p>\r\n<p>Le centre de gestion.</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_DEL_XXX_CDG', '', 'TACHES : Email envoy� vers le CDG suite � suppression de t�che', '<p>Bonjour,<br />\r\n<br />\r\nNous vous signalons que la t&acirc;che&nbsp; N&deg;<strong> %tac_code%</strong> a &eacute;t&eacute; supprim&eacute;e.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_DEL_XXX_ST', '', 'TACHES : Email envoy� vers sous-traitant suite � suppression de t�che', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%st_nom%</strong><br />\r\n%st_adr1%<br />\r\n%st_adr2%<br />\r\n%cp_st% %ville_st%<br />\r\nTel : %st_telf%<br />\r\nFax : %st_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>&nbsp;&nbsp;</p>\r\n<p><strong>A l''attention de %st_resp_civilite% %st_resp_prenom% %st_resp_nom%</strong></p>\r\n<p>%civiliter1M_st%,<br />\r\n<br />\r\nNous vous signalons que la t&acirc;che&nbsp; N&deg;<strong> %tac_code%</strong> a &eacute;t&eacute; supprim&eacute;e.</p>\r\n<p>Bonne fin de journ&eacute;e.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-05-26', 'Administrateur', '2008-05-26', 'Administrateur', 'TAC_DEL_XXX_TEC', '', 'TACHES : Email envoy� vers un tech suite � suppression de t�che', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%tec_nom%</strong><br />\r\n%tec_adr1%<br />\r\n%tec_adr2%<br />\r\n%cp_tec% %ville_tec%<br />\r\n&nbsp;</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>%civilite1M_tec%,<br />\r\n<br />\r\nNous vous signalons que la t&acirc;che N&deg;<strong> %tac_code%</strong> a &eacute;t&eacute; supprim&eacute;e.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);


#
# Mises � niveau version 0.9.9n
#

#
# Table structure for table `smi_pdtlocr`
#

DROP TABLE IF EXISTS `smi_pdtlocr`;
CREATE TABLE IF NOT EXISTS `smi_pdtlocr` (
  `pdtlocr_id` int(10) unsigned NOT NULL auto_increment,
  `pdtlocr_codepdtloc` varchar(20) NOT NULL,
  `pdtlocr_codeage` varchar(10) NOT NULL,
  `pdtlocr_codetec` varchar(20) NOT NULL,
  `pdtlocr_date` date NOT NULL default '0000-00-00',
  `pdtlocr_durees` int(6) unsigned NOT NULL default '0',
  `pdtlocr_mtp` float(10,2) unsigned NOT NULL default '0.00',
  `pdtlocr_fait` text NOT NULL,
  PRIMARY KEY  (`pdtlocr_id`),
  KEY `pdtlocr_codepdtloc` (`pdtlocr_codepdtloc`),
  KEY `pdtlocr_codetec` (`pdtlocr_codetec`),
  KEY `pdtlocr_codeage` (`pdtlocr_codeage`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Table des r�parations de pdt location';


#
# Table structure for table `smi_mque`
#

ALTER TABLE `smi_mque` CHANGE `mque_dep` `mque_dep` CHAR( 30 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ;

#
# Table structure for table `smi_cage`
#

ALTER TABLE `smi_cage` ADD `cage_adr1` VARCHAR( 50 ) NOT NULL AFTER `cage_nom` ;
ALTER TABLE `smi_cage` ADD `cage_adr2` VARCHAR( 50 ) NULL AFTER `cage_adr1` ;
ALTER TABLE `smi_cage` ADD `cage_dep` VARCHAR( 30 ) NOT NULL AFTER `cage_adr2` ;
ALTER TABLE `smi_cage` ADD `cage_ville` INT( 10 ) UNSIGNED NOT NULL AFTER `cage_dep` ;
ALTER TABLE `smi_cage` ADD `cage_codepays` CHAR( 3 ) NOT NULL AFTER `cage_ville` ;
ALTER TABLE `smi_cage` ADD INDEX ( `cage_dep` ) ;
ALTER TABLE `smi_cage` ADD INDEX ( `cage_codepays` )  ;

#
# Table structure for table `smi_age`
#

ALTER TABLE `smi_age` CHANGE `age_ville` `age_ville` INT( 10 ) UNSIGNED NOT NULL ;

#
# Table structure for table `smi_cdo`
#

ALTER TABLE `smi_cdo` ADD `cdo_adr1` VARCHAR( 50 ) NOT NULL AFTER `cdo_nom` ;
ALTER TABLE `smi_cdo` ADD `cdo_adr2` VARCHAR( 50 ) NULL AFTER `cdo_adr1` ;
ALTER TABLE `smi_cdo` ADD `cdo_dep` VARCHAR( 30 ) NOT NULL AFTER `cdo_adr2` ;
ALTER TABLE `smi_cdo` ADD `cdo_ville` INT( 10 ) UNSIGNED NOT NULL AFTER `cdo_dep` ;
ALTER TABLE `smi_cdo` ADD `cdo_codepays` CHAR( 3 ) NOT NULL AFTER `cdo_ville` ;
ALTER TABLE `smi_cdo` ADD INDEX ( `cdo_dep` ) ;
ALTER TABLE `smi_cdo` ADD INDEX ( `cdo_codepays` )  ;

#
# Table structure for table `smi_do`
#

ALTER TABLE `smi_do` CHANGE `do_ville` `do_ville` INT( 10 ) UNSIGNED NOT NULL ;


#
# Table structure for table `smi_cmque`
#

ALTER TABLE `smi_cmque` ADD `cmque_adr1` VARCHAR( 50 ) NOT NULL AFTER `cmque_nom` ;
ALTER TABLE `smi_cmque` ADD `cmque_adr2` VARCHAR( 50 ) NULL AFTER `cmque_adr1` ;
ALTER TABLE `smi_cmque` ADD `cmque_dep` VARCHAR( 30 ) NOT NULL AFTER `cmque_adr2` ;
ALTER TABLE `smi_cmque` ADD `cmque_ville` INT( 10 ) UNSIGNED NOT NULL AFTER `cmque_dep` ;
ALTER TABLE `smi_cmque` ADD `cmque_codepays` CHAR( 3 ) NOT NULL AFTER `cmque_ville` ;
ALTER TABLE `smi_cmque` ADD INDEX ( `cmque_dep` ) ;
ALTER TABLE `smi_cmque` ADD INDEX ( `cmque_codepays` )  ;

#
# Table structure for table `smi_mque`
#

ALTER TABLE `smi_mque` CHANGE `mque_ville` `mque_ville` INT( 10 ) UNSIGNED NOT NULL ;

#
# Table structure for table `smi_cst`
#

ALTER TABLE `smi_cst` ADD `cst_adr1` VARCHAR( 50 ) NOT NULL AFTER `cst_nom` ;
ALTER TABLE `smi_cst` ADD `cst_adr2` VARCHAR( 50 ) NULL AFTER `cst_adr1` ;
ALTER TABLE `smi_cst` ADD `cst_dep` VARCHAR( 30 ) NOT NULL AFTER `cst_adr2` ;
ALTER TABLE `smi_cst` ADD `cst_ville` INT( 10 ) UNSIGNED NOT NULL AFTER `cst_dep` ;
ALTER TABLE `smi_cst` ADD `cst_codepays` CHAR( 3 ) NOT NULL AFTER `cst_ville` ;
ALTER TABLE `smi_cst` ADD INDEX ( `cst_dep` ) ;
ALTER TABLE `smi_cst` ADD INDEX ( `cst_codepays` ) ;

#
# Table structure for table `smi_st`
#

ALTER TABLE `smi_st` CHANGE `st_ville` `st_ville` INT( 10 ) UNSIGNED NOT NULL ;

#
# Table structure for table `smi_ccli`
#

ALTER TABLE `smi_ccli` ADD `ccli_adr1` VARCHAR( 50 ) NOT NULL AFTER `ccli_nom` ;
ALTER TABLE `smi_ccli` ADD `ccli_adr2` VARCHAR( 50 ) NULL AFTER `ccli_adr1` ;
ALTER TABLE `smi_ccli` ADD `ccli_dep` VARCHAR( 30 ) NOT NULL AFTER `ccli_adr2` ;
ALTER TABLE `smi_ccli` ADD `ccli_ville` INT( 10 ) UNSIGNED NOT NULL AFTER `ccli_dep` ;
ALTER TABLE `smi_ccli` ADD `ccli_codepays` CHAR( 3 ) NOT NULL AFTER `ccli_ville` ;
ALTER TABLE `smi_ccli` ADD INDEX ( `ccli_dep` ) ;
ALTER TABLE `smi_ccli` ADD INDEX ( `ccli_codepays` )  ;

#
# Table structure for table `smi_cli`
#

ALTER TABLE `smi_cli` CHANGE `cli_ville` `cli_ville` INT( 10 ) UNSIGNED NOT NULL ;

#
# Table structure for table `smi_ope`
#

ALTER TABLE `smi_ope` CHANGE `ope_ville` `ope_ville` INT( 10 ) UNSIGNED NOT NULL ;

#
# Table structure for table `smi_dde`
#

ALTER TABLE `smi_dde` CHANGE `dde_ville` `dde_ville` INT( 10 ) UNSIGNED NOT NULL ;

#
# Table structure for table `smi_scli`
#

ALTER TABLE `smi_scli` CHANGE `scli_ville` `scli_ville` INT( 10 ) UNSIGNED NOT NULL ;

#
# Table structure for table `smi_tec`
#

ALTER TABLE `smi_tec` CHANGE `tec_ville` `tec_ville` INT( 10 ) UNSIGNED NOT NULL ;


#
# Mises � niveau version 0.9.9o
#

INSERT INTO `smi_txt` VALUES('', '2008-07-13', 'Administrateur', '2008-07-13', 'Administrateur', 'INT_COP_XXX_CLI', '', 'CLIENT : Email envoy� vers le client pour copie intervention', '<p>%logo_age%<br />\r\n%age_adr1%<br />\r\n%age_adr2%<br />\r\n%cp_age% %ville_age%<br />\r\nTel : %age_telf%<br />\r\nFax : %age_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%cli_ste%<br />\r\n%cli_civilite% %cli_prenom% %cli_nom%</strong><br />\r\n%cli_adr1%<br />\r\n%cli_adr2%<br />\r\n%cp_cli% %ville_cli%<br />\r\nTel : %cli_telf%<br />\r\nFax : %cli_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>%civilite1M_cli%, <br />\r\n<br />\r\nNous avons le plaisir de vous faire parvenir une copie de votre intervention <em><strong>%int_code%</strong></em>.</p>\r\n<p>Nous restons bien entendu &agrave; votre enti&egrave;re disposition pour tout renseignement compl&eacute;mentaire.</p>\r\n<p>Vous remerciant encore de votre confiance,</p>\r\n<p>Nous vous prions d''agr&eacute;er, %civilite1M_cli%, l''expression de nos sentiments les plus d&eacute;vou&eacute;s.</p>\r\n<p>Le centre technique</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-07-13', 'Administrateur', '2008-07-13', 'Administrateur', 'CON_COP_XXX_CLI', '', 'CLIENT : Email envoy� vers le client pour copie contrat', '<p>%logo_age%<br />\r\n%age_adr1%<br />\r\n%age_adr2%<br />\r\n%cp_age% %ville_age%<br />\r\nTel : %age_telf%<br />\r\nFax : %age_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%cli_ste%<br />\r\n%cli_civilite% %cli_prenom% %cli_nom%</strong><br />\r\n%cli_adr1%<br />\r\n%cli_adr2%<br />\r\n%cp_cli% %ville_cli%<br />\r\nTel : %cli_telf%<br />\r\nFax : %cli_fax%</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>%civilite1M_cli%, <br />\r\n<br />\r\nNous avons le plaisir de vous faire parvenir une copie de votre contrat <em><strong>%cocl_code%</strong></em>.</p>\r\n<p>Nous restons bien entendu &agrave; votre enti&egrave;re disposition pour tout renseignement compl&eacute;mentaire.</p>\r\n<p>Vous remerciant encore de votre confiance,</p>\r\n<p>Nous vous prions d''agr&eacute;er, %civilite1M_cli%, l''expression de nos sentiments les plus d&eacute;vou&eacute;s.</p>\r\n<p>Le centre technique</p>', 0);

#
# Mises � niveau version 0.9.9p
#

ALTER TABLE `smi_coloc` ADD `coloc_typcli` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `coloc_codeage` ;
ALTER TABLE `smi_coloc` ADD INDEX ( `coloc_typcli` ) ;

#
# Mises � niveau version 0.9.9q
#

#
# Table structure for table `smi_st`
#

ALTER TABLE `smi_st` ADD `st_codeage` VARCHAR( 10 ) NULL AFTER `st_code` ;
ALTER TABLE `smi_st` ADD INDEX ( `st_codeage` ) ;
ALTER TABLE `smi_st` DROP `st_zone` ;

#
# Table structure for table `smi_scli`
#

ALTER TABLE `smi_scli` ADD `scli_prop` VARCHAR( 20 ) NOT NULL DEFAULT '0' AFTER `scli_datemod` ;
ALTER TABLE `smi_scli` ADD INDEX ( `scli_prop` ) ;
ALTER TABLE `smi_scli` ADD `scli_codecrea` VARCHAR( 20 ) NOT NULL AFTER `scli_datecrea` ;
ALTER TABLE `smi_scli` ADD INDEX ( `scli_codecrea` ) ;
ALTER TABLE `smi_scli` ADD `scli_codemod` VARCHAR( 20 ) NOT NULL AFTER `scli_datemod` ;
ALTER TABLE `smi_scli` ADD INDEX ( `scli_codemod` )  ;

#
# Table structure for table `smi_dde`
#

ALTER TABLE `smi_dde` ADD `dde_scli` INT( 10 ) NOT NULL DEFAULT '-1';
ALTER TABLE `smi_dde` ADD INDEX ( `dde_scli` ) ;
ALTER TABLE `smi_dde` ADD `dde_urg` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0';


#
# Table structure for table `smi_txt`
#

UPDATE `smi_txt` SET `txt_texte` = '<p>Bonjour,<br /> <br /> Un nouveau message depuis l''espace <strong>priv&eacute;</strong> vous a &eacute;t&eacute; exp&eacute;di&eacute; le %dde_datecrea%. <br /> <br /> En voici le d&eacute;tail :<br /> &nbsp;==================================== <br /> <strong>OBJET :</strong> <br /> %ddet_desc% <strong><br /> Exp&eacute;diteur :</strong> <br /> %dde_ste% <br /> %dde_civilite% %dde_prenom% %dde_nom% <br /> %dde_adr1% <br /> %dde_adr2% <br /> %cp_dde% %ville_dde% <br /> Tel. : %dde_telf% <br /> Fax : %dde_fax% <br /> Por : %dde_telp% <strong><br /> Email :</strong> <a href="mailto:%dde_email%">%dde_email%</a> <br /> <strong> Site concern&eacute; :</strong><br /> %txt_scliv%</p> <p><strong>Message :</strong></p> <p>%dde_txtdde% <br /> ==================================== <br /> <br /> Bonne fin de journ&eacute;e.</p>' WHERE `smi_txt`.`txt_code` ='DDE_CRE_PRI_XXX';

INSERT INTO `smi_txt` VALUES('', '2008-09-05', 'Administrateur', '2008-09-05', 'Administrateur', 'INT_CLOT_XXX_AGE', '', 'INTERVENTION : Email envoy� vers une agence si intervention close', '<p>%logo_cge%<br />\r\n<strong>%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</strong></p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<p>&nbsp;</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><strong>%age_nom%</strong><br />\r\n%age_adr1%<br />\r\n%age_adr2%<br />\r\n%cp_age% %ville_age% <br />\r\nTel : %age_telf%<br />\r\nFax : %age_fax%</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>&nbsp;</p>\r\n<p>A l''attention de <strong>%age_resp_civilite% %age_resp_prenom% %age_resp_nom%</strong><br />\r\n<br />\r\n%civiliter1M_age%,</p>\r\n<p>C''est avec plaisir que nous vous annon&ccedil;ons que l''intervention <strong>%int_code%</strong> est close.  <br />\r\n<br />\r\nVous pouvez en obtenir le d&eacute;tail sur notre site :  <a href="http://%cge_web%">%cge_web%</a>  .<br />\r\n<br />\r\nNous vous souhaitons une excellente fin de journ&eacute;e et vous prions d''agr&eacute;er, %civiliter1M_age%,&nbsp; l''expression de nos sentiments les plus d&eacute;vou&eacute;s.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);
INSERT INTO `smi_txt` VALUES('', '2008-09-10', 'Administrateur', '2008-09-10', 'Administrateur', 'INT_MOD_XXX_TEC', '', 'INTERVENTION : Email envoy� vers le tech resp suite � modif intervention', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%tec_civilite% %tec_prenom%&nbsp; %tec_nom%</strong><br />\r\n%tec_adr1%<br />\r\n%tec_adr2%<br />\r\n%cp_tec% %ville_tec%<br />\r\n&nbsp;</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>%civilite1M_tec%,<br />\r\n<br />\r\nNous vous signalons qu''une l''intervention <strong>%int_code%</strong> (client %cli_code%), dont vous avez le suivi, a &eacute;t&eacute; modifi&eacute;e.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.  <br />\r\n<br />\r\nLe centre de gestion</p>', 1);
INSERT INTO `smi_txt` VALUES('', '2008-09-10', 'Administrateur', '2008-09-10', 'Administrateur', 'INT_DEL_XXX_TEC', '', 'INTERVENTION : Email envoy� vers le tech resp suite � modif intervention', '<p>%logo_cge%<br />\r\n%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax :   %cge_fax%</p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote>\r\n<p><strong>%tec_civilite% %tec_prenom% %tec_nom%<!--\r\nstrong--><br />\r\n</strong> %tec_adr1%<br />\r\n%tec_adr2%<br />\r\n%cp_tec% %ville_tec%<br />\r\n&nbsp;</p>\r\n</blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p>%civilite1M_tec%,<br />\r\n<br />\r\nNous vous signalons qu''une l''intervention %int_code% (client %cli_code%), dont vous avez le suivi, a &eacute;t&eacute; supprim&eacute;e.<br />\r\n<br />\r\nBonne fin de journ&eacute;e.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);

#
# Table structure for table `smi_int`
#

ALTER TABLE `smi_int` ADD `int_codeages` VARCHAR( 10 ) NOT NULL DEFAULT '';
ALTER TABLE `smi_int` ADD INDEX ( `int_codeages` ) ;
ALTER TABLE `smi_int` CHANGE `int_acpte` `int_acpte` FLOAT( 10, 2 ) NOT NULL DEFAULT '0.00' ;

#
# Table structure for table `smi_ot`
#

ALTER TABLE `smi_ot` CHANGE `ot_codetec` `ot_codetec` VARCHAR( 20 ) NOT NULL DEFAULT '-1' 


#
# Mises � niveau version 0.9.9r
#

#
# Table structure for table `smi_ot`
#

ALTER TABLE `smi_ot` ADD `ot_codecli` VARCHAR( 20 ) NOT NULL AFTER `ot_code` ;
ALTER TABLE `smi_ot` ADD `ot_idsite` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `ot_codecli` ;
ALTER TABLE `smi_ot` ADD INDEX ( `ot_codecli` ) ;
ALTER TABLE `smi_ot` ADD INDEX ( `ot_idsite` ) ;
ALTER TABLE `smi_ot` DROP INDEX `int_code` ;
ALTER TABLE `smi_ot` ADD INDEX ( `ot_code` ) ;
ALTER TABLE `smi_ot` DROP INDEX `int_codestatut` ;
ALTER TABLE `smi_ot` ADD INDEX ( `ot_codestatut` ) ;
ALTER TABLE `smi_ot` DROP INDEX `int_codelieu` ;
ALTER TABLE `smi_ot` ADD INDEX ( `ot_codelieu` ) ;
ALTER TABLE `smi_ot` DROP INDEX `int_codetec` ;
ALTER TABLE `smi_ot` ADD INDEX ( `ot_codetec` ) ;
ALTER TABLE `smi_ot` ADD `ot_ccli` VARCHAR( 10 ) NOT NULL DEFAULT '-1' AFTER `ot_codecli` ;
ALTER TABLE `smi_ot` ADD INDEX ( `ot_ccli` ) ;



#
# Table structure for table `smi_coclh`
#

ALTER TABLE `smi_coclh` ADD INDEX ( `coclh_codeint` )  ;


#
# Mises � niveau version 0.9.9s
#

#
# Table structure for table `smi_int`
#

ALTER TABLE `smi_int` ADD `int_fact` TINYINT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_int` ADD INDEX ( `int_fact` ) ;
ALTER TABLE `smi_int` ADD `int_forfait` FLOAT( 10, 2 ) UNSIGNED NOT NULL DEFAULT '0.00';

#
# Table structure for table `smi_intf`
#

DROP TABLE IF EXISTS `smi_intf`;
CREATE TABLE IF NOT EXISTS `smi_intf` (
  `intf_id` int(10) unsigned NOT NULL auto_increment,
  `intf_datecrea` date NOT NULL default '0000-00-00',
  `intf_codecrea` varchar(20) NOT NULL,
  `intf_datemod` date NOT NULL default '0000-00-00',
  `intf_codemod` varchar(20) NOT NULL,
  `intf_fnulle` tinyint(1) NOT NULL default '0',
  `intf_datefac` date NOT NULL default '0000-00-00',
  `intf_numf` varchar(20) NOT NULL,
  `intf_nomf` varchar(50) NOT NULL,
  `intf_codeint` varchar(20) NOT NULL,
  `intf_codeme` varchar(10) NOT NULL,
  `intf_nota` text,
  PRIMARY KEY  (`intf_id`),
  KEY `intf_datefac` (`intf_datefac`),
  KEY `intf_numf` (`intf_numf`),
  KEY `intf_nomf` (`intf_nomf`),
  KEY `intf_codeint` (`intf_codeint`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Intervention : Suivi facturation';

#
# Table structure for table `smi_tpf`
#

ALTER TABLE `smi_tpf` CHANGE `tpf_desc` `tpf_desc` VARCHAR( 100 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ;
ALTER TABLE `smi_tpf` ADD `tpf_codema` VARCHAR( 20 ) NOT NULL AFTER `tpf_code` ;
ALTER TABLE `smi_tpf` ADD INDEX ( `tpf_codema` ) ;

#
# Table structure for table `smi_cge`
#

ALTER TABLE `smi_cge` ADD `cge_ape` VARCHAR( 10 ) NOT NULL AFTER `cge_rcs` ;
ALTER TABLE `smi_cge` ADD `cge_tvai` VARCHAR( 50 ) NOT NULL AFTER `cge_ape` ;


#
# Table structure for table `smi_age`
#

ALTER TABLE `smi_age` ADD `age_ape` VARCHAR( 10 ) NOT NULL AFTER `age_rcs` ;
ALTER TABLE `smi_age` ADD `age_tvai` VARCHAR( 50 ) NOT NULL AFTER `age_ape` ;
ALTER TABLE `smi_age` CHANGE `age_datec` `age_datec` DATE NOT NULL DEFAULT '0000-00-00' ;

#
# Table structure for table `smi_st`
#

ALTER TABLE `smi_st` ADD `st_ape` VARCHAR( 10 ) NOT NULL AFTER `st_rcs` ;
ALTER TABLE `smi_st` ADD `st_tvai` VARCHAR( 50 ) NOT NULL AFTER `st_ape` ;
ALTER TABLE `smi_st` CHANGE `st_datec` `st_datec` DATE NOT NULL DEFAULT '0000-00-00';

#
# Table structure for table `smi_do`
#

ALTER TABLE `smi_do` ADD `do_ape` VARCHAR( 10 ) NOT NULL AFTER `do_rcs` ;
ALTER TABLE `smi_do` ADD `do_tvai` VARCHAR( 50 ) NOT NULL AFTER `do_ape` ;
ALTER TABLE `smi_do` CHANGE `do_datec` `do_datec` DATE NOT NULL DEFAULT '0000-00-00' ;

#
# Table structure for table `smi_cli`
#

ALTER TABLE `smi_cli` ADD `cli_ape` VARCHAR( 10 ) NOT NULL AFTER `cli_rcs` ;
ALTER TABLE `smi_cli` ADD `cli_tvai` VARCHAR( 50 ) NOT NULL AFTER `cli_ape` ;

#
# Table structure for table `smi_scli`
#

ALTER TABLE `smi_scli` ADD `scli_rcs` VARCHAR( 50 ) NOT NULL AFTER `scli_ste` ;
ALTER TABLE `smi_scli` ADD `scli_ape` VARCHAR( 10 ) NOT NULL AFTER `scli_rcs` ;
ALTER TABLE `smi_scli` ADD `scli_tvai` VARCHAR( 50 ) NOT NULL AFTER `scli_ape` ;

#
# Table structure for table `smi_mque`
#

ALTER TABLE `smi_mque` ADD `mque_rcs` VARCHAR( 50 ) NOT NULL AFTER `mque_ste` ;
ALTER TABLE `smi_mque` ADD `mque_ape` VARCHAR( 10 ) NOT NULL AFTER `mque_rcs` ;
ALTER TABLE `smi_mque` ADD `mque_tvai` VARCHAR( 50 ) NOT NULL AFTER `mque_ape` ;

#
# Table structure for table `smi_tec`
#

ALTER TABLE `smi_tec` ADD `tec_niveau` VARCHAR( 5 ) NULL AFTER `tec_codemod` ;
ALTER TABLE `smi_tec` ADD `tec_echelon` VARCHAR( 5 ) NULL AFTER `tec_niveau` ;
ALTER TABLE `smi_tec` ADD `tec_coeff` VARCHAR( 5 ) NULL AFTER `tec_echelon` ;
ALTER TABLE `smi_tec` ADD `tec_emploi` VARCHAR( 50 ) NOT NULL AFTER `tec_codemod` ;
ALTER TABLE `smi_tec` ADD `tec_qualif` VARCHAR( 50 ) NOT NULL AFTER `tec_emploi` ;
ALTER TABLE `smi_tec` CHANGE `tec_congd` `tec_congd` DATE NOT NULL DEFAULT '0000-00-00';
ALTER TABLE `smi_tec` CHANGE `tec_congf` `tec_congf` DATE NOT NULL DEFAULT '0000-00-00';
ALTER TABLE `smi_tec` CHANGE `tec_dateout` `tec_dateout` DATE NOT NULL DEFAULT '0000-00-00';

#
# Table structure for table `smi_tecpr`
#

ALTER TABLE `smi_tecpr` ADD `tecpr_hjs` INT ( 5 ) NOT NULL DEFAULT '0' AFTER `tecpr_date` ;
ALTER TABLE `smi_tecpr` ADD `tecpr_hhs` INT ( 6 ) NOT NULL DEFAULT '0' AFTER `tecpr_hjs` ;
ALTER TABLE `smi_tecpr` ADD `tecpr_hms` INT ( 7 ) NOT NULL DEFAULT '0' AFTER `tecpr_hhs` ;
ALTER TABLE `smi_tecpr` ADD `tecpr_salm` FLOAT( 10, 2 ) NOT NULL DEFAULT '0.00' AFTER `tecpr_hms` ;
ALTER TABLE `smi_tecpr` CHANGE `tecpr_date` `tecpr_date` DATE NOT NULL DEFAULT '0000-00-00';
ALTER TABLE `smi_tecpr` CHANGE `tecpr_couth` `tecpr_couth` FLOAT( 10, 2 ) NOT NULL DEFAULT '0.00' ;
ALTER TABLE `smi_tecpr` ADD `tecpr_j1m1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j1m2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j1a1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j1a2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j2m1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j2m2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j2a1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j2a2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j3m1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j3m2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j3a1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j3a2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j4m1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j4m2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j4a1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j4a2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j5m1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j5m2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j5a1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j5a2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j6m1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j6m2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j6a1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j6a2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j7m1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j7m2` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j7a1` time NOT NULL default '00:00:00';
ALTER TABLE `smi_tecpr` ADD `tecpr_j7a2` time NOT NULL default '00:00:00';

#
# Mises � niveau version 0.9.9t
#

#
# Table structure for table `smi_ind`
#

DROP TABLE IF EXISTS `smi_ind`;
CREATE TABLE IF NOT EXISTS `smi_ind` (
  `ind_id` int(10) unsigned NOT NULL auto_increment,
  `ind_code` varchar(5) NOT NULL,
  `ind_desc` varchar(40) NOT NULL,
  `ind_coeff` float(10,2) NOT NULL default '1.00',
  `ind_nota` text NOT NULL,
  `ind_actif` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`ind_id`),
  KEY `ind_code` (`ind_code`),
  KEY `ind_desc` (`ind_desc`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Indices horaires';


#
# Table structure for table `smi_inth`
#

ALTER TABLE `smi_inth` ADD `inth_codeind` VARCHAR( 5 ) NOT NULL DEFAULT '-1' AFTER `inth_heured` ;
ALTER TABLE `smi_inth` ADD INDEX ( `inth_codeind` ) ;

#
# Table structure for table `smi_rcli`
#

DROP TABLE IF EXISTS `smi_rcli`;
CREATE TABLE IF NOT EXISTS `smi_rcli` (
  `rcli_id` int(10) NOT NULL auto_increment,
  `rcli_maitre` varchar(20) NOT NULL,
  `rcli_esclave` varchar(20) NOT NULL,
  PRIMARY KEY  (`rcli_id`),
  KEY `rcli_maitre` (`rcli_maitre`),
  KEY `rcli_esclave` (`rcli_esclave`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Regroupements clients';

#
# Mises � niveau version 0.9.9u
#

#
# Table structure for table `smi_pcat`
#

DROP TABLE IF EXISTS `smi_pcat`;
CREATE TABLE IF NOT EXISTS `smi_pcat` (
  `pcat_id` tinyint(3) unsigned NOT NULL auto_increment,
  `pcat_code` varchar(5) NOT NULL,
  `pcat_desc` varchar(50) NOT NULL,
  `pcat_couleur` varchar(7) NOT NULL,
  PRIMARY KEY  (`pcat_id`),
  KEY `pcat_code` (`pcat_code`),
  KEY `pcat_couleur` (`pcat_couleur`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Cat�gories �v�nements planning';


#
# Table structure for table `smi_pdtl`
#

ALTER TABLE `smi_pdtl` DROP INDEX `pdtl_codereg` ;
ALTER TABLE `smi_pdtl` ADD INDEX ( `pdtl_coderegc` ) ;

#
# Table structure for table `smi_psta`
#

DROP TABLE IF EXISTS `smi_psta`;
CREATE TABLE IF NOT EXISTS `smi_psta` (
  `psta_id` int(10) unsigned NOT NULL auto_increment,
  `psta_code` varchar(5) NOT NULL,
  `psta_desc` varchar(50) NOT NULL,
  `psta_img` varchar(200) NOT NULL,
  `psta_delok` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`psta_id`),
  KEY `psta_code` (`psta_code`),
  KEY `psta_img` (`psta_img`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Statuts �v�nements plannings';

#
# Table structure for table `smi_tec`
#

ALTER TABLE `smi_tec` ADD `tec_couleur` VARCHAR( 7 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL AFTER `tec_coeff` ;

#
# Table structure for table `smi_ccli`
#

ALTER TABLE `smi_ccli` ADD `ccli_code` VARCHAR( 20 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL AFTER `ccli_datemod` ;
ALTER TABLE `smi_ccli` ADD `ccli_pass` VARCHAR( 40 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL AFTER `ccli_code` ;
ALTER TABLE `smi_ccli` ADD INDEX ( ccli_code ) ;

#
# Table structure for table `smi_txt`
#

INSERT INTO `smi_txt` VALUES(201, '2009-06-12', 'Administrateur', '2009-06-12', 'Administrateur', 'CCLI_CRE_XXX_CCLI', '', 'CTACT CLIENT : Email envoy� vers le contact suite � création de son compte', '<p>%logo_cge%<br />\r\n<strong>%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</strong></p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><strong>%ccli_civilite% %ccli_prenom% %ccli_nom%</strong><br />\r\n<strong> %ccli_adr1%</strong><br />\r\n<strong> %ccli_adr2%</strong><br />\r\n<strong> %cp_ccli% %ville_ccli% </strong><br />\r\n<strong> Tel : %ccli_telf%</strong><br />\r\n<strong> Fax : %ccli_fax%</strong></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p><br />\r\n%civilite1M_ccli%,  <br />\r\n<br />\r\nC''est avec plaisir que nous vous confirmons la cr&eacute;ation de votre compte.  <br />\r\n<br />\r\nVoici vos codes de connexion et mot de passe :</p>\r\n<blockquote>Code de connexion : <strong>%ccli_code%</strong> <br />\r\nMot de passe          : <strong>%pass%</strong>  </blockquote>\r\n<p><br />\r\nConservez pr&eacute;cieusement ces informations pour pouvoir vous connecter et suivre vos dossiers d''interventions et contrats sur notre site <a href="http://%cge_web%">%cge_web%</a> (menu &quot;Espace priv&eacute;&quot;).<br />\r\n<br />\r\nNous vous remercions encore de votre confiance.  <br />\r\n<br />\r\nLe centre de gestion</p>', 0);
INSERT INTO `smi_txt` VALUES(202, '2009-06-12', 'Administrateur', '2009-06-12', 'Administrateur', 'CCLI_CRE_XXX_CDG', '', 'CTACT CLIENT : Email envoy� vers le CDG suite � création', '<p>Bonjour,<br />\r\n<br />\r\nNous vous signalons la cr&eacute;ation d''un nouveau compte client (N&deg; <strong>%ccli_code%</strong>).<br />\r\n<br />\r\nBonne fin de journ&eacute;e.</p>', 0);
INSERT INTO `smi_txt` VALUES(203, '2009-06-12', 'Administrateur', '2009-06-12', 'Administrateur', 'CCLI_MDP_XXX_CCLI', '', 'CTACT CLIENT : Email envoy� vers le contact suite � changement de MDP', '<p>%logo_cge%<br />\r\n<strong>%cge_adr1%<br />\r\n%cge_adr2%<br />\r\n%cp_cge% %ville_cge%<br />\r\nTel : %cge_telf%<br />\r\nFax : %cge_fax%</strong></p>\r\n<blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><blockquote><strong>%ccli_civilite% %ccli_prenom% %ccli_nom%</strong><br />\r\n<strong> %ccli_adr1%</strong><br />\r\n<strong> %ccli_adr2%</strong><br />\r\n<strong> %cp_ccli% %ville_ccli% </strong><br />\r\n<strong> Tel : %ccli_telf%</strong><br />\r\n<strong> Fax : %ccli_fax%</strong></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote></blockquote>\r\n<p><br />\r\n%civilite1M_cli%,  <br />\r\n<br />\r\nC''est avec plaisir que nous vous confirmons la mise &agrave; jour de votre compte.<br />\r\n<br />\r\nVoici vos codes de connexion et mot de passe :</p>\r\n<blockquote>Code de connexion : <strong>%ccli_code%</strong><br />\r\nMot de passe          : <strong>%pass%</strong></blockquote>\r\n<p>Conservez pr&eacute;cieusement ces informations pour pouvoir vous connecter et suivre vos dossiers d''interventions et contrats sur notre site <a href="http://%cge_web%">%cge_web%</a> (menu &quot;Espace priv&eacute;&quot;).<br />\r\n<br />\r\nNous vous remercions encore de votre confiance.<br />\r\n<br />\r\nLe centre de gestion</p>', 0);

#
# Table structure for table `smi_int`
#

ALTER TABLE `smi_int` ADD `int_codeocli` VARCHAR( 40 ) NULL AFTER `int_codeman` ;
ALTER TABLE `smi_int` ADD INDEX ( `int_codeocli` ) ;
ALTER TABLE `smi_int` ADD `int_publique` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `int_planifie` ;
ALTER TABLE `smi_int` ADD INDEX ( `int_publique` ) ;
ALTER TABLE `smi_int` ADD `int_codecat` VARCHAR( 5 ) NOT NULL DEFAULT 'CUR' AFTER `int_code` ;
ALTER TABLE `smi_int` ADD INDEX ( `int_codecat` ) ;

#
# Table structure for table `smi_intc`
#

DROP TABLE IF EXISTS `smi_intc`;

CREATE TABLE IF NOT EXISTS `smi_intc` (

  `intc_id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,

  `intc_code` varchar(5) NOT NULL,

  `intc_desc` varchar(50) NOT NULL,

  `intc_img` varchar(200) NOT NULL,

  `intc_delok` tinyint(1) NOT NULL DEFAULT '0',

  PRIMARY KEY (`intc_id`),
  KEY `intc_code` (`intc_code`),

  KEY `intc_img` (`intc_img`)

) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Cat�gories Interventions';

#
# Dumping data for table `smi_intc`
#

INSERT INTO `smi_intc` VALUES(1, 'PREV', 'PREVENTIF', '../icones/nuvola/bookmark.png', 0);

INSERT INTO `smi_intc` VALUES(2, 'CUR', 'CURATIF', '../icones/nuvola/important.png', 0);


#
# Table structure for table `smi_intt`
#

DROP TABLE IF EXISTS `smi_intt`;

CREATE TABLE IF NOT EXISTS `smi_intt` (

  `intt_id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `intt_codeint` varchar(20) NOT NULL,

  `intt_codetec` varchar(20) NOT NULL,

  PRIMARY KEY (`intt_id`),

  KEY `intt_codeint` (`intt_codeint`),

  KEY `intt_codetec` (`intt_codetec`)

) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Techniciens affect�s aux interventions';




#
# Table structure for table `smi_replm`
#

DROP TABLE IF EXISTS `smi_replm`;
CREATE TABLE IF NOT EXISTS `smi_replm` (
  `replm_id` int(10) unsigned NOT NULL auto_increment,
  `replm_datecrea` date NOT NULL default '0000-00-00',
  `replm_codecrea` varchar(20) collate latin1_general_ci NOT NULL,
  `replm_datemod` date NOT NULL default '0000-00-00',
  `replm_codemod` varchar(20) collate latin1_general_ci NOT NULL,
  `replm_typ` tinyint(2) NOT NULL default '0',
  `replm_nom` varchar(50) collate latin1_general_ci NOT NULL,
  `replm_dbname` varchar(50) collate latin1_general_ci NOT NULL,
  `replm_ccat` varchar(5) collate latin1_general_ci default NULL,
  `replm_codepays` char(3) collate latin1_general_ci NOT NULL,
  `replm_dep` text collate latin1_general_ci NOT NULL,
  `replm_mode` tinyint(2) NOT NULL default '2',
  `replm_sctact` tinyint(1) NOT NULL default '0',
  `replm_ssites` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`replm_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='Mod�les de r�plication';


#
# Table structure for table `smi_pevt`
#

DROP TABLE IF EXISTS `smi_pevt`;

CREATE TABLE IF NOT EXISTS `smi_pevt` (

  `pevt_id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `pevt_datecrea` date NOT NULL DEFAULT '0000-00-00',

  `pevt_codecrea` varchar(20) NOT NULL,

  `pevt_datemod` date NOT NULL DEFAULT '0000-00-00',

  `pevt_codemod` varchar(20) NOT NULL,

  `pevt_gest` varchar(20) NOT NULL,

  `pevt_gesta` tinyint(1) unsigned NOT NULL DEFAULT '1',

  `pevt_typdest` tinyint(1) NOT NULL,

  `pevt_dest` varchar(20) NOT NULL,

  `pevt_desta` tinyint(1) unsigned NOT NULL DEFAULT '1',

  `pevt_typrat` smallint(2) NOT NULL DEFAULT '0',

  `pevt_coderat` varchar(20) DEFAULT NULL,

  `pevt_date` date NOT NULL DEFAULT '0000-00-00',

  `pevt_heure` time NOT NULL DEFAULT '00:00:00',

  `pevt_dureem` int(5) NOT NULL DEFAULT '0',

  `pevt_titre` varchar(50) NOT NULL,

  `pevt_detail` text,

  `pevt_codelieu` varchar(5) DEFAULT NULL,

  `pevt_codecat` varchar(5) NOT NULL,

  `pevt_idstatut` int(10) unsigned NOT NULL DEFAULT '0',

  `pevt_nivurg` tinyint(1) unsigned NOT NULL DEFAULT '0',

  `pevt_prive` tinyint(1) unsigned NOT NULL DEFAULT '0',

  `pevt_repet` tinyint(1) unsigned NOT NULL DEFAULT '0',

  `pevt_rdated` date NOT NULL DEFAULT '0000-00-00',

  `pevt_rdatef` date NOT NULL DEFAULT '0000-00-00',

  `pevt_rtyp` tinyint(1) unsigned NOT NULL DEFAULT '0',

  PRIMARY KEY (`pevt_id`),

  KEY `pevt_codecat` (`pevt_codecat`),

  KEY `pevt_codelieu` (`pevt_codelieu`),

  KEY `pevt_idstatut` (`pevt_idstatut`),

  KEY `pevt_dest` (`pevt_dest`),

  KEY `pevt_date` (`pevt_date`),

  KEY `pevt_coderat` (`pevt_coderat`)

) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Ev�nements agenda';

#
# Table structure for table `smi_pprm`
#

DROP TABLE IF EXISTS `smi_pprm`;
CREATE TABLE IF NOT EXISTS `smi_pprm` (
  `pprm_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pprm_modeplan` char(1) NOT NULL DEFAULT 's',
  `pprm_firsthour` tinyint(2) NOT NULL DEFAULT '0',
  `pprm_lasthour` tinyint(2) NOT NULL DEFAULT '24',
  PRIMARY KEY (`pprm_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 ROW_FORMAT=DYNAMIC COMMENT='Param�tre du planning';


#
# Table structure for table `smi_psta`
#

DROP TABLE IF EXISTS `smi_psta`;
CREATE TABLE IF NOT EXISTS `smi_psta` (
  `psta_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `psta_code` varchar(5) NOT NULL,
  `psta_desc` varchar(50) NOT NULL,
  `psta_img` varchar(200) NOT NULL,
  `psta_delok` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`psta_id`),
  KEY `psta_code` (`psta_code`),
  KEY `psta_img` (`psta_img`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Statuts �v�nements plannings';



#
# Table structure for table `smi_replcli`
#



DROP TABLE IF EXISTS `smi_replcli`;

CREATE TABLE IF NOT EXISTS `smi_replcli` (

  `replcli_id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `replcli_modele` int(10) unsigned NOT NULL,

  `replcli_idori` int(10) unsigned NOT NULL,

  `replcli_iddest` int(10) unsigned NOT NULL,

  `replcli_lastdate` date NOT NULL DEFAULT '0000-00-00',

  `replcli_lasthour` time NOT NULL DEFAULT '00:00:00',

  PRIMARY KEY (`replcli_id`),

  KEY `replcli_idori` (`replcli_idori`),

  KEY `replcli_iddest` (`replcli_iddest`)

) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='R�plications clients';



#
# Table structure for table `smi_replclic`
#

DROP TABLE IF EXISTS `smi_replclic`;

CREATE TABLE IF NOT EXISTS `smi_replclic` (

  `replclic_id` int(10) unsigned NOT NULL AUTO_INCREMENT,

  `replclic_modele` int(10) unsigned NOT NULL,

  `replclic_idori` int(10) unsigned NOT NULL,

  `replclic_iddest` int(10) unsigned NOT NULL,

  `replclic_lastdate` date NOT NULL DEFAULT '0000-00-00',

  `replclic_lasthour` time NOT NULL DEFAULT '00:00:00',

  PRIMARY KEY (`replclic_id`),

  KEY `replclic_idori` (`replclic_idori`),

  KEY `replclic_iddest` (`replclic_iddest`)

) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='Replications contacts clients';


#
# Mises � niveau version 0.9.9v
#

#
# Table structure for table `smi_fic`
#

ALTER TABLE `smi_fic` ADD `fic_prive` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `fic_detail` ;
ALTER TABLE `smi_fic` ADD `fic_minlevel` TINYINT( 2 ) NOT NULL DEFAULT '0' AFTER `fic_prive` ;

#
# Table structure for table `smi_ficpj`
#

DROP TABLE IF EXISTS `smi_ficpj`;
CREATE TABLE IF NOT EXISTS `smi_ficpj` (
  `ficpj_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ficpj_typrat` tinyint(2) unsigned NOT NULL DEFAULT '0',
  `ficpj_coderat` varchar(20) DEFAULT NULL,
  `ficpj_idfic` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`ficpj_id`),
  KEY `ficpj_typrat` (`ficpj_typrat`),
  KEY `ficpj_coderat` (`ficpj_coderat`),
  KEY `ficpj_idfic` (`ficpj_idfic`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Pi�ces jointes';


#
# Table structure for table `smi_int`
#

ALTER TABLE `smi_int` ADD `int_datefinp` DATE NOT NULL DEFAULT '0000-00-00' AFTER `int_dureem` ;
ALTER TABLE `smi_int` ADD INDEX ( `int_datefinp` ) ;
ALTER TABLE `smi_int` ADD INDEX ( `int_daterdv` ) ;
ALTER TABLE `smi_int` ADD INDEX ( `int_dateprev` ) ;
ALTER TABLE `smi_int` ADD INDEX ( `int_datefin` ) ;

#
# Mises � niveau version 0.9.9w
#


##
## Structure de la table `smi_dev`
##

DROP TABLE IF EXISTS `smi_dev`;
CREATE TABLE IF NOT EXISTS `smi_dev` (
  `dev_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `dev_codea` char(3) NOT NULL,
  `dev_coden` int(3) unsigned NOT NULL,
  `dev_nom` varchar(50) NOT NULL,
  `dev_symiso` varchar(10) DEFAULT NULL,
  `dev_symtxt` varchar(10) DEFAULT NULL,
  `dev_lng` char(3) NOT NULL DEFAULT 'FR',
  `dev_defaut` tinyint(1) NOT NULL DEFAULT '0',
  `dev_delok` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`dev_id`),
  KEY `dev_codea` (`dev_codea`),
  KEY `dev_coden` (`dev_coden`),
  KEY `dev_nom` (`dev_nom`),
  KEY `dev_lng` (`dev_lng`),
  KEY `dev_defaut` (`dev_defaut`),
  KEY `dev_delok` (`dev_delok`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Devises';

##
## Contenu de la table `smi_dev`
##

INSERT INTO `smi_dev` VALUES(1, 'AED', 784, 'Dirham des �mirats arabes unis ', 'AED ', 'AED ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(2, 'AFN', 971, 'Afghani ', 'AFN ', 'AFN ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(3, 'ALL', 8, 'Lek ', 'ALL ', 'ALL ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(4, 'AMD', 51, 'Dram arm�nien ', 'AMD ', 'AMD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(5, 'ANG', 532, 'Florin des Antilles ', 'ANG ', 'ANG ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(6, 'AOA', 973, 'Kwanza ', 'AOA ', 'AOA ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(7, 'ARS', 32, 'Peso argentin ', 'ARS ', 'ARS ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(8, 'AUD', 36, 'Dollar australien ', 'AUD ', 'AUD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(9, 'AWG', 533, 'Florin d''Aruba ', 'AWG ', 'AWG ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(10, 'AZN', 944, 'Manat ', 'AZN ', 'AZN ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(11, 'BBD', 52, 'Dollar de Barbade ', 'BBD ', 'BBD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(12, 'BDT', 50, 'Taka ', 'BDT ', 'BDT ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(13, 'BGN', 975, 'Lev de Bulgarie ', 'BGN ', 'BGN ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(14, 'BHD', 48, 'Dinar de Bahre�n ', 'BHD ', 'BHD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(15, 'BIF', 108, 'Franc du Burundi ', 'BIF ', 'BIF ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(16, 'BMD', 60, 'Dollar des Bermudes ', 'BMD ', 'BMD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(17, 'BND', 96, 'Dollar de Brunei ', 'BND ', 'BND ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(18, 'BOB', 68, 'Boliviano', 'BOB', 'BOB', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(19, 'BOV', 984, 'Mvdol', 'BOV', 'BOV', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(20, 'BRL', 986, 'Real de Br�sil ', 'BRL ', 'BRL ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(21, 'BSD', 44, 'Dollar des Bahamas ', 'BSD ', 'BSD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(22, 'BTN', 64, 'Ngultrum', 'BTN', 'BTN', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(23, 'BWP', 72, 'Pula ', 'BWP ', 'BWP ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(24, 'BYR', 974, 'Rouble b�lorusse ', 'BYR ', 'BYR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(25, 'BZD', 84, 'Dollar de Belize ', 'BZD ', 'BZD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(26, 'CAD', 124, 'Dollar canadien ', 'CAD ', 'CAD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(27, 'CDF', 976, 'Franc Congolais ', 'CDF ', 'CDF ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(28, 'CHE', 947, 'WIR Euro', 'CHE', 'CHE', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(29, 'CHF', 756, 'Franc Suisse', 'CHF', 'CHF', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(30, 'CHW', 948, 'WIR Franc', 'CHW', 'CHW', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(31, 'CLP', 152, 'Peso chilien', 'CLP', 'CLP', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(32, 'CNY', 156, 'Yuan Ren-Min-Bi ', 'CNY ', 'CNY ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(33, 'COP', 170, 'Peso colombien', 'COP', 'COP', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(34, 'COU', 970, 'Unidad de Valor Real ', 'COU', 'COU', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(35, 'CRC', 188, 'Colon de Costa Rica ', 'CRC ', 'CRC ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(36, 'CUC', 931, 'Peso Convertible ', 'CUC', 'CUC', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(37, 'CUP', 192, 'Peso cubain', 'CUP', 'CUP', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(38, 'CVE', 132, 'Escudo du Cap-Vert ', 'CVE ', 'CVE ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(39, 'CZK', 203, 'Couronne tch�que ', 'CZK ', 'CZK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(40, 'DJF', 262, 'Franc de Djibouti ', 'DJF ', 'DJF ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(41, 'DKK', 208, 'Couronne danoise ', 'DKK ', 'DKK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(42, 'DOP', 214, 'Peso dominicain ', 'DOP ', 'DOP ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(43, 'DZD', 12, 'Dinar alg�rien ', 'DZD ', 'DZD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(44, 'EEK', 233, 'Couronne estonienne ', 'EEK ', 'EEK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(45, 'EGP', 818, 'Livre �gyptienne ', 'EGP ', 'EGP ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(46, 'ERN', 232, 'Nakfa ', 'ERN ', 'ERN ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(47, 'ETB', 230, 'Birr �thiopien ', 'ETB ', 'ETB ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(48, 'EUR', 978, 'Euro ', '&#8364; ', '�', 'FR', 1, 0);
INSERT INTO `smi_dev` VALUES(49, 'FJD', 242, 'Dollar de Fidji ', 'FJD ', 'FJD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(50, 'FKP', 238, 'Livre de Falkland ', 'FKP ', 'FKP ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(51, 'GBP', 826, 'Livre Sterling ', '&#165; ', '�', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(52, 'GEL', 981, 'Lari ', 'GEL ', 'GEL ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(53, 'GHS', 936, 'Ghana Cedi ', 'GHS ', 'GHS ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(54, 'GIP', 292, 'Livre de Gibraltar ', 'GIP ', 'GIP ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(55, 'GMD', 270, 'Dalasi ', 'GMD ', 'GMD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(56, 'GNF', 324, 'Franc guin�en ', 'GNF ', 'GNF ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(57, 'GTQ', 320, 'Quetzal ', 'GTQ ', 'GTQ ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(58, 'GYD', 328, 'Dollar de Guyane ', 'GYD ', 'GYD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(59, 'HKD', 344, 'Dollar de Hong-Kong ', 'HKD ', 'HKD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(60, 'HNL', 340, 'Lempira ', 'HNL ', 'HNL ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(61, 'HRK', 191, 'Kuna ', 'HRK ', 'HRK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(62, 'HTG', 332, 'Gourde', 'HTG', 'HTG', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(63, 'HUF', 348, 'Forint ', 'HUF ', 'HUF ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(64, 'IDR', 360, 'Rupiah ', 'IDR ', 'IDR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(65, 'ILS', 376, 'Nouvel isra�li sheqel ', 'ILS ', 'ILS ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(66, 'INR', 356, 'Roupie indienne', 'INR', 'INR', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(67, 'IQD', 368, 'Dinar iraquien ', 'IQD ', 'IQD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(68, 'IRR', 364, 'Rial iranien ', 'IRR ', 'IRR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(69, 'ISK', 352, 'Couronne islandaise ', 'ISK ', 'ISK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(70, 'JMD', 388, 'Dollar jama�cain ', 'JMD ', 'JMD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(71, 'JOD', 400, 'Dinar jordanien ', 'JOD ', 'JOD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(72, 'JPY', 392, 'Yen ', '&#165; ', '� ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(73, 'KES', 404, 'Shilling du Kenya ', 'KES ', 'KES ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(74, 'KGS', 417, 'Som ', 'KGS ', 'KGS ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(75, 'KHR', 116, 'Riel ', 'KHR ', 'KHR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(76, 'KMF', 174, 'Franc des Comores ', 'KMF ', 'KMF ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(77, 'KPW', 408, 'Won de la Cor�e du Nord ', 'KPW ', 'KPW ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(78, 'KRW', 410, 'Won ', 'KRW ', 'KRW ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(79, 'KWD', 414, 'Dinar kowe�tien ', 'KWD ', 'KWD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(80, 'KYD', 136, 'Dollar des Iles Ca�manes ', 'KYD ', 'KYD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(81, 'KZT', 398, 'Tenge ', 'KZT ', 'KZT ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(82, 'LAK', 418, 'Kip ', 'LAK ', 'LAK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(83, 'LBP', 422, 'Livre libanaise ', 'LBP ', 'LBP ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(84, 'LKR', 144, 'Roupie de Sri Lanka ', 'LKR ', 'LKR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(85, 'LRD', 430, 'Dollar lib�rien ', 'LRD ', 'LRD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(86, 'LSL', 426, 'Loti', 'LSL', 'LSL', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(87, 'LTL', 440, 'Litas lituanien ', 'LTL ', 'LTL ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(88, 'LVL', 428, 'Lats letton ', 'LVL ', 'LVL ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(89, 'LYD', 434, 'Dinar libyen ', 'LYD ', 'LYD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(90, 'MAD', 504, 'Dirham marocain ', 'MAD ', 'MAD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(91, 'MDL', 498, 'Leu de Moldovie ', 'MDL ', 'MDL ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(92, 'MGA', 969, 'Malagasy Ariary ', 'MGA ', 'MGA ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(93, 'MKD', 807, 'Denar ', 'MKD ', 'MKD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(94, 'MMK', 104, 'Kyat ', 'MMK ', 'MMK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(95, 'MNT', 496, 'Tugrik ', 'MNT ', 'MNT ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(96, 'MOP', 446, 'Pataca ', 'MOP ', 'MOP ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(97, 'MRO', 478, 'Ouguija ', 'MRO ', 'MRO ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(98, 'MUR', 480, 'Roupie de Maurice ', 'MUR ', 'MUR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(99, 'MVR', 462, 'Rufiyaa ', 'MVR ', 'MVR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(100, 'MWK', 454, 'Kwacha de Malawi ', 'MWK ', 'MWK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(101, 'MXN', 484, 'Peso mexicain', 'MXN', 'MXN', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(102, 'MXV', 979, 'Mexican Unidad de Inversion (UDI) ', 'MXV', 'MXV', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(103, 'MYR', 458, 'Ringgit de Malaisie ', 'MYR ', 'MYR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(104, 'MZN', 943, 'Metical ', 'MZN ', 'MZN ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(105, 'NAD', 516, 'Dollar namibien ', 'NAD ', 'NAD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(106, 'NGN', 566, 'Naira ', 'NGN ', 'NGN ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(107, 'NIO', 558, 'Cordoba Oro ', 'NIO ', 'NIO ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(108, 'NOK', 578, 'Couronne norv�gienne ', 'NOK ', 'NOK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(109, 'NPR', 524, 'Roupie du N�pal ', 'NPR ', 'NPR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(110, 'NZD', 554, 'Dollar n�o-z�landais ', 'NZD ', 'NZD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(111, 'OMR', 512, 'Rial Omani ', 'OMR ', 'OMR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(112, 'PAB', 590, 'Balboa', 'PAB', 'PAB', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(113, 'PEN', 604, 'Nouveau Sol ', 'PEN ', 'PEN ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(114, 'PGK', 598, 'Kina ', 'PGK ', 'PGK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(115, 'PHP', 608, 'Peso philippin ', 'PHP ', 'PHP ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(116, 'PKR', 586, 'Roupie du Pakistan ', 'PKR ', 'PKR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(117, 'PLN', 985, 'Zloty ', 'PLN ', 'PLN ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(118, 'PYG', 600, 'Guarani ', 'PYG ', 'PYG ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(119, 'QAR', 634, 'Riyal du Qatar ', 'QAR ', 'QAR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(120, 'RON', 946, 'Nouveau Leu ', 'RON ', 'RON ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(121, 'RSD', 941, 'Dinar de Serbie ', 'RSD ', 'RSD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(122, 'RUB', 643, 'Rouble russe ', 'RUB ', 'RUB ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(123, 'RWF', 646, 'Franc du Rwanda ', 'RWF ', 'RWF ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(124, 'SAR', 682, 'Riyal saoudien ', 'SAR ', 'SAR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(125, 'SBD', 90, 'Dollar de Salomon ', 'SBD ', 'SBD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(126, 'SCR', 690, 'Roupie des Seychelles ', 'SCR ', 'SCR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(127, 'SDG', 938, 'Livre soudanaise ', 'SDG ', 'SDG ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(128, 'SEK', 752, 'Couronne su�doise ', 'SEK ', 'SEK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(129, 'SGD', 702, 'Dollar de Singapour ', 'SGD ', 'SGD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(130, 'SHP', 654, 'Livre de Sainte-H�l�ne ', 'SHP ', 'SHP ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(131, 'SLL', 694, 'Leone ', 'SLL ', 'SLL ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(132, 'SOS', 706, 'Shilling de Somalie ', 'SOS ', 'SOS ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(133, 'SRD', 968, 'Dollar de Suriname ', 'SRD ', 'SRD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(134, 'STD', 678, 'Dobra ', 'STD ', 'STD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(135, 'SVC', 222, 'Colon du El Salvador', 'SVC', 'SVC', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(136, 'SYP', 760, 'Livre syrienne ', 'SYP ', 'SYP ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(137, 'SZL', 748, 'Lilangeni ', 'SZL ', 'SZL ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(138, 'THB', 764, 'Baht ', 'THB ', 'THB ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(139, 'TJS', 972, 'Somoni ', 'TJS ', 'TJS ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(140, 'TMT', 934, 'Manat ', 'TMT ', 'TMT ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(141, 'TND', 788, 'Dinar tunisien ', 'TND ', 'TND ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(142, 'TOP', 776, 'Pa''anga ', 'TOP ', 'TOP ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(143, 'TRY', 949, 'Nouvelle Livre ', 'TRY ', 'TRY ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(144, 'TTD', 780, 'Dollar de la Trinit� et de Tobago ', 'TTD ', 'TTD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(145, 'TWD', 901, 'Nouveau dollar de Ta�wan ', 'TWD ', 'TWD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(146, 'TZS', 834, 'Shilling de Tanzanie ', 'TZS ', 'TZS ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(147, 'UAH', 980, 'Hryvnia ', 'UAH ', 'UAH ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(148, 'UGX', 800, 'Nouveau Shilling ougandais ', 'UGX ', 'UGX ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(149, 'USD', 840, 'Dollar des �tats-Unis ', '&#36; ', '$', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(150, 'USN', 997, 'Dollar des �tats-Unis (Lendemain) ', 'USN', 'USN', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(151, 'USS', 998, 'Dollar des �tats-Unis (M�me jour)', 'USS', 'USS', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(152, 'UYI', 940, 'Uruguay Peso en Unidades Indexadas ', 'UYI', 'UYI', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(153, 'UYU', 858, 'Peso Uruguayo', 'UYU', 'UYU', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(154, 'UZS', 860, 'Soum d''Ouzb�kistan ', 'UZS ', 'UZS ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(155, 'VEF', 937, 'Bolivar Fuerte ', 'VEF ', 'VEF ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(156, 'VND', 704, 'Dong ', 'VND ', 'VND ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(157, 'VUV', 548, 'Vatu ', 'VUV ', 'VUV ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(158, 'WST', 882, 'Tala ', 'WST ', 'WST ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(159, 'XAF', 950, 'Franc CFA � BEAC', 'XAF ', 'XAF ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(160, 'XCD', 951, 'Dollar des Cara�bes orientales ', 'XCD ', 'XCD ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(161, 'XFU', 0, 'Franc UIC ', 'XFU ', 'XFU ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(162, 'XOF', 952, 'Franc CFA � BCEAO', 'XOF ', 'XOF ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(163, 'XPF', 953, 'Franc CFP ', 'XPF ', 'XPF ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(164, 'YER', 886, 'Riyal du Y�men ', 'YER ', 'YER ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(165, 'ZAR', 710, 'Rand', 'ZAR', 'ZAR', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(166, 'ZAR', 710, 'Rand ', 'ZAR ', 'ZAR ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(167, 'ZMK', 894, 'Kwacha de Zambie ', 'ZMK ', 'ZMK ', 'FR', 0, 1);
INSERT INTO `smi_dev` VALUES(168, 'ZWL', 932, 'Dollar du Zimbabwe ', 'ZWL ', 'ZWL ', 'FR', 0, 1);


##
## Structure de la table `smi_devc`
##

DROP TABLE IF EXISTS `smi_devc`;
CREATE TABLE IF NOT EXISTS `smi_devc` (
  `devc_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `devc_codeafrom` char(3) NOT NULL,
  `devc_codeato` char(3) NOT NULL,
  `devc_taux` float(10,2) NOT NULL,
  `devc_date` date NOT NULL DEFAULT '0000-00-00',
  PRIMARY KEY (`devc_id`),
  KEY `devc_codeafrom` (`devc_codeafrom`),
  KEY `devc_codeato` (`devc_codeato`),
  KEY `devc_date` (`devc_date`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Devises - taux de change';



##
## Structure de la table `smi_pays`
##


ALTER TABLE `smi_pays` ADD `pays_codeadev` VARCHAR( 3 ) NOT NULL AFTER `pays_nom`;
ALTER TABLE `smi_pays` ADD INDEX ( `pays_codeadev` ) ;
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='AD';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='AT';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='AX';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='AT';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='CY';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='DE';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='ES';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='FI';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='FR';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='GF';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='GP';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='GR';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='FR';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='IE';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='IT';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='LU';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='MC';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='MQ';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='MT';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='NL';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='PT';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='SI';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='SK';
UPDATE `smi_pays` SET `pays_codeadev` = 'EUR' WHERE `pays_code` ='YT';
UPDATE `smi_pays` SET `pays_codeadev` = 'XPF' WHERE `pays_code` ='NC';
UPDATE `smi_pays` SET `pays_codeadev` = 'XPF' WHERE `pays_code` ='PF';
UPDATE `smi_pays` SET `pays_codeadev` = 'XPF' WHERE `pays_code` ='WF';

##
## Structure de la table `smi_age`
##

ALTER TABLE `smi_age` ADD `age_codeadev` VARCHAR( 3 ) NOT NULL AFTER `age_zone` ;
ALTER TABLE `smi_age` ADD INDEX ( `age_codeadev` ) ;

##
## Structure de la table `smi_st`
##

ALTER TABLE `smi_st` ADD `st_codeadev` VARCHAR( 3 ) NOT NULL AFTER `st_codepays` ;
ALTER TABLE `smi_st` ADD INDEX ( `st_codeadev` ) ;

##
## Structure de la table `smi_do`
##

ALTER TABLE `smi_do` ADD `do_codeadev` VARCHAR( 3 ) NOT NULL AFTER `do_codepays` ;
ALTER TABLE `smi_do` ADD INDEX ( `do_codeadev` ) ;

##
## Structure de la table `smi_cli`
##

ALTER TABLE `smi_cli` ADD `cli_codeadev` VARCHAR( 3 ) NOT NULL AFTER `cli_codepays` ;
ALTER TABLE `smi_cli` ADD INDEX ( `cli_codeadev` ) ;

##
## Structure de la table `smi_cocl`
##

ALTER TABLE `smi_cocl` ADD `cocl_codeadev` VARCHAR( 3 ) NOT NULL AFTER `cocl_pvht` ;
ALTER TABLE `smi_cocl` ADD INDEX ( `cocl_codeadev` ) ;

##
## Structure de la table `smi_coloc`
##

ALTER TABLE `smi_coloc` ADD `coloc_codeadev` VARCHAR( 3 ) NOT NULL AFTER `coloc_codecli` ;
ALTER TABLE `smi_coloc` ADD INDEX ( `coloc_codeadev` ) ;


##
## Structure de la table `smi_pdtloc`
##

ALTER TABLE `smi_pdtloc` ADD `pdtloc_codeadev` VARCHAR( 3 ) NOT NULL ;
ALTER TABLE `smi_pdtloc` ADD INDEX ( `pdtloc_codeadev` ) ;

##
## Structure de la table `smi_dos`
##

ALTER TABLE `smi_dos` ADD `dos_codeadev` VARCHAR( 3 ) NOT NULL ;
ALTER TABLE `smi_dos` ADD INDEX ( `dos_codeadev` ) ;

##
## Structure de la table `smi_int`
##

ALTER TABLE `smi_int` ADD `int_codeadev` VARCHAR( 3 ) NOT NULL ;
ALTER TABLE `smi_int` ADD INDEX ( `int_codeadev` ) ;


##
## Structure de la table `smi_pdti`
##

ALTER TABLE `smi_pdti` ADD `pdti_facture` TINYINT( 1 ) NOT NULL DEFAULT '1';


##
## Structure de la table `smi_urg`
##

DROP TABLE IF EXISTS `smi_urg`;
CREATE TABLE IF NOT EXISTS `smi_urg` (
  `urg_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `urg_niveau` tinyint(3) unsigned NOT NULL,
  `urg_des` varchar(50) NOT NULL,
  `urg_couleur` varchar(7) NOT NULL,
  `urg_int` tinyint(1) NOT NULL DEFAULT '1',
  `urg_contrat` tinyint(1) NOT NULL DEFAULT '1',
  `urg_nduree` tinyint(3) NOT NULL,
  `urg_tduree` int(10) NOT NULL DEFAULT '3600',
  `urg_actif` tinyint(1) NOT NULL DEFAULT '1',
  `urg_del` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`urg_id`),
  KEY `urg_del` (`urg_del`),
  KEY `urg_int` (`urg_int`),
  KEY `urg_contrat` (`urg_contrat`),
  KEY `urg_niveau` (`urg_niveau`),
  KEY `urg_des` (`urg_des`),
  KEY `urg_actif` (`urg_actif`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Niveaux d''urgence';

##
## Contenu de la table `smi_urg`
##


INSERT INTO `smi_urg` VALUES(1, 0, 'STANDARD', '#38F608', 1, 1, 48, 3600, 1, 0);
INSERT INTO `smi_urg` VALUES(2, 1, 'URGENT', '#F9EA05', 1, 1, 24, 3600, 1, 0);
INSERT INTO `smi_urg` VALUES(3, 2, 'TRES URGENT', '#0308FB', 1, 1, 16, 3600, 1, 0);
INSERT INTO `smi_urg` VALUES(4, 3, 'VITAL', '#FA2604', 1, 1, 8, 3600, 1, 0);

##
## Contenu de la table `smi_int`
##

ALTER TABLE `smi_int` CHANGE `int_urg` `int_urg` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_int` ADD INDEX ( `int_urg` ) ;

##
## Contenu de la table `smi_tac`
##

ALTER TABLE `smi_tac` CHANGE `tac_urg` `tac_urg` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_tac` ADD INDEX ( `tac_urg` ) ;

##
## Contenu de la table `smi_dos`
##

ALTER TABLE `smi_dos` CHANGE `dos_urg` `dos_urg` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_dos` ADD INDEX ( `dos_urg` ) ;

##
## Contenu de la table `smi_ot`
##

ALTER TABLE `smi_ot` CHANGE `ot_urg` `ot_urg` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_ot` ADD INDEX ( `ot_urg` ) ;

##
## Contenu de la table `smi_retd`
##

ALTER TABLE `smi_retd` CHANGE `retd_nivurg` `retd_nivurg` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_retd` ADD INDEX ( `retd_nivurg` ) ;

##
## Contenu de la table `smi_dde`
##

ALTER TABLE `smi_dde` CHANGE `dde_urg` `dde_urg` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_dde` ADD INDEX ( `dde_urg` ) ;



## ------- 17/10/2010 ---------

##
## Structure de la table `smi_fam`
##

ALTER TABLE `smi_fam` CHANGE `fam_code` `fam_code` VARCHAR( 20 ) NOT NULL DEFAULT '';

##
## Structure de la table `smi_pdt`
##

ALTER TABLE `smi_pdt` CHANGE `pdt_fam` `pdt_fam` VARCHAR( 20 ) NOT NULL DEFAULT '';

##
## Structure de la table `smi_pdtloc`
##

ALTER TABLE `smi_pdtloc` CHANGE `pdtloc_fam` `pdtloc_fam` VARCHAR( 20 ) NOT NULL ;

##
## Structure de la table `smi_pw`
##

ALTER TABLE `smi_pw` ADD `pw_modele` VARCHAR( 20 ) NOT NULL DEFAULT '' ;
ALTER TABLE `smi_pw` ADD INDEX ( `pw_modele` ) ;

##
## Structure de la table `smi_droitsm`
##

DROP TABLE IF EXISTS `smi_droitsm`;
CREATE TABLE IF NOT EXISTS `smi_droitsm` (
  `droitsm_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `droitsm_code` varchar(20) COLLATE latin1_general_ci NOT NULL,
  `droitsm_des` varchar(50) COLLATE latin1_general_ci NOT NULL,
  `droitsm_nivutil` tinyint(2) NOT NULL,
  PRIMARY KEY (`droitsm_id`),
  KEY `droitsm_code` (`droitsm_code`),
  KEY `droitsm_nivutil` (`droitsm_nivutil`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='Droits : mod�les';

##
## Structure de la table `smi_droitsmd`
##

DROP TABLE IF EXISTS `smi_droitsmd`;
CREATE TABLE IF NOT EXISTS `smi_droitsmd` (
  `droitsmd_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `droitsmd_desc` varchar(50) COLLATE latin1_general_ci NOT NULL,
  `droitsmd_nomfic` varchar(50) COLLATE latin1_general_ci NOT NULL,
  `droitsmd_td` varchar(10) COLLATE latin1_general_ci DEFAULT NULL,
  `droitsmd_modele` varchar(20) COLLATE latin1_general_ci NOT NULL,
  `droitsmd_auto` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`droitsmd_id`),
  KEY `droitsmd_nomfic` (`droitsmd_nomfic`),
  KEY `droitsmd_td` (`droitsmd_td`),
  KEY `droitsmd_modele` (`droitsmd_modele`),
  KEY `droitsmd_auto` (`droitsmd_auto`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='Droits : Mod�les - D�tails';


##
## Structure de la table `smi_droitst`
##

DROP TABLE IF EXISTS `smi_droitst`;
CREATE TABLE IF NOT EXISTS `smi_droitst` (
  `droitst_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `droitst_desc` varchar(50) COLLATE latin1_general_ci NOT NULL,
  `droitst_nomfic` varchar(50) COLLATE latin1_general_ci NOT NULL,
  `droitst_td` varchar(10) COLLATE latin1_general_ci DEFAULT NULL,
  `droitst_nivutil` tinyint(2) NOT NULL,
  `droitst_auto` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`droitst_id`),
  KEY `droitst_nomfic` (`droitst_nomfic`),
  KEY `droitst_td` (`droitst_td`),
  KEY `droitst_nivutil` (`droitst_nivutil`),
  KEY `droitst_auto` (`droitst_auto`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='Droits Types';

##
## Contenu de la table `smi_droitst`
##

INSERT INTO `smi_droitst` VALUES(1, 'Demande interne', 'dde_maj.php', NULL, 11, 1);
INSERT INTO `smi_droitst` VALUES(2, 'Bons de travail (Liste)', 'ot_lst.php', NULL, 11, 1);
INSERT INTO `smi_droitst` VALUES(3, 'T�ches (Liste)', 'tac_lst', NULL, 11, 1);
INSERT INTO `smi_droitst` VALUES(4, 'T�ches (Liste - Impression)', 'tac_lsti', NULL, 11, 1);
INSERT INTO `smi_droitst` VALUES(5, 'Bons de travail (Edition)', 'ot_maj.php', 'edit', 11, 1);
INSERT INTO `smi_droitst` VALUES(6, 'Bons de travail (Impression)', 'ot_pdf', NULL, 11, 1);
INSERT INTO `smi_droitst` VALUES(7, 'T�ches (Ajout)', 'tac_maj.php', 'add', 11, 1);
INSERT INTO `smi_droitst` VALUES(8, 'T�ches (Edition)', 'tac_maj.php', 'edit', 11, 1);
INSERT INTO `smi_droitst` VALUES(9, 'T�ches (Suppression)', 'tac_maj.php', 'del', 11, 1);
INSERT INTO `smi_droitst` VALUES(10, 'Demande interne', 'dde_maj.php', NULL, 10, 1);
INSERT INTO `smi_droitst` VALUES(11, 'Coordonn�es (Edition)', 'st_maj.php', NULL, 10, 1);
INSERT INTO `smi_droitst` VALUES(12, 'Techniciens (Liste)', 'tec_lst.php', 'std', 10, 1);
INSERT INTO `smi_droitst` VALUES(13, 'Techniciens (Liste - Impression)', 'tec_lsti.php', 'std', 10, 1);
INSERT INTO `smi_droitst` VALUES(14, 'Techniciens (Ajout)', 'tec_maj.php', 'add', 10, 1);
INSERT INTO `smi_droitst` VALUES(15, 'Techniciens (Edition)', 'tec_maj.php', 'edit', 10, 1);
INSERT INTO `smi_droitst` VALUES(16, 'Techniciens (Suppression)', 'tec_maj.php', 'del', 10, 1);
INSERT INTO `smi_droitst` VALUES(17, 'Techniciens (Impression)', 'tec_maji.php', NULL, 10, 1);
INSERT INTO `smi_droitst` VALUES(18, 'Techniciens (Emailing)', 'email_maj.php', 'tecs', 10, 1);
INSERT INTO `smi_droitst` VALUES(19, 'Techniciens (Statistiques)', 'tecs_stat.php', NULL, 10, 1);
INSERT INTO `smi_droitst` VALUES(20, 'Bons de travail (Liste)', 'ot_lst.php', NULL, 10, 1);
INSERT INTO `smi_droitst` VALUES(21, 'Bons de travail (Edition)', 'ot_maj.php', 'edit', 10, 1);
INSERT INTO `smi_droitst` VALUES(22, 'Bons de travail (Impression)', 'ot_pdf', NULL, 10, 1);
INSERT INTO `smi_droitst` VALUES(23, 'Bons de travail (Liste - Impression)', 'ot_lsti.php', NULL, 10, 1);
INSERT INTO `smi_droitst` VALUES(24, 'T�ches (Liste)', 'tac_lst', NULL, 10, 1);
INSERT INTO `smi_droitst` VALUES(25, 'T�ches (Liste - Impression)', 'tac_lsti', NULL, 10, 1);
INSERT INTO `smi_droitst` VALUES(26, 'T�ches (Ajout)', 'tac_maj.php', 'add', 10, 1);
INSERT INTO `smi_droitst` VALUES(27, 'T�ches (Edition)', 'tac_maj.php', 'edit', 10, 1);
INSERT INTO `smi_droitst` VALUES(28, 'T�ches (Suppression)', 'tac_maj.php', 'del', 10, 1);
INSERT INTO `smi_droitst` VALUES(29, 'Demande interne', 'dde_maj.php', NULL, 7, 1);
INSERT INTO `smi_droitst` VALUES(30, 'Clients (Liste)', 'cli_lst.php', NULL, 7, 1);
INSERT INTO `smi_droitst` VALUES(31, 'Clients (Liste - Impression)', 'cli_lsti.php', NULL, 7, 1);
INSERT INTO `smi_droitst` VALUES(32, 'Clients (Ajout)', 'cli_maj.php', 'add', 7, 1);
INSERT INTO `smi_droitst` VALUES(33, 'Clients (Edition)', 'cli_maj.php', 'edit', 7, 1);
INSERT INTO `smi_droitst` VALUES(34, 'Clients (Suppression)', 'cli_maj.php', 'del', 7, 1);
INSERT INTO `smi_droitst` VALUES(35, 'Interventions (Liste)', 'int_lst.php', NULL, 7, 1);
INSERT INTO `smi_droitst` VALUES(36, 'Interventions (Liste - Impression)', 'int_lsti.php', NULL, 7, 1);
INSERT INTO `smi_droitst` VALUES(37, 'Interventions (Ajout)', 'int_maj.php', 'add', 7, 1);
INSERT INTO `smi_droitst` VALUES(38, 'Interventions (Edition)', 'int_maj.php', 'edit', 7, 1);
INSERT INTO `smi_droitst` VALUES(39, 'Interventions (Suppression)', 'int_maj.php', 'del', 7, 1);
INSERT INTO `smi_droitst` VALUES(40, 'Demande interne', 'dde_maj.php', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(41, 'Coordonn�es (Edition)', 'do_maj.php', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(42, 'Techniciens (Liste)', 'tec_lst.php', 'std', 6, 1);
INSERT INTO `smi_droitst` VALUES(43, 'Techniciens (Liste - Impression)', 'tec_lsti.php', 'std', 6, 1);
INSERT INTO `smi_droitst` VALUES(44, 'Techniciens (Ajout)', 'tec_maj.php', 'add', 6, 1);
INSERT INTO `smi_droitst` VALUES(45, 'Techniciens (Edition)', 'tec_maj.php', 'edit', 6, 1);
INSERT INTO `smi_droitst` VALUES(46, 'Techniciens (Suppression)', 'tec_maj.php', 'del', 6, 1);
INSERT INTO `smi_droitst` VALUES(47, 'Techniciens (Impression)', 'tec_maji.php', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(48, 'Techniciens (Emailing)', 'email_maj.php', 'tecd', 6, 1);
INSERT INTO `smi_droitst` VALUES(49, 'Techniciens (Statistiques)', 'tecd_stat.php', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(50, 'Clients (Liste)', 'cli_lst.php', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(51, 'Clients (Liste - Impression)', 'cli_lsti', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(52, 'Clients (Ajout)', 'cli_maj.php', 'add', 6, 1);
INSERT INTO `smi_droitst` VALUES(53, 'Clients (Edition)', 'cli_maj.php', 'edit', 6, 1);
INSERT INTO `smi_droitst` VALUES(54, 'Clients (Suppression)', 'cli_maj.php', 'del', 6, 1);
INSERT INTO `smi_droitst` VALUES(55, 'Clients (Emailing)', 'email_maj.php', 'cli', 6, 1);
INSERT INTO `smi_droitst` VALUES(56, 'Interventions (Liste)', 'int_lst.php', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(57, 'Interventions (Liste - Impression)', 'int_lsti', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(58, 'Interventions (Ajout)', 'int_maj.php', 'add', 6, 1);
INSERT INTO `smi_droitst` VALUES(59, 'Interventions (Edition)', 'int_maj.php', 'edit', 6, 1);
INSERT INTO `smi_droitst` VALUES(60, 'Interventions (Suppression)', 'int_maj.php', 'del', 6, 1);
INSERT INTO `smi_droitst` VALUES(61, 'Demande interne', 'dde_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(62, 'Planning (Choix)', 'plan_chx.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(63, 'Planning (Edition)', 'plan_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(64, 'Planning (Ajout �v�nement)', 'plan_addedit.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(65, 'Planning (Edition �v�nement)', 'plan_addedit.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(66, 'Fichiers internes', 'fic_down.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(67, 'Coordonn�es (Edition)', 'age_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(68, 'Techniciens (Liste)', 'tec_lst.php', 'std', 4, 1);
INSERT INTO `smi_droitst` VALUES(69, 'Techniciens (Liste - Impression)', 'tec_lsti.php', 'std', 4, 1);
INSERT INTO `smi_droitst` VALUES(70, 'Techniciens (Ajout)', 'tec_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(71, 'Techniciens (Edition)', 'tec_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(72, 'Techniciens (Suppression)', 'tec_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(73, 'Techniciens (Impression)', 'tec_maji.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(74, 'Techniciens (Emailing)', 'email_maj.php', 'tecd', 4, 1);
INSERT INTO `smi_droitst` VALUES(75, 'Techniciens (Statistiques)', 'tecd_stat.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(76, 'Bases de donn�es (Exportations Clients)', 'exp_data.php', 'cli', 4, 1);
INSERT INTO `smi_droitst` VALUES(77, 'Bases de donn�es (Exportations Sites Clients)', 'exp_data.php', 'scli', 4, 1);
INSERT INTO `smi_droitst` VALUES(78, 'Bases de donn�es (Importations Clients)', 'imp_data.php', 'cli', 4, 1);
INSERT INTO `smi_droitst` VALUES(79, 'Sous-traitants (Liste)', 'st_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(80, 'Sous-traitants (Edition)', 'st_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(81, 'Sous-traitants (Voir logo)', 'st_logo.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(82, 'Bons de travail (Liste)', 'ot_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(83, 'Bons de travail (Liste -  Impression)', 'ot_lsti.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(84, 'Bons de travail (Ajout)', 'ot_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(85, 'Bons de travail (Edition)', 'ot_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(86, 'Bons de travail (Suppression)', 'ot_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(87, 'Bons de travail (Impression)', 'ot_pdf.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(88, 'Interventions (Ajout)', 'int_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(89, 'Produits (Liste)', 'pdt_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(90, 'Produits (Liste -  Impression)', 'pdt_lsti.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(91, 'Produits (Visualisation)', 'pdt_lst.php', 'view', 4, 1);
INSERT INTO `smi_droitst` VALUES(92, 'Marques (Liste)', 'mque_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(93, 'Marques (Ajout)', 'mque_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(94, 'Marques (Edition)', 'mque_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(95, 'Marques (Renvois en attente)', 'mque_lst.php', 'r', 4, 1);
INSERT INTO `smi_droitst` VALUES(96, 'Marques (Ajout contact)', 'cmque_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(97, 'Marques (Edition contact)', 'cmque_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(98, 'Marques (Suppression contact)', 'cmque_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(99, 'Marques (Ajout lien)', 'wmque_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(100, 'Marques (Edition lien)', 'wmque_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(101, 'Marques (Suppression lien)', 'wmque_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(102, 'Retours (Produits � retourner - Liste)', 'retp_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(103, 'Retours (Produits � retourner - Liste - Impression', 'retp_lsti.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(104, 'Retours (Produits � retourner - Ajout)', 'retp_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(105, 'Retours (Produits � retourner - Edition)', 'retp_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(106, 'Retours (Produits � retourner - Suppression)', 'retp_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(107, 'Retours (Produits � retourner - Visualisation)', 'retp_maj.php', 'view', 4, 1);
INSERT INTO `smi_droitst` VALUES(108, 'Retours (Demandes de retours - Liste)', 'retd_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(109, 'Retours (Demandes de retours - Liste - Impression)', 'retd_lsti.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(110, 'Retours (Demandes de retours - Liste)', 'retd_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(111, 'Retours (Demandes de retours - Visualisation)', 'retd_maj.php', 'view', 4, 1);
INSERT INTO `smi_droitst` VALUES(112, 'Retours (Demandes de retours - Impression)', 'retd_pdf.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(113, 'Retours (Renvois de produits - Liste)', 'rete_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(114, 'Retours (Renvois de produits - Liste -  Impression', 'rete_lsti.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(115, 'Retours (Renvois de produits - Impression)', 'rete_pdf.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(116, 'Retours (Retours de produits - Liste)', 'retr_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(117, 'Retours (Retours de produits - Ajout)', 'retr_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(118, 'Retours (Retours de produits - Edition)', 'retr_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(119, 'Retours (Retours de produits - Visualisation)', 'retr_maj.php', 'view', 4, 1);
INSERT INTO `smi_droitst` VALUES(120, 'Produits (Historique)', 'pdtih_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(121, 'Contrats de location (liste)', 'coloc_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(122, 'Contrats de location (liste -  Impression)', 'coloc_lsti.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(123, 'Contrats de location (Ajout)', 'coloc_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(124, 'Contrats de location (Edition)', 'coloc_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(125, 'Contrats de location (Suppression)', 'coloc_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(126, 'Contrats de location (Visualisation)', 'coloc_maj.php', 'view', 4, 1);
INSERT INTO `smi_droitst` VALUES(127, 'Contrats de location (Location technicien)', 'tec_lst.php', 'loc', 4, 1);
INSERT INTO `smi_droitst` VALUES(128, 'Contrats de location (Produits � louer - Liste)', 'pdtloc_lst.php', 'loc', 4, 1);
INSERT INTO `smi_droitst` VALUES(129, 'Contrats de location (Location technicien)', 'tec_lst.php', 'loc', 4, 1);
INSERT INTO `smi_droitst` VALUES(130, 'Contrats de location (Produits � louer - Liste)', 'pdtloc_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(131, 'Clients (Liste)', 'cli_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(132, 'Clients (Liste -  Impression)', 'cli_lsti.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(133, 'Clients (Ajout)', 'cli_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(134, 'Clients (Edition)', 'cli_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(135, 'Clients (Suppression)', 'cli_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(136, 'Clients (Impression)', 'cli_maji.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(137, 'Clients (Emailing)', 'email_maj.php', 'cli', 4, 1);
INSERT INTO `smi_droitst` VALUES(138, 'Interventions (Liste)', 'int_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(139, 'Interventions (Liste - Impression)', 'int_lsti', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(140, 'Interventions (Ajout)', 'int_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(141, 'Interventions (Edition)', 'int_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(142, 'Interventions (Suppression)', 'int_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(143, 'Interventions (Impression)', 'int_pdf.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(144, 'Interventions (Synth�se)', 'int_syn.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(145, 'Interventions (Programmation)', 'intp_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(146, 'Interventions (Pi�ces jointes)', 'ficpj_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(147, 'Interventions (D�tail)', 'intd_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(148, 'Interventions (Suivi facturation -  Liste)', 'intf_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(149, 'Interventions (Suivi facturation -  Ajout)', 'intf_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(150, 'Interventions (Suivi facturation -  Edition)', 'intf_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(151, 'Relev� de parc (Liste)', 'rel_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(152, 'Relev� de parc (Ajout)', 'rel_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(153, 'Relev� de parc (Edition)', 'rel_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(154, 'Relev� de parc (Suppression)', 'rel_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(155, 'Dossiers de suivi (Liste)', 'dos_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(156, 'Dossiers de suivi (Liste -  Impression)', 'dos_lsti.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(157, 'Dossiers de suivi (Ajout)', 'dos_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(158, 'Dossiers de suivi (Edition)', 'dos_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(159, 'Dossiers de suivi (Suppression)', 'dos_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(160, 'Dossiers de suivi (Visualisation)', 'dos_maj.php', 'view', 4, 1);
INSERT INTO `smi_droitst` VALUES(161, 'Dossiers de suivi (Impression)', 'dos_pdf.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(162, 'Dossiers de suivi (Ajout d�tail)', 'dosd_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(163, 'Dossiers de suivi (Edition d�tail)', 'dosd_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(164, 'Dossiers de suivi (Suppression d�tail)', 'dosd_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(165, 'Contrats de maintenance (Liste)', 'cocl_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(166, 'Contrats de maintenance (Liste -  Impression)', 'cocl_lsti.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(167, 'Contrats de maintenance (Ajout)', 'cocl_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(168, 'Contrats de maintenance (Relance)', 'coclrel_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(169, 'Contrats de maintenance (Ajout)', 'cocl_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(170, 'Contrats de maintenance (Edition)', 'cocl_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(171, 'Contrats de maintenance (Suppression)', 'cocl_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(172, 'Contrats de maintenance (Visualisation)', 'cocl_maj.php', 'view', 4, 1);
INSERT INTO `smi_droitst` VALUES(173, 'Contrats de maintenance (Historique)', 'coclhd_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(174, 'Contrats de maintenance (Impression)', 'cocl_pdf.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(175, 'Contrats de maintenance (Synth�se)', 'cocls_pdf.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(176, 'Contrats de maintenance (D�tail)', 'cocld_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(177, 'Contrats de maintenance (Relances)', 'coclrel_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(178, 'Contrats de maintenance (R�ception)', 'coclrec_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(179, 'Contrats de maintenance (Renouvellement)', 'coclren_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(180, 'Contrats de maintenance (Cl�ture manuelle)', 'coclclos_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(181, 'Contrats de maintenance (Offre)', 'co_disp.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(182, 'Relev� de parc (Liste)', 'rel_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(183, 'Relev� de parc (Ajout)', 'rel_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(184, 'Relev� de parc (Edition)', 'rel_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(185, 'Relev� de parc (Suppression)', 'rel_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(186, 'Relev� de parc (Impression)', 'rel_pdf.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(187, 'Relev� de parc (Impression -  Fiche vierge)', 'rel_vierge.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(188, 'Relev� de parc (Fiche licence - Ajout)', 'rlic_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(189, 'Relev� de parc (Fiche licence - Edition)', 'rlic_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(190, 'Relev� de parc (Fiche licence - Suppression)', 'rlic_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(191, 'Relev� de parc (Fiche produit - Ajout)', 'rpdt_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(192, 'Relev� de parc (Fiche produit - Edition)', 'rpdt_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(193, 'Relev� de parc (Fiche produit - Suppression)', 'rpdt_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(194, 'Relev� de parc (Fiche licence/produit - Impression', 'rlp_pdf.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(195, 'Relev� de parc (Probl�me - Ajout)', 'rpbm_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(196, 'Relev� de parc (Probl�me - Edition)', 'rpbm_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(197, 'Relev� de parc (Probl�me - Suppression)', 'rpbm_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(198, 'Relev� de parc (Probl�me - Visualisation)', 'rpbm_maj.php', 'view', 4, 1);
INSERT INTO `smi_droitst` VALUES(199, 'T�ches (Liste)', 'tac_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(200, 'T�ches (Liste - Impression)', 'tac_lsti.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(201, 'T�ches (Ajout)', 'tac_maj.php', 'add', 4, 1);
INSERT INTO `smi_droitst` VALUES(202, 'T�ches (Edition)', 'tac_maj.php', 'edit', 4, 1);
INSERT INTO `smi_droitst` VALUES(203, 'T�ches (Suppression)', 'tac_maj.php', 'del', 4, 1);
INSERT INTO `smi_droitst` VALUES(204, 'T�ches (Visualisation)', 'tac_maj.php', 'view', 4, 1);
INSERT INTO `smi_droitst` VALUES(205, 'Demande interne', 'dde_maj.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(206, 'Planning (Choix)', 'plan_chx.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(207, 'Planning (Edition)', 'plan_maj.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(208, 'Fichiers internes', 'fic_down.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(209, 'Bons de travail (Liste)', 'ot_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(210, 'Bons de travail (Liste -  Impression)', 'ot_lsti.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(212, 'Bons de travail (Edition)', 'ot_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(213, 'Bons de travail (Suppression)', 'ot_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(214, 'Bons de travail (Impression)', 'ot_pdf.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(215, 'Interventions (Ajout)', 'int_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(216, 'Produits (Liste)', 'pdt_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(217, 'Produits (Liste -  Impression)', 'pdt_lsti.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(218, 'Produits Location (Edition)', 'pdtl_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(219, 'Marques (Liste)', 'mque_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(220, 'Marques (Ajout)', 'mque_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(221, 'Marques (Edition)', 'mque_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(222, 'Marques (Ajout contact)', 'cmque_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(223, 'Marques (Edition contact)', 'cmque_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(224, 'Marques (Suppression contact)', 'cmque_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(225, 'Marques (Ajout lien)', 'wmque_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(226, 'Marques (Edition lien)', 'wmque_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(227, 'Marques (Suppression lien)', 'wmque_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(228, 'Retours (Produits � retourner - Liste)', 'retp_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(229, 'Retours (Produits � retourner - Liste - Impression', 'retp_lsti.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(230, 'Retours (Produits � retourner - Ajout)', 'retp_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(231, 'Retours (Produits � retourner - Edition)', 'retp_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(232, 'Retours (Produits � retourner - Suppression)', 'retp_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(233, 'Retours (Produits � retourner - Visualisation)', 'retp_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(234, 'Produits (Historique)', 'pdtih_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(235, 'Contrats de location (liste)', 'coloc_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(236, 'Contrats de location (liste -  Impression)', 'coloc_lsti.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(237, 'Contrats de location (Ajout)', 'coloc_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(238, 'Contrats de location (Edition)', 'coloc_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(239, 'Contrats de location (Suppression)', 'coloc_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(240, 'Contrats de location (Visualisation)', 'coloc_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(241, 'Contrats de location (Location technicien)', 'tec_lst.php', 'loc', 3, 1);
INSERT INTO `smi_droitst` VALUES(361, 'Contacts Clients (Ajout)', 'ccli_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(359, 'Bons de travail (Visualisation)', 'ot_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(360, 'Bons de travail (Ajout - depuis liste Bons)', 'cli_maj.php', 'ot', 3, 1);
INSERT INTO `smi_droitst` VALUES(244, 'Contrats de location (Produits � louer - Liste)', 'pdtloc_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(245, 'Clients (Liste)', 'cli_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(246, 'Clients (Liste -  Impression)', 'cli_lsti.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(247, 'Clients (Ajout)', 'cli_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(248, 'Clients (Edition)', 'cli_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(249, 'Clients (Suppression)', 'cli_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(250, 'Clients (Impression)', 'cli_maji.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(251, 'Interventions (Liste)', 'int_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(252, 'Interventions (Liste - Impression)', 'int_lsti', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(254, 'Interventions (Edition)', 'int_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(255, 'Interventions (Suppression)', 'int_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(256, 'Interventions (Impression)', 'int_pdf.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(257, 'Interventions (Synth�se)', 'int_syn.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(258, 'Interventions (Programmation)', 'intp_maj.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(259, 'Interventions (Pi�ces jointes)', 'ficpj_maj.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(260, 'Interventions (D�tail)', 'intd_maj.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(261, 'Relev� de parc (Liste)', 'rel_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(363, 'Contrats de location (Impression)', 'coloc_pdf.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(265, 'Dossiers de suivi (Liste)', 'dos_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(266, 'Dossiers de suivi (Liste -  Impression)', 'dos_lsti.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(267, 'Dossiers de suivi (Ajout)', 'dos_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(268, 'Dossiers de suivi (Edition)', 'dos_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(269, 'Dossiers de suivi (Suppression)', 'dos_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(270, 'Dossiers de suivi (Visualisation)', 'dos_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(271, 'Dossiers de suivi (Impression)', 'dos_pdf.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(272, 'Dossiers de suivi (Ajout d�tail)', 'dosd_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(273, 'Dossiers de suivi (Edition d�tail)', 'dosd_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(274, 'Dossiers de suivi (Suppression d�tail)', 'dosd_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(275, 'Contrats de maintenance (Liste)', 'cocl_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(276, 'Contrats de maintenance (Liste -  Impression)', 'cocl_lsti.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(277, 'Contrats de maintenance (Ajout)', 'cocl_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(278, 'Contrats de maintenance (Relance)', 'coclrel_maj.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(364, 'Produits Location (Livraison)', 'pdtl_maj.php', 'dep', 3, 1);
INSERT INTO `smi_droitst` VALUES(280, 'Contrats de maintenance (Edition)', 'cocl_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(281, 'Contrats de maintenance (Suppression)', 'cocl_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(282, 'Contrats de maintenance (Visualisation)', 'cocl_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(283, 'Contrats de maintenance (Historique)', 'coclhd_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(284, 'Contrats de maintenance (Impression)', 'cocl_pdf.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(285, 'Contrats de maintenance (Synth�se)', 'cocls_pdf.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(286, 'Contrats de maintenance (D�tail)', 'cocld_maj.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(288, 'Contrats de maintenance - Renouvellement (Liste)', 'coclren_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(289, 'Contrats de maintenance (Cl�ture manuelle)', 'coclclos_maj.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(290, 'Contrats de maintenance (Offre)', 'co_disp.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(362, 'Produits (Visualisation)', 'pdt_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(292, 'Relev� de parc (Ajout)', 'rel_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(293, 'Relev� de parc (Edition)', 'rel_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(294, 'Relev� de parc (Suppression)', 'rel_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(295, 'Relev� de parc (Impression)', 'rel_pdf.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(296, 'Relev� de parc (Impression -  Fiche vierge)', 'rel_vierge.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(297, 'Relev� de parc (Fiche licence - Ajout)', 'rlic_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(298, 'Relev� de parc (Fiche licence - Edition)', 'rlic_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(299, 'Relev� de parc (Fiche licence - Suppression)', 'rlic_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(300, 'Relev� de parc (Fiche produit - Ajout)', 'rpdt_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(301, 'Relev� de parc (Fiche produit - Edition)', 'rpdt_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(302, 'Relev� de parc (Fiche produit - Suppression)', 'rpdt_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(303, 'Relev� de parc (Fiche licence/produit - Impression', 'rlp_pdf.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(304, 'Relev� de parc (Probl�me - Ajout)', 'rpbm_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(305, 'Relev� de parc (Probl�me - Edition)', 'rpbm_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(306, 'Relev� de parc (Probl�me - Suppression)', 'rpbm_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(307, 'Relev� de parc (Probl�me - Visualisation)', 'rpbm_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(308, 'T�ches (Liste)', 'tac_lst.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(309, 'T�ches (Liste - Impression)', 'tac_lsti.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(310, 'T�ches (Ajout)', 'tac_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(311, 'T�ches (Edition)', 'tac_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(312, 'T�ches (Suppression)', 'tac_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(384, 'Relev� de parc (Fiche produit - Visualisation)', 'rpdt_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(314, 'Demande interne', 'dde_maj.php', NULL, 2, 1);
INSERT INTO `smi_droitst` VALUES(315, 'Clients (Ajout)', 'cli_maj.php', 'add', 2, 1);
INSERT INTO `smi_droitst` VALUES(316, 'Clients (Edition)', 'cli_maj.php', 'edit', 2, 1);
INSERT INTO `smi_droitst` VALUES(317, 'Interventions (Ajout)', 'int_maj.php', 'add', 2, 1);
INSERT INTO `smi_droitst` VALUES(318, 'Demande interne', 'dde_maj.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(319, 'Clients (Liste)', 'cli_lst.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(320, 'Clients (Edition)', 'cli_maj.php', 'edit', 1, 1);
INSERT INTO `smi_droitst` VALUES(321, 'Clients (Impression)', 'cli_maji.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(322, 'Contrats de maintenance (Liste)', 'cocl_lst.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(323, 'Contrats de maintenance (Liste - Impression)', 'cocl_lsti.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(324, 'Contrats de maintenance (Impression ou copie par e', 'cocl_pdf.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(325, 'Contrats de maintenance (Synth�se)', 'cocls_pdf.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(326, 'Contrats de maintenance (Synth�se multiple)', 'coclsm_pdf.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(327, 'Contrats de maintenance (Offre)', 'co_disp.php', NULL, 4, 1);
INSERT INTO `smi_droitst` VALUES(328, 'Mot de passe (R�initialisation)', 'mdpc.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(329, 'Fichiers internes', 'fic_down.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(330, 'Interventions (Liste)', 'int_lst.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(331, 'Interventions (Visualisation)', 'int_maj.php', 'view', 1, 1);
INSERT INTO `smi_droitst` VALUES(332, 'Relev� de parc (Visualisation)', 'rel_maj.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(333, 'Relev� de parc (D�claration probl�mes)', 'dpbm.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(334, 'Contrats de location (liste)', 'coloc_lst.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(335, 'Contrats de maintenance (visualisation)', 'cocl_maj.php', 'view', 1, 1);
INSERT INTO `smi_droitst` VALUES(337, 'Contrats de maintenance disponibles', 'co_disp.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(338, 'Contrats de maintenance (historique)', 'coclhd_lst.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(339, 'Interventions (Impression)', 'int_pdf.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(340, 'Contrats de maintenance (impression)', 'cocl_pdf.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(341, 'Contrats de maintenance - Synth�se (Impression)', 'cocls_pdf.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(342, 'Contrats de location (liste - impression)', 'coloc_lsti.php', NULL, 1, 1);
INSERT INTO `smi_droitst` VALUES(343, 'Interventions (Impression)', 'int_pdf.php', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(344, 'Coordonn�es - Contacts (Ajout)', 'cdo_maj.php', 'add', 6, 1);
INSERT INTO `smi_droitst` VALUES(345, 'Coordonn�es - Contacts (Edition)', 'cdo_maj.php', 'edit', 6, 1);
INSERT INTO `smi_droitst` VALUES(346, 'Coordonn�es - Contacts (Suppression)', 'cdo_maj.php', 'del', 6, 1);
INSERT INTO `smi_droitst` VALUES(347, 'Coordonn�es (Impression)', 'do_maji.php', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(348, 'Logo (Visualisation)', 'do_logo.php', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(349, 'Techniciens (Visualisation)', 'tec_maj.php', 'view', 6, 1);
INSERT INTO `smi_droitst` VALUES(350, 'Interventions (Visualisation)', 'int_maj.php', 'view', 6, 1);
INSERT INTO `smi_droitst` VALUES(351, 'Clients (Notes)', 'aff_notesc.php', NULL, 6, 1);
INSERT INTO `smi_droitst` VALUES(352, 'Interventions (D�tail horaire - Visualisation)', 'inth_maj.php', 'view', 6, 1);
INSERT INTO `smi_droitst` VALUES(353, 'Client (Impression)', 'cli_maji.php', NULL, 7, 1);
INSERT INTO `smi_droitst` VALUES(354, 'Contrats (Impression)', 'cocl_lsti.php', NULL, 7, 1);
INSERT INTO `smi_droitst` VALUES(355, 'Contrats (Synth�se - Impression)', 'coclsm_pdf.php', NULL, 7, 1);
INSERT INTO `smi_droitst` VALUES(356, 'Clients (Notes)', 'aff_notesc.php', NULL, 7, 1);
INSERT INTO `smi_droitst` VALUES(357, 'Interventions (D�tail horaire - Visualisation)', 'inth_maj.php', 'view', 7, 1);
INSERT INTO `smi_droitst` VALUES(358, 'Interventions (Impression)', 'int_pdf.php', NULL, 7, 1);
INSERT INTO `smi_droitst` VALUES(365, 'Produits Location (D�part / Retour)', 'pdtldr_pdf.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(366, 'Produits Location (Suppression)', 'pdtl_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(367, 'Produits Location (Liste - Ajout  location)', 'pdtloc_lst.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(368, 'Produits Location - Bar�me (Edition)', 'pdtlbl_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(369, 'Produits Location - Bar�me (Suppression)', 'pdtlbl_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(370, 'Clients (Affichage Notes)', 'aff_notesc.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(371, 'Sous-traitant (Visualisation)', 'st_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(372, 'Sous-traitant (Visualisation Logo)', 'st_logo.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(373, 'Techniciens (Liste Location)', 'tec_lst.php', 'loc', 3, 1);
INSERT INTO `smi_droitst` VALUES(374, 'Produits Location (Visualisation)', 'pdtloc_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(375, 'Interventions - D�tail horaire (Ajout)', 'inth_maj.php', 'add', 3, 1);
INSERT INTO `smi_droitst` VALUES(376, 'Interventions - D�tail horaire (Visualisation)', 'inth_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(377, 'Produits (Liste depuis interventions)', 'pdt_lst.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(378, 'Taxes parafiscales (Liste depuis intervention)', 'tpf_lst.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(379, 'Interventions - D�tail horaire (Edition)', 'inth_maj.php', 'edit', 3, 1);
INSERT INTO `smi_droitst` VALUES(380, 'Interventions - D�tail horaire (Suppression)', 'inth_maj.php', 'del', 3, 1);
INSERT INTO `smi_droitst` VALUES(381, 'Contrats de maintenance (Visualisation)', 'cocl_maj.php', 'view', 3, 1);
INSERT INTO `smi_droitst` VALUES(382, 'Contrats de maintenance - Renouvellement (Edition)', 'coclren_maj.php', NULL, 3, 1);
INSERT INTO `smi_droitst` VALUES(385, 'Relev� de parc (Fiche licence - Visualisation)', 'rlic_maj.php', 'view', 3, 1);

## ------- 01/11/2010 ---------

##
## Structure de la table `smi_iprm`
##

DROP TABLE IF EXISTS `smi_iprm`;
CREATE TABLE IF NOT EXISTS `smi_iprm` (
  `iprm_id` int(10) unsigned NOT NULL,
  `iprm_code` varchar(20) NOT NULL,
  `iprm_nom` varchar(50) NOT NULL,
  `iprm_typbd` tinyint(2) NOT NULL,
  `iprm_ip` varchar(50) NOT NULL DEFAULT '000.000.000.000',
  `iprm_bd` varchar(50) NOT NULL,
  `iprm_user` varchar(50) NOT NULL,
  `iprm_pw` varchar(50) NOT NULL,
  PRIMARY KEY (`iprm_id`),
  KEY `iprm_code` (`iprm_code`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Param�tres imports sp�cifiques';

## ------- 06/02/2011 ---------

##
## Structure de la table `smi_pdt`
##

ALTER TABLE `smi_pdt` ADD `pdt_codeb` VARCHAR( 20 ) NULL DEFAULT NULL AFTER `pdt_code` ;
ALTER TABLE `smi_pdt` ADD INDEX ( `pdt_codeb` ) ;

##
## Structure de la table `smi_pdtloc`
##

ALTER TABLE `smi_pdtloc` ADD `pdtloc_codeb` VARCHAR( 20 ) NULL DEFAULT NULL AFTER `pdtloc_code` ;
ALTER TABLE `smi_pdtloc` ADD INDEX ( `pdtloc_codeb` ) ;

## ------- 25/02/2011 ---------

ALTER TABLE `smi_int` CHANGE `int_codeman` `int_codeman` VARCHAR( 60 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ;

#
# Mises � niveau version 0.9.9x
#

## ------- 26/04/2011 ---------


##
## Structure de la table `smi_ta`
##

RENAME TABLE `smi_dosta` TO `smi_ta` ;
ALTER TABLE `smi_ta` COMMENT = 'Types actions' ;
ALTER TABLE `smi_ta` CHANGE `dosta_id` `ta_id` TINYINT( 3 ) UNSIGNED NOT NULL AUTO_INCREMENT ;
ALTER TABLE `smi_ta` CHANGE `dosta_code` `ta_code` VARCHAR( 5 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ;
ALTER TABLE `smi_ta` CHANGE `dosta_desc` `ta_desc` VARCHAR( 50 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ;
ALTER TABLE `smi_ta` CHANGE `dosta_img` `ta_img` VARCHAR( 200 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ;
ALTER TABLE `smi_ta` CHANGE `dosta_depl` `ta_depl` TINYINT( 1 ) NOT NULL DEFAULT '0';
ALTER TABLE `smi_ta` CHANGE `dosta_delok` `ta_delok` TINYINT( 1 ) NOT NULL DEFAULT '1' ;
ALTER TABLE `smi_ta` ADD `ta_doss` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `ta_depl` ;
ALTER TABLE `smi_ta` ADD `ta_tra` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `ta_doss` ;
ALTER TABLE `smi_ta` ADD `ta_univ` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `ta_tra` ;
ALTER TABLE `smi_ta` DROP INDEX `dosta_code` ;
ALTER TABLE `smi_ta` ADD INDEX `ta_code` ( `ta_code` ) ;
ALTER TABLE `smi_ta` DROP INDEX `dosta_img` ;
ALTER TABLE `smi_ta` ADD INDEX `ta_img` ( `ta_img` ) ;
ALTER TABLE `smi_ta` ADD INDEX ( `ta_doss` ) ;
ALTER TABLE `smi_ta` ADD INDEX ( `ta_tra` ) ;
ALTER TABLE `smi_ta` ADD INDEX ( `ta_univ` ) ;
UPDATE `smi_ta` SET `ta_doss` = '1',`ta_tra` = '0';



INSERT INTO `smi_ta` VALUES(NULL, 'CRE', 'CREATION', '../icones/glaze/run.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'CREA', 'CREATION AFFECTATION', '../icones/aspneticons/user8_(add)_16x16.gif', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'CRER', 'CREATION RENDEZ-VOUS', '../icones/glaze/filenew.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MOD', 'MODIFICATION', '../icones/glaze/package_develop.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODA', 'MODIFICATION AFFECTATION', '../icones/aspneticons/user8_(edit)_16x16.gif', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODR', 'MODIFICATION RENDEZ-VOUS', '../icones/glaze/file_temporary.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'AJOC', 'AJOUT CONTRAT', '../icones/glaze/empty.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODC', 'MODIFICATION CONTRAT', '../icones/glaze/editcopy.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'SUPC', 'SUPPRESSION CONTRAT', '../icones/glaze/editcopy.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'EEI', 'ENVOI EMAIL (INTERNE)', '../icones/glaze/message.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'EEE', 'ENVOI EMAIL (EXTERNE)', '../icones/glaze/message.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODCA', 'MODIFICATION CATEGORIE', '../icones/glaze/bookmark_folder.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODMA', 'MODIFICATION MATERIEL', '../icones/glaze/editcopy.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODPB', 'MODIFICATION PROBLEME', '../icones/glaze/document.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODTE', 'MODIFICATION TRAVAIL EFFECTUE', '../icones/glaze/exec_wine.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODST', 'MODIFICATION STATUT', '../icones/glaze/mail_replylist.png', 0, 0, 1, 1, 0);

##
## Structure de la table `smi_dosd`
##


ALTER TABLE `smi_dosd` CHANGE `dosd_codedosta` `dosd_codeta` VARCHAR( 5 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ;

##
## Structure de la table `smi_tra`
##

DROP TABLE IF EXISTS `smi_tra`;
CREATE TABLE IF NOT EXISTS `smi_tra` (
  `tra_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `tra_codeutil` varchar(20) NOT NULL,
  `tra_date` date NOT NULL DEFAULT '0000-00-00',
  `tra_heure` time NOT NULL DEFAULT '00:00:00',
  `tra_codeta` varchar(5) NOT NULL,
  `tra_titre` varchar(100) NOT NULL,
  `tra_desc` text NOT NULL,
  `tra_typrat` tinyint(1) NOT NULL,
  `tra_coderat` varchar(20) NOT NULL,
  PRIMARY KEY (`tra_id`),
  KEY `tra_codeutil` (`tra_codeutil`),
  KEY `tra_date` (`tra_date`),
  KEY `tra_codeta` (`tra_codeta`),
  KEY `tra_typrat` (`tra_typrat`),
  KEY `tra_coderat` (`tra_coderat`),
  KEY `tra_heure` (`tra_heure`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Tra�abilit�';


##
## Structure de la table `smi_tramail`
##

DROP TABLE IF EXISTS `smi_tramail`;
CREATE TABLE IF NOT EXISTS `smi_tramail` (
  `tramail_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `tramail_traid` int(10) unsigned NOT NULL,
  `tramail_maildest` text COLLATE latin1_general_ci NOT NULL,
  `tramail_mailexp` text CHARACTER SET latin1 NOT NULL,
  `tramail_mailcc` text CHARACTER SET latin1,
  `tramail_mailbcc` text CHARACTER SET latin1,
  `tramail_mailurg` tinyint(4) NOT NULL,
  `tramail_mailsujet` text CHARACTER SET latin1 NOT NULL,
  `tramail_mailtxt` text CHARACTER SET latin1 NOT NULL,
  `tramail_statut` tinyint(1) NOT NULL,
  PRIMARY KEY (`tramail_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci COMMENT='Mail envoy�s en interne';


## ------- 01/07/2011 ---------

##
## Structure de la table `smi_ta`
##

INSERT INTO `smi_ta` VALUES(NULL, 'MODUR', 'MODIFICATION URGENCE', '../icones/glaze/queue.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODCM', 'MODIFICATION CODE MANUEL', '../icones/glaze/gettext.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODLI', 'MODIFICATION LIEU', '../icones/glaze/package_network.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODTR', 'MODIFICATION TECHNICIEN RESP.', '../icones/nuvola/kuser.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODCP', 'CLIENT PREVENU', '../icones/nuvola/edu_languages.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'INTCL', 'INTERVENTION CLOSE', '../icones/nuvola/lock.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODDE', 'MODIFICATION DEMANDEUR', '../icones/EmotiKons/phone.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODGA', 'MODIFICATION GARANTIE', '../icones/glaze/filenew.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODFG', 'MODIFICATION FACTURE GARANTIE', '../icones/glaze/binary.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODAC', 'MODIFICATION ACOMPTE','../icones/EmotiKons/money.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODFO', 'MODIFICATION FORFAIT','../icones/nuvola/ooo_calc.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODSI', 'MODIFICATION SITE INTERVENTION','../icones/nuvola/gohome.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'IMPPD', 'IMPRESSION PDF','../icones/nuvola/pdf.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'IMPMA', 'IMPRESSION & MAIL','../icones/nuvola/print_class.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODPR', 'MODIFICATION PROPRIETAIRE','../icones/glaze/lockoverlay.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODTY', 'MODIFICATION TYPE','../icones/aspneticons/sort_by_quantity_16x16.gif', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODAD', 'MODIFICATION ADRESSE POSTALE','../icones/aspneticons/mail1_16x16.gif', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODTE', 'MODIFICATION COORDONNEES TEL','../icones/EmotiKons/mobile_phone2.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODEM', 'MODIFICATION COORDONNEES EMAIL','../icones/EmotiKons/email.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODDV', 'MODIFICATION DEVIS','../icones/fugue/money-coin.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODCT', 'MODIFICATION CONTACT PRINCIPAL','../icones/fugue/users.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODDJ', 'MODIFICATION DONNEES JURIDIQUES','../icones/fugue/hammer.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODNA', 'MODIFICATION NOTES ADMINISTRATION','../icones/fugue/applications.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODNT', 'MODIFICATION NOTES TECHNICIENS','../icones/fugue/applications-blue.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODRC', 'MODIFICATION RISQUE COMPTABLE','../icones/fugue/chart--exclamation.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODPC', 'MODIFICATION MOYEN PREV. CLIENT','../icones/fugue/direction.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODMF', 'MODIFICATION MODE FACTURATION','../icones/fugue/bin.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODCC', 'MODIFICATION CODE COMPTABILITE','../icones/fugue/book-open.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODNO', 'MODIFICATION NOTES','../icones/fugue/sort--pencil.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODMC', 'MODIFICATION MODE ACTIF','../icones/fugue/start-half.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODFO', 'MODIFICATION FONCTION','../icones/fugue/user--arrow.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODCD', 'MODIFICATION CODE','../icones/fugue/wrench.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODTM', 'MODIFICATION TYPES MESSAGES','../icones/fugue/mail--exclamation.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODTD', 'MODIFICATION TEXTE DETAIL','../icones/fugue/sort-rating.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODHO', 'MODIFICATION HORAIRES','../icones/fugue/clock--arrow.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MODSW', 'MODIFICATION SITE WEB','../icones/fugue/globe-green.png', 0, 0, 1, 1, 0);



##
## Structure de la table `smi_cli`
##

ALTER TABLE `smi_cli` ADD `cli_ccpta` VARCHAR( 15 ) NULL AFTER `cli_notat` ;
ALTER TABLE `smi_cli` ADD INDEX ( `cli_ccpta` ) ;
ALTER TABLE `smi_cli` ADD `cli_ccptasp` VARCHAR( 15 ) NULL AFTER `cli_ccpta` ;
ALTER TABLE `smi_cli` ADD INDEX ( `cli_ccptasp` ) ;


##
## Structure de la table `smi_scli`
##

ALTER TABLE `smi_scli` ADD `scli_ccpta` VARCHAR( 15 ) NULL ;
ALTER TABLE `smi_scli` ADD INDEX ( `scli_ccpta` ) ;
ALTER TABLE `smi_scli` ADD `scli_code` VARCHAR( 20 ) NULL AFTER `scli_codecli` ;
ALTER TABLE `smi_scli` ADD INDEX ( `scli_code` ) ;

##
## Structure de la table `smi_stsp`
##


DROP TABLE IF EXISTS `smi_stsp`;
CREATE TABLE IF NOT EXISTS `smi_stsp` (
  `stsp_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `stsp_codest` varchar(10) NOT NULL,
  `stsp_codesp` varchar(5) NOT NULL,
  `stsp_niveau` tinyint(1) NOT NULL,
  PRIMARY KEY (`stsp_id`),
  KEY `stsp_codest` (`stsp_codest`),
  KEY `stsp_codesp` (`stsp_codesp`),
  KEY `stsp_niveau` (`stsp_niveau`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Sp�cialit�s par Technicien';

## ------- 11/10/2011 ---------

##
## Structure de la table `smi_rdv`
##

DROP TABLE IF EXISTS `smi_rdv`;
CREATE TABLE IF NOT EXISTS `smi_rdv` (
  `rdv_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rdv_datecrea` date NOT NULL DEFAULT '0000-00-00',
  `rdv_codecrea` varchar(20) NOT NULL,
  `rdv_datemod` date NOT NULL DEFAULT '0000-00-00',
  `rdv_codemod` varchar(20) NOT NULL,
  `rdv_typrat` smallint(2) NOT NULL DEFAULT '0',
  `rdv_coderat` varchar(20) NOT NULL,
  `rdv_date` date NOT NULL DEFAULT '0000-00-00',
  `rdv_codelieu` varchar(5) NOT NULL,
  `rdv_heure` time NOT NULL DEFAULT '00:00:00',
  `rdv_dureem` int(5) NOT NULL DEFAULT '0',
  `rdv_nivurg` tinyint(1) NOT NULL DEFAULT '0',
  `rdv_heurereel` time NOT NULL DEFAULT '00:00:00',
  `rdv_tpsreelm` int(5) NOT NULL DEFAULT '0',
  `rdv_honore` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`rdv_id`),
  KEY `rdv_date` (`rdv_date`),
  KEY `rdv_honore` (`rdv_honore`),
  KEY `rdv_typrat` (`rdv_typrat`),
  KEY `rdv_coderat` (`rdv_coderat`),
  KEY `rdv_heure` (`rdv_heure`),
  KEY `rdv_dureem` (`rdv_dureem`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Multi rendez-vous';


##
## Structure de la table `smi_pevt`
##

ALTER TABLE `smi_pevt` ADD `pevt_idrdv` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `pevt_coderat` ;
ALTER TABLE `smi_pevt` ADD INDEX ( `pevt_idrdv` );


##
## Structure de la table `smi_ta`
##

INSERT INTO `smi_ta` VALUES(NULL, 'SUPR', 'SUPPRESSION RDV', '../icones/glaze/editdelete.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'INTFP', 'INTERVENTION FIN PREVUE', '../icones/fugue/alarm-clock--exclamation.png', 0, 0, 1, 1, 0);


## ------- 06/11/2011 ---------

##
## Structure de la table `smi_ta`
##

INSERT INTO `smi_ta` VALUES(NULL, 'CREP', 'CREATION EVENEMENT PLANNING', '../icones/fugue/clock--plus.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'SUEP', 'SUPPRESSION EVENEMENT PLANNING', '../icones/fugue/clock--minus.png', 0, 0, 1, 1, 0);
INSERT INTO `smi_ta` VALUES(NULL, 'MOEP', 'MODIFICATION EVENEMENT PLANNING', '../icones/fugue/clock--pencil.png', 0, 0, 1, 1, 0);

## ------- 09/11/2011 ---------

##
## Structure de la table `smi_inth`
##

ALTER TABLE `smi_inth` ADD `inth_idrdv` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `inth_codeint` ;
ALTER TABLE `smi_inth`  ADD INDEX ( `inth_idrdv` ) ;


##
## Structure de la table `smi_rdv`
##

ALTER TABLE `smi_rdv` DROP `rdv_heurereel` ;
ALTER TABLE `smi_rdv` DROP `rdv_tpsreelm` ;

## ------- 25/11/2011 ---------

##
## Structure de la table `smi_dep`
##

INSERT INTO `smi_dep` VALUES (NULL, '980', 'MONACO', 'MC', 'FR');

##
## Structure de la table `smi_villes`
##

INSERT INTO `smi_villes` VALUES (NULL, '98000', 'MONACO', '980', 'MC', 'FR');


## ------- 18/12/2011 ---------

##
## Structure de la table `smi_sig`
##

CREATE TABLE IF NOT EXISTS `smi_sig` (
  `sig_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sig_typrat` tinyint(1) NOT NULL DEFAULT '1',
  `sig_coderat` varchar(20) NOT NULL,
  `sig_idhisto` int(10) unsigned NOT NULL,
  `sig_date` date NOT NULL DEFAULT '0000-00-00',
  `sig_heure` time NOT NULL DEFAULT '00:00:00',
  `sig_nom` varchar(50) NOT NULL,
  `sig_matricule` varchar(50) NOT NULL,
  `sig_signature` text NOT NULL,
  PRIMARY KEY (`sig_id`),
  KEY `sig_typrat` (`sig_typrat`),
  KEY `sig_coderat` (`sig_coderat`),
  KEY `sig_idhisto` (`sig_idhisto`),
  KEY `sig_heure` (`sig_heure`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Signatures';


ALTER TABLE `smi_droitsm` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
ALTER TABLE `smi_droitsmd` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
ALTER TABLE `smi_droitst` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
ALTER TABLE `smi_replcli` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
ALTER TABLE `smi_replclic` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
ALTER TABLE `smi_replm` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
ALTER TABLE `smi_tramail` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;

##
## Structure de la table `smi_ta`
##

INSERT INTO `smi_ta` VALUES (NULL , 'SIG', 'SIGNATURE', '../icones/glaze/txt.png', '0', '0', '1', '1', '0');

## ------- 24/12/2011 ---------

##
## Structure de la table `smi_inth`
##

ALTER TABLE `smi_inth` ADD `inth_fait` TEXT NULL DEFAULT NULL AFTER `inth_offert`;

## ------- 26/12/2011 ---------

##
## Structure de la table `smi_rpbm`
##

ALTER TABLE `smi_rpbm` CHANGE `rpbm_idsite` `rpbm_idsite` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `smi_rpbm` ADD `rpbm_idinth` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `rpbm_codeint` ;
ALTER TABLE `smi_rpbm` ADD INDEX ( `rpbm_idinth` ) ;

#
# Mises � niveau version 0.9.9y
#

## ------- 14/01/2012 ---------

##
## Structure de la table `smi_cocla`
##

DROP TABLE IF EXISTS `smi_cocla`;
CREATE TABLE IF NOT EXISTS `smi_cocla` (
  `cocla_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cocla_datecrea` date NOT NULL DEFAULT '0000-00-00',
  `cocla_codecrea` varchar(20) NOT NULL DEFAULT '',
  `cocla_datemod` date NOT NULL DEFAULT '0000-00-00',
  `cocla_codemod` varchar(20) NOT NULL DEFAULT '',
  `cocla_dateenv` date NOT NULL DEFAULT '0000-00-00',
  `cocla_datesig` date NOT NULL DEFAULT '0000-00-00',
  `cocla_daterec` date NOT NULL DEFAULT '0000-00-00',
  `cocla_daterel` date NOT NULL DEFAULT '0000-00-00',
  `cocla_nivrel` tinyint(1) NOT NULL DEFAULT '0',
  `cocla_codecocl` varchar(20) NOT NULL,
  `cocla_code` varchar(20) NOT NULL DEFAULT '',
  `cocla_signe` varchar(70) DEFAULT NULL,
  `cocla_sitep` tinyint(1) NOT NULL DEFAULT '0',
  `cocla_matos` text NOT NULL,
  `cocla_pvht` float(10,2) unsigned NOT NULL DEFAULT '0.00',
  `cocla_coderlp` text,
  PRIMARY KEY (`cocla_id`),
  KEY `cocla_code` (`cocla_code`),
  KEY `cocla_codecocl` (`cocla_codecocl`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Contrats : Annexes' ;

##
## Structure de la table `smi_sclia`
##

DROP TABLE IF EXISTS `smi_sclia`;
CREATE TABLE IF NOT EXISTS `smi_sclia` (
  `sclia_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sclia_datecrea` date NOT NULL DEFAULT '0000-00-00',
  `sclia_datemod` date NOT NULL DEFAULT '0000-00-00',
  `sclia_idscli` int(10) unsigned NOT NULL DEFAULT '0',
  `sclia_idcocla` int(10) unsigned NOT NULL DEFAULT '0',
  `sclia_codecocl` varchar(20) NOT NULL DEFAULT '',
  PRIMARY KEY (`sclia_id`),
  KEY `sclia_idscli` (`sclia_idscli`),
  KEY `sclia_idcocla` (`sclia_idcocla`),
  KEY `sclia_codecocl` (`sclia_codecocl`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Sites clients sur annexe contrats';


## ------- 18/01/2012 ---------

##
## Donn�es de la table `smi_ta`
##

UPDATE `smi_ta` SET `ta_img` = '../icones/fugue/star-half.png' WHERE `ta_code` ='MODMC';

## ------- 21/02/2012 ---------

##
## Structure de la table `smi_pdtih`
##

DROP TABLE IF EXISTS `smi_pdtih`;
CREATE TABLE IF NOT EXISTS `smi_pdtih` (
  `pdtih_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pdtih_codeint` varchar(20) NOT NULL DEFAULT '',
  `pdtih_idhisto` int(10) unsigned NOT NULL,
  `pdtih_codepdt` varchar(20) NOT NULL DEFAULT '',
  `pdtih_frompdt` varchar(20) DEFAULT NULL,
  `pdtih_puttc` float(10,2) unsigned NOT NULL DEFAULT '0.00',
  `pdtih_codetva` varchar(10) NOT NULL DEFAULT 'TVA196',
  `pdtih_qte` float(10,2) NOT NULL DEFAULT '0.00',
  `pdtih_ns` varchar(100) NOT NULL DEFAULT '',
  `pdtih_texte` text NOT NULL,
  `pdtih_facture` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`pdtih_id`),
  KEY `pdtih_codepdt` (`pdtih_codepdt`),
  KEY `pdtih_codeint` (`pdtih_codeint`),
  KEY `pdtih_frompdt` (`pdtih_frompdt`),
  KEY `pdtih_codetva` (`pdtih_codetva`),
  KEY `pdtih_idhisto` (`pdtih_idhisto`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Produits sur historiques interventions';

## ------- 29/02/2012 ---------

##
## Structure de la table `smi_tpfih`
##

DROP TABLE IF EXISTS `smi_tpfih`;
CREATE TABLE IF NOT EXISTS `smi_tpfih` (
  `tpfih_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `tpfih_codeint` varchar(20) NOT NULL,
  `tpfih_idhisto` int(10) unsigned NOT NULL,
  `tpfih_codetpf` varchar(10) NOT NULL,
  `tpfih_valeur` float(10,2) unsigned NOT NULL DEFAULT '0.00',
  `tpfih_codetva` varchar(10) NOT NULL DEFAULT 'TVA196',
  `tpfih_qte` float(10,2) NOT NULL DEFAULT '0.00',
  `tpfih_texte` text NOT NULL,
  PRIMARY KEY (`tpfih_id`),
  KEY `tpfih_codeint` (`tpfih_codeint`),
  KEY `tpfih_codetpf` (`tpfih_codetpf`),
  KEY `tpfih_codetva` (`tpfih_codetva`),
  KEY `tpfih_idhisto` (`tpfih_idhisto`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 PACK_KEYS=0 COMMENT='Taxes parafiscales sur historiques interventions';

## ------- 14/03/2012 ---------

##
## Structure de la table `smi_clc`
##

DROP TABLE IF EXISTS `smi_clc`;
CREATE TABLE IF NOT EXISTS `smi_clc` (
  `clc_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `clc_code` varchar(5) NOT NULL,
  `clc_desc` varchar(50) NOT NULL,
  `clc_so` tinyint(1) NOT NULL DEFAULT '0',
  `clc_oui` tinyint(1) NOT NULL DEFAULT '0',
  `clc_non` tinyint(1) NOT NULL DEFAULT '0',
  `clc_actif` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`clc_id`),
  KEY `clc_code` (`clc_code`),
  KEY `clc_actif` (`clc_actif`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Check-lists : champs';



## ------- 02/04/2012 ---------

##
## Structure de la table `smi_age`
##

ALTER TABLE `smi_age` ADD `age_ccpta` VARCHAR( 15 ) NULL ;
ALTER TABLE `smi_age` ADD INDEX ( `age_ccpta` ) ;


##
## Structure de la table `smi_intc`
##

ALTER TABLE `smi_intc` ADD `intc_ccpta` VARCHAR( 15 ) NULL AFTER `intc_desc` ;
ALTER TABLE `smi_intc` ADD INDEX ( `intc_ccpta` ) ;

## ------- 31/05/2012 ---------

ALTER TABLE `smi_cons` ADD `cons_nivtra` TINYINT( 1 ) NOT NULL DEFAULT '0';


## ------- 05/07/2012 ---------

##
## Structure de la table `smi_clcg`
##

DROP TABLE IF EXISTS `smi_clcg`;
CREATE TABLE IF NOT EXISTS `smi_clcg` (
  `clcg_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `clcg_code` varchar(5) NOT NULL,
  `clcg_desc` varchar(50) NOT NULL,
  `clcg_actif` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`clcg_id`),
  KEY `clc_code` (`clcg_code`),
  KEY `clc_actif` (`clcg_actif`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Check-lists : groupements champs';

##
## Structure de la table `smi_clcclcg`
##

DROP TABLE IF EXISTS `smi_clcclcg`;
CREATE TABLE IF NOT EXISTS `smi_clcclcg` (
  `clcclcg_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `clcclcg_codeclc` varchar(5) NOT NULL,
  `clcclcg_codeclcg` varchar(5) NOT NULL,
  PRIMARY KEY (`clcclcg_id`),
  KEY `clcclcg_codeclc` (`clcclcg_codeclc`),
  KEY `clcclcg_codeclcg` (`clcclcg_codeclcg`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Check-lists : groupements Champs-Cat�gories Interventions';

##
## Structure de la table `smi_clcgintc`
##

DROP TABLE IF EXISTS `smi_clcgintc`;
CREATE TABLE IF NOT EXISTS `smi_clcgintc` (
  `clcgintc_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `clcgintc_codeclcg` varchar(5) NOT NULL,
  `clcgintc_codeintc` varchar(5) NOT NULL,
  PRIMARY KEY (`clcgintc_id`),
  KEY `clcgintc_codeintc` (`clcgintc_codeintc`),
  KEY `clcgintc_codeclcg` (`clcgintc_codeclcg`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Check-lists : Groupements-Cat�gories Interventions' ;


##
## Structure de la table `smi_clcginth`
##

DROP TABLE IF EXISTS `smi_clcginth`;
CREATE TABLE IF NOT EXISTS `smi_clcginth` (
  `clcginth_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `clcginth_codeclcg` varchar(5) NOT NULL,
  `clcginth_codeclc` varchar(5) NOT NULL,
  `clcginth_idinth` int(10) unsigned NOT NULL,
  `clcginth_choix` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`clcginth_id`),
  KEY `clcginth_codeclcg` (`clcginth_codeclcg`),
  KEY `clcginth_idinth` (`clcginth_idinth`),
  KEY `clcginth_codeclc` (`clcginth_codeclc`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Check-lists : groupements sur d�tails horaires interventions';


#
# Mises à niveau version 1.0.0
#

## ------- 01/05/2013 ---------

##
## Structure de la table `smi_mquet`
##

DROP TABLE IF EXISTS `smi_mquet`;
CREATE TABLE IF NOT EXISTS `smi_mquet` (
  `mquet_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `mquet_code` varchar(5) NOT NULL,
  `mquet_desc` varchar(50) NOT NULL,
  `mquet_rpdt` tinyint(1) NOT NULL DEFAULT '0',
  `mquet_rlic` tinyint(1) NOT NULL DEFAULT '0',
  `mquet_assu` tinyint(1) NOT NULL DEFAULT '0',
  `mquet_dist` tinyint(1) NOT NULL DEFAULT '0',
  `mquet_oc` tinyint(1) NOT NULL DEFAULT '0',
  `mquet_delok` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`mquet_id`),
  KEY `mquet_code` (`mquet_code`),
  KEY `mquet_desc` (`mquet_desc`),
  KEY `mquet_rpdt` (`mquet_rpdt`),
  KEY `mquet_rlic` (`mquet_rlic`),
  KEY `mquet_assu` (`mquet_assu`),
  KEY `mquet_dist` (`mquet_dist`),
  KEY `mquet_oc` (`mquet_oc`),
  KEY `mquet_delok` (`mquet_delok`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Marques - Types';


##
## Contenu de la table `smi_mquet`
##

INSERT INTO `smi_mquet` VALUES(1, '1', 'FABRICANT', 1, 0, 0, 0, 0, 0);
INSERT INTO `smi_mquet` VALUES(2, '2', 'EDITEUR', 0, 1, 0, 0, 0, 0);
INSERT INTO `smi_mquet` VALUES(3, '3', 'DISTRIBUTEUR', 0, 0, 0, 1, 0, 0);
INSERT INTO `smi_mquet` VALUES(4, '4', 'ORGANISME COLLECTEUR', 0, 0, 0, 0, 1, 0);
INSERT INTO `smi_mquet` VALUES(5, '5', 'ASSUREUR', 0, 0, 1, 0, 0, 0);


##
## Structure de la table `smi_mque`
##

ALTER TABLE `smi_mque` CHANGE `mque_type` `mque_codemquet` VARCHAR( 5 ) NOT NULL ;
ALTER TABLE `smi_mque` ADD INDEX ( `mque_codemquet` ) ;

##
## Structure de la table `smi_cons`
##

ALTER TABLE `smi_cons` ADD `cons_rrpat` VARCHAR( 10 ) NOT NULL DEFAULT 'P13' AFTER `cons_nrel` ;
ALTER TABLE `smi_cons` ADD `cons_nrpat` INT( 10 ) NOT NULL DEFAULT '0' AFTER `cons_rrpat` ;


##
## Structure de la table `smi_pw`
##

ALTER TABLE `smi_pw` ADD `pw_pays` CHAR( 3 ) NOT NULL DEFAULT 'FR' AFTER `pw_lng` ;

##
## Structure de la table `smi_pays`
##

ALTER TABLE `smi_pays` ADD `pays_nbdec` TINYINT( 2 ) NOT NULL DEFAULT '2' AFTER `pays_codeadev` ;
ALTER TABLE `smi_pays` ADD `pays_cardec` VARCHAR( 1 ) NOT NULL DEFAULT ',' AFTER `pays_nbdec` ;
ALTER TABLE `smi_pays` ADD `pays_carsep` VARCHAR( 1 ) NOT NULL DEFAULT ' ' AFTER `pays_cardec` ;
ALTER TABLE `smi_pays` ADD `pays_datefmt` VARCHAR( 10 ) NOT NULL DEFAULT 'd-m-Y' AFTER `pays_carsep` ;
ALTER TABLE `smi_pays` ADD `pays_datefmtshort` VARCHAR( 10 ) NOT NULL DEFAULT 'dd-mm-yy' AFTER `pays_datefmt` ;
ALTER TABLE `smi_pays` ADD `pays_datefmtfull` VARCHAR( 10 ) NOT NULL DEFAULT 'dd-mm-yyyy' AFTER `pays_datefmtshort` ;
ALTER TABLE `smi_pays` ADD `pays_datefmtmask` VARCHAR( 10 ) NOT NULL DEFAULT '%d-%m-%Y' AFTER `pays_datefmtfull` ;
ALTER TABLE `smi_pays` ADD `pays_devpos` CHAR( 1 ) NOT NULL DEFAULT 'R' AFTER `pays_datefmtmask` ;


## ------- 08/01/2014 ---------


##
## Structure de la table `smi_rassur`
##

DROP TABLE IF EXISTS `smi_rassur`;
CREATE TABLE IF NOT EXISTS `smi_rassur` (
  `rassur_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rassur_idrobj` int(10) unsigned NOT NULL,
  `rassur_codemque` varchar(20) NOT NULL,
  `rassur_numco` varchar(50) DEFAULT NULL,
  `rassur_cotis` float(10,2) NOT NULL DEFAULT '0.00',
  `rassur_va` float(10,2) NOT NULL DEFAULT '0.00',
  `rassur_dateech` date NOT NULL DEFAULT '0000-00-00',
  PRIMARY KEY (`rassur_id`),
  KEY `rassur_idrobj` (`rassur_idrobj`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Relevés - Assurances' ;


##
## Structure de la table `smi_rimmob`
##

DROP TABLE IF EXISTS `smi_rimmob`;
CREATE TABLE IF NOT EXISTS `smi_rimmob` (
  `rimmob_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rimmob_idrobj` int(10) NOT NULL,
  `rimmob_adr1` varchar(50) NOT NULL,
  `rimmob_adr2` varchar(50) DEFAULT NULL,
  `rimmob_dep` varchar(30) NOT NULL,
  `rimmob_ville` int(10) unsigned NOT NULL,
  `rimmob_codepays` varchar(3) NOT NULL DEFAULT '',
  `rimmob_bat` varchar(20) DEFAULT NULL,
  `rimmob_ent` varchar(5) DEFAULT NULL,
  `rimmob_esc` varchar(5) DEFAULT NULL,
  `rimmob_et` tinyint(3) NOT NULL DEFAULT '0',
  `rimmob_surf` float(10,2) NOT NULL DEFAULT '0.00',
  PRIMARY KEY (`rimmob_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Relevés - Objets immobiles' ;


##
## Structure de la table `smi_rmob`
##

DROP TABLE IF EXISTS `smi_rmob`;
CREATE TABLE IF NOT EXISTS `smi_rmob` (
  `rmob_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rmob_idrobj` int(10) NOT NULL,
  `rmob_immat` varchar(20) NOT NULL,
  `rmob_cg` varchar(20) DEFAULT NULL,
  `rmob_km` float(10,2) unsigned NOT NULL,
  PRIMARY KEY (`rmob_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Relevés - Objets mobiles' ;


##
## Structure de la table `smi_rnomenc`
##

DROP TABLE IF EXISTS `smi_rnomenc`;
CREATE TABLE IF NOT EXISTS `smi_rnomenc` (
  `rnomenc_id` int(10) unsigned NOT NULL,
  `rnomenc_idrobj_parent` int(10) unsigned NOT NULL,
  `rnomenc_idrobj_enfant` int(10) unsigned NOT NULL,
  `rnomenc_coeff` float(10,2) NOT NULL DEFAULT '1.00',
  PRIMARY KEY (`rnomenc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='Relevé - Nomenclatures';


##
## Structure de la table `smi_robj`
##

DROP TABLE IF EXISTS `smi_robj`;
CREATE TABLE IF NOT EXISTS `smi_robj` (
  `robj_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `robj_codecrea` varchar(20) NOT NULL,
  `robj_datecrea` date NOT NULL DEFAULT '0000-00-00',
  `robj_codemod` varchar(20) NOT NULL,
  `robj_datemod` date NOT NULL DEFAULT '0000-00-00',
  `robj_code` varchar(20) NOT NULL,
  `robj_desc` varchar(50) NOT NULL,
  `robj_codemque` varchar(20) DEFAULT NULL,
  `robj_ns` varchar(50) DEFAULT NULL,
  `robj_actif` tinyint(1) NOT NULL DEFAULT '1',
  `robj_coderto` varchar(20) NOT NULL,
  `robj_coderpet` varchar(10) NOT NULL,
  `robj_numinv` varchar(20) NOT NULL,
  `robj_dateach` date NOT NULL DEFAULT '0000-00-00',
  `robj_coderta` varchar(20) NOT NULL,
  `robj_datefab` date NOT NULL DEFAULT '0000-00-00',
  `robj_codegest` varchar(20) NOT NULL,
  `robj_codeprop` varchar(20) NOT NULL,
  `robj_pa` float(10,2) NOT NULL DEFAULT '0.00',
  `robj_vr` float(10,2) NOT NULL DEFAULT '0.00',
  `robj_notes` text,
  `robj_datesortie` date NOT NULL DEFAULT '0000-00-00',
  `robj_detailsortie` text,
  PRIMARY KEY (`robj_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Relevés - Objets' ;


##
## Structure de la table `smi_rpat`
##

DROP TABLE IF EXISTS `smi_rpat`;
CREATE TABLE IF NOT EXISTS `smi_rpat` (
  `rpat_id` int(10) NOT NULL AUTO_INCREMENT,
  `rpat_datecrea` date NOT NULL DEFAULT '0000-00-00',
  `rpat_codecrea` varchar(20) NOT NULL,
  `rpat_datemod` date NOT NULL DEFAULT '0000-00-00',
  `rpat_codemod` varchar(20) NOT NULL,
  `rpat_code` varchar(20) NOT NULL,
  `rpat_codecli` varchar(20) NOT NULL,
  `rpat_codeage` varchar(10) NOT NULL,
  `rpat_nota` text,
  PRIMARY KEY (`rpat_id`),
  KEY `rpat_codecli` (`rpat_codecli`),
  KEY `rpat_codeage` (`rpat_codeage`),
  KEY `rpat_code` (`rpat_code`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Relevés - Patrimoines'  ;


##
## Structure de la table `smi_rta`
##


DROP TABLE IF EXISTS `smi_rta`;
CREATE TABLE IF NOT EXISTS `smi_rta` (
  `rta_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rta_codecrea` varchar(20) NOT NULL,
  `rta_datecrea` date NOT NULL DEFAULT '0000-00-00',
  `rta_codemod` varchar(20) NOT NULL,
  `rta_datemod` date NOT NULL DEFAULT '0000-00-00',
  `rta_code` varchar(20) NOT NULL,
  `rta_desc` varchar(50) NOT NULL,
  PRIMARY KEY (`rta_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Relevés - Types Acquisitions' ;


##
## Structure de la table `smi_rto`
##

DROP TABLE IF EXISTS `smi_rto`;
CREATE TABLE IF NOT EXISTS `smi_rto` (
  `rto_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rto_codecrea` varchar(20) NOT NULL,
  `rto_datecrea` date NOT NULL DEFAULT '0000-00-00',
  `rto_codemod` varchar(20) NOT NULL,
  `rto_datemod` date NOT NULL DEFAULT '0000-00-00',
  `rto_code` varchar(20) NOT NULL,
  `rto_desc` varchar(50) NOT NULL,
  `rto_actif` tinyint(1) NOT NULL DEFAULT '0',
  `rto_cont` tinyint(1) NOT NULL DEFAULT '0',
  `rto_comp` tinyint(1) NOT NULL DEFAULT '0',
  `rto_mque` tinyint(1) DEFAULT '0',
  `rto_ns` tinyint(1) NOT NULL DEFAULT '0',
  `rto_mob` tinyint(1) NOT NULL DEFAULT '0',
  `rto_assu` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`rto_id`),
  KEY `rto_code` (`rto_code`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 COMMENT='Relevés - Types Objets' ;


## ------- 09/04/2014 ---------

##
## Structure de la table `smi_dos`
##

ALTER TABLE `smi_dos` CHANGE `dos_codesuiv` `dos_codesuiv` VARCHAR( 20 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '-1';


##
## Structure de la table `smi_droitst`
##

UPDATE `smi_droitst` SET `droitst_nomfic` = 'tec_stat.php', `droitst_td` = 'tecd' WHERE `droitst_nomfic` = 'tecd_stat.php';
UPDATE `smi_droitst` SET `droitst_nomfic` = 'tec_stat.php', `droitst_td` = 'tecs' WHERE `droitst_nomfic` = 'tecs_stat.php';


## ------- 19/05/2014 ---------

##
## Structure de la table `smi_int`
##

ALTER TABLE `smi_int` CHANGE `int_codeadev` `int_codeadev` VARCHAR(3) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;

## ------- 06/06/2014 ---------

##
## Structure de la table `smi_intf`
##

ALTER TABLE `smi_intf` ADD `intf_mt` FLOAT( 10, 2 ) NOT NULL DEFAULT '0.00' AFTER `intf_numf` ;


## ------- 25/08/2014 ---------

ALTER TABLE `smi_int` CHANGE `int_codeadev` `int_codeadev` VARCHAR( 3 ) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT '';