Пример #1
0
 /**
  * Helper main function
  * @return String HTML to be inserted in the view
  * @param Array $structureArray [optional] Structure in an array form
  */
 public function RecyclebinEditor($structureArray = array())
 {
     $grpDB = new Usersgroups();
     $this->groups = $grpDB->fetchLabelstoFlatArray();
     $this->addNodes($structureArray);
     return $this->toReturn;
 }
Пример #2
0
 /**
  * Helper main function
  * @return String HTML to be inserted in the view
  * @param Array $structureArray [optional] Structure in an array form
  */
 public function StructureEditor($structureArray = array())
 {
     $oPageDivs = new Pagdivspage();
     $this->listDraftContentByPage = $oPageDivs->getDivsDraft();
     $grpDB = new Usersgroups();
     $this->groups = $grpDB->fetchLabelstoFlatArray();
     $this->addNodes($structureArray);
     return $this->toReturn;
 }
Пример #3
0
    /**
     *
     * @return void
     */
    public function indexAction()
    {
        $r = $this->r;
        $groupsDb = new Usersgroups();
        $this->view->groups = $groupsDb->fetchLabelstoFlatArray(500, false);
        // define filters
        $filters = '';
        if (isset($r->searchstr)) {
            $filters .= " AND ( LOWER( CONCAT(users.fname, ' ', users.lname)) LIKE '%" . addslashes(strtolower($r->searchstr)) . "%') ";
        }
        if (isset($r->fgroup) && $r->fgroup != '') {
            $filters .= " AND users.usersgroups_id = '" . addslashes($r->fgroup) . "' ";
        }
        $sql = $this->_getQuery('people', array($filters));
        $this->view->users_id = $this->usersId;
        $this->view->people = $this->_db->fetchAll($sql);
        /**
         * load paginator
         */
        if (isset($r->context)) {
            $context = $r->context;
        } else {
            $context = 'default';
        }
        if (isset($r->filter)) {
            $filter = $r->filter;
        } else {
            $filter = '';
        }
        if (isset($r->mode)) {
            $mode = $r->mode;
        } else {
            $mode = 'thumb';
        }
        $this->view->embed = true;
        $this->view->addiScript = '<script>
				var oPaginator;
				$(function() {
					if($("#peoplelisting").length > 0) oPaginator = $("#peoplelisting").paginator( {
					\'embeded\' : \'' . $r->embed . '\',
					\'context\' : \'' . $context . '\',
					\'filter\' : \'' . $filter . '\',
					\'mode\' : \'' . $mode . '\',
					\'ajaxurl_displayresult\' : \'/adminpeople/services/displaypeople\',
				});
				$(".edefiles").css("background","#DDD");
				$(".contentEditor > li.editing").css("padding-top","5px");
			});
		</script>';
        // END - paginator
    }
Пример #4
0
 /**
  * Edit the properties of a page
  * @return void
  */
 public function editpropertiesAction()
 {
     $usrgDB = new Usersgroups();
     $this->view->usersgroups = $usrgDB->fetchLabelstoFlatArray();
     $nodes = new Pagstructure();
     $where = 'id = ' . $this->getRequest()->id . ' AND safinstances_id = ' . $this->safinstancesId;
     $this->view->node = $nodes->fetchRow($where);
     if ($this->view->node) {
         $pgs = new Pagstructure();
         $this->view->structureArray = $pgs->toArray($this->safinstancesId);
         $this->view->pagid = $this->getRequest()->id;
         $this->view->menusArray = $this->getMenusArray($this->getRequest()->id, false);
         $this->view->editType = 'normal';
         $this->setSubtitle2($this->view->node->label);
         $this->setSubtitle('Properties');
         $this->setSideBar('settings', 'pages');
         $this->render('create');
     } else {
         $this->render('index');
     }
 }