Exemple #1
0
                }
            }
        } else {
            if (isset($_GET['type']) && isset($_GET['token']) && check_csrf($_GET['token'], 'rewards_csrf')) {
                if ($_GET['type'] == 'delete') {
                    if (isset($_GET['id'])) {
                        if (actions::delete_reward_req($_GET['id'])) {
                            echo '<div class="a-success">' . $LANG['msg_deleted'] . '</div>';
                        } else {
                            echo '<div class="a-error">' . $LANG['msg_error'] . '</div>';
                        }
                    }
                } else {
                    if ($_GET['type'] == 'claim' || $_GET['type'] == 'unclaim') {
                        if (isset($_GET['id'])) {
                            if (actions::action_reward_req($_GET['type'], $_GET['id'])) {
                                echo '<div class="a-success">' . $LANG['msg_saved'] . '</div>';
                            } else {
                                echo '<div class="a-error">' . $LANG['msg_error'] . '</div>';
                            }
                        }
                    }
                }
            }
        }
        $csrf = $_SESSION['rewards_csrf'] = \site\utils::str_random(10);
        echo '<div class="page-toolbar">

<form action="#" method="GET" autocomplete="off">
<input type="hidden" name="route" value="rewards.php" />
<input type="hidden" name="action" value="requests" />