diff --git a/trunk/module/setting/model.php b/trunk/module/setting/model.php new file mode 100644 index 0000000000..4bebd8853e --- /dev/null +++ b/trunk/module/setting/model.php @@ -0,0 +1,46 @@ +. + * + * @copyright Copyright: 2009 Chunsheng Wang + * @author Chunsheng Wang + * @package setting + * @version $Id$ + * @link http://www.zentao.cn + */ +?> +getItem('system', 'global', 'version'); + if($version) return $version; + return '0.3 beta'; + } + + /* 获得某一个配置项的值。*/ + public function getItem($owner, $section, $key) + { + return $this->dao->select('`value`')->from(TABLE_CONFIG) + ->where('company')->eq($this->app->company->id) + ->andWhere('owner')->eq($owner) + ->andWhere('section')->eq($section) + ->andWhere('`key`')->eq($key) + ->fetch('value'); + } +}