26if (!defined(
'NOLOGIN')) {
27 define(
'NOLOGIN',
'1');
29if (!defined(
'NOBROWSERNOTIF')) {
30 define(
'NOBROWSERNOTIF',
'1');
32if (!defined(
'NOIPCHECK')) {
33 define(
'NOIPCHECK',
'1');
50function llxHeaderVierge($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
52 print
'<html><title>List of donators</title><body>';
63 print
'</body></html>';
67require
'../../main.inc.php';
68require_once DOL_DOCUMENT_ROOT.
'/don/class/don.class.php';
80$langs->load(
"donations");
89$sql =
"SELECT d.datedon as datedon, d.lastname, d.firstname, d.amount, d.public, d.societe";
90$sql .=
" FROM ".MAIN_DB_PREFIX.
"don as d";
91$sql .=
" WHERE d.fk_statut in (2, 3) ORDER BY d.datedon DESC";
93$resql = $db->query($sql);
95 $num = $db->num_rows($resql);
97 print
'<table class="centpercent" cellspacing="0" cellpadding="4">';
100 print
"<td>".$langs->trans(
"Name").
" / ".$langs->trans(
"Company").
"</td>";
101 print
"<td>Date</td>";
102 print
'<td class="right">'.$langs->trans(
"Amount").
'</td>';
106 $objp = $db->fetch_object($resql);
108 print
'<tr class="oddeven">';
110 print
"<td>".dolGetFirstLastname($objp->firstname, $objp->lastname).
" ".
dol_escape_htmltag($objp->societe).
"</td>\n";
112 print
"<td>".$langs->trans(
"Anonymous").
"</td>\n";
114 print
"<td>".dol_print_date($db->jdate($objp->datedon)).
"</td>\n";
115 print
'<td class="right">'.price($objp->amount).
' '.$langs->trans(
"Currency".
getDolCurrency()).
'</td>';
121 print $langs->trans(
"Donation");
llxFooterVierge()
Footer function.
if(!defined( 'NOLOGIN')) if(!defined('NOBROWSERNOTIF')) if(!defined( 'NOIPCHECK')) llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs=[], $arrayofcss=[])
Header function.
getDolCurrency()
Return the main currency ('EUR', 'USD', ...)
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
isModEnabled($module)
Is Dolibarr module enabled.
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.