PHP Code:
<td align="left"><?php echo ' <a href="' . zen_href_link(FILENAME_COUPON_ADMIN, 'cid=' . $_GET['cid'] . (isset($_GET['status']) ? '&status=' . $_GET['status'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')); ?>"><?php echo zen_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a>
I suspect there's a parsing error somewhere, since - from the rest of that block - below:
PHP Code:
</td>
</tr>
</td></table></form>
</tr>
</table></td>
<?php
break;
default:
?>
<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<td class="main"><?php echo zen_draw_form('status', FILENAME_COUPON_ADMIN, '', 'get'); ?>
<?php
$status_array[] = array('id' => 'Y', 'text' => TEXT_COUPON_ACTIVE);
$status_array[] = array('id' => 'N', 'text' => TEXT_COUPON_INACTIVE);
$status_array[] = array('id' => '*', 'text' => TEXT_COUPON_ALL);
if ($_GET['status']) {
$status = zen_db_prepare_input($_GET['status']);
} else {
$status = 'Y';
}
echo zen_hide_session_id();
echo HEADING_TITLE_STATUS . ' ' . zen_draw_pull_down_menu('status', $status_array, $status, 'onChange="this.form.submit();"') .
zen_draw_hidden_field('page', $_GET['page']);
?>
</form>
</td>
<td class="main">
<?php
// toggle switch for editor
$editor_array = array(array('id' => '0', 'text' => TEXT_NONE),
array('id' => '1', 'text' => TEXT_HTML_AREA));
echo TEXT_EDITOR_INFO . zen_draw_form('set_editor_form', FILENAME_COUPON_ADMIN, '', 'get') . ' ' . zen_draw_pull_down_menu('reset_editor', $editor_array, ($_SESSION['html_editor_preference_status'] == 'HTMLAREA' ? '1' : '0'), 'onChange="this.form.submit();"') .
zen_hide_session_id() .
zen_draw_hidden_field('action', 'set_editor') .
'</form>';
?>
</td>
</tr>
</table></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr class="dataTableHeadingRow">
<td class="dataTableHeadingContent"><?php echo COUPON_NAME; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo COUPON_AMOUNT; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo COUPON_CODE; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo COUPON_ACTIVE; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo COUPON_START_DATE; ?></td>
<td class="dataTableHeadingContent" align="center"><?php echo COUPON_EXPIRE_DATE; ?></td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
</tr>
<?php
if ($_GET['page'] > 1) $rows = $_GET['page'] * 20 - 20;
if ($status != '*') {
$cc_query_raw = "select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified, coupon_active from " . TABLE_COUPONS ." where coupon_active='" . zen_db_input($status) . "' and coupon_type != 'G'";
} else {
$cc_query_raw = "select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_products, restrict_to_categories, date_created,date_modified, coupon_active from " . TABLE_COUPONS . " where coupon_type != 'G'";
}
$cc_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_DISCOUNT_COUPONS, $cc_query_raw, $cc_query_numrows);
$cc_list = $db->Execute($cc_query_raw);
while (!$cc_list->EOF) {
$rows++;
if (strlen($rows) < 2) {
$rows = '0' . $rows;
}
if (((!$_GET['cid']) || (@$_GET['cid'] == $cc_list->fields['coupon_id'])) && (!$cInfo)) {
$cInfo = new objectInfo($cc_list->fields);
}
if ( (is_object($cInfo)) && ($cc_list->fields['coupon_id'] == $cInfo->coupon_id) ) {
echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . zen_href_link(FILENAME_COUPON_ADMIN, zen_get_all_get_params(array('cid', 'action')) . 'cid=' . $cInfo->coupon_id . '&action=voucheredit') . '\'">' . "\n";
It is all showing in red (I'm using a PHP software that can show results in color - green for: