ALTER TABLE `#__seminarman_courses` CHANGE `pdf_template` `invoice_template` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `#__seminarman_templates` CHANGE `pdf_template` `invoice_template` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE `#__seminarman_courses` ADD `attlst_template` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `invoice_template`;
ALTER TABLE `#__seminarman_templates` ADD `attlst_template` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `invoice_template`;
ALTER TABLE `#__seminarman_pdftemplate` ADD `margin_bottom` double NOT NULL DEFAULT '0' AFTER `margin_top`;
ALTER TABLE `#__seminarman_pdftemplate` ADD `orientation` VARCHAR( 1 ) NOT NULL DEFAULT 'P';

UPDATE `#__seminarman_pdftemplate` SET `isdefault`=1 WHERE `templatefor`=1 LIMIT 1;

INSERT IGNORE INTO `#__seminarman_pdftemplate` (`templatefor`, `name`, `html`, `srcpdf`, `isdefault`, `margin_left`, `margin_right`, `margin_top`, `margin_bottom`, `paperformat`, `orientation`) VALUES
(1, 'Teilnehmerliste 1', '<p><span style="font-size: x-large;"><strong>Teilnehmerliste</strong></span></p>\r\n<p><span><strong><br /></strong></span></p>\r\n<table style="width: 100%;" border="0" align="left">\r\n<tbody>\r\n<tr>\r\n<td style="width: 20%; text-align: left;"><span style="color: #000080;"><strong>Seminar:</strong></span></td>\r\n<td>{COURSE_TITLE}</td>\r\n</tr>\r\n<tr>\r\n<td><span style="color: #000080;"><strong>Seminar-Nr.:</strong></span></td>\r\n<td>{COURSE_CODE}</td>\r\n</tr>\r\n<tr>\r\n<td><span style="color: #000080;"><strong>Beginn / Ende:</strong></span></td>\r\n<td>{COURSE_START_DATE} - {COURSE_FINISH_DATE}</td>\r\n</tr>\r\n<tr>\r\n<td><span style="color: #000080;"><strong>Ort:</strong></span></td>\r\n<td>{COURSE_LOCATION}</td>\r\n</tr>\r\n<tr>\r\n<td><span style="color: #000080;"><strong>Dozent/in:</strong></span></td>\r\n<td>{TUTOR}</td>\r\n</tr>\r\n<tr>\r\n<td><span style="color: #000080;"><strong>Stand:</strong></span></td>\r\n<td>{CURRENT_DATE}</td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p> </p>\r\n<table style="width: 100%;" border="1" align="center">\r\n<tbody>\r\n<tr>\r\n<td style="width: 20%;"><span style="color: #000080;"><strong>Name</strong></span></td>\r\n<td style="width: 20%;"><span style="color: #000080;"><strong>Vorname</strong></span></td>\r\n<td style="width: 20%;"><span style="color: #000080;"><strong>E-Mail</strong></span></td>\r\n<td style="width: 40%;"><span style="color: #000080;"><strong>Unterschrift</strong></span></td>\r\n</tr>\r\n<tr class="{LOOP}">\r\n<td style="height: .6cm;">{LASTNAME}</td>\r\n<td>{FIRSTNAME}</td>\r\n<td>{EMAIL}</td>\r\n<td> </td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n<p> <br /><br /></p>', '', 1, 20, 20, 20, 20, 'A4', 'L');
