Example #1
0
 protected function getConfig()
 {
     $db = new ConfigModel();
     $configList = $db->findAll();
     $config = $this->toSingle($configList);
     $this->c = $config;
     $this->assign('c', $config);
 }
Example #2
0
 protected function getConfig($condition)
 {
     $db = new ConfigModel();
     if ($condition == '') {
         $configList = $db->where("r=1")->select();
     } elseif ($condition == 'all') {
         $configList = $db->findAll();
     } else {
         $configList = $db->where("k='{$condition}'")->select();
     }
     foreach ($configList as $item) {
         $config[$item['k']] = $item['v'];
     }
     return $config;
 }
Example #3
0
 protected function getConfig()
 {
     $db = new ConfigModel();
     $configList = $db->findAll();
     //dump($configList);exit;
     $config = $this->toSingle($configList);
     $this->assign('c', $config);
     return $config;
 }