function prerender() { $r = $_GET['rid']; $s = $_GET['sid']; $r = (int) base64_decode($r); $s = (int) base64_decode($s); if (is_numeric($r)) { $lists = get_post_meta($r, '_send_lists', true); $lists = explode(",", $lists); foreach ($lists as $list) { SendPress_Data::unsubscribe_from_list($s, $r, $list); } } $link_data = array("id" => $s, "report" => $r, "urlID" => '0', "view" => "manage", "listID" => "0", "action" => ""); $code = SendPress_Data::encrypt($link_data); $link = SendPress_Manager::public_url($code); $this->redirect($link); exit; }
private static function manage_sub_prerender() { $info = self::data(); if (isset($info->action) && $info->action == 'unsubscribe') { SendPress_Data::unsubscribe_from_list($info->id, $info->report, $info->listID); $link_data = array("id" => $info->id, "report" => $info->report, "urlID" => '0', "view" => "manage", "listID" => $info->listID, "action" => ""); $code = SendPress_Data::encrypt($link_data); $link = SendPress_Manager::public_url($code); //$this->redirect( $link ); //exit; } }