function useQrCoupon() { $res = useQrCouponImpl(); if ($res) { $zhaohu_guid = (int) get_input("guid"); $zhaohu = get_entity($zhaohu_guid); $url = $zhaohu->getURL(); } else { $url = elgg_get_site_url(); } forward($url); }
<?php elgg_make_sticky_form('usecoupon'); useQrCouponImpl(); elgg_clear_sticky_form('usecoupon'); forward(REFERER);