echo '<div class="a-alert">' . $LANG['no_pmtsplans_yet'] . '</div>'; } break; /** VIEW INVOICE */ /** VIEW INVOICE */ case 'invoice_view': if (!ab_to(array('payments' => 'view'))) { die; } $csrf = \site\utils::str_random(10); echo '<div class="title"> <h2>' . $LANG['pmts_viewinv_title'] . '</h2> <div style="float:right; margin: 0 2px 0 0;">'; if (isset($_GET['id']) && ($invoice_exists = \query\payments::invoice_exists($_GET['id']))) { $info = \query\payments::invoice_infos($_GET['id']); if (ab_to(array('payments' => 'edit'))) { echo '<div class="options"> <a href="#" class="btn">' . $LANG['options'] . '</a> <ul>'; if ($GLOBALS['me']->is_admin) { echo '<li><a href="?route=suggestions.php&action=delete&id=' . $_GET['id'] . '&token=' . $csrf . '" data-delete-msg="' . $LANG['delete_msg'] . '">' . $LANG['delete'] . '</a></li>'; } if ($info->paid) { echo '<li><a href="?route=payments.php&action=list&type=unpaid&id=' . $_GET['id'] . '&token=' . $csrf . '">' . $LANG['set_as_unpaid'] . '</a></li>'; } else { echo '<li><a href="?route=payments.php&action=list&type=paid&id=' . $_GET['id'] . '&token=' . $csrf . '">' . $LANG['set_as_paid'] . '</a></li>'; } if ($info->delivered) { echo '<li><a href="?route=payments.php&action=list&type=undelivered&id=' . $_GET['id'] . '&token=' . $csrf . '">' . $LANG['set_as_undelivered'] . '</a></li>';