예제 #1
0
function getPromo()
{
    $promo = params("promo");
    if ($promo == null) {
        set("promos", Promo::getAllPromos());
    } else {
        set("promos", Promo::getPromoByPromo($promo));
    }
    header('Content-Type: application/json');
    return render("promos/getPromo.json.php");
}