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


PHP JFactory::getuser方法代码示例

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


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

示例1: save

 function save()
 {
     $jinput = JFactory::getApplication()->input;
     $id = $jinput->get('cid');
     $model = $this->getModel('registration');
     $session = JFactory::getSession();
     //get data from request
     $post = $jinput->get('post');
     $socialadsbackurl = $session->get('socialadsbackurl');
     // let the model save it
     $result = $model->store($post);
     if ($result) {
         $message = JText::_('REGIS_USER_CREATE_MSG');
         $itemid = $jinput->get('Itemid');
         $user = JFactory::getuser();
         $cart = $session->get('cart_temp');
         $session->set('cart' . $user->id, $cart);
         $session->clear('cart_temp');
         $cart1 = $session->get('cart' . $user->id);
         $this->setRedirect($socialadsbackurl, $message);
     } else {
         $message = $jinput->get('message', '', 'STRING');
         $itemid = $jinput->get('Itemid');
         $this->setRedirect('index.php?option=com_quick2cart&view=registration&Itemid=' . $itemid, $message);
     }
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:26,代码来源:registration.php

示例2: _buildQuery

 function _buildQuery()
 {
     $db = JFactory::getDBO();
     global $mainframe, $option;
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $option = $jinput->get('option');
     $layout = $jinput->get('layout', 'salesreport');
     //Get the WHERE and ORDER BY clauses for the query
     $where = '';
     $me = JFactory::getuser();
     $user_id = $me->id;
     $where = $this->_buildContentWhere();
     //if($layout=='default')//payouts report //when called from front end
     //{
     $query = "SELECT oi.`item_id`, SUM(oi.`product_quantity`) AS 'saleqty', i.`store_id`, i.`name` as item_name, i.`stock`, i.`mdate`, i.`state`\n\t\t\t FROM `#__kart_order_item` AS oi\n\t\t\t JOIN `#__kart_orders` AS o ON oi.`order_id` = o.`id`\n\t\t\t JOIN `#__kart_items` AS i  ON oi.`item_id` = i.`item_id`\n\t\t\t" . $where . "\n\t\t\tGROUP BY `item_id` ";
     $filter_order = $mainframe->getUserStateFromRequest($option . $this->view . '.filter_order', 'filter_order', 'saleqty', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . $this->view . 'salesreport.filter_order_Dir', 'filter_order_Dir', 'desc', 'word');
     $orderByArray = array();
     $orderByArray['name'] = "item_name";
     if ($filter_order) {
         if (!empty($orderByArray[$filter_order])) {
             $query .= " ORDER BY " . $orderByArray['name'] . " {$filter_order_Dir}";
         } else {
             $query .= " ORDER BY {$filter_order} {$filter_order_Dir}";
         }
     }
     //}
     return $query;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:30,代码来源:salesreport.php

示例3: getList

 /**
  * Get a list of articles.
  *
  * @param	JObject		The module parameters.
  *
  * @return	mixed		An array of articles, or false on error.
  */
 public static function getList($params)
 {
     // Initialise variables
     $user = JFactory::getuser();
     $db = JFactory::getDbo();
     $query = $db->getQuery(true);
     $query->select("o.orderID AS id, o.productNaam, o.orderNetto, o.created, o.checked_out, o.checked_out_time");
     // Join over the user
     $query->select("CONCAT(ou.name,' (',ou.username,')') AS userNaam");
     $query->from('#__bps_order AS o');
     $query->join('INNER', '#__users AS ou ON ou.id=o.userID');
     //orderstatus
     $query->select('os.statusName AS orderStatusName');
     $query->join('LEFT', '#__bps_orderstatus AS os ON os.statusCode = o.orderStatus');
     // Join over the users for the checked out user.
     $query->select('up.name AS editor');
     $query->join('LEFT', '#__users AS up ON up.id=o.checked_out');
     $query->where('o.bestelID > 0');
     $query->order('o.created DESC');
     $db->setQuery($query, 0, $params->get('count', 5));
     $items = $db->loadObjectList();
     if ($error = $db->getError()) {
         JError::raiseError(500, $error);
         return false;
     }
     // Set the links
     foreach ($items as &$item) {
         if ($user->authorise('core.edit', 'com_bixprintshop.order.' . $item->id)) {
             $item->link = JRoute::_('index.php?option=com_bixprintshop&task=order.edit&orderID=' . $item->id);
         } else {
             $item->link = '';
         }
     }
     return $items;
 }
开发者ID:nagyistoce,项目名称:mod_bps_orders,代码行数:42,代码来源:helper.php

示例4: getDisplayTab

 function getDisplayTab($tab, $user, $ui)
 {
     // $$$ hugh - added privacy option, so you can restrict who sees the tab, requested on forums:
     // http://fabrikar.com/forums/showthread.php?p=128127#post128127
     // privacy setting:
     // 0 = public
     // 1 = profile owner only
     // 2 = profile owner and admins
     $private = (int) $this->params->get('fabrik_private', '0');
     if ($private > 0) {
         $viewer = JFactory::getuser();
         if ($private === 1) {
             if ($user->get('user_id') != $viewer->get('id')) {
                 return false;
             }
         } else {
             if ($private === 2) {
                 if ($user->get('id') !== $viewer->get('id') && ($viewer->get('gid') != 24 && $viewer->get('gid') != 25)) {
                     return false;
                 }
             }
         }
     }
     $dispatcher = new JDispatcher();
     JPluginHelper::importPlugin('content', 'fabrik', true, $dispatcher);
     $dispatcher->register('content', 'plgContentFabrik');
     $args = array();
     $article = new stdClass();
     $txt = $this->params->get('plugintext');
     // $$$ hugh - set profile user in session so Fabrik user element can get at it
     // TODO - should really make this table/form specific!
     $session =& JFactory::getSession();
     // $$$ hugh - testing using a unique session hash, which we will stuff in the
     // plugin args, and will get added where necessary in Fabrik lists and forms so
     // we can actually track the right form submissions with their coresponding CB
     // profiles.
     $social_hash = md5(serialize(array(JRequest::getURI(), $tab, $user)));
     $session->set('fabrik.plugin.' . $social_hash . '.profile_id', $user->get('id'));
     // do the old style one without the hash for backward compat
     $session->set('fabrik.plugin.profile_id', $user->get('id'));
     $txt = rtrim($txt, '}') . " fabrik_social_profile_hash=" . $social_hash . '}';
     //do some dynamic replacesments with the owner's data
     foreach ($user as $k => $v) {
         if (strstr($txt, "{\$my->{$k}}")) {
             $txt = str_replace("{\$my->{$k}}", $v, $txt);
         }
         // $$$ hugh - might as well stuff the entire CB user object in the session
         $session->set('fabrik.plugin.' . $social_hash . '.' . $k, $v);
     }
     $params = new stdClass();
     $args[] = 0;
     $article->text = $txt;
     $args[] =& $article;
     $args[] =& $params;
     $res = $dispatcher->trigger('onContentPrepare', $args);
     // $$$ peamak http://fabrikar.com/forums/showthread.php?t=10446&page=2
     $dispatcher->register('content', 'plgContentFabrik');
     return $article->text;
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:59,代码来源:fbk.fabrik.php

示例5: logoutUser

 /**
  * Logs out the user
  *
  * @return  void
  */
 public function logoutUser()
 {
     $mainframe = JFactory::getApplication();
     $my = JFactory::getuser();
     $mainframe->logout($my->id);
     $link = JRoute::_("index.php?option=com_matukio&view=eventlist");
     $msg = JText::_("COM_MATUKIO_LOGOUT_SUCCESS");
     $this->setRedirect($link, $msg);
 }
开发者ID:JonatanLiecheski,项目名称:MeditecJoomla,代码行数:14,代码来源:matukio.php

示例6: getList

 /**
  * Get a list of articles.
  *
  * @param	JObject		The module parameters.
  *
  * @return	mixed		An array of articles, or false on error.
  */
 public static function getList($params)
 {
     // Initialise variables
     $user = JFactory::getuser();
     // Get an instance of the generic articles model
     $model = JModelLegacy::getInstance('Articles', 'ContentModel', array('ignore_request' => true));
     // Set List SELECT
     $model->setState('list.select', 'a.id, a.title, a.checked_out, a.checked_out_time, ' . ' a.access, a.created, a.created_by, a.created_by_alias, a.featured, a.state');
     // Set Ordering filter
     switch ($params->get('ordering')) {
         case 'm_dsc':
             $model->setState('list.ordering', 'modified DESC, created');
             $model->setState('list.direction', 'DESC');
             break;
         case 'c_dsc':
         default:
             $model->setState('list.ordering', 'created');
             $model->setState('list.direction', 'DESC');
             break;
     }
     // Set Category Filter
     $categoryId = $params->get('catid');
     if (is_numeric($categoryId)) {
         $model->setState('filter.category_id', $categoryId);
     }
     // Set User Filter.
     $userId = $user->get('id');
     switch ($params->get('user_id')) {
         case 'by_me':
             $model->setState('filter.author_id', $userId);
             break;
         case 'not_me':
             $model->setState('filter.author_id', $userId);
             $model->setState('filter.author_id.include', false);
             break;
     }
     // Set the Start and Limit
     $model->setState('list.start', 0);
     $model->setState('list.limit', $params->get('count', 5));
     $items = $model->getItems();
     if ($error = $model->getError()) {
         JError::raiseError(500, $error);
         return false;
     }
     // Set the links
     foreach ($items as &$item) {
         if ($user->authorise('core.edit', 'com_content.article.' . $item->id)) {
             $item->link = JRoute::_('index.php?option=com_content&task=article.edit&id=' . $item->id);
         } else {
             $item->link = '';
         }
     }
     return $items;
 }
开发者ID:jimyb3,项目名称:mathematicalteachingsite,代码行数:61,代码来源:helper.php

示例7: _buildQuery

 function _buildQuery()
 {
     $db = JFactory::getDBO();
     global $mainframe, $option;
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $option = $jinput->get('option');
     $layout = $jinput->get('layout', 'payouts');
     //Get the WHERE and ORDER BY clauses for the query
     $where = '';
     $me = JFactory::getuser();
     $user_id = $me->id;
     $where = " where user_id=" . $user_id;
     //$this->_buildContentWhere();
     $where .= " AND a.status=1";
     if ($layout == 'mypayouts') {
         $query = "SELECT a.id, a.user_id, a.payee_name, a.transaction_id, a.date, a.email_id, a.amount, a.status, u.username\n\t\t\tFROM #__kart_payouts AS a\n\t\t\tLEFT JOIN `#__users` AS u ON u.id=a.user_id\n\t\t\t" . $where;
         $filter_order = $mainframe->getUserStateFromRequest($option . 'filter_order', 'filter_order', 'id', 'cmd');
         $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'filter_order_Dir', 'filter_order_Dir', 'desc', 'word');
         /*$me=JFactory::getuser();
         		$user_id = $me->id;
         		$query = "SELECT * FROM #__kart_commission WHERE user_id = ".$user_id;*/
         if ($filter_order) {
             $qry1 = "SHOW COLUMNS FROM #__kart_payouts";
             $db->setQuery($qry1);
             $exists1 = $db->loadobjectlist();
             foreach ($exists1 as $key1 => $value1) {
                 $allowed_fields[] = $value1->Field;
             }
             if (in_array($filter_order, $allowed_fields)) {
                 $query .= " ORDER BY {$filter_order} {$filter_order_Dir}";
             }
         }
     }
     if ($layout == 'payouts') {
         $filter_order = $mainframe->getUserStateFromRequest($option . 'filter_order', 'filter_order', 'id', 'int');
         $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'filter_order_Dir', 'filter_order_Dir', 'desc', 'string');
         $query = "SELECT * FROM #__kart_payouts ";
         if ($filter_order) {
             $qry1 = "SHOW COLUMNS FROM #__kart_payouts";
             $db->setQuery($qry1);
             $exists1 = $db->loadobjectlist();
             foreach ($exists1 as $key1 => $value1) {
                 $allowed_fields[] = $value1->Field;
             }
             if (in_array($filter_order, $allowed_fields)) {
                 $query .= " ORDER BY {$filter_order} {$filter_order_Dir}";
             }
         }
     }
     //echo $query."<br/>";
     return $query;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:53,代码来源:reports.php

示例8: getDisplayTab

 function getDisplayTab($tab, $user, $ui)
 {
     // $$$ hugh - added privacy option, so you can restrict who sees the tab, requested on forums:
     // http://fabrikar.com/forums/showthread.php?p=128127#post128127
     // privacy setting:
     // 0 = public
     // 1 = profile owner only
     // 2 = profile owner and admins
     $private = (int) $this->params->get('fabrik_private', '0');
     if ($private > 0) {
         $viewer = JFactory::getuser();
         if ($private === 1) {
             if ($user->get('user_id') != $viewer->get('id')) {
                 return false;
             }
         } else {
             if ($private === 2) {
                 if ($user->get('id') !== $viewer->get('id') && ($viewer->get('gid') != 24 && $viewer->get('gid') != 25)) {
                     return false;
                 }
             }
         }
     }
     $dispatcher = new JDispatcher();
     JPluginHelper::importPlugin('content', 'fabrik', true, $dispatcher);
     $dispatcher->register('content', 'plgContentFabrik');
     $args = array();
     $article = new stdClass();
     $txt = $this->params->get('plugintext');
     //do some dynamic replacesments with the owner's data
     foreach ($user as $k => $v) {
         if (strstr($txt, "{\$my->{$k}}")) {
             $txt = str_replace("{\$my->{$k}}", $v, $txt);
         }
     }
     // $$$ hugh - set profile user in session so Fabrik user element can get at it
     // TODO - should really make this table/form specific!
     $session =& JFactory::getSession();
     $session->set('fabrik.plugin.profile_id', $user->get('id'));
     $params = new stdClass();
     $article->text = $txt;
     $args[] =& $article;
     $args[] =& $params;
     $args[] = 0;
     $res = $dispatcher->trigger('onPrepareContent', $args);
     // $$$ peamak http://fabrikar.com/forums/showthread.php?t=10446&page=2
     $dispatcher->register('content', 'plgContentFabrik');
     // HERE
     return $article->text;
 }
开发者ID:nikshade,项目名称:fabrik21,代码行数:50,代码来源:fbk.fabrik.php

示例9: display

 function display($tmpl = null)
 {
     $mainframe = JFactory::getApplication();
     $my = JFactory::getuser();
     if (empty($my->id)) {
         $return = JRequest::getVar('return', '');
         EasyBlogHelper::showLogin($return);
         return;
     } else {
         $showPermissionMsg = JRequest::getVar('showpermissionmsg', '');
         if ($showPermissionMsg) {
             EasyBlogHelper::setMessageQueue(JText::_('COM_EASYBLOG_YOU_DO_NOT_HAVE_PERMISSION_TO_VIEW'), 'error');
         } else {
             EasyBlogHelper::setMessageQueue(JText::_('COM_EASYBLOG_YOU_ARE_ALREADY_LOGIN'), 'error');
             $mainframe->redirect(EasyBlogRouter::_('index.php?option=com_easyblog&view=latest'));
         }
     }
 }
开发者ID:Tommar,项目名称:vino2,代码行数:18,代码来源:view.html.php

示例10: display

 /**
  * Displays the form
  *
  * @param   string  $tpl  - The tpl
  *
  * @return  mixed|object
  */
 public function display($tpl = null)
 {
     $my = JFactory::getuser();
     $art = JFactory::getApplication()->input->getInt('art', 1);
     $cid = JFactory::getApplication()->input->getInt('cid', 0);
     $model = $this->getModel();
     if (empty($cid)) {
         JError::raiseError('404', "COM_MATUKIO_NO_ID");
     }
     // Only registered users
     if ($my->id == 0) {
         JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
     }
     $event = $model->getEvent($cid);
     $database = JFactory::getDBO();
     $database->setQuery("SELECT * FROM #__matukio_bookings WHERE semid='" . $cid . "' AND userid='" . $my->id . "'");
     $booking = $database->loadObject();
     $this->event = $event;
     $this->booking = $booking;
     parent::display($tpl);
 }
开发者ID:JonatanLiecheski,项目名称:MeditecJoomla,代码行数:28,代码来源:view.html.php

示例11: execute

 public function execute()
 {
     $app = new Sp4kAppsAccountApp(new Registry($this->state->toObject()));
     $this->item = $app->getItem();
     $this->id = $this->item->id;
     $this->created = $this->item->created;
     $accountFilter = ['filters' => ['account_id' => $this->id]];
     if ($this->item->id != null) {
         $this->item->parents = Sp4kAppsParentApp::getInstance(new Registry($accountFilter))->getItems();
         foreach ($this->item->parents as &$parent) {
             $juser = JFactory::getuser($parent->juser_id);
             $parent->name = $juser->name;
             $parent->email = $juser->email;
         }
         $this->item->children = Sp4kAppsChildApp::getInstance(new Registry($accountFilter))->getItems();
         foreach ($this->item->children as $child) {
             $this->item->registrations = $this->item->registrations + Sp4kAppsRegistrationApp::getInstance(new Registry(['filters' => ['child_id' => $child->id]]))->getItems();
         }
         $this->item->subscriptions = Sp4kAppsSubscriptionApp::getInstance(new Registry($accountFilter))->getItems();
         $this->item->orders = Sp4kAppsOrderApp::getInstance(new Registry($accountFilter))->getItems();
     }
 }
开发者ID:RustyIngles,项目名称:sp4k_php,代码行数:22,代码来源:item.php

示例12: unpublishEvent

 /**
  * Unpublishs the event
  *
  * @return object
  */
 public function unpublishEvent()
 {
     $msg = "COM_MATUKIO_EVENT_UNPUBLISH_SUCCESS";
     $database = JFactory::getDBO();
     $my = JFactory::getuser();
     $cid = JFactory::getApplication()->input->getInt('cid', 0);
     if (!JFactory::getUser()->authorise('core.edit', 'com_matukio', $cid)) {
         return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
     }
     $vorlage = JFactory::getApplication()->input->getInt('vorlage', 0);
     $database->setQuery("SELECT * FROM #__matukio WHERE id='{$cid}'");
     $rows = $database->loadObjectList();
     $aktsem =& $rows[0];
     $neudatum = MatukioHelperUtilsDate::getCurrentDate();
     if ($neudatum < $aktsem->begin && $vorlage == 0 && MatukioHelperSettings::_("notify_participants_publish", 1)) {
         foreach ($rows as $row) {
             $events = MatukioHelperUtilsEvents::getEventsRecurringOnEventId($row->semid);
             foreach ($events as $e) {
                 $database->setQuery("SELECT * FROM #__matukio_bookings WHERE semid = " . $database->quote($e->id));
                 $bookings = $database->loadObjectList();
                 for ($i = 0, $n = count($bookings); $i < $n; $i++) {
                     MatukioHelperUtilsEvents::sendBookingConfirmationMail($e, $bookings[$i]->id, 4);
                 }
             }
         }
     }
     $database->setQuery("UPDATE #__matukio SET published=0 WHERE id='" . $cid . "'");
     // TODO Update recurring
     if (!$database->execute()) {
         JError::raiseError(500, $database->getError());
         $msg = "COM_MATUKIO_EVENT_UNPUBLISH_FAILURE_" . $database->getError();
         exit;
     }
     $link = JRoute::_("index.php?com_matukio&view=eventlist&art=2");
     $this->setRedirect($link, $msg);
 }
开发者ID:JonatanLiecheski,项目名称:MeditecJoomla,代码行数:41,代码来源:createevent.php

示例13: rate

 /**
  * Rates an event
  *
  * @throws  Exception if user is not logged in
  * @return  void / redirect
  */
 public function rate()
 {
     // Check if user is logged in
     if (JFactory::getUser()->id == 0) {
         throw new Exception("COM_MATUKIO_NO_ACCESS");
     }
     $msg = JText::_("COM_MATUKIO_RATING_SUCCESSFULL");
     $mainframe = JFactory::getApplication();
     jimport('joomla.mail.helper');
     $my = JFactory::getuser();
     $database = JFactory::getDBO();
     $cid = JFactory::getApplication()->input->getInt('cid', 0);
     $grade = JFactory::getApplication()->input->getInt('grade', 0);
     $text = JFactory::getApplication()->input->get('text', '');
     $text = str_replace(array("\"", "\\'"), "", $text);
     $text = JMailHelper::cleanBody($text);
     $database->setQuery("UPDATE #__matukio_bookings SET grade='" . $grade . "', comment='" . $text . "' WHERE semid='" . $cid . "' AND userid='" . $my->id . "'");
     if (!$database->execute()) {
         JError::raiseError(500, $database->getError());
         exit;
     }
     $database->setQuery("SELECT * FROM #__matukio_bookings WHERE semid='" . $cid . "'");
     $rows = $database->loadObjectList();
     $zaehler = 0;
     $wertung = 0;
     foreach ($rows as $row) {
         if ($row->grade > 0) {
             $wertung = $wertung + $row->grade;
             $zaehler++;
         }
     }
     if ($zaehler > 0) {
         $geswert = round($wertung / $zaehler);
     } else {
         $geswert = 0;
     }
     $database->setQuery("UPDATE #__matukio SET grade='{$geswert}' WHERE id='{$cid}'");
     if (!$database->execute()) {
         JError::raiseError(500, $database->getError());
         $msg = "COM_MATUKIO_RATING_FAILED " . $database->getError();
     }
     if (MatukioHelperSettings::getSettings('sendmail_owner', 1) > 0) {
         $database->setQuery("SELECT * FROM #__matukio_bookings WHERE semid='{$cid}' AND userid='{$my->id}'");
         $buchung = $database->loadObject();
         // Load event (use model function)
         $emodel = JModelLegacy::getInstance('Event', 'MatukioModel');
         $row = $emodel->getItem($cid);
         $publisher = JFactory::getuser($row->publisher);
         $body = "\n<head>\n<style type=\"text/css\">\n<!--\nbody {\nfont-family: Verdana, Tahoma, Arial;\nfont-size:12pt;\n}\n-->\n</style></head><body>";
         $body .= "<p><div style=\"font-size: 10pt\">" . JTEXT::_('COM_MATUKIO_RECEIVED_RATING') . "</div>";
         $body .= "<p><div style=\"font-size: 10pt\">" . JTEXT::_('COM_MATUKIO_RATING') . ":</div>";
         $htxt = str_replace('SEM_POINTS', $grade, JTEXT::_('COM_MATUKIO_SEM_POINTS_6'));
         $body .= "<div style=\"border: 1px solid #A0A0A0; width: 100%; padding: 5px;\">" . $htxt . "</div>";
         $body .= "<p><div style=\"font-size: 10pt\">" . JTEXT::_('COM_MATUKIO_COMMENT') . ":</div>";
         $body .= "<div style=\"border: 1px solid #A0A0A0; width: 100%; padding: 5px;\">" . htmlspecialchars($text) . "</div>";
         $body .= "<p><div style=\"font-size: 10pt\">" . JTEXT::_('COM_MATUKIO_AVARAGE_SCORE') . ":</div>";
         $htxt = str_replace('SEM_POINTS', $geswert, JTEXT::_('COM_MATUKIO_SEM_POINTS_6'));
         $body .= "<div style=\"border: 1px solid #A0A0A0; width: 100%; padding: 5px;\">" . $htxt . "</div>";
         $body .= "<p>" . MatukioHelperUtilsEvents::getEmailBody($row, $buchung, $my);
         $sender = $mainframe->getCfg('fromname');
         $from = $mainframe->getCfg('mailfrom');
         $replyname = $my->name;
         $replyto = $my->email;
         $email = $publisher->email;
         $subject = JTEXT::_('COM_MATUKIO_EVENT');
         if ($row->semnum != "") {
             $subject .= " " . $row->semnum;
         }
         $subject .= ": " . $row->title;
         $subject = JMailHelper::cleanSubject($subject);
         $mailer = JFactory::getMailer();
         $mailer->sendMail($from, $sender, $email, $subject, $body, 1, null, null, null, $replyto, $replyname);
     }
     $link = "index.php?option=com_matukio&tmpl=component&s=" . MatukioHelperUtilsBasic::getRandomChar() . "&view=rateevent&cid=" . $cid;
     $this->setRedirect($link, $msg);
 }
开发者ID:JonatanLiecheski,项目名称:MeditecJoomla,代码行数:82,代码来源:rateevent.php

示例14: getUserTeams

 /**
  * Retrieves a list of teams that are associated with the specific user
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return
  */
 public function getUserTeams($userId = null)
 {
     $user = JFactory::getuser($userId);
     $userId = $user->id;
     $db = EB::db();
     $query = array();
     $query[] = 'SELECT a.* FROM ' . $db->qn('#__easyblog_team') . ' AS a';
     $query[] = 'LEFT JOIN ' . $db->qn('#__easyblog_team_users') . ' AS b';
     $query[] = 'ON a.' . $db->qn('id') . ' = b.' . $db->qn('team_id');
     $query[] = 'AND b.' . $db->qn('user_id') . '=' . $db->Quote($userId);
     $query[] = 'LEFT JOIN ' . $db->qn('#__easyblog_team_groups') . ' AS c';
     $query[] = 'ON a.' . $db->qn('id') . ' = c.' . $db->qn('team_id');
     $query[] = 'WHERE a.' . $db->qn('published') . '=' . $db->Quote(1);
     $query[] = 'GROUP BY a.' . $db->qn('id') . ' HAVING (COUNT(b.' . $db->qn('team_id') . ') > 0 || COUNT(c.' . $db->qn('team_id') . ') > 0)';
     $query = implode(' ', $query);
     $db->setQuery($query);
     $rows = $db->loadObjectList();
     if (!$rows) {
         return $rows;
     }
     $teams = array();
     foreach ($rows as $row) {
         $team = EB::table('TeamBlog');
         $team->bind($row);
         $teams[] = $team;
     }
     return $teams;
 }
开发者ID:knigherrant,项目名称:decopatio,代码行数:36,代码来源:teamblogs.php

示例15: getListQuery

 /**
  * Build an SQL query to load the list data.
  *
  * @return  JDatabaseQuery
  *
  * @since   1.6
  */
 protected function getListQuery()
 {
     // Create a new query object.
     $db = $this->getDbo();
     $query = $db->getQuery(true);
     // Select the required fields from the table.
     $query->select($this->getState('list.select', 'a.id, a.user_id, a.payee_name, a.transaction_id, a.date, a.email_id, a.amount, a.status'));
     $query->from('`#__kart_payouts` AS a');
     $query->select('u.username');
     $query->join('LEFT', '`#__users` AS u ON u.id=a.user_id');
     // Filter by search in title
     $search = $this->getState('filter.search');
     if (!empty($search)) {
         if (stripos($search, 'id:') === 0) {
             $query->where('a.id = ' . (int) substr($search, 3));
         } else {
             $search = $db->Quote('%' . $db->escape($search, true) . '%');
             $query->where('( a.payee_name LIKE ' . $search . '  OR  a.transaction_id LIKE ' . $search . '  OR  a.email_id LIKE ' . $search . ' )');
         }
     }
     $query->where("user_id = " . JFactory::getuser()->id);
     // Add the list ordering clause.
     $orderCol = $this->state->get('list.ordering');
     $orderDirn = $this->state->get('list.direction');
     if ($orderCol && $orderDirn) {
         $query->order($db->escape($orderCol . ' ' . $orderDirn));
     }
     return $query;
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:36,代码来源:payouts.php


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