public function __construct($module = null, $action = null) { parent::__construct($module, $action); // Set up some variables $this->setModule('calendar'); $this->setController('calendareventattachments'); $this->setModel('calendarevent'); }
public function __construct($module = null, $action = null) { parent::__construct($module, $action); // Set up some variables $this->setModule('contacts'); $this->setController('companyattachments'); $this->setModel('company'); $this->setIdField('company_id'); }
protected function _initialize() { defined('Ueditor') or define('Ueditor', true); if (IS_POST) { $authkey = I('get.authkey'); $sess_id = I('get.sessid', 0); $userid = I('get.uid'); $this->isadmin = I('get.isadmin', 0, 'intval'); $key = md5(C("AUTHCODE") . $sess_id . $userid . $this->isadmin); if ($key != $authkey) { exit(json_encode(array('state' => '身份认证失败!'))); } else { $this->uid = $userid; $this->groupid = I('get.groupid'); } } parent::_initialize(); if ($this->isadmin) { //上传大小 $this->confing['imageMaxSize'] = $this->confing['scrawlMaxSize'] = $this->confing['catcherMaxSize'] = $this->confing['videoMaxSize'] = $this->confing['fileMaxSize'] = self::$Cache['Config']['uploadmaxsize'] * 1024; //上传文件类型 $uploadallowext = explode('|', self::$Cache['Config']['uploadallowext']); foreach ($uploadallowext as $k => $rs) { $uploadallowext[$k] = ".{$rs}"; } $this->confing['fileAllowFiles'] = $uploadallowext; } else { $this->confing['imageMaxSize'] = $this->confing['scrawlMaxSize'] = $this->confing['catcherMaxSize'] = $this->confing['videoMaxSize'] = $this->confing['fileMaxSize'] = self::$Cache['Config']['qtuploadmaxsize'] * 1024; //上传文件类型 $uploadallowext = explode('|', self::$Cache['Config']['qtuploadallowext']); foreach ($uploadallowext as $k => $rs) { $uploadallowext[$k] = ".{$rs}"; } $this->confing['fileAllowFiles'] = $uploadallowext; } }
protected function getPageName($base = null, $type = null) { return parent::getPageName(empty($base) ? 'attachment' : $base, $type); }
public function view_project() { parent::index(); }
public function view_crm_opportunity() { parent::index(); }
public function view_crm_activity() { parent::index(); }
* @Copyright (C) 2007, 2008 Jonathan M. Cameron, All Rights Reserved * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL * @link http://joomlacode.org/gf/project/attachments/frs/ * @author Jonathan M. Cameron **/ require_once JApplicationHelper::getPath('admin_html'); require_once JPATH_COMPONENT . DS . 'controller.php'; JTable::addIncludePath(JPATH_COMPONENT . DS . 'tables'); $document =& JFactory::getDocument(); $document->addStyleSheet($mainframe->getSiteURL() . 'administrator/components/com_attachments/attachments.css', 'text/css', null, array()); // Check for requests for named controller $controller = JRequest::getWord('controller', False); if ($controller) { // Invoke the named controller, if it exists $path = JPATH_COMPONENT . DS . 'controllers' . DS . $controller . '.php'; jimport('joomla.filesystem.file'); if (JFile::exists($path)) { require_once $path; $classname = 'AttachmentsController' . ucfirst($controller); $controller = new $classname(); $controller->execute(JRequest::getCmd('task')); $controller->redirect(); } else { echo "<h1>Error! Unable to find controller '{$controller}'!</h1><br>"; exit; } } // Use default controller $controller = new AttachmentsController(array('default_task' => 'showAttachments')); $controller->execute(JRequest::getVar('task')); $controller->redirect();
/** * Model::beforeFilter() callback * * Used to override Acl permissions for this controller. */ public function beforeFilter() { parent::beforeFilter(); }