?> </td> </tr> <tr> <td width="23%"><strong><div align="right"><?php echo $VM_LANG->_('PHPSHOP_SHOPPER_GROUP_FORM_DISCOUNT') . ": "; ?> </div></strong> </td> <td width="77%" > <input type="text" class="inputbox" name="shopper_group_discount" size="18" value="<?php $db->sp('shopper_group_discount'); ?> " /> <?php echo vmToolTip($VM_LANG->_('PHPSHOP_SHOPPER_GROUP_FORM_DISCOUNT_TIP')); ?> </td> </tr> <tr> <td width="23%" valign="top"><strong><div align="right"> <?php echo $VM_LANG->_('PHPSHOP_SHOPPER_GROUP_FORM_DESC'); ?> :</div></strong> </td> <td width="77%" valign="top" > <?php editorArea('editor1', $db->f('shopper_group_desc'), 'shopper_group_desc', 500, 250, 75, 25); ?> </td>
<td> <?php ps_html::dropdown_display('display_style[6]', $currency_display['negative'], $currency_style_negative); echo vmToolTip($VM_LANG->_('PHPSHOP_CURRENCY_NEGATIVE_DISPLAY_TOOLTIP')); ?> </td> </tr> <tr> <td class="labelcell"><?php echo $VM_LANG->_('VM_STORE_FORM_ACCEPTED_CURRENCIES'); ?> :</td> <td><?php $currencies = $db->f('vendor_accepted_currencies') ? $db->f('vendor_accepted_currencies') : $vendor_currency; echo $ps_html->getCurrencyList('vendor_accepted_currencies[]', explode(',', $currencies), 'currency_code', '', 10, 'multiple="multiple"'); echo ' ' . vmToolTip($VM_LANG->_('VM_STORE_FORM_ACCEPTED_CURRENCIES_TIP')); ?> </td> </tr> </table> </fieldset> </td> </tr> </table><br /> <fieldset> <legend><?php echo $VM_LANG->_('PHPSHOP_STORE_FORM_DESCRIPTION'); ?> </legend> <?php editorArea('editor1', $db->f("vendor_store_desc"), 'vendor_store_desc', '400', '200', '70', '15');
$info = pathinfo($fullimg); if (is_file($fullimg)) { $tmp_cell .= $VM_LANG->_('PHPSHOP_FILES_LIST_FULL_IMG') . ": "; $tmp_cell .= '<a onclick="document.getElementById(\'file_form_iframe\').src=\'' . $db->f("file_url") . '\';" href="#file_form" title="Click me!">[ ' . $VM_LANG->_('PHPSHOP_VIEW') . ' ]</a>'; } $tmp_cell .= '<br />'; if ($db->f('product_thumb_image')) { $thumb = IMAGEPATH . 'product/' . $db->f('product_thumb_image'); $thumburl = IMAGEURL . 'product/' . $db->f('product_thumb_image'); } else { $thumb = $info["dirname"] . "/resized/" . basename($filename, "." . $info["extension"]) . "_" . $db->f("file_image_thumb_height") . "x" . $db->f("file_image_thumb_width") . "." . $info["extension"]; $thumburl = str_replace($mosConfig_absolute_path, $mosConfig_live_site, $thumb); } if (is_file($thumb)) { $tmp_cell .= $VM_LANG->_('PHPSHOP_FILES_LIST_THUMBNAIL_IMG') . ": "; $tmp_cell .= vmToolTip(' <img src="' . $thumburl . '" alt="thumbnail" />', $VM_LANG->_('PHPSHOP_FILES_LIST_THUMBNAIL_IMG'), '', '', '[ ' . $VM_LANG->_('PHPSHOP_VIEW') . ' ]'); } if (!$db->f("file_name")) { $tmp_cell = " <a target=\"_blank\" href=\"" . $db->f("file_url") . "\">[ " . $VM_LANG->_('PHPSHOP_VIEW') . " ]</a><br/>"; } } $listObj->addCell($tmp_cell); $listObj->addCell($db->f("file_title")); $listObj->addCell($db->f("file_extension")); if ($db->f('file_id') == 'product_images') { if ($db->f("file_published") == "0") { $tmp_cell = '<img src="' . $mosConfig_live_site . '/administrator/images/publish_x.png" border="0" alt="' . $VM_LANG->_('CMN_PUBLISH') . '" />'; } else { $tmp_cell = '<img src="' . $mosConfig_live_site . '/administrator/images/tick.png" border="0" alt="' . $VM_LANG->_('CMN_UNPUBLISH') . '" />'; } $listObj->addCell($tmp_cell);
<label for="conf_VM_FEED_LIMITTEXT"><?php echo $VM_LANG->_('VM_ADMIN_CFG_FEED_LIMITTEXT'); ?> </label><br /> <br /> <input type="text" size="10" value="<?php echo defined('VM_FEED_MAX_TEXT_LENGTH') ? VM_FEED_MAX_TEXT_LENGTH : 500; ?> " name="conf_VM_FEED_MAX_TEXT_LENGTH" id="conf_VM_FEED_MAX_TEXT_LENGTH" /> <label for="conf_VM_FEED_MAX_TEXT_LENGTH"><?php echo $VM_LANG->_('VM_ADMIN_CFG_FEED_MAX_TEXT_LENGTH'); ?> </label> </td> <td width="30%"><?php echo vmToolTip($VM_LANG->_('VM_ADMIN_CFG_MAX_TEXT_LENGTH_TIP')); ?> </td> </tr> </table> <?php $tabs->endTab(); $tabs->endPane(); // Add necessary hidden fields $formObj->hiddenField('myname', 'Jabba Binks'); // Write your form with mixed tags and text fields // and finally close the form: $formObj->finishForm('writeConfig', 'store.index', $option); ?> <br style="clear:both;" />
/** * Show all configuration parameters for this payment method * @returns boolean False when the Payment method has no configration */ function show_configuration() { global $VM_LANG; $db = new ps_DB(); /** Read current Configuration ***/ include_once CLASSPATH . "payment/" . __CLASS__ . ".cfg.php"; ?> <table class="adminform"> <tr class="row0"> <td><strong>Account/Händler ID</strong></td> <td> <input name="IPAYMENT_ACCOUNTID" class="inputbox" type="text" value="<?php echo IPAYMENT_ACCOUNTID; ?> " /> </td> <td> <?php echo vmToolTip('Ihre allgemeine Händler-ID (die Sie auch zum Login in den Administratorbereich bei iPayment verwenden)'); ?> </td> </tr> <tr class="row1"> <td><strong>Anwendungs-ID/ User-ID </strong></td> <td> <input type="text" name="IPAYMENT_APPID" class="inputbox" value="<?php echo IPAYMENT_APPID; ?> " /> </td> <td> </td> </tr> <tr class="row0"> <td><strong>Anwendungs-Passwort/ Transaktionsuser-Passwort</strong></td> <td> <input type="text" name="IPAYMENT_APP_PASSWORD" class="inputbox" value="<?php echo IPAYMENT_APP_PASSWORD; ?> " /> </td> <td> </td> </tr> <tr class="row1"> <td><strong>Aktions-Passwort</strong></td> <td> <input type="text" name="IPAYMENT_ACTION_PASSWORD" class="inputbox" value="<?php echo IPAYMENT_ACTION_PASSWORD; ?> " /> </td> <td> </td> </tr> <tr class="row0"> <td><strong>Transaktions-Security-Key</strong></td> <td> <input type="text" name="IPAYMENT_SECRET" class="inputbox" value="<?php echo IPAYMENT_SECRET; ?> " /> </td> <td> </td> </tr> <tr class="row1"> <td><strong><?php echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYPAL_STATUS_SUCCESS'); ?> </strong></td> <td> <select name="IPAYMENT_VERIFIED_STATUS" class="inputbox" > <?php $q = "SELECT order_status_name,order_status_code FROM #__{vm}_order_status ORDER BY list_order"; $db->query($q); $order_status_code = array(); $order_status_name = array(); while ($db->next_record()) { $order_status_code[] = $db->f("order_status_code"); $order_status_name[] = $db->f("order_status_name"); } for ($i = 0; $i < sizeof($order_status_code); $i++) { echo "<option value=\"" . $order_status_code[$i]; if (IPAYMENT_VERIFIED_STATUS == $order_status_code[$i]) { echo "\" selected=\"selected\">"; } else { echo "\">"; } echo $order_status_name[$i] . "</option>\n"; } ?> </select> </td> <td><?php echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYPAYL_STATUS_SUCCESS_EXPLAIN'); ?> </td> </tr> <tr class="row0"> <td><strong><?php echo $VM_LANG->_('VM_ADMIN_CFG_PAYPAL_STATUS_PENDING'); ?> </strong></td> <td> <select name="IPAYMENT_PENDING_STATUS" class="inputbox" > <?php for ($i = 0; $i < sizeof($order_status_code); $i++) { echo "<option value=\"" . $order_status_code[$i]; if (IPAYMENT_PENDING_STATUS == $order_status_code[$i]) { echo "\" selected=\"selected\">"; } else { echo "\">"; } echo $order_status_name[$i] . "</option>\n"; } ?> </select> </td> <td><?php echo $VM_LANG->_('VM_ADMIN_CFG_PAYPAL_STATUS_PENDING_EXPLAIN'); ?> </td> </tr> <tr class="row1"> <td><strong><?php echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYPAL_STATUS_FAILED'); ?> </strong></td> <td> <select name="IPAYMENT_INVALID_STATUS" class="inputbox" > <?php for ($i = 0; $i < sizeof($order_status_code); $i++) { echo "<option value=\"" . $order_status_code[$i]; if (IPAYMENT_INVALID_STATUS == $order_status_code[$i]) { echo "\" selected=\"selected\">"; } else { echo "\">"; } echo $order_status_name[$i] . "</option>\n"; } ?> </select> </td> <td><?php echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PAYPAL_STATUS_FAILED_EXPLAIN'); ?> </td> </tr> </table> <?php }
?> : <select class="inputbox" id="category_id" name="category_id" onchange="window.location='<?php echo $_SERVER['PHP_SELF']; ?> ?option=com_virtuemart&page=product.product_list&category_id='+document.getElementById('category_id').options[selectedIndex].value;"> <option value=""><?php echo $VM_LANG->_('SEL_CATEGORY'); ?> </option> <?php $ps_product_category->list_tree($category_id); ?> </select> <?php echo vmToolTip($VM_LANG->_('VM_PRODUCT_LIST_REORDER_TIP')); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array('#' => '', "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "", $VM_LANG->_('PHPSHOP_PRODUCT_LIST_NAME') => "width=\"30%\"", $VM_LANG->_('VM_PRODUCT_LIST_MEDIA') => 'width="5%"', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_SKU') => "width=\"15%\"", $VM_LANG->_('PHPSHOP_PRODUCT_PRICE_TITLE') => "width=\"10%\"", $VM_LANG->_('PHPSHOP_CATEGORY') => "width=\"15%\""); // Only show reordering fields when a category ID is selected AND a parent id is NOT selected! if ($category_id && !$product_parent_id) { $columns[$VM_LANG->_('VM_FIELDMANAGER_REORDER')] = "width=\"5%\""; $columns[vmCommonHTML::getSaveOrderButton($num_rows, 'changeordering')] = 'width="8%"'; $columns[$VM_LANG->_('PHPSHOP_MANUFACTURER_MOD')] = "width=\"10%\""; } else { $columns[$VM_LANG->_('PHPSHOP_MANUFACTURER_MOD')] = "width=\"10%\""; } $columns[$VM_LANG->_('PHPSHOP_REVIEWS')] = "width=\"10%\""; $columns[$VM_LANG->_('PHPSHOP_PRODUCT_LIST_PUBLISH')] = ""; $columns[$VM_LANG->_('PHPSHOP_PRODUCT_CLONE')] = "";
function mm_showMyFileName($filename) { if (vmShouldDebug()) { /*@MWM1: Logging/Debugging Enhancements */ echo vmToolTip('<div class=\'inputbox\'>Begin of File: ' . wordwrap($filename, 70, '<br />', true) . '</div>'); } }
} if (!$empty_cart) { if ($amount > 1) { $total_products = $amount . " " . $VM_LANG->_('PHPSHOP_PRODUCTS_LBL'); } else { $total_products = $amount . " " . $VM_LANG->_('PHPSHOP_PRODUCT_LBL'); } $total_price = $CURRENCY_DISPLAY->getFullValue($total); } // Display clear cart $delete_cart = ''; if (@$_SESSION['vmEnableEmptyCart'] && !@$_SESSION['vmMiniCart']) { // Output the empty cart button //echo vmCommonHTML::scriptTag( $mosConfig_live_site.'/components/'.$option.'/js/wz_tooltip.js' ); $delete_cart = "<a href=\"" . $_SERVER['SCRIPT_NAME'] . "?page=shop.cart_reset&option=com_virtuemart&option2={$option}&product_id={$prodid}&category_id={$catid}&return={$page}&flypage={$flypage}&Itemid={$Itemid}\" title=\"" . $VM_LANG->_('PHPSHOP_EMPTY_YOUR_CART') . " \">\r\n\t\t\t\t\t<img src=\"" . $mosConfig_live_site . "/images/cancel_f2.png\" width=\"12\" border=\"0\" style=\"float: right;vertical-align: middle;\" alt=\"" . $VM_LANG->_('PHPSHOP_EMPTY_YOUR_CART') . " \" />\r\n </a>"; $html1 = vmToolTip($VM_LANG->_('VM_EMPTY_YOUR_CART_TIP'), $VM_LANG->_('PHPSHOP_EMPTY_YOUR_CART'), '', '', $delete_cart, true); $delete_cart = $html1; } $href = $sess->url($mm_action_url . "index.php?page=shop.cart"); $href2 = $sess->url($mm_action_url . "index2.php?page=shop.cart", true); $text = $VM_LANG->_('PHPSHOP_CART_SHOW'); if (@$_SESSION['vmUseGreyBox']) { $show_cart = vmCommonHTML::getGreyboxPopUpLink($href2, $text, '', $text, '', 500, 600, $href); } else { $show_cart = vmCommonHTML::hyperlink($href, $text, '', $text, ''); } $tpl->set('minicart', $minicart); $tpl->set('empty_cart', $empty_cart); $tpl->set('delete_cart', $delete_cart); $tpl->set('vmMinicart', @$_SESSION['vmMiniCart']); $tpl->set('total_products', @$total_products);
/** * Returns html code for show parameters * @author Zdenek Dvorak * * @param int $product_id * @return string */ function list_product_type($product_id) { global $VM_LANG; if (!$this->product_in_product_type($product_id)) { return ""; } $dbag = new ps_DB(); $dba = new ps_DB(); $dbp = new ps_DB(); $html = ""; $q = "SELECT * FROM #__{vm}_product_product_type_xref "; $q .= "LEFT JOIN #__{vm}_product_type USING (product_type_id) "; $q .= "WHERE product_id='{$product_id}' AND product_type_publish='Y' "; $q .= "ORDER BY product_type_list_order"; $dbag->query($q); $q = "SELECT * FROM #__{vm}_product_type_parameter "; $q .= "WHERE product_type_id="; while ($dbag->next_record()) { // Show all Product Type if ($dbag->f("product_type_flypage")) { $flypage_file = PAGEPATH . "templates/" . $dbag->f("product_type_flypage") . ".php"; if (file_exists($flypage_file)) { $html .= (include $flypage_file); continue; } } $html .= "<br />\n<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n"; $html .= "<tr><td colspan=\"2\"><strong>" . $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_PARAMETERS_IN_CATEGORY') . ": " . $dbag->f("product_type_name") . "</strong></td></tr>\n"; // SELECT parameter value of product $q2 = "SELECT * FROM #__{vm}_product_type_" . $dbag->f("product_type_id"); $q2 .= " WHERE product_id='{$product_id}'"; $dbp->query($q2); // SELECT parameter of Product Type $dba->query($q . $dbag->f("product_type_id") . " ORDER BY parameter_list_order"); $i = 0; while ($dba->next_record()) { if ($i++ % 2) { $bgcolor = 'row0'; } else { $bgcolor = 'row1'; } $html .= "<tr class=\"{$bgcolor}\" height=\"18\">\n"; $html .= "<td width=\"30%\">" . $dba->f("parameter_label"); $parameter_description = $dba->f("parameter_description"); if (!empty($parameter_description)) { $html .= " "; $html .= vmToolTip($parameter_description, $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_PARAMETER_FORM_DESCRIPTION')); } $html .= "</td>\n<td>"; $html .= $dbp->f($dba->f("parameter_name")) . " " . $dba->f("parameter_unit") . "</td></tr>\n"; } $html .= "</table>\n"; } return $html; }
if (!empty($_SESSION['ccdata']['order_payment_number'])) { echo $_SESSION['ccdata']['order_payment_number']; } ?> " autocomplete="off" /> </td> </tr> <?php if ($require_cvv_code == "YES") { $_SESSION['ccdata']['need_card_code'] = 1; ?> <tr valign="top"> <td nowrap width="10%" align="right"> <label for="credit_card_code"> <?php echo vmToolTip($VM_LANG->_('PHPSHOP_CUSTOMER_CVV2_TOOLTIP'), '', '', '', $VM_LANG->_('PHPSHOP_CUSTOMER_CVV2_TOOLTIP_TITLE')); ?> : </label> </td> <td> <input type="text" class="inputbox" id="credit_card_code" name="credit_card_code" value="<?php if (!empty($_SESSION['ccdata']['credit_card_code'])) { echo $_SESSION['ccdata']['credit_card_code']; } ?> " autocomplete="off" /> </td> </tr> <?php
/** * This allows us to print the user fields on * the various sections of the shop * * @param array $rowFields An array returned from ps_database::loadObjectlist * @param array $skipFields A one-dimensional array holding the names of fields that should NOT be displayed * @param ps_DB $db A ps_DB object holding ovalues for the fields * @param boolean $startform If true, print the starting <form...> tag */ function listUserFields($rowFields, $skipFields = array(), $db = null, $startForm = true) { global $mm_action_url, $ps_html, $VM_LANG, $my, $default, $mainframe, $vm_mainframe, $vendor_country_3_code, $mosConfig_live_site, $mosConfig_absolute_path, $page; $dbf = new ps_DB(); if ($db === null) { $db = new ps_DB(); } $default['country'] = $vendor_country_3_code; $missing = vmGet($_REQUEST, 'missing', ''); // collect all required fields $required_fields = array(); foreach ($rowFields as $field) { if ($field->required == 1) { $required_fields[$field->name] = $field->type; } $allfields[$field->name] = $field->name; } foreach ($skipFields as $skip) { unset($required_fields[$skip]); } // Form validation function if (!vmIsAdminMode()) { ps_userfield::printJS_formvalidation($required_fields, $rowFields); } else { echo vmCommonHTML::scriptTag('', 'function submitregistration() { return true }'); } if (file_exists($mosConfig_absolute_path . '/includes/js/mambojavascript.js')) { $vm_mainframe->addScript('includes/js/mambojavascript.js'); } if ($startForm) { echo '<form action="' . $mm_action_url . basename($_SERVER['PHP_SELF']) . '" method="post" name="adminForm">'; } echo ' <div style="width:90%;">'; if (!empty($required_fields)) { echo '<div style="padding:5px;text-align:center;"><strong>(* = ' . $VM_LANG->_('CMN_REQUIRED') . ')</strong></div>'; } $delimiter = 0; foreach ($rowFields as $field) { if (!isset($default[$field->name])) { $default[$field->name] = $field->default; } $readonly = $field->readonly ? ' readonly="readonly"' : ''; if (in_array($field->name, $skipFields)) { continue; } // Title handling. $key = $field->title; if ($key[0] == '_') { $key = substr($key, 1, strlen($key) - 1); } if ($VM_LANG->exists($key)) { $field->title = $VM_LANG->_($key); } if ($field->name == 'agreed') { $field->title = '<script type="text/javascript">//<![CDATA[ document.write(\'<label for="agreed_field">' . str_replace("'", "\\'", $VM_LANG->_('PHPSHOP_I_AGREE_TO_TOS')) . '</label><a href="javascript:void window.open(\\\'' . $mosConfig_live_site . '/index2.php?option=com_virtuemart&page=shop.tos&pop=1\\\', \\\'win2\\\', \\\'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no\\\');">\'); document.write(\' (' . $VM_LANG->_('PHPSHOP_STORE_FORM_TOS') . ')</a>\'); //]]></script> <noscript> <label for="agreed_field">' . $VM_LANG->_('PHPSHOP_I_AGREE_TO_TOS') . '</label> <a target="_blank" href="' . $mosConfig_live_site . '/index.php?option=com_virtuemart&page=shop.tos" title="' . $VM_LANG->_('PHPSHOP_I_AGREE_TO_TOS') . '"> (' . $VM_LANG->_('PHPSHOP_STORE_FORM_TOS') . ') </a></noscript>'; } if ($field->name == 'username' && VM_REGISTRATION_TYPE == 'OPTIONAL_REGISTRATION') { echo '<div class="formLabel"> <input type="checkbox" id="register_account" name="register_account" value="1" class="inputbox" onchange="showFields( this.checked, new Array(\'username\', \'password\', \'password2\') );if( this.checked ) { document.adminForm.remember.value=\'yes\'; } else { document.adminForm.remember.value=\'yes\'; }" checked="checked" /> </div> <div class="formField"> <label for="register_account">' . $VM_LANG->_('VM_REGISTER_ACCOUNT') . '</label> </div> '; } elseif ($field->name == 'username') { echo '<input type="hidden" id="register_account" name="register_account" value="1" />'; } // a delimiter marks the beginning of a new fieldset and // the end of a previous fieldset if ($field->type == 'delimiter') { if ($delimiter > 0) { echo "</fieldset>\n"; } if (VM_REGISTRATION_TYPE == 'SILENT_REGISTRATION' && $field->title == $VM_LANG->_('PHPSHOP_ORDER_PRINT_CUST_INFO_LBL') && $page == 'checkout.index') { continue; } echo '<fieldset> <legend class="sectiontableheader">' . $field->title . '</legend> '; $delimiter++; continue; } echo '<div id="' . $field->name . '_div" class="formLabel '; if (stristr($missing, $field->name)) { echo 'missing'; } echo '">'; echo '<label for="' . $field->name . '_field">' . $field->title . '</label>'; if (isset($required_fields[$field->name])) { echo '<strong>* </strong>'; } echo ' </div> <div class="formField" id="' . $field->name . '_input">' . "\n"; /** * This is the most important part of this file * Here we print the field & its contents! */ switch ($field->name) { case 'title': $ps_html->list_user_title($db->sf('title'), "id=\"title_field\""); break; case 'country': if (in_array('state', $allfields)) { $onchange = "onchange=\"changeStateList();\""; } else { $onchange = ""; } $ps_html->list_country("country", $db->sf('country'), "id=\"country_field\" {$onchange}"); break; case 'state': echo $ps_html->dynamic_state_lists("country", "state", $db->sf('country'), $db->sf('state')); echo "<noscript>\n"; $ps_html->list_states("state", $db->sf('state'), "", "id=\"state_field\""); echo "</noscript>\n"; break; case 'agreed': echo '<input type="checkbox" id="agreed_field" name="agreed" value="1" class="inputbox" />'; break; case 'password': case 'password2': echo '<input type="password" id="' . $field->name . '_field" name="' . $field->name . '" size="30" class="inputbox" />' . "\n"; break; default: switch ($field->type) { case 'date': echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/calendar/calendar.js'); if (vmIsJoomla('1.5', '>=')) { // in Joomla 1.5, the name of calendar lang file is changed... echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/calendar/lang/calendar-en-GB.js'); } else { echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/calendar/lang/calendar-en.js'); } echo vmCommonHTML::linkTag($mosConfig_live_site . '/includes/js/calendar/calendar-mos.css'); $maxlength = $field->maxlength ? 'maxlength="' . $field->maxlength . '"' : ''; echo '<input type="text" id="' . $field->name . '_field" name="' . $field->name . '" size="' . $field->size . '" value="' . ($db->sf($field->name) ? $db->sf($field->name) : '') . '" class="inputbox" ' . $maxlength . $readonly . ' />' . "\n"; echo '<input name="reset" type="reset" class="button" onclick="return showCalendar(\'' . $field->name . '_field\', \'y-mm-dd\');" value="..." />'; break; case 'text': case 'emailaddress': case 'webaddress': case 'euvatid': $maxlength = $field->maxlength ? 'maxlength="' . $field->maxlength . '"' : ''; echo '<input type="text" id="' . $field->name . '_field" name="' . $field->name . '" size="' . $field->size . '" value="' . ($db->sf($field->name) ? $db->sf($field->name) : '') . '" class="inputbox" ' . $maxlength . $readonly . ' />' . "\n"; break; case 'textarea': echo '<textarea name="' . $field->name . '" id="' . $field->name . '_field" cols="' . $field->cols . '" rows="' . $field->rows . '" ' . $readonly . '>' . $db->sf($field->name) . '</textarea>'; break; case 'editorta': editorArea($field->name, $db->sf($field->name), $field->name, '300', '150', $field->cols, $field->rows); break; case 'checkbox': echo '<input type="checkbox" name="' . $field->name . '" id="' . $field->name . '_field" value="1" ' . ($db->sf($field->name) ? 'checked="checked"' : '') . '/>'; break; case 'age_verification': $year = vmRequest::getInt('birthday_selector_year', date('Y')); if ($db->f($field->name)) { $birthday = $db->f($field->name); $date_array = explode('-', $birthday); $year = $date_array[0]; $month = $date_array[1]; $day = $date_array[2]; } ps_html::list_days('birthday_selector_day', vmRequest::getInt('birthday_selector_day', @$day)); ps_html::list_month('birthday_selector_month', vmRequest::getInt('birthday_selector_month', @$month)); ps_html::list_year('birthday_selector_year', $year, $year - 100, $year); break; case 'captcha': if (file_exists($mosConfig_absolute_path . '/administrator/components/com_securityimages/client.php')) { include $mosConfig_absolute_path . '/administrator/components/com_securityimages/client.php'; // Note that this package name must be used on the validation side too! If both are not equal, validation will fail $packageName = 'securityVMRegistrationCheck'; echo insertSecurityImage($packageName); echo getSecurityImageText($packageName); } else { if (file_exists($mosConfig_absolute_path . '/plugins/system/securityimages.php')) { echo "<script type=\"text/javascript\" src=\"" . JURI::root() . "/components/com_securityimages/js/securityImages.js\"></script>"; echo "<img id='captchaSecurityImages' name='captchaSecurityImages' src=\"" . JURI::root() . "/index.php?option=com_securityimages&task=displayCaptcha\" />"; echo "<a href=\"javascript:askNewSecurityImages('captchaSecurityImages');\">"; echo "<img src=\"" . JURI::root() . "/components/com_securityimages/buttons/reload.gif\" id=\"securityImagesContactCaptchaReload\" name=\"securityImagesContactCaptchaReload\" border=\"0\">"; echo "</a>"; echo "<input type=\"text\" name=\"securityVMRegistrationCheck_try\" />"; } } break; // Begin of a fallthrough // Begin of a fallthrough case 'multicheckbox': case 'select': case 'multiselect': case 'radio': $k = $db->f($field->name); $dbf->setQuery("SELECT fieldtitle,fieldvalue FROM #__{vm}_userfield_values" . "\n WHERE fieldid = " . $field->fieldid . "\n ORDER BY ordering"); $Values = $dbf->loadObjectList(); $multi = ""; $rowFieldValues['lst_' . $field->name] = ''; if ($field->type == 'multiselect') { $multi = "multiple='multiple'"; } if (count($Values) > 0) { if ($field->type == 'radio') { $rowFieldValues['lst_' . $field->name] = vmCommonHTML::radioListTable($Values, $field->name, 'class="inputbox" size="1" ', 'fieldvalue', 'fieldtitle', $k, $field->cols, $field->rows, $field->size, $field->required); } else { $ks = explode("|*|", $k); $k = array(); foreach ($ks as $kv) { $k[]->fieldvalue = $kv; } if ($field->type == 'multicheckbox') { $rowFieldValues['lst_' . $field->name] = vmCommonHTML::checkboxListTable($Values, $field->name . "[]", 'class="inputbox" size="' . $field->size . '" ' . $multi, 'fieldvalue', 'fieldtitle', $k, $field->cols, $field->rows, $field->size, $field->required); } else { $rowFieldValues['lst_' . $field->name] = vmCommonHTML::selectList($Values, $field->name . "[]", 'class="inputbox" size="' . $field->size . '" ' . $multi, 'fieldvalue', 'fieldtitle', $k); } } } // no break! still a fallthrough echo $rowFieldValues['lst_' . $field->name]; break; } break; } if ($field->description != '') { echo vmToolTip($field->description); } echo '<br /></div> <br style="clear:both;" />'; } if ($delimiter > 0) { echo "</fieldset>\n"; } echo '</div>'; if (VM_REGISTRATION_TYPE == 'OPTIONAL_REGISTRATION') { echo '<script type="text/javascript"> function showFields( show, fields ) { if( fields ) { for (i=0; i<fields.length;i++) { if( show ) { document.getElementById( fields[i] + \'_div\' ).style.display = \'\'; document.getElementById( fields[i] + \'_input\' ).style.display = \'\'; } else { document.getElementById( fields[i] + \'_div\' ).style.display = \'none\'; document.getElementById( fields[i] + \'_input\' ).style.display = \'none\'; } } } } try { showFields( document.getElementById( \'register_account\').checked, new Array(\'username\', \'password\', \'password2\') ); } catch(e){} </script>'; } }
/** * Returns html code for show parameters * @author Zdenek Dvorak * * @param int $product_id * @return string */ function list_product_type($product_id) { global $VM_LANG; $tpl = vmTemplate::getInstance(); if (!$this->product_in_product_type($product_id)) { return ""; } // $dbag = product_types; $dbag = new ps_DB(); // $dba = Attributes of product_type param, holds product_id and values assign to each param; $dba = new ps_DB(); // $dbp = Parameters of product_type, holds definitions of each parameter, but not value ; $dbp = new ps_DB(); $html = ""; $q = "SELECT * FROM #__{vm}_product_product_type_xref "; $q .= "LEFT JOIN #__{vm}_product_type USING (product_type_id) "; $q .= "WHERE product_id='{$product_id}' AND product_type_publish='Y' "; $q .= "ORDER BY product_type_list_order"; $dbag->query($q); $q = "SELECT * FROM #__{vm}_product_type_parameter "; $q .= "WHERE product_type_id="; $pt = 0; //product_type counter; while ($dbag->next_record()) { // Show all Product Type if ($dbag->f("product_type_flypage")) { $flypage_file = VM_THEMEPATH . "templates/" . $dbag->f("product_type_flypage") . ".php"; if (file_exists($flypage_file)) { $html .= (include $flypage_file); continue; } } $product_types[$pt]["product_type_name"] = $dbag->f("product_type_name"); // SELECT parameter value of product $q2 = "SELECT * FROM #__{vm}_product_type_" . $dbag->f("product_type_id"); $q2 .= " WHERE product_id='{$product_id}'"; $dbp->query($q2); // SELECT parameter of Product Type $dba->query($q . $dbag->f("product_type_id") . " ORDER BY parameter_list_order"); $i = 0; // parameter counter; while ($dba->next_record()) { $product_type_param[$i]["parameter_label"] = $dba->f("parameter_label"); $parameter_description = $dba->f("parameter_description"); $product_type_param[$i]["parameter_description"] = $parameter_description; if (!empty($parameter_description)) { $product_type_param[$i]["tooltip"] = vmToolTip($parameter_description, $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_PARAMETER_FORM_DESCRIPTION')); } $product_type_param[$i]["parameter_value"] = $dbp->f($dba->f("parameter_name")); $product_type_param[$i]["parameter_unit"] = $dba->f("parameter_unit"); $i++; } $product_types[$pt]["product_type_count_params"] = $i; $product_types[$pt]["parameters"] = $product_type_param; $pt++; } $tpl->set('product_types', $product_types); $html .= $tpl->fetch('common/product_type.tpl.php'); return $html; }
>00- Symb</option> <option value="14"<?php if ($currency_display['negative'] == '14') { echo ' selected=\\"selected\\" '; } ?> >(Symb 00)</option> <option value="15"<?php if ($currency_display['negative'] == '15') { echo ' selected=\\"selected\\" '; } ?> >(00 Symb)</option> </select> <?php echo vmToolTip($VM_LANG->_('PHPSHOP_CURRENCY_NEGATIVE_DISPLAY_TOOLTIP')); ?> </td> </tr> </table> <?php $tabs->endTab(); $tabs->startTab($VM_LANG->_('PHPSHOP_STORE_FORM_LBL'), "store-page"); ?> <table class="adminform"> <tr> <td align="right"><?php echo $VM_LANG->_('PHPSHOP_VENDOR_FORM_ADDRESS_1'); ?> :</td> <td>
// echo "\">\n"; // $get_item_value = $dbp->sf($dbpt->f("parameter_name")); // foreach($fields as $field) { // echo "<option value=\"$field\"".(($get_item_value==$field) ? " selected>" : ">"). $field."</option>\n"; // } // } // echo "</select>"; break; default: // Default type Short Text echo " <input type=\"text\" class=\"inputbox\" name=\"product_type_" . $product_type_id . "_" . $dbpt->f("parameter_name") . "\" value=\"" . $dbp->f($dbpt->f("parameter_name")) . "\" size=\"20\" />"; } } if ($dbpt->f("parameter_description")) { echo " "; echo vmToolTip($dbpt->f("parameter_description")); } echo " " . $dbpt->f("parameter_unit"); if ($dbpt->f("parameter_default")) { echo " (" . $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_PARAMETER_FORM_DEFAULT') . ": "; echo $dbpt->f("parameter_default") . ")"; } echo " [ " . $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_PARAMETER_FORM_TYPE') . ": "; switch ($dbpt->f("parameter_type")) { case "I": echo $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_PARAMETER_FORM_TYPE_INTEGER'); break; // Integer // Integer case "T": echo $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_PARAMETER_FORM_TYPE_TEXT');
/** * Function to calculate the price, apply discounts from the discount table * and reformat the price * * @param int $product_id * @param boolean $hide_tax Wether to show the text "(including X.X% tax)" or not * @return string The formatted price */ function show_price($product_id, $hide_tax = false) { global $VM_LANG, $CURRENCY_DISPLAY, $vendor_mail; $auth = $_SESSION['auth']; $tpl = new $GLOBALS['VM_THEMECLASS'](); $product_name = htmlentities($this->get_field($product_id, 'product_name'), ENT_QUOTES); $tpl->set('product_id', $product_id); $tpl->set('product_name', $product_name); $tpl->set('vendor_mail', $vendor_mail); $discount_info = $base_price = array(); $text_including_tax = ''; if ($auth['show_prices']) { // Get the DISCOUNT AMOUNT $discount_info = $this->get_discount($product_id); if (!$discount_info["is_percent"] && $discount_info["amount"] != 0) { $discount_info["amount"] = $GLOBALS['CURRENCY']->convert($discount_info["amount"]); } // Get the Price according to the quantity in the Cart $price_info = $this->get_price($product_id); $tpl->set('price_info', $price_info); // Get the Base Price of the Product $base_price_info = $this->get_price($product_id, true); $tpl->set('base_price_info', $base_price_info); if ($price_info === false) { $price_info = $base_price_info; } $html = ""; $undiscounted_price = 0; if (isset($price_info["product_price_id"])) { if ($base_price_info["product_price"] == $price_info["product_price"]) { $price = $base_price = $GLOBALS['CURRENCY']->convert($base_price_info["product_price"], $price_info['product_currency']); } else { $base_price = $GLOBALS['CURRENCY']->convert($base_price_info["product_price"], $price_info['product_currency']); $price = $GLOBALS['CURRENCY']->convert($price_info["product_price"], $price_info['product_currency']); } if ($auth["show_price_including_tax"] == 1) { $my_taxrate = $this->get_product_taxrate($product_id); $base_price += $my_taxrate * $base_price; } else { $my_taxrate = 0; } // Calculate discount if (!empty($discount_info["amount"])) { $undiscounted_price = $base_price; switch ($discount_info["is_percent"]) { case 0: // If we subtract discounts BEFORE tax if (PAYMENT_DISCOUNT_BEFORE == '1') { // and if our prices are shown with tax if ($auth["show_price_including_tax"] == 1) { // then we add tax to the (untaxed) discount $discount_info['amount'] += $my_taxrate * $discount_info['amount']; } // but if our prices are shown without tax // we just leave the (untaxed) discount amount as it is } // But, if we subtract discounts AFTER tax // and if our prices are shown with tax // we just leave the (untaxed) discount amount as it is // but if prices are shown without tax // we just leave the (untaxed) discount amount as it is // even though this is not really a good combination of settings $base_price -= $discount_info["amount"]; break; case 1: $base_price *= (100 - $discount_info["amount"]) / 100; break; } } $text_including_tax = ""; if (!empty($my_taxrate)) { $tax = $my_taxrate * 100; // only show "including x % tax" when it shall // not be hidden if (!$hide_tax && $auth["show_price_including_tax"] == 1 && VM_PRICE_SHOW_INCLUDINGTAX) { $text_including_tax = $VM_LANG->_('PHPSHOP_INCLUDING_TAX'); eval("\$text_including_tax = \"{$text_including_tax}\";"); } } // Check if we need to display a Table with all Quantity <=> Price Relationships if ($base_price_info["product_has_multiple_prices"] && !$hide_tax) { $db = new ps_DB(); // Quantity Discount Table $q = "SELECT product_price, product_currency, price_quantity_start, price_quantity_end \n\t\t\t\t\t\t\tFROM #__{vm}_product_price\n\t\t\t\t \t\t\tWHERE product_id='{$product_id}' \n\t\t\t\t \t\t\tAND shopper_group_id='" . $auth["shopper_group_id"] . "' \n\t\t\t\t \t\t\tORDER BY price_quantity_start"; $db->query($q); // $prices_table = "<table align=\"right\"> $prices_table = "<table width=\"100%\">\n\t\t\t\t\t <thead><tr class=\"sectiontableheader\">\n\t\t\t\t\t <th>" . $VM_LANG->_('PHPSHOP_CART_QUANTITY') . "</th>\n\t\t\t\t\t <th>" . $VM_LANG->_('PHPSHOP_CART_PRICE') . "</th>\n\t\t\t\t\t </tr></thead>\n\t\t\t\t\t <tbody>"; $i = 1; if ($db->num_rows() == 0) { // get the vendor ID $q = "SELECT vendor_id FROM #__{vm}_product WHERE product_id='{$product_id}'"; $db->setQuery($q); $db->query(); $db->next_record(); $vendor_id = $db->f("vendor_id"); // get the default shopper group ID $q = "SELECT shopper_group_id FROM #__{vm}_shopper_group WHERE `vendor_id`='{$vendor_id}' AND `default`='1'"; $db->setQuery($q); $db->query(); $db->next_record(); $default_shopper_group_id = $db->f("shopper_group_id"); // get the current shopper group discount $q = "SELECT * FROM #__{vm}_shopper_group WHERE shopper_group_id=" . $auth["shopper_group_id"]; $db->setQuery($q); $db->query(); $db->next_record(); $shopper_group_discount = $db->f("shopper_group_discount"); // check for prices in default shopper group $q = "SELECT product_price, price_quantity_start, price_quantity_end, product_currency FROM #__{vm}_product_price\n\t\t\t\t\t\t\tWHERE product_id='{$product_id}' AND shopper_group_id='" . $default_shopper_group_id . "' ORDER BY price_quantity_start"; $db->query($q); while ($db->next_record()) { $prices_table .= "<tr class=\"sectiontableentry{$i}\"><td>" . $db->f("price_quantity_start") . " - " . $db->f("price_quantity_end") . "</td>"; $prices_table .= "<td>"; if (!empty($my_taxrate)) { $prices_table .= $CURRENCY_DISPLAY->getFullValue(($my_taxrate + 1) * $db->f("product_price") * ((100 - $shopper_group_discount) / 100)); } else { $prices_table .= $CURRENCY_DISPLAY->getFullValue($db->f("product_price") * ((100 - $shopper_group_discount) / 100)); } $prices_table .= "</td></tr>"; $i == 1 ? $i++ : $i--; } } else { // get the current shopper group discount $dbsg = new ps_DB(); $q = "SELECT * FROM #__{vm}_shopper_group WHERE shopper_group_id=" . $auth["shopper_group_id"]; $dbsg->setQuery($q); $dbsg->query(); $dbsg->next_record(); $shopper_group_discount = $dbsg->f("shopper_group_discount"); while ($db->next_record()) { $price = $GLOBALS['CURRENCY']->convert($db->f("product_price"), $db->f("product_currency")); $prices_table .= "<tr class=\"sectiontableentry{$i}\"><td>" . $db->f("price_quantity_start") . " - " . $db->f("price_quantity_end") . "</td>"; $prices_table .= "<td>"; if (!empty($my_taxrate)) { $prices_table .= $CURRENCY_DISPLAY->getFullValue(($my_taxrate + 1) * $price * ((100 - $shopper_group_discount) / 100)); } else { $prices_table .= $CURRENCY_DISPLAY->getFullValue($price * ((100 - $shopper_group_discount) / 100)); } $prices_table .= "</td></tr>"; $i == 1 ? $i++ : $i--; } } $prices_table .= "</tbody></table>"; if (@$_REQUEST['page'] != "shop.product_details") { $html .= vmToolTip($prices_table); } else { $html .= $prices_table; } } } } $tpl->set('discount_info', $discount_info); $tpl->set('text_including_tax', $text_including_tax); $tpl->set('undiscounted_price', @$undiscounted_price); $tpl->set('base_price', $base_price); $tpl->set('price_table', $html); $tpl->set('parent_has_children', $this->parent_has_children($product_id)); return $tpl->fetch('common/price.tpl.php'); }
/** * Show all configuration parameters for this Shipping method * @returns boolean False when the Shipping method has no configration */ function show_configuration() { global $VM_LANG; /** Read current Configuration ***/ require_once CLASSPATH . "shipping/" . __CLASS__ . ".cfg.php"; ?> <table> <tr> <td><strong>Order total value 1:</strong></td> <td> <input type="text" name="BASE_SHIP1" class="inputbox" value="<?php echo BASE_SHIP1; ?> " /> </td> <td><strong>Shipping charge 1:</strong></td> <td> <input type="text" name="BASE_CHARGE1" class="inputbox" value="<?php echo BASE_CHARGE1; ?> " /> </td> <td> <?php echo vmToolTip("Shipping charge 1 will apply to order values less than Order total value 1."); ?> </td> </tr> <tr> <td><strong>Order total value 2:</strong></td> <td> <input type="text" name="BASE_SHIP2" class="inputbox" value="<?php echo BASE_SHIP2; ?> " /> </td> <td><strong>Shipping charge 2:</strong></td> <td> <input type="text" name="BASE_CHARGE2" class="inputbox" value="<?php echo BASE_CHARGE2; ?> " /> </td> <td> <?php echo vmToolTip("Shipping charge 2 will apply to order values less than Order total value 2."); ?> </td> </tr> <tr> <td><strong>Order total value 3:</strong></td> <td> <input type="text" name="BASE_SHIP3" class="inputbox" value="<?php echo BASE_SHIP3; ?> " /> </td> <td><strong>Shipping charge 3:</strong></td> <td> <input type="text" name="BASE_CHARGE3" class="inputbox" value="<?php echo BASE_CHARGE3; ?> " /> </td> <td> <?php echo vmToolTip("Shipping charge 3 will apply to order values less than Order total value 3."); ?> </td> </tr> <tr> <td><strong>Order total value 4:</strong></td> <td> <input type="text" name="BASE_SHIP4" class="inputbox" value="<?php echo BASE_SHIP4; ?> " /> </td> <td><strong>Shipping charge 4:</strong></td> <td> <input type="text" name="BASE_CHARGE4" class="inputbox" value="<?php echo BASE_CHARGE4; ?> " /> </td> <td> <?php echo vmToolTip("Shipping charge 4 will apply to order values less than Order total value 4."); ?> </td> </tr> <tr> <td><strong>Order total value 5:</strong></td> <td> <input type="text" name="BASE_SHIP5" class="inputbox" value="<?php echo BASE_SHIP5; ?> " /> </td> <td><strong>Shipping charge 5:</strong></td> <td> <input type="text" name="BASE_CHARGE5" class="inputbox" value="<?php echo BASE_CHARGE5; ?> " /> </td> <td> <?php echo vmToolTip("Shipping charge 5 will apply to order values less than Order total value 5."); ?> </td> </tr> <tr> <td><strong>Order total value 6:</strong></td> <td> <input type="text" name="BASE_SHIP6" class="inputbox" value="<?php echo BASE_SHIP6; ?> " /> </td> <td><strong>Shipping charge 6:</strong></td> <td> <input type="text" name="BASE_CHARGE6" class="inputbox" value="<?php echo BASE_CHARGE6; ?> " /> </td> <td> <?php echo vmToolTip("Shipping charge 6 will apply to order values less than Order total value 6."); ?> </td> </tr> <tr> <td><strong>Order total value 7:</strong></td> <td> <input type="text" name="BASE_SHIP7" class="inputbox" value="<?php echo BASE_SHIP7; ?> " /> </td> <td><strong>Shipping charge 7:</strong></td> <td> <input type="text" name="BASE_CHARGE7" class="inputbox" value="<?php echo BASE_CHARGE7; ?> " /> </td> <td> <?php echo vmToolTip("Shipping charge 7 will apply to order values less than Order total value 7."); ?> </td> </tr> <tr> <td><strong>Order total value 8:</strong></td> <td> <input type="text" name="BASE_SHIP8" class="inputbox" value="<?php echo BASE_SHIP8; ?> " /> </td> <td><strong>Shipping charge 8:</strong></td> <td> <input type="text" name="BASE_CHARGE8" class="inputbox" value="<?php echo BASE_CHARGE8; ?> " /> </td> <td> <?php echo vmToolTip("Shipping charge 8 will apply to order values less than Order total value 8."); ?> </td> </tr> <tr> <td><strong>Order total value 9:</strong></td> <td> <input type="text" name="BASE_SHIP9" class="inputbox" value="<?php echo BASE_SHIP9; ?> " /> </td> <td><strong>Shipping charge 9:</strong></td> <td> <input type="text" name="BASE_CHARGE9" class="inputbox" value="<?php echo BASE_CHARGE9; ?> " /> </td> <td> <?php echo vmToolTip("Shipping charge 9 will apply to order values less than Order total value 9."); ?> </td> </tr> <tr> <td><strong>Order total value 10:</strong></td> <td> <input type="text" name="BASE_SHIP10" class="inputbox" value="<?php echo BASE_SHIP10; ?> " /> </td> <td><strong>Shipping charge 10:</strong></td> <td> <input type="text" name="BASE_CHARGE10" class="inputbox" value="<?php echo BASE_CHARGE10; ?> " /> </td> <td> <?php echo vmToolTip("Shipping charge 10 will apply to order values less than Order total value 10."); ?> </td> </tr> <tr> <td><strong><?php echo $VM_LANG->_('PHPSHOP_UPS_TAX_CLASS'); ?> </strong></td> <td> <?php require_once CLASSPATH . 'ps_tax.php'; ps_tax::list_tax_value("SHIPVALUE_TAX_CLASS", SHIPVALUE_TAX_CLASS); ?> </td> <td colspan="3"><?php echo vmToolTip("Use the following tax class on the shipping charge. The shipping charge values above will then be inclusive of this tax rate."); ?> <td> </tr> </table> <?php // return false if there's no configuration return true; }
<td width="24%" align="right"><?php echo $VM_LANG->_('VM_USERGROUP_NAME'); ?> :</td> <td width="76%"> <input type="text" class="inputbox" name="group_name" value="<?php $db->sp("group_name"); ?> " /> </td> </tr> <tr> <td width="24%" align="right"><?php echo $VM_LANG->_('VM_USERGROUP_LEVEL'); ?> :</td> <td width="76%"> <input type="text" class="inputbox" name="group_level" value="<?php $db->sp("group_level"); ?> " /> <?php echo vmToolTip($VM_LANG->_('VM_USERGROUP_LEVEL_TIP')); ?> </td> </tr> </table> <?php // Write common hidden input fields // and close the form $formObj->finishForm($funcname, 'admin.usergroup_list', $option);
/** * @param object A param tag node * @param string The control name * @return array Any array of the label, the form element and the tooltip */ function renderParam(&$param, $control_name = 'params') { $result = array(); $name = $param->getAttribute('name'); $label = $param->getAttribute('label'); $value = $this->get($name, $param->getAttribute('default')); $description = $param->getAttribute('description'); $result[0] = $label ? $label : $name; if ($result[0] == '@spacer') { $result[0] = ' '; } else { $result[0] = vmToolTip(addslashes($description), addslashes($result[0]), '', '', $result[0], '#', 0); } $type = $param->getAttribute('type'); if (in_array('_form_' . $type, $this->_methods)) { $result[1] = call_user_func(array(&$this, '_form_' . $type), $name, $value, $param, $control_name); } else { $result[1] = _HANDLER . ' = ' . $type; } if ($description) { $result[2] = vmToolTip($description, $result[0]); $result[2] = ''; } else { $result[2] = ''; } return $result; }