4require_once(
"./Services/Xml/classes/class.ilSaxParser.php");
 
    5require_once(
"Services/Mail/classes/class.ilMailbox.php");
 
   30                define(
'EXPORT_VERSION',4);
 
   32                parent::__construct($a_xml_file);
 
   33                $this->mode = $a_mode;
 
   44                return count($this->mails);
 
   49                if(count($this->not_imported))
 
   51                        return implode(
"<br/>",$this->not_imported);
 
   63                xml_set_object($a_xml_parser,$this);
 
   64                xml_set_element_handler($a_xml_parser,
'handlerBeginTag',
'handlerEndTag');
 
   65                xml_set_character_data_handler($a_xml_parser,
'handlerCharacterData');
 
   73                parent::startParsing();
 
   78                                if(count($this->not_imported))
 
  102                                if($a_attribs[
"exportVersion"] < EXPORT_VERSION)
 
  104                                        $ilErr->raiseError(
"!!! This export Version isn't supported, update your ILIAS 2 installation" 
  112                                        $this->not_imported[] = $a_attribs[
"id"];
 
  123                                        if($a_attribs[
"systemMessage"])
 
  135                                        $this->mails[
$this->counter][
"import_name"] = $a_attribs[
"import_name"];
 
  161                                if(!isset($this->mails[$this->counter][
"folder_id"]))
 
  163                                        $tmp_mailbox = 
new ilMailbox($this->i3_id);
 
  167                                                        $this->mails[
$this->counter][
"folder_id"] = $tmp_mailbox->getInboxFolder();
 
  171                                                        $this->mails[
$this->counter][
"folder_id"] = $tmp_mailbox->getSentFolder();
 
  175                                                        $this->mails[
$this->counter][
"folder_id"] = $tmp_mailbox->getDraftsFolder();
 
  179                                                        $this->mails[
$this->counter][
"folder_id"] = $tmp_mailbox->getTrashFolder();
 
  206                                        $this->mails[
$this->counter][
"m_message"] = 
"Url: ".$this->cdata.
" <br>";
 
  210                        case "urlDescription":
 
  238                $a_data = str_replace(
"<",
"<",$a_data);
 
  239                $a_data = str_replace(
">",
">",$a_data);
 
  243                        $this->cdata .= $a_data;
 
  251                $sth = 
$ilDB->prepare(
"INSERT INTO mail VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
 
  263                if(!count($this->mails))
 
  268                foreach($this->mails as $mail)
 
  271                                                         addslashes($mail[
"usr_id"]),
 
  272                                                         addslashes($mail[
"folder_id"]),
 
  273                                                         addslashes($mail[
"sender_id"]),
 
  274                                                         addslashes(serialize(array())),
 
  275                                                         addslashes($mail[
"send_time"]),
 
  276                                                         addslashes($mail[
"rcp_to"]),
 
  277                                                         addslashes($mail[
"rcp_cc"]),
 
  278                                                         addslashes($mail[
"rcp_bcc"]),
 
  279                                                         addslashes($mail[
"read"]),
 
  280                                                         addslashes(serialize(array(
"normal"))),
 
  281                                                         addslashes($mail[
"m_email"]),
 
  282                                                         addslashes($mail[
"m_subject"]),
 
  283                                                         addslashes($mail[
"m_message"]),
 
  284                                                         addslashes($mail[
"import_name"])));
 
  287                return $sql ? $sql :array();
 
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
An exception for terminatinating execution or to throw for unit testing.
__construct($a_xml_file, $a_mode)
Constructor.
handlerCharacterData($a_xml_parser, $a_data)
handler for character data
handlerBeginTag($a_xml_parser, $a_name, $a_attribs)
handler for begin of element
handlerEndTag($a_xml_parser, $a_name)
handler for end of element
startParsing()
start the parser
setHandlers($a_xml_parser)
set event handler should be overwritten by inherited class @access private
Mail Box class Base class for creating and handling mail boxes.
static _getImportedUserId($i2_id)
Base class for sax-based expat parsing extended classes need to overwrite the method setHandlers and ...