示例#1
0
文件: control.php 项目: XMGmen/zentao
 /**
  * The construc method, to do some auto things.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->common->startSession();
     $this->common->sendHeader();
     $this->common->setCompany();
     $this->common->setUser();
     $this->common->loadConfigFromDB();
     if (isset($this->config->custom->productproject)) {
         $productCommon = $projectCommon = 0;
         list($productCommon, $projectCommon) = explode('_', $this->config->custom->productproject);
         if ($productCommon != 0 or $projectCommon != 0) {
             $this->lang->productCommon = $this->lang->productCommonList[$productCommon];
             $this->lang->projectCommon = $this->lang->projectCommonList[$projectCommon];
             $this->app->loadLang('common');
         } else {
             $this->lang->productCommon = "产品";
             $this->lang->projectCommon = "Sprint";
         }
     }
     $this->common->loadCustomFromDB();
     if ($this->app->getViewType() == 'mhtml') {
         $this->common->setMobileMenu();
     }
     $this->app->loadLang('company');
 }
示例#2
0
文件: control.php 项目: leowh/colla
 /**
  * The construction function , check is install or not.
  * 
  * @access public
  * @return array
  */
 public function __construct()
 {
     if (!defined('RUN_MODE') or RUN_MODE != 'install') {
         die('error');
     }
     parent::__construct();
 }
示例#3
0
 /**
  * Construct 
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->loadModel('company')->setMenu();
     $this->loadModel('dept');
     $this->loadModel('todo');
 }
示例#4
0
 /**
  * Construct function.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->loadModel('user');
     $this->loadModel('dept');
     $this->my->setMenu();
 }
示例#5
0
 /**
  * Construct function, load dept and user models auto.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->loadModel('dept');
     $this->app->loadLang('user');
     $this->company->setMenu();
 }
 /**
  * construct. 
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     if (!$this->loadModel('sso')->checkKey()) {
         die('');
     }
 }
示例#7
0
 /**
  * Construct function, load model of project and story modules.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->loadModel('project');
     $this->loadModel('story');
     $this->loadModel('tree');
 }
示例#8
0
文件: control.php 项目: XMGmen/zentao
 public function __construct($moduleName = '', $methodName = '')
 {
     parent::__construct($moduleName, $methodName);
     $this->moduleName = 'mySprintBoard';
     $this->loadModel('mySprintBoard');
     $this->loadModel('project');
 }
示例#9
0
 public function __construct()
 {
     parent::__construct();
     if ($this->app->user->account != 'guest') {
         $this->cart->mergeToDb();
     }
 }
 /**
  * Construct function, load model of task, bug, my.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->loadModel('task');
     $this->loadModel('bug');
     $this->loadModel('my')->setMenu();
 }
示例#11
0
 public function __construct()
 {
     parent::__construct();
     $this->loadModel('tree');
     $this->loadModel('user');
     $this->loadModel('action');
     $this->infolibs = $this->info->getLibs();
 }
示例#12
0
 /**
  * The construction function , check is install or not.
  * 
  * @access public
  * @return array
  */
 public function __construct()
 {
     if (!defined('RUN_MODE') or RUN_MODE != 'install') {
         die('error');
     }
     parent::__construct();
     $this->loadModel('site')->setSite();
 }
示例#13
0
 public function __construct()
 {
     parent::__construct();
     if (RUN_MODE == 'admin') {
         $this->view->treeModuleMenu = $this->loadModel('tree')->getTreeMenu('product', 0, array('treeModel', 'createAdminLink'));
         $this->view->treeManageLink = html::a(helper::createLink('tree', 'browse', "type=product"), $this->lang->tree->manage);
     }
 }
示例#14
0
文件: control.php 项目: XMGmen/zentao
 /**
  * Construct function, load product, tree, user auto.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->loadModel('product');
     $this->loadModel('tree');
     $this->loadModel('user');
     $this->view->products = $this->products = $this->product->getPairs('nocode');
 }
示例#15
0
文件: control.php 项目: leowh/colla
 /**
  * Construct function, load model of date.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->app->loadClass('date');
     $this->loadModel('task');
     $this->loadModel('order', 'crm');
     $this->loadModel('customer', 'crm');
 }
示例#16
0
 /**
  * Construct.
  * 
  * @access public
  * @return void
  */
 public function __construct($moduleName = '', $methodName = '')
 {
     parent::__construct($moduleName, $methodName);
     /* Task #1967. check the function of fsocket. */
     if (isset($this->config->mail->mta) and $this->config->mail->mta != 'sendcloud' and !function_exists('fsockopen')) {
         echo js::alert($this->lang->mail->nofsocket);
         die(js::locate('back'));
     }
 }
示例#17
0
 /**
  * The construct function, load product, tree, user auto.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->loadModel('product');
     $this->loadModel('project');
     $this->loadModel('tree');
     $this->loadModel('user');
     $this->loadModel('action');
 }
示例#18
0
 public function __construct()
 {
     parent::__construct();
     if (RUN_MODE == 'admin') {
         $this->view->treeModuleMenu = $this->loadModel('tree')->getTreeMenu('product', 0, array('treeModel', 'createAdminLink'));
         $this->view->treeManageLink = html::a(helper::createLink('product', 'setting'), $this->lang->product->setting, "data-toggle='modal'");
         $this->view->treeManageLink .= '  ' . html::a(helper::createLink('tree', 'browse', "type=product"), $this->lang->tree->manage);
     }
 }
示例#19
0
文件: control.php 项目: fanscky/HTPMS
 /**
  * Construct.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     /* Task #1967. check the function of fsocket. */
     if (!function_exists('fsockopen')) {
         echo js::alert($this->lang->mail->nofsocket);
         die(js::locate('back'));
     }
 }
示例#20
0
文件: control.php 项目: fanscky/HTPMS
 /**
  * Construct function.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     if (!defined('IN_INSTALL')) {
         die;
     }
     parent::__construct();
     $this->app->loadLang('user');
     $this->app->loadLang('admin');
     $this->config->webRoot = getWebRoot();
 }
 /**
  * Construct function, Set projects.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     if ($this->methodName != 'computeburn') {
         $this->projects = $this->project->getPairs();
         if (!$this->projects and $this->methodName != 'create') {
             $this->locate($this->createLink('project', 'create'));
         }
     }
 }
示例#22
0
 public function __construct()
 {
     parent::__construct();
     if (empty($this->config->site->yangcong)) {
         $this->send(array('result' => 'fail', 'message' => $this->lang->yangcong->getQrcodeFaild));
     }
     $config = json_decode($this->config->site->yangcong);
     $this->app->loadClass('yangcongapi', true);
     $this->api = new yangcongapi($config);
 }
 /**
  * The construc method, to do some auto things.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->common->startSession();
     $this->common->sendHeader();
     $this->common->setCompany();
     $this->common->setUser();
     $this->common->loadConfigFromDB();
     $this->app->loadLang('company');
 }
示例#24
0
文件: control.php 项目: XMGmen/zentao
 public function __construct()
 {
     parent::__construct();
     $this->loadModel('story');
     $this->loadModel('project');
     $this->loadModel('user');
     $this->loadModel('bug');
     $this->products = $this->loadModel('product')->getPairs('nocode');
     $this->moduleName = 'pro';
 }
示例#25
0
文件: control.php 项目: XMGmen/zentao
 /**
  * Construct function, Set projects.
  * 
  * @access public
  * @return void
  */
 public function __construct($moduleName = '', $methodName = '')
 {
     parent::__construct($moduleName, $methodName);
     if ($this->methodName != 'computeburn') {
         $this->projects = $this->project->getPairs('nocode');
         if (!$this->projects and $this->methodName != 'create' and $this->app->getViewType() != 'mhtml') {
             $this->locate($this->createLink('project', 'create'));
         }
     }
 }
示例#26
0
文件: control.php 项目: leowh/colla
 /**
  * Construct function, load user, tree, action auto.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->libs = $this->doc->getLibList();
     $this->loadModel('user');
     $this->loadModel('tree');
     $this->loadModel('action');
     //$this->loadModel('product', 'crm');
     //$this->loadModel('project');
     $this->lang->doc->menu = $this->doc->getSubMenus($this->libs);
 }
示例#27
0
 /**
  * Construct function, load model of project and story modules.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->loadModel('product');
     $this->loadModel('project');
     $this->loadModel('story');
     $this->loadModel('task');
     $this->loadModel('bug');
     $this->loadModel('action');
     $this->app->loadClass('pager', $static = true);
     $this->pager = new pager(0, 20, 1);
 }
示例#28
0
 /**
  * The construc method, to do some auto things.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->common->startSession();
     $this->common->sendHeader();
     $this->common->setCompany();
     $this->common->setUser();
     $this->common->loadConfigFromDB();
     if ($this->app->getViewType() == 'mhtml') {
         $this->common->setMobileMenu();
     }
     $this->app->loadLang('company');
 }
示例#29
0
 /**
  * The construct function fix sina and qq menu.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     if (empty($this->config->oauth->sina)) {
         unset($this->lang->user->menu->sina);
     }
     if (empty($this->config->oauth->qq)) {
         unset($this->lang->user->menu->qq);
     }
     if (!$this->loadModel('wechat')->getList()) {
         unset($this->lang->user->menu->wechat);
     }
 }
示例#30
0
文件: control.php 项目: fanscky/HTPMS
 /**
  * __construct 
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->backupPath = $this->app->getTmpRoot() . 'backup/';
     if (!is_dir($this->backupPath)) {
         if (!mkdir($this->backupPath, 0777, true)) {
             $this->view->error = sprintf($this->lang->backup->error->noWritable, dirname($this->backupPath));
         }
     } else {
         if (!is_writable($this->backupPath)) {
             $this->view->error = sprintf($this->lang->backup->error->noWritable, $this->backupPath);
         }
     }
 }