$listObj = new listFactory($pageNav);
// print out the search field and a list heading
$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>";
// 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_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);
Exemplo n.º 3
0
$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->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);
Exemplo n.º 5
0
// print out the search field and a list heading
$listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_FILES_LIST') . " " . $product_name, $mosConfig_live_site . "/administrator/images/mediamanager.png", $modulename, "file_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_FILES_LIST_FILENAME') => '', $VM_LANG->_('VM_FILES_LIST_ROLE') => '', $VM_LANG->_('PHPSHOP_VIEW') => '', $VM_LANG->_('PHPSHOP_FILES_LIST_FILETITLE') => '', $VM_LANG->_('PHPSHOP_FILES_LIST_FILETYPE') => '', $VM_LANG->_('PHPSHOP_FILEMANAGER_PUBLISHED') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\"");
$listObj->writeTableHeader($columns);
$roles = array('isDownlodable' => IMAGEURL . 'ps_image/downloadable.gif', 'isImage' => IMAGEURL . 'ps_image/image.gif', 'isProductImage' => IMAGEURL . 'ps_image/image.png', 'isFile' => IMAGEURL . 'ps_image/attachment.gif', 'isRemoteFile' => IMAGEURL . 'ps_image/url.gif');
// Reset Result pointer
$db->reset();
$i = 0;
while ($db->next_record()) {
    $filename = $mosConfig_absolute_path . str_replace($mosConfig_absolute_path, '', $db->f("file_name"));
    $listObj->newRow();
    // The row number
    $listObj->addCell($pageNav->rowNumber($i));
    $isProductDownload = in_array(basename($filename), $downloadFiles) ? true : false;
    // The Checkbox
    $listObj->addCell(vmCommonHTML::idBox($i, $db->f("file_id"), false, "file_id"));
    $tmp_cell = '';
    $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . '?page=product.file_form&amp;product_id=' . $product_id . '&amp;file_id=' . $db->f("file_id")) . '&amp;no_menu=' . @$_REQUEST['no_menu'] . '" title="' . $VM_LANG->_('PHPSHOP_MANUFACTURER_LIST_ADMIN') . '">';
    $style = '';
    if ($filename) {
        $role = $db->f("file_is_image") ? 'isImage' : 'isFile';
        if ($db->f('product_name')) {
            $role = 'isProductImage';
            $style = 'style="font-weight:bold;"';
        }
        if ($isProductDownload) {
            $role = 'isDownlodable';
        }
echo $VM_LANG->_('PHPSHOP_HIDE_OUT_OF_STOCK');
if ($allproducts == 1) {
    '</a>';
}
echo '<br /><br />';
// start the list table
$listObj->startTable();
// these are the columns in the table
$columns = array("#" => "width=\"20\"", $VM_LANG->_('PHPSHOP_PRODUCT_LIST_NAME') => '', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_SKU') => '', $VM_LANG->_('PHPSHOP_PRODUCT_INVENTORY_STOCK') => '', $VM_LANG->_('PHPSHOP_PRODUCT_INVENTORY_PRICE') => '', $VM_LANG->_('PHPSHOP_PRODUCT_INVENTORY_WEIGHT') => '', $VM_LANG->_('CMN_PUBLISHED') => '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 product name and link
    $link = $_SERVER['PHP_SELF'] . "?page={$modulename}.product_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&product_id=" . $db->f("product_id") . "&product_parent_id=" . $product_parent_id;
    if ($vmLayout != 'standard') {
        $link .= "&no_menu=1&tmpl=component";
        $link = defined('_VM_IS_BACKEND') ? str_replace('index2.php', 'index3.php', str_replace('index.php', 'index3.php', $link)) : str_replace('index.php', 'index2.php', $link);
    }
    $link = $sess->url($link);
    $text = shopMakeHtmlSafe($db->f("product_name"));
    if ($vmLayout == 'standard') {
        $tmpcell = vmCommonHTML::hyperLink($link, $text, '', 'Edit: ' . $text);
    } else {
        $tmpcell = vmCommonHTML::hyperLink($link, $text, '', 'Edit: ' . $text, 'onclick="parent.addSimplePanel( \'' . $db->getEscaped($db->f("product_name")) . '\', \'' . $link . '\' );return false;"');
    }
    $listObj->addCell($tmpcell);
    $listObj->addCell($db->f("product_sku"));
Exemplo n.º 7
0
// Create the List Object with page navigation
$listObj = new listFactory($pageNav);
$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') {
$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_ASSIGN_ZONE_PG_LBL'), '', $modulename, "assign_zones");
// start the list table
$listObj->startTable();
// these are the columns in the table
$columns = array("#" => "width=\"20\"", $VM_LANG->_('PHPSHOP_ZONE_ASSIGN_COUNTRY_LBL') => '', $VM_LANG->_('PHPSHOP_ZONE_ASSIGN_CURRENT_LBL') => '', $VM_LANG->_('PHPSHOP_ZONE_ASSIGN_ASSIGN_LBL') => '');
$listObj->writeTableHeader($columns);
$db->query($list);
$i = 0;
while ($db->next_record()) {
    $listObj->newRow();
    // The row number
    $listObj->addCell($pageNav->rowNumber($i));
    $tmp_cell = '<input type="hidden" name="country_id[]" value="' . $db->f("country_id") . '" />';
    $tmp_cell .= $db->f("country_name");
    $listObj->addCell($tmp_cell);
    // Get the zone rate for each country
    $per_item = $ps_zone->per_item($db->f("zone_id"));
    $zone_limit = $ps_zone->zone_limit($db->f("zone_id"));
    $tmp_cell = $VM_LANG->_('VM_ZONE_ASSIGN_PERITEM') . ': <strong>' . $CURRENCY_DISPLAY->getFullValue($per_item) . '</strong><br/>' . $VM_LANG->_('VM_ZONE_ASSIGN_LIMIT') . ': <strong>' . $CURRENCY_DISPLAY->getFullValue($zone_limit) . '</strong>';
    $listObj->addCell($tmp_cell);
    $tmp_cell = $ps_zone->list_zones("zone_id[]", $db->f("zone_id"));
    if ($db->f("zone_id") > "1") {
        $url = $_SERVER['PHP_SELF'] . "?page=zone.zone_form&zone_id=" . $db->f("zone_id");
        $tmp_cell .= "<a href=\"" . $sess->url($url) . "\">" . $VM_LANG->_('VM_ZONE_EDITZONE') . "</a>";
    }
    $listObj->addCell($tmp_cell);
    $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($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);
Exemplo n.º 10
0
    $columns[$VM_LANG->_('PHPSHOP_MANUFACTURER_MOD')] = "width=\"10%\"";
}
$columns[$VM_LANG->_('PHPSHOP_REVIEWS')] = "width=\"10%\"";
$columns[$VM_LANG->_('PHPSHOP_PRODUCT_LIST_PUBLISH')] = "";
$columns[$VM_LANG->_('PHPSHOP_PRODUCT_CLONE')] = "";
$columns[$VM_LANG->_('E_REMOVE')] = "width=\"5%\"";
$columns['Id'] = '';
$listObj->writeTableHeader($columns);
if ($num_rows > 0) {
    $i = 0;
    $db_cat = new ps_DB();
    $tmpcell = "";
    while ($db->next_record()) {
        $listObj->newRow();
        // The row number
        $listObj->addCell($pageNav->rowNumber($i));
        // The Checkbox
        $listObj->addCell(vmCommonHTML::idBox($i, $db->f("product_id"), false, "product_id"));
        $link = $_SERVER['PHP_SELF'] . "?page={$modulename}.product_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&product_id=" . $db->f("product_id") . "&product_parent_id=" . $product_parent_id;
        if ($vmLayout != 'standard') {
            $link .= "&no_menu=1&tmpl=component";
            $link = defined('_VM_IS_BACKEND') ? str_replace('index2.php', 'index3.php', str_replace('index.php', 'index3.php', $link)) : str_replace('index.php', 'index2.php', $link);
        }
        $link = $sess->url($link);
        $text = shopMakeHtmlSafe($db->f("product_name"));
        // The link to the product form / to the child products
        if ($vmLayout == 'standard') {
            $tmpcell = vmCommonHTML::hyperLink($link, $text, '', 'Edit: ' . $text);
        } else {
            $tmpcell = vmCommonHTML::hyperLink($link, $text, '', 'Edit: ' . $text, 'onclick="parent.addSimplePanel( \'' . $db->getEscaped($db->f("product_name")) . '\', \'' . $link . '\' );return false;"');
        }
Exemplo n.º 11
0
$columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . count($db->record) . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_FUNCTION_LIST_NAME') => "", $VM_LANG->_('PHPSHOP_FUNCTION_LIST_CLASS') => "", $VM_LANG->_('PHPSHOP_FUNCTION_LIST_METHOD') => "");
$usergroups = $vmUserGroup->get_groups();
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('');
Exemplo n.º 12
0
    $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 = \'setModulePermissions\'; 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->_('PHPSHOP_MODULE_LIST_FUNCTIONS')] = 'width="10%"';
$columns[$VM_LANG->_('VM_FIELDMANAGER_REORDER')] = "width=\"5%\"";
$columns[vmCommonHTML::getSaveOrderButton(count($db->record) - 1, 'changeordering')] = 'width="8%"';
$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("module_id"), false, "module_id"));
    $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page={$modulename}.module_form&&limitstart={$limitstart}&module_id=" . $db->f("module_id")) . "\">";
    $tmp_cell .= $db->f("module_name") . "</a>";
    $listObj->addCell($tmp_cell);
    $module_perms = explode(',', $db->f("module_perms"));
    while ($usergroups->next_record()) {
        $checked = in_array($usergroups->f('group_name'), $module_perms) ? 'checked="checked"' : '';
        if ($db->f("module_name") == 'admin' && $usergroups->f('group_name') == 'admin') {
            $type = 'hidden';
        } else {
            $type = 'checkbox';
        }
        $listObj->addCell('<input type="' . $type . '" name="module_perms[' . $i . '][' . $usergroups->f('group_name') . ']" value="1" ' . $checked . ' />');
    }
$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_SHOPPER_GROUP_LIST_LBL'), VM_THEMEURL . "images/administration/dashboard/shop_users.png", $modulename, "shopper_group_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_SHOPPER_GROUP_LIST_NAME') => 'width="30%"', $VM_LANG->_('PHPSHOP_PRODUCT_FORM_VENDOR') => '', $VM_LANG->_('PHPSHOP_SHOPPER_GROUP_LIST_DESCRIPTION') => '', $VM_LANG->_('PHPSHOP_DEFAULT') => '', $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("shopper_group_id"), false, "shopper_group_id"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.shopper_group_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&shopper_group_id=" . $db->f("shopper_group_id");
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . $db->f("shopper_group_name") . "</a>";
    $listObj->addCell($tmp_cell);
    include_class("vendor");
    global $ps_vendor;
    $listObj->addCell($ps_vendor->get_name($db->f("vendor_id")));
    $listObj->addCell($db->f("shopper_group_desc"));
    $tmp_cell = '<img src="';
    $tmp_cell .= $db->f("default") == "1" ? $mosConfig_live_site . '/administrator/images/tick.png"' : $mosConfig_live_site . '/administrator/images/publish_x.png"';
    $tmp_cell .= 'border="0" />';
    $listObj->addCell($tmp_cell);
    $listObj->addCell($ps_html->deleteButton("shopper_group_id", $db->f("shopper_group_id"), "shopperGroupDelete", $keyword, $limitstart));
    $i++;
Exemplo n.º 14
0
echo $VM_LANG->_('PHPSHOP_SHOW_DISCOUNTED');
if ($filter != 'discounted') {
    echo '</a>';
}
echo '<br /><br />';
// start the list table
$listObj->startTable();
// these are the columns in the table
$columns = array("#" => "width=\"20\"", $VM_LANG->_('PHPSHOP_PRODUCT_LIST_NAME') => '', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_SKU') => '', $VM_LANG->_('PHPSHOP_PRODUCT_INVENTORY_PRICE') => '', $VM_LANG->_('PHPSHOP_FEATURED') => '', $VM_LANG->_('PHPSHOP_PAYMENT_METHOD_LIST_DISCOUNT') => '', $VM_LANG->_('PHPSHOP_FILEMANAGER_PUBLISHED') => '');
$listObj->writeTableHeader($columns);
$db->query($list);
$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 {
Exemplo n.º 15
0
$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_TAX_LIST_LBL'), VM_THEMEURL . "images/administration/dashboard/tax.png", $modulename, "tax_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_TAX_LIST_COUNTRY') => 'width="44%"', $VM_LANG->_('PHPSHOP_TAX_LIST_STATE') => 'width="38%"', $VM_LANG->_('PHPSHOP_TAX_LIST_RATE') => 'width="18%"', $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("tax_rate_id"), false, "tax_rate_id"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.tax_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&tax_rate_id=" . $db->f("tax_rate_id");
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . $db->f("tax_country") . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($db->f("tax_state"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.tax_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&tax_rate_id=" . $db->f("tax_rate_id");
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . sprintf("%8.4f", $db->f("tax_rate")) . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($ps_html->deleteButton("tax_rate_id", $db->f("tax_rate_id"), "deleteTaxRate", $keyword, $limitstart));
    $i++;
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword);
$list .= $q . 'LIMIT ' . $pageNav->limitstart . ', ' . $pageNav->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/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}");
Exemplo n.º 17
0
// 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_ZONE_LIST_LBL'), "", $modulename, "zone_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_ZONE_LIST_NAME_LBL') => '', $VM_LANG->_('PHPSHOP_ZONE_LIST_DESC_LBL') => '', $VM_LANG->_('PHPSHOP_ZONE_LIST_COST_PER_LBL') => '', $VM_LANG->_('PHPSHOP_ZONE_LIST_COST_LIMIT_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("product_id"), false, "product_id"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.zone_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&zone_id=" . $db->f("zone_id");
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . $db->f("zone_name") . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($db->f("zone_description"));
    $listObj->addCell($db->f("zone_cost"));
    $listObj->addCell($db->f("zone_limit"));
    $listObj->addCell($ps_html->deleteButton("zone_id", $db->f("zone_id"), "deletezone", $keyword, $limitstart));
    $i++;
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword);
// 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->_('VM_AFFILIATE_ORDERSUMMARY_LBL') . ' ' . strftime('%b %Y', $date), "", "affiliate", "affiliate_orders_list");
echo $affiliate["company"];
// 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_AFFILIATE_ORDERLIST_ORDERREF') => "", $VM_LANG->_('VM_AFFILIATE_ORDERLIST_DATEORDERED') => "", $VM_LANG->_('VM_AFFILIATE_ORDERLIST_ORDERTOTAL') => "", $VM_LANG->_('VM_AFFILIATE_ORDERLIST_COMMISSION') => "", $VM_LANG->_('VM_AFFILIATE_ORDERLIST_ORDERSTATUS') => "", $VM_LANG->_('E_REMOVE') => "width=\"5%\"");
$listObj->writeTableHeader($columns);
while ($db->next_record()) {
    $listObj->newRow();
    // The row number
    $listObj->addCell($pageNav->rowNumber($i));
    // The Checkbox
    $listObj->addCell(vmCommonHTML::idBox($i, $db->f("order_id"), false, "order_id"));
    $listObj->addCell(sprintf("%08d", $db->f("order_id")));
    $tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=affiliate.orders_detail&print=1&order_id=" . $db->f("order_id")) . "\">View</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell(date("d-m-y", $db->f("cdate")));
    $listObj->addCell(sprintf("%1.2f", $db->f("order_subtotal")));
    $listObj->addCell(sprintf("%1.2f", $db->f("order_subtotal") * $db->f("rate") * 0.01));
    $listObj->addCell($db->f("order_status"));
    $listObj->addCell($ps_html->deleteButton("order_id", $db->f("order_id"), "orderDelete", $keyword, $limitstart));
    $i++;
}
$listObj->writeTable();
$listObj->endTable();
$listObj->writeFooter($keyword);
Exemplo n.º 19
0
$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_RATE_LIST_LBL'), VM_THEMEURL . "images/administration/dashboard/shipping.gif", $modulename, "rate_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_SHIPPING_RATE_LIST_CARRIER_LBL') => '', $VM_LANG->_('PHPSHOP_SHIPPING_RATE_LIST_RATE_NAME') => '', $VM_LANG->_('PHPSHOP_SHIPPING_RATE_LIST_RATE_WSTART') => '', $VM_LANG->_('PHPSHOP_SHIPPING_RATE_LIST_RATE_WEND') => '', $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_rate_id"), false, "shipping_rate_id"));
    $cdb = new ps_DB();
    $cq = "SELECT shipping_carrier_name FROM #__{vm}_shipping_carrier WHERE ";
    $cq .= "shipping_carrier_id = '" . $db->f("shipping_rate_carrier_id") . "'";
    $cdb->query($cq);
    $cdb->next_record();
    $listObj->addCell($cdb->f("shipping_carrier_name"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.rate_form&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&shipping_rate_id=" . $db->f("shipping_rate_id");
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . $db->f("shipping_rate_name") . "</a>";
    $listObj->addCell($tmp_cell);
    $listObj->addCell($db->f("shipping_rate_weight_start"));
    $listObj->addCell($db->f("shipping_rate_weight_end"));
    $listObj->addCell($ps_html->deleteButton("shipping_rate_id", $db->f("shipping_rate_id"), "rateDelete", $keyword, $limitstart));
    $i++;
Exemplo n.º 20
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);
Exemplo n.º 21
0
</div>
<br />
<?php 
$listObj->startTable();
// these are the columns in the table
$checklimit = $num_rows < $limit ? $num_rows : $limit;
$columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $checklimit . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_ORDER_LIST_ID') => '', $VM_LANG->_('PHPSHOP_ORDER_PRINT_NAME') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_PRINT_LABEL') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_TRACK') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_VOID_LABEL') => '', $VM_LANG->_('PHPSHOP_CHECK_OUT_THANK_YOU_PRINT_VIEW') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_CDATE') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_MDATE') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_STATUS') => '', $VM_LANG->_('PHPSHOP_UPDATE') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_TOTAL') => '', $VM_LANG->_('E_REMOVE') => "width=\"5%\"");
$listObj->writeTableHeader($columns);
// so we can determine if shipping labels can be printed
$dbl = new ps_DB();
$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_id"), false, "order_id"));
    $url = $_SERVER['PHP_SELF'] . "?page={$modulename}.order_print&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&order_id=" . $db->f("order_id");
    $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . sprintf("%08d", $db->f("order_id")) . "</a><br />";
    $listObj->addCell($tmp_cell);
    $tmp_cell = $db->f('first_name') . ' ' . $db->f('last_name');
    if ($perm->check('admin') && defined('_VM_IS_BACKEND')) {
        $url = $_SERVER['PHP_SELF'] . "?page=admin.user_form&amp;user_id=" . $db->f("user_id");
        $tmp_cell = '<a href="' . $sess->url($url) . '">' . $tmp_cell . '</a>';
    }
    $listObj->addCell($tmp_cell);
    // Look in #__{vm}_shipping_label for this order and extract the
    // shipping class name.  Then check to see if the shipping module
    // supports generating shipping labels.  If so, add a print icon
    // button for printing the label, otherwise leave the column empty.
Exemplo n.º 22
0
$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);
Exemplo n.º 23
0
$listObj = new listFactory($pageNav);
// print out the search field and a list heading
$listObj->writeSearchHeader($VM_LANG->_('PHPSHOP_USER_LIST_LBL'), VM_THEMEURL . 'images/administration/header/icon-48-user.png', $modulename, "user_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_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 {
// 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, 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();
$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}");
Exemplo n.º 26
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());
     }
 }
Exemplo n.º 27
0
	
	<?php 
    // Create the Page Navigation
    $pageNav = new vmPageNav($num_rows, $limitstart, $limit);
    // Create the List Object with page navigation
    $listObj = new listFactory($pageNav);
    $listObj->startTable();
    // these are the columns in the table
    $columns = array("#" => "width=\"20\"", $VM_LANG->_('PHPSHOP_ORDER_LIST_ID') => '', $VM_LANG->_('PHPSHOP_CHECK_OUT_THANK_YOU_PRINT_VIEW') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_CDATE') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_MDATE') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_STATUS') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_TOTAL') => '', $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));
        $url = $_SERVER['PHP_SELF'] . "?page=order.order_print&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&order_id=" . $db->f("order_id");
        $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . sprintf("%08d", $db->f("order_id")) . "</a><br />";
        $listObj->addCell($tmp_cell);
        $details_url = $sess->url($_SERVER['PHP_SELF'] . "?page=order.order_printdetails&amp;order_id=" . $db->f("order_id") . "&amp;no_menu=1");
        $details_url = stristr($_SERVER['PHP_SELF'], "index2.php") ? str_replace("index2.php", "index3.php", $details_url) : str_replace("index.php", "index2.php", $details_url);
        $details_link = "&nbsp;<a href=\"javascript:void window.open('{$details_url}', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');\">";
        $details_link .= "<img src=\"{$mosConfig_live_site}/images/M_images/printButton.png\" align=\"center\" height=\"16\" width=\"16\" border=\"0\" /></a>";
        $listObj->addCell($details_link);
        //$listObj->addCell( strftime("%d-%b-%y %H:%M", $db->f("cdate")));  //Original
        $listObj->addCell(date("Y-m-d G:i:s", $db->f("cdate") + $mosConfig_offset * 60 * 60));
        //Custom
        //$listObj->addCell( strftime("%d-%b-%y %H:%M", $db->f("mdate")));  //Original
        $listObj->addCell(date("Y-m-d G:i:s", $db->f("mdate") + $mosConfig_offset * 60 * 60));
        //Custom
        $listObj->addCell($ps_order_status->getOrderStatusName($db->f("order_status")));
$url = $_SERVER['PHP_SELF'] . "?page={$modulename}.product_form&product_id={$product_id}&product_parent_id={$product_parent_id}";
$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);
$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->_('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();
Exemplo n.º 30
0
	
	<?php 
    // Create the Page Navigation
    $pageNav = new vmPageNav($num_rows, $limitstart, $limit);
    // Create the List Object with page navigation
    $listObj = new listFactory($pageNav);
    $listObj->startTable();
    // these are the columns in the table
    $columns = array("#" => "width=\"20\"", $VM_LANG->_('PHPSHOP_ORDER_LIST_ID') => '', $VM_LANG->_('PHPSHOP_CHECK_OUT_THANK_YOU_PRINT_VIEW') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_CDATE') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_MDATE') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_STATUS') => '', $VM_LANG->_('PHPSHOP_ORDER_LIST_TOTAL') => '', $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));
        $url = $_SERVER['PHP_SELF'] . "?page=order.order_print&limitstart={$limitstart}&keyword=" . urlencode($keyword) . "&order_id=" . $db->f("order_id");
        $tmp_cell = "<a href=\"" . $sess->url($url) . "\">" . sprintf("%08d", $db->f("order_id")) . "</a><br />";
        $listObj->addCell($tmp_cell);
        $details_url = $sess->url($_SERVER['PHP_SELF'] . "?page=order.order_printdetails&amp;order_id=" . $db->f("order_id") . "&amp;no_menu=1");
        $details_url = stristr($_SERVER['PHP_SELF'], "index2.php") ? str_replace("index2.php", "index3.php", $details_url) : str_replace("index.php", "index2.php", $details_url);
        $details_link = "&nbsp;<a href=\"javascript:void window.open('{$details_url}', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=480,directories=no,location=no');\">";
        $details_link .= "<img src=\"{$mosConfig_live_site}/images/M_images/printButton.png\" align=\"center\" height=\"16\" width=\"16\" border=\"0\" /></a>";
        $listObj->addCell($details_link);
        $listObj->addCell(strftime("%d-%b-%y %H:%M", $db->f("cdate")));
        $listObj->addCell(strftime("%d-%b-%y %H:%M", $db->f("mdate")));
        $listObj->addCell($ps_order_status->getOrderStatusName($db->f("order_status")));
        $listObj->addCell($CURRENCY_DISPLAY->getFullValue($db->f("order_total")));
        $listObj->addCell($ps_html->deleteButton("order_id", $db->f("order_id"), "orderDelete", $keyword, $limitstart . '&user_id=' . $user_id));
        $i++;
    }