function influences() { $article = JRequest::getInt('article', -1); if ($article != -1) { /*zobrazíme Jakubovu transformaci*/ require_once JPATH_COMPONENT . DS . 'models' . DS . 'bkef.php'; $model = new BkefModel(); require_once JPATH_COMPONENT . DS . 'views' . DS . 'influences' . DS . 'influences.html.php'; $view = new BkefViewInfluences(); $article = JRequest::getInt('article'); $_SESSION['articleId'] = $article; $view->article = $article; $view->articleTitle = $model->loadTitle($article); $view->xmldocument = $model->load($article)->asXML(); $user =& JFactory::getUser(); $view->username = $user->name; $view->display(); } else { /*zobrazime výběr článku*/ require_once JPATH_COMPONENT . DS . 'models' . DS . 'bkef.php'; require_once JPATH_COMPONENT . DS . 'views' . DS . 'influences' . DS . 'articles.html.php'; $view = new BkefViewSelectArticle(); $view->setModel(new BkefModel(), true); $view->display(); } }
/** * Funkce pro akci "selArticle" */ function selArticle() { /*DONE*/ $article = JRequest::getInt('article', -1); if (!$article && isset($_SESSION["BKEF"]['article'])) { $article = $_SESSION["BKEF"]["article"]; } if ($article != -1) { /*už jsme vybrali článek, tak zobrazíme to, na co odkazuje"*/ $_SESSION["BKEF"]["article"] = $article; require_once JPATH_COMPONENT . DS . 'models' . DS . 'bkef.php'; require_once JPATH_COMPONENT . DS . 'views' . DS . 'edit' . DS . 'article.html.php'; $view = new BkefViewArticle(); $view->setModel(new BkefModel(), true); $view->article = $article; $view->articleTitle = $view->getModel()->loadTitle($article); $view->xml = $view->getModel()->load($article); $view->display(); } else { require_once JPATH_COMPONENT . DS . 'models' . DS . 'bkef.php'; require_once JPATH_COMPONENT . DS . 'views' . DS . 'edit' . DS . 'articles.html.php'; $view = new BkefViewSelectArticle(); $view->setModel(new BkefModel(), true); $view->display(); } }