mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-11-14 04:11:58 +01:00
46 lines
1.1 KiB
PHP
46 lines
1.1 KiB
PHP
<?php
|
|
|
|
|
|
class ControllerMessageNotSpam extends Controller {
|
|
|
|
public function index(){
|
|
|
|
$this->id = "content";
|
|
$this->template = "message/headers.tpl";
|
|
$this->layout = "common/layout-empty";
|
|
|
|
$request = Registry::get('request');
|
|
$db = Registry::get('db');
|
|
|
|
$this->load->model('search/search');
|
|
$this->load->model('search/message');
|
|
|
|
$this->load->model('user/user');
|
|
|
|
$this->document->title = $this->data['text_message'];
|
|
|
|
$this->data['id'] = $this->request->post['id'];
|
|
|
|
if(!verify_piler_id($this->data['id'])) {
|
|
AUDIT(ACTION_UNKNOWN, '', '', $this->data['id'], 'unknown id: ' . $this->data['id']);
|
|
die("invalid id: " . $this->data['id']);
|
|
}
|
|
|
|
if(!$this->model_search_search->check_your_permission_by_id($this->data['id'])) {
|
|
AUDIT(ACTION_UNAUTHORIZED_VIEW_MESSAGE, '', '', $this->data['id'], '');
|
|
die("no permission for " . $this->data['id']);
|
|
}
|
|
|
|
AUDIT(ACTION_NOT_SPAM, '', '', $this->data['id'], '');
|
|
|
|
if(DEFAULT_RETENTION > 30) {
|
|
$this->model_search_message->not_spam($this->data['id']);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
?>
|