commit
9d9d5d6dc8
@ -37,6 +37,10 @@ if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX','1'); // Do not lo
|
||||
if (! defined("NOLOGIN")) define("NOLOGIN",'1'); // If this page is public (can be called outside logged session)
|
||||
|
||||
|
||||
$DOLAPIENTITY = $_SERVER['HTTP_DOLAPIENTITY'];
|
||||
$entity=(! empty($DOLAPIENTITY) ? (int) $DOLAPIENTITY : (! empty($DOLAPIENTITY) ? (int) $DOLAPIENTITY : 1));
|
||||
if (is_numeric($entity)) define("DOLENTITY", $entity);
|
||||
|
||||
$res=0;
|
||||
if (! $res && file_exists("../main.inc.php")) $res=include '../main.inc.php';
|
||||
if (! $res) die("Include of main fails");
|
||||
|
||||
@ -89,7 +89,7 @@ $sql = "SELECT d.rowid, d.datedon, d.firstname, d.lastname, d.societe,";
|
||||
$sql.= " d.amount, d.fk_statut as statut, ";
|
||||
$sql.= " p.rowid as pid, p.ref, p.title, p.public";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."don as d LEFT JOIN ".MAIN_DB_PREFIX."projet AS p";
|
||||
$sql.= " ON p.rowid = d.fk_projet WHERE 1 = 1";
|
||||
$sql.= " ON p.rowid = d.fk_projet WHERE d.entity IN (".getEntity('don').")";
|
||||
if ($statut != '' && $statut != '-1')
|
||||
{
|
||||
$sql .= " AND d.fk_statut IN (".$db->escape($statut).")";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user