app.php 743 B

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