1<?php
2
3/*
4	[UCenter] (C)2001-2099 Comsenz Inc.
5	This is NOT a freeware, use is subject to license terms
6
7	$Id: app.php 1059 2011-03-01 07:25:09Z monkey $
8*/
9
10!defined('IN_UC') && exit('Access Denied');
11
12class appmodel {
13
14	var $db;
15	var $base;
16
17	function __construct(&$base) {
18		$this->appmodel($base);
19	}
20
21	function appmodel(&$base) {
22		$this->base = $base;
23		$this->db = $base->db;
24	}
25
26	function get_apps($col = '*', $where = '') {
27		$arr = $this->db->fetch_all("SELECT $col FROM ".UC_DBTABLEPRE."applications".($where ? ' WHERE '.$where : ''), 'appid');
28		foreach($arr as $k => $v) {
29			isset($v['extra']) && !empty($v['extra']) && $v['extra'] = unserialize($v['extra']);
30			unset($v['authkey']);
31			$arr[$k] = $v;
32		}
33		return $arr;
34	}
35}
36?>