app.php 907 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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. {
  10. var $db;
  11. var $base;
  12. function __construct(&$base)
  13. {
  14. $this->appmodel($base);
  15. }
  16. function appmodel(&$base)
  17. {
  18. $this->base = $base;
  19. $this->db = $base->db;
  20. }
  21. function get_apps($col = '*', $where = '')
  22. {
  23. $arr = $this->db->fetch_all("SELECT $col FROM " . UC_DBTABLEPRE . "applications" . ($where ? ' WHERE ' . $where : ''), 'appid');
  24. foreach ($arr as $k => $v)
  25. {
  26. isset($v['extra']) && !empty($v['extra']) && $v['extra'] = unserialize($v['extra']);
  27. unset($v['authkey']);
  28. $arr[$k] = $v;
  29. }
  30. return $arr;
  31. }
  32. }