예제 #1
0
 public function processPreInstall()
 {
     $user = _ioDAO('dbuser')->get(1);
     $user->password_dbuser = md5($pass = substr(UniqId('p'), -5));
     _ioDAO('dbuser')->update($user);
     CopixSession::set('admin|database|loginInformations', array('login' => 'admin', 'password' => $pass));
 }
 /**
  * Writes the email on the harddrive
  */
 function _writeOnDisk(&$copixEmail)
 {
     $mailFilePath = $this->_config->mailFilePath . UniqId('mail_');
     //Writes the mail into the file
     $f = fopen($mailFilePath, "w");
     fwrite($f, '________________________________________________________' . "\n");
     fwrite($f, 'To: ');
     foreach ((array) $copixEMail->to as $adr) {
         fwrite($f, $adr . "\n");
     }
     fwrite($f, '________________________________________________________' . "\n");
     fwrite($f, 'cc: ');
     foreach ((array) $copixEMail->cc as $adr) {
         fwrite($f, $adr . "\n");
     }
     fwrite($f, '________________________________________________________' . "\n");
     fwrite($f, 'cci: ');
     foreach ((array) $copixEMail->cc as $adr) {
         fwrite($f, $adr . "\n");
     }
     fwrite($f, '________________________________________________________' . "\n");
     fwrite($f, 'Subject: ' . $copixEMail->subject . "\n");
     fwrite($f, '________________________________________________________' . "\n");
     fwrite($f, 'Text content' . "\n");
     fwrite($f, '________________________________________________________' . "\n");
     fwrite($f, $copixEMail->message . "\n");
     fwrite($f, '________________________________________________________' . "\n");
     fwrite($f, 'HTML content' . "\n");
     fwrite($f, '________________________________________________________' . "\n");
     fwrite($f, $copixEMail->messageHTML . "\n");
     fclose($f);
 }