Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob

Classes

  • ArticleForumCollection
  • ArticleForumItem
  • ArticleForumLeftBottom
  • ArticleForumRightBottom
  • cContentTypeUserForum
  • UserForum
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * This file contains the class for visualisation and interactions in the left
 4:  * frame.
 5:  *
 6:  * @package Plugin
 7:  * @subpackage UserForum
 8:  * @author Claus Schunk
 9:  * @copyright four for business AG <www.4fb.de>
10:  * @license http://www.contenido.org/license/LIZENZ.txt
11:  * @link http://www.4fb.de
12:  * @link http://www.contenido.org
13:  */
14: defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
15: 
16: /**
17:  * This class contains builds the content of the left frame
18:  *
19:  *
20:  * @package Plugin
21:  * @subpackage UserForum
22:  */
23: class ArticleForumLeftBottom extends cGuiPage {
24: 
25:     protected $_collection;
26: 
27:     public function __construct() {
28:         parent::__construct('left_bottom', 'userforum');
29:         $this->_collection = new ArticleForumCollection();
30:         $this->addScript('location.js');
31:         $this->addStyle('right_bottom.css');
32:     }
33: 
34:     protected function getMenu() {
35:         $arts = new ArticleForumCollection();
36:         $result = $arts->getAllCommentedArticles();
37:         if (count($result) == 0) {
38:             echo UserForum::i18n("NOENTRY");
39:         }
40: 
41:         $cfg = cRegistry::getConfig();
42: 
43:         // get all forms of current client in current language
44:         $forms = $arts->getAllCommentedArticles();
45: 
46:         if (false === $forms) {
47:             return '';
48:         }
49: 
50:         global $area;
51: 
52:         $menu = new cGuiMenu();
53:         for ($i = 0; $i < count($forms); $i++) {
54: 
55:             $formName = $result[$i]['title'];
56:             $menu->setTitle($i, $formName);
57: 
58:             // add 'show form' link
59:             $link = new cHTMLLink();
60: 
61:             $link->setCLink($area, 4, 'show_form');
62:             $link->setTargetFrame('right_bottom');
63:             $link->setClass('linktext');
64:             $link->setCustom('idart', $result[$i]['idart']);
65:             $link->setCustom('idcat', $result[$i]['idcat']);
66:             $link->setContent($formName);
67:             $menu->setLink($i, $link);
68: 
69:             $link = new cHTMLLink();
70: 
71:             $arg = $result[$i]['idart'];
72:             $message = UserForum::i18n('ALLDELETEFROMCAT');
73:             $link->setLink('javascript:void(0)');
74:             $link->setAttribute("onclick", 'Con.showConfirmation(&quot;' . $message . '&quot;, function(){ deleteArticlesByIdLeft(' . $arg . '); }); return false;');
75:             $link->setImage($cfg['path']['images'] . 'delete.gif');
76:             $link->setAlt($message);
77:             $menu->setActions($i, 'delete', $link);
78:         }
79: 
80:         return $menu;
81:     }
82: 
83:     public function receiveData(&$get) {
84:         if ($_GET['action'] === 'delete_form') {
85:             $this->_collection->deleteAllCommentsById($get['idart']);
86:         }
87: 
88:         return $this->getMenu();
89:     }
90: 
91: }
92: 
93: ?>
CMS CONTENIDO 4.9.11 API documentation generated by ApiGen 2.8.0