25if (!defined(
'NOLOGIN')) {
26 define(
'NOLOGIN',
'1');
28if (!defined(
'NOBROWSERNOTIF')) {
29 define(
'NOBROWSERNOTIF',
'1');
31if (!defined(
'NOIPCHECK')) {
32 define(
'NOIPCHECK',
'1');
46function llxHeaderVierge($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
48 print
'<html><title>List of donators</title><body>';
57 print
'</body></html>';
61require
'../../main.inc.php';
62require_once DOL_DOCUMENT_ROOT.
'/don/class/don.class.php';
65if (!isModEnabled(
'don')) {
70$langs->load(
"donations");
79$sql =
"SELECT d.datedon as datedon, d.lastname, d.firstname, d.amount, d.public, d.societe";
80$sql .=
" FROM ".MAIN_DB_PREFIX.
"don as d";
81$sql .=
" WHERE d.fk_statut in (2, 3) ORDER BY d.datedon DESC";
83$resql = $db->query($sql);
85 $num = $db->num_rows($resql);
87 print
"<table border=\"0\" width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">";
90 print
"<td>".$langs->trans(
"Name").
" / ".$langs->trans(
"Company").
"</td>";
91 print
"<td>Date</td>";
92 print
'<td class="right">'.$langs->trans(
"Amount").
'</td>';
96 $objp = $db->fetch_object($resql);
98 print
'<tr class="oddeven">';
100 print
"<td>".dolGetFirstLastname($objp->firstname, $objp->lastname).
" ".
dol_escape_htmltag($objp->societe).
"</td>\n";
102 print
"<td>".$langs->trans(
"Anonymous").
"</td>\n";
104 print
"<td>".dol_print_date($db->jdate($objp->datedon)).
"</td>\n";
105 print
'<td class="right">'.number_format($objp->amount, 2,
'.',
' ').
' '.$langs->trans(
"Currency".$conf->currency).
'</td>';
111 print $langs->trans(
"Donation");
llxFooterVierge()
Header function.
if(!defined( 'NOLOGIN')) if(!defined('NOBROWSERNOTIF')) if(!defined( 'NOIPCHECK')) llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs=[], $arrayofcss=[])
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.