26if (!defined(
'NOLOGIN')) {
27 define(
'NOLOGIN',
'1');
29if (!defined(
'NOBROWSERNOTIF')) {
30 define(
'NOBROWSERNOTIF',
'1');
32if (!defined(
'NOIPCHECK')) {
33 define(
'NOIPCHECK',
'1');
51function llxHeaderVierge($title, $head =
"", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [], $ws =
'')
53 print
'<html><title>List of donators</title><body>';
64 print
'</body></html>';
68require
'../../main.inc.php';
69require_once DOL_DOCUMENT_ROOT.
'/don/class/don.class.php';
81$langs->load(
"donations");
90$sql =
"SELECT d.datedon as datedon, d.lastname, d.firstname, d.amount, d.public, d.societe";
91$sql .=
" FROM ".MAIN_DB_PREFIX.
"don as d";
92$sql .=
" WHERE d.fk_statut in (2, 3) ORDER BY d.datedon DESC";
94$resql =
$db->query($sql);
96 $num =
$db->num_rows($resql);
98 print
'<table class="centpercent" cellspacing="0" cellpadding="4">';
101 print
"<td>".$langs->trans(
"Name").
" / ".$langs->trans(
"Company").
"</td>";
102 print
"<td>Date</td>";
103 print
'<td class="right">'.$langs->trans(
"Amount").
'</td>';
107 $objp =
$db->fetch_object($resql);
109 print
'<tr class="oddeven">';
111 print
"<td>".dolGetFirstLastname($objp->firstname, $objp->lastname).
" ".
dol_escape_htmltag($objp->societe).
"</td>\n";
113 print
"<td>".$langs->trans(
"Anonymous").
"</td>\n";
115 print
"<td>".dol_print_date(
$db->jdate($objp->datedon)).
"</td>\n";
116 print
'<td class="right">'.price($objp->amount).
' '.$langs->trans(
"Currency".
getDolCurrency()).
'</td>';
122 print $langs->trans(
"Donation");
if(!defined( 'NOLOGIN')) if(!defined('NOBROWSERNOTIF')) if(!defined( 'NOIPCHECK')) llxHeaderVierge($title, $head="", $disablejs=0, $disablehead=0, $arrayofjs=[], $arrayofcss=[], $ws='')
Header function.
llxFooterVierge()
Footer 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.