$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);
Example #2
0
// 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);
Example #3
0
$title = $VM_LANG->_('PHPSHOP_REVIEWS');
// print out the search field and a list heading
$listObj->writeSearchHeader($title, VM_THEMEURL . 'images/administration/dashboard/reviews.png', $modulename, "review_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_PRODUCT_NAME_TITLE') => 'width="20%"', $VM_LANG->_('VM_REVIEW_LIST_NAMEDATE') => 'width="15%"', $VM_LANG->_('PHPSHOP_REVIEWS') => 'width="35%"', $VM_LANG->_('PHPSHOP_RATE_NOM') => 'width="15%"', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_PUBLISH') => 'width="5%"', $VM_LANG->_('E_REMOVE') => 'width="10%"');
$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("review_id"), false, "review_id"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.product_form&product_id=" . $db->f('product_id');
    $link = "<a href=\"" . $sess->url($url) . "\">" . $db->f('product_name') . "</a>";
    // The Product Name
    $listObj->addCell($link);
    $text = $db->f("username") . "</strong><br />(" . date("Y-m-d", $db->f("time")) . ")";
    if ($perm->check('admin')) {
        $text = '<a href="' . $sess->url($_SERVER['PHP_SELF'] . '?page=product.review_form&amp;review_id=' . $db->f('review_id')) . '">' . $text . '</a>';
    }
    $listObj->addCell($text);
    $listObj->addCell(substr($db->f("comment"), 0, 500));
    $listObj->addCell('<img src="' . VM_THEMEURL . 'images/stars/' . $db->f("user_rating") . '.gif" border="0" alt="stars" />');
    $tmpcell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=product.review_list&product_id={$product_id}&review_id=" . $db->f('review_id') . "&func=changePublishState");
    if ($db->f("published") == 'N') {
        $tmpcell .= "&task=publish\">";
    } else {
$listObj = new listFactory($pageNav);
// print out the search field and a list heading
$listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_PAYMENT_METHOD_LIST_LBL'), VM_THEMEURL . 'images/administration/dashboard/payment.png', $modulename, "payment_method_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_PAYMENT_METHOD_LIST_NAME') => '', $VM_LANG->_('PHPSHOP_PAYMENT_METHOD_LIST_CODE') => '', $VM_LANG->_('PHPSHOP_PAYMENT_METHOD_LIST_DISCOUNT') => '', $VM_LANG->_('PHPSHOP_PAYMENT_METHOD_LIST_SHOPPER_GROUP') => '', $VM_LANG->_('PHPSHOP_PAYMENT_METHOD_LIST_ENABLE_PROCESSOR') => '', $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("payment_method_id"), false, "payment_method_id"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.payment_method_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&payment_method_id=" . $db->f("payment_method_id");
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . $db->f("payment_method_name") . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($db->f("payment_method_code"));
    if ($db->f('payment_method_discount_is_percent')) {
        $tmp_cell = $db->f("payment_method_discount") . '%';
    } else {
        $tmp_cell = $GLOBALS['CURRENCY_DISPLAY']->getFullValue($db->f("payment_method_discount"));
    }
    $listObj->addCell($tmp_cell);
    $shopper_group_name = $db->f("shopper_group_name");
    $tmp_cell = empty($shopper_group_name) ? '' : $shopper_group_name;
    $listObj->addCell($tmp_cell);
    $enable_processor = $db->f("enable_processor");
    switch ($enable_processor) {
        $nrows = $pageNav->limitstart + $pageNav->limit;
    }
}
for ($n = $pageNav->limitstart; $n < $nrows; $n++) {
    if (!isset($row_list[$n])) {
        $row_list[$n] = $n;
    }
    if (!isset($depth_list[$n])) {
        $depth_list[$n] = 0;
    }
    $catname = shopMakeHtmlSafe($categories[$row_list[$n]]["category_name"]);
    $listObj->newRow();
    // The row number
    $listObj->addCell($pageNav->rowNumber($ibg));
    // The Checkbox
    $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("&nbsp;&nbsp;&nbsp;", $repeat) . "&#095&#095;|" . $repeat . "|&nbsp;" . "<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("&nbsp;&nbsp;" . $desc);
    $listObj->addCell(ps_product_category::product_count($categories[$row_list[$n]]["category_child_id"]) . "&nbsp;<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"]);
Example #6
0
$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_CURRENCY_LIST_LBL'), VM_THEMEURL . 'images/administration/dashboard/currency.png', "admin", "curr_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_CURRENCY_LIST_NAME') => "", $VM_LANG->_('PHPSHOP_CURRENCY_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("currency_id"), false, "currency_id"));
    $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=admin.curr_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&currency_id=" . $db->f("currency_id")) . "\">";
    $tmp_cell .= $db->f("currency_name") . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($db->f("currency_code"));
    $listObj->addCell($ps_html->deleteButton("currency_id", $db->f("currency_id"), "currencyDelete", $keyword, $limitstart));
    $i++;
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword);
$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_VENDOR_CAT_LIST_LBL'), "", $modulename, "vendor_category_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_VENDOR_CAT_NAME') => 'width="21%"', $VM_LANG->_('PHPSHOP_VENDOR_CAT_DESCRIPTION') => 'width="66%"', $VM_LANG->_('PHPSHOP_VENDOR_CAT_VENDORS') => 'width="13%"', $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("vendor_category_id"), false, "vendor_category_id"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.vendor_category_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&vendor_category_id=" . $db->f("vendor_category_id");
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . $db->f("vendor_category_name") . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($db->f("vendor_category_desc"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.vendor_list&vendor_category_id=" . $db->f("vendor_category_id");
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . $VM_LANG->_('PHPSHOP_LIST') . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($ps_html->deleteButton("vendor_category_id", $db->f("vendor_category_id"), "vendorCategoryDelete", $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_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);
$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_MANUFACTURER_LIST_LBL'), VM_THEMEURL . 'images/administration/dashboard/manufacturer.png', $modulename, "manufacturer_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\"", 'ID' => 'width="5%"', $VM_LANG->_('PHPSHOP_MANUFACTURER_LIST_MANUFACTURER_NAME') => 'width="45%"', $VM_LANG->_('PHPSHOP_MANUFACTURER_LIST_ADMIN') => 'width="45%"', $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("manufacturer_id"), false, "manufacturer_id"));
    $listObj->addCell($db->f('manufacturer_id'));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.manufacturer_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&manufacturer_id=";
    $url .= $db->f("manufacturer_id");
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . $db->f("mf_name") . "</a><br />";
    $listObj->addCell($tmp_cell);
    $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page={$modulename}.manufacturer_form&manufacturer_id=" . $db->f("manufacturer_id")) . "\">" . $VM_LANG->_('PHPSHOP_UPDATE') . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($ps_html->deleteButton("manufacturer_id", $db->f("manufacturer_id"), "manufacturerDelete", $keyword, $limitstart));
    $i++;
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword);
Example #10
0
$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_CARRIER_LIST_LBL'), VM_THEMEURL . "images/administration/dashboard/ups.gif", $modulename, "carrier_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_CARRIER_LIST_NAME_LBL') => '', $VM_LANG->_('PHPSHOP_CARRIER_LIST_ORDER_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("shipping_carrier_id"), false, "shipping_carrier_id"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.carrier_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&shipping_carrier_id=" . $db->f("shipping_carrier_id");
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . $db->f("shipping_carrier_name") . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($db->f("shipping_carrier_list_order"));
    $listObj->addCell($ps_html->deleteButton("shipping_carrier_id", $db->f("shipping_carrier_id"), "carrierDelete", $keyword, $limitstart));
    $i++;
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword);
Example #11
0
while ($usergroups->next_record()) {
    $columns[$usergroups->f('group_name')] = 'width="5%"';
    $groupArray[] = $usergroups->f('group_name');
}
$columns['none'] = 'width="5%"';
$usergroups->reset();
$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}"));
$listObj->writeSearchHeader($VM_LANG->_('VM_MANAGE_USER_FIELDS'), $mosConfig_live_site . "/administrator/images/addusers.png", "admin", "user_field_list");
// start the list table
$listObj->startTable();
// these are the columns in the table
$columns = array("#" => "", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $pageNav->limit . ")\" />" => "", $VM_LANG->_('VM_FIELDMANAGER_NAME') => "width=\"20%\"", $VM_LANG->_('VM_FIELDMANAGER_TITLE') => "width=\"20%\"", $VM_LANG->_('VM_FIELDMANAGER_TYPE') => "width=\"10%\"", $VM_LANG->_('VM_FIELDMANAGER_REQUIRED') => "width=\"5%\"", $VM_LANG->_('VM_FIELDMANAGER_PUBLISHED') => "width=\"5%\"", $VM_LANG->_('VM_FIELDMANAGER_SHOW_ON_REGISTRATION') => "width=\"5%\"", $VM_LANG->_('VM_FIELDMANAGER_SHOW_ON_SHIPPING') => "width=\"5%\"", $VM_LANG->_('VM_FIELDMANAGER_SHOW_ON_ACCOUNT') => "width=\"5%\"", $VM_LANG->_('VM_FIELDMANAGER_REORDER') => "width=\"5%\"", vmCommonHTML::getSaveOrderButton(min($total - $pageNav->limitstart, $pageNav->limit), 'changeordering') => 'width="8%"', $VM_LANG->_('E_REMOVE') => "width=\"5%\"");
$listObj->writeTableHeader($columns);
$db->query("SELECT f.fieldid, f.sys, f.title, f.name, f.description, f.type, f.required, f.published, f.account, f.ordering, f.registration, f.shipping" . "\nFROM #__{vm}_userfield AS f" . (count($where) ? "\nWHERE " . implode(' AND ', $where) : "") . "\n ORDER BY f.ordering" . "\nLIMIT {$pageNav->limitstart}, {$pageNav->limit}");
// The list of fields which CAN'T BE UNPUBLISHED OR UNREQUIRED
$coreFields = array('username', 'email', 'password', 'password2');
$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("fieldid"), 0, "fieldid"));
    $listObj->addCell('<a href="' . $sess->url($_SERVER['PHP_SELF'] . '?page=admin.user_field_form&fieldid=' . $db->f('fieldid')) . '">' . $db->f('name') . '</a>');
    $lang_string = $db->f('title');
    if ($lang_string[0] == '_') {
        $lang_string = substr($lang_string, 1);
    }
    $listObj->addCell($VM_LANG->_($lang_string) ? $VM_LANG->_($lang_string) : $db->f('title'));
    $listObj->addCell($db->f('type'));
    // Required?
    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=required");
        $tmp_cell .= $db->f('required') ? "&task=unpublish\">" : ($tmp_cell .= "&task=publish\">");
        $tmp_cell .= vmCommonHTML::getYesNoIcon($db->f('required'));
        $tmp_cell .= "</a>";
    } else {
        $tmp_cell = vmCommonHTML::getYesNoIcon($db->f('required'));
$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();
$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}");
$listObj = new listFactory($pageNav);
// print out the search field and a list heading
$listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_LIST_LBL'), IMAGEURL . "ps_image/percentage.png", $modulename, "product_discount_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_PRODUCT_DISCOUNT_AMOUNT') => '', $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_AMOUNTTYPE') => '', $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_STARTDATE') => '', $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_ENDDATE') => '', $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("discount_id"), false, "discount_id"));
    $tmp_cell = '<a href="' . $sess->url($_SERVER['PHP_SELF'] . '?page=product.product_discount_form&discount_id=' . $db->f("discount_id")) . '">' . $db->f("amount") . '</a>';
    $listObj->addCell($tmp_cell);
    $tmp_cell = $db->f("is_percent") == '1' ? $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_ISPERCENT') : $VM_LANG->_('PHPSHOP_PRODUCT_DISCOUNT_ISTOTAL');
    $listObj->addCell($tmp_cell);
    if ($db->f("start_date")) {
        $tmp_cell = strftime("%Y-%m-%d", $db->f("start_date"));
    } else {
        $tmp_cell = "-";
    }
    $listObj->addCell($tmp_cell);
    if ($db->f("end_date")) {
        $tmp_cell = strftime("%Y-%m-%d", $db->f("end_date"));
    } else {
        $tmp_cell = "-";
    }
// print out the search field and a list heading
$listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_PRODUCT_TYPE_LIST_LBL'), IMAGEURL . "ps_image/categories.gif", $modulename, "product_type_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_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') . "&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( $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&nbsp;" . $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++;
$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, IMAGEURL . "ps_image/categories.gif", $modulename, "product_type_parameter_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_PRODUCT_TYPE_PARAMETER_FORM_LABEL') => 'width="25%"', $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_PARAMETER_FORM_NAME') => 'width="20%"', $VM_LANG->_('PHPSHOP_PRODUCT_TYPE_FORM_DESCRIPTION') => 'width="40%"', $VM_LANG->_('PHPSHOP_MODULE_LIST_ORDER') => 'width="5%"', $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("parameter_name"), false, "parameter_name"));
    $tmp_cell = "<a href=\"" . $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_type_parameter_form&product_type_id=" . $db->f("product_type_id") . "&parameter_name=" . $db->f("parameter_name") . "&task=edit\">" . $db->f("parameter_label") . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($db->f("parameter_name"));
    $listObj->addCell($db->f("parameter_description"));
    //      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, 'ProductTypeReorderParam') . "\n&nbsp;" . $pageNav->orderDownIcon($i, $db->num_rows(), $i - 1 <= $db->num_rows(), "orderdown", $VM_LANG->_('CMN_ORDER_DOWN'), $page, 'ProductTypeReorderParam') . "</div>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($ps_html->deleteButton("parameter_name", $db->f("parameter_name"), "ProductTypeDeleteParam", $keyword, $limitstart, "&product_type_id=" . $product_type_id));
    $i++;
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword, "&product_type_id=" . $product_type_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);
Example #19
0
$listObj = new listFactory($pageNav);
// print out the search field and a list heading
$listObj->writeSearchHeader($VM_LANG->_('VM_ORDER_EXPORT_MODULE_LIST_LBL'), IMAGEURL . "ps_image/modules.gif", $modulename, "export_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->_('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));