|
|
|
|
|
|
|
0) {
$products_query = tep_db_query($products_query_raw);
while ($products = tep_db_fetch_array($products_query)) {
if ((!isset($HTTP_GET_VARS['pID']) || (isset($HTTP_GET_VARS['pID']) && ($HTTP_GET_VARS['pID'] == $products['products_id']))) && !isset($pInfo) && (substr($action, 0, 3) != 'new')) {
$pInfo = new objectInfo($products);
}
if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id) ) {
echo ' ' . "\n";
$link = 'onclick="document.location.href=\'' . tep_href_link('stockadd.php', tep_get_all_get_params(array('page','pID','action')).'page=' . $HTTP_GET_VARS['page'] . '&pID=' . $pInfo->products_id . '&action=edit') . '\'"';
} else {
echo ' ' . "\n";
$link = 'onclick="document.location.href=\'' . tep_href_link('stockadd.php', tep_get_all_get_params(array('page','pID','action')).'page=' . $HTTP_GET_VARS['page'] . '&pID=' . $products['products_id']) . '\'"';
}
?>
| =tep_draw_checkbox_field('pid[]', $products['products_id'])?> |
'.$products['products_model'].'';
echo ' '. $products['products_name'].' | ';
echo ' '. $products['products_quantity'].' | ';
echo ' '. ( (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id))?(tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif')):('' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '')).' | ';
?>
|
| display_count($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?> |
display_links($products_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page'], tep_get_all_get_params(array('page','action'))); ?> |
|
|
'' . $pInfo->products_model . ': ' . $pInfo->products_name . '');
$contents = array('form' => tep_draw_form('products_edit_form', 'stockadd.php', tep_get_all_get_params(array('page','pID','action')). 'page=' . $HTTP_GET_VARS['page'] . '&pID=' . $pInfo->products_id . '&action=save'));
$contents[] = array('text' => '' . tep_draw_hidden_field('products_model', $pInfo->products_model));
$contents[] = array('text' => '' . tep_draw_hidden_field('products_name', $pInfo->products_name));
$contents[] = array('text' => '' . tep_draw_hidden_field('qty', $pInfo->products_quantity));
// Change qty by +/-; The new qty will be calculated later
$contents[] = array('text' => ' Change qty by +/-; The new qty will be calculated later ' . tep_draw_input_field('qtyadd', $pInfo->products_quantity_add));
// Date
$contents[] = array('text' => ' Date ' . tep_draw_input_field('stockdate', $pInfo->stockdate, 'size="10"'));
// Info-Text
$contents[] = array('text' => ' Info ' . tep_draw_input_field('stockinfo', $pInfo->stockinfo, 'size="40" '));
$contents[] = array('align' => 'center', 'text' => ' ' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' ' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
default:
if (is_object($pInfo)) {
$heading[] = array('text' => '' . $pInfo->products_name . '');
$contents[] = array('align' => 'center', 'text' => '' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '');
} break;
}
if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
echo ' ' . "\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' | ' . "\n";
}
?>
|
|