Sie wurden zu einer Terminumfrage zum Thema "'.$db->convert_html_chars($coodle->titel).'" eingeladen.
- Bitte folgen Sie dem Link um Ihre Terminwünsche bekannt zu geben:
+ Bitte folgen Sie dem Link, um Ihre Terminwünsche bekannt zu geben:
Link zur Terminumfrage
-
'.nl2br($sign);
+
+ Beschreibung:
+ '.$coodle->beschreibung.'
+ '.nl2br($sign);
$text=$anrede."!\n\nSie wurden zu einer Terminumfrage zum Thema \"".$db->convert_html_chars($coodle->titel)."\" eingeladen.\n
- Bitte folgen Sie dem Link um Ihre Terminwünsche bekannt zu geben:\n
- $link\n\n$sign";
+ Bitte folgen Sie dem Link, um Ihre Terminwünsche bekannt zu geben:\n
+ $link\n\n
+ Beschreibung:\n\n
+ ".strip_tags($coodle->beschreibung)."
+ \n\n
+ $sign";
- $mail = new mail($email, $von,'Termineinladung - '.$coodle->titel, $text);
+ $mail = new mail($email, $von,'Terminumfrage - '.$coodle->titel, $text);
$mail->setHTMLContent($html);
if($mail->send())
{
@@ -199,9 +206,11 @@ echo '
}
#external-events h4 {
- font-size: 16px;
+ font-size: 17px;
margin-top: 0;
- padding-top: 1em;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ text-decoration: none;
}
.external-event { /* try to mimick the look of a real event */
@@ -211,6 +220,8 @@ echo '
color: #fff;
font-size: .85em;
cursor: pointer;
+ border-radius: 2px;
+ box-shadow: 3px 3px 3px #bbb;
}
#external-events p {
@@ -239,9 +250,11 @@ echo '
}
#ressourcen h4 {
- font-size: 16px;
+ font-size: 17px;
margin-top: 0;
- padding-top: 1em;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ text-decoration: none;
}
.ressourcen {
@@ -285,9 +298,11 @@ echo '
#fertig h4
{
- font-size: 16px;
+ font-size: 17px;
margin-top: 0;
- padding-top: 1em;
+ padding-top: 10px;
+ padding-bottom: 10px;
+ text-decoration: none;
}
#fertig p
@@ -296,7 +311,7 @@ echo '
font-size: 11px;
color: #666;
}
-
+
-
-
';
echo' '.$p->t('coodle/uebersicht').'
-
- ';
+
+ ';
$method = isset($_GET['method'])?$_GET['method']:'';
// coodle umfrage löschen
if($method=='delete')
{
- $coodle= new coodle();
- $coodle_id = isset($_GET['coodle_id'])?$_GET['coodle_id']:'';
-
- if($coodle->load($coodle_id))
+ $coodle= new coodle();
+ $coodle_id = isset($_GET['coodle_id'])?$_GET['coodle_id']:'';
+
+ if($coodle->load($coodle_id))
{
- // löschen nur von eigenen Umfragen möglich
+ // löschen nur von eigenen Umfragen möglich
if($coodle->ersteller_uid!=$uid)
$message = ''.$p->t('global/keineBerechtigung').'';
- else
- {
- if($coodle->delete($coodle_id))
- $message ='Erfolgreich storniert!';
- else
- $message =''.$p->t('coodle/umfrageKonnteNichtGeloeschtWerden').'';
- }
+ else
+ {
+ if($coodle->delete($coodle_id))
+ $message ='Erfolgreich storniert!';
+ else
+ $message =''.$p->t('coodle/umfrageKonnteNichtGeloeschtWerden').'';
+ }
}
- else
- $message = ''.$p->t('coodle/umfrageNichtGeladen').'';
+ else
+ $message = ''.$p->t('coodle/umfrageNichtGeladen').'';
}
-echo'
'.$p->t('coodle/uebersicht').'
- ';
+echo'
'.$p->t('coodle/uebersicht').'
';
+
+echo $p->t('coodle/einfuehrungstext').'
';
if(check_lektor($uid))
{
echo '
-
+
';
}
echo '
-
'.$message.'
-
-
-
'.$p->t('coodle/laufendeUmfragen').'
-
-
-
-
'.$p->t('coodle/titel').'
-
'.$p->t('coodle/letzterStatus').'
-
'.$p->t('coodle/ersteller').'
-
'.$p->t('coodle/endedatum').'
-
'.$p->t('coodle/aktion').'
-
- ';
+
'.$message.'
+
+
+
'.$p->t('coodle/laufendeUmfragen').'
+
+
+
+
'.$p->t('coodle/titel').'
+
'.$p->t('coodle/letzterStatus').'
+
'.$p->t('coodle/ersteller').'
+
'.$p->t('coodle/endedatum').'
+
'.$p->t('coodle/aktion').'
+
+ ';
$beendeteUmfragen='';
$datum = new datum();
@@ -144,50 +151,52 @@ foreach($coodle->result as $c)
$benutzer = new benutzer();
$benutzer->load($c->ersteller_uid);
$ersteller = $benutzer->nachname.' '.$benutzer->vorname;
- $row = '
- Die Terminumfrage zum Thema "'.$coodle_ressource->convert_html_chars($coodle->titel).'" ist beendet.
-
- Der Termin wurde auf den '.$datum->formatDatum($coodle_help->datum, 'd.m.Y').' '.$coodle_help->uhrzeit.' festgelegt.
-
+ Die Terminumfrage zum Thema "'.$coodle_ressource->convert_html_chars($coodle->titel).'" ist beendet.
+
+ Der Termin wurde auf den '.$datum->formatDatum($coodle_help->datum, 'd.m.Y').' '.$coodle_help->uhrzeit.' festgelegt.
+
'.nl2br($sign);
+
+ $text=$anrede."!\n\nDie Terminumfrage zum Thema \"".$coodle_help->convert_html_chars($coodle->titel).'"\" ist beendet.\n
+ Der Termin wurde auf den '.$datum->formatDatum($coodle_help->datum, 'd.m.Y').' '.$coodle_help->uhrzeit." festgelegt\n.
+ \n\n$sign";
+
+ $mail = new mail($email, 'no-reply@'.DOMAIN,'Terminbestätigung - '.$coodle->titel, $text);
+ $mail->setHTMLContent($html);
+ //ICal Termineinladung hinzufuegen
+ $mail->addAttachmentPlain($ical, 'text/calendar', 'meeting.ics');
+ if($mail->send())
+ {
+ $mailMessage.= $p->t('coodle/mailVersandtAn',array($email))." ";
+ }
+ }
+ }
+ else
+ {
+ die($p->t('coodle/keineRessourcenVorhanden'));
+ }
}
/**
diff --git a/content/statistik/mitarbeiterexport.xls.php b/content/statistik/mitarbeiterexport.xls.php
index 8ad9b8c5c..31463b29c 100644
--- a/content/statistik/mitarbeiterexport.xls.php
+++ b/content/statistik/mitarbeiterexport.xls.php
@@ -93,7 +93,7 @@ $mitarbeiterDAO->getPersonal($fix, $stgl, $fbl, $aktiv, $karenziert, $ausgeschie
//sondern richtig mitsortiert
$vorname=array();
$nachname=array();
-
+
$umlaute = array('ö','Ö','ü','Ü','ä','Ä');
$umlauterep = array('o','O','u','U','a','A');
foreach ($mitarbeiterDAO->result as $key=>$foo)
@@ -102,7 +102,7 @@ foreach ($mitarbeiterDAO->result as $key=>$foo)
$nachname[$key]=str_replace($umlaute, $umlauterep, $foo->nachname);
}
array_multisort($nachname, SORT_ASC, $vorname, SORT_ASC, $mitarbeiterDAO->result);
-
+
// Creating a workbook
$workbook = new Spreadsheet_Excel_Writer();
$workbook->setVersion(8);
@@ -112,7 +112,7 @@ array_multisort($nachname, SORT_ASC, $vorname, SORT_ASC, $mitarbeiterDAO->result
// Creating a worksheet
$worksheet =& $workbook->addWorksheet("Mitarbeiter");
$worksheet->setInputEncoding('utf-8');
-
+
$format_bold =& $workbook->addFormat();
$format_bold->setBold();
@@ -145,20 +145,20 @@ array_multisort($nachname, SORT_ASC, $vorname, SORT_ASC, $mitarbeiterDAO->result
//Spalten ausgeben
for ($i=0;$i<$anzSpalten;$i++)
{
- if(is_bool($mitarbeiter->$spalte[$i]))
- $mitarbeiter->$spalte[$i] = ($mitarbeiter->$spalte[$i]?'Ja':'Nein');
-
- if(mb_strlen($mitarbeiter->$spalte[$i])>$maxlength[$i])
- $maxlength[$i] = mb_strlen($mitarbeiter->$spalte[$i]);
- $worksheet->write($j,$i, $mitarbeiter->$spalte[$i]);
+ if(is_bool($mitarbeiter->{$spalte[$i]}))
+ $mitarbeiter->{$spalte[$i]} = ($mitarbeiter->{$spalte[$i]}?'Ja':'Nein');
+
+ if(mb_strlen($mitarbeiter->{$spalte[$i]})>$maxlength[$i])
+ $maxlength[$i] = mb_strlen($mitarbeiter->{$spalte[$i]});
+ $worksheet->write($j,$i, $mitarbeiter->{$spalte[$i]});
}
-
+
//Zustelladresse aus der Datenbank holen und dazuhaengen
$qry = "SELECT * FROM public.tbl_adresse WHERE person_id='$mitarbeiter->person_id' AND zustelladresse=true LIMIT 1";
if($result = $db->db_query($qry))
{
if($row = $db->db_fetch_object($result))
- {
+ {
if(mb_strlen($row->strasse)>$maxlength[$i])
$maxlength[$i]=mb_strlen($row->strasse);
$worksheet->write($j,$i, $row->strasse);
@@ -168,7 +168,7 @@ array_multisort($nachname, SORT_ASC, $vorname, SORT_ASC, $mitarbeiterDAO->result
if(mb_strlen($row->ort)>$maxlength[$i+2])
$maxlength[$i+2]=mb_strlen($row->ort);
$worksheet->write($j,$i+2, $row->ort);
-
+
if($row->firma_id!='')
{
$qry = "SELECT * FROM public.tbl_firma WHERE firma_id='$row->firma_id'";
@@ -184,7 +184,7 @@ array_multisort($nachname, SORT_ASC, $vorname, SORT_ASC, $mitarbeiterDAO->result
}
}
}
-
+
$j++;
}
diff --git a/include/Excel/BIFFwriter.php b/include/Excel/BIFFwriter.php
index c8fbb1bd1..f6b659fa1 100644
--- a/include/Excel/BIFFwriter.php
+++ b/include/Excel/BIFFwriter.php
@@ -88,7 +88,7 @@ class Spreadsheet_Excel_Writer_BIFFwriter extends PEAR
*
* @access public
*/
- function Spreadsheet_Excel_Writer_BIFFwriter()
+ function __construct()
{
$this->_byte_order = '';
$this->_data = '';
diff --git a/include/Excel/File.php b/include/Excel/File.php
index ec2c8376e..090ebe6c5 100644
--- a/include/Excel/File.php
+++ b/include/Excel/File.php
@@ -43,10 +43,10 @@ class OLE_PPS_File extends OLE_PPS
* @param string $name The name of the file (in Unicode)
* @see OLE::Asc2Ucs()
*/
- function OLE_PPS_File($name)
+ function __construct($name)
{
$this->_tmp_dir = '';
- $this->OLE_PPS(
+ parent::__construct(
null,
$name,
OLE_PPS_TYPE_FILE,
diff --git a/include/Excel/Format.php b/include/Excel/Format.php
index 829c3e353..074ec6cec 100644
--- a/include/Excel/Format.php
+++ b/include/Excel/Format.php
@@ -248,7 +248,7 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
* @param integer $index the XF index for the format.
* @param array $properties array with properties to be set on initialization.
*/
- function Spreadsheet_Excel_Writer_Format($BIFF_version, $index = 0, $properties = array())
+ function __construct($BIFF_version, $index = 0, $properties = array())
{
$this->_xf_index = $index;
$this->_BIFF_version = $BIFF_version;
@@ -431,12 +431,12 @@ class Spreadsheet_Excel_Writer_Format extends PEAR
//$rotation = 0x00;
//oesi fix rotation mit utf8
switch($this->_rotation)
- {
- case 0: $rotation = 0; break;
- case 1: $rotation = 255; break;
- case 2: $rotation = 90; break;
- case 3: $rotation = 180; break;
- default: $rotation = 0; break;
+ {
+ case 0: $rotation = 0; break;
+ case 1: $rotation = 255; break;
+ case 2: $rotation = 90; break;
+ case 3: $rotation = 180; break;
+ default: $rotation = 0; break;
}
$biff8_options = 0x00;
$data = pack("vvvC", $ifnt, $ifmt, $style, $align);
diff --git a/include/Excel/OLE.php b/include/Excel/OLE.php
index 9cbf18742..bda705b88 100644
--- a/include/Excel/OLE.php
+++ b/include/Excel/OLE.php
@@ -57,7 +57,7 @@ class OLE extends PEAR
* Remember to use ampersand when creating an OLE object ($my_ole =& new OLE();)
* @access public
*/
- function OLE()
+ function __construct()
{
$this->_list = array();
}
diff --git a/include/Excel/PEAR.php b/include/Excel/PEAR.php
index cf9724bc9..09f980021 100644
--- a/include/Excel/PEAR.php
+++ b/include/Excel/PEAR.php
@@ -167,7 +167,7 @@ class PEAR
* @access public
* @return void
*/
- function PEAR($error_class = null)
+ function __construct($error_class = null)
{
$classname = strtolower(get_class($this));
if ($this->_debug) {
@@ -842,7 +842,7 @@ class PEAR_Error
* @access public
*
*/
- function PEAR_Error($message = 'unknown error', $code = null,
+ function __construct($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
if ($mode === null) {
diff --git a/include/Excel/PPS.php b/include/Excel/PPS.php
index 38ddbf926..ffb1e033f 100644
--- a/include/Excel/PPS.php
+++ b/include/Excel/PPS.php
@@ -116,7 +116,7 @@ class OLE_PPS extends PEAR
* @param integer $time_2nd A timestamp
* @param array $children Array containing children PPS for this PPS
*/
- function OLE_PPS($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children)
+ function __construct($No, $name, $type, $prev, $next, $dir, $time_1st, $time_2nd, $data, $children)
{
$this->No = $No;
$this->Name = $name;
diff --git a/include/Excel/Parser.php b/include/Excel/Parser.php
index 5d7a7e169..79a5eeb76 100644
--- a/include/Excel/Parser.php
+++ b/include/Excel/Parser.php
@@ -164,7 +164,7 @@ class Spreadsheet_Excel_Writer_Parser extends PEAR
* @param integer $byte_order The byte order (Little endian or Big endian) of the architecture
(optional). 1 => big endian, 0 (default) little endian.
*/
- function Spreadsheet_Excel_Writer_Parser($byte_order, $biff_version)
+ function __construct($byte_order, $biff_version)
{
$this->_current_char = 0;
$this->_BIFF_version = $biff_version;
diff --git a/include/Excel/Root.php b/include/Excel/Root.php
index e3fd631dc..dc883f633 100644
--- a/include/Excel/Root.php
+++ b/include/Excel/Root.php
@@ -43,11 +43,11 @@ class OLE_PPS_Root extends OLE_PPS
* @param integer $time_1st A timestamp
* @param integer $time_2nd A timestamp
*/
- function OLE_PPS_Root($time_1st, $time_2nd, $raChild)
+ function __construct($time_1st, $time_2nd, $raChild)
{
$ole_obj = new OLE();
$this->_tmp_dir = '';
- $this->OLE_PPS(
+ parent::__construct(
null,
$ole_obj->Asc2Ucs('Root Entry'),
OLE_PPS_TYPE_ROOT,
diff --git a/include/Excel/Validator.php b/include/Excel/Validator.php
index 9a776c6c3..cf68c57e3 100644
--- a/include/Excel/Validator.php
+++ b/include/Excel/Validator.php
@@ -66,7 +66,7 @@ class Spreadsheet_Excel_Writer_Validator
*/
var $_parser;
- function Spreadsheet_Excel_Writer_Validator(&$parser)
+ function __construct(&$parser)
{
$this->_parser = $parser;
$this->_type = 0x01; // FIXME: add method for setting datatype
diff --git a/include/Excel/Workbook.php b/include/Excel/Workbook.php
index f8d1149cd..a0fb64eb9 100644
--- a/include/Excel/Workbook.php
+++ b/include/Excel/Workbook.php
@@ -171,10 +171,10 @@ class Spreadsheet_Excel_Writer_Workbook extends Spreadsheet_Excel_Writer_BIFFwri
* @param string filename for storing the workbook. "-" for writing to stdout.
* @access public
*/
- function Spreadsheet_Excel_Writer_Workbook($filename)
+ function __construct($filename)
{
// It needs to call its parent's constructor explicitly
- $this->Spreadsheet_Excel_Writer_BIFFwriter();
+ parent::__construct();
$this->_filename = $filename;
$this->_parser = new Spreadsheet_Excel_Writer_Parser($this->_byte_order, $this->_BIFF_version);
diff --git a/include/Excel/Worksheet.php b/include/Excel/Worksheet.php
index e92a2beed..0a5d3fbed 100644
--- a/include/Excel/Worksheet.php
+++ b/include/Excel/Worksheet.php
@@ -364,14 +364,14 @@ class Spreadsheet_Excel_Writer_Worksheet extends Spreadsheet_Excel_Writer_BIFFwr
* @param mixed &$parser The formula parser created for the Workbook
* @access private
*/
- function Spreadsheet_Excel_Writer_Worksheet($BIFF_version, $name,
+ function __construct($BIFF_version, $name,
$index, &$activesheet,
&$firstsheet, &$str_total,
&$str_unique, &$str_table,
&$url_format, &$parser)
{
// It needs to call its parent's constructor explicitly
- $this->Spreadsheet_Excel_Writer_BIFFwriter();
+ parent::__construct();
$this->_BIFF_version = $BIFF_version;
$rowmax = 65536; // 16384 in Excel 5
$colmax = 256;
diff --git a/include/Excel/Writer.php b/include/Excel/Writer.php
index 4ae1e04d2..90e62b3f5 100644
--- a/include/Excel/Writer.php
+++ b/include/Excel/Writer.php
@@ -49,10 +49,10 @@ class Spreadsheet_Excel_Writer extends Spreadsheet_Excel_Writer_Workbook
* @param string $filename The optional filename for the Workbook.
* @return Spreadsheet_Excel_Writer_Workbook The Workbook created
*/
- function Spreadsheet_Excel_Writer($filename = '')
+ function __construct($filename = '')
{
$this->_filename = $filename;
- $this->Spreadsheet_Excel_Writer_Workbook($filename);
+ parent::__construct($filename);
}
/**
diff --git a/include/adresse.class.php b/include/adresse.class.php
index a0d54b9e5..16fa52fc6 100644
--- a/include/adresse.class.php
+++ b/include/adresse.class.php
@@ -248,9 +248,9 @@ class adresse extends basis_db
$this->errormsg = 'Strasse darf nicht länger als 255 Zeichen sein';
return false;
}
- if(mb_strlen($this->plz)>10)
+ if(mb_strlen($this->plz)>16)
{
- $this->errormsg = 'Plz darf nicht länger als 10 Zeichen sein';
+ $this->errormsg = 'Plz darf nicht länger als 16 Zeichen sein';
return false;
}
if(mb_strlen($this->ort)>255)
diff --git a/include/bewerbungstermin.class.php b/include/bewerbungstermin.class.php
index f2a33efc8..c4b4d2646 100644
--- a/include/bewerbungstermin.class.php
+++ b/include/bewerbungstermin.class.php
@@ -104,13 +104,22 @@ class bewerbungstermin extends basis_db
}
/**
- * Liefert alle Förderverträge
+ * Liefert die Bewerbungstermine eines Studiengangs
+ * @param integer $studiengang_kz. Kennzahl des Studiengangs, dessen Bewerbungstermine geladen werden sollen
+ * @param string $studiensemester_kurzbz. Optional. Default NULL. Studiensemester, dessen Bewerbungstermine geladen werden sollen
+ * @param $sort. Optional. Default NULL. Sortierung der Ergebnisse
+ * @param $studienplan_id. Optional. Default NULL. Studienplan ID, dessen Bewerbungstermine geladen werden sollen
+ * @return true wenn ok, false im Fehlerfall
*/
- public function getBewerbungstermine($studiengang_kz, $studiensemester_kurzbz=null, $sort=null)
+ public function getBewerbungstermine($studiengang_kz, $studiensemester_kurzbz = null, $sort = null, $studienplan_id = null)
{
$qry = "SELECT * FROM public.tbl_bewerbungstermine WHERE studiengang_kz=".$this->db_add_param($studiengang_kz, FHC_INTEGER);
+
if($studiensemester_kurzbz!=null)
$qry.=" AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
+
+ if($studienplan_id!=null)
+ $qry.=" AND studienplan_id=".$this->db_add_param($studienplan_id);
if($sort != null)
{
diff --git a/include/coodle.class.php b/include/coodle.class.php
index 1a4ac0f68..739a8ed25 100755
--- a/include/coodle.class.php
+++ b/include/coodle.class.php
@@ -40,6 +40,9 @@ class coodle extends basis_db
public $updatevon; // varchar(32)
public $insertamum; // timestamp
public $insertvon; // varchar(32)
+ public $mailversand; // boolean
+ public $teilnehmer_anonym; // boolean
+ public $termine_anonym; // boolean
// tbl_coodle_ressource
public $coodle_ressource_id; // integer
@@ -105,6 +108,9 @@ class coodle extends basis_db
$this->updatevon = $row->updatevon;
$this->insertamum = $row->insertamum;
$this->insertvon = $row->insertvon;
+ $this->mailversand = $this->db_parse_bool($row->mailversand);
+ $this->teilnehmer_anonym = $this->db_parse_bool($row->teilnehmer_anonym);
+ $this->termine_anonym = $this->db_parse_bool($row->termine_anonym);
}
else
{
@@ -156,7 +162,7 @@ class coodle extends basis_db
{
//Neuen Datensatz einfuegen
$qry='BEGIN;INSERT INTO campus.tbl_coodle(ersteller_uid, coodle_status_kurzbz, titel, beschreibung,
- dauer, endedatum, insertamum, insertvon, updateamum, updatevon) VALUES('.
+ dauer, endedatum, insertamum, insertvon, updateamum, updatevon, mailversand, teilnehmer_anonym, termine_anonym) VALUES('.
$this->db_add_param($this->ersteller_uid).', '.
$this->db_add_param($this->coodle_status_kurzbz).', '.
$this->db_add_param($this->titel).', '.
@@ -166,7 +172,10 @@ class coodle extends basis_db
$this->db_add_param($this->insertamum).', '.
$this->db_add_param($this->insertvon).', '.
$this->db_add_param($this->updateamum).', '.
- $this->db_add_param($this->updatevon).');';
+ $this->db_add_param($this->updatevon).', '.
+ $this->db_add_param($this->mailversand, FHC_BOOLEAN, true).', '.
+ $this->db_add_param($this->teilnehmer_anonym, FHC_BOOLEAN, true).', '.
+ $this->db_add_param($this->termine_anonym, FHC_BOOLEAN, true).');';
}
else
{
@@ -184,7 +193,10 @@ class coodle extends basis_db
' dauer='.$this->db_add_param($this->dauer).', '.
' endedatum='.$this->db_add_param($this->endedatum).', '.
' updateamum='.$this->db_add_param($this->updateamum).', '.
- ' updatevon='.$this->db_add_param($this->updatevon).' '.
+ ' updatevon='.$this->db_add_param($this->updatevon).', '.
+ ' mailversand='.$this->db_add_param($this->mailversand, FHC_BOOLEAN).', '.
+ ' teilnehmer_anonym='.$this->db_add_param($this->teilnehmer_anonym, FHC_BOOLEAN).', '.
+ ' termine_anonym='.$this->db_add_param($this->termine_anonym, FHC_BOOLEAN).' '.
'WHERE coodle_id='.$this->db_add_param($this->coodle_id, FHC_INTEGER, false).';';
}
@@ -383,6 +395,9 @@ class coodle extends basis_db
$coodle->updatevon = $row->updatevon;
$coodle->endedatum = $row->endedatum;
$coodle->ersteller_uid = $row->ersteller_uid;
+ $coodle->mailversand = $row->mailversand;
+ $coodle->teilnehmer_anonym = $row->teilnehmer_anonym;
+ $coodle->termine_anonym = $row->termine_anonym;
$this->result[] = $coodle;
}
@@ -505,7 +520,7 @@ class coodle extends basis_db
}
/**
- * Speichert die aktuelle Ressource in die Datenbank
+ * Speichert die Terminwahl der Ressource in die Datenbank
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
* andernfalls wird der Datensatz mit der ID in $coodle_id aktualisiert
* @return true wenn ok, false im Fehlerfall
@@ -650,6 +665,70 @@ class coodle extends basis_db
return false;
}
+ /**
+ * Überprüft ob der übergebenen Termin schon von einer Ressource gewählt wurde
+ * @param Integer $termin_id
+ * @return boolean true, wenn schon ein Termin schon gewaehlt wurde, sonst false
+ */
+ public function checkTerminGewaehlt($termin_id)
+ {
+ if( $termin_id == '' || !is_numeric($termin_id))
+ {
+ $this->errormsg = 'Ungültige ID übergeben';
+ return false;
+ }
+
+ $qry="SELECT * FROM campus.tbl_coodle_ressource_termin
+ WHERE coodle_termin_id=".$this->db_add_param($termin_id, FHC_INTEGER).';';
+
+ if($result = $this->db_query($qry))
+ {
+ if($row = $this->db_fetch_row($result))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ return false;
+ }
+
+ /**
+ * Zählt, wie oft ein Termin gewählt wurde
+ * @param Integer $termin_id
+ * @param Integer $ressource_id
+ * @return boolean
+ */
+ public function countTermin($termin_id)
+ {
+ if($termin_id == '' || !is_numeric($termin_id))
+ {
+ $this->errormsg = 'Ungültige ID übergeben';
+ return false;
+ }
+
+ $qry="SELECT count(*) AS anzahl FROM campus.tbl_coodle_ressource_termin
+ WHERE coodle_termin_id=".$this->db_add_param($termin_id, FHC_INTEGER).';';
+
+ if($result = $this->db_query($qry))
+ {
+ if($row = $this->db_fetch_object($result))
+ {
+ $this->anzahl = $row->anzahl;
+ }
+ else
+ {
+ return false;
+ }
+ return true;
+ }
+ else
+ {
+ $this->errormsg = "Fehler bei der Abfrage aufgetreten";
+ return false;
+ }
+ }
+
/**
*
* Laedt alle Termine einer Umfrage zu denen eine Ressource zugesagt hat
@@ -844,20 +923,28 @@ class coodle extends basis_db
/**
* Laedt die Terminvorschlaege zu einer Umfrage
+ * Das Datum 1900-01-01 wird an die letzte Stelle sortiert, da es fuer "Keine Auswahl" benoetigt wird
* @param $coodle_id
* @return boolean
*/
public function getTermine($coodle_id)
{
- if($coodle_id == '' || !is_numeric($coodle_id))
- {
- $this->errormsg = "Ungültige Coodle_id";
- return false;
- }
-
- $qry = "SELECT * FROM campus.tbl_coodle_termin
- WHERE coodle_id=".$this->db_add_param($coodle_id, FHC_INTEGER, false).'
- ORDER BY datum, uhrzeit;';
+ if($coodle_id == '' || !is_numeric($coodle_id))
+ {
+ $this->errormsg = "Ungültige Coodle_id";
+ return false;
+ }
+
+ $qry = "(SELECT * FROM campus.tbl_coodle_termin
+ WHERE coodle_id=".$this->db_add_param($coodle_id, FHC_INTEGER, false)."
+ AND datum != '1900-01-01'
+ ORDER BY datum, uhrzeit)
+
+ UNION ALL
+
+ (SELECT * FROM campus.tbl_coodle_termin
+ WHERE coodle_id=".$this->db_add_param($coodle_id, FHC_INTEGER, false)."
+ AND datum = '1900-01-01');";
if($result = $this->db_query($qry))
{
@@ -910,6 +997,9 @@ class coodle extends basis_db
$coodle->insertvon = $row->insertvon;
$coodle->updateamum = $row->updateamum;
$coodle->updatevon = $row->updatevon;
+ $coodle->mailversand = $row->mailversand;
+ $coodle->teilnehmer_anonym = $row->teilnehmer_anonym;
+ $coodle->termine_anonym = $row->termine_anonym;
$this->result[] = $coodle;
}
@@ -1210,6 +1300,9 @@ class coodle extends basis_db
$coodle->updatevon = $row->updatevon;
$coodle->endedatum = $row->endedatum;
$coodle->ersteller_uid = $row->ersteller_uid;
+ $coodle->mailversand = $row->mailversand;
+ $coodle->teilnehmer_anonym = $row->teilnehmer_anonym;
+ $coodle->termine_anonym = $row->termine_anonym;
$this->result[] = $coodle;
}
diff --git a/include/lehreinheitmitarbeiter.class.php b/include/lehreinheitmitarbeiter.class.php
index c9c824411..85493cd9e 100644
--- a/include/lehreinheitmitarbeiter.class.php
+++ b/include/lehreinheitmitarbeiter.class.php
@@ -473,11 +473,15 @@ class lehreinheitmitarbeiter extends basis_db
*/
public function getLehreinheiten($mitarbeiter_uid, $studiensemester_kurzbz)
{
- $qry = 'SELECT DISTINCT lehreinheit_id, lv_bezeichnung, lv_kurzbz, unr, lv_lehrform_kurzbz, stg_kurzbzlang, lv_semester '
- . 'FROM campus.vw_lehreinheit '
- . 'WHERE mitarbeiter_uid = ' . $this->db_add_param($mitarbeiter_uid)
- . ' AND studiensemester_kurzbz = ' . $this->db_add_param($studiensemester_kurzbz)
- . ' ORDER BY lv_bezeichnung, unr ';
+ $qry = 'SELECT
+ DISTINCT lehreinheit_id, lv_bezeichnung, lv_kurzbz, unr, lv_lehrform_kurzbz, stg_kurzbzlang,
+ lv_semester, lehrform_kurzbz
+ FROM
+ campus.vw_lehreinheit
+ WHERE
+ mitarbeiter_uid = '.$this->db_add_param($mitarbeiter_uid).'
+ AND studiensemester_kurzbz = '.$this->db_add_param($studiensemester_kurzbz).'
+ ORDER BY lv_bezeichnung, unr ';
$result = $this->db_query($qry);
$ret = array();
@@ -494,7 +498,7 @@ class lehreinheitmitarbeiter extends basis_db
* Laedt die Lektoren einer Lehrveranstaltung in einem Studiensemester
* @param lehrveranstaltung_id
* @param studiensemester_kurzbz
- * @param integer lehreinheit_id Optional Lehreinheit_id
+ * @param integer lehreinheit_id Optional Lehreinheit_id
* @return array + true wenn ok / false im Fehlerfall
*/
public function getMitarbeiterLV($lehrveranstaltung_id, $studiensemester_kurzbz, $lehreinheit_id=null)
@@ -514,7 +518,7 @@ class lehreinheitmitarbeiter extends basis_db
WHERE
lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER)."
AND tbl_lehreinheit.studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
-
+
if(!is_null($lehreinheit_id))
$qry .=" AND tbl_lehreinheit.lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
$qry .=" ORDER BY nachname, vorname;";
diff --git a/include/pdf.inc.php b/include/pdf.inc.php
index 19e3ade5a..90279675a 100644
--- a/include/pdf.inc.php
+++ b/include/pdf.inc.php
@@ -27,10 +27,10 @@ class PDF extends FPDF
* letter
* legal
*/
- function PDF($orientation='P',$unit='mm',$format='A4')
+ function __construct($orientation='P',$unit='mm',$format='A4')
{
//Call parent constructor
- $this->FPDF($orientation,$unit,$format);
+ parent::__construct($orientation,$unit,$format);
//Initialization
$this->B=0;
$this->I=0;
@@ -188,4 +188,4 @@ class PDF extends FPDF
}
}
-?>
\ No newline at end of file
+?>
diff --git a/include/pdf/fpdf.php b/include/pdf/fpdf.php
index dc4efd5c0..c86e9ee68 100644
--- a/include/pdf/fpdf.php
+++ b/include/pdf/fpdf.php
@@ -6,7 +6,7 @@
* Date: 2008-08-03 *
* Author: Olivier PLATHEY *
*******************************************************************************/
-if (!defined('FPDF_VERSION'))
+if (!defined('FPDF_VERSION'))
define('FPDF_VERSION','1.6');
class FPDF
@@ -72,7 +72,7 @@ var $PDFVersion; //PDF version number
* Public methods *
* *
*******************************************************************************/
-function FPDF($orientation='P', $unit='mm', $format='A4')
+function __construct($orientation='P', $unit='mm', $format='A4')
{
//Some checks
$this->_dochecks();
diff --git a/include/pdf/fpdf.php.ie b/include/pdf/fpdf.php.ie
deleted file mode 100644
index 631ab7f1e..000000000
--- a/include/pdf/fpdf.php.ie
+++ /dev/null
@@ -1,1618 +0,0 @@
-_dochecks();
- //Initialization of properties
- $this->page=0;
- $this->n=2;
- $this->buffer='';
- $this->pages=array();
- $this->OrientationChanges=array();
- $this->state=0;
- $this->fonts=array();
- $this->FontFiles=array();
- $this->diffs=array();
- $this->images=array();
- $this->links=array();
- $this->InFooter=false;
- $this->lasth=0;
- $this->FontFamily='';
- $this->FontStyle='';
- $this->FontSizePt=12;
- $this->underline=false;
- $this->DrawColor='0 G';
- $this->FillColor='0 g';
- $this->TextColor='0 g';
- $this->ColorFlag=false;
- $this->ws=0;
- //Standard fonts
- $this->CoreFonts=array('courier'=>'Courier','courierB'=>'Courier-Bold','courierI'=>'Courier-Oblique','courierBI'=>'Courier-BoldOblique',
- 'helvetica'=>'Helvetica','helveticaB'=>'Helvetica-Bold','helveticaI'=>'Helvetica-Oblique','helveticaBI'=>'Helvetica-BoldOblique',
- 'times'=>'Times-Roman','timesB'=>'Times-Bold','timesI'=>'Times-Italic','timesBI'=>'Times-BoldItalic',
- 'symbol'=>'Symbol','zapfdingbats'=>'ZapfDingbats');
- //Scale factor
- if($unit=='pt')
- $this->k=1;
- elseif($unit=='mm')
- $this->k=72/25.4;
- elseif($unit=='cm')
- $this->k=72/2.54;
- elseif($unit=='in')
- $this->k=72;
- else
- $this->Error('Incorrect unit: '.$unit);
- //Page format
- if(is_string($format))
- {
- $format=strtolower($format);
- if($format=='a3')
- $format=array(841.89,1190.55);
- elseif($format=='a4')
- $format=array(595.28,841.89);
- elseif($format=='a5')
- $format=array(420.94,595.28);
- elseif($format=='letter')
- $format=array(612,792);
- elseif($format=='legal')
- $format=array(612,1008);
- else
- $this->Error('Unknown page format: '.$format);
- $this->fwPt=$format[0];
- $this->fhPt=$format[1];
- }
- else
- {
- $this->fwPt=$format[0]*$this->k;
- $this->fhPt=$format[1]*$this->k;
- }
- $this->fw=$this->fwPt/$this->k;
- $this->fh=$this->fhPt/$this->k;
- //Page orientation
- $orientation=strtolower($orientation);
- if($orientation=='p' or $orientation=='portrait')
- {
- $this->DefOrientation='P';
- $this->wPt=$this->fwPt;
- $this->hPt=$this->fhPt;
- }
- elseif($orientation=='l' or $orientation=='landscape')
- {
- $this->DefOrientation='L';
- $this->wPt=$this->fhPt;
- $this->hPt=$this->fwPt;
- }
- else
- $this->Error('Incorrect orientation: '.$orientation);
- $this->CurOrientation=$this->DefOrientation;
- $this->w=$this->wPt/$this->k;
- $this->h=$this->hPt/$this->k;
- //Page margins (1 cm)
- $margin=28.35/$this->k;
- $this->SetMargins($margin,$margin);
- //Interior cell margin (1 mm)
- $this->cMargin=$margin/10;
- //Line width (0.2 mm)
- $this->LineWidth=.567/$this->k;
- //Automatic page break
- $this->SetAutoPageBreak(true,2*$margin);
- //Full width display mode
- $this->SetDisplayMode('fullwidth');
- //Compression
- $this->SetCompression(true);
-}
-
-function SetMargins($left,$top,$right=-1)
-{
- //Set left, top and right margins
- $this->lMargin=$left;
- $this->tMargin=$top;
- if($right==-1)
- $right=$left;
- $this->rMargin=$right;
-}
-
-function SetLeftMargin($margin)
-{
- //Set left margin
- $this->lMargin=$margin;
- if($this->page>0 and $this->x<$margin)
- $this->x=$margin;
-}
-
-function SetTopMargin($margin)
-{
- //Set top margin
- $this->tMargin=$margin;
-}
-
-function SetRightMargin($margin)
-{
- //Set right margin
- $this->rMargin=$margin;
-}
-
-function SetAutoPageBreak($auto,$margin=0)
-{
- //Set auto page break mode and triggering margin
- $this->AutoPageBreak=$auto;
- $this->bMargin=$margin;
- $this->PageBreakTrigger=$this->h-$margin;
-}
-
-function SetDisplayMode($zoom,$layout='continuous')
-{
- //Set display mode in viewer
- if($zoom=='fullpage' or $zoom=='fullwidth' or $zoom=='real' or $zoom=='default' or !is_string($zoom))
- $this->ZoomMode=$zoom;
- else
- $this->Error('Incorrect zoom display mode: '.$zoom);
- if($layout=='single' or $layout=='continuous' or $layout=='two' or $layout=='default')
- $this->LayoutMode=$layout;
- else
- $this->Error('Incorrect layout display mode: '.$layout);
-}
-
-function SetCompression($compress)
-{
- //Set page compression
- if(function_exists('gzcompress'))
- $this->compress=$compress;
- else
- $this->compress=false;
-}
-
-function SetTitle($title)
-{
- //Title of document
- $this->title=$title;
-}
-
-function SetSubject($subject)
-{
- //Subject of document
- $this->subject=$subject;
-}
-
-function SetAuthor($author)
-{
- //Author of document
- $this->author=$author;
-}
-
-function SetKeywords($keywords)
-{
- //Keywords of document
- $this->keywords=$keywords;
-}
-
-function SetCreator($creator)
-{
- //Creator of document
- $this->creator=$creator;
-}
-
-function AliasNbPages($alias='{nb}')
-{
- //Define an alias for total number of pages
- $this->AliasNbPages=$alias;
-}
-
-function Error($msg)
-{
- //Fatal error
- die('FPDF error: '.$msg);
-}
-
-function Open()
-{
- //Begin document
- if($this->state==0)
- $this->_begindoc();
-}
-
-function Close()
-{
- //Terminate document
- if($this->state==3)
- return;
- if($this->page==0)
- $this->AddPage();
- //Page footer
- $this->InFooter=true;
- $this->Footer();
- $this->InFooter=false;
- //Close page
- $this->_endpage();
- //Close document
- $this->_enddoc();
-}
-
-function AddPage($orientation='')
-{
- //Start a new page
- if($this->state==0)
- $this->Open();
- $family=$this->FontFamily;
- $style=$this->FontStyle.($this->underline ? 'U' : '');
- $size=$this->FontSizePt;
- $lw=$this->LineWidth;
- $dc=$this->DrawColor;
- $fc=$this->FillColor;
- $tc=$this->TextColor;
- $cf=$this->ColorFlag;
- if($this->page>0)
- {
- //Page footer
- $this->InFooter=true;
- $this->Footer();
- $this->InFooter=false;
- //Close page
- $this->_endpage();
- }
- //Start new page
- $this->_beginpage($orientation);
- //Set line cap style to square
- $this->_out('2 J');
- //Set line width
- $this->LineWidth=$lw;
- $this->_out(sprintf('%.2f w',$lw*$this->k));
- //Set font
- if($family)
- $this->SetFont($family,$style,$size);
- //Set colors
- $this->DrawColor=$dc;
- if($dc!='0 G')
- $this->_out($dc);
- $this->FillColor=$fc;
- if($fc!='0 g')
- $this->_out($fc);
- $this->TextColor=$tc;
- $this->ColorFlag=$cf;
- //Page header
- $this->Header();
- //Restore line width
- if($this->LineWidth!=$lw)
- {
- $this->LineWidth=$lw;
- $this->_out(sprintf('%.2f w',$lw*$this->k));
- }
- //Restore font
- if($family)
- $this->SetFont($family,$style,$size);
- //Restore colors
- if($this->DrawColor!=$dc)
- {
- $this->DrawColor=$dc;
- $this->_out($dc);
- }
- if($this->FillColor!=$fc)
- {
- $this->FillColor=$fc;
- $this->_out($fc);
- }
- $this->TextColor=$tc;
- $this->ColorFlag=$cf;
-}
-
-function Header()
-{
- //To be implemented in your own inherited class
-}
-
-function Footer()
-{
- //To be implemented in your own inherited class
-}
-
-function PageNo()
-{
- //Get current page number
- return $this->page;
-}
-
-function SetDrawColor($r,$g=-1,$b=-1)
-{
- //Set color for all stroking operations
- if(($r==0 and $g==0 and $b==0) or $g==-1)
- $this->DrawColor=sprintf('%.3f G',$r/255);
- else
- $this->DrawColor=sprintf('%.3f %.3f %.3f RG',$r/255,$g/255,$b/255);
- if($this->page>0)
- $this->_out($this->DrawColor);
-}
-
-function SetFillColor($r,$g=-1,$b=-1)
-{
- //Set color for all filling operations
- if(($r==0 and $g==0 and $b==0) or $g==-1)
- $this->FillColor=sprintf('%.3f g',$r/255);
- else
- $this->FillColor=sprintf('%.3f %.3f %.3f rg',$r/255,$g/255,$b/255);
- $this->ColorFlag=($this->FillColor!=$this->TextColor);
- if($this->page>0)
- $this->_out($this->FillColor);
-}
-
-function SetTextColor($r,$g=-1,$b=-1)
-{
- //Set color for text
- if(($r==0 and $g==0 and $b==0) or $g==-1)
- $this->TextColor=sprintf('%.3f g',$r/255);
- else
- $this->TextColor=sprintf('%.3f %.3f %.3f rg',$r/255,$g/255,$b/255);
- $this->ColorFlag=($this->FillColor!=$this->TextColor);
-}
-
-function GetStringWidth($s)
-{
- //Get width of a string in the current font
- $s=(string)$s;
- $cw=&$this->CurrentFont['cw'];
- $w=0;
- $l=strlen($s);
- for($i=0;$i<$l;$i++)
- $w+=$cw[$s{$i}];
- return $w*$this->FontSize/1000;
-}
-
-function SetLineWidth($width)
-{
- //Set line width
- $this->LineWidth=$width;
- if($this->page>0)
- $this->_out(sprintf('%.2f w',$width*$this->k));
-}
-
-function Line($x1,$y1,$x2,$y2)
-{
- //Draw a line
- $this->_out(sprintf('%.2f %.2f m %.2f %.2f l S',$x1*$this->k,($this->h-$y1)*$this->k,$x2*$this->k,($this->h-$y2)*$this->k));
-}
-
-function Rect($x,$y,$w,$h,$style='')
-{
- //Draw a rectangle
- if($style=='F')
- $op='f';
- elseif($style=='FD' or $style=='DF')
- $op='B';
- else
- $op='S';
- $this->_out(sprintf('%.2f %.2f %.2f %.2f re %s',$x*$this->k,($this->h-$y)*$this->k,$w*$this->k,-$h*$this->k,$op));
-}
-
-function AddFont($family,$style='',$file='')
-{
- //Add a TrueType or Type1 font
- $family=strtolower($family);
- if($family=='arial')
- $family='helvetica';
- $style=strtoupper($style);
- if($style=='IB')
- $style='BI';
- if(isset($this->fonts[$family.$style]))
- $this->Error('Font already added: '.$family.' '.$style);
- if($file=='')
- $file=str_replace(' ','',$family).strtolower($style).'.php';
- if(defined('FPDF_FONTPATH'))
- $file=FPDF_FONTPATH.$file;
- include($file);
- if(!isset($name))
- $this->Error('Could not include font definition file');
- $i=count($this->fonts)+1;
- $this->fonts[$family.$style]=array('i'=>$i,'type'=>$type,'name'=>$name,'desc'=>$desc,'up'=>$up,'ut'=>$ut,'cw'=>$cw,'enc'=>$enc,'file'=>$file);
- if($diff)
- {
- //Search existing encodings
- $d=0;
- $nb=count($this->diffs);
- for($i=1;$i<=$nb;$i++)
- if($this->diffs[$i]==$diff)
- {
- $d=$i;
- break;
- }
- if($d==0)
- {
- $d=$nb+1;
- $this->diffs[$d]=$diff;
- }
- $this->fonts[$family.$style]['diff']=$d;
- }
- if($file)
- {
- if($type=='TrueType')
- $this->FontFiles[$file]=array('length1'=>$originalsize);
- else
- $this->FontFiles[$file]=array('length1'=>$size1,'length2'=>$size2);
- }
-}
-
-function SetFont($family,$style='',$size=0)
-{
- //Select a font; size given in points
- global $fpdf_charwidths;
-
- $family=strtolower($family);
- if($family=='')
- $family=$this->FontFamily;
- if($family=='arial')
- $family='helvetica';
- elseif($family=='symbol' or $family=='zapfdingbats')
- $style='';
- $style=strtoupper($style);
- if(is_int(strpos($style,'U')))
- {
- $this->underline=true;
- $style=str_replace('U','',$style);
- }
- else
- $this->underline=false;
- if($style=='IB')
- $style='BI';
- if($size==0)
- $size=$this->FontSizePt;
- //Test if font is already selected
- if($this->FontFamily==$family and $this->FontStyle==$style and $this->FontSizePt==$size)
- return;
- //Test if used for the first time
- $fontkey=$family.$style;
- if(!isset($this->fonts[$fontkey]))
- {
- //Check if one of the standard fonts
- if(isset($this->CoreFonts[$fontkey]))
- {
- if(!isset($fpdf_charwidths[$fontkey]))
- {
- //Load metric file
- $file=$family;
- if($family=='times' or $family=='helvetica')
- $file.=strtolower($style);
- $file.='.php';
- if(defined('FPDF_FONTPATH'))
- $file=FPDF_FONTPATH.$file;
- include($file);
- if(!isset($fpdf_charwidths[$fontkey]))
- $this->Error('Could not include font metric file');
- }
- $i=count($this->fonts)+1;
- $this->fonts[$fontkey]=array('i'=>$i,'type'=>'core','name'=>$this->CoreFonts[$fontkey],'up'=>-100,'ut'=>50,'cw'=>$fpdf_charwidths[$fontkey]);
- }
- else
- $this->Error('Undefined font: '.$family.' '.$style);
- }
- //Select it
- $this->FontFamily=$family;
- $this->FontStyle=$style;
- $this->FontSizePt=$size;
- $this->FontSize=$size/$this->k;
- $this->CurrentFont=&$this->fonts[$fontkey];
- if($this->page>0)
- $this->_out(sprintf('BT /F%d %.2f Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
-}
-
-function SetFontSize($size)
-{
- //Set font size in points
- if($this->FontSizePt==$size)
- return;
- $this->FontSizePt=$size;
- $this->FontSize=$size/$this->k;
- if($this->page>0)
- $this->_out(sprintf('BT /F%d %.2f Tf ET',$this->CurrentFont['i'],$this->FontSizePt));
-}
-
-function AddLink()
-{
- //Create a new internal link
- $n=count($this->links)+1;
- $this->links[$n]=array(0,0);
- return $n;
-}
-
-function SetLink($link,$y=0,$page=-1)
-{
- //Set destination of internal link
- if($y==-1)
- $y=$this->y;
- if($page==-1)
- $page=$this->page;
- $this->links[$link]=array($page,$y);
-}
-
-function Link($x,$y,$w,$h,$link)
-{
- //Put a link on the page
- $this->PageLinks[$this->page][]=array($x*$this->k,$this->hPt-$y*$this->k,$w*$this->k,$h*$this->k,$link);
-}
-
-function Text($x,$y,$txt)
-{
- //Output a string
- $s=sprintf('BT %.2f %.2f Td (%s) Tj ET',$x*$this->k,($this->h-$y)*$this->k,$this->_escape($txt));
- if($this->underline and $txt!='')
- $s.=' '.$this->_dounderline($x,$y,$txt);
- if($this->ColorFlag)
- $s='q '.$this->TextColor.' '.$s.' Q';
- $this->_out($s);
-}
-
-function AcceptPageBreak()
-{
- //Accept automatic page break or not
- return $this->AutoPageBreak;
-}
-
-function Cell($w,$h=0,$txt='',$border=0,$ln=0,$align='',$fill=0,$link='')
-{
- //Output a cell
- $k=$this->k;
- if($this->y+$h>$this->PageBreakTrigger and !$this->InFooter and $this->AcceptPageBreak())
- {
- //Automatic page break
- $x=$this->x;
- $ws=$this->ws;
- if($ws>0)
- {
- $this->ws=0;
- $this->_out('0 Tw');
- }
- $this->AddPage($this->CurOrientation);
- $this->x=$x;
- if($ws>0)
- {
- $this->ws=$ws;
- $this->_out(sprintf('%.3f Tw',$ws*$k));
- }
- }
- if($w==0)
- $w=$this->w-$this->rMargin-$this->x;
- $s='';
- if($fill==1 or $border==1)
- {
- if($fill==1)
- $op=($border==1) ? 'B' : 'f';
- else
- $op='S';
- $s=sprintf('%.2f %.2f %.2f %.2f re %s ',$this->x*$k,($this->h-$this->y)*$k,$w*$k,-$h*$k,$op);
- }
- if(is_string($border))
- {
- $x=$this->x;
- $y=$this->y;
- if(is_int(strpos($border,'L')))
- $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-$y)*$k,$x*$k,($this->h-($y+$h))*$k);
- if(is_int(strpos($border,'T')))
- $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-$y)*$k);
- if(is_int(strpos($border,'R')))
- $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',($x+$w)*$k,($this->h-$y)*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
- if(is_int(strpos($border,'B')))
- $s.=sprintf('%.2f %.2f m %.2f %.2f l S ',$x*$k,($this->h-($y+$h))*$k,($x+$w)*$k,($this->h-($y+$h))*$k);
- }
- if($txt!='')
- {
- if($align=='R')
- $dx=$w-$this->cMargin-$this->GetStringWidth($txt);
- elseif($align=='C')
- $dx=($w-$this->GetStringWidth($txt))/2;
- else
- $dx=$this->cMargin;
- if($this->ColorFlag)
- $s.='q '.$this->TextColor.' ';
- $txt2=str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$txt)));
- $s.=sprintf('BT %.2f %.2f Td (%s) Tj ET',($this->x+$dx)*$k,($this->h-($this->y+.5*$h+.3*$this->FontSize))*$k,$txt2);
- if($this->underline)
- $s.=' '.$this->_dounderline($this->x+$dx,$this->y+.5*$h+.3*$this->FontSize,$txt);
- if($this->ColorFlag)
- $s.=' Q';
- if($link)
- $this->Link($this->x+$dx,$this->y+.5*$h-.5*$this->FontSize,$this->GetStringWidth($txt),$this->FontSize,$link);
- }
- if($s)
- $this->_out($s);
- $this->lasth=$h;
- if($ln>0)
- {
- //Go to next line
- $this->y+=$h;
- if($ln==1)
- $this->x=$this->lMargin;
- }
- else
- $this->x+=$w;
-}
-
-function MultiCell($w,$h,$txt,$border=0,$align='J',$fill=0)
-{
- //Output text with automatic or explicit line breaks
- $cw=&$this->CurrentFont['cw'];
- if($w==0)
- $w=$this->w-$this->rMargin-$this->x;
- $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
- $s=str_replace("\r",'',$txt);
- $nb=strlen($s);
- if($nb>0 and $s[$nb-1]=="\n")
- $nb--;
- $b=0;
- if($border)
- {
- if($border==1)
- {
- $border='LTRB';
- $b='LRT';
- $b2='LR';
- }
- else
- {
- $b2='';
- if(is_int(strpos($border,'L')))
- $b2.='L';
- if(is_int(strpos($border,'R')))
- $b2.='R';
- $b=is_int(strpos($border,'T')) ? $b2.'T' : $b2;
- }
- }
- $sep=-1;
- $i=0;
- $j=0;
- $l=0;
- $ns=0;
- $nl=1;
- while($i<$nb)
- {
- //Get next character
- $c=$s{$i};
- if($c=="\n")
- {
- //Explicit line break
- if($this->ws>0)
- {
- $this->ws=0;
- $this->_out('0 Tw');
- }
- $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
- $i++;
- $sep=-1;
- $j=$i;
- $l=0;
- $ns=0;
- $nl++;
- if($border and $nl==2)
- $b=$b2;
- continue;
- }
- if($c==' ')
- {
- $sep=$i;
- $ls=$l;
- $ns++;
- }
- $l+=$cw[$c];
- if($l>$wmax)
- {
- //Automatic line break
- if($sep==-1)
- {
- if($i==$j)
- $i++;
- if($this->ws>0)
- {
- $this->ws=0;
- $this->_out('0 Tw');
- }
- $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
- }
- else
- {
- if($align=='J')
- {
- $this->ws=($ns>1) ? ($wmax-$ls)/1000*$this->FontSize/($ns-1) : 0;
- $this->_out(sprintf('%.3f Tw',$this->ws*$this->k));
- }
- $this->Cell($w,$h,substr($s,$j,$sep-$j),$b,2,$align,$fill);
- $i=$sep+1;
- }
- $sep=-1;
- $j=$i;
- $l=0;
- $ns=0;
- $nl++;
- if($border and $nl==2)
- $b=$b2;
- }
- else
- $i++;
- }
- //Last chunk
- if($this->ws>0)
- {
- $this->ws=0;
- $this->_out('0 Tw');
- }
- if($border and is_int(strpos($border,'B')))
- $b.='B';
- $this->Cell($w,$h,substr($s,$j,$i-$j),$b,2,$align,$fill);
- $this->x=$this->lMargin;
-}
-
-function Write($h,$txt,$link='')
-{
- //Output text in flowing mode
- $cw=&$this->CurrentFont['cw'];
- $w=$this->w-$this->rMargin-$this->x;
- $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
- $s=str_replace("\r",'',$txt);
- $nb=strlen($s);
- $sep=-1;
- $i=0;
- $j=0;
- $l=0;
- $nl=1;
- while($i<$nb)
- {
- //Get next character
- $c=$s{$i};
- if($c=="\n")
- {
- //Explicit line break
- $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
- $i++;
- $sep=-1;
- $j=$i;
- $l=0;
- if($nl==1)
- {
- $this->x=$this->lMargin;
- $w=$this->w-$this->rMargin-$this->x;
- $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
- }
- $nl++;
- continue;
- }
- if($c==' ')
- $sep=$i;
- $l+=$cw[$c];
- if($l>$wmax)
- {
- //Automatic line break
- if($sep==-1)
- {
- if($this->x>$this->lMargin)
- {
- //Move to next line
- $this->x=$this->lMargin;
- $this->y+=$h;
- $w=$this->w-$this->rMargin-$this->x;
- $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
- $i++;
- $nl++;
- continue;
- }
- if($i==$j)
- $i++;
- $this->Cell($w,$h,substr($s,$j,$i-$j),0,2,'',0,$link);
- }
- else
- {
- $this->Cell($w,$h,substr($s,$j,$sep-$j),0,2,'',0,$link);
- $i=$sep+1;
- }
- $sep=-1;
- $j=$i;
- $l=0;
- if($nl==1)
- {
- $this->x=$this->lMargin;
- $w=$this->w-$this->rMargin-$this->x;
- $wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
- }
- $nl++;
- }
- else
- $i++;
- }
- //Last chunk
- if($i!=$j)
- $this->Cell($l/1000*$this->FontSize,$h,substr($s,$j),0,0,'',0,$link);
-}
-
-function Image($file,$x,$y,$w=0,$h=0,$type='',$link='')
-{
- //Put an image on the page
- if(!isset($this->images[$file]))
- {
- //First use of image, get info
- if($type=='')
- {
- $pos=strrpos($file,'.');
- if(!$pos)
- $this->Error('Image file has no extension and no type was specified: '.$file);
- $type=substr($file,$pos+1);
- }
- $type=strtolower($type);
- $mqr=get_magic_quotes_runtime();
- set_magic_quotes_runtime(0);
- if($type=='jpg' or $type=='jpeg')
- $info=$this->_parsejpg($file);
- elseif($type=='png')
- $info=$this->_parsepng($file);
- else
- {
- //Allow for additional formats
- $mtd='_parse'.$type;
- if(!method_exists($this,$mtd))
- $this->Error('Unsupported image type: '.$type);
- $info=$this->$mtd($file);
- }
- set_magic_quotes_runtime($mqr);
- $info['i']=count($this->images)+1;
- $this->images[$file]=$info;
- }
- else
- $info=$this->images[$file];
- //Automatic width and height calculation if needed
- if($w==0 and $h==0)
- {
- //Put image at 72 dpi
- $w=$info['w']/$this->k;
- $h=$info['h']/$this->k;
- }
- if($w==0)
- $w=$h*$info['w']/$info['h'];
- if($h==0)
- $h=$w*$info['h']/$info['w'];
- $this->_out(sprintf('q %.2f 0 0 %.2f %.2f %.2f cm /I%d Do Q',$w*$this->k,$h*$this->k,$x*$this->k,($this->h-($y+$h))*$this->k,$info['i']));
- if($link)
- $this->Link($x,$y,$w,$h,$link);
-}
-
-function Ln($h='')
-{
- //Line feed; default value is last cell height
- $this->x=$this->lMargin;
- if(is_string($h))
- $this->y+=$this->lasth;
- else
- $this->y+=$h;
-}
-
-function GetX()
-{
- //Get x position
- return $this->x;
-}
-
-function SetX($x)
-{
- //Set x position
- if($x>=0)
- $this->x=$x;
- else
- $this->x=$this->w+$x;
-}
-
-function GetY()
-{
- //Get y position
- return $this->y;
-}
-
-function SetY($y)
-{
- //Set y position and reset x
- $this->x=$this->lMargin;
- if($y>=0)
- $this->y=$y;
- else
- $this->y=$this->h+$y;
-}
-
-function SetXY($x,$y)
-{
- //Set x and y positions
- $this->SetY($y);
- $this->SetX($x);
-}
-
-function Output($name='',$dest='')
-{
- //Output PDF to some destination
- global $HTTP_SERVER_VARS;
-
- //Finish document if necessary
- if($this->state<3)
- $this->Close();
- //Normalize parameters
- if(is_bool($dest))
- $dest=$dest ? 'D' : 'F';
- $dest=strtoupper($dest);
- if($dest=='')
- {
- if($name=='')
- {
- $name='doc.pdf';
- $dest='I';
- }
- else
- $dest='F';
- }
- switch($dest)
- {
- case 'I':
- //Send to standard output
- if(isset($HTTP_SERVER_VARS['SERVER_NAME']))
- {
- //We send to a browser
- Header('Content-Type: application/pdf');
- if(headers_sent())
- $this->Error('Some data has already been output to browser, can\'t send PDF file');
- Header('Content-Length: '.strlen($this->buffer));
- Header('Content-disposition: inline; filename='.$name);
- }
- echo $this->buffer;
- break;
- case 'D':
- //Download file
- if(isset($HTTP_SERVER_VARS['HTTP_USER_AGENT']) and strpos($HTTP_SERVER_VARS['HTTP_USER_AGENT'],'MSIE'))
- Header('Content-Type: application/force-download');
- else
- Header('Content-Type: application/octet-stream');
- if(headers_sent())
- $this->Error('Some data has already been output to browser, can\'t send PDF file');
- Header('Content-Length: '.strlen($this->buffer));
- Header('Content-disposition: attachment; filename='.$name);
- echo $this->buffer;
- break;
- case 'F':
- //Save to local file
- $f=fopen($name,'wb');
- if(!$f)
- $this->Error('Unable to create output file: '.$name);
- fwrite($f,$this->buffer,strlen($this->buffer));
- fclose($f);
- break;
- case 'S':
- //Return as a string
- return $this->buffer;
- default:
- $this->Error('Incorrect output destination: '.$dest);
- }
- return '';
-}
-
-/*******************************************************************************
-* *
-* Protected methods *
-* *
-*******************************************************************************/
-function _dochecks()
-{
- //Check for locale-related bug
- if(1.1==1)
- $this->Error('Don\'t alter the locale before including class file');
- //Check for decimal separator
- if(sprintf('%.1f',1.0)!='1.0')
- setlocale(LC_NUMERIC,'C');
-}
-
-function _begindoc()
-{
- //Start document
- $this->state=1;
- $this->_out('%PDF-1.3');
-}
-
-function _putpages()
-{
- $nb=$this->page;
- if(!empty($this->AliasNbPages))
- {
- //Replace number of pages
- for($n=1;$n<=$nb;$n++)
- $this->pages[$n]=str_replace($this->AliasNbPages,$nb,$this->pages[$n]);
- }
- if($this->DefOrientation=='P')
- {
- $wPt=$this->fwPt;
- $hPt=$this->fhPt;
- }
- else
- {
- $wPt=$this->fhPt;
- $hPt=$this->fwPt;
- }
- $filter=($this->compress) ? '/Filter /FlateDecode ' : '';
- for($n=1;$n<=$nb;$n++)
- {
- //Page
- $this->_newobj();
- $this->_out('<_out('/Parent 1 0 R');
- if(isset($this->OrientationChanges[$n]))
- $this->_out(sprintf('/MediaBox [0 0 %.2f %.2f]',$hPt,$wPt));
- $this->_out('/Resources 2 0 R');
- if(isset($this->PageLinks[$n]))
- {
- //Links
- $annots='/Annots [';
- foreach($this->PageLinks[$n] as $pl)
- {
- $rect=sprintf('%.2f %.2f %.2f %.2f',$pl[0],$pl[1],$pl[0]+$pl[2],$pl[1]-$pl[3]);
- $annots.='<_textstring($pl[4]).'>>>>';
- else
- {
- $l=$this->links[$pl[4]];
- $h=isset($this->OrientationChanges[$l[0]]) ? $wPt : $hPt;
- $annots.=sprintf('/Dest [%d 0 R /XYZ 0 %.2f null]>>',1+2*$l[0],$h-$l[1]*$this->k);
- }
- }
- $this->_out($annots.']');
- }
- $this->_out('/Contents '.($this->n+1).' 0 R>>');
- $this->_out('endobj');
- //Page content
- $p=($this->compress) ? gzcompress($this->pages[$n]) : $this->pages[$n];
- $this->_newobj();
- $this->_out('<<'.$filter.'/Length '.strlen($p).'>>');
- $this->_putstream($p);
- $this->_out('endobj');
- }
- //Pages root
- $this->offsets[1]=strlen($this->buffer);
- $this->_out('1 0 obj');
- $this->_out('<_out($kids.']');
- $this->_out('/Count '.$nb);
- $this->_out(sprintf('/MediaBox [0 0 %.2f %.2f]',$wPt,$hPt));
- $this->_out('>>');
- $this->_out('endobj');
-}
-
-function _putfonts()
-{
- $nf=$this->n;
- foreach($this->diffs as $diff)
- {
- //Encodings
- $this->_newobj();
- $this->_out('<>');
- $this->_out('endobj');
- }
- $mqr=get_magic_quotes_runtime();
- set_magic_quotes_runtime(0);
- foreach($this->FontFiles as $file=>$info)
- {
- //Font file embedding
- $this->_newobj();
- $this->FontFiles[$file]['n']=$this->n;
- if(defined('FPDF_FONTPATH'))
- $file=FPDF_FONTPATH.$file;
- $size=filesize($file);
- if(!$size)
- $this->Error('Font file not found');
- $this->_out('<_out('/Filter /FlateDecode');
- $this->_out('/Length1 '.$info['length1']);
- if(isset($info['length2']))
- $this->_out('/Length2 '.$info['length2'].' /Length3 0');
- $this->_out('>>');
- $f=fopen($file,'rb');
- $this->_putstream(fread($f,$size));
- fclose($f);
- $this->_out('endobj');
- }
- set_magic_quotes_runtime($mqr);
- foreach($this->fonts as $k=>$font)
- {
- //Font objects
- $this->fonts[$k]['n']=$this->n+1;
- $type=$font['type'];
- $name=$font['name'];
- if($type=='core')
- {
- //Standard font
- $this->_newobj();
- $this->_out('<_out('/BaseFont /'.$name);
- $this->_out('/Subtype /Type1');
- if($name!='Symbol' and $name!='ZapfDingbats')
- $this->_out('/Encoding /WinAnsiEncoding');
- $this->_out('>>');
- $this->_out('endobj');
- }
- elseif($type=='Type1' or $type=='TrueType')
- {
- //Additional Type1 or TrueType font
- $this->_newobj();
- $this->_out('<_out('/BaseFont /'.$name);
- $this->_out('/Subtype /'.$type);
- $this->_out('/FirstChar 32 /LastChar 255');
- $this->_out('/Widths '.($this->n+1).' 0 R');
- $this->_out('/FontDescriptor '.($this->n+2).' 0 R');
- if($font['enc'])
- {
- if(isset($font['diff']))
- $this->_out('/Encoding '.($nf+$font['diff']).' 0 R');
- else
- $this->_out('/Encoding /WinAnsiEncoding');
- }
- $this->_out('>>');
- $this->_out('endobj');
- //Widths
- $this->_newobj();
- $cw=&$font['cw'];
- $s='[';
- for($i=32;$i<=255;$i++)
- $s.=$cw[chr($i)].' ';
- $this->_out($s.']');
- $this->_out('endobj');
- //Descriptor
- $this->_newobj();
- $s='<$v)
- $s.=' /'.$k.' '.$v;
- $file=$font['file'];
- if($file)
- $s.=' /FontFile'.($type=='Type1' ? '' : '2').' '.$this->FontFiles[$file]['n'].' 0 R';
- $this->_out($s.'>>');
- $this->_out('endobj');
- }
- else
- {
- //Allow for additional types
- $mtd='_put'.strtolower($type);
- if(!method_exists($this,$mtd))
- $this->Error('Unsupported font type: '.$type);
- $this->$mtd($font);
- }
- }
-}
-
-function _putimages()
-{
- $filter=($this->compress) ? '/Filter /FlateDecode ' : '';
- reset($this->images);
- while(list($file,$info)=each($this->images))
- {
- $this->_newobj();
- $this->images[$file]['n']=$this->n;
- $this->_out('<_out('/Subtype /Image');
- $this->_out('/Width '.$info['w']);
- $this->_out('/Height '.$info['h']);
- if($info['cs']=='Indexed')
- $this->_out('/ColorSpace [/Indexed /DeviceRGB '.(strlen($info['pal'])/3-1).' '.($this->n+1).' 0 R]');
- else
- {
- $this->_out('/ColorSpace /'.$info['cs']);
- if($info['cs']=='DeviceCMYK')
- $this->_out('/Decode [1 0 1 0 1 0 1 0]');
- }
- $this->_out('/BitsPerComponent '.$info['bpc']);
- $this->_out('/Filter /'.$info['f']);
- if(isset($info['parms']))
- $this->_out($info['parms']);
- if(isset($info['trns']) and is_array($info['trns']))
- {
- $trns='';
- for($i=0;$i_out('/Mask ['.$trns.']');
- }
- $this->_out('/Length '.strlen($info['data']).'>>');
- $this->_putstream($info['data']);
- unset($this->images[$file]['data']);
- $this->_out('endobj');
- //Palette
- if($info['cs']=='Indexed')
- {
- $this->_newobj();
- $pal=($this->compress) ? gzcompress($info['pal']) : $info['pal'];
- $this->_out('<<'.$filter.'/Length '.strlen($pal).'>>');
- $this->_putstream($pal);
- $this->_out('endobj');
- }
- }
-}
-
-function _putresources()
-{
- $this->_putfonts();
- $this->_putimages();
- //Resource dictionary
- $this->offsets[2]=strlen($this->buffer);
- $this->_out('2 0 obj');
- $this->_out('<_out('/Font <<');
- foreach($this->fonts as $font)
- $this->_out('/F'.$font['i'].' '.$font['n'].' 0 R');
- $this->_out('>>');
- if(count($this->images))
- {
- $this->_out('/XObject <<');
- foreach($this->images as $image)
- $this->_out('/I'.$image['i'].' '.$image['n'].' 0 R');
- $this->_out('>>');
- }
- $this->_out('>>');
- $this->_out('endobj');
-}
-
-function _putinfo()
-{
- $this->_out('/Producer '.$this->_textstring('FPDF '.FPDF_VERSION));
- if(!empty($this->title))
- $this->_out('/Title '.$this->_textstring($this->title));
- if(!empty($this->subject))
- $this->_out('/Subject '.$this->_textstring($this->subject));
- if(!empty($this->author))
- $this->_out('/Author '.$this->_textstring($this->author));
- if(!empty($this->keywords))
- $this->_out('/Keywords '.$this->_textstring($this->keywords));
- if(!empty($this->creator))
- $this->_out('/Creator '.$this->_textstring($this->creator));
- $this->_out('/CreationDate '.$this->_textstring('D:'.date('YmdHis')));
-}
-
-function _putcatalog()
-{
- $this->_out('/Type /Catalog');
- $this->_out('/Pages 1 0 R');
- if($this->ZoomMode=='fullpage')
- $this->_out('/OpenAction [3 0 R /Fit]');
- elseif($this->ZoomMode=='fullwidth')
- $this->_out('/OpenAction [3 0 R /FitH null]');
- elseif($this->ZoomMode=='real')
- $this->_out('/OpenAction [3 0 R /XYZ null null 1]');
- elseif(!is_string($this->ZoomMode))
- $this->_out('/OpenAction [3 0 R /XYZ null null '.($this->ZoomMode/100).']');
- if($this->LayoutMode=='single')
- $this->_out('/PageLayout /SinglePage');
- elseif($this->LayoutMode=='continuous')
- $this->_out('/PageLayout /OneColumn');
- elseif($this->LayoutMode=='two')
- $this->_out('/PageLayout /TwoColumnLeft');
-}
-
-function _puttrailer()
-{
- $this->_out('/Size '.($this->n+1));
- $this->_out('/Root '.$this->n.' 0 R');
- $this->_out('/Info '.($this->n-1).' 0 R');
-}
-
-function _enddoc()
-{
- $this->_putpages();
- $this->_putresources();
- //Info
- $this->_newobj();
- $this->_out('<<');
- $this->_putinfo();
- $this->_out('>>');
- $this->_out('endobj');
- //Catalog
- $this->_newobj();
- $this->_out('<<');
- $this->_putcatalog();
- $this->_out('>>');
- $this->_out('endobj');
- //Cross-ref
- $o=strlen($this->buffer);
- $this->_out('xref');
- $this->_out('0 '.($this->n+1));
- $this->_out('0000000000 65535 f ');
- for($i=1;$i<=$this->n;$i++)
- $this->_out(sprintf('%010d 00000 n ',$this->offsets[$i]));
- //Trailer
- $this->_out('trailer');
- $this->_out('<<');
- $this->_puttrailer();
- $this->_out('>>');
- $this->_out('startxref');
- $this->_out($o);
- $this->_out('%%EOF');
- $this->state=3;
-}
-
-function _beginpage($orientation)
-{
- $this->page++;
- $this->pages[$this->page]='';
- $this->state=2;
- $this->x=$this->lMargin;
- $this->y=$this->tMargin;
- $this->FontFamily='';
- //Page orientation
- if(!$orientation)
- $orientation=$this->DefOrientation;
- else
- {
- $orientation=strtoupper($orientation{0});
- if($orientation!=$this->DefOrientation)
- $this->OrientationChanges[$this->page]=true;
- }
- if($orientation!=$this->CurOrientation)
- {
- //Change orientation
- if($orientation=='P')
- {
- $this->wPt=$this->fwPt;
- $this->hPt=$this->fhPt;
- $this->w=$this->fw;
- $this->h=$this->fh;
- }
- else
- {
- $this->wPt=$this->fhPt;
- $this->hPt=$this->fwPt;
- $this->w=$this->fh;
- $this->h=$this->fw;
- }
- $this->PageBreakTrigger=$this->h-$this->bMargin;
- $this->CurOrientation=$orientation;
- }
-}
-
-function _endpage()
-{
- //End of page contents
- $this->state=1;
-}
-
-function _newobj()
-{
- //Begin a new object
- $this->n++;
- $this->offsets[$this->n]=strlen($this->buffer);
- $this->_out($this->n.' 0 obj');
-}
-
-function _dounderline($x,$y,$txt)
-{
- //Underline text
- $up=$this->CurrentFont['up'];
- $ut=$this->CurrentFont['ut'];
- $w=$this->GetStringWidth($txt)+$this->ws*substr_count($txt,' ');
- return sprintf('%.2f %.2f %.2f %.2f re f',$x*$this->k,($this->h-($y-$up/1000*$this->FontSize))*$this->k,$w*$this->k,-$ut/1000*$this->FontSizePt);
-}
-
-function _parsejpg($file)
-{
- //Extract info from a JPEG file
- $a=GetImageSize($file);
- if(!$a)
- $this->Error('Missing or incorrect image file: '.$file);
- if($a[2]!=2)
- $this->Error('Not a JPEG file: '.$file);
- if(!isset($a['channels']) or $a['channels']==3)
- $colspace='DeviceRGB';
- elseif($a['channels']==4)
- $colspace='DeviceCMYK';
- else
- $colspace='DeviceGray';
- $bpc=isset($a['bits']) ? $a['bits'] : 8;
- //Read whole file
- $f=fopen($file,'rb');
- $data='';
- while(!feof($f))
- $data.=fread($f,4096);
- fclose($f);
- return array('w'=>$a[0],'h'=>$a[1],'cs'=>$colspace,'bpc'=>$bpc,'f'=>'DCTDecode','data'=>$data);
-}
-
-function _parsepng($file)
-{
- //Extract info from a PNG file
- $f=fopen($file,'rb');
- if(!$f)
- $this->Error('Can\'t open image file: '.$file);
- //Check signature
- if(fread($f,8)!=chr(137).'PNG'.chr(13).chr(10).chr(26).chr(10))
- $this->Error('Not a PNG file: '.$file);
- //Read header chunk
- fread($f,4);
- if(fread($f,4)!='IHDR')
- $this->Error('Incorrect PNG file: '.$file);
- $w=$this->_freadint($f);
- $h=$this->_freadint($f);
- $bpc=ord(fread($f,1));
- if($bpc>8)
- $this->Error('16-bit depth not supported: '.$file);
- $ct=ord(fread($f,1));
- if($ct==0)
- $colspace='DeviceGray';
- elseif($ct==2)
- $colspace='DeviceRGB';
- elseif($ct==3)
- $colspace='Indexed';
- else
- $this->Error('Alpha channel not supported: '.$file);
- if(ord(fread($f,1))!=0)
- $this->Error('Unknown compression method: '.$file);
- if(ord(fread($f,1))!=0)
- $this->Error('Unknown filter method: '.$file);
- if(ord(fread($f,1))!=0)
- $this->Error('Interlacing not supported: '.$file);
- fread($f,4);
- $parms='/DecodeParms <>';
- //Scan chunks looking for palette, transparency and image data
- $pal='';
- $trns='';
- $data='';
- do
- {
- $n=$this->_freadint($f);
- $type=fread($f,4);
- if($type=='PLTE')
- {
- //Read palette
- $pal=fread($f,$n);
- fread($f,4);
- }
- elseif($type=='tRNS')
- {
- //Read transparency info
- $t=fread($f,$n);
- if($ct==0)
- $trns=array(ord(substr($t,1,1)));
- elseif($ct==2)
- $trns=array(ord(substr($t,1,1)),ord(substr($t,3,1)),ord(substr($t,5,1)));
- else
- {
- $pos=strpos($t,chr(0));
- if(is_int($pos))
- $trns=array($pos);
- }
- fread($f,4);
- }
- elseif($type=='IDAT')
- {
- //Read image data block
- $data.=fread($f,$n);
- fread($f,4);
- }
- elseif($type=='IEND')
- break;
- else
- fread($f,$n+4);
- }
- while($n);
- if($colspace=='Indexed' and empty($pal))
- $this->Error('Missing palette in '.$file);
- fclose($f);
- return array('w'=>$w,'h'=>$h,'cs'=>$colspace,'bpc'=>$bpc,'f'=>'FlateDecode','parms'=>$parms,'pal'=>$pal,'trns'=>$trns,'data'=>$data);
-}
-
-function _freadint($f)
-{
- //Read a 4-byte integer from file
- $i=ord(fread($f,1))<<24;
- $i+=ord(fread($f,1))<<16;
- $i+=ord(fread($f,1))<<8;
- $i+=ord(fread($f,1));
- return $i;
-}
-
-function _textstring($s)
-{
- //Format a text string
- return '('.$this->_escape($s).')';
-}
-
-function _escape($s)
-{
- //Add \ before \, ( and )
- return str_replace(')','\\)',str_replace('(','\\(',str_replace('\\','\\\\',$s)));
-}
-
-function _putstream($s)
-{
- $this->_out('stream');
- $this->_out($s);
- $this->_out('endstream');
-}
-
-function _out($s)
-{
- //Add a line to the document
- if($this->state==2)
- $this->pages[$this->page].=$s."\n";
- else
- $this->buffer.=$s."\n";
-}
-//End of class
-}
-
-//Handle special IE contype request
-if(isset($HTTP_SERVER_VARS['HTTP_USER_AGENT']) and $HTTP_SERVER_VARS['HTTP_USER_AGENT']=='contype')
-{
- Header('Content-Type: application/pdf');
- exit;
-}
-
-}
-?>
diff --git a/include/pdf/tutorial/20k_c1.txt b/include/pdf/tutorial/20k_c1.txt
deleted file mode 100644
index 0b09f265f..000000000
--- a/include/pdf/tutorial/20k_c1.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-The year 1866 was marked by a bizarre development, an unexplained and downright inexplicable phenomenon that surely no one has forgotten. Without getting into those rumors that upset civilians in the seaports and deranged the public mind even far inland, it must be said that professional seamen were especially alarmed. Traders, shipowners, captains of vessels, skippers, and master mariners from Europe and America, naval officers from every country, and at their heels the various national governments on these two continents, were all extremely disturbed by the business.
-In essence, over a period of time several ships had encountered "an enormous thing" at sea, a long spindle-shaped object, sometimes giving off a phosphorescent glow, infinitely bigger and faster than any whale.
-The relevant data on this apparition, as recorded in various logbooks, agreed pretty closely as to the structure of the object or creature in question, its unprecedented speed of movement, its startling locomotive power, and the unique vitality with which it seemed to be gifted. If it was a cetacean, it exceeded in bulk any whale previously classified by science. No naturalist, neither Cuvier nor Lacépède, neither Professor Dumeril nor Professor de Quatrefages, would have accepted the existence of such a monster sight unseen -- specifically, unseen by their own scientific eyes.
-Striking an average of observations taken at different times -- rejecting those timid estimates that gave the object a length of 200 feet, and ignoring those exaggerated views that saw it as a mile wide and three long--you could still assert that this phenomenal creature greatly exceeded the dimensions of anything then known to ichthyologists, if it existed at all.
-Now then, it did exist, this was an undeniable fact; and since the human mind dotes on objects of wonder, you can understand the worldwide excitement caused by this unearthly apparition. As for relegating it to the realm of fiction, that charge had to be dropped.
-In essence, on July 20, 1866, the steamer Governor Higginson, from the Calcutta & Burnach Steam Navigation Co., encountered this moving mass five miles off the eastern shores of Australia. Captain Baker at first thought he was in the presence of an unknown reef; he was even about to fix its exact position when two waterspouts shot out of this inexplicable object and sprang hissing into the air some 150 feet. So, unless this reef was subject to the intermittent eruptions of a geyser, the Governor Higginson had fair and honest dealings with some aquatic mammal, until then unknown, that could spurt from its blowholes waterspouts mixed with air and steam.
-Similar events were likewise observed in Pacific seas, on July 23 of the same year, by the Christopher Columbus from the West India & Pacific Steam Navigation Co. Consequently, this extraordinary cetacean could transfer itself from one locality to another with startling swiftness, since within an interval of just three days, the Governor Higginson and the Christopher Columbus had observed it at two positions on the charts separated by a distance of more than 700 nautical leagues.
-Fifteen days later and 2,000 leagues farther, the Helvetia from the Compagnie Nationale and the Shannon from the Royal Mail line, running on opposite tacks in that part of the Atlantic lying between the United States and Europe, respectively signaled each other that the monster had been sighted in latitude 42 degrees 15' north and longitude 60 degrees 35' west of the meridian of Greenwich. From their simultaneous observations, they were able to estimate the mammal's minimum length at more than 350 English feet; this was because both the Shannon and the Helvetia were of smaller dimensions, although each measured 100 meters stem to stern. Now then, the biggest whales, those rorqual whales that frequent the waterways of the Aleutian Islands, have never exceeded a length of 56 meters--if they reach even that.
-One after another, reports arrived that would profoundly affect public opinion: new observations taken by the transatlantic liner Pereire, the Inman line's Etna running afoul of the monster, an official report drawn up by officers on the French frigate Normandy, dead-earnest reckonings obtained by the general staff of Commodore Fitz-James aboard the Lord Clyde. In lighthearted countries, people joked about this phenomenon, but such serious, practical countries as England, America, and Germany were deeply concerned.
-In every big city the monster was the latest rage; they sang about it in the coffee houses, they ridiculed it in the newspapers, they dramatized it in the theaters. The tabloids found it a fine opportunity for hatching all sorts of hoaxes. In those newspapers short of copy, you saw the reappearance of every gigantic imaginary creature, from "Moby Dick," that dreadful white whale from the High Arctic regions, to the stupendous kraken whose tentacles could entwine a 500-ton craft and drag it into the ocean depths. They even reprinted reports from ancient times: the views of Aristotle and Pliny accepting the existence of such monsters, then the Norwegian stories of Bishop Pontoppidan, the narratives of Paul Egede, and finally the reports of Captain Harrington -- whose good faith is above suspicion--in which he claims he saw, while aboard the Castilian in 1857, one of those enormous serpents that, until then, had frequented only the seas of France's old extremist newspaper, The Constitutionalist.
diff --git a/include/pdf/tutorial/20k_c2.txt b/include/pdf/tutorial/20k_c2.txt
deleted file mode 100644
index 096dbd193..000000000
--- a/include/pdf/tutorial/20k_c2.txt
+++ /dev/null
@@ -1,23 +0,0 @@
-During the period in which these developments were occurring, I had returned from a scientific undertaking organized to explore the Nebraska badlands in the United States. In my capacity as Assistant Professor at the Paris Museum of Natural History, I had been attached to this expedition by the French government. After spending six months in Nebraska, I arrived in New York laden with valuable collections near the end of March. My departure for France was set for early May. In the meantime, then, I was busy classifying my mineralogical, botanical, and zoological treasures when that incident took place with the Scotia.
-I was perfectly abreast of this question, which was the big news of the day, and how could I not have been? I had read and reread every American and European newspaper without being any farther along. This mystery puzzled me. Finding it impossible to form any views, I drifted from one extreme to the other. Something was out there, that much was certain, and any doubting Thomas was invited to place his finger on the Scotia's wound.
-When I arrived in New York, the question was at the boiling point. The hypothesis of a drifting islet or an elusive reef, put forward by people not quite in their right minds, was completely eliminated. And indeed, unless this reef had an engine in its belly, how could it move about with such prodigious speed?
-Also discredited was the idea of a floating hull or some other enormous wreckage, and again because of this speed of movement.
-So only two possible solutions to the question were left, creating two very distinct groups of supporters: on one side, those favoring a monster of colossal strength; on the other, those favoring an "underwater boat" of tremendous motor power.
-Now then, although the latter hypothesis was completely admissible, it couldn't stand up to inquiries conducted in both the New World and the Old. That a private individual had such a mechanism at his disposal was less than probable. Where and when had he built it, and how could he have built it in secret?
-Only some government could own such an engine of destruction, and in these disaster-filled times, when men tax their ingenuity to build increasingly powerful aggressive weapons, it was possible that, unknown to the rest of the world, some nation could have been testing such a fearsome machine. The Chassepot rifle led to the torpedo, and the torpedo has led to this underwater battering ram, which in turn will lead to the world putting its foot down. At least I hope it will.
-But this hypothesis of a war machine collapsed in the face of formal denials from the various governments. Since the public interest was at stake and transoceanic travel was suffering, the sincerity of these governments could not be doubted. Besides, how could the assembly of this underwater boat have escaped public notice? Keeping a secret under such circumstances would be difficult enough for an individual, and certainly impossible for a nation whose every move is under constant surveillance by rival powers.
-So, after inquiries conducted in England, France, Russia, Prussia, Spain, Italy, America, and even Turkey, the hypothesis of an underwater Monitor was ultimately rejected.
-After I arrived in New York, several people did me the honor of consulting me on the phenomenon in question. In France I had published a two-volume work, in quarto, entitled The Mysteries of the Great Ocean Depths. Well received in scholarly circles, this book had established me as a specialist in this pretty obscure field of natural history. My views were in demand. As long as I could deny the reality of the business, I confined myself to a flat "no comment." But soon, pinned to the wall, I had to explain myself straight out. And in this vein, "the honorable Pierre Aronnax, Professor at the Paris Museum," was summoned by The New York Herald to formulate his views no matter what.
-I complied. Since I could no longer hold my tongue, I let it wag. I discussed the question in its every aspect, both political and scientific, and this is an excerpt from the well-padded article I published in the issue of April 30.
-
-"Therefore," I wrote, "after examining these different hypotheses one by one, we are forced, every other supposition having been refuted, to accept the existence of an extremely powerful marine animal.
-"The deepest parts of the ocean are totally unknown to us. No soundings have been able to reach them. What goes on in those distant depths? What creatures inhabit, or could inhabit, those regions twelve or fifteen miles beneath the surface of the water? What is the constitution of these animals? It's almost beyond conjecture.
-"However, the solution to this problem submitted to me can take the form of a choice between two alternatives.
-"Either we know every variety of creature populating our planet, or we do not.
-"If we do not know every one of them, if nature still keeps ichthyological secrets from us, nothing is more admissible than to accept the existence of fish or cetaceans of new species or even new genera, animals with a basically 'cast-iron' constitution that inhabit strata beyond the reach of our soundings, and which some development or other, an urge or a whim if you prefer, can bring to the upper level of the ocean for long intervals.
-"If, on the other hand, we do know every living species, we must look for the animal in question among those marine creatures already cataloged, and in this event I would be inclined to accept the existence of a giant narwhale.
-"The common narwhale, or sea unicorn, often reaches a length of sixty feet. Increase its dimensions fivefold or even tenfold, then give this cetacean a strength in proportion to its size while enlarging its offensive weapons, and you have the animal we're looking for. It would have the proportions determined by the officers of the Shannon, the instrument needed to perforate the Scotia, and the power to pierce a steamer's hull.
-"In essence, the narwhale is armed with a sort of ivory sword, or lance, as certain naturalists have expressed it. It's a king-sized tooth as hard as steel. Some of these teeth have been found buried in the bodies of baleen whales, which the narwhale attacks with invariable success. Others have been wrenched, not without difficulty, from the undersides of vessels that narwhales have pierced clean through, as a gimlet pierces a wine barrel. The museum at the Faculty of Medicine in Paris owns one of these tusks with a length of 2.25 meters and a width at its base of forty-eight centimeters!
-"All right then! Imagine this weapon to be ten times stronger and the animal ten times more powerful, launch it at a speed of twenty miles per hour, multiply its mass times its velocity, and you get just the collision we need to cause the specified catastrophe.
-"So, until information becomes more abundant, I plump for a sea unicorn of colossal dimensions, no longer armed with a mere lance but with an actual spur, like ironclad frigates or those warships called 'rams,' whose mass and motor power it would possess simultaneously.
-"This inexplicable phenomenon is thus explained away--unless it's something else entirely, which, despite everything that has been sighted, studied, explored and experienced, is still possible!"
diff --git a/include/pdf/tutorial/calligra.afm b/include/pdf/tutorial/calligra.afm
deleted file mode 100644
index 806685eae..000000000
--- a/include/pdf/tutorial/calligra.afm
+++ /dev/null
@@ -1,275 +0,0 @@
-StartFontMetrics 4.1
-FontName Calligrapher-Regular
-FullName Calligrapher Regular
-Notice Generated by Fontographer 3.5
-EncodingScheme FontSpecific
-FamilyName Calligrapher
-Weight Regular
-Version (Altsys Fontographer 3.5 5/26/92)
-Characters 215
-ItalicAngle 0.0
-Ascender 899
-Descender -234
-UnderlineThickness 20
-UnderlinePosition -200
-IsFixedPitch false
-FontBBox -50 -234 1328 899
-StartCharMetrics 256
-C 0 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 1 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 2 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 3 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 4 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 5 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 6 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 7 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 8 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 9 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 10 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 11 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 12 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 13 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 14 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 15 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 16 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 17 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 18 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 19 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 20 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 21 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 22 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 23 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 24 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 25 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 26 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 27 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 28 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 29 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 30 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 31 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 32 ; WX 282 ; N space ; B 67 -16 251 718 ;
-C 33 ; WX 324 ; N exclam ; B 67 -16 251 718 ;
-C 34 ; WX 405 ; N quotedbl ; B 60 460 353 718 ;
-C 35 ; WX 584 ; N numbersign ; B 35 0 549 701 ;
-C 36 ; WX 632 ; N dollar ; B 32 -126 595 814 ;
-C 37 ; WX 980 ; N percent ; B 35 -16 945 703 ;
-C 38 ; WX 776 ; N ampersand ; B 41 -17 811 670 ;
-C 39 ; WX 259 ; N quotesingle ; B 72 460 206 718 ;
-C 40 ; WX 299 ; N parenleft ; B 57 -119 299 785 ;
-C 41 ; WX 299 ; N parenright ; B 0 -119 242 785 ;
-C 42 ; WX 377 ; N asterisk ; B 35 407 342 714 ;
-C 43 ; WX 600 ; N plus ; B 47 0 553 506 ;
-C 44 ; WX 259 ; N comma ; B 35 -67 224 162 ;
-C 45 ; WX 432 ; N hyphen ; B 28 249 404 377 ;
-C 46 ; WX 254 ; N period ; B 43 -16 227 162 ;
-C 47 ; WX 597 ; N slash ; B 7 -14 591 714 ;
-C 48 ; WX 529 ; N zero ; B 21 -18 508 583 ;
-C 49 ; WX 298 ; N one ; B 8 -15 233 582 ;
-C 50 ; WX 451 ; N two ; B 17 -8 430 588 ;
-C 51 ; WX 359 ; N three ; B 11 -54 337 582 ;
-C 52 ; WX 525 ; N four ; B 18 -20 519 602 ;
-C 53 ; WX 423 ; N five ; B 10 -55 420 582 ;
-C 54 ; WX 464 ; N six ; B 23 -14 447 589 ;
-C 55 ; WX 417 ; N seven ; B 8 -18 415 589 ;
-C 56 ; WX 457 ; N eight ; B 19 -16 432 583 ;
-C 57 ; WX 479 ; N nine ; B 26 -16 450 588 ;
-C 58 ; WX 275 ; N colon ; B 59 -16 242 491 ;
-C 59 ; WX 282 ; N semicolon ; B 54 -67 245 491 ;
-C 60 ; WX 600 ; N less ; B 47 -8 553 514 ;
-C 61 ; WX 600 ; N equal ; B 47 98 553 408 ;
-C 62 ; WX 600 ; N greater ; B 47 -8 553 514 ;
-C 63 ; WX 501 ; N question ; B 21 -16 473 721 ;
-C 64 ; WX 800 ; N at ; B 29 -12 771 730 ;
-C 65 ; WX 743 ; N A ; B -23 -14 754 723 ;
-C 66 ; WX 636 ; N B ; B -42 -7 608 706 ;
-C 67 ; WX 598 ; N C ; B 27 -12 572 712 ;
-C 68 ; WX 712 ; N D ; B -42 -11 684 705 ;
-C 69 ; WX 608 ; N E ; B -21 0 608 708 ;
-C 70 ; WX 562 ; N F ; B -21 -18 584 716 ;
-C 71 ; WX 680 ; N G ; B 29 -8 668 714 ;
-C 72 ; WX 756 ; N H ; B 70 -17 777 728 ;
-C 73 ; WX 308 ; N I ; B 14 -15 238 718 ;
-C 74 ; WX 314 ; N J ; B 7 -223 244 727 ;
-C 75 ; WX 676 ; N K ; B 14 -16 683 725 ;
-C 76 ; WX 552 ; N L ; B 14 -8 580 713 ;
-C 77 ; WX 1041 ; N M ; B 42 -17 1017 739 ;
-C 78 ; WX 817 ; N N ; B -42 -17 747 736 ;
-C 79 ; WX 729 ; N O ; B 32 -16 698 709 ;
-C 80 ; WX 569 ; N P ; B -35 -15 570 716 ;
-C 81 ; WX 698 ; N Q ; B 27 -201 1328 715 ;
-C 82 ; WX 674 ; N R ; B -35 -20 696 712 ;
-C 83 ; WX 618 ; N S ; B 31 -16 589 709 ;
-C 84 ; WX 673 ; N T ; B -21 -20 702 714 ;
-C 85 ; WX 805 ; N U ; B 0 -19 804 722 ;
-C 86 ; WX 753 ; N V ; B -28 -20 788 729 ;
-C 87 ; WX 1238 ; N W ; B -28 -17 1273 736 ;
-C 88 ; WX 716 ; N X ; B 7 -38 709 731 ;
-C 89 ; WX 754 ; N Y ; B -35 -17 789 747 ;
-C 90 ; WX 599 ; N Z ; B 30 -5 584 748 ;
-C 91 ; WX 315 ; N bracketleft ; B 93 -124 322 718 ;
-C 92 ; WX 463 ; N backslash ; B -21 -18 484 736 ;
-C 93 ; WX 315 ; N bracketright ; B -7 -124 222 718 ;
-C 94 ; WX 600 ; N asciicircum ; B 63 266 537 658 ;
-C 95 ; WX 547 ; N underscore ; B -7 -198 554 -163 ;
-C 96 ; WX 278 ; N grave ; B -1 541 214 693 ;
-C 97 ; WX 581 ; N a ; B 21 -16 581 494 ;
-C 98 ; WX 564 ; N b ; B -24 -17 543 793 ;
-C 99 ; WX 440 ; N c ; B 21 -17 422 490 ;
-C 100 ; WX 571 ; N d ; B 0 -15 550 659 ;
-C 101 ; WX 450 ; N e ; B 28 -23 428 493 ;
-C 102 ; WX 347 ; N f ; B -35 -14 474 785 ;
-C 103 ; WX 628 ; N g ; B 19 -219 612 496 ;
-C 104 ; WX 611 ; N h ; B -29 -18 569 785 ;
-C 105 ; WX 283 ; N i ; B -14 -15 241 679 ;
-C 106 ; WX 283 ; N j ; B -14 -234 241 679 ;
-C 107 ; WX 560 ; N k ; B -24 -15 582 789 ;
-C 108 ; WX 252 ; N l ; B -28 -15 210 789 ;
-C 109 ; WX 976 ; N m ; B -21 -16 927 494 ;
-C 110 ; WX 595 ; N n ; B -28 -15 574 493 ;
-C 111 ; WX 508 ; N o ; B 27 -17 485 490 ;
-C 112 ; WX 549 ; N p ; B -28 -216 526 496 ;
-C 113 ; WX 540 ; N q ; B 28 -219 491 493 ;
-C 114 ; WX 395 ; N r ; B -21 -19 430 492 ;
-C 115 ; WX 441 ; N s ; B 34 -15 413 493 ;
-C 116 ; WX 307 ; N t ; B -21 -16 378 621 ;
-C 117 ; WX 614 ; N u ; B -14 -18 558 501 ;
-C 118 ; WX 556 ; N v ; B -28 -20 569 483 ;
-C 119 ; WX 915 ; N w ; B -28 -17 928 495 ;
-C 120 ; WX 559 ; N x ; B 14 -17 546 500 ;
-C 121 ; WX 597 ; N y ; B -21 -227 541 500 ;
-C 122 ; WX 452 ; N z ; B 28 -5 442 515 ;
-C 123 ; WX 315 ; N braceleft ; B 6 -118 309 718 ;
-C 124 ; WX 222 ; N bar ; B 63 -18 159 730 ;
-C 125 ; WX 315 ; N braceright ; B 6 -118 309 718 ;
-C 126 ; WX 600 ; N asciitilde ; B 69 166 531 340 ;
-C 127 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 128 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 129 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 130 ; WX 0 ; N quotesinglbase ; B -23 -14 754 877 ;
-C 131 ; WX 0 ; N florin ; B 0 -19 804 854 ;
-C 132 ; WX 0 ; N quotedblbase ; B -23 -14 754 877 ;
-C 133 ; WX 780 ; N ellipsis ; B 43 -16 747 162 ;
-C 134 ; WX 0 ; N dagger ; B 27 -122 437 592 ;
-C 135 ; WX 0 ; N daggerdbl ; B 43 278 227 456 ;
-C 136 ; WX 278 ; N circumflex ; B -14 557 292 677 ;
-C 137 ; WX 0 ; N perthousand ; B -23 -14 754 877 ;
-C 138 ; WX 0 ; N Scaron ; B 0 0 0 100 ;
-C 139 ; WX 0 ; N guilsinglleft ; B 43 278 227 456 ;
-C 140 ; WX 1064 ; N OE ; B 32 -16 1055 709 ;
-C 141 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 142 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 143 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 144 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 145 ; WX 259 ; N quoteleft ; B 35 489 224 717 ;
-C 146 ; WX 259 ; N quoteright ; B 35 489 224 717 ;
-C 147 ; WX 470 ; N quotedblleft ; B 35 489 443 717 ;
-C 148 ; WX 470 ; N quotedblright ; B 35 487 443 717 ;
-C 149 ; WX 500 ; N bullet ; B 70 179 430 539 ;
-C 150 ; WX 300 ; N endash ; B 0 245 300 350 ;
-C 151 ; WX 600 ; N emdash ; B 0 245 600 350 ;
-C 152 ; WX 278 ; N tilde ; B -44 563 326 689 ;
-C 153 ; WX 990 ; N trademark ; B 62 306 928 718 ;
-C 154 ; WX 0 ; N scaron ; B 0 0 0 100 ;
-C 155 ; WX 0 ; N guilsinglright ; B 43 278 227 456 ;
-C 156 ; WX 790 ; N oe ; B 27 -23 764 493 ;
-C 157 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 158 ; WX 800 ; N .notdef ; B 50 0 750 800 ;
-C 159 ; WX 754 ; N Ydieresis ; B -35 -17 789 882 ;
-C 160 ; WX 282 ; N nbspace ; B -23 -14 754 893 ;
-C 161 ; WX 324 ; N exclamdown ; B 69 -203 253 531 ;
-C 162 ; WX 450 ; N cent ; B 27 -122 437 592 ;
-C 163 ; WX 640 ; N sterling ; B 0 -9 619 716 ;
-C 164 ; WX 518 ; N currency ; B 3 72 515 586 ;
-C 165 ; WX 603 ; N yen ; B -28 -65 631 747 ;
-C 166 ; WX 0 ; N brokenbar ; B 0 0 0 100 ;
-C 167 ; WX 519 ; N section ; B -50 -216 524 762 ;
-C 168 ; WX 254 ; N dieresis ; B -20 554 308 682 ;
-C 169 ; WX 800 ; N copyright ; B 29 -12 771 730 ;
-C 170 ; WX 349 ; N ordfeminine ; B 13 385 349 717 ;
-C 171 ; WX 0 ; N guillemotleft ; B 43 -16 747 162 ;
-C 172 ; WX 0 ; N logicalnot ; B 30 0 730 700 ;
-C 173 ; WX 432 ; N hyphen ; B 28 249 404 377 ;
-C 174 ; WX 800 ; N registered ; B 29 -12 771 730 ;
-C 175 ; WX 278 ; N macron ; B -47 584 325 665 ;
-C 176 ; WX 0 ; N degree ; B 27 -122 437 592 ;
-C 177 ; WX 0 ; N plusminus ; B 29 -8 668 877 ;
-C 178 ; WX 0 ; N twosuperior ; B 0 0 0 100 ;
-C 179 ; WX 0 ; N threesuperior ; B 0 0 0 100 ;
-C 180 ; WX 278 ; N acute ; B 49 536 279 693 ;
-C 181 ; WX 614 ; N mu ; B -14 -231 558 501 ;
-C 182 ; WX 0 ; N paragraph ; B -35 -15 668 785 ;
-C 183 ; WX 254 ; N periodcentered ; B 43 278 227 456 ;
-C 184 ; WX 278 ; N cedilla ; B -8 -216 231 6 ;
-C 185 ; WX 0 ; N onesuperior ; B 0 0 0 100 ;
-C 186 ; WX 305 ; N ordmasculine ; B 16 373 291 702 ;
-C 187 ; WX 0 ; N guillemotright ; B 43 -16 747 162 ;
-C 188 ; WX 0 ; N onequarter ; B 0 0 0 100 ;
-C 189 ; WX 0 ; N onehalf ; B 0 0 0 100 ;
-C 190 ; WX 0 ; N threequarters ; B 0 0 0 100 ;
-C 191 ; WX 501 ; N questiondown ; B 15 -196 467 541 ;
-C 192 ; WX 743 ; N Agrave ; B -23 -14 754 893 ;
-C 193 ; WX 743 ; N Aacute ; B -23 -14 754 893 ;
-C 194 ; WX 743 ; N Acircumflex ; B -23 -14 754 877 ;
-C 195 ; WX 743 ; N Atilde ; B -23 -14 754 889 ;
-C 196 ; WX 743 ; N Adieresis ; B -23 -14 754 882 ;
-C 197 ; WX 743 ; N Aring ; B -23 -14 754 899 ;
-C 198 ; WX 1060 ; N AE ; B -29 -14 1053 708 ;
-C 199 ; WX 598 ; N Ccedilla ; B 27 -183 572 712 ;
-C 200 ; WX 608 ; N Egrave ; B -21 0 608 893 ;
-C 201 ; WX 608 ; N Eacute ; B -21 0 608 893 ;
-C 202 ; WX 608 ; N Ecircumflex ; B -21 0 608 877 ;
-C 203 ; WX 608 ; N Edieresis ; B -21 0 608 882 ;
-C 204 ; WX 308 ; N Igrave ; B 14 -15 264 893 ;
-C 205 ; WX 308 ; N Iacute ; B 14 -15 274 893 ;
-C 206 ; WX 308 ; N Icircumflex ; B 1 -15 307 877 ;
-C 207 ; WX 308 ; N Idieresis ; B -15 -15 313 882 ;
-C 208 ; WX 0 ; N Eth ; B 0 0 0 100 ;
-C 209 ; WX 817 ; N Ntilde ; B -42 -17 747 889 ;
-C 210 ; WX 729 ; N Ograve ; B 32 -16 698 893 ;
-C 211 ; WX 729 ; N Oacute ; B 32 -16 698 893 ;
-C 212 ; WX 729 ; N Ocircumflex ; B 32 -16 698 877 ;
-C 213 ; WX 729 ; N Otilde ; B 32 -16 698 889 ;
-C 214 ; WX 729 ; N Odieresis ; B 32 -16 698 882 ;
-C 215 ; WX 0 ; N multiply ; B 0 0 0 100 ;
-C 216 ; WX 729 ; N Oslash ; B 14 -24 724 709 ;
-C 217 ; WX 805 ; N Ugrave ; B 0 -19 804 893 ;
-C 218 ; WX 805 ; N Uacute ; B 0 -19 804 893 ;
-C 219 ; WX 805 ; N Ucircumflex ; B 0 -19 804 877 ;
-C 220 ; WX 805 ; N Udieresis ; B 0 -19 804 882 ;
-C 221 ; WX 0 ; N _235 ; B 0 0 0 100 ;
-C 222 ; WX 0 ; N Thorn ; B 0 0 0 100 ;
-C 223 ; WX 688 ; N germandbls ; B -35 -15 668 785 ;
-C 224 ; WX 581 ; N agrave ; B 21 -16 581 693 ;
-C 225 ; WX 581 ; N aacute ; B 21 -16 581 693 ;
-C 226 ; WX 581 ; N acircumflex ; B 21 -16 581 677 ;
-C 227 ; WX 581 ; N atilde ; B 21 -16 581 689 ;
-C 228 ; WX 581 ; N adieresis ; B 21 -16 581 682 ;
-C 229 ; WX 581 ; N aring ; B 21 -16 581 734 ;
-C 230 ; WX 792 ; N ae ; B 21 -23 773 494 ;
-C 231 ; WX 440 ; N ccedilla ; B 21 -183 422 490 ;
-C 232 ; WX 450 ; N egrave ; B 28 -23 428 693 ;
-C 233 ; WX 450 ; N eacute ; B 28 -23 428 693 ;
-C 234 ; WX 450 ; N ecircumflex ; B 28 -23 432 677 ;
-C 235 ; WX 450 ; N edieresis ; B 28 -23 428 682 ;
-C 236 ; WX 283 ; N igrave ; B -14 -15 244 693 ;
-C 237 ; WX 283 ; N iacute ; B -14 -15 269 693 ;
-C 238 ; WX 283 ; N icircumflex ; B -14 -15 297 677 ;
-C 239 ; WX 283 ; N idieresis ; B -25 -15 303 682 ;
-C 240 ; WX 0 ; N Yacute ; B 0 0 0 100 ;
-C 241 ; WX 595 ; N ntilde ; B -28 -15 574 689 ;
-C 242 ; WX 508 ; N ograve ; B 27 -17 485 693 ;
-C 243 ; WX 508 ; N oacute ; B 27 -17 485 693 ;
-C 244 ; WX 508 ; N ocircumflex ; B 27 -17 485 677 ;
-C 245 ; WX 508 ; N otilde ; B 27 -17 485 689 ;
-C 246 ; WX 508 ; N odieresis ; B 27 -17 485 682 ;
-C 247 ; WX 0 ; N divide ; B 35 0 760 727 ;
-C 248 ; WX 508 ; N oslash ; B -8 -54 496 589 ;
-C 249 ; WX 614 ; N ugrave ; B -14 -18 558 693 ;
-C 250 ; WX 614 ; N uacute ; B -14 -18 558 693 ;
-C 251 ; WX 614 ; N ucircumflex ; B -14 -18 558 677 ;
-C 252 ; WX 614 ; N udieresis ; B -14 -18 558 682 ;
-C 253 ; WX 0 ; N yacute ; B 0 0 0 100 ;
-C 254 ; WX 0 ; N thorn ; B 0 0 0 100 ;
-C 255 ; WX 597 ; N ydieresis ; B -21 -227 541 682 ;
-EndCharMetrics
-EndFontMetrics
diff --git a/include/pdf/tutorial/calligra.php b/include/pdf/tutorial/calligra.php
deleted file mode 100644
index 1af82ac82..000000000
--- a/include/pdf/tutorial/calligra.php
+++ /dev/null
@@ -1,24 +0,0 @@
-899,'Descent'=>-234,'CapHeight'=>731,'Flags'=>32,'FontBBox'=>'[-50 -234 1328 899]','ItalicAngle'=>0,'StemV'=>70,'MissingWidth'=>800);
-$up=-200;
-$ut=20;
-$cw=array(
- chr(0)=>800,chr(1)=>800,chr(2)=>800,chr(3)=>800,chr(4)=>800,chr(5)=>800,chr(6)=>800,chr(7)=>800,chr(8)=>800,chr(9)=>800,chr(10)=>800,chr(11)=>800,chr(12)=>800,chr(13)=>800,chr(14)=>800,chr(15)=>800,chr(16)=>800,chr(17)=>800,chr(18)=>800,chr(19)=>800,chr(20)=>800,chr(21)=>800,
- chr(22)=>800,chr(23)=>800,chr(24)=>800,chr(25)=>800,chr(26)=>800,chr(27)=>800,chr(28)=>800,chr(29)=>800,chr(30)=>800,chr(31)=>800,' '=>282,'!'=>324,'"'=>405,'#'=>584,'$'=>632,'%'=>980,'&'=>776,'\''=>259,'('=>299,')'=>299,'*'=>377,'+'=>600,
- ','=>259,'-'=>432,'.'=>254,'/'=>597,'0'=>529,'1'=>298,'2'=>451,'3'=>359,'4'=>525,'5'=>423,'6'=>464,'7'=>417,'8'=>457,'9'=>479,':'=>275,';'=>282,'<'=>600,'='=>600,'>'=>600,'?'=>501,'@'=>800,'A'=>743,
- 'B'=>636,'C'=>598,'D'=>712,'E'=>608,'F'=>562,'G'=>680,'H'=>756,'I'=>308,'J'=>314,'K'=>676,'L'=>552,'M'=>1041,'N'=>817,'O'=>729,'P'=>569,'Q'=>698,'R'=>674,'S'=>618,'T'=>673,'U'=>805,'V'=>753,'W'=>1238,
- 'X'=>716,'Y'=>754,'Z'=>599,'['=>315,'\\'=>463,']'=>315,'^'=>600,'_'=>547,'`'=>278,'a'=>581,'b'=>564,'c'=>440,'d'=>571,'e'=>450,'f'=>347,'g'=>628,'h'=>611,'i'=>283,'j'=>283,'k'=>560,'l'=>252,'m'=>976,
- 'n'=>595,'o'=>508,'p'=>549,'q'=>540,'r'=>395,'s'=>441,'t'=>307,'u'=>614,'v'=>556,'w'=>915,'x'=>559,'y'=>597,'z'=>452,'{'=>315,'|'=>222,'}'=>315,'~'=>600,chr(127)=>800,chr(128)=>800,chr(129)=>800,chr(130)=>0,chr(131)=>0,
- chr(132)=>0,chr(133)=>780,chr(134)=>0,chr(135)=>0,chr(136)=>278,chr(137)=>0,chr(138)=>0,chr(139)=>0,chr(140)=>1064,chr(141)=>800,chr(142)=>800,chr(143)=>800,chr(144)=>800,chr(145)=>259,chr(146)=>259,chr(147)=>470,chr(148)=>470,chr(149)=>500,chr(150)=>300,chr(151)=>600,chr(152)=>278,chr(153)=>990,
- chr(154)=>0,chr(155)=>0,chr(156)=>790,chr(157)=>800,chr(158)=>800,chr(159)=>754,chr(160)=>282,chr(161)=>324,chr(162)=>450,chr(163)=>640,chr(164)=>518,chr(165)=>603,chr(166)=>0,chr(167)=>519,chr(168)=>254,chr(169)=>800,chr(170)=>349,chr(171)=>0,chr(172)=>0,chr(173)=>432,chr(174)=>800,chr(175)=>278,
- chr(176)=>0,chr(177)=>0,chr(178)=>0,chr(179)=>0,chr(180)=>278,chr(181)=>614,chr(182)=>0,chr(183)=>254,chr(184)=>278,chr(185)=>0,chr(186)=>305,chr(187)=>0,chr(188)=>0,chr(189)=>0,chr(190)=>0,chr(191)=>501,chr(192)=>743,chr(193)=>743,chr(194)=>743,chr(195)=>743,chr(196)=>743,chr(197)=>743,
- chr(198)=>1060,chr(199)=>598,chr(200)=>608,chr(201)=>608,chr(202)=>608,chr(203)=>608,chr(204)=>308,chr(205)=>308,chr(206)=>308,chr(207)=>308,chr(208)=>0,chr(209)=>817,chr(210)=>729,chr(211)=>729,chr(212)=>729,chr(213)=>729,chr(214)=>729,chr(215)=>0,chr(216)=>729,chr(217)=>805,chr(218)=>805,chr(219)=>805,
- chr(220)=>805,chr(221)=>0,chr(222)=>0,chr(223)=>688,chr(224)=>581,chr(225)=>581,chr(226)=>581,chr(227)=>581,chr(228)=>581,chr(229)=>581,chr(230)=>792,chr(231)=>440,chr(232)=>450,chr(233)=>450,chr(234)=>450,chr(235)=>450,chr(236)=>283,chr(237)=>283,chr(238)=>283,chr(239)=>283,chr(240)=>800,chr(241)=>595,
- chr(242)=>508,chr(243)=>508,chr(244)=>508,chr(245)=>508,chr(246)=>508,chr(247)=>0,chr(248)=>508,chr(249)=>614,chr(250)=>614,chr(251)=>614,chr(252)=>614,chr(253)=>0,chr(254)=>0,chr(255)=>597);
-$enc='cp1252';
-$diff='';
-$file='calligra.z';
-$originalsize=40120;
-?>
diff --git a/include/pdf/tutorial/calligra.ttf b/include/pdf/tutorial/calligra.ttf
deleted file mode 100644
index 9713c468c..000000000
Binary files a/include/pdf/tutorial/calligra.ttf and /dev/null differ
diff --git a/include/pdf/tutorial/calligra.z b/include/pdf/tutorial/calligra.z
deleted file mode 100644
index 1c0bebd20..000000000
Binary files a/include/pdf/tutorial/calligra.z and /dev/null differ
diff --git a/include/pdf/tutorial/countries.txt b/include/pdf/tutorial/countries.txt
deleted file mode 100644
index aa8886cc3..000000000
--- a/include/pdf/tutorial/countries.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-Austria;Vienna;83859;8075
-Belgium;Brussels;30518;10192
-Denmark;Copenhagen;43094;5295
-Finland;Helsinki;304529;5147
-France;Paris;543965;58728
-Germany;Berlin;357022;82057
-Greece;Athens;131625;10511
-Ireland;Dublin;70723;3694
-Italy;Roma;301316;57563
-Luxembourg;Luxembourg;2586;424
-Netherlands;Amsterdam;41526;15654
-Portugal;Lisbon;91906;9957
-Spain;Madrid;504790;39348
-Sweden;Stockholm;410934;8839
-United Kingdom;London;243820;58862
diff --git a/include/pdf/tutorial/index.htm b/include/pdf/tutorial/index.htm
deleted file mode 100644
index 6df359643..000000000
--- a/include/pdf/tutorial/index.htm
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-Tutorials
-
-
-
-
Tutorials
-The different examples rapidly show how to use FPDF. You will find all main features explained.
-Tutorial 1: Minimal example
-Tutorial 2: Header, footer, page break and image
-Tutorial 3: Line breaks and colors
-Tutorial 4: Multi-columns
-Tutorial 5: Tables
-Tutorial 6: Links and flowing text
-Tutorial 7: Adding new fonts and encoding support
-
-
diff --git a/include/pdf/tutorial/logo.png b/include/pdf/tutorial/logo.png
deleted file mode 100644
index 284a0071c..000000000
Binary files a/include/pdf/tutorial/logo.png and /dev/null differ
diff --git a/include/pdf/tutorial/logo_pb.png b/include/pdf/tutorial/logo_pb.png
deleted file mode 100644
index e6827c15e..000000000
Binary files a/include/pdf/tutorial/logo_pb.png and /dev/null differ
diff --git a/include/pdf/tutorial/makefont.php b/include/pdf/tutorial/makefont.php
deleted file mode 100644
index 3773429bd..000000000
--- a/include/pdf/tutorial/makefont.php
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/include/pdf/tutorial/tuto1.htm b/include/pdf/tutorial/tuto1.htm
deleted file mode 100644
index 34f0480b7..000000000
--- a/include/pdf/tutorial/tuto1.htm
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-Minimal example
-
-
-
-
-
-The first line defines where the font directory resides, relative to the current directory.
-Then, after including the library file, we create an FPDF object.
-The FPDF() constructor is used here with the default values: pages are in A4 portrait and
-the measure unit is millimeter. It could have been specified explicitly with:
-
-
-
-
-$pdf=new FPDF('P','mm','A4');
-
-
-It is possible to use landscape (L), other page formats (such as Letter and
-Legal) and measure units (pt, cm, in).
-
-
-There is no page for the moment, so we have to add one with AddPage(). The origin
-is at the upper-left corner and the current position is by default placed at 1 cm from the
-borders; the margins can be changed with SetMargins().
-
-
-Before we can print text, it is mandatory to select a font with SetFont(), otherwise the
-document would be invalid. We choose Arial bold 16:
-
-
-
-
-$pdf->SetFont('Arial','B',16);
-
-
-We could have specified italics with I, underlined with U or a regular font with an empty string
-(or any combination). Note that the font size is given in points, not millimeters (or another
-user unit); it is the only exception. The other standard fonts are Times, Courier, Symbol and
-ZapfDingbats.
-
-
-We can now print a cell with Cell(). A cell is a rectangular area, possibly framed,
-which contains some text. It is output at the current position. We specify its dimensions,
-its text (centered or aligned), if borders should be drawn, and where the current position
-moves after it (to the right, below or to the beginning of the next line). To add a frame, we would do this:
-
-
-
-
-$pdf->Cell(40,10,'Hello World !',1);
-
-
-To add a new cell next to it with centered text and go to the next line, we would do:
-
-
-
-
-$pdf->Cell(60,10,'Powered by FPDF.',0,1,'C');
-
-
-Remark : the line break can also be done with Ln(). This method allows to specify
-in addition the height of the break.
-
-
-Finally, the document is closed and sent to the browser with Output(). We could have saved
-it in a file by passing the desired file name.
-
-
-Caution: in case when the PDF is sent to the browser, nothing else must be output, not before
-nor after (the least space or carriage return matters). If you send some data before, you will
-get the error message: "Some data has already been output to browser, can't send PDF file". If
-you send after, your browser may display a blank page.
-
-
diff --git a/include/pdf/tutorial/tuto1.php b/include/pdf/tutorial/tuto1.php
deleted file mode 100644
index 14b836242..000000000
--- a/include/pdf/tutorial/tuto1.php
+++ /dev/null
@@ -1,10 +0,0 @@
-AddPage();
-$pdf->SetFont('Arial','B',16);
-$pdf->Cell(40,10,'Hello World!');
-$pdf->Output();
-?>
diff --git a/include/pdf/tutorial/tuto2.htm b/include/pdf/tutorial/tuto2.htm
deleted file mode 100644
index 22e052d00..000000000
--- a/include/pdf/tutorial/tuto2.htm
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
-Header, footer, page break and image
-
-
-
-
Header, footer, page break and image
-Here is a two page example with header, footer and logo:
-
-
-
class PDF extends FPDF { //Page header function Header() { //Logo $this->Image('logo_pb.png',10,8,33); //Arial bold 15 $this->SetFont('Arial','B',15); //Move to the right $this->Cell(80); //Title $this->Cell(30,10,'Title',1,0,'C'); //Line break $this->Ln(20); }
//Page footer function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); //Arial italic 8 $this->SetFont('Arial','I',8); //Page number $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); } }
//Instanciation of inherited class $pdf=new PDF(); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Times','',12); for($i=1;$i<=40;$i++) $pdf->Cell(0,10,'Printing line number '.$i,0,1); $pdf->Output(); ?>
-
-
-
-This example makes use of the Header() and Footer() methods to process page headers and
-footers. They are called automatically. They already exist in the FPDF class but do nothing,
-therefore we have to extend the class and override them.
-
-
-The logo is printed with the Image() method by specifying its upper-left corner and
-its width. The height is calculated automatically to respect the image proportions.
-
-
-To print the page number, a null value is passed as the cell width. It means that the cell
-should extend up to the right margin of the page; it is handy to center text. The current page
-number is returned by the PageNo() method; as for the total number of pages, it is obtained
-by means of the special value {nb} which will be substituted on document closure
-(provided you first called AliasNbPages()).
-
-Note the use of the SetY() method which allows to set position at an absolute location in
-the page, starting from the top or the bottom.
-
-
-Another interesting feature is used here: the automatic page breaking. As soon as a cell would
-cross a limit in the page (at 2 centimeters from the bottom by default), a break is performed
-and the font restored. Although the header and footer select their own font (Arial), the body
-continues with Times. This mechanism of automatic restoration also applies to colors and line
-width. The limit which triggers page breaks can be set with SetAutoPageBreak().
-
-
diff --git a/include/pdf/tutorial/tuto2.php b/include/pdf/tutorial/tuto2.php
deleted file mode 100644
index 1bb8ddd05..000000000
--- a/include/pdf/tutorial/tuto2.php
+++ /dev/null
@@ -1,42 +0,0 @@
-Image('logo_pb.png',10,8,33);
- //Arial bold 15
- $this->SetFont('Arial','B',15);
- //Move to the right
- $this->Cell(80);
- //Title
- $this->Cell(30,10,'Title',1,0,'C');
- //Line break
- $this->Ln(20);
-}
-
-//Page footer
-function Footer()
-{
- //Position at 1.5 cm from bottom
- $this->SetY(-15);
- //Arial italic 8
- $this->SetFont('Arial','I',8);
- //Page number
- $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');
-}
-}
-
-//Instanciation of inherited class
-$pdf=new PDF();
-$pdf->AliasNbPages();
-$pdf->AddPage();
-$pdf->SetFont('Times','',12);
-for($i=1;$i<=40;$i++)
- $pdf->Cell(0,10,'Printing line number '.$i,0,1);
-$pdf->Output();
-?>
diff --git a/include/pdf/tutorial/tuto3.htm b/include/pdf/tutorial/tuto3.htm
deleted file mode 100644
index 41e434c17..000000000
--- a/include/pdf/tutorial/tuto3.htm
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-Line breaks and colors
-
-
-
-
Line breaks and colors
-Let's continue with an example which prints justified paragraphs. It also illustrates the use
-of colors.
-
-
-
class PDF extends FPDF { function Header() { global $title;
//Arial bold 15 $this->SetFont('Arial','B',15); //Calculate width of title and position $w=$this->GetStringWidth($title)+6; $this->SetX((210-$w)/2); //Colors of frame, background and text $this->SetDrawColor(0,80,180); $this->SetFillColor(230,230,0); $this->SetTextColor(220,50,50); //Thickness of frame (1 mm) $this->SetLineWidth(1); //Title $this->Cell($w,9,$title,1,1,'C',1); //Line break $this->Ln(10); }
function Footer() { //Position at 1.5 cm from bottom $this->SetY(-15); //Arial italic 8 $this->SetFont('Arial','I',8); //Text color in gray $this->SetTextColor(128); //Page number $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C'); }
function ChapterTitle($num,$label) { //Arial 12 $this->SetFont('Arial','',12); //Background color $this->SetFillColor(200,220,255); //Title $this->Cell(0,6,"Chapter $num : $label",0,1,'L',1); //Line break $this->Ln(4); }
function ChapterBody($file) { //Read text file $f=fopen($file,'r'); $txt=fread($f,filesize($file)); fclose($f); //Times 12 $this->SetFont('Times','',12); //Output justified text $this->MultiCell(0,5,$txt); //Line break $this->Ln(); //Mention in italics $this->SetFont('','I'); $this->Cell(0,5,'(end of excerpt)'); }
function PrintChapter($num,$title,$file) { $this->AddPage(); $this->ChapterTitle($num,$title); $this->ChapterBody($file); } }
$pdf=new PDF(); $title='20000 Leagues Under the Seas'; $pdf->SetTitle($title); $pdf->SetAuthor('Jules Verne'); $pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt'); $pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt'); $pdf->Output(); ?>
-
-
-
-The GetStringWidth() method allows to determine the length of a string in the current font,
-which is used here to calculate the position and the width of the frame surrounding the title.
-Then colors are set (via SetDrawColor(), SetFillColor() and SetTextColor()) and the
-thickness of the line is set to 1 mm (against 0.2 by default) with SetLineWidth(). Finally,
-we output the cell (the last parameter to 1 indicates that the background must be filled).
-
-
-The method used to print the paragraphs is MultiCell(). Each time a line reaches the
-right extremity of the cell or a carriage-return character is met, a line break is issued
-and a new cell automatically created under the current one. Text is justified by default.
-
-
-Two document properties are defined: title (SetTitle()) and author (SetAuthor()).
-Properties can be viewed by two means. First is open the document directly with Acrobat Reader,
-go to the File menu, Document info, General. Second, also available from the plug-in, is click
-on the triangle just above the right scrollbar and choose Document info.
-
-
diff --git a/include/pdf/tutorial/tuto3.php b/include/pdf/tutorial/tuto3.php
deleted file mode 100644
index f2c38ff99..000000000
--- a/include/pdf/tutorial/tuto3.php
+++ /dev/null
@@ -1,84 +0,0 @@
-SetFont('Arial','B',15);
- //Calculate width of title and position
- $w=$this->GetStringWidth($title)+6;
- $this->SetX((210-$w)/2);
- //Colors of frame, background and text
- $this->SetDrawColor(0,80,180);
- $this->SetFillColor(230,230,0);
- $this->SetTextColor(220,50,50);
- //Thickness of frame (1 mm)
- $this->SetLineWidth(1);
- //Title
- $this->Cell($w,9,$title,1,1,'C',1);
- //Line break
- $this->Ln(10);
-}
-
-function Footer()
-{
- //Position at 1.5 cm from bottom
- $this->SetY(-15);
- //Arial italic 8
- $this->SetFont('Arial','I',8);
- //Text color in gray
- $this->SetTextColor(128);
- //Page number
- $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
-}
-
-function ChapterTitle($num,$label)
-{
- //Arial 12
- $this->SetFont('Arial','',12);
- //Background color
- $this->SetFillColor(200,220,255);
- //Title
- $this->Cell(0,6,"Chapter $num : $label",0,1,'L',1);
- //Line break
- $this->Ln(4);
-}
-
-function ChapterBody($file)
-{
- //Read text file
- $f=fopen($file,'r');
- $txt=fread($f,filesize($file));
- fclose($f);
- //Times 12
- $this->SetFont('Times','',12);
- //Output justified text
- $this->MultiCell(0,5,$txt);
- //Line break
- $this->Ln();
- //Mention in italics
- $this->SetFont('','I');
- $this->Cell(0,5,'(end of excerpt)');
-}
-
-function PrintChapter($num,$title,$file)
-{
- $this->AddPage();
- $this->ChapterTitle($num,$title);
- $this->ChapterBody($file);
-}
-}
-
-$pdf=new PDF();
-$title='20000 Leagues Under the Seas';
-$pdf->SetTitle($title);
-$pdf->SetAuthor('Jules Verne');
-$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt');
-$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt');
-$pdf->Output();
-?>
diff --git a/include/pdf/tutorial/tuto4.htm b/include/pdf/tutorial/tuto4.htm
deleted file mode 100644
index 5d7ae86eb..000000000
--- a/include/pdf/tutorial/tuto4.htm
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-
-Multi-columns
-
-
-
-
Multi-columns
-This example is a variant of the previous one showing how to lay the text across multiple
-columns.
-
-
-
function SetCol($col) { //Set position at a given column $this->col=$col; $x=10+$col*65; $this->SetLeftMargin($x); $this->SetX($x); }
function AcceptPageBreak() { //Method accepting or not automatic page break if($this->col<2) { //Go to next column $this->SetCol($this->col+1); //Set ordinate to top $this->SetY($this->y0); //Keep on page return false; } else { //Go back to first column $this->SetCol(0); //Page break return true; } }
function ChapterBody($fichier) { //Read text file $f=fopen($fichier,'r'); $txt=fread($f,filesize($fichier)); fclose($f); //Font $this->SetFont('Times','',12); //Output text in a 6 cm width column $this->MultiCell(60,5,$txt); $this->Ln(); //Mention $this->SetFont('','I'); $this->Cell(0,5,'(end of excerpt)'); //Go back to first column $this->SetCol(0); }
function PrintChapter($num,$title,$file) { //Add chapter $this->AddPage(); $this->ChapterTitle($num,$title); $this->ChapterBody($file); } }
$pdf=new PDF(); $title='20000 Leagues Under the Seas'; $pdf->SetTitle($title); $pdf->SetAuthor('Jules Verne'); $pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt'); $pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt'); $pdf->Output(); ?>
-
-
-
-The key method used is AcceptPageBreak(). It allows to accept or not an automatic page
-break. By refusing it and altering the margin and current position, the desired column layout
-is achieved.
-
-For the rest, not much change; two properties have been added to the class to save the current
-column number and the position where columns begin, and the MultiCell() call specifies a
-6 centimeter width.
-
-
diff --git a/include/pdf/tutorial/tuto4.php b/include/pdf/tutorial/tuto4.php
deleted file mode 100644
index 41d6ff6fb..000000000
--- a/include/pdf/tutorial/tuto4.php
+++ /dev/null
@@ -1,114 +0,0 @@
-SetFont('Arial','B',15);
- $w=$this->GetStringWidth($title)+6;
- $this->SetX((210-$w)/2);
- $this->SetDrawColor(0,80,180);
- $this->SetFillColor(230,230,0);
- $this->SetTextColor(220,50,50);
- $this->SetLineWidth(1);
- $this->Cell($w,9,$title,1,1,'C',1);
- $this->Ln(10);
- //Save ordinate
- $this->y0=$this->GetY();
-}
-
-function Footer()
-{
- //Page footer
- $this->SetY(-15);
- $this->SetFont('Arial','I',8);
- $this->SetTextColor(128);
- $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');
-}
-
-function SetCol($col)
-{
- //Set position at a given column
- $this->col=$col;
- $x=10+$col*65;
- $this->SetLeftMargin($x);
- $this->SetX($x);
-}
-
-function AcceptPageBreak()
-{
- //Method accepting or not automatic page break
- if($this->col<2)
- {
- //Go to next column
- $this->SetCol($this->col+1);
- //Set ordinate to top
- $this->SetY($this->y0);
- //Keep on page
- return false;
- }
- else
- {
- //Go back to first column
- $this->SetCol(0);
- //Page break
- return true;
- }
-}
-
-function ChapterTitle($num,$label)
-{
- //Title
- $this->SetFont('Arial','',12);
- $this->SetFillColor(200,220,255);
- $this->Cell(0,6,"Chapter $num : $label",0,1,'L',1);
- $this->Ln(4);
- //Save ordinate
- $this->y0=$this->GetY();
-}
-
-function ChapterBody($fichier)
-{
- //Read text file
- $f=fopen($fichier,'r');
- $txt=fread($f,filesize($fichier));
- fclose($f);
- //Font
- $this->SetFont('Times','',12);
- //Output text in a 6 cm width column
- $this->MultiCell(60,5,$txt);
- $this->Ln();
- //Mention
- $this->SetFont('','I');
- $this->Cell(0,5,'(end of excerpt)');
- //Go back to first column
- $this->SetCol(0);
-}
-
-function PrintChapter($num,$title,$file)
-{
- //Add chapter
- $this->AddPage();
- $this->ChapterTitle($num,$title);
- $this->ChapterBody($file);
-}
-}
-
-$pdf=new PDF();
-$title='20000 Leagues Under the Seas';
-$pdf->SetTitle($title);
-$pdf->SetAuthor('Jules Verne');
-$pdf->PrintChapter(1,'A RUNAWAY REEF','20k_c1.txt');
-$pdf->PrintChapter(2,'THE PROS AND CONS','20k_c2.txt');
-$pdf->Output();
-?>
diff --git a/include/pdf/tutorial/tuto5.htm b/include/pdf/tutorial/tuto5.htm
deleted file mode 100644
index b0263003e..000000000
--- a/include/pdf/tutorial/tuto5.htm
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-Tables
-
-
-
-
Tables
-This tutorial shows how to make tables easily.
-
-
-
class PDF extends FPDF { //Load data function LoadData($file) { //Read file lines $lines=file($file); $data=array(); foreach($lines as $line) $data[]=explode(';',chop($line)); return $data; }
//Simple table function BasicTable($header,$data) { //Header foreach($header as $col) $this->Cell(40,7,$col,1); $this->Ln(); //Data foreach($data as $row) { foreach($row as $col) $this->Cell(40,6,$col,1); $this->Ln(); } }
//Better table function ImprovedTable($header,$data) { //Column widths $w=array(40,35,40,45); //Header for($i=0;$i<count($header);$i++) $this->Cell($w[$i],7,$header[$i],1,0,'C'); $this->Ln(); //Data foreach($data as $row) { $this->Cell($w[0],6,$row[0],'LR'); $this->Cell($w[1],6,$row[1],'LR'); $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R'); $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R'); $this->Ln(); } //Closure line $this->Cell(array_sum($w),0,'','T'); }
//Colored table function FancyTable($header,$data) { //Colors, line width and bold font $this->SetFillColor(255,0,0); $this->SetTextColor(255); $this->SetDrawColor(128,0,0); $this->SetLineWidth(.3); $this->SetFont('','B'); //Header $w=array(40,35,40,45); for($i=0;$i<count($header);$i++) $this->Cell($w[$i],7,$header[$i],1,0,'C',1); $this->Ln(); //Color and font restoration $this->SetFillColor(224,235,255); $this->SetTextColor(0); $this->SetFont(''); //Data $fill=0; foreach($data as $row) { $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill); $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill); $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill); $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill); $this->Ln(); $fill=!$fill; } $this->Cell(array_sum($w),0,'','T'); } }
-
-A table being just a collection of cells, it is natural to build one from them. The first
-example is achieved in the most basic way possible: simple framed cells, all of the same size
-and left aligned. The result is rudimentary but very quick to obtain.
-
-
-The second table brings some improvements: each column has its own width, titles are centered
-and figures right aligned. Moreover, horizontal lines have been removed. This is done by means
-of the border parameter of the Cell() method, which specifies which sides of the
-cell must be drawn. Here we want the left (L) and right (R) ones. It remains
-the problem of the horizontal line to finish the table. There are two possibilities: either
-check for the last line in the loop, in which case we use LRB for the border
-parameter; or, as done here, add the line once the loop is over.
-
-
-The third table is similar to the second one but uses colors. Fill, text and line colors are
-simply specified. Alternate coloring for rows is obtained by using alternatively transparent
-and filled cells.
-
-
diff --git a/include/pdf/tutorial/tuto5.php b/include/pdf/tutorial/tuto5.php
deleted file mode 100644
index 4b6c4535b..000000000
--- a/include/pdf/tutorial/tuto5.php
+++ /dev/null
@@ -1,102 +0,0 @@
-Cell(40,7,$col,1);
- $this->Ln();
- //Data
- foreach($data as $row)
- {
- foreach($row as $col)
- $this->Cell(40,6,$col,1);
- $this->Ln();
- }
-}
-
-//Better table
-function ImprovedTable($header,$data)
-{
- //Column widths
- $w=array(40,35,40,45);
- //Header
- for($i=0;$iCell($w[$i],7,$header[$i],1,0,'C');
- $this->Ln();
- //Data
- foreach($data as $row)
- {
- $this->Cell($w[0],6,$row[0],'LR');
- $this->Cell($w[1],6,$row[1],'LR');
- $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R');
- $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R');
- $this->Ln();
- }
- //Closure line
- $this->Cell(array_sum($w),0,'','T');
-}
-
-//Colored table
-function FancyTable($header,$data)
-{
- //Colors, line width and bold font
- $this->SetFillColor(255,0,0);
- $this->SetTextColor(255);
- $this->SetDrawColor(128,0,0);
- $this->SetLineWidth(.3);
- $this->SetFont('','B');
- //Header
- $w=array(40,35,40,45);
- for($i=0;$iCell($w[$i],7,$header[$i],1,0,'C',1);
- $this->Ln();
- //Color and font restoration
- $this->SetFillColor(224,235,255);
- $this->SetTextColor(0);
- $this->SetFont('');
- //Data
- $fill=0;
- foreach($data as $row)
- {
- $this->Cell($w[0],6,$row[0],'LR',0,'L',$fill);
- $this->Cell($w[1],6,$row[1],'LR',0,'L',$fill);
- $this->Cell($w[2],6,number_format($row[2]),'LR',0,'R',$fill);
- $this->Cell($w[3],6,number_format($row[3]),'LR',0,'R',$fill);
- $this->Ln();
- $fill=!$fill;
- }
- $this->Cell(array_sum($w),0,'','T');
-}
-}
-
-$pdf=new PDF();
-//Column titles
-$header=array('Country','Capital','Area (sq km)','Pop. (thousands)');
-//Data loading
-$data=$pdf->LoadData('countries.txt');
-$pdf->SetFont('Arial','',14);
-$pdf->AddPage();
-$pdf->BasicTable($header,$data);
-$pdf->AddPage();
-$pdf->ImprovedTable($header,$data);
-$pdf->AddPage();
-$pdf->FancyTable($header,$data);
-$pdf->Output();
-?>
diff --git a/include/pdf/tutorial/tuto6.htm b/include/pdf/tutorial/tuto6.htm
deleted file mode 100644
index e94043ddc..000000000
--- a/include/pdf/tutorial/tuto6.htm
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-Links and flowing text
-
-
-
-
Links and flowing text
-This tutorial explains how to insert links (internal and external) and shows a new text writing
-mode. It also contains a rudimentary HTML parser.
-
-
-
function OpenTag($tag,$attr) { //Opening tag if($tag=='B' or $tag=='I' or $tag=='U') $this->SetStyle($tag,true); if($tag=='A') $this->HREF=$attr['HREF']; if($tag=='BR') $this->Ln(5); }
function CloseTag($tag) { //Closing tag if($tag=='B' or $tag=='I' or $tag=='U') $this->SetStyle($tag,false); if($tag=='A') $this->HREF=''; }
function SetStyle($tag,$enable) { //Modify style and select corresponding font $this->$tag+=($enable ? 1 : -1); $style=''; foreach(array('B','I','U') as $s) if($this->$s>0) $style.=$s; $this->SetFont('',$style); }
function PutLink($URL,$txt) { //Put a hyperlink $this->SetTextColor(0,0,255); $this->SetStyle('U',true); $this->Write(5,$txt,$URL); $this->SetStyle('U',false); $this->SetTextColor(0); } }
$html='You can now easily print text mixing different styles : <B>bold</B>, <I>italic</I>, <U>underlined</U>, or <B><I><U>all at once</U></I></B>!<BR>You can also insert links on text, such as <A HREF="http://www.fpdf.org">www.fpdf.org</A>, or on an image: click on the logo.';
$pdf=new PDF(); //First page $pdf->AddPage(); $pdf->SetFont('Arial','',20); $pdf->Write(5,'To find out what\'s new in this tutorial, click '); $pdf->SetFont('','U'); $link=$pdf->AddLink(); $pdf->Write(5,'here',$link); $pdf->SetFont(''); //Second page $pdf->AddPage(); $pdf->SetLink($link); $pdf->Image('logo.png',10,10,30,0,'','http://www.fpdf.org'); $pdf->SetLeftMargin(45); $pdf->SetFontSize(14); $pdf->WriteHTML($html); $pdf->Output(); ?>
-
-
-
-The new method to print text is Write(). It is very close to MultiCell(); the differences
-are:
-
-
The end of line is at the right margin and the next line begins at the left one
-
The current position moves at the end of the text
-
-So it allows to write a chunk of text, alter the font style, then continue from the exact
-place we left it. On the other hand, you cannot full justify it.
-
-
-The method is used on the first page to put a link pointing to the second one. The beginning of
-the sentence is written in regular style, then we switch to underline and finish it. The link
-is created with AddLink(), which returns a link identifier. The identifier is
-passed as third parameter of Write(). Once the second page is created, we use SetLink() to
-make the link point to the beginning of the current page.
-
-
-Then we put an image with a link on it. An external link points to an URL (HTTP, mailto...).
-The URL is simply passed as last parameter of Image().
-Note that external links do not work when the PDF is displayed inside Netscape's plug-in.
-
-
-Finally, the left margin is moved after the image with SetLeftMargin() and some text in
-HTML format is output. An HTML parser is used for this, based on the regular expression splitting
-function preg_split() and the option PREG_SPLIT_DELIM_CAPTURE (introduced in PHP 4.0.5) which
-allows to fetch the separators as well (in this case the tags). If you use an older version of
-PHP, replace the line with this one:
-
-
-
-
-$a=preg_split('/[<>]/',$html);
-
-
-which is less strict but gives the same results with valid HTML.
-
-Recognized tags are <B>, <I>, <U>, <A> and <BR>; the others are
-ignored. The parser also makes use of the Write() method. An external link is put the same way as
-an internal one (third parameter of Write()).
-
-Note that Cell() also allows to put links.
-
-
diff --git a/include/pdf/tutorial/tuto6.php b/include/pdf/tutorial/tuto6.php
deleted file mode 100644
index 5d9436c31..000000000
--- a/include/pdf/tutorial/tuto6.php
+++ /dev/null
@@ -1,123 +0,0 @@
-FPDF($orientation,$unit,$format);
- //Initialization
- $this->B=0;
- $this->I=0;
- $this->U=0;
- $this->HREF='';
-}
-
-function WriteHTML($html)
-{
- //HTML parser
- $html=str_replace("\n",' ',$html);
- $a=preg_split('/<(.*)>/U',$html,-1,PREG_SPLIT_DELIM_CAPTURE);
- foreach($a as $i=>$e)
- {
- if($i%2==0)
- {
- //Text
- if($this->HREF)
- $this->PutLink($this->HREF,$e);
- else
- $this->Write(5,$e);
- }
- else
- {
- //Tag
- if($e{0}=='/')
- $this->CloseTag(strtoupper(substr($e,1)));
- else
- {
- //Extract attributes
- $a2=explode(' ',$e);
- $tag=strtoupper(array_shift($a2));
- $attr=array();
- foreach($a2 as $v)
- if(ereg('^([^=]*)=["\']?([^"\']*)["\']?$',$v,$a3))
- $attr[strtoupper($a3[1])]=$a3[2];
- $this->OpenTag($tag,$attr);
- }
- }
- }
-}
-
-function OpenTag($tag,$attr)
-{
- //Opening tag
- if($tag=='B' or $tag=='I' or $tag=='U')
- $this->SetStyle($tag,true);
- if($tag=='A')
- $this->HREF=$attr['HREF'];
- if($tag=='BR')
- $this->Ln(5);
-}
-
-function CloseTag($tag)
-{
- //Closing tag
- if($tag=='B' or $tag=='I' or $tag=='U')
- $this->SetStyle($tag,false);
- if($tag=='A')
- $this->HREF='';
-}
-
-function SetStyle($tag,$enable)
-{
- //Modify style and select corresponding font
- $this->$tag+=($enable ? 1 : -1);
- $style='';
- foreach(array('B','I','U') as $s)
- if($this->$s>0)
- $style.=$s;
- $this->SetFont('',$style);
-}
-
-function PutLink($URL,$txt)
-{
- //Put a hyperlink
- $this->SetTextColor(0,0,255);
- $this->SetStyle('U',true);
- $this->Write(5,$txt,$URL);
- $this->SetStyle('U',false);
- $this->SetTextColor(0);
-}
-}
-
-$html='You can now easily print text mixing different
-styles : bold, italic, underlined, or
-all at once! You can also insert links
-on text, such as www.fpdf.org,
-or on an image: click on the logo.';
-
-$pdf=new PDF();
-//First page
-$pdf->AddPage();
-$pdf->SetFont('Arial','',20);
-$pdf->Write(5,'To find out what\'s new in this tutorial, click ');
-$pdf->SetFont('','U');
-$link=$pdf->AddLink();
-$pdf->Write(5,'here',$link);
-$pdf->SetFont('');
-//Second page
-$pdf->AddPage();
-$pdf->SetLink($link);
-$pdf->Image('logo.png',10,10,30,0,'','http://www.fpdf.org');
-$pdf->SetLeftMargin(45);
-$pdf->SetFontSize(14);
-$pdf->WriteHTML($html);
-$pdf->Output();
-?>
diff --git a/include/pdf/tutorial/tuto7.htm b/include/pdf/tutorial/tuto7.htm
deleted file mode 100644
index 69aef60fb..000000000
--- a/include/pdf/tutorial/tuto7.htm
+++ /dev/null
@@ -1,316 +0,0 @@
-
-
-
-Adding new fonts and encoding support
-
-
-
-
Adding new fonts and encoding support
-This tutorial explains how to use TrueType or Type1 fonts so that you are not limited to the standard
-fonts any more. The other interest is that you can choose the font encoding, which allows you to
-use other languages than the Western ones (the standard fonts having too few available characters).
-
-
-There are two ways to use a new font: embedding it in the PDF or not. When a font is not
-embedded, it is sought in the system. The advantage is that the PDF file is lighter; on the other
-hand, if it is not available, a substitution font is used. So it is preferable to ensure that the
-needed font is installed on the client systems. If the file is to be viewed by a large audience,
-it is better to embed.
-
-
-Adding a new font requires three steps for TrueTypes:
-
-
Generation of the metric file (.afm)
-
Generation of the font definition file (.php)
-
Declaration of the font in the script
-
-For Type1, the first one is theoretically not necessary because the AFM file is usually shipped
-with the font. In case you have only a metric file in PFM format, use the convertor available
-here.
-
Generation of the metric file
-The first step for a TrueType consists in generating the AFM file. A utility exists to do this
-task: ttf2pt1. The Windows binary
-is available here. The command line to use is
-the following:
-
-
-ttf2pt1 -a font.ttf font
-
-
-For example, for Comic Sans MS Regular:
-
-
-ttf2pt1 -a c:\windows\fonts\comic.ttf comic
-
-
-Two files are created; the one we are interested in is comic.afm.
-
Generation of the font definition file
-The second step consists in generating a PHP file containing all the information needed by FPDF;
-in addition, the font file is compressed. To do this, a helper script is provided in the font/makefont/
-directory of the package: makefont.php. It contains the following function:
-
-
-MakeFont(string fontfile, string afmfile [, string enc [, array patch [, string type]]])
-
-
-fontfile
-
-Path to the .ttf or .pfb file.
-
-afmfile
-
-Path to the .afm file.
-
-enc
-
-Name of the encoding to use. Default value: cp1252.
-
-patch
-
-Optional modification of the encoding. Empty by default.
-
-type
-
-Type of the font (TrueType or Type1). Default value: TrueType.
-
-
-The first parameter is the name of the font file. The extension must be either .ttf or .pfb and
-determines the font type. If you own a Type1 font in ASCII format (.pfa), you can convert it to
-binary format with t1utils.
-
-If you don't want to embed the font, pass an empty string. In this case, type is given by the
-type parameter.
-
-Note: in the case of a font with the same name as a standard one, for instance arial.ttf, it is
-mandatory to embed. If you don't, Acrobat will use its own font.
-
-
-The AFM file is the one previously generated.
-
-
-The encoding defines the association between a code (from 0 to 255) and a character. The first
-128 are fixed and correspond to ASCII; the following are variable. The encodings are stored in
-.map files. Those available are:
-
-
cp1250 (Central Europe)
-
cp1251 (Cyrillic)
-
cp1252 (Western Europe)
-
cp1253 (Greek)
-
cp1254 (Turkish)
-
cp1255 (Hebrew)
-
cp1257 (Baltic)
-
cp1258 (Vietnamese)
-
cp874 (Thai)
-
ISO-8859-1 (Western Europe)
-
ISO-8859-2 (Central Europe)
-
ISO-8859-4 (Baltic)
-
ISO-8859-5 (Cyrillic)
-
ISO-8859-7 (Greek)
-
ISO-8859-9 (Turkish)
-
ISO-8859-11 (Thai)
-
ISO-8859-15 (Western Europe)
-
ISO-8859-16 (Central Europe)
-
KOI8-R (Russian)
-
KOI8-U (Ukrainian)
-
-Of course, the font must contain the characters corresponding to the chosen encoding.
-
-In the particular case of a symbolic font (that is to say which does not contain letters, such
-as Symbol or ZapfDingbats), pass an empty string.
-
-The encodings which begin with cp are those used by Windows; Linux systems usually use ISO.
-
-Remark: the standard fonts use cp1252.
-
-
-The fourth parameter gives the possibility to alter the encoding. Sometimes you may want to add
-some characters. For instance, ISO-8859-1 does not contain the euro symbol. To add it at position
-164, pass array(164=>'Euro').
-
-
-The last parameter is used to give the type of the font in case it is not embedded (that is to
-say the first parameter is empty).
-
-
-After you have called the function (create a new file for this and include makefont.php, or
-simply add the call directly inside), a .php file is created, with the same name as the .afm one.
-You may rename it if you wish. If the case of embedding, the font file is compressed and gives a
-second file with .z as extension (except if the compression function is not available, it
-requires Zlib). You may rename it too, but in this case you have to alter the variable $file
-in the .php file accordingly.
-
-
-Example:
-
-
-MakeFont('c:\\windows\\fonts\\comic.ttf','comic.afm','cp1252');
-
-
-which gives the files comic.php and comic.z.
-
-
-Then you have to copy the generated file(s) either in the directory of the script which will use
-the font, or in the directory given by FPDF_FONTPATH if the constant is defined. If the font file
-could not be compressed, copy the .ttf or .pfb instead of the .z.
-
Declaration of the font in the script
-The last step is the most simple. You just need to call the AddFont() method. For instance:
-
-
-
-
-$pdf->AddFont('Comic','','comic.php');
-
-
-or simply:
-
-
-
-
-$pdf->AddFont('Comic');
-
-
-And the font is now available (in regular and underlined styles), usable like the others. If we
-had worked with Comic Sans MS Bold (comicbd.ttf), we would have put:
-
-
-
-
-$pdf->AddFont('Comic','B','comicbd.php');
-
-
-
Example
-Let's now see a small complete example. The font used is Calligrapher, available at
-www.abstractfonts.com (a site
-offering numerous free TrueType fonts). The first step is the generation of the AFM file:
-
-
-ttf2pt1 -a calligra.ttf calligra
-
-
-which gives calligra.afm (and calligra.t1a that we can delete). Then we generate the definition
-file:
-
-
-
-The function call gives the following report:
-
-
-Warning: character Euro is missing
-Warning: character Zcaron is missing
-Warning: character zcaron is missing
-Warning: character eth is missing
-Font file compressed (calligra.z)
-Font definition file generated (calligra.php)
-
-The euro character is not present in the font (it is too old). Three other characters are missing
-too, but we are not interested in them anyway.
-
-We can now copy the two files in the font directory and write the script:
-
-
-
$pdf=new FPDF(); $pdf->AddFont('Calligrapher','','calligra.php'); $pdf->AddPage(); $pdf->SetFont('Calligrapher','',35); $pdf->Cell(0,10,'Enjoy new fonts with FPDF!'); $pdf->Output(); ?>
-
-
-
-
About the euro symbol
-The euro character is not present in all encodings, and is not always placed at the same position:
-
-
-
-
-
Encoding
Position
-
cp1250
128
-
cp1251
136
-
cp1252
128
-
cp1253
128
-
cp1254
128
-
cp1255
128
-
cp1257
128
-
cp1258
128
-
cp874
128
-
ISO-8859-1
absent
-
ISO-8859-2
absent
-
ISO-8859-4
absent
-
ISO-8859-5
absent
-
ISO-8859-7
absent
-
ISO-8859-9
absent
-
ISO-8859-11
absent
-
ISO-8859-15
164
-
ISO-8859-16
164
-
KOI8-R
absent
-
KOI8-U
absent
-
-
-ISO-8859-1 is widespread but does not include the euro sign. If you need it, the simplest thing
-to do is using cp1252 or ISO-8859-15 instead, which are nearly identical but contain the precious
-symbol.
-
-As for ISO-8859-2, it is possible to use ISO-8859-16 instead, but it contains many differences.
-It is therefore simpler to patch the encoding to add the symbol to it, as explained above. The
-same is true for the other encodings.
-
Font synthesis under Windows
-When a TrueType font is not available in a given style, Windows is able to synthesize it from the
-regular version. For instance, there is no Comic Sans MS Italic, but it can be built from Comic
-Sans MS Regular. This feature can be used in a PDF file, but unfortunately requires that the
-regular font be present in the system (you must not embed it). Here is how to do it:
-
-
Generate the definition file for the regular font without embedding (you may rename it to
-reflect the desired style)
-
Open it and append to the variable $name a comma followed by the desired style
-(Italic, Bold or BoldItalic)
-
-For instance, for the file comici.php:
-
-
-$name='ComicSansMS,Italic';
-
-
-It can then be used normally:
-
-
-
-
-$pdf->AddFont('Comic','I','comici.php');
-
-
-
Reducing the size of TrueType fonts
-Font files are often quite voluminous (more than 100, even 200KB); this is due to the fact that
-they contain the characters corresponding to many encodings. Zlib compression reduces them but
-they remain fairly big. A technique exists to reduce them further. It consists in converting the
-font to the Type1 format with ttf2pt1 by specifying the encoding you are interested in; all other
-characters will be discarded.
-
-For instance, the arial.ttf font shipped with Windows 98 is 267KB (it contains 1296 characters).
-After compression it gives 147. Let's convert it to Type1 by keeping only cp1250 characters:
-
-
-ttf2pt1 -b -L cp1250.map c:\windows\fonts\arial.ttf arial
-
-
-The .map files are located in the font/makefont/ directory of the package. The command produces
-arial.pfb and arial.afm. The arial.pfb file is only 35KB, and 30KB after compression.
-
-
-It is possible to go even further. If you are interested only by a subset of the encoding (you
-probably don't need all 217 characters), you can open the .map file and remove the lines you are
-not interested in. This will reduce the file size accordingly.
-
-
diff --git a/include/pdf/tutorial/tuto7.php b/include/pdf/tutorial/tuto7.php
deleted file mode 100644
index 38caf9394..000000000
--- a/include/pdf/tutorial/tuto7.php
+++ /dev/null
@@ -1,10 +0,0 @@
-AddFont('Calligrapher','','calligra.php');
-$pdf->AddPage();
-$pdf->SetFont('Calligrapher','',35);
-$pdf->Cell(0,10,'Enjoy new fonts with FPDF!');
-$pdf->Output();
-?>
diff --git a/include/studienplan.class.php b/include/studienplan.class.php
index 2d27917bd..58ee074f5 100644
--- a/include/studienplan.class.php
+++ b/include/studienplan.class.php
@@ -29,45 +29,46 @@ require_once(dirname(__FILE__).'/basis_db.class.php');
class studienplan extends basis_db
{
- public $new = true; // boolean
- public $result = array(); // Objekte
+ public $new = true; // boolean
+ public $result = array(); // Objekte
- //Tabellenspalten
- public $studienplan_id; // integer (PK)
- public $studienordnung_id; // integer FK Studienordnung
- public $orgform_kurzbz; // varchar (3)
- public $version; // varchar (256)
- public $bezeichnung; // varchar (256)
- public $regelstudiendauer; // integer
- public $sprache; // varchar (16) FK Sprache
- public $aktiv=false; // boolean
- public $semesterwochen; // smallint
- public $testtool_sprachwahl=true;// boolean
- public $updateamum; // timestamp
- public $updatevon; // varchar
- public $insertamum; // timestamp
- public $insertvon; // varchar
- public $ects_stpl;
- public $pflicht_sws;
- public $pflicht_lvs;
+ //Tabellenspalten
+ public $studienplan_id; // integer (PK)
+ public $studienordnung_id; // integer FK Studienordnung
+ public $orgform_kurzbz; // varchar (3)
+ public $version; // varchar (256)
+ public $bezeichnung; // varchar (256)
+ public $regelstudiendauer; // integer
+ public $sprache; // varchar (16) FK Sprache
+ public $aktiv=false; // boolean
+ public $semesterwochen; // smallint
+ public $testtool_sprachwahl=true; // boolean
+ public $updateamum; // timestamp
+ public $updatevon; // varchar
+ public $insertamum; // timestamp
+ public $insertvon; // varchar
+ public $ects_stpl; //numeric(5,2)
+ public $pflicht_sws; // integer
+ public $pflicht_lvs; // integer
+ public $onlinebewerbung_studienplan; //boolean
- //Tabellenspalten für Zwischentabelle tbl_studienplan_lehrveranstaltung
- public $studienplan_lehrveranstaltung_id; //integer
- public $lehrveranstaltung_id; //integer
- public $semester; //smallint
- public $studienplan_lehrveranstaltung_id_parent; //integer
- public $pflicht; //boolean
- public $koordinator; //varchar(32)
- public $sort;
+ //Tabellenspalten für Zwischentabelle tbl_studienplan_lehrveranstaltung
+ public $studienplan_lehrveranstaltung_id; //integer
+ public $lehrveranstaltung_id; //integer
+ public $semester; //smallint
+ public $studienplan_lehrveranstaltung_id_parent; //integer
+ public $pflicht; //boolean
+ public $koordinator; //varchar(32)
+ public $sort;
public $curriculum=true;
public $export=true;
public $genehmigung=true;
/**
- * Konstruktor
- */
- public function __construct()
- {
+ * Konstruktor
+ */
+ public function __construct()
+ {
parent::__construct();
}
@@ -119,6 +120,7 @@ class studienplan extends basis_db
$this->ects_stpl = $row->ects_stpl;
$this->pflicht_lvs = $row->pflicht_lvs;
$this->pflicht_sws = $row->pflicht_sws;
+ $this->onlinebewerbung_studienplan = $this->db_parse_bool($row->onlinebewerbung_studienplan);
$this->updateamum = $row->updateamum;
$this->updatevon = $row->updatevon;
$this->insertamum = $row->insertamum;
@@ -176,6 +178,7 @@ class studienplan extends basis_db
$obj->ects_stpl = $row->ects_stpl;
$obj->pflicht_lvs = $row->pflicht_lvs;
$obj->pflicht_sws = $row->pflicht_sws;
+ $obj->onlinebewerbung_studienplan = $this->db_parse_bool($row->onlinebewerbung_studienplan);
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->insertamum = $row->insertamum;
@@ -269,7 +272,7 @@ class studienplan extends basis_db
//Neuen Datensatz einfuegen
$qry='BEGIN;INSERT INTO lehre.tbl_studienplan (studienordnung_id, orgform_kurzbz,version,
bezeichnung, regelstudiendauer, sprache, aktiv, semesterwochen, testtool_sprachwahl,
- pflicht_sws, pflicht_lvs, ects_stpl, insertamum, insertvon) VALUES ('.
+ pflicht_sws, pflicht_lvs, ects_stpl, onlinebewerbung_studienplan, insertamum, insertvon) VALUES ('.
$this->db_add_param($this->studienordnung_id, FHC_INTEGER).', '.
$this->db_add_param($this->orgform_kurzbz).', '.
$this->db_add_param($this->version).', '.
@@ -282,6 +285,7 @@ class studienplan extends basis_db
$this->db_add_param($this->pflicht_sws) . ', ' .
$this->db_add_param($this->pflicht_lvs) . ', ' .
$this->db_add_param($this->ects_stpl) . ', ' .
+ $this->db_add_param($this->onlinebewerbung_studienplan, FHC_BOOLEAN) . ', ' .
'now(), '.
$this->db_add_param($this->insertvon).');';
}
@@ -298,17 +302,18 @@ class studienplan extends basis_db
' orgform_kurzbz='.$this->db_add_param($this->orgform_kurzbz).', '.
' version='.$this->db_add_param($this->version).', '.
' bezeichnung='.$this->db_add_param($this->bezeichnung).', '.
- ' regelstudiendauer='.$this->db_add_param($this->regelstudiendauer, FHC_INTEGER).', '.
- ' sprache='.$this->db_add_param($this->sprache).', '.
- ' aktiv='.$this->db_add_param($this->aktiv, FHC_BOOLEAN).', '.
- ' semesterwochen='.$this->db_add_param($this->semesterwochen, FHC_INTEGER).', '.
- ' testtool_sprachwahl='.$this->db_add_param($this->testtool_sprachwahl, FHC_BOOLEAN).','.
- ' ects_stpl=' . $this->db_add_param($this->ects_stpl) . ',' .
- ' pflicht_sws=' . $this->db_add_param($this->pflicht_sws, FHC_INTEGER) . ',' .
- ' pflicht_lvs=' . $this->db_add_param($this->pflicht_lvs, FHC_INTEGER) . ',' .
- ' updateamum= now(), '.
- ' updatevon='.$this->db_add_param($this->updatevon).' '.
- ' WHERE studienplan_id='.$this->db_add_param($this->studienplan_id, FHC_INTEGER, false).';';
+ ' regelstudiendauer='.$this->db_add_param($this->regelstudiendauer, FHC_INTEGER).', '.
+ ' sprache='.$this->db_add_param($this->sprache).', '.
+ ' aktiv='.$this->db_add_param($this->aktiv, FHC_BOOLEAN).', '.
+ ' semesterwochen='.$this->db_add_param($this->semesterwochen, FHC_INTEGER).', '.
+ ' testtool_sprachwahl='.$this->db_add_param($this->testtool_sprachwahl, FHC_BOOLEAN).','.
+ ' ects_stpl=' . $this->db_add_param($this->ects_stpl) . ',' .
+ ' pflicht_sws=' . $this->db_add_param($this->pflicht_sws, FHC_INTEGER) . ',' .
+ ' pflicht_lvs=' . $this->db_add_param($this->pflicht_lvs, FHC_INTEGER) . ',' .
+ ' onlinebewerbung_studienplan=' . $this->db_add_param($this->onlinebewerbung_studienplan, FHC_BOOLEAN) . ',' .
+ ' updateamum= now(), '.
+ ' updatevon='.$this->db_add_param($this->updatevon).' '.
+ ' WHERE studienplan_id='.$this->db_add_param($this->studienplan_id, FHC_INTEGER, false).';';
}
if($this->db_query($qry))
@@ -719,6 +724,7 @@ class studienplan extends basis_db
ects_stpl,
pflicht_sws,
pflicht_lvs,
+ onlinebewerbung_studienplan,
studiengang_kz,
tbl_studienordnung.version AS version_studienordnung,
gueltigvon,
@@ -837,6 +843,10 @@ class studienplan extends basis_db
$obj->aktiv = $this->db_parse_bool($row->aktiv);
$obj->semesterwochen = $row->semesterwochen;
$obj->testtool_sprachwahl = $this->db_parse_bool($row->testtool_sprachwahl);
+ $obj->ects_stpl = $row->ects_stpl;
+ $obj->pflicht_lvs = $row->pflicht_lvs;
+ $obj->pflicht_sws = $row->pflicht_sws;
+ $obj->onlinebewerbung_studienplan = $this->db_parse_bool($row->onlinebewerbung_studienplan);
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->insertamum = $row->insertamum;
@@ -916,6 +926,10 @@ class studienplan extends basis_db
$obj->aktiv = $this->db_parse_bool($row->aktiv);
$obj->semesterwochen = $row->semesterwochen;
$obj->testtool_sprachwahl = $this->db_parse_bool($row->testtool_sprachwahl);
+ $obj->ects_stpl = $row->ects_stpl;
+ $obj->pflicht_lvs = $row->pflicht_lvs;
+ $obj->pflicht_sws = $row->pflicht_sws;
+ $obj->onlinebewerbung_studienplan = $this->db_parse_bool($row->onlinebewerbung_studienplan);
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->insertamum = $row->insertamum;
@@ -1227,6 +1241,10 @@ class studienplan extends basis_db
$obj->aktiv = $this->db_parse_bool($row->aktiv);
$obj->semesterwochen = $row->semesterwochen;
$obj->testtool_sprachwahl = $this->db_parse_bool($row->testtool_sprachwahl);
+ $obj->ects_stpl = $row->ects_stpl;
+ $obj->pflicht_lvs = $row->pflicht_lvs;
+ $obj->pflicht_sws = $row->pflicht_sws;
+ $obj->onlinebewerbung_studienplan = $this->db_parse_bool($row->onlinebewerbung_studienplan);
$obj->updateamum = $row->updateamum;
$obj->updatevon = $row->updatevon;
$obj->insertamum = $row->insertamum;
diff --git a/include/xslfo2pdf/fpdf/fpdf.php b/include/xslfo2pdf/fpdf/fpdf.php
index d2d23b3fb..11dfb5b98 100644
--- a/include/xslfo2pdf/fpdf/fpdf.php
+++ b/include/xslfo2pdf/fpdf/fpdf.php
@@ -75,7 +75,7 @@ if(!class_exists('FPDF'))
* Public methods *
* *
*******************************************************************************/
- function FPDF($orientation='P',$unit='mm',$format='A4')
+ function __construct($orientation='P',$unit='mm',$format='A4')
{
//Some checks
$this->_dochecks();
diff --git a/include/xslfo2pdf/fpdf/myfpdf.php b/include/xslfo2pdf/fpdf/myfpdf.php
index e1852c7bd..80ab014b5 100644
--- a/include/xslfo2pdf/fpdf/myfpdf.php
+++ b/include/xslfo2pdf/fpdf/myfpdf.php
@@ -25,7 +25,7 @@ require_once("fpdf.php");
class MyPdf extends FPDF {
-
+
/**
* Konstruktor
*
@@ -43,12 +43,12 @@ class MyPdf extends FPDF {
* letter
* legal
*/
- function MyPdf($orientation='P',$unit='mm',$format='A4')
+ function __construct($orientation='P',$unit='mm',$format='A4')
{
//Call parent constructor
$this->FPDF($orientation,$unit,$format);
}
-
+
/**
* Additional getter methods
**/
@@ -79,14 +79,14 @@ class MyPdf extends FPDF {
function GetPageWidth() {
return $this->w-$this->rMargin-$this->lMargin;
}
-
+
function GetLineWidth() {
return $this->LineWidth;
}
function FontExists($family, $style='') {
$fontkey=$family.$style;
- return isset($this->fonts[$fontkey]) ||
+ return isset($this->fonts[$fontkey]) ||
isset($this->CoreFonts[$fontkey]);
}
@@ -94,7 +94,7 @@ class MyPdf extends FPDF {
* Methods to capture output
*/
function startCapture() {
- if($this->state==2) {
+ if($this->state==2) {
$buf = $this->pages[$this->page];
$this->pages[$this->page] = "";
return $buf;
@@ -103,11 +103,11 @@ class MyPdf extends FPDF {
$buf = $this->buffer;
$this->buffer = "";
return $buf;
- }
+ }
}
- function endCapture($buffer) {
- if($this->state==2) {
+ function endCapture($buffer) {
+ if($this->state==2) {
$buf = $this->pages[$this->page];
$this->pages[$this->page] = $buffer;
return $buf;
@@ -116,17 +116,17 @@ class MyPdf extends FPDF {
$buf = $this->buffer;
$this->buffer = $buffer;
return $buf;
- }
+ }
}
function appendBuffer($buffer) {
- if($this->state==2) {
+ if($this->state==2) {
$this->pages[$this->page] .= $buffer;
}
else {
$this->buffer .= $buffer;
}
-
+
}
/**
@@ -165,14 +165,14 @@ class MyPdf extends FPDF {
* Write string regarding to \n as line breaks
* Return an array containing number of line, width and height
* of this textual block. The align paramtere accepts L, R and C
- * get values using:
+ * get values using:
* list($width, $height, $no, $firstX, $firstY, $lastX, $lastYl) = $pdf->Text2();
**/
function Text2($x, $y, $text, $align="L", $lineHeight=NULL, $xNewLine=NULL, $width=NULL) {
if (!$xNewLine) {
$xNewLine = $x;
}
-
+
$lines = explode('\n', $text);
$height = ($lineHeight)?$lineHeight:$this->FontSize;
//oesi - add parameter width for set the content-width of fo:block
@@ -187,29 +187,29 @@ class MyPdf extends FPDF {
$maxWidth = 0;
$sx = $x;
$sy = $y;
- foreach($lines as $line)
- {
-
- $width = $this->GetStringWidth($line);
- do
+ foreach($lines as $line)
+ {
+
+ $width = $this->GetStringWidth($line);
+ do
{
- //$w=$this->w-$this->rMargin-$x;
+ //$w=$this->w-$this->rMargin-$x;
$w = $pw-$x; //oesi - changed
//echo "w:$w ";
//$wmax=($w-2*$this->cMargin)*1000/$this->FontSize;
$noc = $this->GetNumberOfChars($w, $line);
//echo "noc:$noc xNewLine: $xNewLine x:$x w:$w strlen:".strlen($line)." line:$line ";
- if ($noc == -1)
+ if ($noc == -1)
{
- if ($x == $xNewLine)
+ if ($x == $xNewLine)
{
//word has not enough space on one line, draw it beyond borders
$noc = strlen($line);
}
- else
+ else
{
//echo "NEWLINE";
- if ($nb == 0)
+ if ($nb == 0)
{
$sy += $height;
$sx = $xNewLine;
@@ -221,12 +221,12 @@ class MyPdf extends FPDF {
continue;
}
}
-
+
$showLine = substr($line, 0, $noc);
$textWidth = $this->GetStringWidth($showLine);
//echo "showline: $showLine ";
//echo "nb:$nb x:$x w:$w textwidth:$textWidth showline:$showLine ";
- switch ($align)
+ switch ($align)
{
case "R":
$tx = $pw-$textWidth;
@@ -238,12 +238,12 @@ class MyPdf extends FPDF {
default:
$tx = $x;
}
-
+
$this->Text($tx, $y+$height, $showLine);
$line = trim(substr($line, $noc));
$width = $this->GetStringWidth($line);
-
- if ($textWidth > $maxWidth)
+
+ if ($textWidth > $maxWidth)
{
$maxWidth = $textWidth;
}
@@ -263,7 +263,7 @@ class MyPdf extends FPDF {
return array($maxWidth, $tot_height, $nb, $sx, $sy, $tx+$textWidth, $y-$height);
}
-
+
/*
This extension allows to set a dash pattern and draw dashed lines or rectangles.
$pdf->SetDash(4,2); //4mm on, 2mm off
@@ -327,22 +327,22 @@ class MyPdf extends FPDF {
$yc = $y+$r;
$this->_out(sprintf('%.2f %.2f l', $xc*$k,($hp-$y)*$k ));
- $this->_Arc($xc + $r*$MyArc, $yc - $r, $xc + $r, $yc - $r*$MyArc,
+ $this->_Arc($xc + $r*$MyArc, $yc - $r, $xc + $r, $yc - $r*$MyArc,
$xc + $r, $yc);
$xc = $x+$w-$r ;
$yc = $y+$h-$r;
$this->_out(sprintf('%.2f %.2f l',($x+$w)*$k,($hp-$yc)*$k));
- $this->_Arc($xc + $r, $yc + $r*$MyArc, $xc + $r*$MyArc, $yc + $r, $xc,
+ $this->_Arc($xc + $r, $yc + $r*$MyArc, $xc + $r*$MyArc, $yc + $r, $xc,
$yc + $r);
$xc = $x+$r ;
$yc = $y+$h-$r;
$this->_out(sprintf('%.2f %.2f l',$xc*$k,($hp-($y+$h))*$k));
- $this->_Arc($xc - $r*$MyArc, $yc + $r, $xc - $r, $yc + $r*$MyArc,
+ $this->_Arc($xc - $r*$MyArc, $yc + $r, $xc - $r, $yc + $r*$MyArc,
$xc - $r, $yc);
$xc = $x+$r ;
$yc = $y+$r;
$this->_out(sprintf('%.2f %.2f l',($x)*$k,($hp-$yc)*$k ));
- $this->_Arc($xc - $r, $yc - $r*$MyArc, $xc - $r*$MyArc, $yc - $r, $xc,
+ $this->_Arc($xc - $r, $yc - $r*$MyArc, $xc - $r*$MyArc, $yc - $r, $xc,
$yc - $r);
$this->_out($op);
}
@@ -352,7 +352,7 @@ class MyPdf extends FPDF {
* $pdf->Rotate($angle,$x,$y);
* $pdf->Text($x,$y,$txt);
* $pdf->Rotate(0);
- */
+ */
function Rotate($angle,$x=-1,$y=-1) {
if($x==-1)
$x=$this->x;
@@ -420,7 +420,7 @@ class MyPdf extends FPDF {
$op = 'S';
break;
}
-
+
if ($rx) {
if (!$ry)
$ry = $rx;
@@ -443,7 +443,7 @@ class MyPdf extends FPDF {
$this->_out(sprintf('q %.2f %.2f %.2f %.2f %.2f %.2f cm', cos($a), -1 * sin($a), sin($a), cos($a), $x0*10, $y0*10));
$x0 = 0;
$y0 = 0;
- }
+ }
$t1 = $astart;
$a0 = $x0 + ($rx * cos($t1));
@@ -484,7 +484,7 @@ class MyPdf extends FPDF {
$op='B';
else
$op='S';
-
+
$this->_out(sprintf('h %s', $op));
}
@@ -495,7 +495,7 @@ class MyPdf extends FPDF {
$op='B';
else
$op='S';
-
+
$this->_out(sprintf('%s', $op));
}
@@ -520,7 +520,7 @@ class MyPdf extends FPDF {
function _Point($x, $y) {
$this->_out(sprintf('%.2f %.2f m', $x * $this->k, ($this->h - $y) * $this->k));
}
-
+
// Draws a B�zier curve from last draw point
// Parameters:
// - x1, y1: Control point 1
@@ -528,9 +528,9 @@ class MyPdf extends FPDF {
// - x3, y3: End point
function _Curve($x1, $y1, $x2, $y2, $x3, $y3) {
$this->_out(sprintf('%.2f %.2f %.2f %.2f %.2f %.2f c', $x1 * $this->k, ($this->h - $y1) * $this->k, $x2 * $this->k, ($this->h - $y2) * $this->k, $x3 * $this->k, ($this->h - $y3) * $this->k));
- }
+ }
+
-
// Draws a cubic B�zier curve from last draw point
// Parameters:
// - x2, y2: Control point 2
@@ -547,7 +547,7 @@ class MyPdf extends FPDF {
function _CurveRef2($x1, $y1, $x3, $y3) {
$this->_out(sprintf('%.2f %.2f %.2f %.2f y', $x1 * $this->k, ($this->h - $y1) * $this->k, $x3 * $this->k, ($this->h - $y3) * $this->k));
- }
+ }
// Draws a line from last draw point
// Parameters:
@@ -593,7 +593,7 @@ class MyPdf extends FPDF {
//echo "X2:$x0:$y0 ";
//$x0 -= cos($a);
//$y0 -= $ry * sin($a);
- }
+ }
$t1 = $astart;
$a0 = $x0 + ($rx * cos($t1));
@@ -627,4 +627,4 @@ class MyPdf extends FPDF {
}
-?>
\ No newline at end of file
+?>
diff --git a/locale/de-AT/coodle.php b/locale/de-AT/coodle.php
index 195cf743f..73e7477a6 100755
--- a/locale/de-AT/coodle.php
+++ b/locale/de-AT/coodle.php
@@ -1,13 +1,16 @@
phrasen['coodle/coodle']='Coodle';
$this->phrasen['coodle/titel']='Titel';
-$this->phrasen['coodle/beschreibung']='Beschreibung';
+$this->phrasen['coodle/beschreibung']='Beschreibung (optional)';
$this->phrasen['coodle/dauer']='Termindauer';
$this->phrasen['coodle/dauerminuten']='Minuten';
$this->phrasen['coodle/endedatum']='Umfrageende';
$this->phrasen['coodle/neuerEintrag']='Neue Umfrage';
$this->phrasen['coodle/bearbeiten']='Umfrage editieren';
+$this->phrasen['coodle/laufendeUmfrageBearbeiten']='Laufende Umfrage editieren';
$this->phrasen['coodle/uebersicht']='Coodle - Übersicht';
+$this->phrasen['coodle/einfuehrungstext']='Coodle hilft Ihnen dabei, Termine mit mehreren Personen zu organisieren. Sie sehen dabei schon vorab die Verfügbarkeit der Personen (gestützt durch die FreeBusy-URL) und Räume.
+ Der Vorteil ist eine effizientere Planung und schnellere Terminfindung.';
$this->phrasen['coodle/umfrageKonnteNichtGeloeschtWerden']='Umfrage konnte nicht gelöscht werden';
$this->phrasen['coodle/umfrageNichtGeladen']='Umfrage konnte nicht geladen werden';
$this->phrasen['coodle/coodleId']='Coodle_id';
@@ -17,13 +20,14 @@ $this->phrasen['coodle/aktion']='Aktion';
$this->phrasen['coodle/neueUmfrage']='Neue Umfrage anlegen';
$this->phrasen['coodle/termine']='Termine verwalten';
$this->phrasen['coodle/dragEvent']='Termin';
-$this->phrasen['coodle/terminZiehenBeschreibung']='Ziehen Sie den Termin an die gewünschte Position um Terminvorschläge zu setzen';
-$this->phrasen['coodle/ressourcenBeschreibung']='Hier können Sie Räume und Personen zur Umfrage hinzufügen.
Tippen sie dazu den Namen in das Textfeld und wählen Sie den entsprechenden Eintrag aus.';
-$this->phrasen['coodle/ressourcen']='Ressourcen / TeilnehmerIn';
+$this->phrasen['coodle/terminZiehenBeschreibung']='Ziehen Sie den Termin an die gewünschte(n) Position(en) um Terminvorschläge zu setzen';
+$this->phrasen['coodle/ressourcenBeschreibung']='Hier können Sie Personen, Gruppen und Räume zur Umfrage hinzufügen.
Tippen Sie dazu den Namen in das Textfeld und wählen Sie den entsprechenden Eintrag aus.';
+$this->phrasen['coodle/ressourcen']='Ressourcen / TeilnehmerInnen / Gruppen';
$this->phrasen['coodle/weiterZurTerminauswahl']='Weiter zur Terminauswahl';
+$this->phrasen['coodle/umfrageLaeuftBereits']='Die Umfrage läuft bereits. Sie können keine Änderungen an den Terminen vornehmen.';
$this->phrasen['coodle/ressourceEntfernen']='Ressource entfernen';
$this->phrasen['coodle/umfrageStarten']='Umfrage starten';
-$this->phrasen['coodle/startBeschreibung']='Klicken Sie hier um die Teilnehmer zu Informieren und die Umfrage zu starten';
+$this->phrasen['coodle/startBeschreibung']='Klicken Sie hier, um die TeilnehmerInnen zu informieren und die Umfrage zu starten';
$this->phrasen['coodle/keineTermineVorhanden']='Es sind noch keine Termine für diese Umfrage vorhanden';
$this->phrasen['coodle/keineRessourcenVorhanden']='Es sind noch keine Teilnehmer zugeordnet';
$this->phrasen['coodle/mailVersandtAn']='Mail wurde erfolgreich an %s versandt';
@@ -44,18 +48,33 @@ $this->phrasen['coodle/terminauswahl']='Coodle Terminauswahl';
$this->phrasen['coodle/erstelltVon']='Erstellt von %s (vor %s Tagen)';
$this->phrasen['coodle/zurueckZurUebersicht']='Zurück zur Übersicht';
$this->phrasen['coodle/einladungNeuVerschicken']='Einladungen neu verschicken';
-$this->phrasen['coodle/umfrageAbgeschlossen']='Die Umfrage ist abgeschlossen';
+$this->phrasen['coodle/umfrageAbgeschlossen']='Die Umfrage ist abgeschlossen. Der Termin wurde auf %s festgelegt';
$this->phrasen['coodle/loeschen']='Umfrage stornieren';
$this->phrasen['coodle/zurUmfrage']='Zur Umfrage';
-$this->phrasen['coodle/ressource']='Ressource / TeilnehmerIn';
+$this->phrasen['coodle/ressource']='Ressource / TeilnehmerIn / Gruppe';
$this->phrasen['coodle/raumBelegt']='Der Raum %s kann nicht reserviert werden, da er belegt ist!';
$this->phrasen['coodle/laufendeUmfragen']='Laufende Umfragen';
$this->phrasen['coodle/beendeteUmfragen']='Beendete Umfragen';
$this->phrasen['coodle/ReservierungNichtMoeglich']='Bitte beachten Sie, dass Raumreservierungen nach dem %s noch nicht möglich sind.';
$this->phrasen['coodle/raumNichtReserviert']='Achtung: Ihr Raum wurde nicht reserviert, da Raumreservierungen nach dem %s derzeit noch nicht möglich sind.';
$this->phrasen['coodle/auswahlEndtermin']='Auswahl des Endtermins';
-$this->phrasen['coodle/auswahlHinweis']='Durch diese Auswahl wird der endgültige Termin ausgewählt und die Umfrage beendet. Dieser Vorgang kann nicht rückgängig gemacht werden.';
+$this->phrasen['coodle/auswahlHinweis']='Das Speichern des Endtermins beendet die Umfrage und informiert alle TeilnehmerInnen über das Ergebnis. Dieser Vorgang kann nicht rückgängig gemacht werden.';
$this->phrasen['coodle/keineAuswahl']='Keine Auswahl';
$this->phrasen['coodle/umfrageWurdeBereitsGestartet']='Umfrage wurde bereits gestartet';
$this->phrasen['coodle/umfrageNochNichtGestartet']='Umfrage wurde noch nicht gestartet';
+$this->phrasen['coodle/titelEingeben']='Titel eingeben';
+$this->phrasen['coodle/titelInfotext']='Geben Sie Ihrer Umfrage einen aussagekräftigen Titel. Dieser wird auch im Betreff der E-Mail angezeigt.';
+$this->phrasen['coodle/beschreibungInfotext']='Erläutern Sie hier Details zum Termin. Diese werden auch im Text der E-Mail angezeigt.';
+$this->phrasen['coodle/dauerInfotext']='Wählen Sie hier die vermutliche Dauer des Termins.';
+$this->phrasen['coodle/endeInfotext']='Sie erhalten eine E-Mail, sobald das Endedatum der Umfrage überschritten wurde.';
+$this->phrasen['coodle/mailversand']='Mailversand';
+$this->phrasen['coodle/infotextMailversand']='Wenn Sie diese Option aktivieren, erhalten Sie bei jeder Terminänderung eines Teilnehmers/einer Teilnehmerin eine Benachrichtigung';
+$this->phrasen['coodle/teilnehmerAnonym']='Anonyme TeilnehmerInnen';
+$this->phrasen['coodle/infotextTeilnehmerAnonym']='Wenn Sie diese Option aktivieren, sehen die TeilnehmerInnen weder die Namen, noch die Anzahl der anderen TeilnehmerInnen, sondern nur die Summen der Einträge';
+$this->phrasen['coodle/terminAnonym']='Anonyme Terminwahl';
+$this->phrasen['coodle/infotextTerminAnonym']='Wenn Sie diese Option aktivieren, sehen die TeilnehmerInnen nicht, ob und welche Termine von den anderen TeilnehmerInnen gewählt wurden, jedoch die Namen der TeilnehmerInnen und die Summe der Einträge';
+$this->phrasen['coodle/dieTeilnehmerDieserUmfrageSindAnonym']='Die TeilnehmerInnen dieser Umfrage sind anonym.';
+$this->phrasen['coodle/dieTermineDieserUmfrageSindAnonym']='Die Terminwahl der TeilnehmerInnen dieser Umfrage ist anonym.';
+$this->phrasen['coodle/TerminInDerVergangenheit']='Dieser Termin liegt in der Vergangenheit und kann nicht gewählt werden';
+$this->phrasen['coodle/keinTerminMoeglich']='Kein Termin möglich';
?>
diff --git a/locale/en-US/coodle.php b/locale/en-US/coodle.php
index d8dba30dc..9dcc907bd 100755
--- a/locale/en-US/coodle.php
+++ b/locale/en-US/coodle.php
@@ -17,7 +17,7 @@ $this->phrasen['coodle/aktion']='Action';
$this->phrasen['coodle/neueUmfrage']='Create a new poll';
$this->phrasen['coodle/termine']='Manage appointments';
$this->phrasen['coodle/dragEvent']='Appointment';
-$this->phrasen['coodle/terminZiehenBeschreibung']='Drag the appointment to the date and time you would like to suggest it take place';
+$this->phrasen['coodle/terminZiehenBeschreibung']='Drag the appointment to the date(s) and time(s) you would like to suggest it take place';
$this->phrasen['coodle/ressourcenBeschreibung']='You can add rooms and people to the poll here. Simply type the name in the textbox and select the appropriate entry.';
$this->phrasen['coodle/ressourcen']='Ressources';
$this->phrasen['coodle/weiterZurTerminauswahl']='Continue to appointment selection';
@@ -43,7 +43,7 @@ $this->phrasen['coodle/keineOderMehrereRäume']='No room or multiple rooms have
$this->phrasen['coodle/terminauswahl']='Coodle appointment selection';
$this->phrasen['coodle/erstelltVon']='Created from %s (%s days ago)';
$this->phrasen['coodle/einladungNeuVerschicken']='Send invitations again';
-$this->phrasen['coodle/umfrageAbgeschlossen']='The poll is closed';
+$this->phrasen['coodle/umfrageAbgeschlossen']='The poll is closed. The date has been scheduled on %s';
$this->phrasen['coodle/loeschen']='Cancel poll';
$this->phrasen['coodle/zurUmfrage']='To the poll';
$this->phrasen['coodle/ressource']='Ressource';
@@ -57,5 +57,11 @@ $this->phrasen['coodle/auswahlHinweis']='Once you have made this selection, the
$this->phrasen['coodle/keineAuswahl']='No Item selected';
$this->phrasen['coodle/umfrageWurdeBereitsGestartet']='Poll has already been started.';
$this->phrasen['coodle/umfrageNochNichtGestartet']='Poll has not yet been started.';
-
+$this->phrasen['coodle/titelEingeben']='Enter Title';
+$this->phrasen['coodle/titelInfotext']='Geben Sie Ihrer Umfrage einen aussagekräftigen Titel. Dieser wird auch im Betreff der E-Mail angezeigt.';
+$this->phrasen['coodle/beschreibungInfotext']='Erläutern Sie hier Details zum Termin. Diese werden auch im Text der E-Mail angezeigt.';
+$this->phrasen['coodle/dauerInfotext']='Wählen Sie hier die vermutliche Dauer des Termins.';
+$this->phrasen['coodle/endeInfotext']='?';
+$this->phrasen['coodle/TerminInDerVergangenheit']='Dieser Termin liegt in der Vergangenheit und kann nicht gewählt werden';
+$this->phrasen['coodle/keinTerminMoeglich']='Kein Termin möglich';
?>
diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php
index 31eb37d72..255506ab7 100644
--- a/system/dbupdate_3.3.php
+++ b/system/dbupdate_3.3.php
@@ -284,7 +284,7 @@ if(!$result = @$db->db_query("SELECT mailversand FROM campus.tbl_coodle LIMIT 1;
// Spalte onlinebewerbung_studienplan in lehre.tbl_studienplan
if(!$result = @$db->db_query("SELECT onlinebewerbung_studienplan FROM lehre.tbl_studienplan LIMIT 1;"))
{
- $qry = "ALTER TABLE lehre.tbl_studienplan ADD COLUMN onlinebewerbung_studienplan boolean;";
+ $qry = "ALTER TABLE lehre.tbl_studienplan ADD COLUMN onlinebewerbung_studienplan boolean NOT NULL DEFAULT true;";
if(!$db->db_query($qry))
echo 'lehre.tbl_studienplan: '.$db->db_last_error().' ';
diff --git a/system/vorlage_zip/PrProtMA.odt b/system/vorlage_zip/PrProtMA.odt
index 9f020f837..ee7d51a46 100755
Binary files a/system/vorlage_zip/PrProtMA.odt and b/system/vorlage_zip/PrProtMA.odt differ
diff --git a/vilesci/lehre/studienordnung.inc.php b/vilesci/lehre/studienordnung.inc.php
index e6f37ede3..71c407b15 100644
--- a/vilesci/lehre/studienordnung.inc.php
+++ b/vilesci/lehre/studienordnung.inc.php
@@ -276,11 +276,11 @@ switch($method)