1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function content_init() {
global $ServerData;
global $core;
if ($this->view_param["view_mode"] == 'group_list') {
if (file_exists($this->template = $ServerData."module_templates/assoc_groups/".$this->view_param["template"]."/list.vtmpl")) {
$this->body = $this->show_group_list($this->view_param["group_type"]);
} else{
$this->body = "Шаблон отсутствует: ".$template;
}
}
elseif ($this->view_param["view_mode"] == 'plan') {
if (file_exists($this->template = $ServerData."module_templates/assoc_groups/".$this->view_param["template"]."/plan.vtmpl")) {
$this->body = $this->show_assoc_plan();
} else{
$this->body = "Шаблон отсутствует: ".$template;
}
}
elseif ($this->view_param["view_mode"] == 'detail') {
if ($id = intval($this->q_param["id"])) {
if (file_exists($this->template = $ServerData."module_templates/assoc_groups/".$this->view_param["template"]."/detail.vtmpl")) {
$this->body = $this->show_person($id, $this->view_param["group_type"]);
} else{
$this->body = "Шаблон отсутствует: ".$template;
}
}
}
}