$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;
// 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);
} $listObj->addCell($tmpcell); $listObj->addCell($db->f("product_sku")); $listObj->addCell($db->f("product_in_stock")); $price = $ps_product->get_price($db->f("product_id")); if ($price) { if (!empty($price["item"])) { $tmp_cell = $price["product_price"]; } else { $tmp_cell = "none"; } } else { $tmp_cell = "none"; } $listObj->addCell($tmp_cell); $listObj->addCell($db->f("product_weight")); // The "Published" column $tmpcell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=product.product_inventory&product_id=" . $db->f("product_id") . "&func=changePublishState&allproducts={$allproducts}"); if ($db->f("product_publish") == 'N') { $tmpcell .= "&task=publish\">"; } else { $tmpcell .= "&task=unpublish\">"; } $tmpcell .= vmCommonHTML::getYesNoIcon($db->f("product_publish"), $VM_LANG->_('CMN_PUBLISH'), $VM_LANG->_('CMN_UNPUBLISH')); $tmpcell .= "</a>"; $listObj->addCell($tmpcell, 'align="center"'); $i++; } $listObj->writeTable(); $listObj->endTable(); $listObj->writeFooter($keyword, "&allproducts={$allproducts}");
$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);
$i = 0; while ($db->next_record()) { $listObj->newRow(); // The row number $listObj->addCell($pageNav->rowNumber($i)); $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.product_form&product_id=" . $db->f("product_id"); if ($db->f("product_parent_id")) { $url .= "&product_parent_id=" . $db->f("product_parent_id"); } $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . $db->f("product_name") . "</a>"; $listObj->addCell($tmp_cell); $listObj->addCell($db->f("product_sku")); $price = $ps_product->get_price($db->f("product_id")); if ($price) { if (!empty($price["item"])) { $tmp_cell = $CURRENCY_DISPLAY->getFullValue($price["product_price"]); } else { $tmp_cell = "none"; } } else { $tmp_cell = "none"; } $listObj->addCell($tmp_cell); $listObj->addCell(vmCommonHTML::getYesNoIcon($db->f("product_special"), "On Special?")); $listObj->addCell($db->f("product_discount_id")); $listObj->addCell(vmCommonHTML::getYesNoIcon($db->f("product_publish"), "Published?")); $i++; } $listObj->writeTable(); $listObj->endTable(); $listObj->writeFooter($keyword);
$tmp_cell .= "</a>"; } else { $tmp_cell = vmCommonHTML::getYesNoIcon($db->f('registration')); } $listObj->addCell($tmp_cell); // Show on shipping? if (!in_array($db->f('name'), $coreFields)) { $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=admin.user_field_list&fieldid=" . $db->f('fieldid') . "&func=changePublishState&item=shipping"); $tmp_cell .= $db->f('shipping') ? "&task=unpublish\">" : ($tmp_cell .= "&task=publish\">"); $tmp_cell .= vmCommonHTML::getYesNoIcon($db->f('shipping')); $tmp_cell .= "</a>"; } else { $tmp_cell = vmCommonHTML::getYesNoIcon($db->f('shipping')); } $listObj->addCell($tmp_cell); // Show on account maintenance? $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=admin.user_field_list&fieldid=" . $db->f('fieldid') . "&func=changePublishState&item=account"); $tmp_cell .= $db->f('account') ? "&task=unpublish\">" : ($tmp_cell .= "&task=publish\">"); $tmp_cell .= vmCommonHTML::getYesNoIcon($db->f('account')); $tmp_cell .= "</a>"; $listObj->addCell($tmp_cell); $tmp_cell = "<div align=\"center\">" . $pageNav->orderUpIcon($i, $i > 0, "orderup", $VM_LANG->_('CMN_ORDER_UP'), $page, "changeordering") . "\n " . $pageNav->orderDownIcon($i, $db->num_rows(), $i - 1 <= $db->num_rows(), 'orderdown', $VM_LANG->_('CMN_ORDER_DOWN'), $page, "changeordering") . "</div>"; $listObj->addCell($tmp_cell); $listObj->addCell(vmCommonHTML::getOrderingField($db->f('ordering'))); $tmp_cell = $db->f('sys') ? '' : $ps_html->deleteButton("fieldid", $db->f('fieldid'), "userfieldDelete", $keyword, $limitstart); $listObj->addCell($tmp_cell); $i++; } $listObj->writeTable(); $listObj->endTable(); $listObj->writeFooter($keyword);
if ($db2->f("is_percent")) { echo $db2->f("amount") . "% "; } else { echo $CURRENCY_DISPLAY->getFullValue($db2->f("amount")); } } ?> </div> <div class="formLabel"> <?php echo $VM_LANG->_('PHPSHOP_PRODUCT_FORM_PUBLISH'); ?> :</div> <div class="formField" > <?php echo vmCommonHTML::getYesNoIcon($db->f("product_publish")); ?> </div> </fieldset> </div> <div style="width:45%;float:left;"> <fieldset> <legend><strong><?php echo $dim_weight_label; ?> </strong></legend> <div class="formLabel"> <?php echo $VM_LANG->_('PHPSHOP_PRODUCT_FORM_LENGTH'); ?> :</div>
$listObj->addCell(vmCommonHTML::idBox($ibg, $categories[$row_list[$n]]["category_child_id"], false, "category_id")); // Which category depth level we are in? $repeat = $depth_list[$n] + 1; $tmp_cell = str_repeat(" ", $repeat) . "__|" . $repeat . "| " . "<a href=\"" . $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_category_form&category_id=" . $categories[$row_list[$n]]["category_child_id"] . "&category_parent_id=" . $categories[$row_list[$n]]["category_parent_id"] . "\">" . $catname . "</a>"; $listObj->addCell($tmp_cell); $desc = strlen($categories[$row_list[$n]]["category_description"]) > 255 ? mm_ToolTip($categories[$row_list[$n]]["category_description"], $VM_LANG->_('PHPSHOP_CATEGORY_FORM_DESCRIPTION')) : $categories[$row_list[$n]]["category_description"]; $listObj->addCell(" " . $desc); $listObj->addCell(ps_product_category::product_count($categories[$row_list[$n]]["category_child_id"]) . " <a href=\"" . $_SERVER['PHP_SELF'] . "?page=product.product_list&category_id=" . $categories[$row_list[$n]]["category_child_id"] . "&option=com_virtuemart" . "\">[ " . $VM_LANG->_('PHPSHOP_SHOW') . " ]</a>"); // Publish / Unpublish $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=product.product_category_list&category_id=" . $categories[$row_list[$n]]["category_child_id"] . "&func=changePublishState"); if ($categories[$row_list[$n]]["category_publish"] == 'N') { $tmp_cell .= "&task=publish\">"; } else { $tmp_cell .= "&task=unpublish\">"; } $tmp_cell .= vmCommonHTML::getYesNoIcon($categories[$row_list[$n]]["category_publish"]); $tmp_cell .= "</a>"; $listObj->addCell($tmp_cell); // Order Up and Down Icons if ($keyword == '') { // This must be a big cheat, because we're working on sorted arrays, // not on database information // Check for predecessors and brothers and sisters $upCondition = $downCondition = false; if (!isset($levels[$depth_list[$n] + 1])) { $levels[$depth_list[$n] + 1] = 1; } if ($categories[$row_list[$n]]["category_parent_id"] == @$categories[$row_list[$n - 1]]["category_parent_id"]) { $upCondition = true; } if ($categories[$row_list[$n]]["category_parent_id"] == @$categories[$row_list[$n + 1]]["category_parent_id"]) {
// 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->_('VM_ORDER_EXPORT_MODULE_LIST_NAME') => '', $VM_LANG->_('VM_ORDER_EXPORT_MODULE_LIST_DESC') => '', $VM_LANG->_('PHPSHOP_ISSHIP_LIST_PUBLISH_LBL') => '', $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("export_id"), false, "export_id")); $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.export_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&export_id=" . $db->f("export_id"); $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . $db->f('export_name') . "</a>"; $listObj->addCell($tmp_cell); $description = explode("\n", $db->f('export_desc')); $listObj->addCell($description[0]); $tmpcell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page={$page}&export_id=" . $db->f("export_id") . "&func=changePublishState"); if ($db->f("export_enabled") == 'N') { $tmpcell .= "&task=publish\">"; } else { $tmpcell .= "&task=unpublish\">"; } $tmpcell .= vmCommonHTML::getYesNoIcon($db->f("export_enabled"), "Publish", "Unpublish"); $tmpcell .= "</a>"; $listObj->addCell($tmpcell); $listObj->addCell($ps_html->deleteButton("export_id", $db->f("export_id"), "ExportDelete", $keyword, $limitstart)); $i++; } $listObj->writeTable(); $listObj->endTable(); $listObj->writeFooter($keyword);