本文整理汇总了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);
}
示例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 {
示例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;
}
}