$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}");
$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);
Ejemplo n.º 3
0
    // Order Status Drop Down List
    $listObj->addCell($ps_order_status->getOrderStatusList($db->f("order_status"), "onchange=\"document.adminForm{$i}.order_status.selectedIndex = this.selectedIndex;document.adminForm{$i}.changed.value='1'\""));
    // Notify Customer checkbox
    $listObj->addCell('<input type="checkbox" class="inputbox" onclick="if(this.checked==true) {document.adminForm' . $i . '.notify_customer.value = \'Y\';} else {document.adminForm' . $i . '.notify_customer.value = \'N\';}" value="Y" />' . $VM_LANG->_('PHPSHOP_ORDER_LIST_NOTIFY') . '<br />
					<input type="button" class="button" onclick="if(document.adminForm' . $i . '.changed.value!=\'1\') { alert(\'' . addslashes($VM_LANG->_('PHPSHOP_ORDER_LIST_NOTIFY_ERR')) . '\'); return false;} else adminForm' . $i . '.submit();" name="Submit" value="' . $VM_LANG->_('VM_UPDATE_STATUS') . '" />');
    $listObj->addCell($GLOBALS['CURRENCY_DISPLAY']->getFullValue($db->f("order_total"), '', $db->f('order_currency')));
    // Change Order Status form
    $form_code .= '<form style="float:left;" method="post" action="' . $_SERVER['PHP_SELF'] . '" name="adminForm' . $i . '">';
    $form_code .= $ps_order_status->getOrderStatusList($db->f("order_status"), "style=\"visibility:hidden;\" onchange=\"document.adminForm{$i}.changed.value='1'\"");
    $form_code .= '<input type="hidden" class="inputbox" name="notify_customer" value="N" />
		<input type="hidden" name="page" value="order.order_list" />
		<input type="hidden" name="func" value="orderStatusSet" />
		<input type="hidden" name="vmtoken" value="' . vmSpoofValue($sess->getSessionId()) . '" />
		<input type="hidden" name="changed" value="0" />
		<input type="hidden" name="option" value="com_virtuemart" />
		<input type="hidden" name="order_id" value="' . $db->f("order_id") . '" />
		<input type="hidden" name="current_order_status" value="' . $db->f("order_status") . '" />
		<input type="hidden" name="show" value="' . $show . '" />
		</form>';
    // Delete Order Button
    $listObj->addCell($ps_html->deleteButton("order_id", $db->f("order_id"), "orderDelete", $keyword, $limitstart));
    $i++;
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword, "&show={$show}");
echo $form_code;
?>


Ejemplo n.º 4
0
        $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;
?>
/administrator/images/restore_f2.png" border="0" alt="<?php 
echo $VM_LANG->_('VM_FILES_LIST_GO_UP');
?>
" /><?php 
echo $VM_LANG->_('VM_FILES_LIST_UP');
?>
</a>
	<iframe id="file_form_iframe" src="" style="height: 1000px;" frameborder="0" width="100%"></iframe>
$title .= "<a href=\"" . $sess->url($url) . "\">" . $ps_product->get_field($product_id, "product_name") . "</a>";
// print out the search field and a list heading
$listObj->writeSearchHeader($title, IMAGEURL . "ps_image/product_code.png", $modulename, "product_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(" . $db->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->_('E_REMOVE') => "width=\"10%\"");
$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($i + 1);
    // 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') . "&nbsp;<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($ps_html->deleteButton("product_type_id", $db->f("product_type_id"), "productProductTypeDelete", $keyword, $limitstart, "&product_id=" . $product_id));
    $i++;
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword, "&product_id=" . $product_id);
    $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}");
Ejemplo n.º 7
0
 /**
  * Shows the list of the orders of a user in the account mainenance section
  *
  * @param string $order_status Filter by order status (A=all, C=confirmed, P=pending,...)
  * @param int $secure Restrict the order list to a specific user id (=1) or not (=0)?
  */
 function list_order($order_status = 'A', $secure = 0)
 {
     global $VM_LANG, $CURRENCY_DISPLAY, $sess, $limit, $limitstart, $keyword, $mm_action_url;
     $ps_vendor_id = $_SESSION["ps_vendor_id"];
     $auth = $_SESSION['auth'];
     require_once CLASSPATH . 'ps_order_status.php';
     require_once CLASSPATH . 'htmlTools.class.php';
     require_once CLASSPATH . 'pageNavigation.class.php';
     $db = new ps_DB();
     $dbs = new ps_DB();
     $listfields = 'o.order_id,o.cdate,order_total,o.order_status,order_currency';
     $countfields = 'count(*) as num_rows';
     $count = "SELECT {$countfields} FROM #__{vm}_orders o ";
     $list = "SELECT DISTINCT {$listfields} FROM #__{vm}_orders o ";
     $q = "WHERE o.vendor_id='{$ps_vendor_id}' ";
     if ($order_status != "A") {
         $q .= "AND order_status='{$order_status}' ";
     }
     if ($secure) {
         $q .= "AND user_id='" . $auth["user_id"] . "' ";
     }
     if (!empty($keyword)) {
         $count .= ', #__{vm}_order_item oi ';
         $list .= ', #__{vm}_order_item oi ';
         $q .= "AND (order_item_sku LIKE '%" . $keyword . "%' ";
         $q .= "OR order_number LIKE '%" . $keyword . "%' ";
         $q .= "OR o.order_id=" . (int) $keyword . ' ';
         $q .= "OR order_item_name LIKE '%" . $keyword . "%') ";
         $q .= "AND oi.order_id=o.order_id ";
     }
     $q .= "ORDER BY o.cdate DESC";
     $count .= $q;
     $db->query($count);
     $db->next_record();
     $num_rows = $db->f('num_rows');
     if ($num_rows == 0) {
         echo "<span style=\"font-style:italic;\">" . $VM_LANG->_('PHPSHOP_ACC_NO_ORDERS') . "</span>\n";
         return;
     }
     $pageNav = new vmPageNav($num_rows, $limitstart, $limit);
     $list .= $q .= " LIMIT " . $pageNav->limitstart . ", {$limit} ";
     $db->query($list);
     $listObj = new listFactory($pageNav);
     if ($num_rows > 0) {
         // print out the search field and a list heading
         $listObj->writeSearchHeader('', '', 'account', 'index');
     }
     // start the list table
     $listObj->startTable();
     $listObj->writeTableHeader(3);
     while ($db->next_record()) {
         $order_status = ps_order_status::getOrderStatusName($db->f("order_status"));
         $listObj->newRow();
         $tmp_cell = "<a href=\"" . $sess->url($mm_action_url . "index.php?page=account.order_details&order_id=" . $db->f("order_id")) . "\">\n";
         $tmp_cell .= "<img src=\"" . IMAGEURL . "ps_image/goto.png\" height=\"32\" width=\"32\" align=\"middle\" border=\"0\" alt=\"" . $VM_LANG->_('PHPSHOP_ORDER_LINK') . "\" />&nbsp;" . $VM_LANG->_('PHPSHOP_VIEW') . "</a><br />";
         $listObj->addCell($tmp_cell);
         $tmp_cell = "<strong>" . $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_DATE') . ":</strong> " . vmFormatDate($db->f("cdate"), "%d. %B %Y");
         $tmp_cell .= "<br /><strong>" . $VM_LANG->_('PHPSHOP_ORDER_PRINT_TOTAL') . ":</strong> " . $CURRENCY_DISPLAY->getFullValue($db->f("order_total"), '', $db->f('order_currency'));
         $listObj->addCell($tmp_cell);
         $tmp_cell = "<strong>" . $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_STATUS') . ":</strong> " . $order_status;
         $tmp_cell .= "<br /><strong>" . $VM_LANG->_('PHPSHOP_ORDER_PRINT_PO_NUMBER') . ":</strong> " . sprintf("%08d", $db->f("order_id"));
         $listObj->addCell($tmp_cell);
     }
     $listObj->writeTable();
     $listObj->endTable();
     if ($num_rows > 0) {
         $listObj->writeFooter($keyword, '&Itemid=' . $sess->getShopItemid());
     }
 }
// Create the List Object with page navigation
$listObj = new listFactory($pageNav);
// print out the search field and a list heading
$listObj->writeSearchHeader($title, IMAGEURL . "ps_image/product_code.png", $modulename, "product_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_PRICE_LIST_GROUP_NAME') => '', $VM_LANG->_('PHPSHOP_PRICE_LIST_PRICE') => '', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_CURRENCY') => '', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_QUANTITY_START') => 'width="50"', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_QUANTITY_END') => 'width="50"', $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("product_price_id"), false, "product_price_id"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.product_price_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&product_price_id=" . $db->f("product_price_id") . "&product_id={$product_id}&product_parent_id={$product_parent_id}&return_args=" . urlencode($return_args);
    $tmp_cell = "<a href=" . $sess->url($url) . ">" . $db->f("shopper_group_name") . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($db->f("product_price"));
    $listObj->addCell($db->f("product_currency"));
    $listObj->addCell($db->f("price_quantity_start"));
    $listObj->addCell($db->f("price_quantity_end"));
    $listObj->addCell($ps_html->deleteButton("product_price_id", $db->f("product_price_id"), "productPriceDelete", $keyword, $limitstart, "&product_id={$product_id}&product_parent_id={$product_parent_id}&return_args=" . urlencode($return_args)));
    $i++;
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword, "&product_id={$product_id}&product_parent_id={$product_parent_id}&return_args={$return_args}");
Ejemplo n.º 9
0
$columns['<a href="javascript: document.adminForm.func.value = \'setFunctionPermissions\'; saveorder( ' . (count($db->record) - 1) . ' );"><img src="' . $mosConfig_live_site . '/administrator/images/filesave.png" border="0" width="16" height="16" alt="' . $VM_LANG->_('SAVE_PERMISSIONS') . '" align="left"/>' . $VM_LANG->_('SAVE_PERMISSIONS') . '</a>'] = '';
$columns[$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("function_id"), false, "function_id"));
    $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=admin.function_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&module_id={$module_id}&function_id=" . $db->f("function_id")) . "\">";
    $tmp_cell .= $db->f("function_name") . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($db->f("function_class"));
    $listObj->addCell($db->f("function_method"));
    $function_perms = explode(',', $db->f("function_perms"));
    while ($usergroups->next_record()) {
        $checked = in_array($usergroups->f('group_name'), $function_perms) ? 'checked="checked"' : '';
        $listObj->addCell('<input type="checkbox" name="function_perms[' . $i . '][' . $usergroups->f('group_name') . ']" value="1" ' . $checked . ' />');
    }
    $checked = in_array('none', $function_perms) ? 'checked="checked"' : '';
    $listObj->addCell('<input type="checkbox" name="function_perms[' . $i . '][none]" value="1" ' . $checked . ' />');
    $listObj->addCell('');
    $usergroups->reset();
    $listObj->addCell($ps_html->deleteButton("function_id", $db->f("function_id"), "functionDelete", $keyword, $limitstart, "&module_id={$module_id}"));
    $i++;
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword, "&module_id={$module_id}");
Ejemplo n.º 10
0
        $tmpcell = "<a title=\"" . $VM_LANG->_('PHPSHOP_PRODUCT_CLONE') . "\" onmouseout=\"MM_swapImgRestore();\"  onmouseover=\"MM_swapImage('copy_{$i}','','" . IMAGEURL . "ps_image/copy_f2.gif',1);\" href=\"";
        $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.product_form&clone_product=1&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&product_id=" . $db->f("product_id");
        if (!empty($product_parent_id)) {
            $url .= "&product_parent_id={$product_parent_id}";
        }
        $tmpcell .= $sess->url($url);
        $tmpcell .= "\"><img src=\"" . IMAGEURL . "/ps_image/copy.gif\" name=\"copy_{$i}\" border=\"0\" alt=\"" . $VM_LANG->_('PHPSHOP_PRODUCT_CLONE') . "\" /></a>";
        $listObj->addCell($tmpcell);
        $listObj->addCell($ps_html->deleteButton("product_id", $db->f("product_id"), "productDelete", $keyword, $limitstart));
        $listObj->addCell($db->f('product_id'));
        $i++;
    }
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword, "&product_parent_id={$product_parent_id}&category_id={$category_id}&product_type_id={$product_type_id}&search_date={$search_date}");
$path = defined('_VM_IS_BACKEND') ? '/administrator/' : '/';
?>
<script type="text/javascript">
var priceDlg = null;
function showPriceForm(prodId) {
    
    // define some private variables
    var showBtn;
	sUrl = '<?php 
$sess->purl($mm_action_url . 'index3.php?page=product.ajax_tools&task=getPriceForm&no_html=1', false, false, true);
?>
&product_id=' + prodId;
	callback = { success : function(o) { 
		
				        priceDlg = Ext.Msg.show({
$q = "SELECT * FROM #__{vm}_product_attribute_sku WHERE product_id = '{$product_id}' ";
$q .= "ORDER BY attribute_list,attribute_name";
$db->query($q);
// Create the List Object with page navigation
$listObj = new listFactory();
// print out the search field and a list heading
$listObj->writeSearchHeader($title, IMAGEURL . "ps_image/product_code.png", $modulename, "product_attribute_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(" . $db->num_rows() . ")\" />" => 'width="5%"', $VM_LANG->_('PHPSHOP_ATTRIBUTE_LIST_NAME') => 'width="30%"', $VM_LANG->_('PHPSHOP_ATTRIBUTE_LIST_ORDER') => 'width="45%"', $VM_LANG->_('E_REMOVE') => "width=\"5%\"");
$listObj->writeTableHeader($columns);
$i = 0;
while ($db->next_record()) {
    $attribute_name = $db->f("attribute_name");
    $url_att_name = urlencode($attribute_name);
    $listObj->newRow();
    // The row number
    $listObj->addCell($i + 1);
    // The Checkbox
    $listObj->addCell(vmCommonHTML::idBox($i, urlencode($db->f("attribute_name")), false, "attribute_name"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.product_attribute_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&product_id=" . $product_id . "&attribute_name=" . urlencode($db->f("attribute_name")) . "&return_args=" . urlencode($return_args);
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">{$attribute_name}</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($db->f("attribute_list"));
    $listObj->addCell($ps_html->deleteButton("attribute_name", $db->f("attribute_name"), "productAttributeDelete", $keyword, $limitstart, "&product_id={$product_id}"));
    $i++;
}
$listObj->writeTable();
$listObj->writeFooter("", "&product_id={$product_id}&return_args={$return_args}");
$listObj->endTable();