Aggiunti nuovi task per mail server Creato metodo in guihandler per aprire le pagine con richiesta post Aggiunta possibilità di passare callback ai backend delle datatables Modificati alcuni url Modificato HTMLInclusion per non utilizzare i path assoluti in fase di creazione ma solo in fase di stampa degli header (per evitare problemi sugli script) Creato mailserver e mail template Creata interfaccia mail per salvataggio mail in database, gestione coda. Creata interfaccia grafica per la gestione delle mail e delle code Incluse librerie PHP_Mailer Inserite pagine di creazione e cancellazione manuale utenti Bugfix su alcune pagine di edit
41 lines
761 B
PHP
41 lines
761 B
PHP
<?php
|
|
/*
|
|
Author: Riccardo Di Dato
|
|
Creation Date: 25/gen/2016
|
|
*/
|
|
|
|
|
|
class MailTemplateModel extends Model{
|
|
const STATUS_NEW = 0;
|
|
const STATUS_READY = 1;
|
|
const STATUS_COMPLETE = 2;
|
|
|
|
|
|
public function __construct($saveableObject = null){
|
|
parent::__construct($saveableObject);
|
|
|
|
$requiredProps = array("from","subject","body");
|
|
|
|
if (!$this->hasProperty("status")){
|
|
$this->status = self::STATUS_NEW;
|
|
}
|
|
|
|
if (!$this->hasProperty("date")){
|
|
$this->date = new MongoDate();
|
|
}
|
|
|
|
foreach ($requiredProps as $prop){
|
|
if (!$this->hasProperty($prop)){
|
|
throw new CoreException("Missing parameter '$prop' while calling MailTemplateModel::__construct()");
|
|
}
|
|
}
|
|
}
|
|
|
|
public static function getCollectionName(){
|
|
return "mailTemplate";
|
|
}
|
|
|
|
}
|
|
|
|
|
|
?>
|