本文整理汇总了PHP中vRequest::getInt方法的典型用法代码示例。如果您正苦于以下问题:PHP vRequest::getInt方法的具体用法?PHP vRequest::getInt怎么用?PHP vRequest::getInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vRequest
的用法示例。
在下文中一共展示了vRequest::getInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: move
/**
* swap the ordering of a record in the Xref tables
* @param $direction , 1/-1 The increment to reorder by
*/
function move($direction, $where = '', $orderingkey = 0)
{
if (empty($this->_skey)) {
vmError('No secondary keys defined in VmTableXarray ' . $this->_tbl);
return false;
}
$skeyId = vRequest::getInt($this->_skey, 0);
// Initialize variables
$db = JFactory::getDBO();
$cid = vRequest::getInt($this->_pkey);
$order = vRequest::getInt('order');
//I found now two times "order" instead of ordering.
//This sql is broken
$query = 'SELECT `id` FROM `' . $this->_tbl . '` WHERE ' . $this->_pkey . ' = ' . (int) $cid[0] . ' AND `tsmart_category_id` = ' . (int) $skeyId;
$db->setQuery($query);
$id = $db->loadResult();
$keys = array_keys($order);
// TODO next 2 lines not used ????
if ($direction > 0) {
$idToSwap = $order[$keys[array_search($id, $keys)] + 1];
} else {
$idToSwap = $order[$keys[array_search($id, $keys)] - 1];
}
if (isset($cid[0])) {
$query = 'UPDATE `' . $this->_tbl . '` ' . ' SET `' . $this->_orderingKey . '` = `' . $this->_orderingKey . '` + ' . $direction . ' WHERE `' . $this->_pkey . '` = ' . (int) $cid[0] . ' AND `' . $this->_skey . '` = ' . (int) $skeyId;
$db->setQuery($query);
if (!$db->execute()) {
$err = $db->getErrorMsg();
JError::raiseError(500, get_class($this) . ':: move ' . $err);
}
}
}
示例2: display
function display($tpl = null)
{
// Load the helper(s)
if (!class_exists('VmHTML')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
$model = tmsModel::getModel();
$config = JFactory::getConfig();
$layoutName = vRequest::getCmd('layout', 'default');
if ($layoutName == 'edit') {
$cid = vRequest::getInt('cid');
$task = vRequest::getCmd('task', 'add');
if ($task != 'add' && !empty($cid) && !empty($cid[0])) {
$cid = (int) $cid[0];
} else {
$cid = 0;
}
$model->setId($cid);
$this->departure = $model->getdeparture();
$this->SetViewTitle('', $this->departure->departure_name);
$this->addStandardEditViewCommands();
} else {
$model_product = tmsModel::getModel('product');
$model_tour_class = tmsModel::getModel('tourclass');
$this->list_tour = $model_product->getProductListing(false, false, false, false);
$this->list_tour_class = $model_tour_class->getTourClassList();
$this->SetViewTitle();
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model, 0, 'ASC');
$this->departures = $model->getdepartureList(vRequest::getCmd('search'));
$this->pagination = $model->getPagination();
}
parent::display($tpl);
}
示例3: display
function display($tpl = null)
{
if (!class_exists('VmHTML')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
$this->vendorId = VmConfig::isSuperVendor();
// TODO add icon for media view
$this->SetViewTitle();
$model = VmModel::getModel('media');
$layoutName = vRequest::getCmd('layout', 'default');
if ($layoutName == 'edit') {
$this->media = $model->getFile();
$this->addStandardEditViewCommands();
} else {
$virtuemart_product_id = vRequest::getInt('virtuemart_product_id');
if (is_array($virtuemart_product_id) && count($virtuemart_product_id) > 0) {
$virtuemart_product_id = (int) $virtuemart_product_id[0];
} else {
$virtuemart_product_id = (int) $virtuemart_product_id;
}
$cat_id = vRequest::getInt('virtuemart_category_id', 0);
JToolBarHelper::custom('synchronizeMedia', 'new', 'new', vmText::_('COM_VIRTUEMART_TOOLS_SYNC_MEDIA_FILES'), false);
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model, null, null, 'searchMedia');
$options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_TYPES'), 'product' => vmText::_('COM_VIRTUEMART_PRODUCT'), 'category' => vmText::_('COM_VIRTUEMART_CATEGORY'), 'manufacturer' => vmText::_('COM_VIRTUEMART_MANUFACTURER'), 'vendor' => vmText::_('COM_VIRTUEMART_VENDOR'));
$this->lists['search_type'] = VmHTML::selectList('search_type', vRequest::getVar('search_type'), $options, 1, '', 'onchange="this.form.submit();"');
$options = array('' => vmText::_('COM_VIRTUEMART_LIST_ALL_ROLES'), 'file_is_displayable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DISPLAYABLE'), 'file_is_downloadable' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_DOWNLOADABLE'), 'file_is_forSale' => vmText::_('COM_VIRTUEMART_FORM_MEDIA_SET_FORSALE'));
$this->lists['search_role'] = VmHTML::selectList('search_role', vRequest::getVar('search_role'), $options, 1, '', 'onchange="this.form.submit();"');
$this->files = $model->getFiles(false, false, $virtuemart_product_id, $cat_id);
$this->pagination = $model->getPagination();
}
parent::display($tpl);
}
示例4: display
function display($tpl = null) {
// Load the helper(s)
if (!class_exists('VmHTML'))
require(VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php');
$this->SetViewTitle();
$model = VmModel::getModel();
// $stateId = vRequest::getVar('virtuemart_state_id');
// $model->setId($stateId);
$state = $model->getSingleState();
$countryId = vRequest::getInt('virtuemart_country_id', 0);
if(empty($countryId)) $countryId = $state->virtuemart_country_id;
$this->assignRef('virtuemart_country_id', $countryId);
$isNew = (count($state) < 1);
if(empty($countryId) && $isNew){
vmWarn('Country id is 0');
return false;
}
$country = VmModel::getModel('country');
$country->setId($countryId);
$this->assignRef('country_name', $country->getData()->country_name);
$layoutName = vRequest::getCmd('layout', 'default');
if ($layoutName == 'edit') {
$this->assignRef('state', $state);
$zoneModel = VmModel::getModel('Worldzones');
$wzsList = $zoneModel->getWorldZonesSelectList();
$this->assignRef('worldZones', $wzsList);
$this->addStandardEditViewCommands();
} else {
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model);
$states = $model->getStates($countryId);
$this->assignRef('states', $states);
$pagination = $model->getPagination();
$this->assignRef('pagination', $pagination);
}
parent::display($tpl);
}
示例5: display
function display($tpl = null)
{
if (!class_exists('VmHTML')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
}
$this->SetViewTitle();
$model = VmModel::getModel();
$this->state = $model->getSingleState();
$this->virtuemart_country_id = vRequest::getInt('virtuemart_country_id', $this->state->virtuemart_country_id);
$isNew = count($this->state) < 1;
if (empty($countryId) && $isNew) {
vmWarn('Country id is 0');
return false;
}
$country = VmModel::getModel('country');
$country->setId($this->virtuemart_country_id);
$this->country_name = $country->getData()->country_name;
$layoutName = vRequest::getCmd('layout', 'default');
if ($layoutName == 'edit') {
$zoneModel = VmModel::getModel('Worldzones');
$this->worldZones = $zoneModel->getWorldZonesSelectList();
$this->addStandardEditViewCommands();
} else {
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model);
$this->states = $model->getStates($this->virtuemart_country_id);
$this->pagination = $model->getPagination();
}
parent::display($tpl);
}
示例6: __construct
public function __construct(){
// JTable::addIncludePath(VMPATH_ADMIN . DS . 'tables');
$this->_app = JFactory::getApplication();
$this->_db = JFactory::getDBO();
// $this->_oldToNew = new stdClass();
$this->starttime = microtime(true);
$max_execution_time = VmConfig::getExecutionTime();
$jrmax_execution_time= vRequest::getInt('max_execution_time',300);
if(!empty($jrmax_execution_time)){
// vmdebug('$jrmax_execution_time',$jrmax_execution_time);
if($max_execution_time!==$jrmax_execution_time) @ini_set( 'max_execution_time', $jrmax_execution_time );
}
$this->maxScriptTime = VmConfig::getExecutionTime() * 0.90-1; //Lets use 10% of the execution time as reserve to store the progress
VmConfig::ensureMemoryLimit(128);
$this->maxMemoryLimit = $this->return_bytes(ini_get('memory_limit')) * 0.85;
$config = JFactory::getConfig();
$this->_prefix = $config->get('dbprefix');
$this->reCreaPri = VmConfig::get('reCreaPri',0);
$this->reCreaKey = VmConfig::get('reCreaKey',1);
}
示例7: display
function display($tpl = null)
{
// Load the helper(s)
if (!class_exists('VmHTML')) {
require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
}
$model = VmModel::getModel();
$config = JFactory::getConfig();
$layoutName = vRequest::getCmd('layout', 'default');
if ($layoutName == 'edit') {
$cid = vRequest::getInt('cid');
$task = vRequest::getCmd('task', 'add');
if ($task != 'add' && !empty($cid) && !empty($cid[0])) {
$cid = (int) $cid[0];
} else {
$cid = 0;
}
$model->setId($cid);
$currency = $model->getCurrency();
$this->SetViewTitle('', $currency->currency_name);
$this->assignRef('currency', $currency);
$this->addStandardEditViewCommands();
} else {
$this->SetViewTitle();
$this->addStandardDefaultViewCommands();
$this->addStandardDefaultViewLists($model, 0, 'ASC');
$currencies = $model->getCurrenciesList(vRequest::getCmd('search', false));
$this->assignRef('currencies', $currencies);
$pagination = $model->getPagination();
$this->assignRef('pagination', $pagination);
}
parent::display($tpl);
}
示例8: display
function display($tpl = null)
{
$document = JFactory::getDocument();
$document->setMimeEncoding('application/json');
if ($virtuemart_media_id = vRequest::getInt('virtuemart_media_id')) {
//JResponse::setHeader( 'Content-Disposition', 'attachment; filename="media'.$virtuemart_media_id.'.json"' );
$model = VmModel::getModel('Media');
$image = $model->createMediaByIds($virtuemart_media_id);
// echo '<pre>'.print_r($image,1).'</pre>';
$this->json = $image[0];
//echo json_encode($this->json);
if (isset($this->json->file_url)) {
$this->json->file_root = JURI::root(true) . '/';
$this->json->msg = 'OK';
echo @json_encode($this->json);
} else {
$this->json->msg = '<b>' . vmText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
echo @json_encode($this->json);
}
} else {
if (!class_exists('VmMediaHandler')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'mediahandler.php';
}
$start = vRequest::getInt('start', 0);
$type = vRequest::getCmd('mediatype', 0);
$list = VmMediaHandler::displayImages($type, $start);
echo @json_encode($list);
}
jExit();
}
示例9: display
function display($tpl = null) {
$db = JFactory::getDBO();
if ( $virtuemart_media_id = vRequest::getInt('virtuemart_media_id') ) {
//$db = JFactory::getDBO();
$query='SELECT `file_url`,`file_title` FROM `#__virtuemart_medias` where `virtuemart_media_id`='.$virtuemart_media_id;
$db->setQuery( $query );
$json = $db->loadObject();
if (isset($json->file_url)) {
$json->file_url = JURI::root().$json->file_url;
$json->msg = 'OK';
echo json_encode($json);
} else {
$json->msg = '<b>'.vmText::_('COM_VIRTUEMART_NO_IMAGE_SET').'</b>';
echo json_encode($json);
}
}
elseif ( $custom_jplugin_id = vRequest::getInt('custom_jplugin_id') ) {
$table = '#__extensions';
$ext_id = 'extension_id';
$q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `' . $ext_id . '` = "'.$custom_jplugin_id.'"';
$db ->setQuery($q);
$this->jCustom = $db ->loadObject();
$customModel = VmModel::getModel('custom');
$this->custom = $customModel -> getCustom();
// Get the payment XML.
$formFile = JPath::clean( VMPATH_ROOT .DS. 'plugins' .DS. 'vmcustom' .DS . $this->jCustom->element . DS . $this->jCustom->element . '.xml');
if (file_exists($formFile)){
VmConfig::loadJLang('plg_vmpsplugin', false);
if (!class_exists('vmPlugin')) require(VMPATH_PLUGINLIBS . DS . 'vmplugin.php');
$filename = 'plg_vmcustom_' . $this->jCustom->element;
vmPlugin::loadJLang($filename,'vmcustom',$this->jCustom->element);
$this->custom = VmModel::getModel('custom')->getCustom();
$varsToPush = vmPlugin::getVarsToPushByXML($formFile,'customForm');
$this->custom->form = JForm::getInstance($this->jCustom->element, $formFile, array(),false, '//vmconfig | //config[not(//vmconfig)]');
$this->custom->params = new stdClass();
foreach($varsToPush as $k => $field){
if(strpos($k,'_')!=0){
$this->custom->params->$k = $field[0];
}
}
$this->custom->form->bind($this->custom->getProperties());
$form = $this->custom->form;
include(VMPATH_ADMIN.DS.'fields'.DS.'formrenderer.php');
echo '<input type="hidden" value="'.$this->jCustom->element.'" name="custom_value">';
} else {
$this->custom->form = null;
VmConfig::$echoDebug = 1;
vmdebug ('File does not exist '.$formFile);
}
}
jExit();
}
示例10: paste
/**
* Paste the table in json format
*
*/
public function paste()
{
// TODO Test user ?
$json = array();
$json['fields'] = 'error';
$json['msg'] = 'Invalid Token';
$json['structure'] = 'empty';
if (!vRequest::vmCheckToken(-1)) {
echo json_encode($json);
jexit();
}
$lang = vRequest::getvar('lg');
$langs = VmConfig::get('active_languages', array());
$language = JFactory::getLanguage();
if (!in_array($lang, $langs)) {
$json['msg'] = 'Invalid language ! ' . $lang;
$json['langs'] = $langs;
echo json_encode($json);
jexit();
}
$lang = strtolower($lang);
// Remove tag if defaut or
// if ($language->getDefault() == $lang ) $dblang ='';
$dblang = strtr($lang, '-', '_');
$id = vRequest::getInt('id', 0);
$viewKey = vRequest::getCmd('editView');
// TODO temp trick for vendor
if ($viewKey == 'vendor') {
$id = 1;
}
$tables = array('category' => 'categories', 'product' => 'products', 'manufacturer' => 'manufacturers', 'manufacturercategories' => 'manufacturercategories', 'vendor' => 'vendors', 'paymentmethod' => 'paymentmethods', 'shipmentmethod' => 'shipmentmethods');
if (!array_key_exists($viewKey, $tables)) {
$json['msg'] = "Invalid view " . $viewKey;
echo json_encode($json);
jExit();
}
$tableName = '#__virtuemart_' . $tables[$viewKey] . '_' . $dblang;
$db = JFactory::getDBO();
$q = 'select * FROM `' . $tableName . '` where `virtuemart_' . $viewKey . '_id` =' . $id;
$db->setQuery($q);
if ($json['fields'] = $db->loadAssoc()) {
$json['structure'] = 'filled';
$json['msg'] = vmText::_('COM_VIRTUEMART_SELECTED_LANG') . ':' . $lang;
} else {
$json['structure'] = 'empty';
$db->setQuery('SHOW COLUMNS FROM ' . $tableName);
$tableDescribe = $db->loadAssocList();
array_shift($tableDescribe);
$fields = array();
foreach ($tableDescribe as $key => $val) {
$fields[$val['Field']] = $val['Field'];
}
$json['fields'] = $fields;
$json['msg'] = vmText::sprintf('COM_VIRTUEMART_LANG_IS_EMPTY', $lang, vmText::_('COM_VIRTUEMART_' . strtoupper($viewKey)));
}
echo json_encode($json);
jExit();
}
示例11: mailAskquestion
/**
* Send the ask question email.
* @author Kohl Patrick, Christopher Roussel
*/
public function mailAskquestion()
{
vRequest::vmCheckToken();
if (!class_exists('shopFunctionsF')) {
require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
}
$model = tmsModel::getModel('vendor');
$mainframe = JFactory::getApplication();
$vars = array();
$min = tsmConfig::get('asks_minimum_comment_length', 50) + 1;
$max = tsmConfig::get('asks_maximum_comment_length', 2000) - 1;
$commentSize = vRequest::getString('comment');
if (function_exists('mb_strlen')) {
$commentSize = mb_strlen($commentSize);
} else {
$commentSize = strlen($commentSize);
}
$validMail = filter_var(vRequest::getVar('email'), FILTER_VALIDATE_EMAIL);
$virtuemart_vendor_id = vRequest::getInt('virtuemart_vendor_id', 1);
if (!class_exists('VirtueMartModelVendor')) {
require VMPATH_ADMIN . DS . 'models' . DS . 'vendor.php';
}
$userId = VirtueMartModelVendor::getUserIdByVendorId($virtuemart_vendor_id);
//$vendorUser = JFactory::getUser($userId);
if ($commentSize < $min || $commentSize > $max || !$validMail) {
$this->setRedirect(JRoute::_('index.php?option=com_virtuemart&view=vendor&task=contact&virtuemart_vendor_id=' . $virtuemart_vendor_id, FALSE), tsmText::_('COM_VIRTUEMART_COMMENT_NOT_VALID_JS'));
return;
}
$user = JFactory::getUser();
$fromMail = vRequest::getVar('email');
//is sanitized then
$fromName = vRequest::getVar('name', '');
//is sanitized then
$fromMail = str_replace(array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromMail);
$fromName = str_replace(array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromName);
if (!empty($user->id)) {
if (empty($fromMail)) {
$fromMail = $user->email;
}
if (empty($fromName)) {
$fromName = $user->name;
}
}
$vars['user'] = array('name' => $fromName, 'email' => $fromMail);
$VendorEmail = $model->getVendorEmail($virtuemart_vendor_id);
$vars['vendor'] = array('vendor_store_name' => $fromName);
if (shopFunctionsF::renderMail('vendor', $VendorEmail, $vars, 'vendor')) {
$string = 'COM_VIRTUEMART_MAIL_SEND_SUCCESSFULLY';
} else {
$string = 'COM_VIRTUEMART_MAIL_NOT_SEND_SUCCESSFULLY';
}
$mainframe->enqueueMessage(tsmText::_($string));
// Display it all
$view = $this->getView('vendor', 'html');
$view->setLayout('mail_confirmed');
$view->display();
}
示例12: languagepack
/**
* @return null
* @throws KlarnaApiException
*/
public function languagepack()
{
$sSubAction = vRequest::getWord('subAction');
if (!isset($this->template['name']) || $this->template['name'] == '') {
$this->template['name'] = "default";
}
if ($sSubAction == "klarna_box") {
$sNewISO = vRequest::getWord('newIso');
$sCountry = vRequest::getWord('country');
$iSum = vRequest::getFloat('sum', 0);
$iInvoiceFee = vRequest::getFloat('fee', 0);
$iFlag = vRequest::getInt('flag');
$sType = vRequest::getWord('type');
$aParams = vRequest::getVar('params');
$aValues = vRequest::getVar('values');
// foreach($aValues as $key => $value) {
// $aValues[$key] = utf8_encode($value);
// }
// foreach($aParams as $key => $value) {
// $aParams[$key] = utf8_decode($value);
// }
if ($sType != "part" && $sType != "invoice" && $sType != "spec") {
throw new KlarnaApiException("Invalid parameters");
}
$this->api->setCountry($sCountry);
if ($sType == 'spec') {
$types = array(KlarnaPClass::SPECIAL);
} else {
$types = array(KlarnaPClass::CAMPAIGN, KlarnaPClass::ACCOUNT, KlarnaPClass::FIXED);
}
$oApi = new KlarnaAPI($sCountry, $sNewISO, $sType, $iSum, $iFlag, $this->api, $types, VMKLARNAPLUGINWEBROOT);
// $oApi->addSetupValue ('web_root', $this->webroot);
// $oApi->setPaths ();
$oApi->addSetupValue('eid', $this->eid);
if ($sType == 'invoice') {
$oApi->setInvoiceFee($iInvoiceFee);
}
$oApi->setCurrency($this->api->getCurrency());
if (count($this->coSetup) > 0) {
$oApi->addMultipleSetupValues($this->coSetup);
}
return $oApi->retrieveLayout($aParams, $aValues);
// if ($sType == 'spec') {
// return $oApi->retrieveHTML($aParams, $aValues, null, $this->template);
// } else {
// return $oApi->retrieveHTML ($aParams, $aValues);
// }
} else {
if ($sSubAction == 'jsLanguagePack') {
$sNewISO = vRequest::getWord('newIso');
$sFetch = "";
} else {
throw new KlarnaApiException("Invalid sub-action");
}
}
}
示例13: removeAddressST
function removeAddressST()
{
$virtuemart_userinfo_id = vRequest::getInt('virtuemart_userinfo_id');
$virtuemart_user_id = vRequest::getInt('virtuemart_user_id');
//Lets do it dirty for now
$userModel = VmModel::getModel('user');
vmdebug('removeAddressST', $virtuemart_user_id, $virtuemart_userinfo_id);
$userModel->setId($virtuemart_user_id[0]);
$userModel->removeAddress($virtuemart_userinfo_id);
$layout = vRequest::getCmd('layout', 'edit');
$this->setRedirect('index.php?option=com_virtuemart&view=user&task=edit&virtuemart_user_id[]=' . $virtuemart_user_id[0]);
}
示例14: display
function display($tpl = null)
{
$document = JFactory::getDocument();
$mainframe = JFactory::getApplication();
$pathway = $mainframe->getPathway();
if (!class_exists('VmImage')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'image.php';
}
$virtuemart_manufacturer_id = vRequest::getInt('virtuemart_manufacturer_id', 0);
$mf_category_id = vRequest::getInt('mf_category_id', 0);
// get necessary models
$model = VmModel::getModel('manufacturer');
if ($virtuemart_manufacturer_id != 0) {
$manufacturer = $model->getManufacturer();
$model->addImages($manufacturer, 1);
$manufacturerImage = $manufacturer->images[0]->displayMediaThumb('class="manufacturer-image"', false);
if (VmConfig::get('enable_content_plugin', 0)) {
if (!class_exists('shopFunctionsF')) {
require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
}
shopFunctionsF::triggerContentPlugin($manufacturer, 'manufacturer', 'mf_desc');
}
$document->setTitle(vmText::_('COM_VIRTUEMART_MANUFACTURER_DETAILS') . ' ' . strip_tags($manufacturer->mf_name));
//added so that the canonical points to page with visible products thx to P2Peter
// remove joomla canonical before adding it
foreach ($document->_links as $k => $array) {
if ($array['relation'] == 'canonical') {
unset($document->_links[$k]);
break;
}
}
$document->addHeadLink(JRoute::_('index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=' . $virtuemart_manufacturer_id, FALSE), 'canonical', 'rel', '');
$this->assignRef('manufacturerImage', $manufacturerImage);
$this->assignRef('manufacturer', $manufacturer);
$pathway->addItem(strip_tags($manufacturer->mf_name));
$this->setLayout('details');
} else {
$document->setTitle(vmText::_('COM_VIRTUEMART_MANUFACTURER_PAGE'));
$manufacturers = $model->getManufacturers(true, true, true);
$model->addImages($manufacturers, 1);
$this->assignRef('manufacturers', $manufacturers);
$this->setLayout('default');
}
parent::display($tpl);
}
示例15: CloneShipment
/**
* Clone a shipment
*
* @author Valérie Isaksen
*/
public function CloneShipment()
{
$mainframe = Jfactory::getApplication();
/* Load the view object */
$view = $this->getView('shipmentmethod', 'html');
$model = VmModel::getModel('shipmentmethod');
$msgtype = '';
$cids = vRequest::getVar($this->_cidName, vRequest::getInt('virtuemart_shipment_id'));
foreach ($cids as $cid) {
if ($model->createClone($cid)) {
$msg = vmText::_('COM_VIRTUEMART_SHIPMENT_CLONED_SUCCESSFULLY');
} else {
$msg = vmText::_('COM_VIRTUEMART_SHIPMENT_NOT_CLONED_SUCCESSFULLY');
$msgtype = 'error';
}
}
$mainframe->redirect('index.php?option=com_virtuemart&view=shipmentmethod', $msg, $msgtype);
}