public function project ($projectAlias = NULL)
{
'pagetitle'=> "Проект {$projectAlias}",
'metakey' => "",
'metadesc' => "",
'error' => "");
//Проверяем авторизован ли юзер
if ($this->session->userdata('is_logged') == 0) {
//Если не авторизован - отправляем к форме входа
redirect('user/login', 'refresh');
}
else {
if ($this->isUserProject($this->session->userdata('uid'), $projectAlias) == FALSE) {
show_404('error_404');
} else {
$data['project'] = $this->model->getprojectdata($projectAlias);
}
$this->parser->parse('tmp/header', $data);
$this->load->view('dashboard/project');
$this->load->view('tmp/footer');
}
}
ICAgIHB1YmxpYyBmdW5jdGlvbiBwcm9qZWN0ICgkcHJvamVjdEFsaWFzID0gTlVMTCkKICAgIHsKICAgICAgICAkZGF0YSA9IGFycmF5KAogICAgICAgICAgICAncGFnZXRpdGxlJz0+ICLQn9GA0L7QtdC60YIgeyRwcm9qZWN0QWxpYXN9IiwKICAgICAgICAgICAgJ21ldGFrZXknICA9PiAiIiwKICAgICAgICAgICAgJ21ldGFkZXNjJyA9PiAiIiwKICAgICAgICAgICAgJ2Vycm9yJyAgICA9PiAiIik7CgogICAgICAgIC8v0J/RgNC+0LLQtdGA0Y/QtdC8INCw0LLRgtC+0YDQuNC30L7QstCw0L0g0LvQuCDRjtC30LXRgAogICAgICAgIGlmICgkdGhpcy0+c2Vzc2lvbi0+dXNlcmRhdGEoJ2lzX2xvZ2dlZCcpID09IDApIHsKICAgICAgICAgICAgLy/QldGB0LvQuCDQvdC1INCw0LLRgtC+0YDQuNC30L7QstCw0L0gLSDQvtGC0L/RgNCw0LLQu9GP0LXQvCDQuiDRhNC+0YDQvNC1INCy0YXQvtC00LAKICAgICAgICAgICAgcmVkaXJlY3QoJ3VzZXIvbG9naW4nLCAncmVmcmVzaCcpOwogICAgICAgIH0KICAgICAgICBlbHNlIHsKICAgICAgICAgICAgaWYgKCR0aGlzLT5pc1VzZXJQcm9qZWN0KCR0aGlzLT5zZXNzaW9uLT51c2VyZGF0YSgndWlkJyksICRwcm9qZWN0QWxpYXMpID09IEZBTFNFKSB7CiAgICAgICAgICAgICAgICBzaG93XzQwNCgnZXJyb3JfNDA0Jyk7CiAgICAgICAgICAgIH0gZWxzZSB7CgoKICAgICAgICAgICAgICAgICRkYXRhWydwcm9qZWN0J10gPSAkdGhpcy0+bW9kZWwtPmdldHByb2plY3RkYXRhKCRwcm9qZWN0QWxpYXMpOwoKICAgICAgICAgICAgfQoKICAgICAgICAgICAgJHRoaXMtPnBhcnNlci0+cGFyc2UoJ3RtcC9oZWFkZXInLCAkZGF0YSk7CiAgICAgICAgICAgICR0aGlzLT5sb2FkLT52aWV3KCdkYXNoYm9hcmQvcHJvamVjdCcpOwogICAgICAgICAgICAkdGhpcy0+bG9hZC0+dmlldygndG1wL2Zvb3RlcicpOwogICAgICAgIH0KCiAgICB9
public function project ($projectAlias = NULL)
{
$data = array(
'pagetitle'=> "Проект {$projectAlias}",
'metakey' => "",
'metadesc' => "",
'error' => "");
//Проверяем авторизован ли юзер
if ($this->session->userdata('is_logged') == 0) {
//Если не авторизован - отправляем к форме входа
redirect('user/login', 'refresh');
}
else {
if ($this->isUserProject($this->session->userdata('uid'), $projectAlias) == FALSE) {
show_404('error_404');
} else {
$data['project'] = $this->model->getprojectdata($projectAlias);
}
$this->parser->parse('tmp/header', $data);
$this->load->view('dashboard/project');
$this->load->view('tmp/footer');
}
}