本文整理汇总了PHP中Jfactory::getApplication方法的典型用法代码示例。如果您正苦于以下问题:PHP Jfactory::getApplication方法的具体用法?PHP Jfactory::getApplication怎么用?PHP Jfactory::getApplication使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Jfactory
的用法示例。
在下文中一共展示了Jfactory::getApplication方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: save
/**
* save the posted form data.
*
*/
function save()
{
$mainframe = Jfactory::getApplication();
$model = $this->getModel('redform');
$result = $model->apisaveform();
$referer = JRequest::getVar('referer');
if (!$result) {
if (!JRequest::getBool('ALREADY_ENTERED')) {
$msg = JText::_('COM_REDFORM_Sorry_there_was_a_problem_with_your_submission') . ': ' . $model->getError();
}
$this->setRedirect($referer, $msg, 'error');
$this->redirect();
}
if ($url = $model->hasActivePayment($result->submit_key)) {
$url = 'index.php?option=com_redform&controller=payment&task=select&key=' . $result->submit_key;
$this->setRedirect($url);
$this->redirect();
}
if ($url = $model->getRedirect()) {
$this->setRedirect($url);
$this->redirect();
} else {
echo $model->getNotificationText();
}
}
示例2: save
function save(&$element, $forceBackend = false)
{
$app = Jfactory::getApplication();
if ($app->isAdmin() || $forceBackend) {
return $this->saveBackend($element);
}
return $this->saveFrontend($element);
}
示例3: makeDefault
function makeDefault()
{
$mainframe = Jfactory::getApplication();
/* Load the view object */
$view = $this->getView('shoppergroup', 'html');
$model = VmModel::getModel('shoppergroup');
$msgtype = '';
$cids = JRequest::getVar('virtuemart_shoppergroup_id', array());
if ($model->makeDefault((int) $cids[0])) {
$msg = JText::_('COM_VIRTUEMART_SET_TO_DEFAULT_SUCCESSFULLY');
} else {
$msg = '';
// $msg = JText::_('COM_VIRTUEMART_SET_TO_DEFAULT_ERROR');
$msgtype = 'error';
}
$mainframe->redirect('index.php?option=com_virtuemart&view=shoppergroup', $msg, $msgtype);
}
示例4: createClone
/**
* Clone a product
*
* @author Max Milbers
*/
public function createClone()
{
$mainframe = Jfactory::getApplication();
/* Load the view object */
$view = $this->getView('custom', 'html');
$model = tmsModel::getModel('custom');
$msgtype = '';
$cids = vRequest::getInt($this->_cidName, vRequest::getInt('tsmart_custom_id'));
foreach ($cids as $custom_id) {
if ($model->createClone($custom_id)) {
$msg = tsmText::_('com_tsmart_CUSTOM_CLONED_SUCCESSFULLY');
} else {
$msg = tsmText::_('com_tsmart_CUSTOM_NOT_CLONED_SUCCESSFULLY') . ' : ' . $custom_id;
$msgtype = 'error';
}
}
$mainframe->redirect('index.php?option=com_tsmart&view=custom', $msg, $msgtype);
}
示例5: 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);
}
示例6: populateState
/**
*/
protected function populateState($ordering = null, $direction = null)
{
// Initiilise variables
$app = Jfactory::getApplication('administrator');
//load the filter state
$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search');
$this->setstate('filter.search', $search);
$accessId = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', null, 'int');
$this->setstate('filter.access', $accessId);
$published = $this->getUserStateFromRequest($this->context . '.filter.state', 'filter_published', '', 'string');
$this->setstate('filter.state', $published);
$categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id', '');
$this->setstate('filter.category_id', $categoryId);
//Load the parameters
$params = JComponentHelper::getParams('com_battle');
$this->setState('params', $params);
//List state information
// parent::populateState ('a.name','asc');
}
示例7: createClone
/**
* Clone a product
*
* @author RolandD, Max Milbers
*/
public function createClone()
{
$mainframe = Jfactory::getApplication();
/* Load the view object */
$view = $this->getView('custom', 'html');
$model = VmModel::getModel('custom');
$msgtype = '';
$cids = JRequest::getVar($this->_cidName, JRequest::getVar('virtuemart_custom_id', array(), '', 'ARRAY'), '', 'ARRAY');
jimport('joomla.utilities.arrayhelper');
JArrayHelper::toInteger($cids);
foreach ($cids as $custom_id) {
if ($model->createClone($custom_id)) {
$msg = JText::_('COM_VIRTUEMART_CUSTOM_CLONED_SUCCESSFULLY');
} else {
$msg = JText::_('COM_VIRTUEMART_CUSTOM_NOT_CLONED_SUCCESSFULLY') . ' : ' . $custom_id;
$msgtype = 'error';
}
}
$mainframe->redirect('index.php?option=com_virtuemart&view=custom', $msg, $msgtype);
}
示例8: ClonePayment
/**
* Clone a payment
*
* @author Valérie Isaksen
*/
public function ClonePayment()
{
$mainframe = Jfactory::getApplication();
/* Load the view object */
$view = $this->getView('paymentmethod', 'html');
$model = tmsModel::getModel('paymentmethod');
$msgtype = '';
$cids = vRequest::getInt($this->_cidName, vRequest::getInt('tsmart_payment_id'));
if (!is_array($cids)) {
$cids = array($cids);
}
foreach ($cids as $cid) {
if ($model->createClone($cid)) {
$msg = tsmText::_('com_tsmart_PAYMENT_CLONED_SUCCESSFULLY');
} else {
$msg = tsmText::_('com_tsmart_PAYMENT_NOT_CLONED_SUCCESSFULLY');
$msgtype = 'error';
}
}
$mainframe->redirect('index.php?option=com_tsmart&view=paymentmethod', $msg, $msgtype);
}
示例9: ClonePayment
/**
* Clone a payment
*
* @author Valérie Isaksen
*/
public function ClonePayment()
{
$mainframe = Jfactory::getApplication();
/* Load the view object */
$view = $this->getView('paymentmethod', 'html');
$model = VmModel::getModel('paymentmethod');
$msgtype = '';
//$cids = vRequest::getInt('virtuemart_product_id',0);
$cids = vRequest::getVar($this->_cidName, vRequest::getVar('virtuemart_payment_id'));
//jimport( 'joomla.utilities.arrayhelper' );
JArrayHelper::toInteger($cids);
foreach ($cids as $cid) {
if ($model->createClone($cid)) {
$msg = vmText::_('COM_VIRTUEMART_PAYMENT_CLONED_SUCCESSFULLY');
} else {
$msg = vmText::_('COM_VIRTUEMART_PAYMENT_NOT_CLONED_SUCCESSFULLY');
$msgtype = 'error';
}
}
$mainframe->redirect('index.php?option=com_virtuemart&view=paymentmethod', $msg, $msgtype);
}
示例10: display
/**
* Creates the output for the registration view
*
* @since 1.5
*/
function display($tpl = null)
{
$mainframe =& Jfactory::getApplication();
$document =& JFactory::getDocument();
$user =& JFactory::getUser();
$dispatcher =& JDispatcher::getInstance();
$config = redEVENTHelper::config();
$acl = UserAcl::getInstance();
$event = $this->get('SessionDetails');
if ($this->getLayout() == 'confirmed') {
$message = $event->confirmation_message;
$document->setTitle($event->title . ' - ' . JText::_('COM_REDEVENT_REGISTRATION_CONFIRMED_PAGE_TITLE'));
} else {
if ($this->getLayout() == 'review') {
$message = $event->review_message;
$document->setTitle($event->title . ' - ' . JText::_('COM_REDEVENT_REGISTRATION_REVIEW_PAGE_TITLE'));
} else {
if ($this->getLayout() == 'edit') {
return $this->_displayEdit($tpl);
} else {
if ($this->getLayout() == 'cancel') {
return $this->_displayCancel($tpl);
} else {
echo 'layout not defined';
return;
}
}
}
}
/* This loads the tags replacer */
JView::loadHelper('tags');
/* Start the tag replacer */
$tags = new redEVENT_tags();
$tags->setXref(JRequest::getInt('xref'));
$message = $tags->ReplaceTags($message);
$this->assignRef('tags', $tags);
$this->assignRef('message', $message);
$this->assignRef('event', $event);
parent::display($tpl);
}
示例11: calculateCostprice
public function calculateCostprice($productId, $data)
{
$this->_revert = true;
//vmdebug('calculationh.php calculateCostprice ',$data);
//vmSetStartTime('calculateCostprice');
if (empty($data['product_currency'])) {
$this->_db->setQuery('SELECT * FROM #__virtuemart_product_prices WHERE `virtuemart_product_id`="' . $productId . '" ');
$row = $this->_db->loadAssoc();
if ($row) {
if (!empty($row['product_price'])) {
// $costPrice = $row['product_price'];
$this->productCurrency = $row['product_currency'];
// $this->override = $row['override'];
// $this->product_override_price = $row['product_override_price'];
$this->product_tax_id = $row['product_tax_id'];
$this->product_discount_id = $row['product_discount_id'];
} else {
$app = Jfactory::getApplication();
$app->enqueueMessage('cost Price empty, if child, everything okey, this is just a dev note');
return false;
}
}
} else {
$this->productCurrency = $data['product_currency'];
$this->product_tax_id = $data['product_tax_id'];
$this->product_discount_id = $data['product_discount_id'];
}
$this->_db->setQuery('SELECT `virtuemart_vendor_id` FROM #__virtuemart_products WHERE `virtuemart_product_id`="' . $productId . '" ');
$single = $this->_db->loadResult();
$this->productVendorId = $single;
if (empty($this->productVendorId)) {
$this->productVendorId = 1;
}
$this->_db->setQuery('SELECT `virtuemart_category_id` FROM #__virtuemart_product_categories WHERE `virtuemart_product_id`="' . $productId . '" ');
$this->_cats = $this->_db->loadResultArray();
// vmTime('getProductPrices no object given query time','getProductCalcs');
if (VmConfig::get('multix', 'none') != 'none' and empty($this->vendorCurrency)) {
$this->_db->setQuery('SELECT `vendor_currency` FROM #__virtuemart_vendors WHERE `virtuemart_vendor_id`="' . $this->productVendorId . '" ');
$single = $this->_db->loadResult();
$this->vendorCurrency = $single;
}
if (!empty($amount)) {
$this->_amount = $amount;
}
//$this->setCountryState($this->_cart);
$this->rules['Marge'] = $this->gatherEffectingRulesForProductPrice('Marge', $this->product_marge_id);
$this->rules['Tax'] = $this->gatherEffectingRulesForProductPrice('Tax', $this->product_tax_id);
$this->rules['VatTax'] = $this->gatherEffectingRulesForProductPrice('VatTax', $this->product_tax_id);
$this->rules['DBTax'] = $this->gatherEffectingRulesForProductPrice('DBTax', $this->product_discount_id);
$this->rules['DATax'] = $this->gatherEffectingRulesForProductPrice('DATax', $this->product_discount_id);
$salesPrice = $data['salesPrice'];
$withoutVatTax = $this->roundInternal($this->executeCalculation($this->rules['VatTax'], $salesPrice));
$withoutVatTax = !empty($withoutVatTax) ? $withoutVatTax : $salesPrice;
vmdebug('calculateCostprice', $salesPrice, $withoutVatTax, $data);
$withDiscount = $this->roundInternal($this->executeCalculation($this->rules['DATax'], $withoutVatTax));
$withDiscount = !empty($withDiscount) ? $withDiscount : $withoutVatTax;
// vmdebug('Entered final price '.$salesPrice.' discount '.$withDiscount);
$withTax = $this->roundInternal($this->executeCalculation($this->rules['Tax'], $withDiscount));
$withTax = !empty($withTax) ? $withTax : $withDiscount;
$basePriceP = $this->roundInternal($this->executeCalculation($this->rules['DBTax'], $withTax));
$basePriceP = !empty($basePriceP) ? $basePriceP : $withTax;
$basePrice = $this->roundInternal($this->executeCalculation($this->rules['Marge'], $basePriceP));
$basePrice = !empty($basePrice) ? $basePrice : $basePriceP;
$productCurrency = CurrencyDisplay::getInstance();
$costprice = $productCurrency->convertCurrencyTo($this->productCurrency, $basePrice, false);
// $productCurrency = CurrencyDisplay::getInstance();
$this->_revert = false;
//vmdebug('calculateCostprice',$salesPrice,$costprice, $data);
return $costprice;
}
示例12: getInstance
public static function getInstance(&$query = null)
{
if (!class_exists('VmConfig')) {
require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
}
VmConfig::loadConfig();
if (isset($query['langswitch'])) {
if ($query['langswitch'] != VMLANG) {
$instanceKey = $query['langswitch'];
}
unset($query['langswitch']);
} else {
$instanceKey = VMLANG;
}
if (!array_key_exists($instanceKey, self::$_instances)) {
self::$_instances[$instanceKey] = new vmrouterHelper($instanceKey, $query);
if (self::$limit === null) {
$mainframe = Jfactory::getApplication();
$view = 'virtuemart';
if (isset($query['view'])) {
$view = $query['view'];
}
self::$limit = $mainframe->getUserStateFromRequest('com_virtuemart.' . $view . '.limit', VmConfig::get('list_limit', 20), 'int');
// self::$limit= $mainframe->getUserStateFromRequest('global.list.limit', 'limit', VmConfig::get('list_limit', 20), 'int');
}
}
return self::$_instances[$instanceKey];
}
示例13: getFilter
/**
* return array of filters for where part of sql query
*
* @return array
*/
function getFilter()
{
if (empty($this->_filter)) {
// Get the paramaters of the active menu item
$mainframe =& Jfactory::getApplication();
$params =& $mainframe->getParams();
$post = JRequest::get('request');
$filter_continent = $this->getState('filter_continent');
$filter_country = $this->getState('filter_country');
$filter_state = $this->getState('filter_state');
$filter_city = $this->getState('filter_city');
$filter_venue = $this->getState('filter_venue');
$filter_date_from = $this->getState('filter_date_from');
$filter_date_to = $this->getState('filter_date_to');
$filter_venuecategory = $this->getState('filter_venuecategory');
$filter_category = $this->getState('filter_category');
$filter_event = $this->getState('filter_event');
$customs = $this->getState('filtercustom');
$filter = $this->getState('filter');
$filter_type = $this->getState('filter_type');
$where = array();
if ($filter) {
// clean filter variables
$filter = JString::strtolower($filter);
$filter = $this->_db->Quote('%' . $this->_db->getEscaped($filter, true) . '%', false);
$filter_type = JString::strtolower($filter_type);
switch ($filter_type) {
case 'title':
$where[] = ' LOWER( a.title ) LIKE ' . $filter;
break;
case 'venue':
$where[] = ' LOWER( l.venue ) LIKE ' . $filter;
break;
case 'city':
$where[] = ' LOWER( l.city ) LIKE ' . $filter;
break;
}
}
// filter date
if (strtotime($filter_date_from)) {
$date = $this->_db->Quote(strftime('%F', strtotime($filter_date_from)));
$where[] = " CASE WHEN (x.enddates) THEN {$date} <= x.enddates ELSE {$date} <= x.dates END ";
}
if (strtotime($filter_date_to)) {
$date = $this->_db->Quote(strftime('%F', strtotime($filter_date_to)));
$where[] = " {$date} >= x.dates ";
}
if ($filter_venue) {
$where[] = ' l.id = ' . $this->_db->Quote($filter_venue);
} else {
if (!is_null($filter_city) && $filter_city != "0") {
$where[] = ' l.city = ' . $this->_db->Quote($filter_city);
} else {
if (!is_null($filter_state) && $filter_state != "0") {
$where[] = ' l.state = ' . $this->_db->Quote($filter_state);
} else {
if (!is_null($filter_country) && $filter_country != "0") {
$where[] = ' l.country = ' . $this->_db->Quote($filter_country);
} else {
if (!is_null($filter_continent) && $filter_continent != "0") {
$where[] = ' c.continent = ' . $this->_db->Quote($filter_continent);
}
}
}
}
}
// filter category
if ($filter_category) {
$category = $this->getCategory((int) $filter_category);
if ($category) {
$where[] = '(c.id = ' . $this->_db->Quote($category->id) . ' OR (c.lft > ' . $this->_db->Quote($category->lft) . ' AND c.rgt < ' . $this->_db->Quote($category->rgt) . '))';
}
}
// filter venue category
if ($filter_venuecategory) {
$category = $this->getVenueCategory((int) $filter_venuecategory);
if ($category) {
$where[] = '(vc.id = ' . $this->_db->Quote($category->id) . ' OR (vc.lft > ' . $this->_db->Quote($category->lft) . ' AND vc.rgt < ' . $this->_db->Quote($category->rgt) . '))';
}
}
if ($filter_event) {
$where[] = ' a.id = ' . $this->_db->Quote($filter_event);
}
//custom fields
foreach ((array) $customs as $key => $custom) {
if ($custom != '') {
if (is_array($custom)) {
$custom = implode("/n", $custom);
}
$where[] = ' custom' . $key . ' LIKE ' . $this->_db->Quote('%' . $custom . '%');
}
}
$this->_filter = $where;
}
return $this->_filter;
//.........这里部分代码省略.........
示例14: display
//.........这里部分代码省略.........
$conversion .= 'd = elems[' . $yP . '] + "-" + elems[' . $mP . '] + "-" + elems[' . $dP . '];
';
}
$js = 'function ' . $this->prefix . $field->field_namekey . $this->suffix . '_checkDate(nohide)
{
var selObj = document.getElementById(\'' . $this->prefix . $field->field_namekey . $this->suffix . '\');
if( typeof(' . $this->prefix . $field->field_namekey . $this->suffix . '_preCheckDate) == "function" ) {
try {
if(!' . $this->prefix . $field->field_namekey . $this->suffix . '_preCheckDate(selObj))
return false;
} catch(ex) {}
}
if(selObj.value==\'\'){
return true;
}
var d = selObj.value;' . $conversion . '
var timestamp=Date.parse(d);
var today=new Date();
today.setHours(0);today.setMinutes(0);today.setSeconds(0);today.setMilliseconds(0);
if(isNaN(timestamp)!=false){
selObj.value=\'\';
alert(\'' . JText::_('INCORRECT_DATE_FORMAT', true) . '\');
return false;
}
var selectedDate = new Date(timestamp);
selectedDate.setHours(0);selectedDate.setMinutes(0);selectedDate.setSeconds(0);selectedDate.setMilliseconds(0);
' . $processing . '
if(' . $check . '){
selObj.value=\'\';
alert(\'' . $message . '\');
}else{
if(!nohide) this.hide();
}
if( typeof(' . $this->prefix . $field->field_namekey . $this->suffix . '_postCheckDate) == "function" ) {
try{ ' . $this->prefix . $field->field_namekey . $this->suffix . '_postCheckDate(selObj, selectedDate); } catch(ex){}
}
}';
if (HIKASHOP_PHP5) {
$document = JFactory::getDocument();
} else {
$document =& JFactory::getDocument();
}
$document->addScriptDeclaration($js);
$size .= ' onChange="' . $this->prefix . $field->field_namekey . $this->suffix . '_checkDate(1);"';
}
if (HIKASHOP_J25 && !empty($value) && $field->field_options['format'] != "%Y-%m-%d") {
$seps = preg_replace('#[a-z0-9%]#iU', '', $field->field_options['format']);
$seps = str_replace(array('.', '-'), array('\\.', '\\-'), $seps);
$mConv = false;
$yP = -1;
$mP = -1;
$dP = -1;
$i = 0;
foreach (preg_split('#[' . $seps . ']#', $field->field_options['format']) as $d) {
switch ($d) {
case '%y':
case '%Y':
if ($yP < 0) {
$yP = $i;
}
break;
case '%b':
case '%B':
$mConv = true;
case '%m':
if ($mP < 0) {
$mP = $i;
}
break;
case '%d':
case '%e':
if ($dP < 0) {
$dP = $i;
}
break;
}
$i++;
}
$elems = preg_split('#[' . $seps . ']#', $value);
$value = @$elems[$yP] . '-' . @$elems[$mP] . '-' . @$elems[$dP];
$app = Jfactory::getApplication();
if ($app->isAdmin()) {
$app->enqueueMessage('Since Joomla 2.5.24 it is not possible anymore to change the format of dates. If you need a different format, please use the advanced datepicker type of custom field.');
}
$format = "%Y-%m-%d";
$field->field_options['format'] = $format;
}
if (HIKASHOP_J25 && !empty($value)) {
try {
JHTML::_('date', $value, null, null);
} catch (Exception $e) {
$value = '';
}
}
JPluginHelper::importPlugin('hikashop');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onFieldDateDisplay', array($field->field_namekey, $field, &$value, &$map, &$format, &$size));
return JHTML::_('calendar', $value, $map, $this->prefix . $field->field_namekey . $this->suffix, $format, $size);
}
示例15: getFormFields
/**
* Returns html code for the specified form fields
* To modify previously posted data, the reference field must contain either:
* - submit_key as a string
* - an array of submitters ids
*
* @param int $form_id form id
* @param mixed $reference submit_key or array of submitters ids
* @param int $multi number of instance of the form to display
* @param array $options array of possible options: eventdetails, booking, extrafields
*
* @return string
*/
function getFormFields($form_id, $reference = null, $multi = 1, $options = array())
{
$uri = JURI::getInstance();
$user = JFactory::getUser();
$document =& JFactory::getDocument();
$app =& Jfactory::getApplication();
// was this form already submitted before (and there was an error for example, or editing)
$answers = $this->getAnswers($reference);
if ($answers && $reference) {
$submit_key = $answers[0]->submit_key;
} else {
$submit_key = null;
}
$model_redform = new RedformModelRedform();
$model_redform->setFormId($form_id);
$form = $model_redform->getForm();
$fields = $model_redform->getFormFields();
// css
$document->addStyleSheet(JURI::base() . 'components/com_redform/assets/css/tooltip.css');
$document->addStyleSheet(JURI::base() . 'components/com_redform/assets/css/redform.css');
// load jquery for the form javascript
if (JRequest::getVar('format', 'html') == 'html') {
JHTML::_('behavior.tooltip');
jimport('joomla.html.html');
}
// custom tooltip
$toolTipArray = array('className' => 'redformtip' . $form->classname);
JHTML::_('behavior.tooltip', '.hasTipField', $toolTipArray);
// currency for javascript
$js = "var currency = \"" . $form->currency . "\";\n";
$document->addScriptDeclaration($js);
self::JsCheck();
if ($form->show_js_price) {
self::jsPrice();
}
// redmember integration: pull extra fields
if ($user->get('id') && file_exists(JPATH_ROOT . DS . 'components' . DS . 'com_redmember')) {
$this->getRedmemberfields($user);
}
/* Stuff to find and replace */
$find = array(' ', '_', '-', '.', '/', '&', ';', ':', '?', '!', ',');
$replace = '';
$html = '<div id="redform' . $form->classname . '" class="redform-form">';
if ($form->showname) {
$html .= '<div id="formname">' . $form->formname . '</div>';
}
// for virtuemart
if (JRequest::getInt('productid', false)) {
$productinfo = $this->getProductinfo();
if (!stristr('http', $productinfo->product_full_image)) {
$productimage = $uri->root() . '/components/com_virtuemart/shop_image/product/' . $productinfo->product_full_image;
} else {
$productimage = $productinfo->product_full_image;
}
$html .= '<div id="productimage">' . JHTML::_('image', $productimage, $productinfo->product_name) . '</div>';
$html .= '<div id="productname">' . $productinfo->product_name . '</div>';
}
if ($multi > 1 && $user->id == 0) {
$html .= '<div id="needlogin">' . JText::_('COM_REDFORM_LOGIN_BEFORE_MULTI_SIGNUP') . '</div>';
$multi = 1;
}
// limit to max 30 sumbissions at the same time...
if ($multi > 30) {
$multi = 30;
}
if ($multi > 1) {
if (empty($answers)) {
// link to add signups
$html .= '<div id="signupuser"><a href="javascript: AddUser();">' . JText::_('COM_REDFORM_SIGN_UP_USER') . '</a></div>';
}
// signups display controls
$html .= '<div id="signedusers" style="float: right">';
$html .= '<div><a href="javascript: ShowAllUsers(true);" >' . JText::_('COM_REDFORM_SHOW_ALL_USERS') . '</a></div>' . '<div><a href="javascript: ShowAllUsers(false);" >' . JText::_('COM_REDFORM_HIDE_ALL_USERS') . '</a></div>' . '<ul>' . JText::_('COM_REDFORM_Signed_up') . ':';
$html .= '<li><a href="javascript: ShowSingleForm(\'div#formfield1\');"># 1</a></li>';
if ($answers) {
for ($k = 2; $k < count($answers) + 1; $k++) {
$html .= '<li><a href="javascript: ShowSingleForm(\'div#formfield' . $k . '\');"># ' . $k . '</a></li>';
}
}
$html .= '</ul>';
$html .= '</div>';
}
if ($answers) {
// set multi to number of answers...
$multi = count($answers);
}
/* Loop through here for as many forms there are */
//.........这里部分代码省略.........