Fix: wrong EOL !!!!!!!

This commit is contained in:
Regis Houssin 2013-01-10 08:27:12 +01:00
parent 9a305c9066
commit 9812c91aff
52 changed files with 447 additions and 447 deletions

View File

@ -46,8 +46,8 @@ if (! $sortfield) { $sortfield="c.dateadh"; }
$msg='';
$date_select=isset($_GET["date_select"])?$_GET["date_select"]:$_POST["date_select"];
// Security check
$result=restrictedArea($user,'adherent','','','cotisation');
// Security check
$result=restrictedArea($user,'adherent','','','cotisation');
/*

View File

@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
$langs->load("companies");
$langs->load("members");
// Security check
$result=restrictedArea($user,'adherent');
// Security check
$result=restrictedArea($user,'adherent');
/*

View File

@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
$langs->load("members");
$langs->load("companies");
// Security check
$result=restrictedArea($user,'adherent');
// Security check
$result=restrictedArea($user,'adherent');
$action=GETPOST("action");
$filter=GETPOST("filter");

View File

@ -37,7 +37,7 @@ if ($user->societe_id > 0)
$action = '';
$socid = $user->societe_id;
}
$result=restrictedArea($user,'adherent','','','cotisation');
$result=restrictedArea($user,'adherent','','','cotisation');
$year = strftime("%Y", time());
$startyear=$year-2;

View File

@ -206,7 +206,7 @@ if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."<br>
$nbofactivatedmodules=count($conf->modules);
print $langs->trans("TotalNumberOfActivatedModules",($nbofactivatedmodules-1));
if ($nbofactivatedmodules <= 1) print ' '.img_warning($langs->trans("YouMustEnableOneModule"));
print '<br>'."\n";
print '<br>'."\n";
$h = 0;
@ -265,9 +265,9 @@ $head[$h][2] = 'marketplace';
$h++;
// Show warning about external users
print showModulesExludedForExternal($modules).'<br>'."\n";
print "<br>\n";
// Show warning about external users
print showModulesExludedForExternal($modules).'<br>'."\n";
print "<br>\n";
dol_fiche_head($head, $mode, $langs->trans("Modules"));

View File

@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
$langs->load("admin");
$langs->load("languages");
@ -398,40 +398,40 @@ else // Show
print '</table>';
/*
* Library
*/
print '<br>';
print_titre($langs->trans("Library"));
print '<table class="noborder" width="100%">'."\n";
/*
* Library
*/
print '<br>';
print_titre($langs->trans("Library"));
print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Name").'</td>'."\n";
print '<td>'.$langs->trans("Value").'</td>'."\n";
print "</tr>\n";
print '<table class="noborder" width="100%">'."\n";
print '<tr class="liste_titre">'."\n";
print '<td>'.$langs->trans("Name").'</td>'."\n";
print '<td>'.$langs->trans("Value").'</td>'."\n";
print "</tr>\n";
$var=false;
if (! empty($dolibarr_pdf_force_fpdf))
{
$var=!$var;
print '<tr '.$bc[$var].'>'."\n";
print '<td>dolibarr_pdf_force_fpdf</td>'."\n";
print '<td>';
$var=!$var;
print '<tr '.$bc[$var].'>'."\n";
print '<td>dolibarr_pdf_force_fpdf</td>'."\n";
print '<td>';
print $dolibarr_pdf_force_fpdf;
print '</td>';
print '</tr>';
}
$var=!$var;
print '<tr '.$bc[$var].'>'."\n";
print '<td>'.$langs->trans("LibraryToBuildPDF").'</td>'."\n";
print '<tr '.$bc[$var].'>'."\n";
print '<td>'.$langs->trans("LibraryToBuildPDF").'</td>'."\n";
print '<td>';
$i=0;
$pdf=pdf_getInstance('A4');
if (class_exists('FPDF') && ! class_exists('TCPDF'))
if (class_exists('FPDF') && ! class_exists('TCPDF'))
{
if ($i) print ' + ';
if ($i) print ' + ';
print 'FPDF';
print ' ('.@constant('FPDF_PATH').')';
$i++;
@ -451,8 +451,8 @@ else // Show
$i++;
}
print '<!-- $conf->global->MAIN_USE_FPDF = '.$conf->global->MAIN_USE_FPDF.' -->';
print '</td>'."\n";
print '</tr>'."\n";
print '</td>'."\n";
print '</tr>'."\n";
print "</table>\n";

View File

@ -69,7 +69,7 @@ print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
print $langs->trans("DefaultRightsDesc");
print " ".$langs->trans("OnlyActiveElementsAreShown")."<br>\n";
// Show warning about external users
// Show warning about external users
print showModulesExludedForExternal($modules).'<br>'."\n";
print "<br>\n";

View File

@ -247,8 +247,8 @@ class ActionComm extends CommonObject
}
else
{
$this->db->rollback();
return -1;
$this->db->rollback();
return -1;
}
}
else
@ -599,16 +599,16 @@ class ActionComm extends CommonObject
$this->nbtodo=$this->nbtodolate=0;
$sql = "SELECT a.id, a.datep as dp";
$sql.= " FROM (".MAIN_DB_PREFIX."actioncomm as a";
$sql.= ")";
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql.= " WHERE a.percent >= 0 AND a.percent < 100";
$sql.= " AND a.entity = ".$conf->entity;
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
if ($user->societe_id) $sql.=" AND a.fk_soc = ".$user->societe_id;
if (! $user->rights->agenda->allactions->read) $sql.= " AND (a.fk_user_author = ".$user->id . " OR a.fk_user_action = ".$user->id . " OR a.fk_user_done = ".$user->id . ")";
$sql = "SELECT a.id, a.datep as dp";
$sql.= " FROM (".MAIN_DB_PREFIX."actioncomm as a";
$sql.= ")";
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql.= " WHERE a.percent >= 0 AND a.percent < 100";
$sql.= " AND a.entity = ".$conf->entity;
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
if ($user->societe_id) $sql.=" AND a.fk_soc = ".$user->societe_id;
if (! $user->rights->agenda->allactions->read) $sql.= " AND (a.fk_user_author = ".$user->id . " OR a.fk_user_action = ".$user->id . " OR a.fk_user_done = ".$user->id . ")";
$resql=$this->db->query($sql);
if ($resql)

View File

@ -961,8 +961,8 @@ if ($id > 0)
print '</table><br><br><table class="border" width="100%">';
// Third party - Contact
if ($conf->societe->enabled)
{
if ($conf->societe->enabled)
{
print '<tr><td width="30%">'.$langs->trans("ActionOnCompany").'</td><td>'.($act->societe->id?$act->societe->getNomUrl(1):$langs->trans("None"));
if ($act->societe->id && $act->type_code == 'AC_TEL')
{

View File

@ -304,16 +304,16 @@ $sql.= ' a.fk_user_author,a.fk_user_action,a.fk_user_done,';
$sql.= ' a.priority, a.fulldayevent, a.location,';
$sql.= ' a.fk_soc, a.fk_contact,';
$sql.= ' ca.code';
$sql.= ' FROM ('.MAIN_DB_PREFIX.'c_actioncomm as ca,';
$sql.= " ".MAIN_DB_PREFIX.'user as u,';
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a)";
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= ' WHERE a.fk_action = ca.id';
$sql.= ' AND a.fk_user_author = u.rowid';
$sql.= ' AND a.entity IN ('.getEntity().')';
if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'";
if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid);
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
$sql.= ' FROM ('.MAIN_DB_PREFIX.'c_actioncomm as ca,';
$sql.= " ".MAIN_DB_PREFIX.'user as u,';
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a)";
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= ' WHERE a.fk_action = ca.id';
$sql.= ' AND a.fk_user_author = u.rowid';
$sql.= ' AND a.entity IN ('.getEntity().')';
if ($actioncode) $sql.=" AND ca.code='".$db->escape($actioncode)."'";
if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid);
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
if ($user->societe_id) $sql.= ' AND a.fk_soc = '.$user->societe_id; // To limit to external user company
if ($action == 'show_day')
{

View File

@ -152,22 +152,22 @@ $sql.= " ua.login as loginauthor, ua.rowid as useridauthor,";
$sql.= " ut.login as logintodo, ut.rowid as useridtodo,";
$sql.= " ud.login as logindone, ud.rowid as useriddone,";
$sql.= " sp.name, sp.firstname";
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c,";
$sql.= " ".MAIN_DB_PREFIX.'user as u,';
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a)";
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as ua ON a.fk_user_author = ua.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as ut ON a.fk_user_action = ut.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as ud ON a.fk_user_done = ud.rowid";
$sql.= " WHERE c.id = a.fk_action";
$sql.= ' AND a.fk_user_author = u.rowid';
$sql.= ' AND a.entity IN ('.getEntity().')'; // To limit to entity
if ($actioncode) $sql.=" AND c.code='".$db->escape($actioncode)."'";
if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid);
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
if ($socid) $sql.= " AND s.rowid = ".$socid;
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c,";
$sql.= " ".MAIN_DB_PREFIX.'user as u,';
$sql.= " ".MAIN_DB_PREFIX."actioncomm as a)";
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as ua ON a.fk_user_author = ua.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as ut ON a.fk_user_action = ut.rowid";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as ud ON a.fk_user_done = ud.rowid";
$sql.= " WHERE c.id = a.fk_action";
$sql.= ' AND a.fk_user_author = u.rowid';
$sql.= ' AND a.entity IN ('.getEntity().')'; // To limit to entity
if ($actioncode) $sql.=" AND c.code='".$db->escape($actioncode)."'";
if ($pid) $sql.=" AND a.fk_project=".$db->escape($pid);
if (! $user->rights->societe->client->voir && ! $socid) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
if ($socid) $sql.= " AND s.rowid = ".$socid;
if ($type) $sql.= " AND c.id = ".$type;
if ($status == 'done') { $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep2 <= '".$db->idate($now)."'))"; }
if ($status == 'todo') { $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep2 > '".$db->idate($now)."'))"; }

View File

@ -31,8 +31,8 @@ $langs->load("commercial");
$langs->load("orders");
// Security check
$result=restrictedArea($user,'mailing');
// Security check
$result=restrictedArea($user,'mailing');
/*

View File

@ -1404,7 +1404,7 @@ if ($action == 'send' && ! GETPOST('addfile') && ! GETPOST('removedfile') && ! G
$remise_absolue = (!empty($objectsrc->remise_absolue)?$objectsrc->remise_absolue:(!empty($soc->remise_absolue)?$soc->remise_absolue:0));
$dateinvoice = empty($conf->global->MAIN_AUTOFILL_DATE)?-1:0;
$datedelivery = (!empty($objectsrc->date_livraison)?$objectsrc->date_livraison:'');
$datedelivery = (!empty($objectsrc->date_livraison)?$objectsrc->date_livraison:'');
$note_private = (! empty($objectsrc->note) ? $objectsrc->note : (! empty($objectsrc->note_private) ? $objectsrc->note_private : ''));
$note_public = (! empty($objectsrc->note_public) ? $objectsrc->note_public : '');

View File

@ -390,12 +390,12 @@ else
print "</td></tr>";
// Payment mode
print '<tr><td>'.$langs->trans("PaymentMode").'</td><td colspan="3">';
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id,'none');
print "</td></tr>";
print '<tr><td>'.$langs->trans("PaymentMode").'</td><td colspan="3">';
$form->form_modes_reglement($_SERVER['PHP_SELF'].'?id='.$object->id, $object->mode_reglement_id,'none');
print "</td></tr>";
print '<tr><td>'.$langs->trans("Note").'</td><td colspan="3">'.nl2br($object->note)."</td></tr>";
print "</table>";
print '</div>';

View File

@ -130,18 +130,18 @@ if ($action == "builddoc" && $user->rights->facture->lire)
}
// Remove file
if ($action == 'remove_file')
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->load("other");
$upload_dir = $diroutputpdf;
if ($action == 'remove_file')
{
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->load("other");
$upload_dir = $diroutputpdf;
$file = $upload_dir . '/' . GETPOST('file');
$ret=dol_delete_file($file,0,0,0,'');
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
$action='';
}
$ret=dol_delete_file($file,0,0,0,'');
if ($ret) setEventMessage($langs->trans("FileWasRemoved", GETPOST('urlfile')));
else setEventMessage($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), 'errors');
$action='';
}

View File

@ -42,10 +42,10 @@ $date_endmonth=GETPOST('date_endmonth');
$date_endday=GETPOST('date_endday');
$date_endyear=GETPOST('date_endyear');
// Security check
if ($user->societe_id > 0) $socid = $user->societe_id;
if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat');
if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport');
// Security check
if ($user->societe_id > 0) $socid = $user->societe_id;
if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat');
if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport');
/*
* Actions

View File

@ -40,8 +40,8 @@ else {
// Security check
$socid = GETPOST('socid','int');
if ($user->societe_id > 0) $socid = $user->societe_id;
if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat');
if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport');
if (! empty($conf->comptabilite->enabled)) $result=restrictedArea($user,'compta','','','resultat');
if (! empty($conf->accounting->enabled)) $result=restrictedArea($user,'accounting','','','comptarapport');
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')

View File

@ -36,10 +36,10 @@ else {
$year_end=$year_start + ($nbofyear-1);
}
$userid=GETPOST('userid','int');
$socid = GETPOST('socid','int');
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->global->COMPTA_MODE;
if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
$socid = GETPOST('socid','int');
// Define modecompta ('CREANCES-DETTES' or 'RECETTES-DEPENSES')
$modecompta = $conf->global->COMPTA_MODE;
if ($_GET["modecompta"]) $modecompta=$_GET["modecompta"];
// Security check
if ($user->societe_id > 0) $socid = $user->societe_id;

View File

@ -75,16 +75,16 @@ class box_actions extends ModeleBoxes
$sql = "SELECT a.id, a.label, a.datep as dp, a.percent as percentage,";
$sql.= " ta.code,";
$sql.= " s.nom, s.rowid as socid";
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm AS ta, ";
$sql.= MAIN_DB_PREFIX."actioncomm AS a)";
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql.= " WHERE a.fk_action = ta.id";
$sql.= " AND a.entity = ".$conf->entity;
$sql.= " AND a.percent >= 0 AND a.percent < 100";
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
if (! $user->rights->agenda->allactions->read) $sql.= " AND (a.fk_user_author = ".$user->id . " OR a.fk_user_action = ".$user->id . " OR a.fk_user_done = ".$user->id . ")";
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm AS ta, ";
$sql.= MAIN_DB_PREFIX."actioncomm AS a)";
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe_commerciaux as sc ON a.fk_soc = sc.fk_soc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql.= " WHERE a.fk_action = ta.id";
$sql.= " AND a.entity = ".$conf->entity;
$sql.= " AND a.percent >= 0 AND a.percent < 100";
if (! $user->rights->societe->client->voir && ! $user->societe_id) $sql.= " AND (a.fk_soc IS NULL OR sc.fk_user = " .$user->id . ")";
if($user->societe_id) $sql.= " AND s.rowid = ".$user->societe_id;
if (! $user->rights->agenda->allactions->read) $sql.= " AND (a.fk_user_author = ".$user->id . " OR a.fk_user_action = ".$user->id . " OR a.fk_user_done = ".$user->id . ")";
$sql.= " ORDER BY a.datec DESC";
$sql.= $db->plimit($max, 0);

View File

@ -79,9 +79,9 @@ class box_activity extends ModeleBoxes
$textHead = $langs->trans("Activity").' ('.$nbofyears.' '.$langs->trans("years").')';
$this->info_box_head = array('text' => $textHead, 'limit'=> dol_strlen($textHead));
// compute the year limit to show
$tmpdate= dol_time_plus_duree(time(), -1*$nbofyears, "y");
// compute the year limit to show
$tmpdate= dol_time_plus_duree(time(), -1*$nbofyears, "y");
// list the summary of the bills
if (! empty($conf->facture->enabled) && $user->rights->facture->lire)
{
@ -128,7 +128,7 @@ class box_activity extends ModeleBoxes
}
if ($num==0) $this->info_box_contents[$i][0] = array('td' => 'align="center"','text'=>$langs->trans("NoRecordedInvoices"));
}
else dol_print_error($db);
else dol_print_error($db);
$sql = "SELECT f.paye, f.fk_statut, SUM(f.total_ttc) as Mnttot, COUNT(*) as nb";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";

View File

@ -1525,20 +1525,20 @@ abstract class CommonObject
if ($this->total_localtax1 == 0)
{
// Search to know if there is a localtax of type 7
// TODO : store local taxes types into object lines and remove this. We should use here $obj->localtax1_type but it is not yet filled into database, so we search into table of vat rate
// TODO : store local taxes types into object lines and remove this. We should use here $obj->localtax1_type but it is not yet filled into database, so we search into table of vat rate
global $mysoc;
$localtax1_array=getLocalTaxesFromRate($vatrate,1,$mysoc);
$localtax1_array=getLocalTaxesFromRate($vatrate,1,$mysoc);
if (empty($obj->localtax1_type))
{
$obj->localtax1_type = $localtax1_array[0];
$obj->localtax1_tx = $localtax1_array[1];
}
}
//end TODO
if ($obj->localtax1_type == '7')
{
$this->total_localtax1 += $obj->localtax1_tx;
$this->total_ttc += $obj->localtax1_tx;
$this->total_localtax1 += $obj->localtax1_tx;
$this->total_ttc += $obj->localtax1_tx;
}
}
if ($this->total_localtax2 == 0)

View File

@ -2724,36 +2724,36 @@ function get_localtax($tva, $local, $thirdparty_buyer="", $thirdparty_seller="")
return 0;
}
/**
* Get type and rate of localtaxes for a particular vat rate/country fo thirdparty
*
* @param real $vatrate VAT Rate
* @param int $local Number of localtax (1 / 2)
* @param int $thirdparty company object
/**
* Get type and rate of localtaxes for a particular vat rate/country fo thirdparty
*
* @param real $vatrate VAT Rate
* @param int $local Number of localtax (1 / 2)
* @param int $thirdparty company object
* @return array array(Type of local tax (1 to 7 / 0 if not found), rate or amount of localtax)
* @deprecated TODO We should remove this function by storing rate and type into detail lines.
*/
function getLocalTaxesFromRate($vatrate, $local, $thirdparty)
{
global $db;
* @deprecated TODO We should remove this function by storing rate and type into detail lines.
*/
function getLocalTaxesFromRate($vatrate, $local, $thirdparty)
{
global $db;
dol_syslog("getLocalTaxesFromRate vatrate=".$vatrate." local=".$local." thirdparty id=".(is_object($thirdparty)?$thirdparty->id:''));
// Search local taxes
$sql = "SELECT t.localtax1, t.localtax1_type, t.localtax2, t.localtax2_type";
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
$sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$thirdparty->country_code."'";
$sql .= " AND t.taux = ".$vatrate." AND t.active = 1";
$resql=$db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($resql);
if ($local == 1) return array($obj->localtax1_type, $obj->localtax1);
elseif ($local == 2) return array($obj->localtax2_type, $obj->localtax2);
}
return 0;
dol_syslog("getLocalTaxesFromRate vatrate=".$vatrate." local=".$local." thirdparty id=".(is_object($thirdparty)?$thirdparty->id:''));
// Search local taxes
$sql = "SELECT t.localtax1, t.localtax1_type, t.localtax2, t.localtax2_type";
$sql .= " FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p";
$sql .= " WHERE t.fk_pays = p.rowid AND p.code = '".$thirdparty->country_code."'";
$sql .= " AND t.taux = ".$vatrate." AND t.active = 1";
$resql=$db->query($sql);
if ($resql)
{
$obj = $db->fetch_object($resql);
if ($local == 1) return array($obj->localtax1_type, $obj->localtax1);
elseif ($local == 2) return array($obj->localtax2_type, $obj->localtax2);
}
return 0;
}
/**

View File

@ -49,7 +49,7 @@ function dol_json_encode($elements)
if (is_object($elements)) // Count number of properties for an object
{
$num=0;
foreach($elements as $key => $value) $num++;
foreach($elements as $key => $value) $num++;
}
//var_dump($num);

View File

@ -160,42 +160,42 @@ function dol_loginfunction($langs,$conf,$mysoc)
// Note: $conf->css looks like '/theme/eldy/style.css.php'
$conf->css = "/theme/".(GETPOST('theme')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";
$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application
{
foreach($conf->modules_parts['theme'] as $reldir)
{
if (file_exists(dol_buildpath($reldir.$conf->css, 0)))
{
$themepath=dol_buildpath($reldir.$conf->css, 1);
break;
}
}
$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
if (! empty($conf->modules_parts['theme'])) // Using this feature slow down application
{
foreach($conf->modules_parts['theme'] as $reldir)
{
if (file_exists(dol_buildpath($reldir.$conf->css, 0)))
{
$themepath=dol_buildpath($reldir.$conf->css, 1);
break;
}
}
}
$conf_css = $themepath."?lang=".$langs->defaultlang;
// Select templates
if (! empty($conf->browser->phone) && preg_match('/^smartphone/',$conf->smart_menu))
{
$template_dir = DOL_DOCUMENT_ROOT.'/theme/phones/smartphone/tpl/';
}
else
// Select templates
if (! empty($conf->browser->phone) && preg_match('/^smartphone/',$conf->smart_menu))
{
$template_dir = DOL_DOCUMENT_ROOT.'/theme/phones/smartphone/tpl/';
}
else
{
if (! empty($conf->modules_parts['tpl'])) // Using this feature slow down application
{
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl/'));
foreach($dirtpls as $reldir)
{
$dirtpls=array_merge($conf->modules_parts['tpl'],array('/core/tpl/'));
foreach($dirtpls as $reldir)
{
$tmp=dol_buildpath($reldir.'login.tpl.php');
if (file_exists($tmp)) { $template_dir=preg_replace('/login\.tpl\.php$/','',$tmp); break; }
}
}
else
{
$template_dir = DOL_DOCUMENT_ROOT."/core/tpl/";
}
}
if (file_exists($tmp)) { $template_dir=preg_replace('/login\.tpl\.php$/','',$tmp); break; }
}
}
else
{
$template_dir = DOL_DOCUMENT_ROOT."/core/tpl/";
}
}
// Set cookie for timeout management
$prefix=dol_getprefix();
$sessiontimeout='DOLSESSTIMEOUT_'.$prefix;

View File

@ -388,8 +388,8 @@ function dol_auguria_showmenu($type_user, &$menuentry, &$listofmodulesforexterna
if (! $found) return 0; // Entry is for menus all excluded to external users
}
if (! $menuentry['perms'] && $type_user) return 0; // No permissions and user is external
if (! $menuentry['perms'] && ! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) return 0; // No permissions and option to hide when not allowed, even for internal user, is on
if (! $menuentry['perms']) return 2; // No permissions and user is external
if (! $menuentry['perms'] && ! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) return 0; // No permissions and option to hide when not allowed, even for internal user, is on
if (! $menuentry['perms']) return 2; // No permissions and user is external
return 1;
}

View File

@ -110,10 +110,10 @@ function print_eldy_menu($db,$atarget,$type_user)
}
// Products-Services
$tmpentry=array('enabled'=>($conf->product->enabled || $conf->service->enabled), 'perms'=>($user->rights->produit->lire || $user->rights->service->lire), 'module'=>'product|service');
$showmode=dol_eldy_showmenu($type_user, $tmpentry, $listofmodulesforexternal);
if ($showmode)
{
$tmpentry=array('enabled'=>($conf->product->enabled || $conf->service->enabled), 'perms'=>($user->rights->produit->lire || $user->rights->service->lire), 'module'=>'product|service');
$showmode=dol_eldy_showmenu($type_user, $tmpentry, $listofmodulesforexternal);
if ($showmode)
{
$langs->load("products");
$classname="";
@ -451,10 +451,10 @@ function print_eldy_menu($db,$atarget,$type_user)
{
$idsel=(empty($newTabMenu[$i]['mainmenu'])?'none':$newTabMenu[$i]['mainmenu']);
$showmode=dol_eldy_showmenu($type_user,$newTabMenu[$i],$listofmodulesforexternal);
$showmode=dol_eldy_showmenu($type_user,$newTabMenu[$i],$listofmodulesforexternal);
if ($showmode == 1)
{
if ($showmode == 1)
{
if (preg_match("/^(http:\/\/|https:\/\/)/i",$newTabMenu[$i]['url']))
{
$url = $newTabMenu[$i]['url'];
@ -1462,36 +1462,36 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after)
}
/**
* Function to test if an entry is enabled or not
*
* @param string $type_user 0=We need backoffice menu, 1=We need frontoffice menu
* @param array &$menuentry Array for menu entry
* @param array &$listofmodulesforexternal Array with list of modules allowed to external users
* @return int 0=Hide, 1=Show, 2=Show gray
*/
function dol_eldy_showmenu($type_user, &$menuentry, &$listofmodulesforexternal)
{
//print 'type_user='.$type_user.' module='.$menuentry['module'].' enabled='.$menuentry['enabled'].' perms='.$menuentry['perms'];
//print 'ok='.in_array($menuentry['module'], $listofmodulesforexternal);
if (empty($menuentry['enabled'])) return 0; // Entry disabled by condition
if ($type_user && $menuentry['module'])
{
$tmploops=explode('|',$menuentry['module']);
$found=0;
foreach($tmploops as $tmploop)
{
if (in_array($tmploop, $listofmodulesforexternal)) {
$found++; break;
}
}
if (! $found) return 0; // Entry is for menus all excluded to external users
}
if (! $menuentry['perms'] && $type_user) return 0; // No permissions and user is external
if (! $menuentry['perms'] && ! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) return 0; // No permissions and option to hide when not allowed, even for internal user, is on
if (! $menuentry['perms']) return 2; // No permissions and user is external
return 1;
/**
* Function to test if an entry is enabled or not
*
* @param string $type_user 0=We need backoffice menu, 1=We need frontoffice menu
* @param array &$menuentry Array for menu entry
* @param array &$listofmodulesforexternal Array with list of modules allowed to external users
* @return int 0=Hide, 1=Show, 2=Show gray
*/
function dol_eldy_showmenu($type_user, &$menuentry, &$listofmodulesforexternal)
{
//print 'type_user='.$type_user.' module='.$menuentry['module'].' enabled='.$menuentry['enabled'].' perms='.$menuentry['perms'];
//print 'ok='.in_array($menuentry['module'], $listofmodulesforexternal);
if (empty($menuentry['enabled'])) return 0; // Entry disabled by condition
if ($type_user && $menuentry['module'])
{
$tmploops=explode('|',$menuentry['module']);
$found=0;
foreach($tmploops as $tmploop)
{
if (in_array($tmploop, $listofmodulesforexternal)) {
$found++; break;
}
}
if (! $found) return 0; // Entry is for menus all excluded to external users
}
if (! $menuentry['perms'] && $type_user) return 0; // No permissions and user is external
if (! $menuentry['perms'] && ! empty($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED)) return 0; // No permissions and option to hide when not allowed, even for internal user, is on
if (! $menuentry['perms']) return 2; // No permissions and user is external
return 1;
}
?>

View File

@ -231,8 +231,8 @@ class CommActionRapport
$code=$obj->code;
if (empty($conf->global->AGENDA_USE_EVENT_TYPE))
{
if ($code == 'AC_OTH') $code='AC_MANUAL';
if ($code == 'AC_OTH_AUTO') $code='AC_AUTO';
if ($code == 'AC_OTH') $code='AC_MANUAL';
if ($code == 'AC_OTH_AUTO') $code='AC_AUTO';
}
$pdf->SetXY(60,$y);
$pdf->MultiCell(32, $height, dol_trunc($outputlangs->convToOutputCharset($outputlangs->transnoentitiesnoconv("Action".$code)),32), 0, 'L', 0);

View File

@ -118,8 +118,8 @@ class pdf_einstein extends ModelePDFCommandes
}
$this->tva=array();
$this->localtax1=array();
$this->localtax2=array();
$this->localtax1=array();
$this->localtax2=array();
$this->atleastoneratenotnull=0;
$this->atleastonediscount=0;
}

View File

@ -297,16 +297,16 @@ class doc_generic_odt extends ModeleThirdPartyDoc
}
}
// Add odtgeneration hook
if (! is_object($hookmanager))
{
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
}
$hookmanager->initHooks(array('odtgeneration'));
$parameters=array('odfHandler'=>$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
// Add odtgeneration hook
if (! is_object($hookmanager))
{
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
$hookmanager=new HookManager($this->db);
}
$hookmanager->initHooks(array('odtgeneration'));
$parameters=array('odfHandler'=>$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
global $action;
$reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
// Write new file
//$result=$odfHandler->exportAsAttachedFile('toto');

View File

@ -127,9 +127,9 @@ if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($ob
<td colspan="<?php echo $colspan; ?>"><?php
if (! empty($object->element) && $object->element == 'contrat')
{
print $langs->trans("DateStartPlanned").' ';
$form->select_date('',"date_start_sl",$usehm,$usehm,1,"addline_sl");
print ' &nbsp; '.$langs->trans("DateEndPlanned").' ';
print $langs->trans("DateStartPlanned").' ';
$form->select_date('',"date_start_sl",$usehm,$usehm,1,"addline_sl");
print ' &nbsp; '.$langs->trans("DateEndPlanned").' ';
$form->select_date('',"date_end_sl",$usehm,$usehm,1,"addline_sl");
}
else

View File

@ -25,8 +25,8 @@
* $line defined
*/
$usemargins=0;
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
$usemargins=0;
if (! empty($conf->margin->enabled) && ! empty($object->element) && in_array($object->element,array('facture','propal','commande'))) $usemargins=1;
?>
@ -134,15 +134,15 @@ if (! empty($conf->service->enabled) && $dateSelector)
<tr <?php echo $bcnd[$var]; ?>>
<td colspan="<?php echo $colspan; ?>">
<?php
if (! empty($object->element) && $object->element == 'contrat')
if (! empty($object->element) && $object->element == 'contrat')
{
print $langs->trans("DateStartPlanned").' ';
$form->select_date('',"date_start",$usehm,$usehm,1,"addline");
print ' &nbsp; '.$langs->trans("DateEndPlanned").' ';
print $langs->trans("DateStartPlanned").' ';
$form->select_date('',"date_start",$usehm,$usehm,1,"addline");
print ' &nbsp; '.$langs->trans("DateEndPlanned").' ';
$form->select_date('',"date_end",$usehm,$usehm,1,"addline");
}
else
{
{
echo $langs->trans('ServiceLimitedDuration').' '.$langs->trans('From').' ';
echo $form->select_date('','date_start_predef',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addpredefinedproduct");
echo ' '.$langs->trans('to').' ';

View File

@ -27,8 +27,8 @@ require_once DOL_DOCUMENT_ROOT.'/exports/class/export.class.php';
$langs->load("exports");
// Security check
$result=restrictedArea($user,'export');
// Security check
$result=restrictedArea($user,'export');

View File

@ -68,8 +68,8 @@ $ftp_name=$conf->global->$s_ftp_name;
$ftp_server=$conf->global->$s_ftp_server;
$ftp_port=$conf->global->$s_ftp_port; if (empty($ftp_port)) $ftp_port=21;
$ftp_user=$conf->global->$s_ftp_user;
$ftp_password=$conf->global->$s_ftp_password;
$ftp_passive=$conf->global->$s_ftp_passive;
$ftp_password=$conf->global->$s_ftp_password;
$ftp_passive=$conf->global->$s_ftp_passive;
$conn_id=0; // FTP connection ID
@ -666,9 +666,9 @@ function dol_ftp_connect($ftp_server, $ftp_port, $ftp_user, $ftp_password, $sect
{
if (ftp_login($conn_id, $ftp_user, $ftp_password))
{
// Turn on passive mode transfers (must be after a successful login
if ($ftp_passive) ftp_pasv($conn_id, true);
// Turn on passive mode transfers (must be after a successful login
if ($ftp_passive) ftp_pasv($conn_id, true);
// Change the dir
$newsectioniso=utf8_decode($section);
ftp_chdir($conn_id, $newsectioniso);

View File

@ -38,7 +38,7 @@ class Holiday extends CommonObject
var $errors=array();
var $rowid;
var $ref;
var $ref;
var $fk_user;
var $date_create='';
@ -356,11 +356,11 @@ class Holiday extends CommonObject
$sql.= " cp.fk_user_cancel,";
$sql.= " cp.detail_refuse,";
$sql.= " uu.name as user_lastname,";
$sql.= " uu.firstname as user_firstname,";
$sql.= " uu.name as user_lastname,";
$sql.= " uu.firstname as user_firstname,";
$sql.= " ua.name as validator_lastname,";
$sql.= " ua.firstname as validator_firstname";
$sql.= " ua.name as validator_lastname,";
$sql.= " ua.firstname as validator_firstname";
$sql.= " FROM ".MAIN_DB_PREFIX."holiday as cp, ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua";
$sql.= " WHERE cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pour la recherche sur le tableau
@ -461,7 +461,7 @@ class Holiday extends CommonObject
} else {
$error++;
}
$sql.= " halfday = ".$this->halfday.",";
$sql.= " halfday = ".$this->halfday.",";
if(!empty($this->statut) && is_numeric($this->statut)) {
$sql.= " statut = '".$this->statut."',";
} else {
@ -603,8 +603,8 @@ class Holiday extends CommonObject
foreach($this->holiday as $infos_CP)
{
if ($infos_CP['statut'] == 4) continue; // ignore not validated holidays
if ($infos_CP['statut'] == 5) continue; // ignore not validated holidays
if ($infos_CP['statut'] == 4) continue; // ignore not validated holidays
if ($infos_CP['statut'] == 5) continue; // ignore not validated holidays
// TODO Also use halfday for the check
if ($dateDebut >= $infos_CP['date_debut'] && $dateDebut <= $infos_CP['date_fin'] || $dateFin <= $infos_CP['date_fin'] && $dateFin >= $infos_CP['date_debut'])
@ -618,42 +618,42 @@ class Holiday extends CommonObject
}
/**
* Return clicable name (with picto eventually)
*
* @param int $withpicto 0=_No picto, 1=Includes the picto in the linkn, 2=Picto only
* @return string String with URL
*/
function getNomUrl($withpicto=0)
{
global $langs;
$result='';
$lien = '<a href="'.DOL_URL_ROOT.'/holiday/fiche.php?id='.$this->id.'">';
$lienfin='</a>';
$picto='holiday';
$label=$langs->trans("Show").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
return $result;
/**
* Return clicable name (with picto eventually)
*
* @param int $withpicto 0=_No picto, 1=Includes the picto in the linkn, 2=Picto only
* @return string String with URL
*/
function getNomUrl($withpicto=0)
{
global $langs;
$result='';
$lien = '<a href="'.DOL_URL_ROOT.'/holiday/fiche.php?id='.$this->id.'">';
$lienfin='</a>';
$picto='holiday';
$label=$langs->trans("Show").': '.$this->ref;
if ($withpicto) $result.=($lien.img_object($label,$picto).$lienfin);
if ($withpicto && $withpicto != 2) $result.=' ';
if ($withpicto != 2) $result.=$lien.$this->ref.$lienfin;
return $result;
}
/**
* Returns the label status
*
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
* @return string Label
*/
function getLibStatut($mode=0)
{
return $this->LibStatut($this->statut, $mode, $this->date_debut);
}
/**
* Returns the label status
*
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
* @return string Label
*/
function getLibStatut($mode=0)
{
return $this->LibStatut($this->statut, $mode, $this->date_debut);
}
/**
* Returns the label of a statut
@ -675,26 +675,26 @@ class Holiday extends CommonObject
if ($statut == 4) return $langs->trans('CancelCP');
if ($statut == 5) return $langs->trans('RefuseCP');
}
if ($mode == 2)
{
if ($mode == 2)
{
$pictoapproved='statut6';
if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
if ($statut == 1) return img_picto($langs->trans('DraftCP'),'statut0').' '.$langs->trans('DraftCP'); // Draft
if ($statut == 2) return img_picto($langs->trans('ToValidateCP'),'statut1').' '.$langs->trans('ToValidateCP'); // Waiting approval
if ($statut == 3) return img_picto($langs->trans('ValidateCP'),$pictoapproved).' '.$langs->trans('ValidateCP');
if ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5').' '.$langs->trans('CancelCP');
if ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5').' '.$langs->trans('RefuseCP');
}
if ($mode == 5)
if ($statut == 1) return img_picto($langs->trans('DraftCP'),'statut0').' '.$langs->trans('DraftCP'); // Draft
if ($statut == 2) return img_picto($langs->trans('ToValidateCP'),'statut1').' '.$langs->trans('ToValidateCP'); // Waiting approval
if ($statut == 3) return img_picto($langs->trans('ValidateCP'),$pictoapproved).' '.$langs->trans('ValidateCP');
if ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5').' '.$langs->trans('CancelCP');
if ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5').' '.$langs->trans('RefuseCP');
}
if ($mode == 5)
{
$pictoapproved='statut6';
$pictoapproved='statut6';
if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
if ($statut == 1) return $langs->trans('DraftCP').' '.img_picto($langs->trans('DraftCP'),'statut0'); // Draft
if ($statut == 2) return $langs->trans('ToValidateCP').' '.img_picto($langs->trans('ToValidateCP'),'statut1'); // Waiting approval
if ($statut == 3) return $langs->trans('ValidateCP').' '.img_picto($langs->trans('ValidateCP'),$pictoapproved);
if ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5');
if ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5');
}
if ($statut == 1) return $langs->trans('DraftCP').' '.img_picto($langs->trans('DraftCP'),'statut0'); // Draft
if ($statut == 2) return $langs->trans('ToValidateCP').' '.img_picto($langs->trans('ToValidateCP'),'statut1'); // Waiting approval
if ($statut == 3) return $langs->trans('ValidateCP').' '.img_picto($langs->trans('ValidateCP'),$pictoapproved);
if ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5');
if ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5');
}
return $statut;
}

View File

@ -58,7 +58,7 @@ if ($obj->value == null)
$warnpicto=img_error($langs->trans("WarningMandatorySetupNotComplete"));
print '<div class="tabBar">';
print $warnpicto.' '.$langs->trans("NotConfigModCP");
print '</div>';
print '</div>';
llxFooter();
exit();

View File

@ -52,7 +52,7 @@ $now=dol_now();
// Si création de la demande
if ($action == 'create')
{
$cp = new Holiday($db);
$cp = new Holiday($db);
// Si pas le droit de créer une demande
if(!$user->rights->holiday->write)
@ -63,12 +63,12 @@ if ($action == 'create')
$date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'));
$date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'));
$starthalfday=GETPOST('starthalfday');
$starthalfday=GETPOST('starthalfday');
$endhalfday=GETPOST('endhalfday');
$halfday=0;
if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2;
else if ($starthalfday == 'afternoon') $halfday=-1;
else if ($endhalfday == 'morning') $halfday=1;
else if ($endhalfday == 'morning') $halfday=1;
$valideur = GETPOST('valideur');
$description = trim(GETPOST('description'));
@ -144,14 +144,14 @@ if ($action == 'create')
if ($action == 'update')
{
$date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'));
$date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'));
$starthalfday=GETPOST('starthalfday');
$endhalfday=GETPOST('endhalfday');
$halfday=0;
if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2;
else if ($starthalfday == 'afternoon') $halfday=-1;
else if ($endhalfday == 'morning') $halfday=1;
$date_debut = dol_mktime(0, 0, 0, GETPOST('date_debut_month'), GETPOST('date_debut_day'), GETPOST('date_debut_year'));
$date_fin = dol_mktime(0, 0, 0, GETPOST('date_fin_month'), GETPOST('date_fin_day'), GETPOST('date_fin_year'));
$starthalfday=GETPOST('starthalfday');
$endhalfday=GETPOST('endhalfday');
$halfday=0;
if ($starthalfday == 'afternoon' && $endhalfday == 'morning') $halfday=2;
else if ($starthalfday == 'afternoon') $halfday=-1;
else if ($endhalfday == 'morning') $halfday=1;
// Si pas le droit de modifier une demande
if(!$user->rights->holiday->write)
@ -575,9 +575,9 @@ if ($action == 'confirm_cancel' && $_GET['confirm'] == 'yes')
*/
$form = new Form($db);
$cp = new Holiday($db);
$cp = new Holiday($db);
$listhalfday=array('morning'=>$langs->trans("Morning"),"afternoon"=>$langs->trans("Afternoon"));
$listhalfday=array('morning'=>$langs->trans("Morning"),"afternoon"=>$langs->trans("Afternoon"));
llxHeader(array(),$langs->trans('CPTitreMenu'));
@ -859,12 +859,12 @@ else
print '<tr>';
print '<td width="25%">'.$langs->trans("Ref").'</td>';
print '<td>';
print $form->showrefnav($cp, 'id', $linkback, 1, 'rowid', 'ref');
print $form->showrefnav($cp, 'id', $linkback, 1, 'rowid', 'ref');
print '</td>';
print '</tr>';
$starthalfday=($cp->halfday == -1 || $cp->halfday == 2)?'afternoon':'morning';
$endhalfday=($cp->halfday == 1 || $cp->halfday == 2)?'morning':'afternoon';
$endhalfday=($cp->halfday == 1 || $cp->halfday == 2)?'morning':'afternoon';
if(!$edit) {
print '<tr>';
@ -890,7 +890,7 @@ else
print '<tr>';
print '<td>'.$langs->trans('DateFinCP').' ('.$langs->trans("LastDayOfHoliday").')</td>';
print '<td>'.dol_print_date($cp->date_fin,'day');
print ' &nbsp; &nbsp; ';
print ' &nbsp; &nbsp; ';
print $langs->trans($listhalfday[$endhalfday]);
print '</td>';
print '</tr>';
@ -1026,10 +1026,10 @@ else
{
print '<a href="fiche.php?id='.$_GET['id'].'&action=sendToValidate" class="butAction">'.$langs->trans("Validate").'</a>';
}
if($user->rights->holiday->delete && $cp->statut == 1)
{
print '<a href="fiche.php?id='.$_GET['id'].'&action=delete" class="butActionDelete">'.$langs->trans("DeleteCP").'</a>';
}
if($user->rights->holiday->delete && $cp->statut == 1)
{
print '<a href="fiche.php?id='.$_GET['id'].'&action=delete" class="butActionDelete">'.$langs->trans("DeleteCP").'</a>';
}
// Si le statut est en attente de validation et que le valideur est connecté
if ($userID == $cp->fk_validator && $cp->statut == 2)

View File

@ -288,8 +288,8 @@ if (! empty($holiday->holiday))
// Valideur
$approbatorstatic->id=$infos_CP['fk_validator'];
$approbatorstatic->lastname=$infos_CP['validator_lastname'];
$approbatorstatic->firstname=$infos_CP['validator_firstname'];
$approbatorstatic->lastname=$infos_CP['validator_lastname'];
$approbatorstatic->firstname=$infos_CP['validator_firstname'];
$date = $infos_CP['date_create'];

View File

@ -111,8 +111,8 @@ if($num == '0') {
$user->fetch($holiday['fk_user']);
$var=!$var;
$holidaystatic->id=$holiday['rowid'];
$holidaystatic->ref=$holiday['rowid'];
$holidaystatic->id=$holiday['rowid'];
$holidaystatic->ref=$holiday['rowid'];
$start_date=$db->jdate($holiday['date_debut']);
$end_date=$db->jdate($holiday['date_fin']);

View File

@ -199,36 +199,36 @@ if (constant('DOL_DATA_ROOT') && file_exists($lockfile))
// Force usage of log file for install and upgrades
$conf->syslog->enabled=1;
$conf->global->SYSLOG_LEVEL=constant('LOG_DEBUG');
if (! defined('SYSLOG_FILE')) // To avoid warning on systems with constant already defined
{
if (@is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log');
else if (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log');
else if (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log');
else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
}
if (! defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR',1);
// We init log handler for install
$handlers = array('mod_syslog_file');
foreach ($handlers as $handler)
{
$file = DOL_DOCUMENT_ROOT.'/core/modules/syslog/'.$handler.'.php';
if (!file_exists($file))
{
throw new Exception('Missing log handler file '.$handler.'.php');
}
require_once $file;
$loghandlerinstance = new $handler();
if (!$loghandlerinstance instanceof LogHandlerInterface)
{
throw new Exception('Log handler does not extend LogHandlerInterface');
}
$conf->loghandlers[]=$loghandlerinstance;
}
$conf->global->SYSLOG_LEVEL=constant('LOG_DEBUG');
if (! defined('SYSLOG_FILE')) // To avoid warning on systems with constant already defined
{
if (@is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log');
else if (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log');
else if (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log');
else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
}
if (! defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR',1);
// We init log handler for install
$handlers = array('mod_syslog_file');
foreach ($handlers as $handler)
{
$file = DOL_DOCUMENT_ROOT.'/core/modules/syslog/'.$handler.'.php';
if (!file_exists($file))
{
throw new Exception('Missing log handler file '.$handler.'.php');
}
require_once $file;
$loghandlerinstance = new $handler();
if (!$loghandlerinstance instanceof LogHandlerInterface)
{
throw new Exception('Log handler does not extend LogHandlerInterface');
}
$conf->loghandlers[]=$loghandlerinstance;
}
// Removed magic_quotes

View File

@ -914,13 +914,13 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
if (! empty($conf->modules_parts['theme'])) // This slow down
{
foreach($conf->modules_parts['theme'] as $reldir)
foreach($conf->modules_parts['theme'] as $reldir)
{
if (file_exists(dol_buildpath($reldir.$conf->css, 0)))
{
$themepath=dol_buildpath($reldir.$conf->css, 1);
break;
}
}
}
}
$themeparam='?lang='.$langs->defaultlang.'&amp;theme='.$conf->theme.(GETPOST('optioncss')?'&amp;optioncss='.GETPOST('optioncss','alpha',1):'').'&amp;userid='.$user->id.'&amp;entity='.$conf->entity;
@ -1160,20 +1160,20 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
$toprightmenu='';
// Define menu manager in setup
if (empty($user->societe_id)) // If internal user or not defined
{
$conf->top_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED);
$conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED);
}
else // If external user
{
$conf->top_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?$conf->global->MAIN_MENUFRONT_STANDARD:$conf->global->MAIN_MENUFRONT_STANDARD_FORCED);
$conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$conf->global->MAIN_MENUFRONT_SMARTPHONE:$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
}
// For backward compatibility
if ($conf->top_menu == 'eldy.php') $conf->top_menu='eldy_backoffice.php';
elseif ($conf->top_menu == 'rodolphe.php') $conf->top_menu='eldy_backoffice.php';
// Define menu manager in setup
if (empty($user->societe_id)) // If internal user or not defined
{
$conf->top_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?$conf->global->MAIN_MENU_STANDARD:$conf->global->MAIN_MENU_STANDARD_FORCED);
$conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?$conf->global->MAIN_MENU_SMARTPHONE:$conf->global->MAIN_MENU_SMARTPHONE_FORCED);
}
else // If external user
{
$conf->top_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?$conf->global->MAIN_MENUFRONT_STANDARD:$conf->global->MAIN_MENUFRONT_STANDARD_FORCED);
$conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?$conf->global->MAIN_MENUFRONT_SMARTPHONE:$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
}
// For backward compatibility
if ($conf->top_menu == 'eldy.php') $conf->top_menu='eldy_backoffice.php';
elseif ($conf->top_menu == 'rodolphe.php') $conf->top_menu='eldy_backoffice.php';
if (! $conf->top_menu) $conf->top_menu ='eldy_backoffice.php';
// For backward compatibility with old modules

View File

@ -54,7 +54,7 @@ $conf->db->character_set = $dolibarr_main_db_character_set;
$conf->db->dolibarr_main_db_collation = $dolibarr_main_db_collation;
$conf->db->dolibarr_main_db_encryption = $dolibarr_main_db_encryption;
$conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey;
if (defined('TEST_DB_FORCE_TYPE')) $conf->db->type=constant('TEST_DB_FORCE_TYPE'); // Force db type (for test purpose, by PHP unit for example)
if (defined('TEST_DB_FORCE_TYPE')) $conf->db->type=constant('TEST_DB_FORCE_TYPE'); // Force db type (for test purpose, by PHP unit for example)
// Set properties specific to conf file
$conf->file->main_limit_users = $dolibarr_main_limit_users;

View File

@ -138,13 +138,13 @@ print_fiche_titre($title,'','setup');
print $langs->trans("ProductVatMassChangeDesc").'<br><br>';
if (empty($mysoc->country_code))
{
$langs->load("errors");
$warnpicto=img_error($langs->trans("WarningMandatorySetupNotComplete"));
print '<br><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a>';
}
else
if (empty($mysoc->country_code))
{
$langs->load("errors");
$warnpicto=img_error($langs->trans("WarningMandatorySetupNotComplete"));
print '<br><a href="'.DOL_URL_ROOT.'/admin/company.php?mainmenu=home">'.$warnpicto.' '.$langs->trans("WarningMandatorySetupNotComplete").'</a>';
}
else
{
$var=true;

View File

@ -31,8 +31,8 @@ $langs->load("stocks");
$langs->load("companies");
$mesg = '';
// Security check
$result=restrictedArea($user,'stock');
// Security check
$result=restrictedArea($user,'stock');
/*

View File

@ -44,8 +44,8 @@ if (! $sortorder) $sortorder="DESC";
$mesg = '';
// Security check
$result=restrictedArea($user,'stock');
// Security check
$result=restrictedArea($user,'stock');

View File

@ -29,8 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/product/stock/class/entrepot.class.php';
$langs->load("stocks");
// Security check
$result=restrictedArea($user,'stock');
// Security check
$result=restrictedArea($user,'stock');
/*

View File

@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/stock.lib.php';
$langs->load("stocks");
// Security check
$result=restrictedArea($user,'stock');
// Security check
$result=restrictedArea($user,'stock');
/*

View File

@ -389,7 +389,7 @@ if (! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN
llxFooterVierge();
$db->close();
$db->close();
/**

View File

@ -113,7 +113,7 @@ if ($mode == 'search')
// Filter on type of thirdparty
if ($search_type > 0 && in_array($search_type,array('1,3','2,3'))) $sql .= " AND s.client IN (".$db->escape($search_type).")";
if ($search_type > 0 && in_array($search_type,array('4'))) $sql .= " AND s.fournisseur = 1";
if ($search_type == '0') $sql .= " AND s.client = 0 AND s.fournisseur = 0";
if ($search_type == '0') $sql .= " AND s.client = 0 AND s.fournisseur = 0";
$result=$db->query($sql);
if ($result)
@ -236,7 +236,7 @@ if ($search_idprof3) $sql .= " AND s.ape LIKE '%".$db->escape($search_idprof3)."
if ($search_idprof4) $sql .= " AND s.idprof4 LIKE '%".$db->escape($search_idprof4)."%'";
if ($search_idprof5) $sql .= " AND s.idprof5 LIKE '%".$db->escape($search_idprof5)."%'";
if ($search_idprof6) $sql .= " AND s.idprof6 LIKE '%".$db->escape($search_idprof6)."%'";
// Filter on type of thirdparty
// Filter on type of thirdparty
if ($search_type > 0 && in_array($search_type,array('1,3','2,3'))) $sql .= " AND s.client IN (".$db->escape($search_type).")";
if ($search_type > 0 && in_array($search_type,array('4'))) $sql .= " AND s.fournisseur = 1";
if ($search_type == '0') $sql .= " AND s.client = 0 AND s.fournisseur = 0";
@ -353,14 +353,14 @@ if ($resql)
print '<td class="liste_titre">';
print '<input class="flat" size="8" type="text" name="search_idprof4" value="'.$search_idprof4.'">';
print '</td>';
// Type (customer/prospect/supplier)
print '<td class="liste_titre" align="middle">';
print '<select class="flat" name="search_type">';
print '<option value="-1"'.($search_type==''?' selected="selected"':'').'>&nbsp;</option>';
print '<option value="1,3"'.($search_type=='1,3'?' selected="selected"':'').'>'.$langs->trans('Customer').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2,3"'.($search_type=='2,3'?' selected="selected"':'').'>'.$langs->trans('Prospect').'</option>';
//if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="3"'.($search_type=='3'?' selected="selected"':'').'>'.$langs->trans('ProspectCustomer').'</option>';
print '<option value="4"'.($search_type=='4'?' selected="selected"':'').'>'.$langs->trans('Supplier').'</option>';
// Type (customer/prospect/supplier)
print '<td class="liste_titre" align="middle">';
print '<select class="flat" name="search_type">';
print '<option value="-1"'.($search_type==''?' selected="selected"':'').'>&nbsp;</option>';
print '<option value="1,3"'.($search_type=='1,3'?' selected="selected"':'').'>'.$langs->trans('Customer').'</option>';
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="2,3"'.($search_type=='2,3'?' selected="selected"':'').'>'.$langs->trans('Prospect').'</option>';
//if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) print '<option value="3"'.($search_type=='3'?' selected="selected"':'').'>'.$langs->trans('ProspectCustomer').'</option>';
print '<option value="4"'.($search_type=='4'?' selected="selected"':'').'>'.$langs->trans('Supplier').'</option>';
print '<option value="0"'.($search_type=='0'?' selected="selected"':'').'>'.$langs->trans('Others').'</option>';
print '</select></td>';
// Status

View File

@ -22,10 +22,10 @@
* \ingroup core
*/
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
$theme_bordercolor = array(235,235,224);
$theme_datacolor = array(array(125,135,150), array(200,160,180), array(190,190,220), array(170,140,190), array(190,190,170));
$theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4'));
$theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC'));
global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
$theme_bordercolor = array(235,235,224);
$theme_datacolor = array(array(125,135,150), array(200,160,180), array(190,190,220), array(170,140,190), array(190,190,170));
$theme_bgcolor = array(hexdec('F4'),hexdec('F4'),hexdec('F4'));
$theme_bgcoloronglet = array(hexdec('DE'),hexdec('E7'),hexdec('EC'));
?>

View File

@ -391,24 +391,24 @@ if ($action == 'update' && ! $_POST["cancel"])
$contact=new Contact($db);
$contact->fetch($contactid);
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
$sql.= " SET fk_socpeople=".$contactid;
if ($contact->socid) $sql.=", fk_societe=".$contact->socid;
$sql.= " WHERE rowid=".$object->id;
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
$sql.= " SET fk_socpeople=".$contactid;
if ($contact->socid) $sql.=", fk_societe=".$contact->socid;
$sql.= " WHERE rowid=".$object->id;
}
else
{
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
$sql.= " SET fk_socpeople=NULL, fk_societe=NULL";
$sql.= " WHERE rowid=".$object->id;
$sql = "UPDATE ".MAIN_DB_PREFIX."user";
$sql.= " SET fk_socpeople=NULL, fk_societe=NULL";
$sql.= " WHERE rowid=".$object->id;
}
$resql=$db->query($sql);
$resql=$db->query($sql);
dol_syslog("fiche::update sql=".$sql, LOG_DEBUG);
if (! $resql)
{
$error++;
$message.='<div class="error">'.$db->lasterror().'</div>';
}
}
}
if (! $error && ! count($object->errors))
@ -1191,12 +1191,12 @@ else
print '</td></tr>'."\n";
// ldap sid
if ($object->ldap_sid)
{
if ($object->ldap_sid)
{
print '<tr><td valign="top">'.$langs->trans("Type").'</td><td>';
print $langs->trans("DomainUser",$ldap->domainFQDN);
print $langs->trans("DomainUser",$ldap->domainFQDN);
print '</td></tr>'."\n";
}
}
// Tel pro
print '<tr><td valign="top">'.$langs->trans("PhonePro").'</td>';
@ -1402,13 +1402,13 @@ else
if ($user->id <> $id && $candisableuser &&
(empty($conf->multicompany->enabled) || ! $user->entity || ($object->entity == $conf->entity) || ($conf->multicompany->transverse_mode && $conf->entity == 1)))
{
if ($user->admin || ! $object->admin) // If user edited is admin, delete is possible on for an admin
if ($user->admin || ! $object->admin) // If user edited is admin, delete is possible on for an admin
{
print '<a class="butActionDelete" href="fiche.php?action=delete&amp;id='.$object->id.'">'.$langs->trans("DeleteUser").'</a>';
}
else
{
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("MustBeAdminToDeleteOtherAdmin")).'">'.$langs->trans("DeleteUser").'</a>';
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->trans("MustBeAdminToDeleteOtherAdmin")).'">'.$langs->trans("DeleteUser").'</a>';
}
}
@ -1758,10 +1758,10 @@ else
print '<td>';
if ($user->id == $object->id || ! $user->admin)
{
$type=$langs->trans("Internal");
if ($object->societe_id) $type=$langs->trans("External");
print $form->textwithpicto($type,$langs->trans("InternalExternalDesc"));
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
$type=$langs->trans("Internal");
if ($object->societe_id) $type=$langs->trans("External");
print $form->textwithpicto($type,$langs->trans("InternalExternalDesc"));
if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')';
}
else
{

View File

@ -174,21 +174,21 @@ else
}
}
// Note: $conf->css looks like '/theme/eldy/style.css.php'
$conf->css = "/theme/".(GETPOST('theme')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";
$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
if (! empty($conf->modules_parts['theme'])) // This slow down
{
foreach($conf->modules_parts['theme'] as $reldir)
{
if (file_exists(dol_buildpath($reldir.$conf->css, 0)))
{
$themepath=dol_buildpath($reldir.$conf->css, 1);
break;
}
}
}
$conf_css = $themepath."?lang=".$langs->defaultlang;
// Note: $conf->css looks like '/theme/eldy/style.css.php'
$conf->css = "/theme/".(GETPOST('theme')?GETPOST('theme','alpha'):$conf->theme)."/style.css.php";
$themepath=dol_buildpath((empty($conf->global->MAIN_FORCETHEMEDIR)?'':$conf->global->MAIN_FORCETHEMEDIR).$conf->css,1);
if (! empty($conf->modules_parts['theme'])) // This slow down
{
foreach($conf->modules_parts['theme'] as $reldir)
{
if (file_exists(dol_buildpath($reldir.$conf->css, 0)))
{
$themepath=dol_buildpath($reldir.$conf->css, 1);
break;
}
}
}
$conf_css = $themepath."?lang=".$langs->defaultlang;
$jquerytheme = 'smoothness';
if (! empty($conf->global->MAIN_USE_JQUERY_THEME)) $jquerytheme = $conf->global->MAIN_USE_JQUERY_THEME;

View File

@ -27,8 +27,8 @@
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
$langs->load("users");
$langs->load("admin");
@ -267,8 +267,8 @@ print '</tr>'."\n";
print '</table><br>';
if ($user->admin) print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules"), 0, 1).'<br>';
// Show warning about external users
print showModulesExludedForExternal($modules).'<br>'."\n";
// Show warning about external users
print showModulesExludedForExternal($modules).'<br>'."\n";
print "<br>\n";
// For multicompany transversal mode