array( 'type' => 'int', 'col' => 'id_fax', 'form' => 'idFax', ), 'Reference' => array( 'type' => 'text', 'col' => 'reference_fax', 'form' => 'referenceFax', 'label' => true, ), 'Contenu' => array( 'type' => 'text', 'col' => 'contenu_fax', 'form' => 'contenuFax', ), 'Creation' => array( 'type' => 'datetime', 'col' => 'creation_fax', 'datetype' => 'creation', 'order' => 'DESC', ), 'Depart' => array( 'type' => 'datetime', 'col' => 'depart_fax', 'form' => 'departFax', 'order' => 'DESC', ), 'Envoi' => array( 'type' => 'bool', 'col' => 'envoi_fax', 'default-value' => false, ), 'Differe' => array( 'type' => 'bool', 'col' => 'differe_fax', 'default-value' => false, ), 'Operation' => array( 'type' => 'object', 'col' => 'default', 'form' => 'default', 'class' => 'PGS_Operation', ), 'Recipients' => array( 'type' => 'ext-object', 'class' => 'PGS_Fax_Recipient', 'on-delete' => 'delete', ), 'Fichier' => array( 'type' => 'object', 'class' => 'PGS_Fichier', 'col' => 'default', 'on-delete' => 'delete', ), ); function getProperties() { return self::$properties; } function parseBody() { $body = ''; if ($this->Fichier->Id > 0) { $body .= 'CONTENTTYPE: PDF'."\n"; $body .= 'OUTPUTMODE: fine'."\n"; $body .= 'BT '.$this->Fichier->Poids."\n"; } else if (strlen($this->Contenu) > 0) { $body .= 'BT'."\n"; $body .= $this->parseContenu()."\n"; $body .= 'NNNN'."\n"; } if (strlen($body) > 0) { return $body; } else { return false; } } } ?>