function add_favorites() { if (!Login::verifyLogin()) { header("Location: ../login/index"); exit; } $shop_id = get_post_value('shop_id'); $shop_site = get_post_value('shop_site'); $shop_username = get_post_value('shop_username'); $shop_url = get_post_value('shop_url'); $product_id = get_post_value('product_id'); $product = get_post_value('product'); $product_url = get_post_value('product_url'); $image_url = get_post_value('image_url'); $m = new Favorites(); $data = $m->addFavorites($shop_site, $shop_id, $shop_username, $shop_url, $product_id, $product_url, $product, $image_url); $this->assign('message', $data); $this->setReturnType('message'); }