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


PHP comquick2cartHelper::checkmailhash方法代码示例

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


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

示例1: display

 function display($tpl = null)
 {
     global $mainframe, $option;
     $this->params = JComponentHelper::getParams('com_quick2cart');
     $user = JFactory::getUser();
     $mainframe = JFactory::getApplication();
     $jinput = $mainframe->input;
     $option = $jinput->get('option');
     $view = $jinput->get('view');
     $orderid = $jinput->get('orderid', '');
     $emailMd5 = $jinput->get('guest_email', '', 'RAW');
     $model = $this->getModel('downloads');
     $layout = $jinput->get('layout', 'default');
     $comquick2cartHelper = new comquick2cartHelper();
     if ($layout == "default") {
         if ($emailMd5) {
             $this->guest_email_chk = $guest_email_chk = $comquick2cartHelper->checkmailhash($orderid, $emailMd5);
             //if order email and guest_email is same
             if (!$guest_email_chk) {
                 $this->showMsg(JText::_('QTC_GUEST_MAIL_UNMATCH'));
                 return false;
             }
         }
         if ($emailMd5) {
             $this->allDownloads = $model->getAllDownloads($user->id, $orderid);
             $this->pagination = $model->getPagination($user->id, $orderid);
         } else {
             $this->allDownloads = $model->getAllDownloads($user->id);
             $this->pagination = $model->getPagination($user->id);
         }
         $filter_order_Dir = $mainframe->getUserStateFromRequest($option . "{$view}.filter_order_Dir", 'filter_order_Dir', 'desc', 'word');
         $filter_type = $mainframe->getUserStateFromRequest($option . "{$view}.filter_order", 'filter_order', 'oi.order_id', 'string');
         $search = $mainframe->getUserStateFromRequest($option . 'search_list', 'search_list', '', 'string');
         if ($search == null) {
             $search = '';
         }
         // search filter
         $lists['search_list'] = $search;
         $lists['order_Dir'] = $filter_order_Dir;
         $lists['order'] = $filter_type;
         // Get data from the model
         $this->lists = $lists;
     }
     $this->_setToolBar();
     parent::display($tpl);
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:46,代码来源:view.html.php

示例2:

	</div>
</div>
</div>
<?php 
    return false;
}
if (isset($this->orders_site) && isset($this->undefined_orderid_msg)) {
    return false;
}
$params = JComponentHelper::getParams('com_quick2cart');
$user = JFactory::getUser();
$jinput = JFactory::getApplication()->input;
$guest_email = $jinput->get('email', '', 'STRING');
if ($guest_email) {
    $guest_email_chk = 0;
    $guest_email_chk = $helperobj->checkmailhash($this->orderinfo[0]->id, $guest_email);
    if (!$guest_email_chk) {
        ?>
<div class="well" >
	<div class="alert alert-error">
		<span ><?php 
        echo JText::_('QTC_GUEST_MAIL_UNMATCH');
        ?>
 </span>
	</div>
</div>
</div>
<?php 
        return false;
    }
} else {
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:31,代码来源:customerdetails.php

示例3: mediaFileAuthorise

 /**
  * mediaFileAuthorise
  *
  * @param   STRING  $file_id        file_id
  * @param   STRING  $strorecall     strorecall
  * @param   STRING  $guest_email    guest_email
  * @param   STRING  $order_item_id  order_item_id
  *
  * @return  html
  */
 public function mediaFileAuthorise($file_id, $strorecall, $guest_email, $order_item_id)
 {
     // Get store id associatd with file id
     $db = JFactory::getDBO();
     $query = "SELECT i.`store_id`,`file_id`,`file_display_name`,`filePath`,`purchase_required` FROM `#__kart_itemfiles` AS f\n\t\tLEFT JOIN `#__kart_items` AS i ON f.item_id=i.item_id\n\t\twhere f.`file_id`=" . $file_id;
     $db->setQuery($query);
     $fileDetail = $db->loadAssoc();
     $comquick2cartHelper = new comquick2cartHelper();
     $ret['validDownload'] = 0;
     $ret['orderItemFileId'] = 0;
     // FOR STORE AUTHORIZED PERSONS
     if (!empty($strorecall)) {
         $ret['validDownload'] = $comquick2cartHelper->store_authorize('product_default', $fileDetail['store_id']);
         return $ret;
     } elseif (empty($order_item_id) && $fileDetail['purchase_required'] == 0) {
         // Called from product detail page
         // For free media
         $ret['validDownload'] = 1;
         return $ret;
     } else {
         // Is authorized guest chekout
         if (!empty($guest_email)) {
             $orderid = $comquick2cartHelper->getOrderId($order_item_id);
             $guest_email_chk = $comquick2cartHelper->checkmailhash($orderid, $guest_email);
             if (empty($guest_email_chk)) {
                 //  Not matched
                 $ret['validDownload'] = 0;
                 return $ret;
             }
         }
         // Is expired date/download conunt or not
         $productHelper = new productHelper();
         $ret = $productHelper->validDownload($file_id, $order_item_id);
         return $ret;
     }
 }
开发者ID:BetterBetterBetter,项目名称:B3App,代码行数:46,代码来源:product.php


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