<?php
/*
 * The Offerwall.GG page for ClaimBits.
 *
 * Open template/default/pages/offers.php and add the "case" below next to the
 * other offerwalls' cases in the switch. Then add the button and the menu link
 * further down.
 */

    case 'offerwallgg':
        // Your placement's keys from offerwall.gg.
        $owggPublic = 'YOUR_PUBLIC_KEY';
        $owggSecret = 'YOUR_SECRET_KEY';

        // Signed, so nobody can open the wall as another user.
        $owggUser = (string) $data['id'];
        $owggSig  = hash_hmac('sha256', 'appId=' . $owggPublic . '&userId=' . $owggUser, $owggSecret);
        $owggSrc  = 'https://offerwall.gg/wall/' . rawurlencode($owggPublic) . '?userId=' . rawurlencode($owggUser) . '&signature=' . $owggSig;

        $title      = 'Offerwall.GG';
        $offer_wall = '<iframe src="' . htmlspecialchars($owggSrc, ENT_QUOTES, 'UTF-8') . '" style="width: 100%; height: 900px; margin: 0; padding: 0; border: 0;" title="Offerwall"></iframe>';
        break;


/*
 * THE BUTTON — in the same file, next to the other offerwall buttons:
 *
 * <a href="<?php echo GenerateURL('offers&x=offerwallgg'); ?>" class="btn btn-secondary mb-1<?php echo ($method == 'offerwallgg' ? ' active' : ''); ?>">Offerwall.GG</a>
 *
 *
 * THE MENU LINK (optional) — in template/default/common/header.php, in the
 * offerwalls dropdown:
 *
 * <a class="dropdown-item" href="<?=GenerateURL('offers&x=offerwallgg')?>"><i class="fa fa-list-ol fa-fw"></i> Offerwall.GG</a>
 */
