} else { $id = $this->pdh->get('pages', 'alias_to_page', array($this->in->get('page', ''))); } } else { message_die($this->user->lang('info_invalid_id'), $this->user->lang('info_invalid_id_title')); } if (!$this->pdh->get('pages', 'page_exists', array($id))) { message_die($this->user->lang('info_invalid_id'), $this->user->lang('info_invalid_id_title')); } if (!$this->pdh->get('pages', 'check_visibility', array($id))) { message_die($this->user->lang('noauth_u_information_view'), $this->user->lang('noauth_default_title')); } $content = $this->pdh->get('pages', 'content', array($id)); $arrHooks = $this->hooks->process('pages_parse', array('text' => $content), true); $content = $arrHooks['text']; $myRatings = array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10'); $users_voted = $this->pdh->get('pages', 'voters', array($id)); $u_has_voted = !$users_voted[$this->user->data['user_id']] ? false : true; $this->tpl->assign_vars(array('PAGE_ID' => $id, 'INFO_PAGE_CONTENT' => $this->bbcode->parse_shorttags(xhtml_entity_decode($content)), 'INFO_PAGE_TITLE' => sanitize($this->pdh->get('pages', 'title', array($id))), 'EDITED' => $this->pdh->get('pages', 'edit_date', array($id)) ? $this->user->lang('info_edit_user') . $this->pdh->get('user', 'name', array($this->pdh->get('pages', 'edit_user', array($id)))) . $this->user->lang('info_edit_date') . $this->time->user_date($this->pdh->get('pages', 'edit_date', array($id)), false, false, true) : '', 'S_IS_ADMIN' => $this->user->check_auth('a_pages_man', false), 'STAR_RATING' => $this->pdh->get('pages', 'voting', array($id)) == '1' ? $this->jquery->StarRating('info_vote', $myRatings, 'pages.php' . $this->SID . '&page=' . sanitize($id) . '&mode=vote', $this->pdh->get('pages', 'rating', array($id)), $u_has_voted) : '')); //Comment-System if ($this->pdh->get('pages', 'comments', array($id)) == '1') { $this->comments->SetVars(array('attach_id' => $id, 'page' => 'custompages', 'auth' => 'a_pages_man')); $this->tpl->assign_vars(array('COMMENTS' => $this->comments->Show())); } $this->core->set_vars(array('page_title' => sanitize($this->pdh->get('pages', 'title', array($id))), 'template_file' => 'pages.html', 'description' => substr(strip_tags($this->bbcode->remove_embeddedMedia($this->bbcode->remove_shorttags(xhtml_entity_decode($content)))), 0, 250), 'image' => register('socialplugins')->getFirstImage(xhtml_entity_decode($content)), 'display' => true)); } } if (version_compare(PHP_VERSION, '5.3.0', '<')) { registry::add_const('short_pages', pages::__shortcuts()); } registry::register('pages');