当前位置: 首页>>代码示例>>PHP>>正文


PHP oseDB::loadList方法代码示例

本文整理汇总了PHP中oseDB::loadList方法的典型用法代码示例。如果您正苦于以下问题:PHP oseDB::loadList方法的具体用法?PHP oseDB::loadList怎么用?PHP oseDB::loadList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oseDB的用法示例。


在下文中一共展示了oseDB::loadList方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getItem

	public static function getItem($params = array())
	{
		$user = JFactory::getUser();
    	$member_id = $user->id;
    	
    	$db = oseDB::instance();
    	
    	$query = " SELECT company.* FROM `#__oselic_cs_company` AS company "
				." INNER JOIN  `#__oselic_cs_keys_view` AS lic_view ON lic_view.company_id = company.company_id"
    			." WHERE lic_view.user_id = {$member_id}";
    			;
		$db->setQuery($query);
		//oseExit($db->_sql);
		$info = oseDB::loadList();
		//$member = oseRegistry::call('member');
		
		//$member->instance($member_id);
		//$info = $member->getBillingInfo();
		
		$result['success'] = true;
		if(empty($info))
		{
			$result['total'] = 0;
			$result['result'] = '';
		}
		else
		{
			$result['total'] = 1;
			$result['result'] = $info;
		}
		
		return $result;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:33,代码来源:member.company.php

示例2: getList

 public function getList($type, $backend = false)
 {
     $db = oseDB::instance();
     $where = array();
     if ('member' == substr($type, 0, 6)) {
         $where[] = "a.`type` LIKE 'member_%'";
     } else {
         $where[] = "a.`type` = " . $db->Quote($type);
     }
     $where[] = "b.`enabled` = 1 ";
     $where = oseDB::implodeWhere($where);
     $query = " SELECT a.*,b.enabled,b.custom,b.backend AS custom_backend, b.backend_enabled AS custom_backend_enabled,b.frontend AS custom_frontend, b.frontend_enabled AS custom_frontend_enabled" . " FROM `#__osemsc_addon` AS a" . " INNER JOIN `#__osemsc_addon_applied` AS b ON b.addon_id =a.id" . $where;
     $db->setQuery($query);
     $types = oseDB::loadList('array', 'name');
     foreach ($types as $key => $type) {
         $valid = $this->authorize($type['type'], $type['name'], $backend);
         if (!$valid) {
             unset($types[$key]);
             continue;
         }
         if ($type['custom']) {
             $type['backend'] = $type['custom_backend'];
             $type['frontend'] = $type['custom_frontend'];
             $type['backend_enabled'] = $type['custom_backend_enabled'];
             $type['frontend_enabled'] = $type['custom_frontend_enabled'];
         }
         if ($type['action'] == 1) {
             $type['action'] = "{$type['type']}.{$type['name']}";
         }
         $types[$key] = $type;
     }
     //$types = array_values($types);
     return $types;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:34,代码来源:oseMscAddon.php

示例3: getMSCs

	public static function getMSCs()
	{
		$my = JFactory::getUser();
		$member_id = $my->id;
		$result = array();
		$db= oseDB :: instance();
		$query= " SELECT acl.id, acl.title FROM `#__osemsc_member_history` AS omh" 
			   ." INNER JOIN `#__osemsc_acl` AS acl" 
			   ." ON omh.`msc_id` = acl.`id`" 
			   ." WHERE omh.`member_id` = '{$member_id}'" 
			   ." GROUP BY acl.`id`";
		$db->setQuery($query);
		$items = oseDB :: loadList();
		if(count($items) < 1)
		{
			$result['total'] = 0;
			$result['results'] = '';
		}else
		{
			$result['total'] = count($items);
			$result['results'] = $items;
		}	
		$result = oseJson :: encode($result);
		oseExit($result);
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:25,代码来源:member.join_history.php

示例4: getMap

 function getMap()
 {
     // get License
     $db = oseDB::instance();
     // active
     $where = array();
     $where[] = "`member_id` = '{$this->user_id}'";
     $where[] = "`status` = 1";
     $where = oseDB::implodeWhere($where);
     $query = " SELECT * FROM `{$this->_table}`" . $where . " ORDER BY `id` ASC";
     $db->setQuery($query);
     $items = oseDB::loadList('obj', 'msc_id');
     $this->set('active_membership', $items);
     //expired
     $where = array();
     $where[] = "`member_id` = '{$this->user_id}'";
     $where[] = "`status` = 0";
     $where = oseDB::implodeWhere($where);
     $query = " SELECT * FROM `{$this->_table}`" . $where . " ORDER BY `id` ASC";
     $db->setQuery($query);
     $items = oseDB::loadList('obj', 'msc_id');
     $this->set('expired_membership', $items);
     //suspend
     $where = array();
     $where[] = "`member_id` = '{$this->user_id}'";
     $where[] = "`status` = 3";
     $where = oseDB::implodeWhere($where);
     $query = " SELECT * FROM `{$this->_table}`" . $where . " ORDER BY `id` ASC";
     $db->setQuery($query);
     $items = oseDB::loadList('obj', 'msc_id');
     $this->set('suspend_membership', $items);
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:32,代码来源:oseMemMscV5.php

示例5: getList

 function getList()
 {
     $db = oseDB::instance();
     $query = 'SELECT * FROM `#__groups` AS a ORDER by a.id ASC';
     $db->setQuery($query);
     $results = oseDB::loadList();
     return $results;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:8,代码来源:levels.php

示例6: getUsers

 function getUsers($where = null, $start = 0, $limit = 20, $type = 'array')
 {
     $db = oseDB::instance();
     $query = " SELECT u.username,u.name,u.email,u.id FROM `#__users` AS u" . $where;
     $db->setQuery($query, $start, $limit);
     $items = oseDB::loadList($type);
     //oseExit($db->_sql);
     return $items;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:9,代码来源:oseMemGroup.php

示例7: getOwnMsc

	function getOwnMsc() {
		$member = oseRegistry::call('member');
		$user = JFactory::getUser();
		$member->instance($user->id);
		$db = oseDB::instance();
		$query = " SELECT acl.*,mem.*, (SELECT DATEDIFF(mem.expired_date,NOW())) AS days_left FROM `#__osemsc_member` AS mem "
				. " INNER JOIN `#__osemsc_acl` AS acl ON acl.id = mem.msc_id" . " WHERE member_id = {$user->id}";
		$db->setQuery($query);
		return oseDB::loadList();
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:10,代码来源:member.php

示例8: load

 public static function load($app = 'msc', $config_type = null, $type = 'array')
 {
     static $sApp, $objs;
     if ($sApp != $app) {
         $db = oseDB::instance();
         $where = array();
         if (!empty($config_type)) {
             if (is_array($config_type)) {
                 $values = array();
                 foreach ($config_type as $configType) {
                     $values[] = $db->Quote($configType);
                 }
             } else {
             }
         }
         $where[] = '`app`=' . $db->Quote($app);
         $where = oseDB::implodeWhere($where);
         $query = " SELECT * FROM `#__ose_app_config` " . $where;
         $db->setQuery($query);
         $objs = oseDB::loadList('obj');
     }
     if ($type == 'array') {
         $config = array();
     } else {
         $config = new stdClass();
     }
     if (empty($objs)) {
         return false;
     }
     foreach ($objs as $obj) {
         if (is_array($config_type)) {
             if (!in_array($obj->type, $config_type)) {
                 continue;
             }
         } else {
             if ($obj->type != $config_type && !empty($config_type)) {
                 continue;
             }
         }
         if (is_float($obj->value)) {
             $config = oseSetValue($config, $obj->key, (double) $obj->value);
         } elseif (is_numeric($obj->value)) {
             $config = oseSetValue($config, $obj->key, (int) $obj->value);
         } else {
             $config = oseSetValue($config, $obj->key, $obj->value);
         }
     }
     $config = oseSetValue($config, 'id', 1);
     $sApp = $app;
     return $config;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:51,代码来源:oseConfig.php

示例9: getOrders

 public function getOrders($type, $start, $limit)
 {
     $db = oseDB::instance();
     $where = array();
     $search_order = JRequest::getString('search_order', null);
     $search_order = JString::strtolower($search_order);
     $search_user = JRequest::getString('search_user', null);
     $search_user = JString::strtolower($search_user);
     $filterStatus = JRequest::getString('filter_status', null);
     if (!empty($search_order)) {
         $searchQuery = $db->Quote('%' . $search_order . '%');
         $where[] = "o.payment_serial_number LIKE {$searchQuery} OR o.order_id =" . (int) $search_order . " OR o.order_number LIKE {$searchQuery}";
     }
     if (!empty($search_user)) {
         $searchQuery = $db->Quote('%' . $search_user . '%');
         $where[] = "u.username LIKE {$searchQuery} OR u.name LIKE {$searchQuery} OR u.email LIKE {$searchQuery} OR u.id=" . (int) $search_user;
     }
     /*if (isset( $search ) && $search!= '')
     		{
     			$searchEscaped = $db->Quote('%'.$search.'%');
     			$where[] = " u.username LIKE {$searchEscaped} OR u.name LIKE {$searchEscaped}";
     		}*/
     if (!empty($filterStatus)) {
         $where[] = "o.order_status = " . $db->Quote($filterStatus);
     }
     $where[] = "o.entry_type IN ('msc','msc_list')";
     $where[] = "o.payment_from != 'system_admin'";
     $where = oseDB::implodeWhere($where);
     $query = " SELECT COUNT(*) " . " FROM `#__osemsc_order` AS o " . " INNER JOIN `#__users` AS u ON u.id = o.user_id" . $where;
     $db->setQuery($query);
     //oseExit($db->getQuery());
     $total = $db->loadResult();
     $query = " SELECT CONCAT('Order:',o.order_id) AS title, u.username,u.name, o.* " . " FROM `#__osemsc_order` AS o " . " INNER JOIN `#__users` AS u ON u.id = o.user_id" . $where . " ORDER BY o.create_date DESC";
     $db->setQuery($query, $start, $limit);
     //oseExit($db->getQuery());
     $items = oseDB::loadList();
     $return = array();
     $i = 0;
     foreach ($items as $item) {
         $item['mscTitle'] = self::getMSCTitle($item['order_id']);
         $item['name'] = $item['user_id'] . ' - ' . $item['name'];
         $item['title'] = $item['title'] . ' - ' . $item['mscTitle'];
         $return[$i] = $item;
         $i++;
     }
     $result = array();
     $result['total'] = $total;
     //$this->getTotal();
     $result['results'] = $return;
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:51,代码来源:orders.php

示例10: getHistory

 public static function getHistory($msc_id, $member_id, $action = null)
 {
     $db = oseDB::instance();
     $where = array();
     if (!empty($action)) {
         $where[] = " `action` = '{$action}'";
     }
     $where[] = " `msc_id` = '{$msc_id}'";
     $where[] = " `member_id` = '{$member_id}'";
     $where = oseDB::implodeWhere($where);
     $query = " SELECT * FROM `#__osemsc_member_history` " . $where . " ORDER BY date DESC";
     $db->setQuery($query);
     $objs = oseDB::loadList('obj');
     return $objs;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:15,代码来源:oseMemHistroy.php

示例11: array

 function &getList()
 {
     $db = oseDB::instance();
     $search = JRequest::getString('search', null);
     $search = JString::strtolower($search);
     $msc_id = JRequest::getInt('msc_id', 0);
     $start = JRequest::getInt('start', 0);
     $limit = JRequest::getInt('limit', 20);
     $levellimit = JRequest::getInt('levellimit', 10);
     $where = array();
     $where[] = 'rok.`folder` = 1';
     $where[] = 'rok.`published` = 1';
     if ($search) {
         $searchQuery = ' LOWER(rok.`name`) LIKE ' . $db->Quote('%' . $search . '%');
         $where[] = $searchQuery;
     }
     $access = oseMscJaccess::get_msc_aid(25);
     if (!empty($access)) {
         //$where[] = "m.access <= {$access} ";
     }
     //Added in V 4.4, menu access levels
     // Generate where query
     $where = count($where) ? ' WHERE (' . implode(') AND (', $where) . ')' : '';
     $query = ' SELECT rok.*' . ' FROM `#__rokdownloads` AS rok' . $where . ' ORDER BY rok.id';
     $db->setQuery($query);
     //oseExit($db->_sql);
     $rows = oseDB::loadList('obj');
     $total = count($rows);
     // slice out elements based on limits
     $list = array_slice($rows, $start, $limit);
     foreach ($list as $item) {
         $obj = oseRegistry::call('content')->getInstance('msc')->getItem('rokdownload', 'category', $item->id, 'msc', $msc_id, null, 'obj');
         $item->type = empty($obj->content_type) ? 'category' : $obj->content_type;
         $controlled = empty($obj) ? 0 : $obj->status;
         if ($controlled == '1') {
             $item->controlled = JText::_('SHOW_TO_MEMBERS');
         } elseif ($controlled == '-1') {
             $item->controlled = JText::_('HIDE_TO_MEMBERS');
         } else {
             $item->controlled = JText::_('SHOW_TO_ALL');
         }
     }
     $items = array_values($list);
     $result = array();
     $result['total'] = $total;
     $result['results'] = $items;
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:48,代码来源:content.rokdownload.php

示例12: getList

 public static function getList($params = array())
 {
     $db = oseDB::instance();
     $query = "SELECT * FROM `#__acymailing_list` WHERE `type`= 'list'";
     $db->setQuery($query);
     $planArray = oseDB::loadList();
     $result = array();
     if (count($planArray) < 1) {
         $result['total'] = 0;
         $result['results'] = '';
     } else {
         $result['total'] = count($planArray);
         $result['results'] = $planArray;
     }
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:16,代码来源:panel.acymailing2.php

示例13: getGroups

 public static function getGroups($params = array())
 {
     $db = oseDB::instance();
     $query = " SELECT id,name FROM `#__k2_user_groups` ORDER BY `name` ASC ";
     $db->setQuery($query);
     $items = oseDB::loadList();
     $result = array();
     if (count($items) < 1) {
         $result['total'] = 0;
         $result['results'] = '';
     } else {
         $result['total'] = count($items);
         $result['results'] = $items;
     }
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:16,代码来源:panel.k2group.php

示例14: getProfileFields

 public static function getProfileFields($params = array())
 {
     $db = oseDB::instance();
     $query = " SELECT id,name FROM `#__osemsc_fields` WHERE `published` = 1 ORDER BY `ordering` ASC ";
     $db->setQuery($query);
     $items = oseDB::loadList();
     $result = array();
     if (count($items) < 1) {
         $result['total'] = 0;
         $result['results'] = '';
     } else {
         $result['total'] = count($items);
         $result['results'] = $items;
     }
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:16,代码来源:panel.profilecontrol.php

示例15: getPlans

 public static function getPlans($params = array())
 {
     $db = oseDB::instance();
     $query = " SELECT id,title FROM `#__ose_credit_plan` ORDER BY `title` ASC ";
     $db->setQuery($query);
     $items = oseDB::loadList();
     $result = array();
     if (count($items) < 1) {
         $result['total'] = 0;
         $result['results'] = '';
     } else {
         $result['total'] = count($items);
         $result['results'] = $items;
     }
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:16,代码来源:panel.osecredit.php


注:本文中的oseDB::loadList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。