Ejemplo n.º 1
0
        <td align="left"><?php 
        echo zen_draw_date_selector('coupon_startdate', mktime(0, 0, 0, $coupon_startdate[1], $coupon_startdate[2], $coupon_startdate[0], 0));
        ?>
</td>
        <td align="left" class="main"><?php 
        echo COUPON_STARTDATE_HELP;
        ?>
</td>
      </tr>
      <tr>
        <td align="left" class="main"><?php 
        echo COUPON_FINISHDATE;
        ?>
</td>
        <td align="left"><?php 
        echo zen_draw_date_selector('coupon_finishdate', mktime(0, 0, 0, $coupon_finishdate[1], $coupon_finishdate[2], $coupon_finishdate[0], 0));
        ?>
</td>
        <td align="left" class="main"><?php 
        echo COUPON_FINISHDATE_HELP;
        ?>
</td>
      </tr>
      <tr>
        <td align="left" class="main"><?php 
        echo COUPON_ZONE_RESTRICTION;
        ?>
</td>
        <td align="left" class="main"><?php 
        echo zen_geo_zones_pull_down_coupon('name="coupon_zone_restriction" style="font-size:10px"', $_POST['coupon_zone_restriction']);
        ?>
Ejemplo n.º 2
0
        }
        if (empty($_POST['coupon_start_date'])) {
            $coupon_start_date = explode("-", date('Y-m-d'));
        } else {
            $coupon_start_date = explode("-", $_POST['coupon_start_date']);
        }
        if (empty($_POST['coupon_expire_date'])) {
            $coupon_expire_date = explode("-", date('Y-m-d'));
            $coupon_expire_date[0] = $coupon_expire_date[0] + 1;
        } else {
            $coupon_expire_date = explode("-", $_POST['coupon_expire_date']);
        }
        $gBitSmarty->assign('coupon_start_date', $coupon_start_date);
        $gBitSmarty->assign('coupon_expire_date', $coupon_expire_date);
        $gBitSmarty->assign('startDateSelect', zen_draw_date_selector('coupon_start_date', mktime(0, 0, 0, $coupon_start_date[1], (int) $coupon_start_date[2], $coupon_start_date[0])));
        $gBitSmarty->assign('finishDateSelect', zen_draw_date_selector('coupon_expire_date', mktime(0, 0, 0, $coupon_expire_date[1], (int) $coupon_expire_date[2], $coupon_expire_date[0])));
        $gBitSmarty->assign('languages', zen_get_languages());
        if ($gCoupon->isValid()) {
            $title = tra('Edit Coupon') . ' : ' . $gCoupon->getField('coupon_code');
        } else {
            $title = tra('Create Coupon');
        }
        $mid = 'bitpackage:bitcommerce/admin_coupon_edit.tpl';
        break;
    default:
        $couponList = CommerceVoucher::getList($_REQUEST);
        $_REQUEST['listInfo']['page_records'] = count($couponList);
        $gBitSmarty->assign_by_ref('couponList', $couponList);
        $title = HEADING_TITLE;
        $mid = 'bitpackage:bitcommerce/admin_coupon_list.tpl';
}