本文整理汇总了PHP中vmTrace函数 的典型用法代码示例。如果您正苦于以下问题:PHP vmTrace函数的具体用法?PHP vmTrace怎么用?PHP vmTrace使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vmTrace函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getListQuery
function getListQuery()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('group_size.*')->from('#__tsmart_group_size AS group_size');
$user = JFactory::getUser();
$shared = '';
if (vmAccess::manager()) {
//$query->where('transferaddon.shared=1','OR');
}
$search = vRequest::getCmd('search', false);
if (empty($search)) {
$search = vRequest::getString('search', false);
}
// add filters
if ($search) {
$db = JFactory::getDBO();
$search = '"%' . $db->escape($search, true) . '%"';
$query->where('group_size.group_name LIKE ' . $search);
}
if (empty($this->_selectedOrdering)) {
vmTrace('empty _getOrdering');
}
if (empty($this->_selectedOrderingDir)) {
vmTrace('empty _selectedOrderingDir');
}
$query->order('group_size.' . $this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
//echo $query->dump();
return $query;
}
开发者ID:cuongnd, 项目名称:etravelservice, 代码行数:30, 代码来源:groupsize.php
示例2: getListQuery
function getListQuery()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*')->from('#__tsmart_coupons AS coupons');
if (empty($this->_selectedOrdering)) {
vmTrace('empty _getOrdering');
}
if (empty($this->_selectedOrderingDir)) {
vmTrace('empty _selectedOrderingDir');
}
$query->order($this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
return $query;
}
开发者ID:cuongnd, 项目名称:etravelservice, 代码行数:14, 代码来源:coupon.php
示例3: displayProductCustomfieldSelected
/**
* There are too many functions doing almost the same for my taste
* the results are sometimes slighty different and makes it hard to work with it, therefore here the function for future proxy use
*
*/
public static function displayProductCustomfieldSelected($product, $html, $trigger)
{
if (isset($product->param)) {
vmTrace('param found, seek and destroy');
return false;
}
$row = 0;
if (!class_exists('shopFunctionsF')) {
require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
}
$variantmods = isset($product->customProductData) ? $product->customProductData : $product->product_attribute;
if (empty($variantmods)) {
$productDB = VmModel::getModel('product')->getProduct($product->virtuemart_product_id);
if ($productDB) {
$product->customfields = $productDB->customfields;
}
}
if (!is_array($variantmods)) {
$variantmods = json_decode($variantmods, true);
}
$productCustoms = array();
foreach ((array) $product->customfields as $prodcustom) {
//We just add the customfields to be shown in the cart to the variantmods
if (is_object($prodcustom)) {
if ($prodcustom->is_cart_attribute and !$prodcustom->is_input) {
if (!is_array($variantmods[$prodcustom->virtuemart_custom_id])) {
$variantmods[$prodcustom->virtuemart_custom_id] = array();
}
$variantmods[$prodcustom->virtuemart_custom_id][$prodcustom->virtuemart_customfield_id] = false;
} else {
if (!empty($variantmods) and !empty($variantmods[$prodcustom->virtuemart_custom_id])) {
}
}
$productCustoms[$prodcustom->virtuemart_customfield_id] = $prodcustom;
}
}
foreach ((array) $variantmods as $custom_id => $customfield_ids) {
if (!is_array($customfield_ids)) {
$customfield_ids = array($customfield_ids => false);
}
foreach ($customfield_ids as $customfield_id => $params) {
if (empty($productCustoms) or !isset($productCustoms[$customfield_id])) {
continue;
}
$productCustom = $productCustoms[$customfield_id];
//The stored result in vm2.0.14 looks like this {"48":{"textinput":{"comment":"test"}}}
//and now {"32":[{"invala":"100"}]}
if (!empty($productCustom)) {
$otag = ' <span class="product-field-type-' . $productCustom->field_type . '">';
if ($productCustom->field_type == "E") {
$tmp = '';
if (!class_exists('vmCustomPlugin')) {
require VMPATH_PLUGINLIBS . DS . 'vmcustomplugin.php';
}
JPluginHelper::importPlugin('vmcustom');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger($trigger . 'VM3', array(&$product, &$productCustom, &$tmp));
if (!empty($tmp)) {
$html .= $otag . $tmp;
}
} else {
$value = '';
if ($productCustom->field_type == 'G') {
$db = JFactory::getDBO();
$db->setQuery('SELECT `product_name` FROM `#__virtuemart_products_' . VmConfig::$vmlang . '` WHERE virtuemart_product_id=' . (int) $productCustom->customfield_value);
$child = $db->loadObject();
$value = $child->product_name;
} elseif ($productCustom->field_type == 'M') {
$customFieldModel = VmModel::getModel('customfields');
$value = $customFieldModel->displayCustomMedia($productCustom->customfield_value, 'product', $productCustom->width, $productCustom->height, self::$useAbsUrls);
} elseif ($productCustom->field_type == 'S') {
if ($productCustom->is_list and $productCustom->is_input) {
$value = vmText::_($params);
} else {
$value = vmText::_($productCustom->customfield_value);
}
} elseif ($productCustom->field_type == 'A') {
$value = vmText::_($product->{$productCustom->customfield_value});
//vmdebug('Customfield A',$productCustom,$productCustom->customfield_value);
} elseif ($productCustom->field_type == 'C') {
//vmdebug('displayProductCustomfieldSelected C',$productCustom,$productCustom->selectoptions);
foreach ($productCustom->options->{$product->virtuemart_product_id} as $k => $option) {
$value .= '<span> ';
if (!empty($productCustom->selectoptions[$k]->clabel) and in_array($productCustom->selectoptions[$k]->voption, self::$dimensions)) {
$value .= vmText::_('COM_VIRTUEMART_' . $productCustom->selectoptions[$k]->voption);
$rd = $productCustom->selectoptions[$k]->clabel;
if (is_numeric($rd) and is_numeric($option)) {
$value .= ' ' . number_format(round((double) $option, (int) $rd), $rd);
}
} else {
if (!empty($productCustom->selectoptions[$k]->clabel)) {
$value .= vmText::_($productCustom->selectoptions[$k]->clabel);
}
$value .= ' ' . vmText::_($option) . ' ';
}
//.........这里部分代码省略.........
开发者ID:proyectoseb, 项目名称:Matrix, 代码行数:101, 代码来源:customfields.php
示例4: getProduct
/**
* This function creates a product with the attributes of the parent.
*
* @param int $virtuemart_product_id
* @param boolean $front for frontend use
* @param boolean $withCalc calculate prices?
* @param boolean published
* @param int quantity
* @param boolean load customfields
*/
public function getProduct($virtuemart_product_id = NULL, $front = TRUE, $withCalc = TRUE, $onlyPublished = TRUE, $quantity = 1, $virtuemart_shoppergroup_ids = 0)
{
//vmSetStartTime('getProduct');
if (isset($virtuemart_product_id)) {
$virtuemart_product_id = $this->setId($virtuemart_product_id);
} else {
if (empty($this->_id)) {
vmdebug('Can not return product with empty id');
return FALSE;
} else {
$virtuemart_product_id = $this->_id;
}
}
$checkedProductKey = $this->checkIfCached($virtuemart_product_id, $front, $withCalc, $onlyPublished, $quantity, $virtuemart_shoppergroup_ids);
if ($checkedProductKey[0]) {
if (self::$_products[$checkedProductKey[1]] === false) {
return false;
} else {
//vmTime('getProduct return cached clone','getProduct');
return clone self::$_products[$checkedProductKey[1]];
}
}
$productKey = $checkedProductKey[1];
if ($this->memory_limit < ($mem = round(memory_get_usage(FALSE) / (1024 * 1024), 2))) {
vmdebug('Memory limit reached in model product getProduct(' . $virtuemart_product_id . '), consumed: ' . $mem . 'M');
vmError('Memory limit reached in model product getProduct() ' . $virtuemart_product_id);
return false;
}
$child = $this->getProductSingle($virtuemart_product_id, $front, $quantity, true, $virtuemart_shoppergroup_ids);
if (!$child->published && $onlyPublished) {
self::$_products[$productKey] = false;
vmTime('getProduct return false, not published', 'getProduct');
return FALSE;
}
if (!isset($child->orderable)) {
$child->orderable = TRUE;
}
//store the original parent id
$pId = $child->virtuemart_product_id;
$ppId = $child->product_parent_id;
$published = $child->published;
if (!empty($pId)) {
$child->allIds[] = $pId;
}
$i = 0;
$runtime = microtime(TRUE) - $this->starttime;
//Check for all attributes to inherited by parent products
while (!empty($child->product_parent_id)) {
$runtime = microtime(TRUE) - $this->starttime;
if ($runtime >= $this->maxScriptTime) {
vmdebug('Max execution time reached in model product getProduct() ', $child);
vmError('Max execution time reached in model product getProduct() ' . $child->product_parent_id);
break;
} else {
if ($i > 10) {
vmdebug('Time: ' . $runtime . ' Too many child products in getProduct() ', $child);
vmError('Time: ' . $runtime . ' Too many child products in getProduct() ' . $child->product_parent_id);
break;
}
}
//$child->allIds[] = $child->product_parent_id;
if (!empty($child->product_parent_id)) {
$child->allIds[] = $child->product_parent_id;
}
$parentProduct = $this->getProductSingle($child->product_parent_id, $front, $quantity);
if ($child->product_parent_id === $parentProduct->product_parent_id) {
vmError('Error, parent product with virtuemart_product_id = ' . $parentProduct->virtuemart_product_id . ' has same parent id like the child with virtuemart_product_id ' . $child->virtuemart_product_id);
vmTrace('Error, parent product with virtuemart_product_id = ' . $parentProduct->virtuemart_product_id . ' has same parent id like the child with virtuemart_product_id ' . $child->virtuemart_product_id);
break;
}
$attribs = get_object_vars($parentProduct);
foreach ($attribs as $k => $v) {
if ('product_in_stock' != $k and 'product_ordered' != $k) {
// Do not copy parent stock into child
if (strpos($k, '_') !== 0 and empty($child->{$k})) {
$child->{$k} = $v;
// vmdebug($child->product_parent_id.' $child->$k',$child->$k);
}
}
}
$i++;
if ($child->product_parent_id != $parentProduct->product_parent_id) {
$child->product_parent_id = $parentProduct->product_parent_id;
} else {
$child->product_parent_id = 0;
}
}
//vmdebug('getProduct Time: '.$runtime);
$child->published = $published;
$child->virtuemart_product_id = $pId;
//.........这里部分代码省略.........
开发者ID:sam-akopyan, 项目名称:hamradio, 代码行数:101, 代码来源:product.php
示例5: get
/**
* Main filter function, called by the others with set Parameters
* The standard filter is non restrictiv.
*
* @author Max Milbers
* @param $name
* @param null $default
* @param int $filter
* @param int $flags
* @return mixed|null
*/
public static function get($name, $default = null, $filter = FILTER_UNSAFE_RAW, $flags = FILTER_FLAG_NO_ENCODE,$source = 0){
//vmSetStartTime();
if(!empty($name)){
if($source===0){
$source = $_REQUEST;
} else if($source=='GET'){
$source = $_GET;
if(JVM_VERSION>2){
$router = JFactory::getApplication()->getRouter();
$vars = $router->getVars();
if($router->getMode() and !empty($vars)){
$source = array_merge($_GET,$vars);
}
}
} else if($source=='POST'){
$source = $_POST;
}
if(!isset($source[$name])){
return $default;
}
//if(strpos($name,'[]'!==FALSE)){
return self::filter($source[$name],$filter,$flags);
} else {
vmTrace('empty name in vRequest::get');
return $default;
}
}
开发者ID:kosmosby, 项目名称:medicine-prof, 代码行数:44, 代码来源:vrequest.php
示例6: getListQuery
function getListQuery()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('faq.*,categoryfaq.categoryfaq_name')->from('#__tsmart_faq AS faq')->leftJoin('#__tsmart_categoryfaq AS categoryfaq ON categoryfaq.tsmart_categoryfaq_id=faq.tsmart_categoryfaq_id');
$user = JFactory::getUser();
$shared = '';
if (vmAccess::manager()) {
//$query->where('transferaddon.shared=1','OR');
}
$search = vRequest::getCmd('search', false);
if (empty($search)) {
$search = vRequest::getString('search', false);
}
// add filters
if ($search) {
$db = JFactory::getDBO();
$search = '"%' . $db->escape($search, true) . '%"';
$query->where('faq.title LIKE ' . $search);
}
if (empty($this->_selectedOrdering)) {
vmTrace('empty _getOrdering');
}
if (empty($this->_selectedOrderingDir)) {
vmTrace('empty _selectedOrderingDir');
}
$query->order($this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
return $query;
}
开发者ID:cuongnd, 项目名称:etravelservice, 代码行数:29, 代码来源:faq.php
示例7: displayProductCustomfieldSelected
/**
* There are too many functions doing almost the same for my taste
* the results are sometimes slighty different and makes it hard to work with it, therefore here the function for future proxy use
*
*/
public static function displayProductCustomfieldSelected($product, $html, $trigger)
{
if (isset($product->param)) {
vmTrace('param found, seek and destroy');
return false;
}
$row = 0;
if (!class_exists('shopFunctionsF')) {
require JPATH_VM_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
}
$variantmods = isset($product->customProductData) ? $product->customProductData : $product->product_attribute;
if (empty($variantmods)) {
$productDB = VmModel::getModel('product')->getProduct($product->virtuemart_product_id);
if ($productDB) {
$product->customfields = $productDB->customfields;
}
}
if (!is_array($variantmods)) {
$variantmods = json_decode($variantmods, true);
}
$productCustoms = array();
foreach ($product->customfields as $prodcustom) {
//We just add the customfields to be shown in the cart to the variantmods
if (is_object($prodcustom)) {
if ($prodcustom->is_cart_attribute and !$prodcustom->is_input) {
$variantmods[$prodcustom->virtuemart_custom_id] = $prodcustom->virtuemart_customfield_id;
} else {
if (!empty($variantmods) and !empty($variantmods[$prodcustom->virtuemart_custom_id])) {
}
}
$productCustoms[$prodcustom->virtuemart_customfield_id] = $prodcustom;
}
}
foreach ($variantmods as $custom_id => $customfield_ids) {
if (!is_array($customfield_ids)) {
$customfield_ids = array($customfield_ids => false);
}
foreach ($customfield_ids as $customfield_id => $params) {
if (empty($productCustoms) or !isset($productCustoms[$customfield_id])) {
continue;
}
$productCustom = $productCustoms[$customfield_id];
//The stored result in vm2.0.14 looks like this {"48":{"textinput":{"comment":"test"}}}
//and now {"32":[{"invala":"100"}]}
if (!empty($productCustom)) {
$html .= ' <span class="product-field-type-' . $productCustom->field_type . '">';
if ($productCustom->field_type == "E") {
//$product->productCustom = $productCustom;
//$product->row = $row;
//
if (!class_exists('vmCustomPlugin')) {
require JPATH_VM_PLUGINS . DS . 'vmcustomplugin.php';
}
JPluginHelper::importPlugin('vmcustom');
$dispatcher = JDispatcher::getInstance();
//vmdebug('displayProductCustomfieldSelected is PLUGIN use trigger '.$trigger,$product->virtuemart_product_id,$productCustom->virtuemart_customfield_id,$productCustom->custom_element);
$dispatcher->trigger($trigger . 'VM3', array(&$product, &$productCustom, &$html));
} else {
//vmdebug('customFieldDisplay $productCustom by self::getProductCustomField $variant: '.$variant.' $selected: '.$selected,$productCustom);
$value = '';
if ($productCustom->field_type == "G") {
$db = JFactory::getDBO();
$db->setQuery('SELECT `product_name` FROM `#__virtuemart_products_' . VmConfig::$vmlang . '` WHERE virtuemart_product_id=' . (int) $productCustom->customfield_value);
$child = $db->loadObject();
$value = $child->product_name;
} elseif ($productCustom->field_type == "M") {
// $html .= $productCustom->custom_title.' '.self::displayCustomMedia($productCustom->custom_value);
$value = self::displayCustomMedia($productCustom->customfield_value);
} elseif ($productCustom->field_type == "S") {
//$value = $productCustom->custom_title.' '.vmText::_($productCustom->customfield_value);
$value = $productCustom->customfield_value;
} else {
// $html .= $productCustom->custom_title.' '.$productCustom->custom_value;
//vmdebug('customFieldDisplay',$productCustom);
$value = $productCustom->customfield_value;
}
$html .= ShopFunctionsF::translateTwoLangKeys($productCustom->custom_title, $value);
}
$html .= '</span><br />';
} else {
// falldown method if customfield are deleted
foreach ((array) $customfield_id as $key => $value) {
$html .= '<br/ >Couldnt find customfield' . ($key ? '<span>' . $key . ' </span>' : '') . $value;
}
//vmdebug ('CustomsFieldOrderDisplay, $item->productCustom empty? ' . $variant);
vmdebug('customFieldDisplay, $productCustom is EMPTY ' . $customfield_id);
}
}
}
return $html . '</div>';
}
开发者ID:lenard112, 项目名称:cms, 代码行数:96, 代码来源:customfields.php
示例8: setCryptedFields
/**
* Sets fields encrypted
* @author Max Milbers
* @param $fieldNames
*/
public function setCryptedFields($fieldNames)
{
if (!$fieldNames) {
vmTrace('setEncrytped fields false not catched');
return;
}
if (!is_array($fieldNames)) {
$fieldNames = array($fieldNames);
}
if (isset($fieldNames[$this->_pkey])) {
unset($fieldNames[$this->_pkey]);
}
$this->_cryptedFields = $fieldNames;
}
开发者ID:juanmcortez, 项目名称:Lectorum, 代码行数:19, 代码来源:vmtable.php
示例9: getListQuery
function getListQuery()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('payment.*')->from('#__tsmart_payment AS payment')->leftJoin('#__tsmart_currencies AS currencies USING(tsmart_currency_id)')->select('CONCAT(currencies.currency_code_3," ",currencies.currency_symbol) AS currency_symbol');
//get list tour apply
$query1 = $db->getQuery(true);
$query1->select('GROUP_CONCAT(products_en_gb.product_name)')->from('#__tsmart_tour_id_payment_id AS tour_id_payment_id')->leftJoin('#__tsmart_products_en_gb AS products_en_gb USING(tsmart_product_id)')->where('tour_id_payment_id.tsmart_payment_id=payment.tsmart_payment_id');
$query->select("({$query1}) AS list_tour");
//end get list tour apply
$user = JFactory::getUser();
$shared = '';
if (vmAccess::manager()) {
//$query->where('payment.shared=1','OR');
}
$search = vRequest::getCmd('search', false);
if (empty($search)) {
$search = vRequest::getString('search', false);
}
// add filters
if ($search) {
$db = JFactory::getDBO();
$search = '"%' . $db->escape($search, true) . '%"';
$query->where('payment.title LIKE ' . $search);
}
if (empty($this->_selectedOrdering)) {
vmTrace('empty _getOrdering');
}
if (empty($this->_selectedOrderingDir)) {
vmTrace('empty _selectedOrderingDir');
}
$query->order($this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
return $query;
}
开发者ID:cuongnd, 项目名称:etravelservice, 代码行数:34, 代码来源:payment.php
示例10: getListQuery
function getListQuery()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query1 = $db->getQuery(true);
$query1->select('GROUP_CONCAT(products_en_gb.tsmart_product_id)')->from('#__tsmart_products_en_gb AS products_en_gb')->leftJoin('#__tsmart_products AS products USING(tsmart_product_id)')->leftJoin('#__tsmart_tour_id_hotel_addon_id AS tour_id_hotel_addon_id1 USING(tsmart_product_id)')->where('tour_id_hotel_addon_id1.tsmart_hotel_addon_id=hotel_addon.tsmart_hotel_addon_id');
$query->select('hotel_addon.*,hotel.hotel_name,cityarea.city_area_name,cityarea.tsmart_cityarea_id')->from('#__tsmart_hotel_addon AS hotel_addon')->leftJoin('#__tsmart_hotel AS hotel USING(tsmart_hotel_id)')->leftJoin('#__tsmart_cityarea AS cityarea ON cityarea.tsmart_cityarea_id=hotel.tsmart_cityarea_id')->select('(' . $query1 . ') AS list_tsmart_product_id');
$user = JFactory::getUser();
$shared = '';
if ($search = $this->getState('filter.search')) {
$search = '"%' . $db->escape($search, true) . '%"';
$query->where('(hotel_addon.tsmart_hotel_addon_id LIKE ' . $search . ' OR hotel.hotel_name LIKE ' . $search . ')');
}
if ($location_city = $this->getState('filter.location_city')) {
$query->where('cityarea.tsmart_cityarea_id=' . (int) $location_city);
}
if ($vail_from = $this->getState('filter.vail_from')) {
$vail_from = JFactory::getDate($vail_from);
$query->where('hotel_addon.vail_from >=' . $query->q($vail_from->toSql()));
}
if ($vail_to = $this->getState('filter.vail_to')) {
$vail_to = JFactory::getDate($vail_to);
$query->where('hotel_addon.vail_to<=' . $query->q($vail_to->toSql()));
}
// Filter by published state
$state = $this->getState('filter.state');
if (is_numeric($state)) {
$query->where('hotel_addon.published = ' . (int) $state);
} elseif ($state === '') {
$query->where('(hotel_addon.published IN (0, 1))');
}
if (empty($this->_selectedOrdering)) {
vmTrace('empty _getOrdering');
}
if (empty($this->_selectedOrderingDir)) {
vmTrace('empty _selectedOrderingDir');
}
$query->order($this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
return $query;
}
开发者ID:cuongnd, 项目名称:etravelservice, 代码行数:40, 代码来源:hoteladdon.php
示例11: get
/**
* Main filter function, called by the others with set Parameters
* The standard filter is non restrictiv.
*
* @author Max Milbers
* @param $name
* @param null $default
* @param int $filter
* @param int $flags
* @return mixed|null
*/
public static function get($name, $default = null, $filter = FILTER_UNSAFE_RAW, $flags = FILTER_FLAG_STRIP_LOW)
{
//vmSetStartTime();
if (!empty($name)) {
if (!isset($_REQUEST[$name])) {
return $default;
}
//if(strpos($name,'[]'!==FALSE)){
if (is_array($_REQUEST[$name])) {
return filter_var_array($_REQUEST[$name], $filter);
} else {
return filter_var($_REQUEST[$name], $filter, $flags);
}
} else {
vmTrace('empty name in vRequest::get');
return $default;
}
}
开发者ID:sergy444, 项目名称:joomla, 代码行数:29, 代码来源:vrequest.php
示例12: getListQuery
function getListQuery()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('excursion_addon.*')->from('#__tsmart_excursion_addon AS excursion_addon')->leftJoin('me1u8_tsmart_cityarea AS cityarea USING(tsmart_cityarea_id)')->select('cityarea.city_area_name AS city_area_name');
$user = JFactory::getUser();
$shared = '';
if (vmAccess::manager()) {
//$query->where('excursionaddon.shared=1','OR');
}
$search = vRequest::getCmd('search', false);
if (empty($search)) {
$search = vRequest::getString('search', false);
}
// add filters
if ($search) {
$db = JFactory::getDBO();
$search = '"%' . $db->escape($search, true) . '%"';
$query->where('excursion_addon.excursion_addon_name LIKE ' . $search);
}
if (empty($this->_selectedOrdering)) {
vmTrace('empty _getOrdering');
}
if (empty($this->_selectedOrderingDir)) {
vmTrace('empty _selectedOrderingDir');
}
$query->order($this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
return $query;
}
开发者ID:cuongnd, 项目名称:etravelservice, 代码行数:29, 代码来源:excursionaddon.php
示例13: vmWarn
<?php
$attentionText = JText::_('COM_VIRTUEMART_MIGRATION_WARN_VM1_EXTENSIONS');
vmWarn($attentionText);
echo $attentionText;
vmTrace('Called by');
开发者ID:joselapria, 项目名称:virtuemart, 代码行数:6, 代码来源:virtuemart_parser.php
示例14: vmError
/**
* Shows an error message, sensible information should be only in the first one, the second one is for non BE users
* @author Max Milbers
*/
function vmError($descr, $publicdescr = '')
{
$msg = '';
if (VmConfig::$maxMessageCount < VmConfig::$maxMessage + 5) {
if (empty($descr)) {
vmTrace('vmError message empty');
}
$lang = JFactory::getLanguage();
JLoader::register('Permissions', JPATH_VM_ADMINISTRATOR . '/helpers/permissions.php');
if (Permissions::getInstance()->check('admin')) {
//$app = JFactory::getApplication();
$descr = $lang->_($descr);
$msg = 'vmError: ' . $descr;
} else {
if (!empty($publicdescr)) {
$msg = $lang->_($publicdescr);
}
}
} else {
if (VmConfig::$maxMessageCount == VmConfig::$maxMessage + 5) {
$msg = 'Max messages reached';
} else {
return false;
}
}
if (!empty($msg)) {
VmConfig::$maxMessageCount++;
$app = JFactory::getApplication();
$app->enqueueMessage($msg, 'error');
return $msg;
}
return $msg;
}
开发者ID:denis1001, 项目名称:Virtuemart-2-Joomla-3-Bootstrap, 代码行数:37, 代码来源:config.php
示例15: saveAddressInCart
function saveAddressInCart($data, $type, $putIntoSession = true, $prefix = '')
{
// VirtueMartModelUserfields::getUserFields() won't work
if (!class_exists('VirtueMartModelUserfields')) {
require VMPATH_ADMIN . DS . 'models' . DS . 'userfields.php';
}
$userFieldsModel = VmModel::getModel('userfields');
if ($type == 'STaddress' or $type == 'BTaddress') {
vmTrace('STaddress found, seek and destroy');
}
$prepareUserFields = $userFieldsModel->getUserFieldsFor('cart', $type);
if (!is_array($data)) {
$data = get_object_vars($data);
}
if ($type == 'ST') {
$this->STsameAsBT = 0;
} else {
// BT
if (empty($data['email'])) {
$jUser = JFactory::getUser();
$address['email'] = $jUser->email;
}
}
$address = array();
if (!class_exists('vmFilter')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'vmfilter.php';
}
foreach ($prepareUserFields as $fld) {
if (!empty($fld->name)) {
$name = $fld->name;
if (!isset($data[$prefix . $name])) {
$tmp = vRequest::getString($prefix . $name, false);
if ($tmp) {
$data[$prefix . $name] = $tmp;
} else {
if ($fld->required and isset($this->{$type}[$name])) {
//Why we have this fallback to the already stored value?
$data[$prefix . $name] = $this->{$type}[$name];
}
}
/*if($fld->type=='text'){
} else {
vmdebug('my fld ',$fld);
}*/
}
if (isset($data[$prefix . $name])) {
if (!empty($data[$prefix . $name])) {
if (is_array($data[$prefix . $name])) {
foreach ($data[$prefix . $name] as $k => $v) {
$data[$prefix . $name][$k] = self::filterCartInput($v);
}
} else {
$data[$prefix . $name] = self::filterCartInput($data[$prefix . $name]);
}
}
$address[$name] = $data[$prefix . $name];
} else {
//vmdebug('Data not found for type '.$type.' and name '.$prefix.$name.' ');
}
}
}
//dont store passwords in the session
unset($address['password']);
unset($address['password2']);
$this->{$type} = $address;
if ($putIntoSession) {
$this->setCartIntoSession(true);
}
}
开发者ID:chaudhary4k4, 项目名称:modernstore, 代码行数:69, 代码来源:cart.php
示例16: check
/**
* @author Max Milbers
* @param
*/
function check()
{
if (!empty($this->_slugAutoName)) {
$slugAutoName = $this->_slugAutoName;
$slugName = $this->_slugName;
if (in_array($slugAutoName, $this->_translatableFields)) {
$checkTable = $this->_tbl_lang;
vmTrace('Language table in normal check?');
} else {
$checkTable = $this->_tbl;
}
if (empty($this->{$slugName})) {
// vmdebug('table check use _slugAutoName '.$slugAutoName.' '.$slugName);
if (!empty($this->{$slugAutoName})) {
$this->{$slugName} = $this->{$slugAutoName};
} else {
$pkey = $this->_pkey;
vmError('VmTable ' . $checkTable . ' Check not passed. Neither slug nor obligatory value at ' . $slugAutoName . ' for auto slug creation is given ' . $this->{$pkey});
return false;
}
}
//if (JVM_VERSION === 1) $this->$slugName = JFilterOutput::stringURLSafe($this->$slugName);
//else $this->$slugName = JApplication::stringURLSafe($this->$slugName);
//pro+#'!"§$%&/()=?duct-w-| ||cu|st|omfield-|str<ing>
//vmdebug('my slugName '.$slugName,$this->$slugName);
$this->{$slugName} = str_replace('-', ' ', $this->{$slugName});
$this->{$slugName} = html_entity_decode($this->{$slugName}, ENT_QUOTES);
//$config =& JFactory::getConfig();
//$transliterate = $config->get('unicodeslugs');
$unicodeslugs = VmConfig::get('transliterateSlugs', false);
if ($unicodeslugs) {
$lang = JFactory::getLanguage();
$this->{$slugName} = $lang->transliterate($this->{$slugName});
}
// Trim white spaces at beginning and end of alias and make lowercase
$this->{$slugName} = trim(JString::strtolower($this->{$slugName}));
$this->{$slugName} = str_replace(array('`', '´', "'"), '', $this->{$slugName});
$this->{$slugName} = vRequest::filterUword($this->{$slugName}, '-,_,|', '-');
while (strpos($this->{$slugName}, '--')) {
$this->{$slugName} = str_replace('--', '-', $this->{$slugName});
}
// Trim dashes at beginning and end of alias
$this->{$slugName} = trim($this->{$slugName}, '-');
if ($unicodeslugs) {
$this->{$slugName} = rawurlencode($this->{$slugName});
}
$valid = $this->checkCreateUnique($checkTable, $slugName);
vmdebug('my Final slugName ' . $slugName, $this->{$slugName});
if (!$valid) {
return false;
}
}
foreach ($this->_obkeys as $obkeys => $error) {
if (empty($this->{$obkeys})) {
$error = get_class($this) . ' ' . vmText::sprintf('COM_VIRTUEMART_STRING_ERROR_OBLIGATORY_KEY', 'COM_VIRTUEMART_' . strtoupper($obkeys));
vmError($error);
return false;
}
}
if ($this->_unique) {
if (empty($this->_db)) {
$this->_db = JFactory::getDBO();
}
foreach ($this->_unique_name as $obkeys => $error) {
if (empty($this->{$obkeys})) {
$error = vmText::sprintf('COM_VIRTUEMART_STRING_ERROR_NOT_UNIQUE_NAME', 'COM_VIRTUEMART_' . strtoupper($obkeys));
vmError('Non unique ' . $this->_unique_name . ' ' . $error);
return false;
} else {
$valid = $this->checkCreateUnique($this->_tbl, $obkeys);
if (!$valid) {
return false;
}
}
}
}
if (property_exists($this, 'virtuemart_vendor_id')) {
if (empty($this->virtuemart_vendor_id) and $this->_pkey == 'virtuemart_vendor_id') {
$this->virtuemart_vendor_id = $this->_pvalue;
}
$multix = Vmconfig::get('multix', 'none');
//Lets check if the user is admin or the mainvendor
$virtuemart_vendor_id = false;
if ($multix == 'none' and get_class($this) !== 'TableVmusers') {
$this->virtuemart_vendor_id = 1;
return true;
} else {
$loggedVendorId = VmConfig::isSuperVendor();
$user = JFactory::getUser();
$admin = $user->authorise('core.admin', 'com_virtuemart') || $user->authorise('core.manage', 'com_virtuemart') || $user->authorise('vm.user.edit', 'com_virtuemart');
$tbl_key = $this->_tbl_key;
$className = get_class($this);
if (strpos($this->_tbl, 'virtuemart_vmusers') === FALSE) {
$q = 'SELECT `virtuemart_vendor_id` FROM `' . $this->_tbl . '` WHERE `' . $this->_tbl_key . '`="' . $this->{$tbl_key} . '" ';
if (!isset(self::$_cache[md5($q)])) {
$this->_db->setQuery($q);
//.........这里部分代码省略.........
开发者ID:brenot, 项目名称:forumdesenvolvimento, 代码行数:101, 代码来源:vmtable.php
示例17: vmError
/**
* Shows an error message, sensible information should be only in the first one, the second one is for non BE users
* @author Max Milbers
*/
function vmError($descr, $publicdescr = '')
{
VmConfig::$maxMessageCount++;
$app = JFactory::getApplication();
if (VmConfig::$maxMessageCount < VmConfig::$maxMessage) {
if (empty($descr)) {
vmTrace('vmError message empty');
}
$lang = JFactory::getLanguage();
if (!class_exists('Permissions')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'permissions.php';
}
if (Permissions::getInstance()->check('admin')) {
$app = JFactory::getApplication();
$descr = $lang->_($descr);
$app->enqueueMessage('vmError: ' . $descr, 'error');
} else {
if (!empty($publicdescr)) {
$app = JFactory::getApplication();
$publicdescr = $lang->_($publicdescr);
$app->enqueueMessage($publicdescr, 'error');
}
}
} else {
if (VmConfig::$maxMessageCount == VmConfig::$maxMessage) {
$app->enqueueMessage('Max messages reached', 'info');
}
}
}
开发者ID:romuland, 项目名称:khparts, 代码行数:33, 代码来源:config.php
示例18: getListQuery
function getListQuery()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('hotel.*')->from('#__tsmart_hotel AS hotel')->leftJoin('#__tsmart_cityarea AS cityarea USING(tsmart_cityarea_id)')->leftJoin('#__tsmart_states AS states ON states.tsmart_state_id=cityarea.tsmart_state_id')->leftJoin('#__tsmart_countries AS countries ON countries.tsmart_country_id=states.tsmart_country_id')->select('CONCAT(cityarea.city_area_name,",",states.state_name,",",countries.country_name) AS location');
$user = JFactory::getUser();
$shared = '';
if (vmAccess::manager()) {
//$query->where('transferaddon.shared=1','OR');
}
$search = vRequest::getCmd('search', false);
if (empty($search)) {
$search = vRequest::getString('search', false);
}
// add filters
if ($search) {
$db = JFactory::getDBO();
$search = '"%' . $db->escape($search, true) . '%"';
$query->where('hotel.title LIKE ' . $search);
}
if (empty($this->_selectedOrdering)) {
vmTrace('empty _getOrdering');
}
if (empty($this->_selectedOrderingDir)) {
vmTrace('empty _selectedOrderingDir');
}
$query->order($this->_selectedOrdering . ' ' . $this->_selectedOrderingDir);
//echo $query->dump();
return $query;
}
开发者ID:cuongnd, 项目名称:etravelservice, 代码行数:30, 代码来源:hotel.php
NanoMichael/MicroTeX: A dynamic, cross-platform, and embeddable LaTeX rendering
阅读:882| 2022-08-12
bradtraversy/iweather: Ionic 3 mobile weather app
阅读:1583| 2022-08-30
joaomh/curso-de-matlab
阅读:1147| 2022-08-17
魔兽世界怀旧服已经开启两个多月了,但作为一个猎人玩家,抓到“断牙”,已经成为了一
阅读:1001| 2022-11-06
rugk/mastodon-simplified-federation: Simplifies following and interacting with r
阅读:1079| 2022-08-17
An issue was discovered in Inductive Automation Ignition before 7.9.20 and 8.x b
阅读:916| 2022-07-29
Tangshitao/Dense-Scene-Matching: Learning Camera Localization via Dense Scene Ma
阅读:759| 2022-08-16
json4s/json4s: JSON library
阅读:775| 2022-08-15
相信不少果粉在对自己的设备进行某些操作时,都会碰到Respring,但这个 Respring 到底
阅读:361| 2022-11-06
lightningtgc/MProgress.js: Material Progress —Google Material Design Progress l
阅读:405| 2022-08-17
请发表评论