|
|
'',
'date_scheduled' => '',
'banners_title' => '',
'banners_url' => '',
'banners_group' => '',
'banners_image' => '',
'banners_html_text' => '',
'expires_impressions' => '');
$bInfo = new objectInfo($parameters);
if (isset($HTTP_GET_VARS['bID'])) {
$form_action = 'update';
$bID = tep_db_prepare_input($HTTP_GET_VARS['bID']);
$banner_query = tep_db_query("select banners_title, banners_url, banners_image, banners_group, banners_html_text, status, date_format(date_scheduled, '%d/%m/%Y') as date_scheduled, date_format(expires_date, '%d/%m/%Y') as expires_date, expires_impressions, date_status_change from " . TABLE_BANNERS . " where banners_id = '" . (int)$bID . "'");
$banner = tep_db_fetch_array($banner_query);
$bInfo->objectInfo($banner);
} elseif (tep_not_null($HTTP_POST_VARS)) {
$bInfo->objectInfo($HTTP_POST_VARS);
}
$groups_array = array();
$groups_query = tep_db_query("select distinct banners_group from " . TABLE_BANNERS . " order by banners_group");
while ($groups = tep_db_fetch_array($groups_query)) {
$groups_array[] = array('id' => $groups['banners_group'], 'text' => $groups['banners_group']);
}
?>
|
|
banners_title, '', true); ?> |
|
banners_url); ?> |
|
banners_group) . TEXT_BANNERS_NEW_GROUP . ' ' . tep_draw_input_field('new_banners_group', '', '', ((sizeof($groups_array) > 0) ? false : true)); ?> |
|
|
' . DIR_FS_CATALOG_IMAGES . tep_draw_input_field('banners_image_local', (isset($bInfo->banners_image) ? $bInfo->banners_image : '')); ?> |
|
|
|
|
|
banners_html_text); ?> |
|
(dd/mm/yyyy) |
|
|
(dd/mm/yyyy) |
' . tep_draw_input_field('expires_impressions', $bInfo->expires_impressions, 'maxlength="7" size="7"') . ' ' . TEXT_BANNERS_IMPRESSIONS; ?> |
|
|
' . TEXT_BANNERS_INSERT_NOTE . ' ' . TEXT_BANNERS_EXPIRCY_NOTE . ' ' . TEXT_BANNERS_SCHEDULE_NOTE; ?> |
' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . ''; ?> |
|
|
|
|
|
|
banners_id)) {
echo ' ' . "\n";
} else {
echo ' ' . "\n";
}
?>
' . tep_image(DIR_WS_IMAGES . 'icon_popup.gif', 'View Banner') . ' ' . $banners['banners_title']; ?> |
|
|
' . tep_image(DIR_WS_IMAGES . 'icon_status_red_light.gif', 'Set Inactive', 10, 10) . '';
} else {
echo '' . tep_image(DIR_WS_IMAGES . 'icon_status_green_light.gif', 'Set Active', 10, 10) . ' ' . tep_image(DIR_WS_IMAGES . 'icon_status_red.gif', 'Inactive', 10, 10);
}
?> |
' . tep_image(DIR_WS_ICONS . 'statistics.gif', ICON_STATISTICS) . ' '; if (isset($bInfo) && is_object($bInfo) && ($banners['banners_id'] == $bInfo->banners_id)) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ''; } ?> |
display_count($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $HTTP_GET_VARS['page'], TEXT_DISPLAY_NUMBER_OF_BANNERS); ?> |
display_links($banners_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $HTTP_GET_VARS['page']); ?> |
' . tep_image_button('button_new_banner.gif', IMAGE_NEW_BANNER) . ''; ?> |
|
|
'' . $bInfo->banners_title . '');
$contents = array('form' => tep_draw_form('banners', FILENAME_BANNER_MANAGER, 'page=' . $HTTP_GET_VARS['page'] . '&bID=' . $bInfo->banners_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
$contents[] = array('text' => ' ' . $bInfo->banners_title . '');
if ($bInfo->banners_image) $contents[] = array('text' => ' ' . tep_draw_checkbox_field('delete_image', 'on', true) . ' ' . TEXT_INFO_DELETE_IMAGE);
$contents[] = array('align' => 'center', 'text' => ' ' . tep_image_submit('button_delete.gif', IMAGE_DELETE) . ' ' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
default:
if (is_object($bInfo)) {
$heading[] = array('text' => '' . $bInfo->banners_title . '');
$contents[] = array('align' => 'center', 'text' => '' . tep_image_button('button_edit.gif', IMAGE_EDIT) . ' ' . tep_image_button('button_delete.gif', IMAGE_DELETE) . '');
$contents[] = array('text' => ' ' . TEXT_BANNERS_DATE_ADDED . ' ' . tep_date_short($bInfo->date_added));
if ( (function_exists('imagecreate')) && ($dir_ok) && ($banner_extension) ) {
$banner_id = $bInfo->banners_id;
$days = '3';
include(DIR_WS_INCLUDES . 'graphs/banner_infobox.php');
$contents[] = array('align' => 'center', 'text' => ' ' . tep_image(DIR_WS_IMAGES . 'graphs/banner_infobox-' . $banner_id . '.' . $banner_extension));
} else {
include(DIR_WS_FUNCTIONS . 'html_graphs.php');
$contents[] = array('align' => 'center', 'text' => ' ' . tep_banner_graph_infoBox($bInfo->banners_id, '3'));
}
$contents[] = array('text' => tep_image(DIR_WS_IMAGES . 'graph_hbar_blue.gif', 'Blue', '5', '5') . ' ' . TEXT_BANNERS_BANNER_VIEWS . ' ' . tep_image(DIR_WS_IMAGES . 'graph_hbar_red.gif', 'Red', '5', '5') . ' ' . TEXT_BANNERS_BANNER_CLICKS);
if ($bInfo->date_scheduled) $contents[] = array('text' => ' ' . sprintf(TEXT_BANNERS_SCHEDULED_AT_DATE, tep_date_short($bInfo->date_scheduled)));
if ($bInfo->expires_date) {
$contents[] = array('text' => ' ' . sprintf(TEXT_BANNERS_EXPIRES_AT_DATE, tep_date_short($bInfo->expires_date)));
} elseif ($bInfo->expires_impressions) {
$contents[] = array('text' => ' ' . sprintf(TEXT_BANNERS_EXPIRES_AT_IMPRESSIONS, $bInfo->expires_impressions));
}
if ($bInfo->date_status_change) $contents[] = array('text' => ' ' . sprintf(TEXT_BANNERS_STATUS_CHANGE, tep_date_short($bInfo->date_status_change)));
}
break;
}
if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
echo ' ' . "\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' | ' . "\n";
}
?>
|
|