<tr> <td class="labelcell"><?php echo $VM_LANG->_('VM_SELECT_THEME'); ?> </td> <td> <?php echo ps_html::list_themes('conf_THEME', basename(VM_THEMEURL)); if ($vmLayout == 'standard') { $link = $sess->url($_SERVER['PHP_SELF'] . '?page=admin.theme_config_form&theme=' . basename(VM_THEMEURL)); $text = $VM_LANG->_('PHPSHOP_CONFIG'); echo vmCommonHTML::hyperlink($link, $VM_LANG->_('PHPSHOP_CONFIG')); } else { $link = $sess->url($_SERVER['PHP_SELF'] . '?page=admin.theme_config_form&theme=' . basename(VM_THEMEURL) . '&no_menu=1'); $text = $VM_LANG->_('PHPSHOP_CONFIG'); echo vmCommonHTML::hyperLink($link, $text, '', 'Edit: ' . $text, 'onclick="parent.addSimplePanel( \'' . $db->getEscaped($text) . '\', \'' . $link . '\' );return false;"'); } ?> </td> <td><?php echo vmToolTip($VM_LANG->_('VM_SELECT_THEME_TIP')); ?> </td> </tr> <tr> <td class="labelcell"><?php echo $VM_LANG->_('PHPSHOP_ADMIN_CFG_PRODUCTS_PER_ROW'); ?> </td> <td>
$db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_ORDER_STATUS_LIST_MNU'), "", $modulename, "order_status_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_ORDER_STATUS_LIST_NAME') => '', $VM_LANG->_('PHPSHOP_ORDER_STATUS_LIST_CODE') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("order_status_id"), false, "order_status_id")); $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page={$modulename}.order_status_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&order_status_id=" . $db->f("order_status_id")) . "\">" . $db->f("order_status_name") . "</a>"; $listObj->addCell($tmp_cell); $listObj->addCell($db->f("order_status_code")); $listObj->addCell($ps_html->deleteButton("order_status_id", $db->f("order_status_id"), "OrderStatusDelete", $keyword, $limitstart)); $i++; } $listObj->writeTable(); $listObj->endTable(); $listObj->writeFooter($keyword);
$db->sp("function_description"); ?> </textarea> </td> </tr> </table> <?php // Add necessary hidden fields $formObj->hiddenField('function_id', $function_id); $formObj->hiddenField('module_id', $module_id); $funcname = !empty($function_id) ? "functionUpdate" : "functionAdd"; // Write your form with mixed tags and text fields // and finally close the form: $formObj->finishForm($funcname, 'admin.function_list', $option); $script = 'function updateFunc(){ var el = $("function_class" ); new Ajax( "' . $_SERVER['PHP_SELF'] . '?" + $(document.adminForm).toQueryString() + "&func=&page=admin.ajax_tools&task=get_class_methods&class=" + el.options[el.selectedIndex].value + "&function=" + document.adminForm.function_method.value, { method: "get", update: $("function_method_container") }).request(); return false; } $("function_class").onchange = function() { updateFunc() }; updateFunc(); '; echo vmCommonHTML::scriptTag('', $script);
// these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_NAME') => 'width="25%"', $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_DESCRIPTION') => 'width="30%"', $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_PARAMETERS') => 'width="15%"', $VM_LANG->_('PHPSHOP_PRODUCTS_LBL') => 'width="15%"', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_PUBLISH') => 'width="5%"', $VM_LANG->_('PHPSHOP_MODULE_LIST_ORDER') => 'width="5%"', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $i = 0; while ($db->next_record()) { $product_count = $ps_product_type->product_count($db->f("product_type_id")); $parameter_count = $ps_product_type->parameter_count($db->f("product_type_id")); $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("product_type_id"), false, "product_type_id")); $tmp_cell = "<a href=\"" . $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_type_form&product_type_id=" . $db->f("product_type_id") . "\">" . $db->f("product_type_name") . "</a>"; $listObj->addCell($tmp_cell); $listObj->addCell($db->f("product_type_description")); $tmp_cell = $parameter_count . " " . $VM_LANG->_('PHPSHOP_PARAMETERS_LBL') . " <a href=\"" . $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_type_parameter_list&product_type_id=" . $db->f("product_type_id") . "\">[ " . $VM_LANG->_('PHPSHOP_SHOW') . " ]</a>"; $listObj->addCell($tmp_cell); $tmp_cell = $product_count . " " . $VM_LANG->_('PHPSHOP_PRODUCTS_LBL') . " <a href=\"" . $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_list&product_type_id=" . $db->f("product_type_id") . "\">[ " . $VM_LANG->_('PHPSHOP_SHOW') . " ]</a>"; $listObj->addCell($tmp_cell); //$listObj->addCell( $db->f("list_order")); $listObj->addCell(vmCommonHTML::getYesNoIcon($db->f("product_type_publish"))); // echo "<a href=\"javascript: void(0);\" onClick=\"return listItemTask('cb$i','orderdown')\">"; // echo "Down</a>"; $tmp_cell = "<div align=\"center\">" . $pageNav->orderUpIcon($i, $i > 0, "orderup", $VM_LANG->_('CMN_ORDER_UP'), $page, "ProductTypeReorder") . "\n " . $pageNav->orderDownIcon($i, $db->num_rows(), $i - 1 <= $db->num_rows(), "orderdown", $VM_LANG->_('CMN_ORDER_DOWN'), $page, "ProductTypeReorder") . "</div>"; $listObj->addCell($tmp_cell); $listObj->addCell($ps_html->deleteButton("product_type_id", $db->f("product_type_id"), "ProductTypeDelete", $keyword, $limitstart)); $i++; } $listObj->writeTable(); $listObj->endTable(); $listObj->writeFooter($keyword);
$text = $VM_LANG->_('VM_LEGALINFO_SHORTTEXT'); } else { $text = VM_ONCHECKOUT_LEGALINFO_SHORTTEXT; } ?> <div class="legalinfo"><?php echo sprintf( $text, $link, $jslink ); ?> </div><br /> <?php } ?> <div> <input type="submit" onclick="return( submit_order( this.form ) );" class="button" name="formSubmit" value="<?php echo $VM_LANG->_('PHPSHOP_ORDER_CONFIRM_MNU') ?>" /> </div> <?php if( PSHOP_AGREE_TO_TOS_ONORDER == '1' ) { echo vmCommonHTML::scriptTag('', "function submit_order( form ) { if (!form.agreed.checked) { alert( \"". $VM_LANG->_('PHPSHOP_AGREE_TO_TOS',false) ."\" ); return false; } else { return true; } }" ); } else { echo vmCommonHTML::scriptTag('', "function submit_order( form ) { return true; }" ); } ?>
<?php } ?> <?php include PAGEPATH . 'checkout_register_form.php'; ?> <?php if ($show_login) { ?> </div> <br /> <?php echo vmCommonHTML::scriptTag('', 'Window.onDomReady(function() { // get accordion elements myStretch = $$( \'.toggler\' ); myStretcher = $$( \'.stretcher\' ); // Create the accordion myAccordion = new Fx.Accordion(myStretch, myStretcher, { /*fixedHeight: 125,*/ opacity : true, display: ' . $open_to_stretcher . ' }); });'); }
/** * Returns the img tag for the given product image * * @param string $image The name of the imahe OR the full URL to the image * @param string $args Additional attributes for the img tag * @param int $resize * (1 = resize the image by using height and width attributes, * 0 = do not resize the image) * @param string $path_appendix The path to be appended to IMAGEURL / IMAGEPATH * @return The HTML code of the img tag */ function image_tag($image, $args = "", $resize = 1, $path_appendix = 'product', $thumb_width = 0, $thumb_height = 0) { global $mosConfig_live_site, $mosConfig_absolute_path; require_once CLASSPATH . 'imageTools.class.php'; $border = ""; if (strpos($args, "border=") === false) { $border = 'border="0"'; } $height = $width = 0; if ($image != "") { // URL if (substr($image, 0, 4) == "http") { $url = $image; } else { if (PSHOP_IMG_RESIZE_ENABLE == '1' && $resize == 1) { $url = $mosConfig_live_site . "/components/com_virtuemart/show_image_in_imgtag.php?filename=" . urlencode($image) . "&newxsize=" . PSHOP_IMG_WIDTH . "&newysize=" . PSHOP_IMG_HEIGHT . "&fileout="; if (!strpos($args, "height=")) { $arr = @getimagesize(vmImageTools::getresizedfilename($image, $path_appendix, '', $thumb_height, $thumb_width)); $width = $arr[0]; $height = $arr[1]; } } else { $url = IMAGEURL . $path_appendix . '/' . $image; $using_resized_image = false; if ($resize) { $image = vmImageTools::getresizedfilename($image, $path_appendix, '', $thumb_height, $thumb_width); if (file_exists($image)) { $using_resized_image = true; } } if ($resize && !$using_resized_image) { if ($height < $width) { $width = @round($width / ($height / PSHOP_IMG_HEIGHT)); $height = PSHOP_IMG_HEIGHT; } else { $height = @round($height / ($width / PSHOP_IMG_WIDTH)); $width = PSHOP_IMG_WIDTH; } } if (file_exists($image)) { $url = str_replace($mosConfig_absolute_path, $mosConfig_live_site, $image); } elseif (file_exists($mosConfig_absolute_path . '/' . $image)) { $url = $mosConfig_live_site . '/' . $image; } $url = str_replace('//', '/', $url); $url = str_replace(':/', '://', $url); if (!strpos($args, "height=")) { $f = str_replace(IMAGEURL, IMAGEPATH, $url); if (file_exists($f)) { $arr = getimagesize($f); $width = $arr[0]; $height = $arr[1]; } else { $width = 100; $height = 100; } } } $url = str_replace(basename($url), $GLOBALS['VM_LANG']->convert(basename($url)), $url); } } else { $url = VM_THEMEURL . 'images/' . NO_IMAGE; } return vmCommonHTML::imageTag($url, '', '', $height, $width, '', '', $args . ' ' . $border); }
<?php } // Delivery time! // Ships in 24hrs, 48hrs, .... if( $product_availability ) { ?> <span style="font-weight:bold;"> <?php echo $VM_LANG->_('PHPSHOP_DELIVERY_TIME') ?>: </span> <br /><br /> <?php if( CHECK_STOCK == '1' && !$product_in_stock ) { $product_availability = 'not_available.gif'; } if( is_file( VM_THEMEPATH."images/availability/".$product_availability)) { echo vmCommonHTML::imageTag( VM_THEMEURL."images/availability/".$product_availability, $product_availability ); } else { echo $product_availability; } } $avail = ob_get_contents(); ob_end_clean(); if( !empty( $avail ) ) { ?> <div class="availabilityHeader"><?php echo $VM_LANG->_('PHPSHOP_AVAILABILITY') ?></div> <br /> <?php echo $avail; } ?>
$dbf->query('SELECT attribute_id FROM `#__{vm}_product_attribute` WHERE attribute_name=\'download\' AND attribute_value=\'' . $db->f('file_title') . '\' AND product_id=\'' . $product_id . '\''); $dbf->next_record(); $attribute_id = $dbf->f('attribute_id'); vmCommonHTML::setSelectedArray($selected_type, 3, 'selected', array(0, 1, 2, 4)); } else { $index = $db->f("file_is_image") == 1 ? 4 : 5; $disableArr = $db->f("file_is_image") == 1 ? array(3, 5) : array(0, 1, 2, 4); vmCommonHTML::setSelectedArray($selected_type, $index, 'selected', $disableArr); } } } else { vmCommonHTML::setSelectedArray($selected_type, 0, 'selected', array(3, 5)); } } else { if ($hasProductImages) { vmCommonHTML::setSelectedArray($selected_type, 4, 'selected', array(0, 1, 2)); } $isProductDownload = false; $default["file_title"] = $db->f('product_name'); $default["file_published"] = "1"; unset($db->record); } //First create the object and let it print a form heading $formObj = new formFactory($title); //Then Start the form $formObj->startForm('adminForm', 'enctype="multipart/form-data"'); ?> <br /> <table class="adminform"> <?php if ($file_id) {
$tmp_cell = $VM_LANG->_('PHPSHOP_PAYMENT_FORM_USE_PP'); break; case "N": $tmp_cell = $VM_LANG->_('PHPSHOP_PAYMENT_FORM_AO'); break; case "B": $tmp_cell = $VM_LANG->_('PHPSHOP_PAYMENT_FORM_BANK_DEBIT'); break; case "P": $tmp_cell = $VM_LANG->_('VM_PAYMENT_FORM_FORMBASED'); break; default: $tmp_cell = $VM_LANG->_('PHPSHOP_PAYMENT_FORM_CC'); break; } $listObj->addCell($tmp_cell); $tmpcell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page={$page}&payment_method_id=" . $db->f("payment_method_id") . "&func=changePublishState"); if ($db->f("payment_enabled") == 'N') { $tmpcell .= "&task=publish\">"; } else { $tmpcell .= "&task=unpublish\">"; } $tmpcell .= vmCommonHTML::getYesNoIcon($db->f("payment_enabled"), $VM_LANG->_('CMN_PUBLISH'), $VM_LANG->_('CMN_UNPUBLISH')); $tmpcell .= "</a>"; $listObj->addCell($tmpcell); $listObj->addCell($ps_html->deleteButton("payment_method_id", $db->f("payment_method_id"), "paymentMethodDelete", $keyword, $limitstart)); $i++; } $listObj->writeTable(); $listObj->endTable(); $listObj->writeFooter($keyword);
$db->query($count); $db->next_record(); $num_rows = $db->f("num_rows"); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_CREDITCARD_LIST_LBL'), VM_THEMEURL . 'images/administration/dashboard/credit.png', $modulename, "creditcard_list"); // start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $num_rows . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_CREDITCARD_NAME') => '', $VM_LANG->_('PHPSHOP_CREDITCARD_CODE') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("creditcard_id"), false, "creditcard_id")); $tmp_cell = '<a href="' . $sess->url($_SERVER['PHP_SELF'] . "?page=store.creditcard_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&creditcard_id=" . $db->f("creditcard_id")) . '">' . $db->f("creditcard_name") . "</a>"; $listObj->addCell($tmp_cell); $listObj->addCell($db->f("creditcard_code")); $listObj->addCell($ps_html->deleteButton("creditcard_id", $db->f("creditcard_id"), "creditcardDelete", $keyword, $limitstart)); $i++; } $listObj->writeTable(); $listObj->endTable(); $listObj->writeFooter($keyword);
<?php if (!empty($item->link)) { ?> <a class="pathway" href="<?php echo $item->link; ?> "><?php echo $item->name; ?> </a> <?php } else { ?> <?php echo $item->name; ?> <?php } ?> <?php if ($catcount < $count || $item->link != '') { // This prints the separator image (uses the one from the template if available!) // Cat1 * Cat2 * ... echo vmCommonHTML::pathway_separator(); } $catcount++; } if (isset($return_link) && !empty($return_link)) { echo $return_link; }
* @copyright Copyright (C) 2004-2008 soeren - All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details. * * http://virtuemart.net */ mm_showMyFileName(__FILE__); /********************************************************* ************* PRODUCT & CATEGORY TREE ****************************** */ $vmFoldersMenu = new vmFoldersMenu(); vmCommonHTML::loadTigraTree(); $menu_htmlcode = "<br /><div style=\"text-align:left;margin-left:200px;\">\r\n<script type=\"text/javascript\"><!--\r\nvar TREE_ITEMS = [\r\n['{" . $VM_LANG->_('PHPSHOP_STORE_MOD') . "}', '{$_SERVER['PHP_SELF']}',\r\n"; $vmFoldersMenu->traverse_tree_down($menu_htmlcode); $menu_htmlcode .= "]];\r\nnew tree(TREE_ITEMS, TREE_TPL);\r\n--></script>\r\n</div>"; echo $menu_htmlcode; class vmFoldersMenu { /*************************************************** * function traverse_tree_down */ function traverse_tree_down(&$mymenu_content, $category_id = '0', $level = '0') { static $ibg = -1; global $db, $module, $mosConfig_live_site; $level++; $query = "SELECT category_name as cname, category_id as cid, category_child_id as ccid " . "FROM #__{vm}_category as a, #__{vm}_category_xref as b " . "WHERE a.category_publish='Y' AND " . " b.category_parent_id='{$category_id}' AND a.category_id=b.category_child_id " . "ORDER BY category_parent_id, list_order, category_name ASC";
<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); ?> <?php // User is not allowed to see a price or there is no price if( !$auth['show_prices'] || !isset($price_info["product_price_id"] )) { $link = $sess->url( $_SERVER['PHP_SELF'].'?page=shop.ask&product_id='.$product_id.'&subject='. urlencode( $VM_LANG->_('PHPSHOP_PRODUCT_CALL').": $product_name") ); echo vmCommonHTML::hyperLink( $link, $VM_LANG->_('PHPSHOP_PRODUCT_CALL') ); } ?> <?php if( !empty( $price_info["product_price_id"] )) { ?> <span class="product-Old-Price"> <?php echo $CURRENCY_DISPLAY->getFullValue($undiscounted_price); ?> </span> <?php } echo $price_table; ?> <?php // DISCOUNT: Show old price! if(!empty($discount_info["amount"])) { ?> <span class="productPrice"> <?php echo $CURRENCY_DISPLAY->getFullValue($base_price) ?> <?php echo $text_including_tax ?> </span> <?php
// Here is the most important part of the whole Shop: // LOADING the requested page for displaying it to the customer. // I have wrapped it with a function, because it becomes // cacheable that way. // It's just an "include" statement which loads the page $vmDoCaching = ($page == "shop.browse" || $page == "shop.product_details") && (empty($keyword) && empty($keyword1) && empty($keyword2)); // IE6 PNG transparency fix $vm_mainframe->addScript("{$mosConfig_live_site}/components/{$option}/js/sleight.js"); echo '<div id="vmMainPage">' . "\n"; // Load requested PAGE if (file_exists(PAGEPATH . $modulename . "." . $pagename . ".php")) { if ($only_page) { require_once CLASSPATH . 'connectionTools.class.php'; vmConnector::sendHeaderAndContent(200); if ($func) { echo vmCommonHTML::getSuccessIndicator($ok, $vmDisplayLogger); } /*@MWM1: Log/Debug enhancements*/ include PAGEPATH . $modulename . "." . $pagename . ".php"; // Exit gracefully $vm_mainframe->close(true); } include PAGEPATH . $modulename . "." . $pagename . ".php"; } elseif (file_exists(PAGEPATH . HOMEPAGE . '.php')) { include PAGEPATH . HOMEPAGE . '.php'; } else { include PAGEPATH . 'shop.index.php'; } if (!empty($mosConfig_caching) && $vmDoCaching) { echo '<span class="small">' . $VM_LANG->_('LAST_UPDATED') . ': ' . strftime($vendor_date_format) . '</span>'; }
/** * Builds the "more images" link * * @param array $images */ function vmMoreImagesLink($images) { global $mosConfig_live_site, $VM_LANG, $sess; /* Build the JavaScript Link */ $url = $sess->url("index2.php?page=shop.view_images&flypage=" . @$_REQUEST['flypage'] . "&product_id=" . @$_REQUEST['product_id'] . "&category_id=" . @$_REQUEST['category_id'] . "&pop=1"); $text = $VM_LANG->_('PHPSHOP_MORE_IMAGES') . '(' . count($images) . ')'; $image = vmCommonHTML::imageTag(VM_THEMEURL . 'images/more_images.png', $text, '', '16', '16'); return vmPopupLink($url, $image . '<br />' . $text, 640, 550, '_blank', '', 'screenX=100,screenY=100'); }
echo vmCommonHTML::scriptTag('', 'var ctThemeXPBase = "' . $js_src . '/ThemeXP/";'); if ($jscook_type == "tree") { if ($jscookTree_style == "ThemeXP") { $jscook_tree = "ctThemeXP1"; } if ($jscookTree_style == "ThemeNavy") { $jscook_tree = "ctThemeNavy"; } echo vmCommonHTML::scriptTag($js_src . '/JSCookTree.js'); echo vmCommonHTML::linkTag($js_src . "/{$jscookTree_style}/theme.css"); echo vmCommonHTML::scriptTag($js_src . "/{$jscookTree_style}/theme.js"); $vm_jscook = new vmCategoryTree(); } else { echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/JSCookMenu.js'); echo vmCommonHTML::linkTag($mosConfig_live_site . "/includes/js/{$jscookMenu_style}/theme.css"); echo vmCommonHTML::scriptTag($mosConfig_live_site . "/includes/js/{$jscookMenu_style}/theme.js"); $vm_jscook = new vmCategoryMenu(); } // create a unique tree identifier, in case multiple trees are used // (max one per module) $varname = "JSCook_" . uniqid($jscook_type . "_"); $menu_htmlcode = "<div align=\"left\" class=\"mainlevel\" id=\"div_{$varname}\"></div>\r\n<script type=\"text/javascript\"><!--\r\nvar {$varname} = \r\n[\r\n"; $vm_jscook->traverse_tree_down($menu_htmlcode); $menu_htmlcode .= "];\r\n"; if ($jscook_type == "tree") { $menu_htmlcode .= "var treeindex = ctDraw ('div_{$varname}', {$varname}, {$jscook_tree}, '{$jscookTree_style}', 0, 0);"; } else { $menu_htmlcode .= "cmDraw ('div_{$varname}', {$varname}, '{$menu_orientation}', cm{$jscookMenu_style}, '{$jscookMenu_style}');"; } $menu_htmlcode .= "\r\n--></script>\n"; if ($jscook_type == "tree") {
// start the list table $listObj->startTable(); // these are the columns in the table $columns = array("#" => 'width="20"', '<input type="checkbox" name="toggle" value="" onclick="checkAll(' . $num_rows . ')" />' => 'width="20"', $VM_LANG->_('PHPSHOP_USER_LIST_USERNAME') => "", $VM_LANG->_('PHPSHOP_USER_LIST_FULL_NAME') => "", $VM_LANG->_('PHPSHOP_USER_LIST_GROUP') => "", $VM_LANG->_('PHPSHOP_SHOPPER_FORM_GROUP') => "", $VM_LANG->_('E_REMOVE') => 'width="5%"'); $listObj->writeTableHeader($columns); $db->query($list); $dbs = new ps_DB(); $i = 0; while ($db->next_record()) { $user_id = $db->f('id') ? intval($db->f('id')) : intval($db->f('user_id')); $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); $condition = $user_id == $my->id ? false : true; // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $user_id, !$condition, "user_id")); $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.user_form&user_id={$user_id}"; $tmp_cell = '<a href="' . $sess->url($url) . '">' . $db->f("username") . "</a>"; $listObj->addCell($tmp_cell); $listObj->addCell($db->f("first_name") . " " . $db->f("middle_name") . " " . $db->f("last_name")); $listObj->addCell($db->f("perms") . ' / (' . $db->f("usertype") . ')'); if ($db->f("user_id")) { $q = "SELECT shopper_group_name FROM #__{vm}_shopper_group, #__{vm}_shopper_vendor_xref WHERE "; $q .= "#__{vm}_shopper_vendor_xref.user_id={$user_id} AND #__{vm}_shopper_vendor_xref.shopper_group_id=#__{vm}_shopper_group.shopper_group_id"; $dbs->query($q); $dbs->next_record(); $tmp_cell = $dbs->f("shopper_group_name"); } else { $tmp_cell = ""; } $listObj->addCell($tmp_cell);
$database->setQuery("SELECT FOUND_ROWS() as num_rows"); $num_rows = $database->loadResult(); // Create the Page Navigation $pageNav = new vmPageNav($num_rows, $limitstart, $limit); // Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($title, VM_THEMEURL . "/images/administration/dashboard/countries.png", "admin", "country_state_list"); // 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_STATE_LIST_NAME') => "", $VM_LANG->_('PHPSHOP_STATE_LIST_3_CODE') => "", $VM_LANG->_('PHPSHOP_STATE_LIST_2_CODE') => "", $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("state_id"), false, "state_id")); $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=admin.country_state_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&state_id=" . $db->f("state_id") . "&country_id=" . $country_id) . "\">"; $tmp_cell .= $db->f("state_name") . "</a>"; $listObj->addCell($tmp_cell); $listObj->addCell($db->f("state_3_code")); $listObj->addCell($db->f("state_2_code")); $listObj->addCell($ps_html->deleteButton("state_id", $db->f("state_id"), "stateDelete", $keyword, $limitstart, "&country_id={$country_id}")); $i++; } $listObj->writeTable(); $listObj->endTable(); $listObj->writeFooter($keyword, "&country_id={$country_id}");
$db_browse->query($count); $num_rows = $db_browse->f("num_rows"); if ($limitstart > 0 && $limit >= $num_rows) { $list = str_replace('LIMIT ' . $limitstart, 'LIMIT 0', $list); } if ($category_id) { /** * CATEGORY DESCRIPTION */ $db->query("SELECT category_id, category_name FROM #__{vm}_category WHERE category_id='{$category_id}'"); $db->next_record(); $category_name = shopMakeHtmlSafe($db->f('category_name')); /* Set Dynamic Page Title */ $mainframe->setPageTitle($db->f("category_name")); $desc = $ps_product_category->get_description($category_id); $desc = vmCommonHTML::ParseContentByPlugins($desc); /* Prepend Product Short Description Meta Tag "description" when applicable */ $mainframe->prependMetaTag("description", substr(strip_tags($desc), 0, 255)); } // when nothing has been found we tell this here and say goodbye if ($num_rows == 0 && (!empty($keyword) || !empty($keyword1))) { echo $VM_LANG->_('PHPSHOP_NO_SEARCH_RESULT'); } elseif ($num_rows == 0 && empty($product_type_id) && !empty($child_list)) { echo $VM_LANG->_('EMPTY_CATEGORY'); } elseif ($num_rows == 1 && (!empty($keyword) || !empty($keyword1))) { // If just one product has been found, we directly show the details page of it $db_browse->query($list); $db_browse->next_record(); $flypage = $db_browse->sf("category_flypage") ? $db_browse->sf("category_flypage") : FLYPAGE; $url_parameters = "page=shop.product_details&flypage={$flypage}&product_id=" . $db_browse->f("product_id") . "&category_id=" . $db_browse->f("category_id"); vmRedirect($sess->url($url_parameters, true, false));
function checkboxList($arr, $tag_name, $tag_attribs, $key = 'value', $text = 'text', $selected = NULL, $required = 0) { return "\n\t" . implode("\n\t", vmCommonHTML::checkboxListArr($arr, $tag_name, $tag_attribs, $key, $text, $selected, $required)) . "\n"; }
$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); } else { $tmpcell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=product.file_list&file_id=" . $db->f("file_id") . "&product_id={$product_id}&func=changePublishState"); if ($db->f("file_published") == '0') { $tmpcell .= "&task=publish\">"; } else { $tmpcell .= "&task=unpublish\">"; } $tmpcell .= vmCommonHTML::getYesNoIcon($db->f("file_published"), $VM_LANG->_('CMN_PUBLISH'), $VM_LANG->_('CMN_UNPUBLISH')); $tmpcell .= "</a>"; $listObj->addCell($tmpcell); } $listObj->addCell($ps_html->deleteButton("file_id", $db->f("file_id"), "deleteProductFile", $keyword, $limitstart, "&product_id={$product_id}")); $i++; } $listObj->writeTable(); $listObj->endTable(); $listObj->writeFooter($keyword, "&product_id={$product_id}"); ?> <br /><br /> <a name="file_form" href="#listheader"> <div id="file_form_container"> <img align="middle" src="<?php echo $mosConfig_live_site;
$q = "SELECT published FROM #__modules WHERE module='mod_virtuemart_cart'"; $db->query($q); if (USE_AS_CATALOGUE != '1' && $show_minicart == 'yes' && !$db->f("published")) { $_SESSION['vmMiniCart'] = true; ?> <tr> <td colspan="2"> <?php $class_att = 'class="' . $class_mainlevel . '"'; $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 ($useGreyBox_cartlink) { echo vmCommonHTML::getGreyboxPopUpLink($href2, $text, '', $text, $class_att, 500, 600, $href); } else { echo vmCommonHTML::hyperlink($href, $text, '', $text, $class_att); } ?> </td> </tr> <tr> <td colspan="2" class="vmCartModule"> <?php // ^ Do not change this class name!! It is used to update this cell after a cart action // This is the 'mini cart' file include PAGEPATH . 'shop.basket_short.php'; ?> </td> </tr> <?php } else {
if ($vmLayout != 'extended') { echo '<br style="clear:both;"/><div class="smallgrey" align="center">' . $VMVERSION->PRODUCT . ' ' . $VMVERSION->RELEASE . ' (<a href="http://virtuemart.net/index2.php?option=com_versions&catid=1&myVersion=' . @$VMVERSION->RELEASE . '" onclick="javascript:void window.open(this.href, \'win2\', \'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=580,directories=no,location=no\'); return false;" title="' . $VM_LANG->_('VM_VERSIONCHECK_TITLE') . '" target="_blank">' . $VM_LANG->_('VM_VERSIONCHECK_NOW') . '</a>)</div>'; } if (DEBUG == '1' && $no_menu != 1) { // Load PAGE include PAGEPATH . "shop.debug.php"; } if ($vmLayout == 'extended') { echo '</div>'; if (stristr($page, '_list') && $page != 'product.file_list') { echo vmCommonHTML::scriptTag('', 'var listItemClicked = function(e){ // find the <a> element that was clicked var a = e.getTarget("a"); try { if(a && !a.onclick && a.href.indexOf("javascript:") == -1 && a.href.indexOf("func=") == -1 ) { e.preventDefault(); parent.addSimplePanel( a.title != "" ? a.title : a.innerHTML, a.href ); } } catch(e) {} }; Ext.get("vmPage").mon("click", listItemClicked );'); } } else { echo '</td></tr></table>'; } } // Render the script and style resources into the document head $vm_mainframe->close(); ?> <div style="border-top: 1px solid #eee; text-align:center; padding:3px;">
if (vmIsJoomla('1.5')) { require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_users' . DS . 'users.class.php'; $user =& JUser::getInstance($user_id); $params = $user->getParameters(true); } elseif (file_exists($mosConfig_absolute_path . '/administrator/components/com_users/users.class.php')) { require_once $mosConfig_absolute_path . '/administrator/components/com_users/users.class.php'; $file = $mainframe->getPath('com_xml', 'com_users'); $params = new mosUserParameters($row->params, $file, 'component'); } // Set the last visit date $lvisit = $row->lastvisitDate; if ($lvisit == "0000-00-00 00:00:00") { $lvisit = '***' . $VM_LANG->_('VM_USER_FORM_LASTVISIT_NEVER'); } //First create the object and let it print a form heading $formObj = new formFactory(vmCommonHTML::imageTag(VM_THEMEURL . 'images/administration/header/icon-48-user.png', 'User Icon', 'absmiddle') . ' ' . $VM_LANG->_('PHPSHOP_USER_FORM_LBL')); //Then Start the form $formObj->startForm(); $tabs = new vmTabPanel(0, 1, "userform"); $tabs->startPane("userform-pane"); $tabs->startTab($VM_LANG->_('VM_USER_FORM_TAB_GENERALINFO'), "userform-page"); ?> <script language="javascript" type="text/javascript"> function gotocontact( id ) { var form = document.adminForm; form.target = "_parent"; form.contact_id.value = id; form.option.value = 'com_users'; submitform( 'contact' ); } </script>
$formObj->startForm(); $discount_id = vmGet($_REQUEST, 'discount_id', null); $option = empty($option) ? vmGet($_REQUEST, 'option', 'com_virtuemart') : $option; if (!empty($discount_id)) { $q = "SELECT * FROM #__{vm}_product_discount WHERE discount_id='{$discount_id}'"; $db->query($q); $db->next_record(); } echo vmCommonHTML::scriptTag($mosConfig_live_site . '/includes/js/calendar/calendar.js'); if (class_exists('JConfig')) { // 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'); ?> <table class="adminform"> <tr> <td colspan="2"> </td> </tr> <tr> <td width="24%"><div align="right"><?php echo $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_AMOUNT'); ?> :</div></td> <td width="76%"> <input type="text" class="inputbox" name="amount" value="<?php $db->sp("amount");
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details. * * http://virtuemart.net * */ global $VM_LANG; if (vmget($_SESSION, 'vm_updatepackage') !== null) { include PAGEPATH . 'admin.update_preview.php'; return; } vmCommonHTML::loadMooTools(); require_once CLASSPATH . 'update.class.php'; if (!empty($_SESSION['vmLatestVersion']) && version_compare($VMVERSION->RELEASE, $_SESSION['vmLatestVersion']) === -1) { $checkbutton_style = 'display:none;'; $downloadbutton_style = ''; } else { $checkbutton_style = ''; $downloadbutton_style = 'display:none;'; } $formObj = new formFactory($VM_LANG->_('VM_UPDATE_CHECK_LBL')); $formObj->startForm('adminForm', 'enctype="multipart/form-data"'); vmUpdate::stepBar(1); $tabs = new vmTabPanel(0, 0, 'versionCheck'); $tabs->startPane('versionCheckPane'); $tabs->startTab($VM_LANG->_('VM_UPDATE_CHECK_LBL'), 'update_check'); ?>
* other free or open source software licenses. * See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details. * http://virtuemart.net */ mm_showMyFileName(__FILE__); global $VM_LANG; ?> <h3><?php echo $VM_LANG->_('PHPSHOP_THANKYOU'); ?> </h3> <p> <?php echo vmCommonHTML::imageTag(VM_THEMEURL . 'images/button_ok.png', 'Success', 'center', '48', '48'); ?> <?php echo $VM_LANG->_('PHPSHOP_THANKYOU_SUCCESS'); ?> <br /><br /> <?php echo $VM_LANG->_('PHPSHOP_EMAIL_SENDTO') . ": <strong>" . $user->user_email . '</strong>'; ?> <br /> </p> <!-- Begin Payment Information --> <?php if (empty($auth['user_id'])) {
// Create the List Object with page navigation $listObj = new listFactory($pageNav); // print out the search field and a list heading $listObj->writeSearchHeader($VM_LANG->_('VM_USERGROUP_LIST_LBL'), VM_THEMEURL . 'images/administration/dashboard/shoppers.png', "admin", "usergroup_list"); // 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->_('VM_USERGROUP_NAME') => "width=\"40%\"", $VM_LANG->_('VM_USERGROUP_LEVEL') => "width=\"20%\"", $VM_LANG->_('E_REMOVE') => "width=\"5%\""); $listObj->writeTableHeader($columns); $db->query($list); $i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); // The Checkbox $listObj->addCell(vmCommonHTML::idBox($i, $db->f("group_id"), false, "group_id")); if (in_array($db->f('group_name'), $usergroup->_protected_groups)) { $tmp_cell = $db->f("group_name"); } else { $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=admin.usergroup_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&group_id=" . $db->f("group_id")) . "\">"; $tmp_cell .= $db->f("group_name") . "</a>"; } $listObj->addCell($tmp_cell); $listObj->addCell($db->f("group_level")); $listObj->addCell($ps_html->deleteButton("group_id", $db->f("group_id"), "userGroupDelete", $keyword, $limitstart)); $i++; } $listObj->writeTable(); $listObj->endTable(); $listObj->writeFooter($keyword);
/** * The function to handle all default page situations * not responsible for lists! */ function FORMS_MENU_SAVE_CANCEL() { global $mosConfig_absolute_path, $mosConfig_live_site, $mosConfig_lang, $VM_LANG, $product_id, $page, $limitstart, $mosConfig_editor, $vmIcons; $bar =& JToolBar::getInstance('toolbar'); $product_id = vmGet($_REQUEST, 'product_id', 0); $no_menu = vmGet($_REQUEST, 'no_menu', 0); $is_iframe = vmGet($_REQUEST, 'is_iframe', 0); $product_parent_id = vmGet($_REQUEST, 'product_parent_id', 0); $script = ''; $clone_product = vmRequest::getInt('clone_product', 0); if (is_array($product_id)) { $product_id = ""; } // These editor arrays tell the toolbar to load correct "getEditorContents" script parts // This is necessary for WYSIWYG Editors like TinyMCE / mosCE / FCKEditor $editor1_array = array('product.product_form' => 'product_desc', 'shopper.shopper_group_form' => 'shopper_group_desc', 'product.product_category_form' => 'category_description', 'manufacturer.manufacturer_form' => 'mf_desc', 'store.store_form' => 'vendor_store_desc', 'product.product_type_parameter_form' => 'parameter_description', 'product.product_type_form' => 'product_type_description', 'vendor.vendor_form' => 'vendor_store_desc'); $editor2_array = array('store.store_form' => 'vendor_terms_of_service', 'vendor.vendor_form' => 'vendor_terms_of_service'); $editor1 = isset($editor1_array[$page]) ? $editor1_array[$page] : ''; $editor2 = isset($editor2_array[$page]) ? $editor2_array[$page] : ''; if ($no_menu) { vmCommonHTML::loadExtjs(); } $script .= '<script type="text/javascript"> function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == \'cancel\') { submitform( pressbutton ); return; } '; if ($editor1 != '') { if (vmIsJoomla(1.5)) { jimport('joomla.html.editor'); $editor_type = $GLOBALS['mainframe']->getCfg('editor'); if ($editor_type != 'none') { $editor = JEditor::getInstance(); $script .= $editor->getContent($editor1); } } else { ob_start(); getEditorContents('editor1', $editor1); $script .= ob_get_contents(); ob_end_clean(); } } if ($editor2 != '') { if (vmIsJoomla(1.5)) { jimport('joomla.html.editor'); $editor_type = $GLOBALS['mainframe']->getCfg('editor'); if ($editor_type != 'none') { $editor = JEditor::getInstance(); $script .= $editor->getContent($editor2); } } else { ob_start(); getEditorContents('editor2', $editor2); $script .= ob_get_contents(); ob_end_clean(); } } if ($no_menu) { $admin = defined('_VM_IS_BACKEND') ? '/administrator' : ''; $script .= "\n\t\t\t\n // define some private variables\n var dialog, showBtn;\n\n // the second argument is true to indicate file upload.\n YAHOO.util.Connect.setForm(form, true);\n \n var showDialog = function( content ) {\n \tExt.MessageBox.show( { \n \t\ttitle: '" . $VM_LANG->_('PEAR_LOG_NOTICE') . "',\n \t\tmsg: content,\n \t\tautoCreate: true,\n width:400,\n height:180,\n modal: false,\n resizable: false,\n buttons: Ext.MessageBox.OK,\n shadow:true,\n animEl:Ext.get( 'vm-toolbar' )\n });\n setTimeout('Ext.MessageBox.hide()', 3000);\n };\n \n // return a public interface\n var callback = {\n \tsuccess: function(o) {\n \t\t//Ext.DomHelper.insertHtml( document.body, o.responseText );\n \t\tshowDialog( o.responseText );\n \t},\n \tfailure: function(o) {\n \t\tExt.DomHelper.append( document.body, { tag: 'div', id: 'vmLogResult', html: 'Save action failed: ' + o.statusText } );\n \t\tshowDialog( o.responseText );\n \t},\n upload : function(o){\n //Ext.DomHelper.insertHtml( 'beforeEnd', document.body, o.responseText );\n \t\tshowDialog( o.responseText );\n }\n };\n \n \tvar cObj = YAHOO.util.Connect.asyncRequest('POST', '{$_SERVER['PHP_SELF']}', callback);\n\t\n\t\t\t\n"; } else { $script .= "\n\t\t\tsubmitform( pressbutton );\n"; } $script .= "\t\t}\n\t\t</script>"; $bar->appendButton('Custom', $script); vmMenuBar::startTable(); if ($page == "product.product_form" && !empty($product_id) && $clone_product != 1) { if (empty($product_parent_id)) { // add new attribute $href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_attribute_form&product_id=" . $product_id . "&limitstart=" . $limitstart . "&no_menu={$no_menu}"; $alt = " " . $VM_LANG->_('PHPSHOP_ATTRIBUTE_FORM_MNU'); vmMenuBar::customHref($href, $vmIcons['new_icon'], $vmIcons['new_icon2'], $alt); vmMenuBar::spacer(); } else { // back to parent product $href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_form&product_id={$product_parent_id}&limitstart=" . $limitstart . "&no_menu={$no_menu}"; $alt = " " . $VM_LANG->_('PHPSHOP_PRODUCT_FORM_RETURN_LBL'); vmMenuBar::customHref($href, $vmIcons['back_icon'], $vmIcons['back_icon2'], $alt); vmMenuBar::spacer(); // new child product $href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_form&product_parent_id={$product_parent_id}&limitstart=" . $limitstart . "&no_menu={$no_menu}"; $alt = " " . $VM_LANG->_('PHPSHOP_PRODUCT_FORM_ADD_ANOTHER_ITEM_MNU'); vmMenuBar::customHref($href, $vmIcons['new_icon'], $vmIcons['new_icon2'], $alt); vmMenuBar::spacer(); } // Go to Price list $href = $_SERVER['PHP_SELF'] . "?page=product.product_price_list&product_id={$product_id}&product_parent_id={$product_parent_id}&limitstart={$limitstart}&return_args=&option=com_virtuemart&no_menu={$no_menu}"; $alt = " " . $VM_LANG->_('PHPSHOP_PRICE_LIST_MNU'); vmMenuBar::customHref($href, $vmIcons['new_icon'], $vmIcons['new_icon2'], $alt); vmMenuBar::spacer(); // add product type $href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_product_type_form&product_id={$product_id}&product_parent_id={$product_parent_id}&limitstart={$limitstart}&no_menu={$no_menu}"; $alt = " " . $VM_LANG->_('PHPSHOP_PRODUCT_PRODUCT_TYPE_FORM_MNU'); vmMenuBar::customHref($href, $vmIcons['new_icon'], $vmIcons['new_icon2'], $alt); vmMenuBar::spacer(); /*** Adding an item is only pssible, if the product has attributes ***/ if (ps_product::product_has_attributes($product_id)) { // Add Item $href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_form&product_parent_id={$product_id}&limitstart={$limitstart}&no_menu={$no_menu}"; $alt = " " . $VM_LANG->_('PHPSHOP_PRODUCT_FORM_NEW_ITEM_LBL'); vmMenuBar::customHref($href, $vmIcons['new_icon'], $vmIcons['new_icon2'], $alt); vmMenuBar::spacer(); } vmMenuBar::divider(); } elseif ($page == "admin.country_form") { if (!empty($_REQUEST['country_id'])) { $href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=admin.country_state_form&country_id=" . intval($_REQUEST['country_id']) . "&limitstart={$limitstart}&no_menu={$no_menu}"; $alt = " " . $VM_LANG->_('PHPSHOP_ADD_STATE'); vmMenuBar::customHref($href, $vmIcons['new_icon'], $vmIcons['new_icon2'], $alt); vmMenuBar::spacer(); $href = $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=admin.country_state_list&country_id=" . intval($_REQUEST['country_id']) . "&limitstart={$limitstart}&no_menu={$no_menu}"; $alt = " " . $VM_LANG->_('PHPSHOP_LIST_STATES'); vmMenuBar::customHref($href, $vmIcons['new_icon'], $vmIcons['new_icon2'], $alt); vmMenuBar::spacer(); vmMenuBar::divider(); } } vmMenuBar::spacer(); vmMenuBar::save('save', $VM_LANG->_('CMN_SAVE')); if ($no_menu == 0) { vmMenuBar::spacer(); vmMenuBar::apply('apply', $VM_LANG->_('E_APPLY')); } if ((strstr(@$_SERVER['HTTP_REFERER'], $page) || strstr(@$_SERVER['HTTP_REFERER'], $_SERVER['PHP_SELF'])) && $no_menu && !$is_iframe) { // offer a back button vmMenuBar::spacer(); vmMenuBar::back(); } vmMenuBar::spacer(); vmMenuBar::cancel(); vmMenuBar::spacer(); vmMenuBar::endTable(); }