Пример #1
0
 /**
  * Class process method wnich is used to execute this component.
  */
 public function process()
 {
     phpfox::isUser(true);
     if (!Phpfox::isUser()) {
         return Phpfox_Error::display('Need to be logged in!');
     }
     Phpfox::getUserParam('blog.can_import_blog', true);
     //check if user able to access this page
     $this->template()->setBreadcrumb(phpfox::getPhrase('blog.blogs'), $this->url()->makeUrl('blog'))->setBreadcrumb(phpfox::getPhrase('blog.import_blog_s'), $this->url()->makeUrl('blog.import'), true)->setHeader('cache', array('jquery/plugin/jquery.highlightFade.js' => 'static_script', 'switch_legend.js' => 'static_script', 'switch_menu.js' => 'static_script', 'quick_edit.js' => 'static_script', 'pager.css' => 'style_css'));
 }
 public function shareReview()
 {
     $iUserId = $this->get('user');
     phpfox::isUser(true);
     if ($iUserId != phpfox::getUserId()) {
         $this->call("<script>tb_remove();</script>");
         return false;
     }
     $this->setTitle(Phpfox::getPhrase('reviewactivity.share_review_activities'));
     phpfox::getBlock('reviewactivity.reviewactivity', array());
 }
Пример #3
0
 /**
  * Class process method wnich is used to execute this component.
  */
 public function process()
 {
     phpfox::isUser(true);
     if (!Phpfox::isUser()) {
         return Phpfox_Error::display('Need to be logged in!');
     }
     Phpfox::getUserParam('blog.can_export_blog', true);
     //check if user able to access this page
     $exportTemplate = $this->request()->get('option');
     if ($exportTemplate) {
         $content = Phpfox::getService('blog.export')->getContent($exportTemplate);
         // echo($content);exit;
         Phpfox::getService('blog.export')->exportXML($content, $exportTemplate);
         return;
     }
     $this->template()->setBreadcrumb(phpfox::getPhrase('blog.blogs'), $this->url()->makeUrl('blog'))->setBreadcrumb(phpfox::getPhrase('blog.export_blog_s'), $this->url()->makeUrl('blog.export'), true)->setHeader('cache', array('jquery/plugin/jquery.highlightFade.js' => 'static_script', 'switch_legend.js' => 'static_script', 'switch_menu.js' => 'static_script', 'quick_edit.js' => 'static_script', 'pager.css' => 'style_css'));
 }