Пример #1
0
        }
        break;
        /** VIEW CLAIM REQUEST */
    /** VIEW CLAIM REQUEST */
    case 'view_rewardreq':
        if (!ab_to(array('claim_reqs' => 'view'))) {
            die;
        }
        $csrf = \site\utils::str_random(10);
        echo '<div class="title">

<h2>' . $LANG['rewards_viewcr_title'] . '</h2>

<div style="float:right; margin: 0 2px 0 0;">';
        if (isset($_GET['id']) && ($request_exists = \query\main::reward_req_exists($_GET['id']))) {
            $info = \query\main::reward_req_infos($_GET['id']);
            $ab_edt = ab_to(array('claim_reqs' => 'edit'));
            $ab_del = ab_to(array('claim_reqs' => 'delete'));
            if ($ab_edt || $ab_del) {
                echo '<div class="options">
<a href="#" class="btn">' . $LANG['options'] . '</a>
<ul>';
                if ($ab_del) {
                    echo '<li><a href="?route=rewards.php&amp;action=requests&amp;type=delete&amp;id=' . $_GET['id'] . '&amp;token=' . $csrf . '" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete'] . '</a></li>';
                }
                if ($info->claimed) {
                    if ($ab_edt) {
                        echo '<li><a href="?route=rewards.php&amp;action=requests&amp;type=unclaim&amp;id=' . $_GET['id'] . '&amp;token=' . $csrf . '">' . $LANG['unclaim'] . '</a></li>';
                    }
                } else {
                    if ($ab_edt) {