Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 18ac9009

Přidáno uživatelem Ondřej Fibich před asi 9 roky(ů)

Fix merge issue that removed all staff from developer branch :-).

Zobrazit rozdíly:

application/controllers/email.php
$view->render(true);
}
/**
* This function show email without FreenetIS GUI
*
* @author David Raska
*/
public function preview()
{
$email_hash = $this->input->get('id');
if (!isset($email_hash))
{
Controller::warning(PARAMETER);
}
$eq_model = new Email_queue_Model();
$email = $eq_model->where('hash', $email_hash)->find_all();
if (!count($email))
{
Controller::error(ACCESS);
}
$email = $email->current();
echo $email->body;
$email->state = Email_queue_Model::STATE_READ;
$email->save();
}
/**
* Return image and marks e-mail as read
*
* @author David Raška
*/
public function displayed()
{
$im = imagecreatetruecolor(1, 1);
$color = imagecolorallocate($im, 255,255,255);
imagefill($im, 0, 0, $color);
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
$email_hash = $this->input->get('id');
if (!isset($email_hash))
{
die;
}
$eq_model = new Email_queue_Model();
$email = $eq_model->where('hash', $email_hash)->find_all();
if (!count($email))
{
die;
}
$email = $email->current();
$email->state = Email_queue_Model::STATE_READ;
$email->save();
}
/**
* Callback for state of SMS message
*
......
{
echo '<div style="color:green;">' . __('Sent') . '</div>';
}
elseif ($item->state == Email_queue_Model::STATE_READ)
{
echo '<div style="color:green;">' . __('Read') . '</div>';
}
elseif ($item->state == Email_queue_Model::STATE_NEW)
{
echo '<div style="color:grey;">' . __('Unsent') . '</div>';

Také k dispozici: Unified diff