|
|
' . zen_image_button('button_reset.gif', IMAGE_RESET) . ' ';
}
echo HEADING_TITLE_SEARCH_DETAIL . ' ' . zen_draw_input_field('search') . zen_hide_session_id();
if (isset($_GET['search']) && zen_not_null($_GET['search'])) {
$keywords = zen_db_input(zen_db_prepare_input($_GET['search']));
echo ' ' . TEXT_INFO_SEARCH_DETAIL_FILTER . $keywords;
}
?>
|
|
|
0) ? 'page=' . $_GET['page'] . '&' : '') . 'action=new') . '">' . zen_image_button('button_new_product.gif', IMAGE_NEW_PRODUCT) . ''; ?> |
Execute("select p.products_id, pd.products_name, p.products_price, p.products_priced_by_attribute,
f.expires_date, f.featured_date_available
from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " .
TABLE_FEATURED . " f
where p.products_id = pd.products_id
and pd.language_id = '" . (int)$_SESSION['languages_id'] . "'
and p.products_id = f.products_id
and f.featured_id = '" . (int)$_GET['fID'] . "'");
$fInfo = new objectInfo($product->fields);
if ($fInfo->products_priced_by_attribute == '1') {
$fInfo->products_price = zen_get_products_base_price($product->fields['products_id']);
}
} else {
$fInfo = new objectInfo(array());
// create an array of featured products, which will be excluded from the pull down menu of products
// (when creating a new featured product)
$featured_array = array();
$featured = $db->Execute("select p.products_id, p.products_model
from " . TABLE_PRODUCTS . " p, " . TABLE_FEATURED . " f
where f.products_id = p.products_id");
while (!$featured->EOF) {
$featured_array[] = $featured->fields['products_id'];
$featured->MoveNext();
}
// do not include things that cannot go in the cart
$not_for_cart = $db->Execute("select p.products_id from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCT_TYPES . " pt on p.products_type= pt.type_id where pt.allow_add_to_cart = 'N'");
while (!$not_for_cart->EOF) {
$featured_array[] = $not_for_cart->fields['products_id'];
$not_for_cart->MoveNext();
}
}
?>
' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . ''; ?> |
|
|
|
|
|
|
|
|
Execute($featured_query_raw);
while (!$featured->EOF) {
if ((!isset($_GET['fID']) || (isset($_GET['fID']) && ($_GET['fID'] == $featured->fields['featured_id']))) && !isset($fInfo)) {
$products = $db->Execute("select products_image
from " . TABLE_PRODUCTS . "
where products_id = '" . (int)$featured->fields['products_id'] . "'");
$fInfo_array = array_merge($featured->fields, $products->fields);
$fInfo = new objectInfo($fInfo_array);
}
if (isset($fInfo) && is_object($fInfo) && ($featured->fields['featured_id'] == $fInfo->featured_id)) {
echo ' ' . "\n";
} else {
echo ' ' . "\n";
}
?>
fields['products_id']; ?> |
fields['products_name']; ?> |
fields['products_model']; ?> |
fields['featured_date_available'] != '0001-01-01' and $featured->fields['featured_date_available'] !='') ? zen_date_short($featured->fields['featured_date_available']) : TEXT_NONE); ?> |
fields['expires_date'] != '0001-01-01' and $featured->fields['expires_date'] !='') ? zen_date_short($featured->fields['expires_date']) : TEXT_NONE); ?> |
fields['status'] == '1') {
echo '' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON) . '';
} else {
echo '' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . '';
}
?>
|
fields['featured_id'] . '&action=edit') . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . ''; ?>
fields['featured_id'] . '&action=delete') . '">' . zen_image(DIR_WS_IMAGES . 'icon_delete.gif', ICON_DELETE) . ''; ?>
fields['featured_id'] == $fInfo->featured_id)) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ''; } ?>
|
MoveNext();
}
?>
display_count($featured_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_FEATURED_ADMIN, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_FEATURED); ?> |
display_links($featured_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_FEATURED_ADMIN, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?> |
' . zen_image_button('button_new_product.gif', IMAGE_NEW_PRODUCT) . ''; ?> |
|
|
'' . TEXT_INFO_HEADING_DELETE_FEATURED . '');
$contents = array('form' => zen_draw_form('featured', FILENAME_FEATURED, 'page=' . $_GET['page'] . '&fID=' . $fInfo->featured_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
$contents[] = array('text' => ' ' . $fInfo->products_name . '');
$contents[] = array('align' => 'center', 'text' => ' ' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' ' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
case 'pre_add':
$heading[] = array('text' => '' . TEXT_INFO_HEADING_PRE_ADD_FEATURED . '');
$contents = array('form' => zen_draw_form('featured', FILENAME_FEATURED, 'action=pre_add_confirmation'));
$contents[] = array('text' => TEXT_INFO_PRE_ADD_INTRO);
$contents[] = array('text' => ' ' . TEXT_PRE_ADD_PRODUCTS_ID . ' ' . zen_draw_input_field('pre_add_products_id', '', zen_set_field_length(TABLE_FEATURED, 'products_id')));
$contents[] = array('align' => 'center', 'text' => ' ' . zen_image_submit('button_confirm.gif', IMAGE_CONFIRM) . ' ' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
default:
if (is_object($fInfo)) {
$heading[] = array('text' => '' . $fInfo->products_name . '');
$contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_edit.gif', IMAGE_EDIT) . ' ' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '');
$contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_products_price_manager.gif', IMAGE_PRODUCTS_PRICE_MANAGER) . '');
$contents[] = array('text' => ' ' . TEXT_INFO_DATE_ADDED . ' ' . zen_date_short($fInfo->featured_date_added));
$contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . zen_date_short($fInfo->featured_last_modified));
$contents[] = array('align' => 'center', 'text' => ' ' . zen_info_image($fInfo->products_image, $fInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT));
$contents[] = array('text' => ' ' . TEXT_INFO_AVAILABLE_DATE . ' ' . (($fInfo->featured_date_available != '0001-01-01' and $fInfo->featured_date_available !='') ? zen_date_short($fInfo->featured_date_available) : TEXT_NONE) . '');
$contents[] = array('text' => TEXT_INFO_EXPIRES_DATE . ' ' . (($fInfo->expires_date != '0001-01-01' and $fInfo->expires_date !='') ? zen_date_short($fInfo->expires_date) : TEXT_NONE) . '');
$contents[] = array('text' => ' ' . TEXT_INFO_STATUS_CHANGE . ' ' . zen_date_short($fInfo->date_status_change));
$contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_edit_product.gif', IMAGE_EDIT_PRODUCT) . ' ' . '');
$contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_select.gif', IMAGE_SELECT) . ' ' . TEXT_INFO_MANUAL . '
');
}
break;
}
if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
echo ' ' . "\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' | ' . "\n";
}
}
?>
|
|