• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP oseDB类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getItem

 function getItem()
 {
     $result = array();
     $post = JRequest::get('post');
     $post = oseMscAddon::getPost('licseat_', $post);
     if (!isset($post['contact_send'])) {
         $post['contact_send'] = 0;
     }
     if (!isset($post['internal_contact_send'])) {
         $post['internal_contact_send'] = 0;
     }
     $db = oseDB::instance();
     $msc_id = JRequest::getInt('msc_id', 0);
     $member_id = JRequest::getInt('member_id', 0);
     $mscLicInfo = oseRegistry::call('msc')->getExtInfo($msc_id, 'lic', 'obj');
     $mscLicInfoParams = oseObject::getParams($mscLicInfo);
     $where = array();
     $where[] = "license_user_id = '{$member_id}'";
     if (empty($mscLicInfoParams->id)) {
         $where[] = "license_id = '{$mscLicInfoParams->id}'";
     }
     $where = oseDB::implodeWhere();
     $query = " SELECT * FROM `#__oselic_license_seat`" . $where . " ORDER BY id DESC";
     $db->setQuery($query);
     $item = oseDB::loadItem('obj');
     $result['success'] = empty($item) ? false : true;
     $result['total'] = empty($item) ? 0 : 1;
     $result['result'] = empty($item) ? array() : $item;
     //$result = oseJson::encode($result);
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:31,代码来源:member.licseat.php


示例2: generateDesc

 function generateDesc($order_id)
 {
     $title = null;
     $db = oseDB::instance();
     $query = "SELECT * FROM `#__osemsc_order_item` WHERE `order_id` = '{$order_id}'";
     $db->setQuery($query);
     $obj = $db->loadObject();
     $params = oseJson::decode($obj->params);
     $msc_id = $obj->entry_id;
     $query = "SELECT title FROM `#__osemsc_acl` WHERE `id` = " . (int) $msc_id;
     $db->setQuery($query);
     $msc_name = $db->loadResult();
     $msc_option = $params->msc_option;
     $query = "SELECT params FROM `#__osemsc_ext` WHERE `type` = 'payment' AND `id` = " . (int) $msc_id;
     $db->setQuery($query);
     $result = oseJson::decode($db->loadResult());
     foreach ($result as $key => $value) {
         if ($msc_option == $key) {
             if ($value->recurrence_mode == 'period') {
                 if ($value->eternal) {
                     $title = 'Life Time Membership';
                 } else {
                     $title = $value->recurrence_num . ' ' . ucfirst($value->recurrence_unit) . ' Membership';
                 }
             } else {
                 $start_date = date("l,d F Y", strtotime($value->start_date));
                 $expired_date = date("l,d F Y", strtotime($value->expired_date));
                 $title = $start_date . ' - ' . $expired_date . ' Membership';
             }
         }
     }
     $title = $msc_name . ' : ' . $title;
     return $title;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:34,代码来源:osePaymentOrderclickbank.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: save

	public static function save($params) {
		$result = array();
		$post = JRequest::get('post');
		$member_id = $params['member_id'];
		JRequest::setVar('member_id', $member_id);
		if (empty($member_id)) {
			$result['success'] = false;
			$result['title'] = 'Error';
			$result['content'] = JText::_('Error');
			return $result;
		}
		$db = oseDB::instance();
		$firstname = $db->Quote(oseObject::getValue($post, 'juser_firstname', $post['juser_username']));
		$lastname = $db->Quote(oseObject::getValue($post, 'juser_lastname'));
		$query = " SELECT COUNT(*) FROM `#__osemsc_userinfo` WHERE user_id = ". (int)$member_id;
		$db->setQuery($query);
		$exists = ($db->loadResult() > 0) ? true : false;
		if ($exists) {
			return array('success' => true);
		} else {
			$query = " INSERT INTO `#__osemsc_userinfo` (user_id,firstname,lastname)" 
				   . " VALUES" . " ({$member_id},{$firstname},{$lastname})";
			$db->setQuery($query);
			if (!oseDB::query()) {
				$result = array();
				$result['success'] = false;
				$result['title'] = 'Error';
				$result['content'] = JText::_('Fail Saving OSE User Info.');
				return $result;
			}
			return array('success' => true);
		}
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:33,代码来源:register.mscuser.php


示例5: activate

 public static function activate($params)
 {
     $result = array();
     $result['success'] = true;
     if (empty($params['allow_work'])) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_('Error Renew.History');
         return $result;
     }
     unset($params['allow_work']);
     $db = oseDB::instance();
     $post = JRequest::get('post');
     $msc_id = $params['msc_id'];
     $member_id = $params['member_id'];
     $result = array();
     $result['success'] = true;
     if (empty($msc_id)) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_(" History Error ");
         return $result;
     }
     $history = oseRegistry::call('member')->getInstance('History');
     if (!$history->record($msc_id, $member_id, 'activate')) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_(" Fail Record Member's Footprint! ");
     }
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:31,代码来源:renew.history.php


示例6: cancel

 public static function cancel($params)
 {
     $result = array();
     $result['success'] = true;
     if (empty($params['allow_work'])) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_("Error");
         return $result;
     }
     unset($params['allow_work']);
     $db = oseDB::instance();
     $msc_id = $params['msc_id'];
     $member_id = $params['member_id'];
     $msc = oseRegistry::call('msc');
     $member = oseRegistry::call('member');
     $payment = oseRegistry::call('payment');
     $ext = $msc->getExtInfo($msc_id, 'msc', 'obj');
     $member->instance($member_id);
     $userInfo = $member->getBasicInfo('obj');
     $member = oseRegistry::call('member');
     $email = $member->getInstance('email');
     $emailTempDetail = $email->getDoc($ext->cancel_email, 'obj');
     $variables = $email->getEmailVariablesCancel($member_id, $msc_id);
     $emailParams = $email->buildEmailParams($emailTempDetail->type);
     $emailDetail = $email->transEmail($emailTempDetail, $variables, $emailParams);
     $email->sendEmail($emailDetail, $userInfo->email);
     $emailConfig = oseMscConfig::getConfig('email', 'obj');
     if ($emailConfig->sendWel2Admin) {
         $email->sendToAdminGroup($emailDetail, $emailConfig->admin_group);
     }
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:33,代码来源:join.email.php


示例7: getLangID

 function getLangID($lang)
 {
     $db = oseDB::instance();
     $query = "SELECT id FROM `#__languages` WHERE `code` = " . $db->Quote($lang, true) . " OR  `shortcode` = " . $db->Quote($lang, true);
     $id = $db->loadResult();
     return $id;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:7,代码来源:oseMscLanguage.php


示例8: getloginRedirect

 function getloginRedirect($msc_id)
 {
     $db = oseDB::instance();
     oseDB::lock('#__menu');
     $objs = array();
     $where = array();
     //$where = array_merge($where,oseJSON::generateQueryWhere());
     // Added in V 4.4, menu access levels
     //$where[] = 'm.menutype = '.$db->Quote($menutype);
     $where[] = 'm.published != -2';
     $where[] = 'm.client_id = 0';
     $where = count($where) ? ' WHERE (' . implode(') AND (', $where) . ')' : '';
     $query = 'SELECT m.*,  com.name AS com_name' . ' FROM `#__menu` AS m' . ' LEFT JOIN `#__extensions` AS com ON com.extension_id = m.component_id' . $where . ' ORDER BY m.lft';
     $db->setQuery($query);
     //oseExit($db->getQuery());
     $menus = $db->loadObjectList();
     $i = 0;
     if (!empty($menus)) {
         foreach ($menus as $menu) {
             $objs[$i]->menuid = $menu->id;
             $objs[$i]->displayText = str_repeat('<span class="gtr">|&mdash;</span>', $menu->level) . '[ID-' . $menu->id . ']-' . $menu->title;
             $i++;
         }
     }
     oseDB::unlock();
     return $objs;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:27,代码来源:membership_j16.php


示例9: 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


示例10: save

	public static function save($params) {
		$result = array();
		$result['success'] = true;
		if (empty($params['allow_work'])) {
			$result['success'] = false;
			$result['title'] = 'Error';
			$result['content'] = JText::_('Error Join.Order.1');
			return $result;
		}
		unset($params['allow_work']);
		if ($params['join_from'] != 'payment') {
			$result['success'] = true;
			$result['title'] = JText::_('Done');
			$result['content'] = JText::_('Done Join.Order');
			return $result;
		}
		$db = oseDB::instance();
		$msc_id = $params['msc_id'];
		$member_id = $params['member_id'];
		$order_id = $params['order_id'];
		$order_item_id = $params['order_item_id'];
		$where = array();
		$where[] = "order_id = {$order_id}";
		$payment = oseRegistry::call('payment');
		$curOrder = $payment->getOrder($where, 'obj');
		$member = oseRegistry::call('member');
		$member->instance($member_id);
		$memParams = $member->getMemberInfo($msc_id, 'obj')->memParams;
		if (empty($memParams)) {
			$memParams = new stdClass();
		} else {
			$memParams = oseJSON::decode($memParams);
		}
		$memParams->order_id = $order_id;
		$memParams->payment_mode = $curOrder->payment_mode;
		$memParams->order_item_id = $order_item_id;
		// Order problem for system add
		$memParams = oseJSON::encode($memParams);
		$query = " UPDATE `#__osemsc_member`" . " SET `params` = " . $db->Quote($memParams) . " WHERE msc_id = {$msc_id} AND member_id = {$member_id}";
		$memConfig = oseMscConfig::getConfig('register', 'obj');
		$db->setQuery($query);
		if (!oseDB::query()) {
			$result['success'] = false;
			$result['title'] = 'Error';
			$result['content'] = JText::_('Error Join.Order.2');
		}
		// User activation function;
		$params = JComponentHelper::getParams('com_users');
		$useractivation = $params->get('useractivation');
		if (oseObject::getValue($memConfig, 'disabled_non_paid', false) == true) {
			if ($useractivation == 0) {
				$query = " UPDATE `#__users` SET `block` = 0 where `id` = " . $member_id;
				$db->setQuery($query);
				$db->query();
			}
		}
		return $result;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:58,代码来源:join.order.php


示例11: renew

 public static function renew($params)
 {
     $result = array();
     $result['success'] = true;
     if (empty($params['allow_work'])) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_("Error");
         return $result;
     }
     unset($params['allow_work']);
     //oseExit($params);
     $db = oseDB::instance();
     $post = JRequest::get('post');
     $msc_id = $params['msc_id'];
     $member_id = $params['member_id'];
     if (empty($msc_id)) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_("Renew Msc: No Msc ID");
         return $result;
     }
     // get the plan id of msc
     $query = "SELECT * FROM `#__osemsc_ext` WHERE `id` = '{$msc_id}' AND `type` = 'osecredit'";
     $db->setQuery($query);
     $data = $db->loadObject();
     $data = oseJson::decode($data->params);
     if (empty($data->osecredit_id) || empty($data->enable)) {
         $result['success'] = true;
         $result['title'] = JText::_('Done');
         $result['content'] = JText::_("Done");
         return $result;
     }
     $query = "SELECT credit_amount FROM `#__ose_credit_plan` WHERE `id` = '{$data->osecredit_id}'";
     $db->setQuery($query);
     $amount = $db->loadResult();
     $query = "SELECT * FROM `#__ose_credit_member` WHERE `member_id` = '{$member_id}'";
     $db->setQuery($query);
     $obj = $db->loadObject();
     if (empty($obj)) {
         $credit_params = oseJson::encode(array());
         $query = " INSERT INTO `#__ose_credit_member` (`member_id`, `credit_amount`, `params`)" . " VALUES" . " ('{$member_id}', '{$amount}', '{$credit_params}')";
     } else {
         $amount = $amount + $obj->credit_amount;
         $query = "UPDATE `#__ose_credit_member` SET `credit_amount` = '{$amount}' WHERE `id` = '{$obj->id}'";
     }
     $db->setQuery($query);
     if (!$db->query()) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_('Error');
         return $result;
     }
     $result['success'] = true;
     $result['title'] = JText::_('Done');
     $result['content'] = JText::_("Done");
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:58,代码来源:renew.osecredit.php


示例12: activate

 public static function activate($params)
 {
     $result = array();
     $result['success'] = true;
     if (empty($params['allow_work'])) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_("Error");
         return $result;
     }
     unset($params['allow_work']);
     //oseExit($params);
     $db = oseDB::instance();
     $post = JRequest::get('post');
     $msc_id = $params['msc_id'];
     $member_id = $params['member_id'];
     if (empty($msc_id)) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_("Renew Msc: No Msc ID");
         return $result;
     }
     // get the docman groups_id  of msc
     $query = "SELECT * FROM `#__osemsc_ext` WHERE `id` = '{$msc_id}' AND `type` = 'docman'";
     $db->setQuery($query);
     $data = $db->loadObject();
     $data = oseJson::decode($data->params);
     if (empty($data->groups_id) || $data->groups_id == '-1') {
         $result['success'] = true;
         $result['title'] = JText::_('Done');
         $result['content'] = JText::_("Done");
         return $result;
     }
     $docman_group_id = $data->groups_id;
     $query = "SELECT * FROM `#__docman_groups` WHERE `groups_id` = " . (int) $docman_group_id;
     $db->setQuery($query);
     $obj = $db->loadObject();
     if (!empty($obj)) {
         $newmembers[] = $member_id;
         if (!empty($obj->groups_members)) {
             $oldmembers = explode(",", $obj->groups_members);
             if (count($oldmembers) > 0) {
                 $newmembers = array_merge($oldmembers, $newmembers);
             }
         }
         $newmembers = array_unique($newmembers);
         $newmembers = implode(",", $newmembers);
         $query = "UPDATE `#__docman_groups` SET `groups_members` = '" . $newmembers . "' WHERE `groups_id` = " . (int) $docman_group_id;
         $db->setQuery($query);
         if (!$db->query()) {
             $result['success'] = false;
             $result['title'] = 'Error';
             $result['content'] = JText::_("Error");
             return $result;
         }
     }
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:58,代码来源:renew.docman.php


示例13: getUserInfo

 public static function getUserInfo($member_id)
 {
     //@todo : change to load msc addon if no expired date if order mistake
     $db = oseDB::instance();
     $query = "SELECT * FROM `#__users` " . " WHERE `id` = '{$member_id}'";
     $db->setQuery($query);
     $obj = $db->loadObject();
     return $obj;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:9,代码来源:renew.acymailing.php


示例14: getItems

 function getItems()
 {
     // Get a storage key.
     $store = $this->getStoreId('getItems');
     // Try to load the data from internal storage.
     if (!empty($this->cache[$store])) {
         return $this->cache[$store];
     }
     $search = $this->getState('filter.search');
     $searchid = $this->getState('filter.searchid');
     $searchpe = $this->getState('filter.searchpe');
     // Load the list items.
     $items = parent::getItems();
     // If emtpy or an error, just return.
     if (empty($items)) {
         return array();
     }
     //oseExit($items);
     $db = oseDB::instance();
     // Inject the values back into the array.
     foreach ($items as $k => $item) {
         $order_id = null;
         if ($item->msc_id > 0) {
             $params = oseJson::decode($item->params);
             $order_id = oseGetValue($params, 'order_id', 0);
             $query = " SELECT `title` FROM `#__osemsc_acl`" . " WHERE `id` = '{$item->msc_id}'";
             $db->setQuery($query);
             $item->membership = $db->loadResult();
             $query = " SELECT *" . " FROM `#__osemsc_order_fix`" . " WHERE `member_id` = '{$item->id}'";
             $db->setQuery($query);
             $ofItem = oseDB::loadItem('obj');
             $item->paypal_email = oseObject::getValue($ofItem, 'email', $item->email);
         } else {
             $item->expired_date = null;
             $item->status = '';
         }
         if (empty($search) && empty($searchid) && empty($searchpe)) {
             //return array();
         } else {
             //$item->order_number = null;
             if (!empty($order_id)) {
                 $query = " SELECT `order_id`,`order_number`,`payment_serial_number`,`order_status`" . " FROM `#__osemsc_order`" . " WHERE `order_id` = '{$order_id}'";
                 $db->setQuery($query);
                 $oItem = oseDB::loadItem('obj');
                 $item->order_number = $oItem->order_number;
                 $item->order_id = $oItem->order_id;
                 $item->payment_serial_number = $oItem->payment_serial_number;
                 $item->order_status = $oItem->order_status;
             } else {
             }
         }
         $items[$k] = $item;
     }
     // Add the items to the internal cache.
     $this->cache[$store] = $items;
     return $this->cache[$store];
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:57,代码来源:paypal.php


示例15: PayFastOneOffPostForm

 function PayFastOneOffPostForm($orderInfo, $params = array())
 {
     $pConfig = oseMscConfig::getConfig('payment', 'obj');
     $merchantId = $pConfig->payfast_merchant_id;
     $merchantKey = $pConfig->payfast_merchant_key;
     $html = array();
     $test_mode = $pConfig->payfast_testmode;
     if (!$test_mode) {
         if (empty($merchantId) || empty($merchantKey)) {
             $html['form'] = "";
             $html['url'] = "";
             return $html;
         }
     }
     if ($test_mode == true) {
         $merchantId = '10000100';
         $merchantKey = '46f0cd694581a';
         $url = "https://sandbox.payfast.co.za/eng/process";
     } else {
         $url = "https://www.payfast.co.za/eng/process";
     }
     $db = oseDB::instance();
     $member = oseRegistry::call('member');
     $member->instance($orderInfo->user_id);
     $payment = oseRegistry::call('payment');
     $paymentOrder = $payment->getInstance('Order');
     $billinginfo = $paymentOrder->getBillingInfo($orderInfo->user_id);
     $amount = $orderInfo->payment_price;
     $currency = $orderInfo->payment_currency;
     $order_id = $orderInfo->order_id;
     $order_number = $orderInfo->order_number;
     $user =& JFactory::getUser($orderInfo->user_id);
     $orderInfoParams = oseJson::decode($orderInfo->params);
     $cancelUrl = JURI::base() . "index.php";
     $notifyUrl = JURI::base() . "components/com_osemsc/ipn/payfast_notify.php";
     $returnUrl = urldecode(JROUTE::_(JURI::base() . "index.php?option=com_osemsc&view=thankyou&order_id=" . $orderInfo->order_id));
     $returnUrl = $returnUrl ? $returnUrl : JURI::base() . "index.php?option=com_osemsc&view=member&result=success&amount={$amount}&ordernumber={$order_number}";
     // Create description
     $description = '';
     $vendor_image_url = "";
     $app =& JFactory::getApplication();
     $currentSession = JSession::getInstance('none', array());
     $stores = $currentSession->getStores();
     $html['form'] = '<form action="' . $url . '" method="post">';
     // Construct variables for post
     $post_variables = array('merchant_id' => $merchantId, 'merchant_key' => $merchantKey, 'return_url' => $returnUrl, 'cancel_url' => $cancelUrl, 'notify_url' => $notifyUrl, 'name_first' => substr($billinginfo->firstname, 0, 100), 'name_last' => substr($billinginfo->lastname, 0, 100), 'email_address' => substr($billinginfo->email, 0, 255), 'item_name' => JText::_('Order ID: ') . $order_id, 'item_description' => $description, 'amount' => number_format($amount, 2, '.', ''), 'm_payment_id' => $order_id, 'currency_code' => $currency, 'custom_str1' => $order_number, 'user_agent' => 'Open Source Membership Control V5');
     $html['form'] .= '<input type="image" id="payfast_image" name="cartImage" src="' . "components/com_osemsc/assets/images/checkout.png" . '" alt="' . JText::_('Click to pay with PayFast') . '" />';
     // Process payment variables;
     $html['url'] = $url . "?";
     foreach ($post_variables as $name => $value) {
         $html['form'] .= '<input type="hidden" name="' . $name . '" value="' . htmlspecialchars($value) . '" />';
         $html['url'] .= $name . "=" . urlencode($value) . "&";
     }
     $html['form'] .= '</form>';
     return $html;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:56,代码来源:osePaymentOrderpayfast.php


示例16: cancel

 public static function cancel($params)
 {
     $result = array();
     $result['success'] = true;
     if (empty($params['allow_work'])) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_("Error");
         return $result;
     }
     unset($params['allow_work']);
     $member_id = $params['member_id'];
     $user = new JUser($member_id);
     $iAmSuperAdmin = $user->authorise('core.admin');
     if ($iAmSuperAdmin) {
         $result['success'] = true;
         $result['title'] = JText::_('Done');
         $result['content'] = JText::_("Done");
         return $result;
     }
     $db = oseDB::instance();
     $query = "SELECT * FROM `#__extensions` WHERE `name` = 'com_users' AND `type` = 'component'";
     $db->setQuery($query);
     $data = $db->loadObject();
     $data = oseJson::decode($data->params);
     $group['groups'] = (array) $data->new_usertype;
     $member = oseRegistry::call('member');
     $member->instance($member_id);
     $Mscs = $member->getAllOwnedMsc(false, 1, 'obj');
     foreach ($Mscs as $Msc) {
         if ($Msc->msc_id == $params['msc_id']) {
             continue;
         }
         $query = "SELECT * FROM `#__osemsc_ext` WHERE `id` = '{$Msc->msc_id}' AND `type` = 'jgroup'";
         $db->setQuery($query);
         $ext = $db->loadObject();
         if (!empty($ext)) {
             $ext = oseJson::decode($ext->params);
             $group['groups'] = array_merge($group['groups'], (array) $ext->jgroup_id);
         }
     }
     $group['groups'] = array_unique($group['groups']);
     //$user = JUser::getInstance($member_id);
     $user->bind($group);
     //$user->groups = array_flip($data->jgroup_id);
     if (!$user->save()) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_("Error");
         return $result;
     }
     $result['success'] = true;
     $result['title'] = JText::_('Done');
     $result['content'] = JText::_("Done");
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:56,代码来源:join.jgroup.php


示例17: getConfigItem

 static function getConfigItem($configItemName, $config_type, $type = 'array')
 {
     $db = oseDB::instance();
     $configItemName = $db->Quote($configItemName);
     $config_type = $db->Quote($config_type);
     $query = " SELECT * FROM `#__osemsc_configuration`" . " WHERE `key` = {$configItemName} AND `type` = {$config_type}";
     $db->setQuery($query);
     $item = oseDB::loadItem($type);
     return $item;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:10,代码来源:oseMscConfig.php


示例18: getTree

 function getTree()
 {
     $db = oseDB::instance();
     $msc = oseRegistry::call('msc');
     $list = $msc->retrieveTree();
     foreach ($list as $key => $item) {
         $list[$key]['displayText'] = '(' . $item['id'] . ') ' . $item['treename'];
     }
     return $list;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:10,代码来源:membership.php


示例19: orderView

 function orderView()
 {
     $db = oseDB::instance();
     $order_id = JRequest::getInt('order_id', 0);
     $where = array();
     $where[] = " `order_id` = {$order_id}";
     $orderInfo = oseRegistry::call('payment')->getOrder($where, 'obj');
     $receipt = oseRegistry::call('member')->getReceipt($orderInfo);
     return $receipt;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:10,代码来源:member.order.php


示例20: companySave

 public static function companySave($params)
 {
     if (empty($params['allow_work'])) {
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_("Error");
         return $result;
     }
     unset($params['allow_work']);
     $db = oseDB::instance();
     $post = JRequest::get('post');
     $member_id = $params['member_id'];
     if (empty($member_id)) {
         return false;
     }
     $query = " SELECT username FROM `#__users` WHERE `id` = '{$member_id}'";
     $db->setQuery($query);
     $username = $db->loadResult();
     $company = array();
     foreach ($post as $key => $value) {
         if (strstr($key, 'company_')) {
             $billKey = preg_replace('/company_/', '', $key, 1);
             $company[$billKey] = $value;
         }
     }
     //get the country name
     $query = " SELECT country_name FROM `#__osemsc_country` WHERE `country_2_code` = '{$company['country']}'";
     $db->setQuery($query);
     $country_name = $db->loadResult();
     $company['country'] = empty($country_name) ? $company['country'] : $country_name;
     $phpbb_class = dirname(__FILE__) . DS . 'phpbb.php';
     require_once $phpbb_class;
     $phpbb = new phpbbdb();
     $check = $phpbb->connect_phpbb();
     if ($check == false) {
         $result = array();
         $result['success'] = false;
         $result['title'] = 'Error';
         $result['content'] = JText::_('Fail Connecting PHPBB.');
         return $result;
     }
     /************************************************************************************/
     $phpbb_query = "SELECT user_id FROM `#__users` WHERE `username` = '{$username}' ";
     $phpbb->setQuery($phpbb_query);
     //$db->setQuery($phpbb->query);
     $user_id = $phpbb->loadResult();
     $query = " UPDATE `#__profile_fields_data` " . " SET `pf_company` = '{$company['company']}', `pf_address1` = '{$company['addr1']}', `pf_address2` = '{$company['addr2']}', `pf_city` = '{$company['city']}', `pf_state` = '{$company['state']}', `pf_country` = '{$company['country']}', `pf_zip` = '{$company['postcode']}', `pf_phone` = '{$company['telephone']}' " . " WHERE `user_id` = '{$user_id}'";
     $phpbb->setQuery($query);
     $phpbb->query();
     $result = array();
     $result['success'] = true;
     $result['title'] = 'Done';
     $result['content'] = JText::_('Saved Company Info.');
     return $result;
 }
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:55,代码来源:usersync.phpbb.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP oseJson类代码示例发布时间:2022-05-23
下一篇:
PHP osC_Product类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap