Merge branch 'develop' of git://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
671837bfcc
@ -1,15 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#------------------------------------------------------
|
|
||||||
# Script to find files that are not Unix encoded
|
|
||||||
#
|
|
||||||
# Laurent Destailleur - eldy@users.sourceforge.net
|
|
||||||
#------------------------------------------------------
|
|
||||||
# Usage: finddosfiles.sh
|
|
||||||
#------------------------------------------------------
|
|
||||||
|
|
||||||
# To detec
|
|
||||||
find . -type f -iname "*.php" -exec file "{}" + | grep CRLF
|
|
||||||
|
|
||||||
# To convert
|
|
||||||
#find . -type f -iname "*.php" -exec dos2unix "{}" +;
|
|
||||||
|
|
||||||
30
dev/fixdosfiles.sh
Executable file
30
dev/fixdosfiles.sh
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#------------------------------------------------------
|
||||||
|
# Script to find files that are not Unix encoded
|
||||||
|
#
|
||||||
|
# Laurent Destailleur - eldy@users.sourceforge.net
|
||||||
|
#------------------------------------------------------
|
||||||
|
# Usage: fixdosfiles.sh [list|fix]
|
||||||
|
#------------------------------------------------------
|
||||||
|
|
||||||
|
# Syntax
|
||||||
|
if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
|
||||||
|
then
|
||||||
|
echo "Usage: fixdosfiles.sh [list|fix]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# To detec
|
||||||
|
if [ "x$1" = "xlist" ]
|
||||||
|
then
|
||||||
|
find . -type f -iname "*.php" -exec file "{}" + | grep CRLF
|
||||||
|
fi
|
||||||
|
|
||||||
|
# To convert
|
||||||
|
if [ "x$1" = "xfix" ]
|
||||||
|
then
|
||||||
|
for fic in `find . -type f -iname "*.php" -exec file "{}" + | grep CRLF | awk -F':' '{ print $1 }' `
|
||||||
|
do
|
||||||
|
echo "Fix file $fic"
|
||||||
|
dos2unix $fic
|
||||||
|
done;
|
||||||
|
fi
|
||||||
@ -40,8 +40,8 @@ $error=0;
|
|||||||
|
|
||||||
|
|
||||||
// -------------------- START OF YOUR CODE HERE --------------------
|
// -------------------- START OF YOUR CODE HERE --------------------
|
||||||
@set_time_limit(0); // No timeout for this script
|
@set_time_limit(0); // No timeout for this script
|
||||||
define('EVEN_IF_ONLY_LOGIN_ALLOWED',1); // Set this define to 0 if you want to lock your script when dolibarr setup is "locked to admin user only".
|
define('EVEN_IF_ONLY_LOGIN_ALLOWED',1); // Set this define to 0 if you want to lock your script when dolibarr setup is "locked to admin user only".
|
||||||
|
|
||||||
// Include and load Dolibarr environment variables
|
// Include and load Dolibarr environment variables
|
||||||
require_once($path."../../htdocs/master.inc.php");
|
require_once($path."../../htdocs/master.inc.php");
|
||||||
|
|||||||
@ -169,7 +169,7 @@ print $form->selectyesno('constvalue',(! empty($conf->global->ADHERENT_DEFAULT_S
|
|||||||
print '</td><td align="center" width="80">';
|
print '</td><td align="center" width="80">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// Insert subscription into bank account
|
// Insert subscription into bank account
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
@ -179,41 +179,41 @@ print '<input type="hidden" name="action" value="update">';
|
|||||||
print '<input type="hidden" name="constname" value="ADHERENT_BANK_USE">';
|
print '<input type="hidden" name="constname" value="ADHERENT_BANK_USE">';
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MoreActionsOnSubscription").'</td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("MoreActionsOnSubscription").'</td>';
|
||||||
$arraychoices=array('0'=>$langs->trans("None"));
|
$arraychoices=array('0'=>$langs->trans("None"));
|
||||||
if (! empty($conf->banque->enabled)) $arraychoices['bankdirect']=$langs->trans("MoreActionBankDirect");
|
if (! empty($conf->banque->enabled)) $arraychoices['bankdirect']=$langs->trans("MoreActionBankDirect");
|
||||||
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['invoiceonly']=$langs->trans("MoreActionInvoiceOnly");
|
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['invoiceonly']=$langs->trans("MoreActionInvoiceOnly");
|
||||||
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['bankviainvoice']=$langs->trans("MoreActionBankViaInvoice");
|
if (! empty($conf->banque->enabled) && ! empty($conf->societe->enabled) && ! empty($conf->facture->enabled)) $arraychoices['bankviainvoice']=$langs->trans("MoreActionBankViaInvoice");
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->selectarray('constvalue',$arraychoices,$conf->global->ADHERENT_BANK_USE,0);
|
print $form->selectarray('constvalue',$arraychoices,$conf->global->ADHERENT_BANK_USE,0);
|
||||||
print '</td><td align="center" width="80">';
|
print '</td><td align="center" width="80">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
// Use vat for invoice creation
|
// Use vat for invoice creation
|
||||||
if ($conf->facture->enabled)
|
if ($conf->facture->enabled)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<form action="adherent.php" method="POST">';
|
print '<form action="adherent.php" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="update">';
|
print '<input type="hidden" name="action" value="update">';
|
||||||
print '<input type="hidden" name="constname" value="ADHERENT_VAT_FOR_SUBSCRIPTIONS">';
|
print '<input type="hidden" name="constname" value="ADHERENT_VAT_FOR_SUBSCRIPTIONS">';
|
||||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("VATToUseForSubscriptions").'</td>';
|
print '<tr '.$bc[$var].'><td>'.$langs->trans("VATToUseForSubscriptions").'</td>';
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $form->selectarray('constvalue', array('0'=>$langs->trans("NoVatOnSubscription"),'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS)?'0':$conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0);
|
print $form->selectarray('constvalue', array('0'=>$langs->trans("NoVatOnSubscription"),'defaultforfoundationcountry'=>$langs->trans("Default")), (empty($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS)?'0':$conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS), 0);
|
||||||
print '</td><td align="center" width="80">';
|
print '</td><td align="center" width="80">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Update").'" name="Button">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<td align="right" colspan="2">';
|
print '<td align="right" colspan="2">';
|
||||||
print $langs->trans("WarningModuleNotActive",$langs->transnoentities("Module85Name"));
|
print $langs->trans("WarningModuleNotActive",$langs->transnoentities("Module85Name"));
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -362,7 +362,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'cotisation' && ! $
|
|||||||
|
|
||||||
// Add line to draft invoice
|
// Add line to draft invoice
|
||||||
$idprodsubscription=0;
|
$idprodsubscription=0;
|
||||||
$vattouse=0;
|
$vattouse=0;
|
||||||
if (isset($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) && $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS == 'defaultforfoundationcountry')
|
if (isset($conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS) && $conf->global->ADHERENT_VAT_FOR_SUBSCRIPTIONS == 'defaultforfoundationcountry')
|
||||||
{
|
{
|
||||||
$vattouse=get_default_tva($mysoc, $mysoc, $idprodsubscription);
|
$vattouse=get_default_tva($mysoc, $mysoc, $idprodsubscription);
|
||||||
|
|||||||
@ -197,7 +197,7 @@ if ($conf->use_javascript_ajax)
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td class="notopnoleftnoright" valign="top">';
|
//print '</td><td class="notopnoleftnoright" valign="top">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
@ -419,7 +419,7 @@ print "</tr>\n";
|
|||||||
print "</table><br>\n";
|
print "</table><br>\n";
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -139,9 +139,9 @@ $head=agenda_prepare_head();
|
|||||||
|
|
||||||
dol_fiche_head($head, 'autoactions', $langs->trans("Agenda"));
|
dol_fiche_head($head, 'autoactions', $langs->trans("Agenda"));
|
||||||
|
|
||||||
print $langs->trans("AgendaAutoActionDesc")."<br>\n";
|
print $langs->trans("AgendaAutoActionDesc")."<br>\n";
|
||||||
print $langs->trans("OnlyActiveElementsAreShown").'<br>';
|
print $langs->trans("OnlyActiveElementsAreShown").'<br>';
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|||||||
@ -64,8 +64,8 @@ if ($actionsave)
|
|||||||
{
|
{
|
||||||
$name=trim(GETPOST('agenda_ext_name'.$i),'alpha');
|
$name=trim(GETPOST('agenda_ext_name'.$i),'alpha');
|
||||||
$src=trim(GETPOST('agenda_ext_src'.$i,'alpha'));
|
$src=trim(GETPOST('agenda_ext_src'.$i,'alpha'));
|
||||||
$color=trim(GETPOST('agenda_ext_color'.$i,'alpha'));
|
$color=trim(GETPOST('agenda_ext_color'.$i,'alpha'));
|
||||||
if ($color=='-1') $color='';
|
if ($color=='-1') $color='';
|
||||||
|
|
||||||
if (! empty($src) && ! preg_match('/^(http\s*|ftp\s*):/', $src))
|
if (! empty($src) && ! preg_match('/^(http\s*|ftp\s*):/', $src))
|
||||||
{
|
{
|
||||||
@ -148,32 +148,32 @@ $var=!$var;
|
|||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
print "<td>".$langs->trans("ExtSitesEnableThisTool")."</td>";
|
print "<td>".$langs->trans("ExtSitesEnableThisTool")."</td>";
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
if ($conf->use_javascript_ajax)
|
if ($conf->use_javascript_ajax)
|
||||||
{
|
{
|
||||||
print ajax_constantonoff('AGENDA_DISABLE_EXT',array('enabled'=>array(0=>'.hideifnotset')),null,1);
|
print ajax_constantonoff('AGENDA_DISABLE_EXT',array('enabled'=>array(0=>'.hideifnotset')),null,1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if($conf->global->AGENDA_DISABLE_EXT == 0)
|
if($conf->global->AGENDA_DISABLE_EXT == 0)
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?save=1&AGENDA_DISABLE_EXT=1">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?save=1&AGENDA_DISABLE_EXT=1">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<a href="'.$_SERVER['PHP_SELF'].'?save=1&AGENDA_DISABLE_EXT=0">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
print '<a href="'.$_SERVER['PHP_SELF'].'?save=1&AGENDA_DISABLE_EXT=0">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
// Nb of agenda
|
// Nb of agenda
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
print "<td>".$langs->trans("ExtSitesNbOfAgenda")."</td>";
|
print "<td>".$langs->trans("ExtSitesNbOfAgenda")."</td>";
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print '<input class="flat hideifnotset" type="text" size="2" id="AGENDA_EXT_NB" name="AGENDA_EXT_NB" value="'.$conf->global->AGENDA_EXT_NB.'">';
|
print '<input class="flat hideifnotset" type="text" size="2" id="AGENDA_EXT_NB" name="AGENDA_EXT_NB" value="'.$conf->global->AGENDA_EXT_NB.'">';
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
print "<br>";
|
print "<br>";
|
||||||
|
|||||||
@ -80,8 +80,8 @@ $head=agenda_prepare_head();
|
|||||||
|
|
||||||
dol_fiche_head($head, 'xcal', $langs->trans("Agenda"));
|
dol_fiche_head($head, 'xcal', $langs->trans("Agenda"));
|
||||||
|
|
||||||
print $langs->trans("AgendaSetupOtherDesc")."<br>\n";
|
print $langs->trans("AgendaSetupOtherDesc")."<br>\n";
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
|
|
||||||
print '<form name="agendasetupform" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
print '<form name="agendasetupform" action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
|
|||||||
@ -122,7 +122,7 @@ if (! empty($consts) && $action == 'delete')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($nbdeleted > 0) setEventMessage($langs->trans("RecordDeleted"));
|
if ($nbdeleted > 0) setEventMessage($langs->trans("RecordDeleted"));
|
||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Delete line from delete picto
|
// Delete line from delete picto
|
||||||
@ -130,7 +130,7 @@ if ($action == 'delete')
|
|||||||
{
|
{
|
||||||
if (dolibarr_del_const($db, $rowid, $entity) >= 0)
|
if (dolibarr_del_const($db, $rowid, $entity) >= 0)
|
||||||
{
|
{
|
||||||
setEventMessage($langs->trans("RecordDeleted"));
|
setEventMessage($langs->trans("RecordDeleted"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -222,8 +222,8 @@ print '</form>';
|
|||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
|
print '<form action="'.$_SERVER["PHP_SELF"].((empty($user->entity) && $debug)?'?debug=1':'').'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" id="action" name="action" value="">';
|
print '<input type="hidden" id="action" name="action" value="">';
|
||||||
|
|
||||||
// Show constants
|
// Show constants
|
||||||
$sql = "SELECT";
|
$sql = "SELECT";
|
||||||
|
|||||||
@ -125,8 +125,8 @@ $tablib[20]= "DictionnaryOrderMethods";
|
|||||||
$tablib[21]= "DictionnaryAvailability";
|
$tablib[21]= "DictionnaryAvailability";
|
||||||
$tablib[22]= "DictionnarySource";
|
$tablib[22]= "DictionnarySource";
|
||||||
$tablib[23]= "DictionnaryAccountancyplan";
|
$tablib[23]= "DictionnaryAccountancyplan";
|
||||||
$tablib[24]= "DictionnaryAccountancysystem";
|
$tablib[24]= "DictionnaryAccountancysystem";
|
||||||
$tablib[25]= "DictionnaryRevenueStamp";
|
$tablib[25]= "DictionnaryRevenueStamp";
|
||||||
|
|
||||||
// Requete pour extraction des donnees des dictionnaires
|
// Requete pour extraction des donnees des dictionnaires
|
||||||
$tabsql=array();
|
$tabsql=array();
|
||||||
@ -153,8 +153,8 @@ $tabsql[20]= "SELECT rowid as rowid, code, libelle, active FROM ".MAIN_DB_PREF
|
|||||||
$tabsql[21]= "SELECT c.rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_availability AS c";
|
$tabsql[21]= "SELECT c.rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_availability AS c";
|
||||||
$tabsql[22]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason";
|
$tabsql[22]= "SELECT rowid as rowid, code, label, active FROM ".MAIN_DB_PREFIX."c_input_reason";
|
||||||
$tabsql[23]= "SELECT rowid as rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number as accountancy_code, account_parent, label, active FROM ".MAIN_DB_PREFIX."accountingaccount";
|
$tabsql[23]= "SELECT rowid as rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number as accountancy_code, account_parent, label, active FROM ".MAIN_DB_PREFIX."accountingaccount";
|
||||||
$tabsql[24]= "SELECT s.rowid as rowid, pcg_version, s.fk_pays as country_id, p.code as country_code, p.libelle as pays, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s, ".MAIN_DB_PREFIX."c_pays as p WHERE s.fk_pays=p.rowid and p.active=1";
|
$tabsql[24]= "SELECT s.rowid as rowid, pcg_version, s.fk_pays as country_id, p.code as country_code, p.libelle as pays, s.label, s.active FROM ".MAIN_DB_PREFIX."accounting_system as s, ".MAIN_DB_PREFIX."c_pays as p WHERE s.fk_pays=p.rowid and p.active=1";
|
||||||
$tabsql[25]= "SELECT t.rowid, t.taux, p.libelle as country, p.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";
|
$tabsql[25]= "SELECT t.rowid, t.taux, p.libelle as country, p.code as country_code, t.fk_pays as country_id, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_revenuestamp as t, llx_c_pays as p WHERE t.fk_pays=p.rowid";
|
||||||
|
|
||||||
// Critere de tri du dictionnaire
|
// Critere de tri du dictionnaire
|
||||||
$tabsqlsort=array();
|
$tabsqlsort=array();
|
||||||
@ -181,8 +181,8 @@ $tabsqlsort[20]="code ASC, libelle ASC";
|
|||||||
$tabsqlsort[21]="code ASC, label ASC";
|
$tabsqlsort[21]="code ASC, label ASC";
|
||||||
$tabsqlsort[22]="code ASC, label ASC";
|
$tabsqlsort[22]="code ASC, label ASC";
|
||||||
$tabsqlsort[23]="fk_pcg_version ASC, accountancy_code ASC";
|
$tabsqlsort[23]="fk_pcg_version ASC, accountancy_code ASC";
|
||||||
$tabsqlsort[24]="pcg_version ASC";
|
$tabsqlsort[24]="pcg_version ASC";
|
||||||
$tabsqlsort[25]="country ASC, taux ASC";
|
$tabsqlsort[25]="country ASC, taux ASC";
|
||||||
|
|
||||||
// Nom des champs en resultat de select pour affichage du dictionnaire
|
// Nom des champs en resultat de select pour affichage du dictionnaire
|
||||||
$tabfield=array();
|
$tabfield=array();
|
||||||
@ -209,8 +209,8 @@ $tabfield[20]= "code,libelle";
|
|||||||
$tabfield[21]= "code,label";
|
$tabfield[21]= "code,label";
|
||||||
$tabfield[22]= "code,label";
|
$tabfield[22]= "code,label";
|
||||||
$tabfield[23]= "fk_pcg_version,accountancy_code,account_parent,pcg_type,pcg_subtype,label";
|
$tabfield[23]= "fk_pcg_version,accountancy_code,account_parent,pcg_type,pcg_subtype,label";
|
||||||
$tabfield[24]= "pcg_version,country_id,country,label";
|
$tabfield[24]= "pcg_version,country_id,country,label";
|
||||||
$tabfield[25]= "country_id,country,taux,accountancy_code_sell,accountancy_code_buy,note";
|
$tabfield[25]= "country_id,country,taux,accountancy_code_sell,accountancy_code_buy,note";
|
||||||
|
|
||||||
// Nom des champs d'edition pour modification d'un enregistrement
|
// Nom des champs d'edition pour modification d'un enregistrement
|
||||||
$tabfieldvalue=array();
|
$tabfieldvalue=array();
|
||||||
@ -237,8 +237,8 @@ $tabfieldvalue[20]= "code,libelle";
|
|||||||
$tabfieldvalue[21]= "code,label";
|
$tabfieldvalue[21]= "code,label";
|
||||||
$tabfieldvalue[22]= "code,label";
|
$tabfieldvalue[22]= "code,label";
|
||||||
$tabfieldvalue[23]= "fk_pcg_version,accountancy_code,account_parent,pcg_type,pcg_subtype,label";
|
$tabfieldvalue[23]= "fk_pcg_version,accountancy_code,account_parent,pcg_type,pcg_subtype,label";
|
||||||
$tabfieldvalue[24]= "pcg_version,country,label";
|
$tabfieldvalue[24]= "pcg_version,country,label";
|
||||||
$tabfieldvalue[25]= "country,taux,accountancy_code_sell,accountancy_code_buy,note";
|
$tabfieldvalue[25]= "country,taux,accountancy_code_sell,accountancy_code_buy,note";
|
||||||
|
|
||||||
// Nom des champs dans la table pour insertion d'un enregistrement
|
// Nom des champs dans la table pour insertion d'un enregistrement
|
||||||
$tabfieldinsert=array();
|
$tabfieldinsert=array();
|
||||||
@ -265,8 +265,8 @@ $tabfieldinsert[20]= "code,libelle";
|
|||||||
$tabfieldinsert[21]= "code,label";
|
$tabfieldinsert[21]= "code,label";
|
||||||
$tabfieldinsert[22]= "code,label";
|
$tabfieldinsert[22]= "code,label";
|
||||||
$tabfieldinsert[23]= "fk_pcg_version,account_number,account_parent,pcg_type,pcg_subtype,label";
|
$tabfieldinsert[23]= "fk_pcg_version,account_number,account_parent,pcg_type,pcg_subtype,label";
|
||||||
$tabfieldinsert[24]= "pcg_version,fk_pays,label";
|
$tabfieldinsert[24]= "pcg_version,fk_pays,label";
|
||||||
$tabfieldinsert[25]= "fk_pays,taux,accountancy_code_sell,accountancy_code_buy,note";
|
$tabfieldinsert[25]= "fk_pays,taux,accountancy_code_sell,accountancy_code_buy,note";
|
||||||
|
|
||||||
// Nom du rowid si le champ n'est pas de type autoincrement
|
// Nom du rowid si le champ n'est pas de type autoincrement
|
||||||
// Example: "" if id field is "rowid" and has autoincrement on
|
// Example: "" if id field is "rowid" and has autoincrement on
|
||||||
@ -295,8 +295,8 @@ $tabrowid[20]= "";
|
|||||||
$tabrowid[21]= "rowid";
|
$tabrowid[21]= "rowid";
|
||||||
$tabrowid[22]= "rowid";
|
$tabrowid[22]= "rowid";
|
||||||
$tabrowid[23]= "";
|
$tabrowid[23]= "";
|
||||||
$tabrowid[24]= "";
|
$tabrowid[24]= "";
|
||||||
$tabrowid[25]= "";
|
$tabrowid[25]= "";
|
||||||
|
|
||||||
// Condition to show dictionnary in setup page
|
// Condition to show dictionnary in setup page
|
||||||
$tabcond=array();
|
$tabcond=array();
|
||||||
@ -323,8 +323,8 @@ $tabcond[20]= ! empty($conf->fournisseur->enabled);
|
|||||||
$tabcond[21]= ! empty($conf->propal->enabled);
|
$tabcond[21]= ! empty($conf->propal->enabled);
|
||||||
$tabcond[22]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled));
|
$tabcond[22]= (! empty($conf->commande->enabled) || ! empty($conf->propal->enabled));
|
||||||
$tabcond[23]= (! empty($conf->global->ACCOUNTING_USEDICTTOEDIT) && ! empty($conf->accounting->enabled)); // The accountancy plan should be edited with specific pages. You can set ACCOUNTING_USEDICTTOEDIT to 1 if you want to use dictionnary editor.
|
$tabcond[23]= (! empty($conf->global->ACCOUNTING_USEDICTTOEDIT) && ! empty($conf->accounting->enabled)); // The accountancy plan should be edited with specific pages. You can set ACCOUNTING_USEDICTTOEDIT to 1 if you want to use dictionnary editor.
|
||||||
$tabcond[24]= (! empty($conf->global->ACCOUNTING_USEDICTTOEDIT) && ! empty($conf->accounting->enabled)); // The accountancy system should be edited with specific pages. You can set ACCOUNTING_USEDICTTOEDIT to 1 if you want to use dictionnary editor.
|
$tabcond[24]= (! empty($conf->global->ACCOUNTING_USEDICTTOEDIT) && ! empty($conf->accounting->enabled)); // The accountancy system should be edited with specific pages. You can set ACCOUNTING_USEDICTTOEDIT to 1 if you want to use dictionnary editor.
|
||||||
$tabcond[25]= true;
|
$tabcond[25]= true;
|
||||||
|
|
||||||
// List of help for fields
|
// List of help for fields
|
||||||
$tabhelp=array();
|
$tabhelp=array();
|
||||||
@ -351,8 +351,8 @@ $tabhelp[20] = array();
|
|||||||
$tabhelp[21] = array();
|
$tabhelp[21] = array();
|
||||||
$tabhelp[22] = array();
|
$tabhelp[22] = array();
|
||||||
$tabhelp[23] = array();
|
$tabhelp[23] = array();
|
||||||
$tabhelp[24] = array();
|
$tabhelp[24] = array();
|
||||||
$tabhelp[25] = array();
|
$tabhelp[25] = array();
|
||||||
|
|
||||||
// Complete all arrays with entries found into modules
|
// Complete all arrays with entries found into modules
|
||||||
complete_dictionnary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp);
|
complete_dictionnary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp);
|
||||||
|
|||||||
@ -77,21 +77,21 @@ if ($action == 'update' && empty($_POST["cancel"]))
|
|||||||
|
|
||||||
// Define list of menu handlers to initialize
|
// Define list of menu handlers to initialize
|
||||||
$listofmenuhandler=array();
|
$listofmenuhandler=array();
|
||||||
$listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',$_POST["MAIN_MENU_STANDARD"])]=1;
|
$listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',$_POST["MAIN_MENU_STANDARD"])]=1;
|
||||||
$listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',$_POST["MAIN_MENUFRONT_STANDARD"])]=1;
|
$listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',$_POST["MAIN_MENUFRONT_STANDARD"])]=1;
|
||||||
if (isset($_POST["MAIN_MENU_SMARTPHONE"])) $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',$_POST["MAIN_MENU_SMARTPHONE"])]=1;
|
if (isset($_POST["MAIN_MENU_SMARTPHONE"])) $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',$_POST["MAIN_MENU_SMARTPHONE"])]=1;
|
||||||
if (isset($_POST["MAIN_MENUFRONT_SMARTPHONE"])) $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',$_POST["MAIN_MENUFRONT_SMARTPHONE"])]=1;
|
if (isset($_POST["MAIN_MENUFRONT_SMARTPHONE"])) $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',$_POST["MAIN_MENUFRONT_SMARTPHONE"])]=1;
|
||||||
|
|
||||||
// Initialize menu handlers
|
// Initialize menu handlers
|
||||||
foreach ($listofmenuhandler as $key => $val)
|
foreach ($listofmenuhandler as $key => $val)
|
||||||
{
|
{
|
||||||
// Load sql init_menu_handler.sql file
|
// Load sql init_menu_handler.sql file
|
||||||
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
|
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
|
||||||
foreach($dirmenus as $dirmenu)
|
foreach($dirmenus as $dirmenu)
|
||||||
{
|
{
|
||||||
$file='init_menu_'.$key.'.sql';
|
$file='init_menu_'.$key.'.sql';
|
||||||
$fullpath=dol_buildpath($dirmenu.$file);
|
$fullpath=dol_buildpath($dirmenu.$file);
|
||||||
//print 'action='.$action.' Search menu into fullpath='.$fullpath.'<br>';exit;
|
//print 'action='.$action.' Search menu into fullpath='.$fullpath.'<br>';exit;
|
||||||
|
|
||||||
if (file_exists($fullpath))
|
if (file_exists($fullpath))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -57,7 +57,7 @@ $menu_handler=$menu_handler_top;
|
|||||||
if (GETPOST("handler_origine")) $menu_handler=GETPOST("handler_origine");
|
if (GETPOST("handler_origine")) $menu_handler=GETPOST("handler_origine");
|
||||||
if (GETPOST("menu_handler")) $menu_handler=GETPOST("menu_handler");
|
if (GETPOST("menu_handler")) $menu_handler=GETPOST("menu_handler");
|
||||||
|
|
||||||
$menu_handler_to_search=preg_replace('/(_backoffice|_frontoffice|_menu)?(\.php)?/i','',$menu_handler);
|
$menu_handler_to_search=preg_replace('/(_backoffice|_frontoffice|_menu)?(\.php)?/i','',$menu_handler);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -207,8 +207,8 @@ elseif ($action == 'confirm_delete' && $confirm == 'yes')
|
|||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
$formadmin=new FormAdmin($db);
|
$formadmin=new FormAdmin($db);
|
||||||
|
|
||||||
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
||||||
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
|
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
|
||||||
|
|
||||||
llxHeader('',$langs->trans("Menus"),'','',0,0,$arrayofjs,$arrayofcss);
|
llxHeader('',$langs->trans("Menus"),'','',0,0,$arrayofjs,$arrayofcss);
|
||||||
|
|
||||||
@ -324,14 +324,14 @@ if ($conf->use_javascript_ajax)
|
|||||||
'leftmenu'=>$menu['leftmenu'],
|
'leftmenu'=>$menu['leftmenu'],
|
||||||
'fk_mainmenu'=>$menu['fk_mainmenu'],
|
'fk_mainmenu'=>$menu['fk_mainmenu'],
|
||||||
'fk_leftmenu'=>$menu['fk_leftmenu'],
|
'fk_leftmenu'=>$menu['fk_leftmenu'],
|
||||||
'entry'=>'<table class="nobordernopadding centpercent"><tr><td>'.
|
'entry'=>'<table class="nobordernopadding centpercent"><tr><td>'.
|
||||||
'<strong> <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.$titre.'</a></strong>'.
|
'<strong> <a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.$titre.'</a></strong>'.
|
||||||
'</td><td align="right">'.
|
'</td><td align="right">'.
|
||||||
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default',0,'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
|
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=edit&menuId='.$menu['rowid'].'">'.img_edit('default',0,'class="menuEdit" id="edit'.$menu['rowid'].'"').'</a> '.
|
||||||
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default',0,'class="menuNew" id="new'.$menu['rowid'].'"').'</a> '.
|
'<a href="edit.php?menu_handler='.$menu_handler_to_search.'&action=create&menuId='.$menu['rowid'].'">'.img_edit_add('default',0,'class="menuNew" id="new'.$menu['rowid'].'"').'</a> '.
|
||||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default',0,'class="menuDel" id="del'.$menu['rowid'].'"').'</a> '.
|
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=delete&menuId='.$menu['rowid'].'">'.img_delete('default',0,'class="menuDel" id="del'.$menu['rowid'].'"').'</a> '.
|
||||||
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Monter","1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Descendre","1downarrow").'</a>'.
|
'<a href="index.php?menu_handler='.$menu_handler_to_search.'&action=up&menuId='.$menu['rowid'].'">'.img_picto("Monter","1uparrow").'</a><a href="index.php?menu_handler='.$menu_handler_to_search.'&action=down&menuId='.$menu['rowid'].'">'.img_picto("Descendre","1downarrow").'</a>'.
|
||||||
'</td></tr></table>'
|
'</td></tr></table>'
|
||||||
);
|
);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -197,14 +197,14 @@ $moreinfo=$langs->trans("TotalNumberOfActivatedModules",($nbofactivatedmodules-1
|
|||||||
|
|
||||||
print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'setup');
|
print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'setup');
|
||||||
|
|
||||||
// Start to show page
|
// Start to show page
|
||||||
if (empty($mode)) $mode='common';
|
if (empty($mode)) $mode='common';
|
||||||
if ($mode==='common') print $langs->trans("ModulesDesc")."<br>\n";
|
if ($mode==='common') print $langs->trans("ModulesDesc")."<br>\n";
|
||||||
if ($mode==='other') print $langs->trans("ModulesSpecialDesc")."<br>\n";
|
if ($mode==='other') print $langs->trans("ModulesSpecialDesc")."<br>\n";
|
||||||
if ($mode==='interfaces') print $langs->trans("ModulesInterfaceDesc")."<br>\n";
|
if ($mode==='interfaces') print $langs->trans("ModulesInterfaceDesc")."<br>\n";
|
||||||
if ($mode==='functional') print $langs->trans("ModulesJobDesc")."<br>\n";
|
if ($mode==='functional') print $langs->trans("ModulesJobDesc")."<br>\n";
|
||||||
if ($mode==='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."<br>\n";
|
if ($mode==='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."<br>\n";
|
||||||
if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."<br>\n";
|
if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."<br>\n";
|
||||||
|
|
||||||
if ($nbofactivatedmodules <= 1) print ' '.img_warning($langs->trans("YouMustEnableOneModule"));
|
if ($nbofactivatedmodules <= 1) print ' '.img_warning($langs->trans("YouMustEnableOneModule"));
|
||||||
//print '<br>'."\n";
|
//print '<br>'."\n";
|
||||||
@ -499,8 +499,8 @@ else
|
|||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|
||||||
|
|
||||||
// Show warning about external users
|
// Show warning about external users
|
||||||
if ($mode != 'marketplace') print showModulesExludedForExternal($modules).'<br>'."\n";
|
if ($mode != 'marketplace') print showModulesExludedForExternal($modules).'<br>'."\n";
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -68,19 +68,19 @@ if ($action == 'update')
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'activate_pdfsecurity')
|
if ($action == 'activate_pdfsecurity')
|
||||||
{
|
{
|
||||||
dolibarr_set_const($db, "PDF_SECURITY_ENCRYPTION", "1",'chaine',0,'',$conf->entity);
|
dolibarr_set_const($db, "PDF_SECURITY_ENCRYPTION", "1",'chaine',0,'',$conf->entity);
|
||||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
else if ($action == 'disable_pdfsecurity')
|
else if ($action == 'disable_pdfsecurity')
|
||||||
{
|
{
|
||||||
dolibarr_del_const($db, "PDF_SECURITY_ENCRYPTION",$conf->entity);
|
dolibarr_del_const($db, "PDF_SECURITY_ENCRYPTION",$conf->entity);
|
||||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -161,7 +161,7 @@ if ($action == 'edit')
|
|||||||
{
|
{
|
||||||
$form=new Form($db);
|
$form=new Form($db);
|
||||||
|
|
||||||
if (! count($listofmethods)) print '<div class="warning">'.$langs->trans("NoSmsEngine",'<a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=sms_manager">DoliStore</a>').'</div>';
|
if (! count($listofmethods)) print '<div class="warning">'.$langs->trans("NoSmsEngine",'<a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=smsmanager">DoliStore</a>').'</div>';
|
||||||
|
|
||||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -217,7 +217,7 @@ else
|
|||||||
{
|
{
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
if (! count($listofmethods)) print '<div class="warning">'.$langs->trans("NoSmsEngine",'<a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=sms_manager">DoliStore</a>').'</div>';
|
if (! count($listofmethods)) print '<div class="warning">'.$langs->trans("NoSmsEngine",'<a href="http://www.dolistore.com/search.php?orderby=position&orderway=desc&search_query=smsmanager">DoliStore</a>').'</div>';
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||||
|
|||||||
@ -139,11 +139,11 @@ if ($result)
|
|||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$param='';
|
$param='';
|
||||||
if ($search_code) $param.='&search_code='.$search_code;
|
if ($search_code) $param.='&search_code='.$search_code;
|
||||||
if ($search_ip) $param.='&search_ip='.$search_ip;
|
if ($search_ip) $param.='&search_ip='.$search_ip;
|
||||||
if ($search_user) $param.='&search_user='.$search_user;
|
if ($search_user) $param.='&search_user='.$search_user;
|
||||||
if ($search_desc) $param.='&search_desc='.$search_desc;
|
if ($search_desc) $param.='&search_desc='.$search_desc;
|
||||||
if ($search_ua) $param.='&search_ua='.$search_ua;
|
if ($search_ua) $param.='&search_ua='.$search_ua;
|
||||||
|
|
||||||
print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, 0, 'setup');
|
print_barre_liste($langs->trans("ListOfSecurityEvents"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, 0, 'setup');
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ print_fiche_titre($title);
|
|||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -91,7 +91,7 @@ print '</table></form>';
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%">';
|
//print '</td><td valign="top" width="70%">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -136,25 +136,25 @@ $cate_arbo = $categstatic->get_full_arbo($type);
|
|||||||
$fulltree=$cate_arbo;
|
$fulltree=$cate_arbo;
|
||||||
|
|
||||||
// Define data (format for treeview)
|
// Define data (format for treeview)
|
||||||
$data=array();
|
$data=array();
|
||||||
$data[] = array('rowid'=>0,'fk_menu'=>-1,'title'=>"racine",'mainmenu'=>'','leftmenu'=>'','fk_mainmenu'=>'','fk_leftmenu'=>'');
|
$data[] = array('rowid'=>0,'fk_menu'=>-1,'title'=>"racine",'mainmenu'=>'','leftmenu'=>'','fk_mainmenu'=>'','fk_leftmenu'=>'');
|
||||||
foreach($fulltree as $key => $val)
|
foreach($fulltree as $key => $val)
|
||||||
{
|
{
|
||||||
$categstatic->id=$val['id'];
|
$categstatic->id=$val['id'];
|
||||||
$categstatic->ref=$val['label'];
|
$categstatic->ref=$val['label'];
|
||||||
$categstatic->type=$type;
|
$categstatic->type=$type;
|
||||||
$li=$categstatic->getNomUrl(1,'',60);
|
$li=$categstatic->getNomUrl(1,'',60);
|
||||||
|
|
||||||
$data[] = array(
|
$data[] = array(
|
||||||
'rowid'=>$val['rowid'],
|
'rowid'=>$val['rowid'],
|
||||||
'fk_menu'=>$val['fk_parent'],
|
'fk_menu'=>$val['fk_parent'],
|
||||||
'entry'=>'<table class="nobordernopadding centpercent"><tr><td>'.$li.
|
'entry'=>'<table class="nobordernopadding centpercent"><tr><td>'.$li.
|
||||||
'</td><td width="50%">'.
|
'</td><td width="50%">'.
|
||||||
' '.$val['description'].'</td>'.
|
' '.$val['description'].'</td>'.
|
||||||
'<td align="right" width="20px;"><a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$val['id'].'&type='.$type.'">'.img_view().'</a></td>'.
|
'<td align="right" width="20px;"><a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.$val['id'].'&type='.$type.'">'.img_view().'</a></td>'.
|
||||||
'</tr></table>'
|
'</tr></table>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
@ -170,20 +170,20 @@ $nbofentries=(count($data) - 1);
|
|||||||
if ($nbofentries > 0)
|
if ($nbofentries > 0)
|
||||||
{
|
{
|
||||||
print '<tr><td colspan="3">';
|
print '<tr><td colspan="3">';
|
||||||
tree_recur($data,$data[0],0);
|
tree_recur($data,$data[0],0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td colspan="3"><table class="nobordernopadding"><tr class="nobordernopadding"><td>'.img_picto_common('','treemenu/branchbottom.gif').'</td>';
|
print '<td colspan="3"><table class="nobordernopadding"><tr class="nobordernopadding"><td>'.img_picto_common('','treemenu/branchbottom.gif').'</td>';
|
||||||
print '<td valign="middle">';
|
print '<td valign="middle">';
|
||||||
print $langs->trans("NoCategoryYet");
|
print $langs->trans("NoCategoryYet");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</table></td>';
|
print '</table></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|||||||
@ -30,8 +30,8 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/action/rapport.pdf.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/modules/action/rapport.pdf.php';
|
||||||
|
|
||||||
$langs->load("agenda");
|
$langs->load("agenda");
|
||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
|
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
$month=GETPOST('month');
|
$month=GETPOST('month');
|
||||||
|
|||||||
@ -87,7 +87,7 @@ llxHeader();
|
|||||||
|
|
||||||
print_fiche_titre($langs->trans("CustomerArea"));
|
print_fiche_titre($langs->trans("CustomerArea"));
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
/*
|
/*
|
||||||
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
@ -270,7 +270,7 @@ else
|
|||||||
{
|
{
|
||||||
print '<td valign="top" width="100%" class="notopnoleftnoright">';
|
print '<td valign="top" width="100%" class="notopnoleftnoright">';
|
||||||
}*/
|
}*/
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
$NBMAX=3;
|
$NBMAX=3;
|
||||||
@ -546,7 +546,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
|||||||
|
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -1017,9 +1017,9 @@ else
|
|||||||
print '<td colspan="3" bgcolor="'.($object->bgcolor?(preg_match('/^#/',$object->bgcolor)?'':'#').$object->bgcolor:'white').'">';
|
print '<td colspan="3" bgcolor="'.($object->bgcolor?(preg_match('/^#/',$object->bgcolor)?'':'#').$object->bgcolor:'white').'">';
|
||||||
if (empty($object->bgcolor) || strtolower($object->bgcolor) == 'ffffff')
|
if (empty($object->bgcolor) || strtolower($object->bgcolor) == 'ffffff')
|
||||||
{
|
{
|
||||||
// Editeur wysiwyg
|
// Editeur wysiwyg
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||||
$doleditor=new DolEditor('body',$object->body,'',320,'dolibarr_readonly','',false,true,empty($conf->global->FCKEDITOR_ENABLE_MAILING)?0:1,20,70);
|
$doleditor=new DolEditor('body',$object->body,'',320,'dolibarr_readonly','',false,true,empty($conf->global->FCKEDITOR_ENABLE_MAILING)?0:1,20,70);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
}
|
}
|
||||||
else print dol_htmlentitiesbr($object->body);
|
else print dol_htmlentitiesbr($object->body);
|
||||||
@ -1055,7 +1055,7 @@ else
|
|||||||
print '<tr><td width="25%">';
|
print '<tr><td width="25%">';
|
||||||
print $langs->trans("TotalNbOfDistinctRecipients");
|
print $langs->trans("TotalNbOfDistinctRecipients");
|
||||||
print '</td><td colspan="3">';
|
print '</td><td colspan="3">';
|
||||||
$nbemail = ($object->nbemail?$object->nbemail:img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>');
|
$nbemail = ($object->nbemail?$object->nbemail:img_warning('').' <font class="warning">'.$langs->trans("NoTargetYet").'</font>');
|
||||||
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
if (!empty($conf->global->MAILING_LIMIT_SENDBYWEB) && is_numeric($nbemail) && $conf->global->MAILING_LIMIT_SENDBYWEB < $nbemail)
|
||||||
{
|
{
|
||||||
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
$text=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
||||||
|
|||||||
@ -46,7 +46,7 @@ print_fiche_titre($langs->trans("MailingArea"));
|
|||||||
|
|
||||||
//print '<table class="notopnoleftnoright" width="100%">';
|
//print '<table class="notopnoleftnoright" width="100%">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
// Recherche emails
|
// Recherche emails
|
||||||
@ -143,7 +143,7 @@ print "</table><br>";
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -201,7 +201,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
|
|
||||||
if ($langs->file_exists("html/spam.html",0)) {
|
if ($langs->file_exists("html/spam.html",0)) {
|
||||||
@ -216,5 +216,5 @@ if ($langs->file_exists("html/spam.html",0)) {
|
|||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -2279,4 +2279,4 @@ else
|
|||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
@ -56,7 +56,7 @@ print_fiche_titre($langs->trans("ProspectionArea"));
|
|||||||
|
|
||||||
//print '<table width="100%" class="notopnoleftnoright">';
|
//print '<table width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -202,7 +202,7 @@ if (! empty($conf->propal->enabled))
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
$max=5;
|
$max=5;
|
||||||
@ -513,7 +513,7 @@ if (! empty($conf->propal->enabled))
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -48,7 +48,7 @@ print_fiche_titre($langs->trans("ProspectionArea"));
|
|||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
if (! empty($conf->propal->enabled))
|
if (! empty($conf->propal->enabled))
|
||||||
@ -161,7 +161,7 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -279,7 +279,7 @@ if ($resql)
|
|||||||
|
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -657,15 +657,15 @@ else if ($action == 'addline' && $user->rights->commande->creer)
|
|||||||
|
|
||||||
$desc=dol_concatdesc($desc,$product_desc);
|
$desc=dol_concatdesc($desc,$product_desc);
|
||||||
|
|
||||||
// Add custom code and origin country into description
|
// Add custom code and origin country into description
|
||||||
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code)))
|
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code)))
|
||||||
{
|
{
|
||||||
$tmptxt='(';
|
$tmptxt='(';
|
||||||
if (! empty($prod->customcode)) $tmptxt.=$langs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode;
|
if (! empty($prod->customcode)) $tmptxt.=$langs->transnoentitiesnoconv("CustomCode").': '.$prod->customcode;
|
||||||
if (! empty($prod->customcode) && ! empty($prod->country_code)) $tmptxt.=' - ';
|
if (! empty($prod->customcode) && ! empty($prod->country_code)) $tmptxt.=' - ';
|
||||||
if (! empty($prod->country_code)) $tmptxt.=$langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code,0,$db,$langs,0);
|
if (! empty($prod->country_code)) $tmptxt.=$langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prod->country_code,0,$db,$langs,0);
|
||||||
$tmptxt.=')';
|
$tmptxt.=')';
|
||||||
$desc= dol_concatdesc($desc, $tmptxt);
|
$desc= dol_concatdesc($desc, $tmptxt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ print_fiche_titre($langs->trans("OrdersArea"));
|
|||||||
|
|
||||||
//print '<table width="100%" class="notopnoleftnoright">';
|
//print '<table width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -207,7 +207,7 @@ if (! empty($conf->commande->enabled))
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
$max=5;
|
$max=5;
|
||||||
@ -425,7 +425,7 @@ if (! empty($conf->commande->enabled))
|
|||||||
|
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -443,7 +443,7 @@ if ($resql)
|
|||||||
|
|
||||||
print "</table><br>\n";
|
print "</table><br>\n";
|
||||||
|
|
||||||
print '<div align="right"><input class="button" type="submit" value="'.$langs->trans("Conciliate").'"></div><br>';
|
print '<div align="right"><input class="button" type="submit" value="'.$langs->trans("Conciliate").'"></div><br>';
|
||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
|
|||||||
@ -2283,7 +2283,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
$soc->fetch($object->socid);
|
$soc->fetch($object->socid);
|
||||||
$selleruserevenustamp=$mysoc->useRevenueStamp();
|
$selleruserevenustamp=$mysoc->useRevenueStamp();
|
||||||
|
|
||||||
$totalpaye = $object->getSommePaiement();
|
$totalpaye = $object->getSommePaiement();
|
||||||
$totalcreditnotes = $object->getSumCreditNotesUsed();
|
$totalcreditnotes = $object->getSumCreditNotesUsed();
|
||||||
@ -2754,7 +2754,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
if (! empty($conf->banque->enabled)) $nbcols++;
|
if (! empty($conf->banque->enabled)) $nbcols++;
|
||||||
if($mysoc->localtax1_assuj=="1") $nbrows++;
|
if($mysoc->localtax1_assuj=="1") $nbrows++;
|
||||||
if($mysoc->localtax2_assuj=="1") $nbrows++;
|
if($mysoc->localtax2_assuj=="1") $nbrows++;
|
||||||
if ($selleruserevenustamp) $nbrows++;
|
if ($selleruserevenustamp) $nbrows++;
|
||||||
|
|
||||||
print '<td rowspan="'.$nbrows.'" colspan="2" valign="top">';
|
print '<td rowspan="'.$nbrows.'" colspan="2" valign="top">';
|
||||||
|
|
||||||
@ -3043,16 +3043,16 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
// Revenue stamp
|
// Revenue stamp
|
||||||
if ($selleruserevenustamp) // Test company use revenue stamp
|
if ($selleruserevenustamp) // Test company use revenue stamp
|
||||||
{
|
{
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
print '<table class="nobordernopadding" width="100%"><tr><td>';
|
||||||
print $langs->trans('RevenueStamp');
|
print $langs->trans('RevenueStamp');
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editrevenuestamp&facid='.$object->id.'">'.img_edit($langs->trans('SetRevenuStamp'),1).'</a></td>';
|
if ($action != 'editrevenuestamp' && ! empty($object->brouillon) && $user->rights->facture->creer) print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editrevenuestamp&facid='.$object->id.'">'.img_edit($langs->trans('SetRevenuStamp'),1).'</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td colspan="3" align="right">';
|
print '</td><td colspan="3" align="right">';
|
||||||
if ($action == 'editrevenuestamp')
|
if ($action == 'editrevenuestamp')
|
||||||
{
|
{
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<input type="hidden" name="action" value="setrevenuestamp">';
|
print '<input type="hidden" name="action" value="setrevenuestamp">';
|
||||||
@ -3060,12 +3060,12 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
//print '<input type="text" class="flat" size="4" name="revenuestamp" value="'.price2num($object->revenuestamp).'">';
|
//print '<input type="text" class="flat" size="4" name="revenuestamp" value="'.price2num($object->revenuestamp).'">';
|
||||||
print ' <input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
print ' <input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||||
print '</form>';
|
print '</form>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print price($object->revenuestamp,1,'',1,-1,-1,$conf->currency);
|
print price($object->revenuestamp,1,'',1,-1,-1,$conf->currency);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Total with tax
|
// Total with tax
|
||||||
|
|||||||
@ -377,7 +377,7 @@ if ($resql)
|
|||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
$cn=$facturestatic->getSumCreditNotesUsed();
|
$cn=$facturestatic->getSumCreditNotesUsed();
|
||||||
if (! empty($objp->am)) print price($objp->am);
|
if (! empty($objp->am)) print price($objp->am);
|
||||||
if (! empty($objp->am) && ! empty($cn)) print '+';
|
if (! empty($objp->am) && ! empty($cn)) print '+';
|
||||||
if (! empty($cn)) print price($cn);
|
if (! empty($cn)) print price($cn);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -106,7 +106,7 @@ print_fiche_titre($langs->trans("AccountancyTreasuryArea"));
|
|||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
$max=3;
|
$max=3;
|
||||||
|
|
||||||
@ -324,7 +324,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
// Last modified customer invoices
|
// Last modified customer invoices
|
||||||
@ -1033,7 +1033,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ print_fiche_titre($langs->trans("ChequesArea"));
|
|||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
$sql = "SELECT count(b.rowid)";
|
$sql = "SELECT count(b.rowid)";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||||
@ -87,7 +87,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
$sql = "SELECT bc.rowid, bc.date_bordereau as db, bc.amount, bc.number as ref";
|
$sql = "SELECT bc.rowid, bc.date_bordereau as db, bc.amount, bc.number as ref";
|
||||||
@ -146,7 +146,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
//print "</td></tr></table>\n";
|
//print "</td></tr></table>\n";
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ print_fiche_titre($langs->trans("CustomersStandingOrdersArea"));
|
|||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
$thirdpartystatic=new Societe($db);
|
$thirdpartystatic=new Societe($db);
|
||||||
@ -88,7 +88,7 @@ print '</td></tr></table><br>';
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%">';
|
//print '</td><td valign="top" width="70%">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -221,7 +221,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -189,8 +189,8 @@ if ($socid > 0)
|
|||||||
print '<td align="right">'.price($solde)."</td>\n";
|
print '<td align="right">'.price($solde)."</td>\n";
|
||||||
|
|
||||||
// Author
|
// Author
|
||||||
$userstatic->id=$objp->userid;
|
$userstatic->id=$objp->userid;
|
||||||
$userstatic->login=$objp->login;
|
$userstatic->login=$objp->login;
|
||||||
print '<td nowrap="nowrap" align="right">';
|
print '<td nowrap="nowrap" align="right">';
|
||||||
print $userstatic->getLoginUrl(1);
|
print $userstatic->getLoginUrl(1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
@ -34,7 +34,7 @@ print_fiche_titre("Ventilation Comptable");
|
|||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
$sql = "SELECT count(*) FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
||||||
$sql.= " , ".MAIN_DB_PREFIX."facture as f";
|
$sql.= " , ".MAIN_DB_PREFIX."facture as f";
|
||||||
@ -62,7 +62,7 @@ print "</table>\n";
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@ -94,7 +94,7 @@ if ($resql)
|
|||||||
print "</table>\n";
|
print "</table>\n";
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -66,9 +66,9 @@ llxHeader();
|
|||||||
print_fiche_titre($langs->trans("ContractsArea"));
|
print_fiche_titre($langs->trans("ContractsArea"));
|
||||||
|
|
||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
// Search contract
|
// Search contract
|
||||||
@ -286,8 +286,8 @@ if (! empty($conf->contrat->enabled) && $user->rights->contrat->lire)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
// Last modified contracts
|
// Last modified contracts
|
||||||
|
|||||||
@ -197,25 +197,25 @@ abstract class CommonDocGenerator
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Define array with couple subtitution key => subtitution value
|
* Define array with couple subtitution key => subtitution value
|
||||||
*
|
*
|
||||||
* @param Translate $outputlangs Language object for output
|
* @param Translate $outputlangs Language object for output
|
||||||
* @return array Array of substitution key->code
|
* @return array Array of substitution key->code
|
||||||
*/
|
*/
|
||||||
function get_substitutionarray_other($outputlangs)
|
function get_substitutionarray_other($outputlangs)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$now=dol_now('gmt'); // gmt
|
$now=dol_now('gmt'); // gmt
|
||||||
$array_other = array(
|
$array_other = array(
|
||||||
'current_date'=>dol_print_date($now,'day','tzuser'),
|
'current_date'=>dol_print_date($now,'day','tzuser'),
|
||||||
'current_datehour'=>dol_print_date($now,'dayhour','tzuser'),
|
'current_datehour'=>dol_print_date($now,'dayhour','tzuser'),
|
||||||
'current_server_date'=>dol_print_date($now,'day','tzserver'),
|
'current_server_date'=>dol_print_date($now,'day','tzserver'),
|
||||||
'current_server_datehour'=>dol_print_date($now,'dayhour','tzserver'),
|
'current_server_datehour'=>dol_print_date($now,'dayhour','tzserver'),
|
||||||
);
|
);
|
||||||
|
|
||||||
return $array_other;
|
return $array_other;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1556,8 +1556,8 @@ abstract class CommonObject
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add revenue stamp to total
|
// Add revenue stamp to total
|
||||||
$this->total_ttc += isset($this->revenuestamp)?$this->revenuestamp:0;
|
$this->total_ttc += isset($this->revenuestamp)?$this->revenuestamp:0;
|
||||||
|
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
@ -2720,12 +2720,12 @@ abstract class CommonObject
|
|||||||
// Product
|
// Product
|
||||||
if ($line->fk_product > 0)
|
if ($line->fk_product > 0)
|
||||||
{
|
{
|
||||||
$product_static = new Product($this->db);
|
$product_static = new Product($this->db);
|
||||||
|
|
||||||
$product_static->type=$line->fk_product_type;
|
$product_static->type=$line->fk_product_type;
|
||||||
$product_static->id=$line->fk_product;
|
$product_static->id=$line->fk_product;
|
||||||
$product_static->ref=$line->ref;
|
$product_static->ref=$line->ref;
|
||||||
$text=$product_static->getNomUrl(1);
|
$text=$product_static->getNomUrl(1);
|
||||||
|
|
||||||
// Define output language (TODO Does this works ?)
|
// Define output language (TODO Does this works ?)
|
||||||
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE))
|
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE))
|
||||||
|
|||||||
@ -691,19 +691,19 @@ class Form
|
|||||||
//$minLength = (is_numeric($conf->global->COMPANY_USE_SEARCH_TO_SELECT)?$conf->global->COMPANY_USE_SEARCH_TO_SELECT:2);
|
//$minLength = (is_numeric($conf->global->COMPANY_USE_SEARCH_TO_SELECT)?$conf->global->COMPANY_USE_SEARCH_TO_SELECT:2);
|
||||||
$out.= ajax_combobox($htmlname, $event, $conf->global->COMPANY_USE_SEARCH_TO_SELECT);
|
$out.= ajax_combobox($htmlname, $event, $conf->global->COMPANY_USE_SEARCH_TO_SELECT);
|
||||||
/*
|
/*
|
||||||
if ($selected && empty($selected_input_value))
|
if ($selected && empty($selected_input_value))
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
$product = new Product($this->db);
|
$product = new Product($this->db);
|
||||||
$product->fetch($selected);
|
$product->fetch($selected);
|
||||||
$selected_input_value=$product->ref;
|
$selected_input_value=$product->ref;
|
||||||
}
|
}
|
||||||
// mode=1 means customers products
|
// mode=1 means customers products
|
||||||
$ajaxoptions=array();
|
$ajaxoptions=array();
|
||||||
$urloption='htmlname='.$htmlname.'&outjson=1&filter='.urlencode($filter).'&showtype='.$showtype;
|
$urloption='htmlname='.$htmlname.'&outjson=1&filter='.urlencode($filter).'&showtype='.$showtype;
|
||||||
$out.=ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
$out.=ajax_autocompleter($selected, $htmlname, DOL_URL_ROOT.'/societe/ajax/company.php', $urloption, $conf->global->COMPANY_USE_SEARCH_TO_SELECT, 0, $ajaxoptions);
|
||||||
$out.='<input type="text" size="20" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'" />';
|
$out.='<input type="text" size="20" name="search_'.$htmlname.'" id="search_'.$htmlname.'" value="'.$selected_input_value.'" />';
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
$out.= '<select id="'.$htmlname.'" class="flat" name="'.$htmlname.'">';
|
$out.= '<select id="'.$htmlname.'" class="flat" name="'.$htmlname.'">';
|
||||||
|
|||||||
@ -359,9 +359,9 @@ class FormFile
|
|||||||
}
|
}
|
||||||
// For normalized external modules
|
// For normalized external modules
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0);
|
$file=dol_buildpath('/'.$modulepart.'/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0);
|
||||||
$res=include_once $file;
|
$res=include_once $file;
|
||||||
}
|
}
|
||||||
$class='Modele'.ucfirst($modulepart);
|
$class='Modele'.ucfirst($modulepart);
|
||||||
if (class_exists($class))
|
if (class_exists($class))
|
||||||
|
|||||||
@ -208,59 +208,59 @@ class FormOther
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of revenue stamp for country
|
* Return list of revenue stamp for country
|
||||||
*
|
*
|
||||||
* @param string $selected Value of preselected revenue stamp
|
* @param string $selected Value of preselected revenue stamp
|
||||||
* @param string $htmlname Name of combo list
|
* @param string $htmlname Name of combo list
|
||||||
* @return string HTML select list
|
* @return string HTML select list
|
||||||
*/
|
*/
|
||||||
function select_revenue_stamp($selected='',$htmlname='revenuestamp',$country_code='')
|
function select_revenue_stamp($selected='',$htmlname='revenuestamp',$country_code='')
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$out='';
|
$out='';
|
||||||
|
|
||||||
$sql = "SELECT r.taux";
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."c_revenuestamp as r,".MAIN_DB_PREFIX."c_pays as p";
|
|
||||||
$sql.= " WHERE r.active = 1 AND r.fk_pays = p.rowid";
|
|
||||||
$sql.= " AND p.code = '".$country_code."'";
|
|
||||||
|
|
||||||
dol_syslog(get_class($this).'::select_revenue_stamp sql='.$sql);
|
$sql = "SELECT r.taux";
|
||||||
$resql=$this->db->query($sql);
|
$sql.= " FROM ".MAIN_DB_PREFIX."c_revenuestamp as r,".MAIN_DB_PREFIX."c_pays as p";
|
||||||
if ($resql)
|
$sql.= " WHERE r.active = 1 AND r.fk_pays = p.rowid";
|
||||||
{
|
$sql.= " AND p.code = '".$country_code."'";
|
||||||
$out.='<select class="flat" name="'.$htmlname.'">';
|
|
||||||
$num = $this->db->num_rows($resql);
|
dol_syslog(get_class($this).'::select_revenue_stamp sql='.$sql);
|
||||||
$i = 0;
|
$resql=$this->db->query($sql);
|
||||||
$out.='<option value="0"> </option>'."\n";
|
if ($resql)
|
||||||
if ($num)
|
{
|
||||||
{
|
$out.='<select class="flat" name="'.$htmlname.'">';
|
||||||
while ($i < $num)
|
$num = $this->db->num_rows($resql);
|
||||||
{
|
$i = 0;
|
||||||
$obj = $this->db->fetch_object($resql);
|
$out.='<option value="0"> </option>'."\n";
|
||||||
if (($selected && $selected == $obj->taux) || $num == 1)
|
if ($num)
|
||||||
{
|
{
|
||||||
$out.='<option value="'.$obj->taux.'" selected="selected">';
|
while ($i < $num)
|
||||||
}
|
{
|
||||||
else
|
$obj = $this->db->fetch_object($resql);
|
||||||
{
|
if (($selected && $selected == $obj->taux) || $num == 1)
|
||||||
$out.='<option value="'.$obj->taux.'">';
|
{
|
||||||
//print '<option onmouseover="showtip(\''.$obj->libelle.'\')" onMouseout="hidetip()" value="'.$obj->rowid.'">';
|
$out.='<option value="'.$obj->taux.'" selected="selected">';
|
||||||
}
|
}
|
||||||
$out.=$obj->taux;
|
else
|
||||||
$out.='</option>';
|
{
|
||||||
$i++;
|
$out.='<option value="'.$obj->taux.'">';
|
||||||
}
|
//print '<option onmouseover="showtip(\''.$obj->libelle.'\')" onMouseout="hidetip()" value="'.$obj->rowid.'">';
|
||||||
}
|
}
|
||||||
$out.='</select>';
|
$out.=$obj->taux;
|
||||||
return $out;
|
$out.='</option>';
|
||||||
}
|
$i++;
|
||||||
else
|
}
|
||||||
{
|
}
|
||||||
dol_print_error($this->db);
|
$out.='</select>';
|
||||||
return '';
|
return $out;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($this->db);
|
||||||
|
return '';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -51,42 +51,42 @@ $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// URL http://mydolibarr/core/getmenu_jmobime?mainmenu=mainmenu&leftmenu=leftmenu can be used for tests
|
// URL http://mydolibarr/core/getmenu_jmobime?mainmenu=mainmenu&leftmenu=leftmenu can be used for tests
|
||||||
$arrayofjs=array('/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js');
|
$arrayofjs=array('/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js');
|
||||||
$arrayofcss=array('/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css');
|
$arrayofcss=array('/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css');
|
||||||
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
||||||
|
|
||||||
print '<body>'."\n";
|
print '<body>'."\n";
|
||||||
|
|
||||||
if (empty($user->societe_id)) // If internal user or not defined
|
if (empty($user->societe_id)) // If internal user or not defined
|
||||||
{
|
{
|
||||||
$conf->standard_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?(empty($conf->global->MAIN_MENU_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENU_STANDARD):$conf->global->MAIN_MENU_STANDARD_FORCED);
|
$conf->standard_menu=(empty($conf->global->MAIN_MENU_STANDARD_FORCED)?(empty($conf->global->MAIN_MENU_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENU_STANDARD):$conf->global->MAIN_MENU_STANDARD_FORCED);
|
||||||
$conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENU_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENU_SMARTPHONE):$conf->global->MAIN_MENU_SMARTPHONE_FORCED);
|
$conf->smart_menu=(empty($conf->global->MAIN_MENU_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENU_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENU_SMARTPHONE):$conf->global->MAIN_MENU_SMARTPHONE_FORCED);
|
||||||
}
|
}
|
||||||
else // If external user
|
else // If external user
|
||||||
{
|
{
|
||||||
$conf->standard_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?(empty($conf->global->MAIN_MENUFRONT_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENUFRONT_STANDARD):$conf->global->MAIN_MENUFRONT_STANDARD_FORCED);
|
$conf->standard_menu=(empty($conf->global->MAIN_MENUFRONT_STANDARD_FORCED)?(empty($conf->global->MAIN_MENUFRONT_STANDARD)?'eldy_menu.php':$conf->global->MAIN_MENUFRONT_STANDARD):$conf->global->MAIN_MENUFRONT_STANDARD_FORCED);
|
||||||
$conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENUFRONT_SMARTPHONE):$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
|
$conf->smart_menu=(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED)?(empty($conf->global->MAIN_MENUFRONT_SMARTPHONE)?'smartphone_menu.php':$conf->global->MAIN_MENUFRONT_SMARTPHONE):$conf->global->MAIN_MENUFRONT_SMARTPHONE_FORCED);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load the menu manager (only if not already done)
|
// Load the menu manager (only if not already done)
|
||||||
$file_menu=empty($conf->browser->phone)?$conf->standard_menu:$conf->smart_menu;
|
$file_menu=empty($conf->browser->phone)?$conf->standard_menu:$conf->smart_menu;
|
||||||
if (GETPOST('menu')) $file_menu=GETPOST('menu'); // example: menu=eldy_menu.php
|
if (GETPOST('menu')) $file_menu=GETPOST('menu'); // example: menu=eldy_menu.php
|
||||||
if (! class_exists('MenuManager'))
|
if (! class_exists('MenuManager'))
|
||||||
{
|
{
|
||||||
$menufound=0;
|
$menufound=0;
|
||||||
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
|
$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
|
||||||
foreach($dirmenus as $dirmenu)
|
foreach($dirmenus as $dirmenu)
|
||||||
{
|
{
|
||||||
$menufound=dol_include_once($dirmenu."standard/".$file_menu);
|
$menufound=dol_include_once($dirmenu."standard/".$file_menu);
|
||||||
if ($menufound) break;
|
if ($menufound) break;
|
||||||
}
|
}
|
||||||
if (! $menufound) // If failed to include, we try with standard
|
if (! $menufound) // If failed to include, we try with standard
|
||||||
{
|
{
|
||||||
dol_syslog("You define a menu manager '".$file_menu."' that can not be loaded.", LOG_WARNING);
|
dol_syslog("You define a menu manager '".$file_menu."' that can not be loaded.", LOG_WARNING);
|
||||||
$file_menu='eldy_menu.php';
|
$file_menu='eldy_menu.php';
|
||||||
include_once DOL_DOCUMENT_ROOT."/core/menus/standard/".$file_menu;
|
include_once DOL_DOCUMENT_ROOT."/core/menus/standard/".$file_menu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$menumanager = new MenuManager($db, empty($user->societe_id)?0:1);
|
$menumanager = new MenuManager($db, empty($user->societe_id)?0:1);
|
||||||
$menumanager->loadMenu();
|
$menumanager->loadMenu();
|
||||||
|
|
||||||
|
|||||||
@ -90,11 +90,11 @@ function societe_prepare_head($object)
|
|||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/societe/consumption.php?socid='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Referers");
|
$head[$h][1] = $langs->trans("Referers");
|
||||||
$head[$h][2] = 'consumption';
|
$head[$h][2] = 'consumption';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Attached files
|
// Attached files
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Documents");
|
$head[$h][1] = $langs->trans("Documents");
|
||||||
|
|||||||
@ -42,7 +42,7 @@ function dol_basename($pathfile)
|
|||||||
* @param string $path Starting path from which to search
|
* @param string $path Starting path from which to search
|
||||||
* @param string $types Can be "directories", "files", or "all"
|
* @param string $types Can be "directories", "files", or "all"
|
||||||
* @param int $recursive Determines whether subdirectories are searched
|
* @param int $recursive Determines whether subdirectories are searched
|
||||||
* @param string $filter Regex for include filter
|
* @param string $filter Regex filter to restrict list. This regex value must be escaped for '/', since this char is used for preg_match function
|
||||||
* @param string $excludefilter Array of Regex for exclude filter (example: array('\.meta$','^\.'))
|
* @param string $excludefilter Array of Regex for exclude filter (example: array('\.meta$','^\.'))
|
||||||
* @param string $sortcriteria Sort criteria ("","fullname","name","date","size")
|
* @param string $sortcriteria Sort criteria ("","fullname","name","date","size")
|
||||||
* @param string $sortorder Sort order (SORT_ASC, SORT_DESC)
|
* @param string $sortorder Sort order (SORT_ASC, SORT_DESC)
|
||||||
@ -65,7 +65,7 @@ function dol_dir_list($path, $types="all", $recursive=0, $filter="", $excludefil
|
|||||||
$path=preg_replace('/([\\/]+)$/i','',$path);
|
$path=preg_replace('/([\\/]+)$/i','',$path);
|
||||||
$newpath=dol_osencode($path);
|
$newpath=dol_osencode($path);
|
||||||
|
|
||||||
if (! $nohook)
|
if (! $nohook)
|
||||||
{
|
{
|
||||||
$hookmanager->initHooks(array('fileslib'));
|
$hookmanager->initHooks(array('fileslib'));
|
||||||
|
|
||||||
@ -1212,11 +1212,11 @@ function dol_uncompress($inputfile,$outputdir)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return most recent file
|
* Return file(s) into a directory (by default most recent)
|
||||||
*
|
*
|
||||||
* @param string $dir Directory to scan
|
* @param string $dir Directory to scan
|
||||||
* @param string $regexfilter Regexfilter
|
* @param string $regexfilter Regex filter to restrict list. This regex value must be escaped for '/', since this char is used for preg_match function
|
||||||
* @param string $excludefilter Array of Regex for exclude filter (example: array('\.meta$','^\.'))
|
* @param string $excludefilter Array of Regex for exclude filter (example: array('\.meta$','^\.')). This regex value must be escaped for '/', since this char is used for preg_match function
|
||||||
* @param int $nohook Disable all hooks
|
* @param int $nohook Disable all hooks
|
||||||
* @return string Full path to most recent file
|
* @return string Full path to most recent file
|
||||||
*/
|
*/
|
||||||
@ -1225,4 +1225,5 @@ function dol_most_recent_file($dir,$regexfilter='',$excludefilter=array('\.meta$
|
|||||||
$tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,'',$nohook);
|
$tmparray=dol_dir_list($dir,'files',0,$regexfilter,$excludefilter,'date',SORT_DESC,'',$nohook);
|
||||||
return $tmparray[0];
|
return $tmparray[0];
|
||||||
}
|
}
|
||||||
?>
|
|
||||||
|
?>
|
||||||
@ -2630,9 +2630,9 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou
|
|||||||
{
|
{
|
||||||
$listofcurrenciesbefore=array('USD');
|
$listofcurrenciesbefore=array('USD');
|
||||||
if (in_array($currency_code,$listofcurrenciesbefore)) $cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code);
|
if (in_array($currency_code,$listofcurrenciesbefore)) $cursymbolbefore.=$outlangs->getCurrencySymbol($currency_code);
|
||||||
else $cursymbolafter.=$outlangs->getCurrencySymbol($currency_code);
|
else $cursymbolafter.=$outlangs->getCurrencySymbol($currency_code);
|
||||||
}
|
}
|
||||||
$output.=$cursymbolbefore.$end.$cursymbolafter;
|
$output.=$cursymbolbefore.$end.$cursymbolafter;
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
@ -3660,21 +3660,21 @@ function dolGetFirstLastname($firstname,$lastname,$nameorder=-1)
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$ret='';
|
$ret='';
|
||||||
// If order not defined, we use the setup
|
// If order not defined, we use the setup
|
||||||
if ($nameorder < 0) $nameorder=(empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION));
|
if ($nameorder < 0) $nameorder=(empty($conf->global->MAIN_FIRSTNAME_NAME_POSITION));
|
||||||
if ($nameorder)
|
if ($nameorder)
|
||||||
{
|
{
|
||||||
$ret.=$firstname;
|
$ret.=$firstname;
|
||||||
if ($firstname && $lastname) $ret.=' ';
|
if ($firstname && $lastname) $ret.=' ';
|
||||||
$ret.=$lastname;
|
$ret.=$lastname;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ret.=$lastname;
|
$ret.=$lastname;
|
||||||
if ($firstname && $lastname) $ret.=' ';
|
if ($firstname && $lastname) $ret.=' ';
|
||||||
$ret.=$firstname;
|
$ret.=$firstname;
|
||||||
}
|
}
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4293,18 +4293,18 @@ function colorArrayToHex($arraycolor,$colorifnotfound='888888')
|
|||||||
return dechex($arraycolor[0]).dechex($arraycolor[1]).dechex($arraycolor[2]);
|
return dechex($arraycolor[0]).dechex($arraycolor[1]).dechex($arraycolor[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set focus onto field with selector
|
* Set focus onto field with selector
|
||||||
*
|
*
|
||||||
* @param string $selector Selector ('#id')
|
* @param string $selector Selector ('#id')
|
||||||
* @return string HTML code to set focus
|
* @return string HTML code to set focus
|
||||||
*/
|
*/
|
||||||
function dol_set_focus($selector)
|
function dol_set_focus($selector)
|
||||||
{
|
{
|
||||||
print '<!-- Set focus onto a specific field -->'."\n";
|
print '<!-- Set focus onto a specific field -->'."\n";
|
||||||
print '<script type="text/javascript" language="javascript">jQuery(document).ready(function() { jQuery("'.$selector.'").focus(); });</script>'."\n";
|
print '<script type="text/javascript" language="javascript">jQuery(document).ready(function() { jQuery("'.$selector.'").focus(); });</script>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (! function_exists('getmypid'))
|
if (! function_exists('getmypid'))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------- Used by ajax tree view -----------------
|
// ------------------------------- Used by ajax tree view -----------------
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show indent and picto of a tree line. Return array with information of line.
|
* Show indent and picto of a tree line. Return array with information of line.
|
||||||
@ -159,7 +159,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree='iddivjstree')
|
|||||||
print '</li>';
|
print '</li>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (! empty($ulprinted) && ! empty($pere['rowid'])) { print '</ul>'."\n"; }
|
if (! empty($ulprinted) && ! empty($pere['rowid'])) { print '</ul>'."\n"; }
|
||||||
|
|
||||||
if (empty($pere['rowid'])) print '</ul>';
|
if (empty($pere['rowid'])) print '</ul>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,7 @@
|
|||||||
* \file htdocs/core/menus/standard/auguria.lib.php
|
* \file htdocs/core/menus/standard/auguria.lib.php
|
||||||
* \brief Library for file auguria menus
|
* \brief Library for file auguria menus
|
||||||
*/
|
*/
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -40,8 +40,8 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
|
|||||||
{
|
{
|
||||||
global $user,$conf,$langs,$dolibarr_main_db_name;
|
global $user,$conf,$langs,$dolibarr_main_db_name;
|
||||||
|
|
||||||
$mainmenu=$_SESSION["mainmenu"];
|
$mainmenu=$_SESSION["mainmenu"];
|
||||||
$leftmenu=$_SESSION["leftmenu"];
|
$leftmenu=$_SESSION["leftmenu"];
|
||||||
|
|
||||||
$id='mainmenu';
|
$id='mainmenu';
|
||||||
$listofmodulesforexternal=explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL);
|
$listofmodulesforexternal=explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL);
|
||||||
@ -75,7 +75,7 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
|
|||||||
$shorturl = $newTabMenu[$i]['url'].$param;
|
$shorturl = $newTabMenu[$i]['url'].$param;
|
||||||
}
|
}
|
||||||
$url=preg_replace('/__LOGIN__/',$user->login,$url);
|
$url=preg_replace('/__LOGIN__/',$user->login,$url);
|
||||||
$shorturl=preg_replace('/__LOGIN__/',$user->login,$shorturl);
|
$shorturl=preg_replace('/__LOGIN__/',$user->login,$shorturl);
|
||||||
|
|
||||||
// Define the class (top menu selected or not)
|
// Define the class (top menu selected or not)
|
||||||
if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"';
|
if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"';
|
||||||
@ -84,9 +84,9 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
|
|||||||
}
|
}
|
||||||
else if ($showmode == 2) $classname='class="tmenu"';
|
else if ($showmode == 2) $classname='class="tmenu"';
|
||||||
|
|
||||||
if (empty($noout)) print_start_menu_entry_auguria($idsel,$classname,$showmode);
|
if (empty($noout)) print_start_menu_entry_auguria($idsel,$classname,$showmode);
|
||||||
if (empty($noout)) print_text_menu_entry_auguria($newTabMenu[$i]['titre'], $showmode, $url, $id, $idsel, $classname, ($newTabMenu[$i]['target']?$newTabMenu[$i]['target']:$atarget));
|
if (empty($noout)) print_text_menu_entry_auguria($newTabMenu[$i]['titre'], $showmode, $url, $id, $idsel, $classname, ($newTabMenu[$i]['target']?$newTabMenu[$i]['target']:$atarget));
|
||||||
if (empty($noout)) print_end_menu_entry_auguria($showmode);
|
if (empty($noout)) print_end_menu_entry_auguria($showmode);
|
||||||
$menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target']?$newTabMenu[$i]['target']:$atarget), ($newTabMenu[$i]['mainmenu']?$newTabMenu[$i]['mainmenu']:$newTabMenu[$i]['rowid']), '');
|
$menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target']?$newTabMenu[$i]['target']:$atarget), ($newTabMenu[$i]['mainmenu']?$newTabMenu[$i]['mainmenu']:$newTabMenu[$i]['rowid']), '');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,23 +138,23 @@ function print_start_menu_entry_auguria($idsel,$classname,$showmode)
|
|||||||
*/
|
*/
|
||||||
function print_text_menu_entry_auguria($text, $showmode, $url, $id, $idsel, $classname, $atarget)
|
function print_text_menu_entry_auguria($text, $showmode, $url, $id, $idsel, $classname, $atarget)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
if ($showmode == 1)
|
if ($showmode == 1)
|
||||||
{
|
{
|
||||||
print '<a class="tmenuimage" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
print '<a class="tmenuimage" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
||||||
print '<span class="mainmenuaspan">';
|
print '<span class="mainmenuaspan">';
|
||||||
print $text;
|
print $text;
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
if ($showmode == 2)
|
if ($showmode == 2)
|
||||||
{
|
{
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||||
print '<span class="mainmenuaspan">';
|
print '<span class="mainmenuaspan">';
|
||||||
print $text;
|
print $text;
|
||||||
print '</span>';
|
print '</span>';
|
||||||
@ -245,7 +245,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
if (is_array($menu_array_before)) $menu_array=array_merge($menu_array_before, $menu_array);
|
if (is_array($menu_array_before)) $menu_array=array_merge($menu_array_before, $menu_array);
|
||||||
if (is_array($menu_array_after)) $menu_array=array_merge($menu_array, $menu_array_after);
|
if (is_array($menu_array_after)) $menu_array=array_merge($menu_array, $menu_array_after);
|
||||||
//var_dump($menu_array);exit;
|
//var_dump($menu_array);exit;
|
||||||
if (! is_array($menu_array)) return 0;
|
if (! is_array($menu_array)) return 0;
|
||||||
|
|
||||||
// Show menu
|
// Show menu
|
||||||
if (empty($noout))
|
if (empty($noout))
|
||||||
|
|||||||
@ -36,7 +36,7 @@ class MenuManager
|
|||||||
var $menu_array;
|
var $menu_array;
|
||||||
var $menu_array_after;
|
var $menu_array_after;
|
||||||
|
|
||||||
var $tabMenu;
|
var $tabMenu;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -52,59 +52,59 @@ class MenuManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load this->tabMenu
|
* Load this->tabMenu
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function loadMenu()
|
function loadMenu()
|
||||||
{
|
{
|
||||||
global $conf, $user, $langs;
|
global $conf, $user, $langs;
|
||||||
|
|
||||||
// On sauve en session le menu principal choisi
|
// On sauve en session le menu principal choisi
|
||||||
if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"];
|
if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"]=$_GET["mainmenu"];
|
||||||
if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"];
|
if (isset($_GET["idmenu"])) $_SESSION["idmenu"]=$_GET["idmenu"];
|
||||||
|
|
||||||
// Read mainmenu and leftmenu that define which menu to show
|
// Read mainmenu and leftmenu that define which menu to show
|
||||||
if (isset($_GET["mainmenu"]))
|
if (isset($_GET["mainmenu"]))
|
||||||
{
|
{
|
||||||
// On sauve en session le menu principal choisi
|
// On sauve en session le menu principal choisi
|
||||||
$mainmenu=$_GET["mainmenu"];
|
$mainmenu=$_GET["mainmenu"];
|
||||||
$_SESSION["mainmenu"]=$mainmenu;
|
$_SESSION["mainmenu"]=$mainmenu;
|
||||||
$_SESSION["leftmenuopened"]="";
|
$_SESSION["leftmenuopened"]="";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// On va le chercher en session si non defini par le lien
|
// On va le chercher en session si non defini par le lien
|
||||||
$mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:'';
|
$mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:'';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["leftmenu"]))
|
if (isset($_GET["leftmenu"]))
|
||||||
{
|
{
|
||||||
// On sauve en session le menu principal choisi
|
// On sauve en session le menu principal choisi
|
||||||
$leftmenu=$_GET["leftmenu"];
|
$leftmenu=$_GET["leftmenu"];
|
||||||
$_SESSION["leftmenu"]=$leftmenu;
|
$_SESSION["leftmenu"]=$leftmenu;
|
||||||
|
|
||||||
if ($_SESSION["leftmenuopened"]==$leftmenu) // To collapse
|
if ($_SESSION["leftmenuopened"]==$leftmenu) // To collapse
|
||||||
{
|
{
|
||||||
//$leftmenu="";
|
//$leftmenu="";
|
||||||
$_SESSION["leftmenuopened"]="";
|
$_SESSION["leftmenuopened"]="";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$_SESSION["leftmenuopened"]=$leftmenu;
|
$_SESSION["leftmenuopened"]=$leftmenu;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// On va le chercher en session si non defini par le lien
|
// On va le chercher en session si non defini par le lien
|
||||||
$leftmenu=isset($_SESSION["leftmenu"])?$_SESSION["leftmenu"]:'';
|
$leftmenu=isset($_SESSION["leftmenu"])?$_SESSION["leftmenu"]:'';
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
||||||
$tabMenu=array();
|
$tabMenu=array();
|
||||||
$menuArbo = new Menubase($this->db,'auguria');
|
$menuArbo = new Menubase($this->db,'auguria');
|
||||||
$menuArbo->menuLoad($mainmenu, $leftmenu, $this->type_user, 'auguria', $tabMenu);
|
$menuArbo->menuLoad($mainmenu, $leftmenu, $this->type_user, 'auguria', $tabMenu);
|
||||||
|
|
||||||
// Modules system tools
|
// Modules system tools
|
||||||
// TODO Find a way to add parent menu only if child menu exists. For the moment, no other method than hard coded methods.
|
// TODO Find a way to add parent menu only if child menu exists. For the moment, no other method than hard coded methods.
|
||||||
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS))
|
if (! empty($conf->product->enabled) || ! empty($conf->service->enabled) || ! empty($conf->global->MAIN_MENU_ENABLE_MODULETOOLS))
|
||||||
{
|
{
|
||||||
@ -141,8 +141,8 @@ class MenuManager
|
|||||||
'type'=>'left',
|
'type'=>'left',
|
||||||
'position'=>20
|
'position'=>20
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->tabMenu=$tabMenu;
|
$this->tabMenu=$tabMenu;
|
||||||
}
|
}
|
||||||
@ -169,58 +169,58 @@ class MenuManager
|
|||||||
$res='ErrorBadParameterForMode';
|
$res='ErrorBadParameterForMode';
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
|
||||||
$this->menu=new Menu();
|
$this->menu=new Menu();
|
||||||
|
|
||||||
if ($mode == 'top') $res=print_auguria_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu);
|
if ($mode == 'top') $res=print_auguria_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu);
|
||||||
if ($mode == 'left') $res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu);
|
if ($mode == 'left') $res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu);
|
||||||
if ($mode == 'jmobile')
|
if ($mode == 'jmobile')
|
||||||
{
|
{
|
||||||
$res=print_auguria_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1);
|
$res=print_auguria_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu,1);
|
||||||
|
|
||||||
foreach($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
foreach($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||||
{
|
{
|
||||||
print '<ul data-role="listview" data-inset="true">';
|
print '<ul data-role="listview" data-inset="true">';
|
||||||
print '<li data-role="list-divider">';
|
print '<li data-role="list-divider">';
|
||||||
if ($val['enabled'] == 1)
|
if ($val['enabled'] == 1)
|
||||||
{
|
{
|
||||||
$relurl=dol_buildpath($val['url'],1);
|
$relurl=dol_buildpath($val['url'],1);
|
||||||
|
|
||||||
print '<a href="#">'.$val['titre'].'</a>'."\n";
|
print '<a href="#">'.$val['titre'].'</a>'."\n";
|
||||||
// Search submenu fot this entry
|
// Search submenu fot this entry
|
||||||
$tmpmainmenu=$val['mainmenu'];
|
$tmpmainmenu=$val['mainmenu'];
|
||||||
$tmpleftmenu='all';
|
$tmpleftmenu='all';
|
||||||
$submenu=new Menu();
|
$submenu=new Menu();
|
||||||
$res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$submenu,1,$tmpmainmenu,$tmpleftmenu);
|
$res=print_left_auguria_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$submenu,1,$tmpmainmenu,$tmpleftmenu);
|
||||||
$nexturl=dol_buildpath($submenu->liste[0]['url'],1);
|
$nexturl=dol_buildpath($submenu->liste[0]['url'],1);
|
||||||
$canonrelurl=preg_replace('/\?.*$/','',$relurl);
|
$canonrelurl=preg_replace('/\?.*$/','',$relurl);
|
||||||
$canonnexturl=preg_replace('/\?.*$/','',$nexturl);
|
$canonnexturl=preg_replace('/\?.*$/','',$nexturl);
|
||||||
//var_dump($canonrelurl);
|
//var_dump($canonrelurl);
|
||||||
//var_dump($canonnexturl);
|
//var_dump($canonnexturl);
|
||||||
print '<ul>';
|
print '<ul>';
|
||||||
if ($canonrelurl != $canonnexturl && $val['mainmenu'] != 'home')
|
if ($canonrelurl != $canonnexturl && $val['mainmenu'] != 'home')
|
||||||
{
|
{
|
||||||
// We add sub entry
|
// We add sub entry
|
||||||
print '<li data-role="list-divider"><a href="'.$relurl.'">'.$langs->trans("MainArea").'-'.$val['titre'].'</a></li>'."\n";
|
print '<li data-role="list-divider"><a href="'.$relurl.'">'.$langs->trans("MainArea").'-'.$val['titre'].'</a></li>'."\n";
|
||||||
}
|
}
|
||||||
foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||||
{
|
{
|
||||||
$relurl2=dol_buildpath($val2['url'],1);
|
$relurl2=dol_buildpath($val2['url'],1);
|
||||||
//var_dump($val2);
|
//var_dump($val2);
|
||||||
print '<li'.($val2['level']==0?' data-role="list-divider"':'').'><a href="'.$relurl2.'">'.$val2['titre'].'</a></li>'."\n";
|
print '<li'.($val2['level']==0?' data-role="list-divider"':'').'><a href="'.$relurl2.'">'.$val2['titre'].'</a></li>'."\n";
|
||||||
}
|
}
|
||||||
//var_dump($submenu);
|
//var_dump($submenu);
|
||||||
print '</ul>';
|
print '</ul>';
|
||||||
}
|
}
|
||||||
if ($val['enabled'] == 2)
|
if ($val['enabled'] == 2)
|
||||||
{
|
{
|
||||||
print '<font class="vsmenudisabled">'.$val['titre'].'</font>';
|
print '<font class="vsmenudisabled">'.$val['titre'].'</font>';
|
||||||
}
|
}
|
||||||
print '</li>';
|
print '</li>';
|
||||||
print '</ul>'."\n";
|
print '</ul>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($this->menu);
|
unset($this->menu);
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
* \file htdocs/core/menus/standard/eldy.lib.php
|
* \file htdocs/core/menus/standard/eldy.lib.php
|
||||||
* \brief Library for file eldy menus
|
* \brief Library for file eldy menus
|
||||||
*/
|
*/
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,7 +58,7 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
|
|||||||
if (empty($noout)) print_start_menu_entry($idsel,$classname,$showmode);
|
if (empty($noout)) print_start_menu_entry($idsel,$classname,$showmode);
|
||||||
if (empty($noout)) print_text_menu_entry($langs->trans("Home"), 1, DOL_URL_ROOT.'/index.php?mainmenu=home&leftmenu=', $id, $idsel, $classname, $atarget);
|
if (empty($noout)) print_text_menu_entry($langs->trans("Home"), 1, DOL_URL_ROOT.'/index.php?mainmenu=home&leftmenu=', $id, $idsel, $classname, $atarget);
|
||||||
if (empty($noout)) print_end_menu_entry($showmode);
|
if (empty($noout)) print_end_menu_entry($showmode);
|
||||||
$menu->add('/index.php?mainmenu=home&leftmenu=', $langs->trans("Home"), 0, $showmode, $atarget, "home", '');
|
$menu->add('/index.php?mainmenu=home&leftmenu=', $langs->trans("Home"), 0, $showmode, $atarget, "home", '');
|
||||||
|
|
||||||
// Third parties
|
// Third parties
|
||||||
$tmpentry=array('enabled'=>(! empty($conf->societe->enabled) || ! empty($conf->fournisseur->enabled)), 'perms'=>(! empty($user->rights->societe->lire) || ! empty($user->rights->fournisseur->lire)), 'module'=>'societe|fournisseur');
|
$tmpentry=array('enabled'=>(! empty($conf->societe->enabled) || ! empty($conf->fournisseur->enabled)), 'perms'=>(! empty($user->rights->societe->lire) || ! empty($user->rights->fournisseur->lire)), 'module'=>'societe|fournisseur');
|
||||||
@ -187,9 +187,9 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
|
|||||||
else $classname = 'class="tmenu"';
|
else $classname = 'class="tmenu"';
|
||||||
$idsel='project';
|
$idsel='project';
|
||||||
|
|
||||||
if (empty($noout)) print_start_menu_entry($idsel,$classname,$showmode);
|
if (empty($noout)) print_start_menu_entry($idsel,$classname,$showmode);
|
||||||
if (empty($noout)) print_text_menu_entry($langs->trans("Projects"), $showmode, DOL_URL_ROOT.'/projet/index.php?mainmenu=project&leftmenu=', $id, $idsel, $classname, $atarget);
|
if (empty($noout)) print_text_menu_entry($langs->trans("Projects"), $showmode, DOL_URL_ROOT.'/projet/index.php?mainmenu=project&leftmenu=', $id, $idsel, $classname, $atarget);
|
||||||
if (empty($noout)) print_end_menu_entry($showmode);
|
if (empty($noout)) print_end_menu_entry($showmode);
|
||||||
$menu->add('/projet/index.php?mainmenu=project&leftmenu=', $langs->trans("Projects"), 0, $showmode, $atarget, "project", '');
|
$menu->add('/projet/index.php?mainmenu=project&leftmenu=', $langs->trans("Projects"), 0, $showmode, $atarget, "project", '');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,7 +279,7 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
|
|||||||
$shorturl = $newTabMenu[$i]['url'].$param;
|
$shorturl = $newTabMenu[$i]['url'].$param;
|
||||||
}
|
}
|
||||||
$url=preg_replace('/__LOGIN__/',$user->login,$url);
|
$url=preg_replace('/__LOGIN__/',$user->login,$url);
|
||||||
$shorturl=preg_replace('/__LOGIN__/',$user->login,$shorturl);
|
$shorturl=preg_replace('/__LOGIN__/',$user->login,$shorturl);
|
||||||
|
|
||||||
// Define the class (top menu selected or not)
|
// Define the class (top menu selected or not)
|
||||||
if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"';
|
if (! empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname='class="tmenusel"';
|
||||||
@ -344,10 +344,10 @@ function print_text_menu_entry($text, $showmode, $url, $id, $idsel, $classname,
|
|||||||
|
|
||||||
if ($showmode == 1)
|
if ($showmode == 1)
|
||||||
{
|
{
|
||||||
print '<a class="tmenuimage" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
print '<a class="tmenuimage" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
||||||
print '<span class="mainmenuaspan">';
|
print '<span class="mainmenuaspan">';
|
||||||
print $text;
|
print $text;
|
||||||
print '</span>';
|
print '</span>';
|
||||||
@ -355,8 +355,8 @@ function print_text_menu_entry($text, $showmode, $url, $id, $idsel, $classname,
|
|||||||
}
|
}
|
||||||
if ($showmode == 2)
|
if ($showmode == 2)
|
||||||
{
|
{
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||||
print '<span class="mainmenuaspan">';
|
print '<span class="mainmenuaspan">';
|
||||||
print $text;
|
print $text;
|
||||||
print '</span>';
|
print '</span>';
|
||||||
@ -1168,7 +1168,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
|||||||
if (is_array($menu_array_before)) $menu_array=array_merge($menu_array_before, $menu_array);
|
if (is_array($menu_array_before)) $menu_array=array_merge($menu_array_before, $menu_array);
|
||||||
if (is_array($menu_array_after)) $menu_array=array_merge($menu_array, $menu_array_after);
|
if (is_array($menu_array_after)) $menu_array=array_merge($menu_array, $menu_array_after);
|
||||||
//var_dump($menu_array);exit;
|
//var_dump($menu_array);exit;
|
||||||
if (! is_array($menu_array)) return 0;
|
if (! is_array($menu_array)) return 0;
|
||||||
|
|
||||||
// Show menu
|
// Show menu
|
||||||
if (empty($noout))
|
if (empty($noout))
|
||||||
|
|||||||
@ -76,29 +76,29 @@ class MenuManager
|
|||||||
$mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:'';
|
$mainmenu=isset($_SESSION["mainmenu"])?$_SESSION["mainmenu"]:'';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_GET["leftmenu"]))
|
if (isset($_GET["leftmenu"]))
|
||||||
{
|
{
|
||||||
// On sauve en session le menu principal choisi
|
// On sauve en session le menu principal choisi
|
||||||
$leftmenu=$_GET["leftmenu"];
|
$leftmenu=$_GET["leftmenu"];
|
||||||
$_SESSION["leftmenu"]=$leftmenu;
|
$_SESSION["leftmenu"]=$leftmenu;
|
||||||
|
|
||||||
if ($_SESSION["leftmenuopened"]==$leftmenu) // To collapse
|
if ($_SESSION["leftmenuopened"]==$leftmenu) // To collapse
|
||||||
{
|
{
|
||||||
//$leftmenu="";
|
//$leftmenu="";
|
||||||
$_SESSION["leftmenuopened"]="";
|
$_SESSION["leftmenuopened"]="";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$_SESSION["leftmenuopened"]=$leftmenu;
|
$_SESSION["leftmenuopened"]=$leftmenu;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// On va le chercher en session si non defini par le lien
|
// On va le chercher en session si non defini par le lien
|
||||||
$leftmenu=isset($_SESSION["leftmenu"])?$_SESSION["leftmenu"]:'';
|
$leftmenu=isset($_SESSION["leftmenu"])?$_SESSION["leftmenu"]:'';
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
||||||
$tabMenu=array();
|
$tabMenu=array();
|
||||||
$menuArbo = new Menubase($this->db,'eldy');
|
$menuArbo = new Menubase($this->db,'eldy');
|
||||||
$menuArbo->menuLoad($mainmenu, $leftmenu, $this->type_user, 'eldy', $tabMenu);
|
$menuArbo->menuLoad($mainmenu, $leftmenu, $this->type_user, 'eldy', $tabMenu);
|
||||||
$this->tabMenu=$tabMenu;
|
$this->tabMenu=$tabMenu;
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ class MenuManager
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
|
||||||
$this->menu=new Menu();
|
$this->menu=new Menu();
|
||||||
|
|
||||||
if ($mode == 'top') $res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu);
|
if ($mode == 'top') $res=print_eldy_menu($this->db,$this->atarget,$this->type_user,$this->tabMenu,$this->menu);
|
||||||
if ($mode == 'left') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu);
|
if ($mode == 'left') $res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$this->menu);
|
||||||
if ($mode == 'jmobile')
|
if ($mode == 'jmobile')
|
||||||
@ -156,7 +156,7 @@ class MenuManager
|
|||||||
if ($canonrelurl != $canonnexturl && $val['mainmenu'] != 'home')
|
if ($canonrelurl != $canonnexturl && $val['mainmenu'] != 'home')
|
||||||
{
|
{
|
||||||
// We add sub entry
|
// We add sub entry
|
||||||
print '<li data-role="list-divider"><a href="'.$relurl.'">'.$langs->trans("MainArea").'-'.$val['titre'].'</a></li>'."\n";
|
print '<li data-role="list-divider"><a href="'.$relurl.'">'.$langs->trans("MainArea").'-'.$val['titre'].'</a></li>'."\n";
|
||||||
}
|
}
|
||||||
foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu'
|
||||||
{
|
{
|
||||||
@ -165,7 +165,7 @@ class MenuManager
|
|||||||
print '<li'.($val2['level']==0?' data-role="list-divider"':'').'><a href="'.$relurl2.'">'.$val2['titre'].'</a></li>'."\n";
|
print '<li'.($val2['level']==0?' data-role="list-divider"':'').'><a href="'.$relurl2.'">'.$val2['titre'].'</a></li>'."\n";
|
||||||
}
|
}
|
||||||
//var_dump($submenu);
|
//var_dump($submenu);
|
||||||
print '</ul>';
|
print '</ul>';
|
||||||
}
|
}
|
||||||
if ($val['enabled'] == 2)
|
if ($val['enabled'] == 2)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -46,12 +46,12 @@ class MenuManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load this->tabMenu
|
* Load this->tabMenu
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function loadMenu()
|
function loadMenu()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -70,7 +70,7 @@ class MenuManager
|
|||||||
$id='mainmenu';
|
$id='mainmenu';
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/menu.class.php';
|
||||||
$this->menu=new Menu();
|
$this->menu=new Menu();
|
||||||
|
|
||||||
if ($mode == 'top')
|
if ($mode == 'top')
|
||||||
{
|
{
|
||||||
@ -183,7 +183,7 @@ class MenuManager
|
|||||||
*/
|
*/
|
||||||
function print_start_menu_array_empty()
|
function print_start_menu_array_empty()
|
||||||
{
|
{
|
||||||
print '<div class="tmenudiv">';
|
print '<div class="tmenudiv">';
|
||||||
print '<ul class="tmenu">';
|
print '<ul class="tmenu">';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -220,21 +220,21 @@ function print_text_menu_entry_empty($text, $showmode, $url, $id, $idsel, $class
|
|||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
if ($showmode == 1)
|
if ($showmode == 1)
|
||||||
{
|
{
|
||||||
print '<a class="tmenuimage" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
print '<a class="tmenuimage" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.' tmenuimage" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
print '<a '.$classname.' id="mainmenua_'.$idsel.'" href="'.$url.'"'.($atarget?' target="'.$atarget.'"':'').'>';
|
||||||
print '<span class="mainmenuaspan">';
|
print '<span class="mainmenuaspan">';
|
||||||
print $text;
|
print $text;
|
||||||
print '</span>';
|
print '</span>';
|
||||||
print '</a>';
|
print '</a>';
|
||||||
}
|
}
|
||||||
if ($showmode == 2)
|
if ($showmode == 2)
|
||||||
{
|
{
|
||||||
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
print '<div class="'.$id.' '.$idsel.'"><span class="'.$id.'" id="mainmenuspan_'.$idsel.'"></span></div>';
|
||||||
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
print '<a class="tmenudisabled" id="mainmenua_'.$idsel.'" href="#" title="'.dol_escape_htmltag($langs->trans("NotAllowed")).'">';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -105,9 +105,9 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
'object_date'=>dol_print_date($object->date,'day'),
|
'object_date'=>dol_print_date($object->date,'day'),
|
||||||
'object_date_delivery'=>dol_print_date($object->date_livraison,'dayhour'),
|
'object_date_delivery'=>dol_print_date($object->date_livraison,'dayhour'),
|
||||||
'object_date_creation'=>dol_print_date($object->date_creation,'day'),
|
'object_date_creation'=>dol_print_date($object->date_creation,'day'),
|
||||||
'object_date_modification'=>(! empty($object->date_modification)?dol_print_date($object->date_modification,'day'):''),
|
'object_date_modification'=>(! empty($object->date_modification)?dol_print_date($object->date_modification,'day'):''),
|
||||||
'object_date_validation'=>(! empty($object->date_validation)?dol_print_date($object->date_validation,'dayhour'):''),
|
'object_date_validation'=>(! empty($object->date_validation)?dol_print_date($object->date_validation,'dayhour'):''),
|
||||||
'object_date_delivery_planed'=>(! empty($object->date_livraison)?dol_print_date($object->date_livraison,'day'):''),
|
'object_date_delivery_planed'=>(! empty($object->date_livraison)?dol_print_date($object->date_livraison,'day'):''),
|
||||||
'object_date_close'=>dol_print_date($object->date_cloture,'dayhour'),
|
'object_date_close'=>dol_print_date($object->date_cloture,'dayhour'),
|
||||||
'object_payment_mode_code'=>$object->mode_reglement_code,
|
'object_payment_mode_code'=>$object->mode_reglement_code,
|
||||||
'object_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement),
|
'object_payment_mode'=>($outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code)!='PaymentType'.$object->mode_reglement_code?$outputlangs->transnoentitiesnoconv('PaymentType'.$object->mode_reglement_code):$object->mode_reglement),
|
||||||
@ -122,12 +122,12 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
'object_note'=>$object->note_public,
|
'object_note'=>$object->note_public,
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add vat by rates
|
// Add vat by rates
|
||||||
foreach ($object->lines as $line)
|
foreach ($object->lines as $line)
|
||||||
{
|
{
|
||||||
if (empty($resarray['object_total_vat_'.$line->tva_tx])) $resarray['object_total_vat_'.$line->tva_tx]=0;
|
if (empty($resarray['object_total_vat_'.$line->tva_tx])) $resarray['object_total_vat_'.$line->tva_tx]=0;
|
||||||
$resarray['object_total_vat_'.$line->tva_tx]+=$line->total_tva;
|
$resarray['object_total_vat_'.$line->tva_tx]+=$line->total_tva;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $resarray;
|
return $resarray;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -244,7 +244,7 @@ class ExportCsv extends ModeleExports
|
|||||||
if (empty($alias)) dol_print_error('','Bad value for field with key='.$code.'. Try to redefine export.');
|
if (empty($alias)) dol_print_error('','Bad value for field with key='.$code.'. Try to redefine export.');
|
||||||
|
|
||||||
$newvalue=$outputlangs->convToOutputCharset($objp->$alias);
|
$newvalue=$outputlangs->convToOutputCharset($objp->$alias);
|
||||||
$typefield=isset($array_types[$code])?$array_types[$code]:'';
|
$typefield=isset($array_types[$code])?$array_types[$code]:'';
|
||||||
|
|
||||||
// Translation newvalue
|
// Translation newvalue
|
||||||
if (preg_match('/^\((.*)\)$/i',$newvalue,$reg))
|
if (preg_match('/^\((.*)\)$/i',$newvalue,$reg))
|
||||||
|
|||||||
@ -282,7 +282,7 @@ class ExportExcel extends ModeleExports
|
|||||||
$newvalue=$objp->$alias;
|
$newvalue=$objp->$alias;
|
||||||
|
|
||||||
$newvalue=$this->excel_clean($newvalue);
|
$newvalue=$this->excel_clean($newvalue);
|
||||||
$typefield=isset($array_types[$code])?$array_types[$code]:'';
|
$typefield=isset($array_types[$code])?$array_types[$code]:'';
|
||||||
|
|
||||||
// Traduction newvalue
|
// Traduction newvalue
|
||||||
if (preg_match('/^\((.*)\)$/i',$newvalue,$reg))
|
if (preg_match('/^\((.*)\)$/i',$newvalue,$reg))
|
||||||
@ -342,18 +342,18 @@ class ExportExcel extends ModeleExports
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($typefield == 'Text')
|
if ($typefield == 'Text')
|
||||||
{
|
{
|
||||||
//$this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row+1)->setValueExplicit($newvalue, PHPExcel_Cell_DataType::TYPE_STRING);
|
//$this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row+1)->setValueExplicit($newvalue, PHPExcel_Cell_DataType::TYPE_STRING);
|
||||||
$this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row+1, (string) $newvalue);
|
$this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row+1, (string) $newvalue);
|
||||||
$coord=$this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row+1)->getCoordinate();
|
$coord=$this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row+1)->getCoordinate();
|
||||||
$this->workbook->getActiveSheet()->getStyle($coord)->getNumberFormat()->setFormatCode('@');
|
$this->workbook->getActiveSheet()->getStyle($coord)->getNumberFormat()->setFormatCode('@');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//$coord=$this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row+1)->getCoordinate();
|
//$coord=$this->workbook->getActiveSheet()->getCellByColumnAndRow($this->col, $this->row+1)->getCoordinate();
|
||||||
//if ($typefield == 'Text') $this->workbook->getActiveSheet()->getStyle($coord)->getNumberFormat()->setFormatCode('@');
|
//if ($typefield == 'Text') $this->workbook->getActiveSheet()->getStyle($coord)->getNumberFormat()->setFormatCode('@');
|
||||||
$this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row+1, $newvalue);
|
$this->workbook->getActiveSheet()->SetCellValueByColumnAndRow($this->col, $this->row+1, $newvalue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -277,8 +277,8 @@ class ExportExcel2007 extends ExportExcel
|
|||||||
|
|
||||||
foreach($array_selected_sorted as $code => $value)
|
foreach($array_selected_sorted as $code => $value)
|
||||||
{
|
{
|
||||||
if (strpos($code,' as ') == 0) $alias=str_replace(array('.','-'),'_',$code);
|
if (strpos($code,' as ') == 0) $alias=str_replace(array('.','-'),'_',$code);
|
||||||
else $alias=substr($code, strpos($code, ' as ') + 4);
|
else $alias=substr($code, strpos($code, ' as ') + 4);
|
||||||
if (empty($alias)) dol_print_error('','Bad value for field with code='.$code.'. Try to redefine export.');
|
if (empty($alias)) dol_print_error('','Bad value for field with code='.$code.'. Try to redefine export.');
|
||||||
$newvalue=$objp->$alias;
|
$newvalue=$objp->$alias;
|
||||||
|
|
||||||
|
|||||||
@ -219,7 +219,7 @@ class ExportTsv extends ModeleExports
|
|||||||
if (empty($alias)) dol_print_error('','Bad value for field with code='.$code.'. Try to redefine export.');
|
if (empty($alias)) dol_print_error('','Bad value for field with code='.$code.'. Try to redefine export.');
|
||||||
|
|
||||||
$newvalue=$outputlangs->convToOutputCharset($objp->$alias);
|
$newvalue=$outputlangs->convToOutputCharset($objp->$alias);
|
||||||
$typefield=isset($array_types[$code])?$array_types[$code]:'';
|
$typefield=isset($array_types[$code])?$array_types[$code]:'';
|
||||||
|
|
||||||
// Translation newvalue
|
// Translation newvalue
|
||||||
if (preg_match('/^\((.*)\)$/i',$newvalue,$reg))
|
if (preg_match('/^\((.*)\)$/i',$newvalue,$reg))
|
||||||
|
|||||||
@ -416,7 +416,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
$array_thirdparty=$this->get_substitutionarray_thirdparty($socobject,$outputlangs);
|
$array_thirdparty=$this->get_substitutionarray_thirdparty($socobject,$outputlangs);
|
||||||
$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
|
$array_objet=$this->get_substitutionarray_object($object,$outputlangs);
|
||||||
$array_propal=is_object($propal_object)?$this->get_substitutionarray_propal($propal_object,$outputlangs,'propal'):array();
|
$array_propal=is_object($propal_object)?$this->get_substitutionarray_propal($propal_object,$outputlangs,'propal'):array();
|
||||||
$array_other=$this->get_substitutionarray_other($user,$outputlangs);
|
$array_other=$this->get_substitutionarray_other($user,$outputlangs);
|
||||||
|
|
||||||
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal);
|
$tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal);
|
||||||
complete_substitutions_array($tmparray, $outputlangs, $object);
|
complete_substitutions_array($tmparray, $outputlangs, $object);
|
||||||
|
|||||||
@ -731,7 +731,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
// Si mode reglement non force ou si force a CHQ
|
// Si mode reglement non force ou si force a CHQ
|
||||||
if (! empty($conf->global->FACTURE_CHQ_NUMBER))
|
if (! empty($conf->global->FACTURE_CHQ_NUMBER))
|
||||||
{
|
{
|
||||||
$diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?3:$conf->global->PDF_DIFFSIZE_TITLE);
|
$diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?3:$conf->global->PDF_DIFFSIZE_TITLE);
|
||||||
|
|
||||||
if ($conf->global->FACTURE_CHQ_NUMBER > 0)
|
if ($conf->global->FACTURE_CHQ_NUMBER > 0)
|
||||||
{
|
{
|
||||||
@ -1026,8 +1026,8 @@ class pdf_crabe extends ModelePDFFactures
|
|||||||
if (price2num($object->revenuestamp) != 0)
|
if (price2num($object->revenuestamp) != 0)
|
||||||
{
|
{
|
||||||
$index++;
|
$index++;
|
||||||
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col1x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RevenueStamp"), $useborder, 'L', 1);
|
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("RevenueStamp"), $useborder, 'L', 1);
|
||||||
|
|
||||||
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
$pdf->SetXY($col2x, $tab2_top + $tab2_hl * $index);
|
||||||
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * $object->revenuestamp), $useborder, 'R', 1);
|
$pdf->MultiCell($largcol2, $tab2_hl, price($sign * $object->revenuestamp), $useborder, 'R', 1);
|
||||||
|
|||||||
@ -118,18 +118,18 @@ class modCron extends DolibarrModules
|
|||||||
$this->rights[$r][4] = 'execute';
|
$this->rights[$r][4] = 'execute';
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
// Main menu entries
|
// Main menu entries
|
||||||
$r=0;
|
$r=0;
|
||||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||||
'type'=>'left', // This is a Left menu entry
|
'type'=>'left', // This is a Left menu entry
|
||||||
'titre'=>'CronListActive',
|
'titre'=>'CronListActive',
|
||||||
'url'=>'/cron/list.php?status=1',
|
'url'=>'/cron/list.php?status=1',
|
||||||
'langs'=>'cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
'langs'=>'cron', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||||
'position'=>200,
|
'position'=>200,
|
||||||
'enabled'=>'$leftmenu==\'modulesadmintools\'', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
'enabled'=>'$leftmenu==\'modulesadmintools\'', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||||
'perms'=>'$user->rights->cron->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
'perms'=>'$user->rights->cron->read', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||||
'target'=>'',
|
'target'=>'',
|
||||||
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
$this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=home,fk_leftmenu=modulesadmintools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
|
||||||
|
|||||||
@ -55,52 +55,52 @@ top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
print '<body style="margin: 40px; text-align: center">'."\n";
|
print '<body style="margin: 40px; text-align: center">'."\n";
|
||||||
print '<center>';
|
print '<center>';
|
||||||
|
|
||||||
// Define $searchform
|
// Define $searchform
|
||||||
if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire)
|
if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire)
|
||||||
{
|
{
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/societe/societe.php', DOL_URL_ROOT.'/societe/societe.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'socname');
|
$searchform.=printSearchForm(DOL_URL_ROOT.'/societe/societe.php', DOL_URL_ROOT.'/societe/societe.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'socname');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_CONTACT) && $user->rights->societe->lire)
|
if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_CONTACT) && $user->rights->societe->lire)
|
||||||
{
|
{
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', img_object('','contact').' '.$langs->trans("Contacts"), 'contact', 'contactname');
|
$searchform.=printSearchForm(DOL_URL_ROOT.'/contact/list.php', DOL_URL_ROOT.'/contact/list.php', img_object('','contact').' '.$langs->trans("Contacts"), 'contact', 'contactname');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire))
|
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire))
|
||||||
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE))
|
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE))
|
||||||
{
|
{
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/product/liste.php', DOL_URL_ROOT.'/product/liste.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall');
|
$searchform.=printSearchForm(DOL_URL_ROOT.'/product/liste.php', DOL_URL_ROOT.'/product/liste.php', img_object('','product').' '.$langs->trans("Products")."/".$langs->trans("Services"), 'products', 'sall');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire))
|
if (((! empty($conf->product->enabled) && $user->rights->produit->lire) || (! empty($conf->service->enabled) && $user->rights->service->lire))
|
||||||
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE))
|
&& ! empty($conf->global->MAIN_SEARCHFORM_PRODUITSERVICE))
|
||||||
{
|
{
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/liste.php', DOL_URL_ROOT.'/fourn/product/liste.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier');
|
$searchform.=printSearchForm(DOL_URL_ROOT.'/fourn/product/liste.php', DOL_URL_ROOT.'/fourn/product/liste.php', img_object('','product').' '.$langs->trans("SupplierRef"), 'products', 'srefsupplier');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire)
|
if (! empty($conf->adherent->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_ADHERENT) && $user->rights->adherent->lire)
|
||||||
{
|
{
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/liste.php', DOL_URL_ROOT.'/adherents/liste.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall');
|
$searchform.=printSearchForm(DOL_URL_ROOT.'/adherents/liste.php', DOL_URL_ROOT.'/adherents/liste.php', img_object('','user').' '.$langs->trans("Members"), 'member', 'sall');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute hook printSearchForm
|
// Execute hook printSearchForm
|
||||||
$parameters=array();
|
$parameters=array();
|
||||||
$searchform.=$hookmanager->executeHooks('printSearchForm',$parameters); // Note that $action and $object may have been modified by some hooks
|
$searchform.=$hookmanager->executeHooks('printSearchForm',$parameters); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
|
|
||||||
print "\n";
|
print "\n";
|
||||||
print "<!-- Begin SearchForm -->\n";
|
print "<!-- Begin SearchForm -->\n";
|
||||||
print '<div id="blockvmenusearch" class="blockvmenusearch">'."\n";
|
print '<div id="blockvmenusearch" class="blockvmenusearch">'."\n";
|
||||||
print $searchform;
|
print $searchform;
|
||||||
print '</div>'."\n";
|
print '</div>'."\n";
|
||||||
print "<!-- End SearchForm -->\n";
|
print "<!-- End SearchForm -->\n";
|
||||||
|
|
||||||
print '</center>';
|
print '</center>';
|
||||||
|
|||||||
@ -107,10 +107,10 @@ dol_fiche_end();
|
|||||||
print '<br><br>';
|
print '<br><br>';
|
||||||
|
|
||||||
|
|
||||||
// Define $urlwithroot
|
// Define $urlwithroot
|
||||||
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
|
$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
|
||||||
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
|
||||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||||
|
|
||||||
// Cron launch
|
// Cron launch
|
||||||
print '<u>'.$langs->trans("URLToLaunchCronJobs").':</u><br>';
|
print '<u>'.$langs->trans("URLToLaunchCronJobs").':</u><br>';
|
||||||
@ -133,11 +133,11 @@ $file='/scripts/cron/cron_run_jobs.php'.' '.(empty($conf->global->CRON_KEY)?'sec
|
|||||||
print '<textarea rows="'.ROWS_2.'" cols="120">..'.$file."</textarea><br>\n";
|
print '<textarea rows="'.ROWS_2.'" cols="120">..'.$file."</textarea><br>\n";
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print $langs->trans("Note").': ';
|
print $langs->trans("Note").': ';
|
||||||
if ($linuxlike) {
|
if ($linuxlike) {
|
||||||
print $langs->trans("CronExplainHowToRunUnix");
|
print $langs->trans("CronExplainHowToRunUnix");
|
||||||
} else {
|
} else {
|
||||||
print $langs->trans("CronExplainHowToRunWin");
|
print $langs->trans("CronExplainHowToRunWin");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -600,7 +600,7 @@ if (($action=="create") || ($action=="edit"))
|
|||||||
}
|
}
|
||||||
else if (empty($object->status))
|
else if (empty($object->status))
|
||||||
{
|
{
|
||||||
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("TaskDisabled")).'">'.$langs->trans("CronExecute").'</a>';
|
print '<a class="butActionRefused" href="#" title="'.dol_escape_htmltag($langs->transnoentitiesnoconv("TaskDisabled")).'">'.$langs->trans("CronExecute").'</a>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=execute&id='.$object->id.'">'.$langs->trans("CronExecute").'</a>';
|
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?action=execute&id='.$object->id.'">'.$langs->trans("CronExecute").'</a>';
|
||||||
|
|||||||
@ -1522,4 +1522,4 @@ else
|
|||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -46,7 +46,7 @@ print_fiche_titre($langs->trans("SendingsArea"));
|
|||||||
|
|
||||||
//print '<table class="notopnoleftnoright" width="100%">';
|
//print '<table class="notopnoleftnoright" width="100%">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
$var=false;
|
$var=false;
|
||||||
@ -163,7 +163,7 @@ if ($resql)
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%">';
|
//print '</td><td valign="top" width="70%">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -275,7 +275,7 @@ else dol_print_error($db);
|
|||||||
|
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|||||||
@ -237,7 +237,7 @@ class Export
|
|||||||
}
|
}
|
||||||
$sql.=$sqlWhere;
|
$sql.=$sqlWhere;
|
||||||
}
|
}
|
||||||
$sql.=$this->array_export_sql_order[$indice];
|
$sql.=$this->array_export_sql_order[$indice];
|
||||||
|
|
||||||
return $sql;
|
return $sql;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
|
||||||
$langs->load("exports");
|
$langs->load("exports");
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
|
|
||||||
// Everybody should be able to go on this page
|
// Everybody should be able to go on this page
|
||||||
//if (! $user->admin)
|
//if (! $user->admin)
|
||||||
|
|||||||
@ -234,7 +234,7 @@ if (! file_exists(DOL_DOCUMENT_ROOT ."/core/lib/functions.lib.php"))
|
|||||||
print "Please run dolibarr setup by calling page <b>/install</b>.<br>\n";
|
print "Please run dolibarr setup by calling page <b>/install</b>.<br>\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Included by default
|
// Included by default
|
||||||
include_once DOL_DOCUMENT_ROOT .'/core/lib/functions.lib.php';
|
include_once DOL_DOCUMENT_ROOT .'/core/lib/functions.lib.php';
|
||||||
|
|||||||
@ -53,7 +53,7 @@ print_fiche_titre($langs->trans("SuppliersArea"));
|
|||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
// Orders
|
// Orders
|
||||||
@ -226,7 +226,7 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->facture-
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -321,7 +321,7 @@ if (count($companystatic->SupplierCategories))
|
|||||||
|
|
||||||
|
|
||||||
//print "</td></tr></table>\n";
|
//print "</td></tr></table>\n";
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -82,12 +82,12 @@ class Holiday extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function updateSold()
|
function updateSold()
|
||||||
{
|
{
|
||||||
// Mets à jour les congés payés en début de mois
|
// Mets à jour les congés payés en début de mois
|
||||||
$this->updateSoldeCP();
|
$this->updateSoldeCP();
|
||||||
|
|
||||||
// Vérifie le nombre d'utilisateur et mets à jour si besoin
|
// Vérifie le nombre d'utilisateur et mets à jour si besoin
|
||||||
$this->verifNbUsers($this->countActiveUsers(),$this->getConfCP('nbUser'));
|
$this->verifNbUsers($this->countActiveUsers(),$this->getConfCP('nbUser'));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -74,10 +74,10 @@ if ($action == 'update' && isset($_POST['update_cp']))
|
|||||||
|
|
||||||
// If it first update of sold, we set date to havoid to have sold incremented by new month
|
// If it first update of sold, we set date to havoid to have sold incremented by new month
|
||||||
$now=dol_now();
|
$now=dol_now();
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."holiday_config SET";
|
||||||
$sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'";
|
$sql.= " value = '".dol_print_date($now,'%Y%m%d%H%M%S')."'";
|
||||||
$sql.= " WHERE name = 'lastUpdate' and value IS NULL"; // Add value IS NULL to be sure to update only at init.
|
$sql.= " WHERE name = 'lastUpdate' and value IS NULL"; // Add value IS NULL to be sure to update only at init.
|
||||||
dol_syslog('define_holiday update lastUpdate entry sql='.$sql);
|
dol_syslog('define_holiday update lastUpdate entry sql='.$sql);
|
||||||
$result = $db->query($sql);
|
$result = $db->query($sql);
|
||||||
|
|
||||||
$mesg='<div class="ok">'.$langs->trans('UpdateConfCPOK').'</div>';
|
$mesg='<div class="ok">'.$langs->trans('UpdateConfCPOK').'</div>';
|
||||||
|
|||||||
@ -30,11 +30,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||||
|
|
||||||
$langs->load('users');
|
$langs->load('users');
|
||||||
$langs->load('holidays');
|
$langs->load('holidays');
|
||||||
|
|
||||||
// Protection if external user
|
// Protection if external user
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
@ -79,7 +79,7 @@ $search_statut = GETPOST('select_statut');
|
|||||||
|
|
||||||
$holiday = new Holiday($db);
|
$holiday = new Holiday($db);
|
||||||
$holidaystatic=new Holiday($db);
|
$holidaystatic=new Holiday($db);
|
||||||
$fuser = new User($db);
|
$fuser = new User($db);
|
||||||
|
|
||||||
// Update sold
|
// Update sold
|
||||||
$holiday->updateSold();
|
$holiday->updateSold();
|
||||||
@ -165,12 +165,12 @@ if(!empty($search_statut) && $search_statut != -1) {
|
|||||||
// Récupération de l'ID de l'utilisateur
|
// Récupération de l'ID de l'utilisateur
|
||||||
$user_id = $user->id;
|
$user_id = $user->id;
|
||||||
|
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
// Charge utilisateur edite
|
// Charge utilisateur edite
|
||||||
$fuser->fetch($id);
|
$fuser->fetch($id);
|
||||||
$fuser->getrights();
|
$fuser->getrights();
|
||||||
$user_id = $fuser->id;
|
$user_id = $fuser->id;
|
||||||
}
|
}
|
||||||
// Récupération des congés payés de l'utilisateur ou de tous les users
|
// Récupération des congés payés de l'utilisateur ou de tous les users
|
||||||
if (!$user->rights->holiday->lire_tous || $id > 0)
|
if (!$user->rights->holiday->lire_tous || $id > 0)
|
||||||
@ -197,38 +197,38 @@ if ($holiday_payes == '-1')
|
|||||||
* Affichage du tableau des congés payés
|
* Affichage du tableau des congés payés
|
||||||
*************************************/
|
*************************************/
|
||||||
|
|
||||||
$var=true; $num = count($holiday->holiday);
|
$var=true; $num = count($holiday->holiday);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formother = new FormOther($db);
|
$formother = new FormOther($db);
|
||||||
|
|
||||||
if ($id > 0)
|
if ($id > 0)
|
||||||
{
|
{
|
||||||
$head = user_prepare_head($fuser);
|
$head = user_prepare_head($fuser);
|
||||||
|
|
||||||
$title = $langs->trans("User");
|
$title = $langs->trans("User");
|
||||||
dol_fiche_head($head, 'paidholidays', $title, 0, 'user');
|
dol_fiche_head($head, 'paidholidays', $title, 0, 'user');
|
||||||
|
|
||||||
print '<table class="border" width="100%">';
|
print '<table class="border" width="100%">';
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
|
print '<tr><td width="25%" valign="top">'.$langs->trans("Ref").'</td>';
|
||||||
print '<td colspan="2">';
|
print '<td colspan="2">';
|
||||||
print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user->admin);
|
print $form->showrefnav($fuser,'id','',$user->rights->user->user->lire || $user->admin);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// LastName
|
// LastName
|
||||||
print '<tr><td width="25%" valign="top">'.$langs->trans("LastName").'</td>';
|
print '<tr><td width="25%" valign="top">'.$langs->trans("LastName").'</td>';
|
||||||
print '<td colspan="2">'.$fuser->lastname.'</td>';
|
print '<td colspan="2">'.$fuser->lastname.'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// FirstName
|
// FirstName
|
||||||
print '<tr><td width="25%" valign="top">'.$langs->trans("FirstName").'</td>';
|
print '<tr><td width="25%" valign="top">'.$langs->trans("FirstName").'</td>';
|
||||||
print '<td colspan="2">'.$fuser->firstname.'</td>';
|
print '<td colspan="2">'.$fuser->firstname.'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
print '</table><br>';
|
print '</table><br>';
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -142,8 +142,8 @@ if ($action == "set" || empty($action) || preg_match('/upgrade/i',$action))
|
|||||||
|
|
||||||
$db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port);
|
$db=getDoliDBInstance($conf->db->type,$conf->db->host,$conf->db->user,$conf->db->pass,$conf->db->name,$conf->db->port);
|
||||||
|
|
||||||
// Create the global $hookmanager object
|
// Create the global $hookmanager object
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php';
|
||||||
$hookmanager=new HookManager($db);
|
$hookmanager=new HookManager($db);
|
||||||
|
|
||||||
$ok = 0;
|
$ok = 0;
|
||||||
|
|||||||
@ -314,25 +314,25 @@ function conf($dolibarr_main_document_root)
|
|||||||
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
|
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
|
||||||
}
|
}
|
||||||
if (! defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR',1);
|
if (! defined('SYSLOG_FILE_NO_ERROR')) define('SYSLOG_FILE_NO_ERROR',1);
|
||||||
// We init log handler for install
|
// We init log handler for install
|
||||||
$handlers = array('mod_syslog_file');
|
$handlers = array('mod_syslog_file');
|
||||||
foreach ($handlers as $handler)
|
foreach ($handlers as $handler)
|
||||||
{
|
{
|
||||||
$file = DOL_DOCUMENT_ROOT.'/core/modules/syslog/'.$handler.'.php';
|
$file = DOL_DOCUMENT_ROOT.'/core/modules/syslog/'.$handler.'.php';
|
||||||
if (!file_exists($file))
|
if (!file_exists($file))
|
||||||
{
|
{
|
||||||
throw new Exception('Missing log handler file '.$handler.'.php');
|
throw new Exception('Missing log handler file '.$handler.'.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once $file;
|
require_once $file;
|
||||||
$loghandlerinstance = new $handler();
|
$loghandlerinstance = new $handler();
|
||||||
if (!$loghandlerinstance instanceof LogHandlerInterface)
|
if (!$loghandlerinstance instanceof LogHandlerInterface)
|
||||||
{
|
{
|
||||||
throw new Exception('Log handler does not extend LogHandlerInterface');
|
throw new Exception('Log handler does not extend LogHandlerInterface');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($conf->loghandlers[$handler])) $conf->loghandlers[$handler]=$loghandlerinstance;
|
if (empty($conf->loghandlers[$handler])) $conf->loghandlers[$handler]=$loghandlerinstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -374,30 +374,30 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
|
|||||||
// Run sql script
|
// Run sql script
|
||||||
$ok=run_sql($dir.$file, 0, '', 1);
|
$ok=run_sql($dir.$file, 0, '', 1);
|
||||||
|
|
||||||
// Scan if there is migration scripts for modules htdocs/module/sql or htdocs/custom/module/sql
|
// Scan if there is migration scripts for modules htdocs/module/sql or htdocs/custom/module/sql
|
||||||
$modulesfile = array();
|
$modulesfile = array();
|
||||||
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
foreach ($conf->file->dol_document_root as $type => $dirroot)
|
||||||
{
|
{
|
||||||
$handlemodule=@opendir($dirroot);
|
$handlemodule=@opendir($dirroot);
|
||||||
if (is_resource($handlemodule))
|
if (is_resource($handlemodule))
|
||||||
{
|
{
|
||||||
while (($filemodule = readdir($handlemodule))!==false)
|
while (($filemodule = readdir($handlemodule))!==false)
|
||||||
{
|
{
|
||||||
if (is_dir($dirroot.'/'.$filemodule.'/sql'))
|
if (is_dir($dirroot.'/'.$filemodule.'/sql'))
|
||||||
{
|
{
|
||||||
//print "Scan for ".$dirroot . '/' . $filemodule . '/sql/'.$file;
|
//print "Scan for ".$dirroot . '/' . $filemodule . '/sql/'.$file;
|
||||||
if (is_file($dirroot . '/' . $filemodule . '/sql/'.$file))
|
if (is_file($dirroot . '/' . $filemodule . '/sql/'.$file))
|
||||||
{
|
{
|
||||||
$modulesfile[$dirroot . '/' . $filemodule . '/sql/'.$file] = '/' . $filemodule . '/sql/'.$file;
|
$modulesfile[$dirroot . '/' . $filemodule . '/sql/'.$file] = '/' . $filemodule . '/sql/'.$file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
closedir($handlemodule);
|
closedir($handlemodule);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($modulesfile as $modulefilelong => $modulefileshort)
|
foreach ($modulesfile as $modulefilelong => $modulefileshort)
|
||||||
{
|
{
|
||||||
print '<tr><td colspan="2"><hr></td></tr>';
|
print '<tr><td colspan="2"><hr></td></tr>';
|
||||||
print '<tr><td nowrap>'.$langs->trans("ChoosedMigrateScript").' (external modules)</td><td align="right">'.$modulefileshort.'</td></tr>'."\n";
|
print '<tr><td nowrap>'.$langs->trans("ChoosedMigrateScript").' (external modules)</td><td align="right">'.$modulefileshort.'</td></tr>'."\n";
|
||||||
|
|
||||||
|
|||||||
@ -139,7 +139,7 @@ function analyse_sql_and_script(&$var, $type)
|
|||||||
|
|
||||||
|
|
||||||
// Check consitency of NOREQUIREXXX DEFINES
|
// Check consitency of NOREQUIREXXX DEFINES
|
||||||
if ((defined('NOREQUIREDB') || defined('NOREQUIRETRAN')) && ! defined('NOREQUIREMENU')) dol_print_error('','If define NOREQUIREDB or NOREQUIRETRAN are set, you must also set NOREQUIREMENU or not use them');
|
if ((defined('NOREQUIREDB') || defined('NOREQUIRETRAN')) && ! defined('NOREQUIREMENU')) dol_print_error('','If define NOREQUIREDB or NOREQUIRETRAN are set, you must also set NOREQUIREMENU or not use them');
|
||||||
|
|
||||||
// Sanity check on URL
|
// Sanity check on URL
|
||||||
if (! empty($_SERVER["PHP_SELF"]))
|
if (! empty($_SERVER["PHP_SELF"]))
|
||||||
@ -761,7 +761,7 @@ else
|
|||||||
$heightforframes=52;
|
$heightforframes=52;
|
||||||
|
|
||||||
// Switch to another entity
|
// Switch to another entity
|
||||||
// TODO Multicompany Remove this
|
// TODO Multicompany Remove this
|
||||||
if (! empty($conf->multicompany->enabled) && GETPOST('action') == 'switchentity')
|
if (! empty($conf->multicompany->enabled) && GETPOST('action') == 'switchentity')
|
||||||
{
|
{
|
||||||
if ($mc->switchEntity(GETPOST('entity','int')) > 0)
|
if ($mc->switchEntity(GETPOST('entity','int')) > 0)
|
||||||
|
|||||||
@ -76,7 +76,7 @@ if (! empty($dolibarr_main_document_root_alt))
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set properties specific to multicompany
|
// Set properties specific to multicompany
|
||||||
// TODO Multicompany Remove this. Useless. Var should be read when required.
|
// TODO Multicompany Remove this. Useless. Var should be read when required.
|
||||||
$conf->multicompany->transverse_mode = empty($multicompany_transverse_mode)?'':$multicompany_transverse_mode; // Force Multi-Company transverse mode
|
$conf->multicompany->transverse_mode = empty($multicompany_transverse_mode)?'':$multicompany_transverse_mode; // Force Multi-Company transverse mode
|
||||||
$conf->multicompany->force_entity = empty($multicompany_force_entity)?'':(int) $multicompany_force_entity; // Force entity in login page
|
$conf->multicompany->force_entity = empty($multicompany_force_entity)?'':(int) $multicompany_force_entity; // Force entity in login page
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ if (! defined('NOREQUIREDB'))
|
|||||||
{
|
{
|
||||||
$conf->entity = DOLENTITY;
|
$conf->entity = DOLENTITY;
|
||||||
}
|
}
|
||||||
// TODO Multicompany Remove this.
|
// TODO Multicompany Remove this.
|
||||||
else if (! empty($conf->multicompany->force_entity) && is_int($conf->multicompany->force_entity)) // To force entity in login page
|
else if (! empty($conf->multicompany->force_entity) && is_int($conf->multicompany->force_entity)) // To force entity in login page
|
||||||
{
|
{
|
||||||
$conf->entity = $conf->multicompany->force_entity;
|
$conf->entity = $conf->multicompany->force_entity;
|
||||||
|
|||||||
@ -69,7 +69,7 @@ print_fiche_titre($transAreaType);
|
|||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -160,7 +160,7 @@ print '</table>';
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -259,7 +259,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ print_fiche_titre($langs->trans("StocksArea"));
|
|||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -106,7 +106,7 @@ else
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
// Last movements
|
// Last movements
|
||||||
@ -164,7 +164,7 @@ if ($resql)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -58,9 +58,9 @@ $langs->load("paypal");
|
|||||||
|
|
||||||
dol_syslog("Callback url when a PayBox payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paybox');
|
dol_syslog("Callback url when a PayBox payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paybox');
|
||||||
|
|
||||||
$tracepost = "";
|
$tracepost = "";
|
||||||
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||||
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paybox');
|
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paybox');
|
||||||
|
|
||||||
llxHeaderPayBox($langs->trans("PaymentForm"));
|
llxHeaderPayBox($langs->trans("PaymentForm"));
|
||||||
|
|
||||||
|
|||||||
@ -57,9 +57,9 @@ $langs->load("paypal");
|
|||||||
|
|
||||||
dol_syslog("Callback url when a PayBox payment was done. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paybox');
|
dol_syslog("Callback url when a PayBox payment was done. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paybox');
|
||||||
|
|
||||||
$tracepost = "";
|
$tracepost = "";
|
||||||
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||||
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paybox');
|
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paybox');
|
||||||
|
|
||||||
llxHeaderPayBox($langs->trans("PaymentForm"));
|
llxHeaderPayBox($langs->trans("PaymentForm"));
|
||||||
|
|
||||||
|
|||||||
@ -66,9 +66,9 @@ $langs->load("paypal");
|
|||||||
|
|
||||||
dol_syslog("Callback url when a PayPal payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paypal');
|
dol_syslog("Callback url when a PayPal payment was canceled. query_string=".(empty($_SERVER["QUERY_STRING"])?'':$_SERVER["QUERY_STRING"])." script_uri=".(empty($_SERVER["SCRIPT_URI"])?'':$_SERVER["SCRIPT_URI"]), LOG_DEBUG, 0, '_paypal');
|
||||||
|
|
||||||
$tracepost = "";
|
$tracepost = "";
|
||||||
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
foreach($_POST as $k => $v) $tracepost .= "{$k} - {$v}\n";
|
||||||
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paypal');
|
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_paypal');
|
||||||
|
|
||||||
|
|
||||||
llxHeaderPaypal($langs->trans("PaymentForm"));
|
llxHeaderPaypal($langs->trans("PaymentForm"));
|
||||||
|
|||||||
@ -82,9 +82,9 @@ class Societe extends CommonObject
|
|||||||
var $idprof1; // IdProf1 (Ex: Siren in France)
|
var $idprof1; // IdProf1 (Ex: Siren in France)
|
||||||
var $idprof2; // IdProf2 (Ex: Siret in France)
|
var $idprof2; // IdProf2 (Ex: Siret in France)
|
||||||
var $idprof3; // IdProf3 (Ex: Ape in France)
|
var $idprof3; // IdProf3 (Ex: Ape in France)
|
||||||
var $idprof4; // IdProf4 (Ex: RCS in France)
|
var $idprof4; // IdProf4 (Ex: RCS in France)
|
||||||
var $idprof5; // IdProf5
|
var $idprof5; // IdProf5
|
||||||
var $idprof6; // IdProf6
|
var $idprof6; // IdProf6
|
||||||
|
|
||||||
var $prefix_comm;
|
var $prefix_comm;
|
||||||
|
|
||||||
|
|||||||
@ -70,9 +70,9 @@ if (GETPOST("button_removefilter"))
|
|||||||
$thirdTypeSelect = GETPOST("third_select_id");
|
$thirdTypeSelect = GETPOST("third_select_id");
|
||||||
$type_element = GETPOST('type_element')?GETPOST('type_element'):'invoice';
|
$type_element = GETPOST('type_element')?GETPOST('type_element'):'invoice';
|
||||||
|
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$langs->load("suppliers");
|
$langs->load("suppliers");
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -87,7 +87,7 @@ $langs->load("suppliers");
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formother = new FormOther($db);
|
$formother = new FormOther($db);
|
||||||
$productstatic=new Product($db);
|
$productstatic=new Product($db);
|
||||||
|
|
||||||
$titre = $langs->trans("Referer",$object->name);
|
$titre = $langs->trans("Referer",$object->name);
|
||||||
llxHeader('',$titre,'');
|
llxHeader('',$titre,'');
|
||||||
@ -174,7 +174,7 @@ if ($type_element == 'order')
|
|||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
}
|
}
|
||||||
if ($type_element == 'supplier_order')
|
if ($type_element == 'supplier_order')
|
||||||
{ // Supplier : Show products from orders.
|
{ // Supplier : Show products from orders.
|
||||||
$documentstatic=new CommandeFournisseur($db);
|
$documentstatic=new CommandeFournisseur($db);
|
||||||
@ -217,13 +217,13 @@ $sql.= $db->order($sortfield,$sortorder);
|
|||||||
$sql.= $db->plimit($limit + 1, $offset);
|
$sql.= $db->plimit($limit + 1, $offset);
|
||||||
|
|
||||||
|
|
||||||
// Define type of elements
|
// Define type of elements
|
||||||
$typeElementString = $form->selectarray("type_element",$elementTypeArray,GETPOST('type_element'));
|
$typeElementString = $form->selectarray("type_element",$elementTypeArray,GETPOST('type_element'));
|
||||||
$button = '<input type="submit" class="button" name="button_third" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
$button = '<input type="submit" class="button" name="button_third" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
$param="&sref=".$sref."&month=".$month."&year=".$year."&sprod_fulldescr=".$sprod_fulldescr."&socid=".$socid;
|
$param="&sref=".$sref."&month=".$month."&year=".$year."&sprod_fulldescr=".$sprod_fulldescr."&socid=".$socid;
|
||||||
|
|
||||||
print_barre_liste($langs->trans('ProductsIntoElements', $typeElementString.' '.$button), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, '', '');
|
print_barre_liste($langs->trans('ProductsIntoElements', $typeElementString.' '.$button), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, '', '');
|
||||||
|
|
||||||
if ($sql_select)
|
if ($sql_select)
|
||||||
{
|
{
|
||||||
dol_syslog("sql=".$sql);
|
dol_syslog("sql=".$sql);
|
||||||
@ -276,115 +276,115 @@ if ($sql_select)
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
|
|
||||||
// Define text, description and type
|
// Define text, description and type
|
||||||
$text=''; $description=''; $type=0;
|
$text=''; $description=''; $type=0;
|
||||||
|
|
||||||
// Code to show product duplicated from commonobject->printObjectLine
|
// Code to show product duplicated from commonobject->printObjectLine
|
||||||
if ($objp->fk_product > 0)
|
if ($objp->fk_product > 0)
|
||||||
{
|
{
|
||||||
$product_static = new Product($db);
|
$product_static = new Product($db);
|
||||||
|
|
||||||
$product_static->type=$objp->fk_product_type;
|
$product_static->type=$objp->fk_product_type;
|
||||||
$product_static->id=$objp->fk_product;
|
$product_static->id=$objp->fk_product;
|
||||||
$product_static->ref=$objp->ref;
|
$product_static->ref=$objp->ref;
|
||||||
$text=$product_static->getNomUrl(1);
|
$text=$product_static->getNomUrl(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Product
|
// Product
|
||||||
if ($objp->fk_product > 0)
|
if ($objp->fk_product > 0)
|
||||||
{
|
{
|
||||||
// Define output language
|
// Define output language
|
||||||
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE))
|
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE))
|
||||||
{
|
{
|
||||||
$this->fetch_thirdparty();
|
$this->fetch_thirdparty();
|
||||||
$prod = new Product($db);
|
$prod = new Product($db);
|
||||||
$prod->fetch($objp->fk_product);
|
$prod->fetch($objp->fk_product);
|
||||||
|
|
||||||
$outputlangs = $langs;
|
$outputlangs = $langs;
|
||||||
$newlang='';
|
$newlang='';
|
||||||
if (empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id');
|
if (empty($newlang) && GETPOST('lang_id')) $newlang=GETPOST('lang_id');
|
||||||
if (empty($newlang)) $newlang=$this->client->default_lang;
|
if (empty($newlang)) $newlang=$this->client->default_lang;
|
||||||
if (! empty($newlang))
|
if (! empty($newlang))
|
||||||
{
|
{
|
||||||
$outputlangs = new Translate("",$conf);
|
$outputlangs = new Translate("",$conf);
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs->setDefaultLang($newlang);
|
||||||
}
|
}
|
||||||
|
|
||||||
$label = (! empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $objp->product_label;
|
$label = (! empty($prod->multilangs[$outputlangs->defaultlang]["label"])) ? $prod->multilangs[$outputlangs->defaultlang]["label"] : $objp->product_label;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$label = $objp->product_label;
|
$label = $objp->product_label;
|
||||||
}
|
}
|
||||||
|
|
||||||
$text.= ' - '.(! empty($objp->label)?$objp->label:$label);
|
$text.= ' - '.(! empty($objp->label)?$objp->label:$label);
|
||||||
$description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description));
|
$description=(! empty($conf->global->PRODUIT_DESC_IN_FORM)?'':dol_htmlentitiesbr($objp->description));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($objp->info_bits & 2) == 2) { ?>
|
if (($objp->info_bits & 2) == 2) { ?>
|
||||||
<a href="<?php echo DOL_URL_ROOT.'/comm/remx.php?id='.$object->id; ?>">
|
<a href="<?php echo DOL_URL_ROOT.'/comm/remx.php?id='.$object->id; ?>">
|
||||||
<?php
|
<?php
|
||||||
$txt='';
|
$txt='';
|
||||||
print img_object($langs->trans("ShowReduc"),'reduc').' ';
|
print img_object($langs->trans("ShowReduc"),'reduc').' ';
|
||||||
if ($objp->description == '(DEPOSIT)') $txt=$langs->trans("Deposit");
|
if ($objp->description == '(DEPOSIT)') $txt=$langs->trans("Deposit");
|
||||||
//else $txt=$langs->trans("Discount");
|
//else $txt=$langs->trans("Discount");
|
||||||
print $txt;
|
print $txt;
|
||||||
?>
|
?>
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<?php
|
||||||
if ($objp->description)
|
if ($objp->description)
|
||||||
{
|
{
|
||||||
if ($objp->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0)
|
if ($objp->description == '(CREDIT_NOTE)' && $objp->fk_remise_except > 0)
|
||||||
{
|
{
|
||||||
$discount=new DiscountAbsolute($db);
|
$discount=new DiscountAbsolute($db);
|
||||||
$discount->fetch($objp->fk_remise_except);
|
$discount->fetch($objp->fk_remise_except);
|
||||||
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0));
|
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromCreditNote",$discount->getNomUrl(0));
|
||||||
}
|
}
|
||||||
elseif ($objp->description == '(DEPOSIT)' && $objp->fk_remise_except > 0)
|
elseif ($objp->description == '(DEPOSIT)' && $objp->fk_remise_except > 0)
|
||||||
{
|
{
|
||||||
$discount=new DiscountAbsolute($db);
|
$discount=new DiscountAbsolute($db);
|
||||||
$discount->fetch($objp->fk_remise_except);
|
$discount->fetch($objp->fk_remise_except);
|
||||||
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0));
|
echo ($txt?' - ':'').$langs->transnoentities("DiscountFromDeposit",$discount->getNomUrl(0));
|
||||||
// Add date of deposit
|
// Add date of deposit
|
||||||
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec).')';
|
if (! empty($conf->global->INVOICE_ADD_DEPOSIT_DATE)) echo ' ('.dol_print_date($discount->datec).')';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo ($txt?' - ':'').dol_htmlentitiesbr($objp->description);
|
echo ($txt?' - ':'').dol_htmlentitiesbr($objp->description);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($objp->fk_product > 0) {
|
if ($objp->fk_product > 0) {
|
||||||
|
|
||||||
echo $form->textwithtooltip($text,$description,3,'','',$i,0,'');
|
echo $form->textwithtooltip($text,$description,3,'','',$i,0,'');
|
||||||
|
|
||||||
// Show range
|
// Show range
|
||||||
echo get_date_range($objp->date_start, $objp->date_end);
|
echo get_date_range($objp->date_start, $objp->date_end);
|
||||||
|
|
||||||
// Add description in form
|
// Add description in form
|
||||||
if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
|
if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
|
||||||
{
|
{
|
||||||
print (! empty($objp->description) && $objp->description!=$objp->product_label)?'<br>'.dol_htmlentitiesbr($objp->description):'';
|
print (! empty($objp->description) && $objp->description!=$objp->product_label)?'<br>'.dol_htmlentitiesbr($objp->description):'';
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
//if (! empty($objp->fk_parent_line)) echo img_picto('', 'rightarrow');
|
//if (! empty($objp->fk_parent_line)) echo img_picto('', 'rightarrow');
|
||||||
if ($type==1) $text = img_object($langs->trans('Service'),'service');
|
if ($type==1) $text = img_object($langs->trans('Service'),'service');
|
||||||
else $text = img_object($langs->trans('Product'),'product');
|
else $text = img_object($langs->trans('Product'),'product');
|
||||||
|
|
||||||
if (! empty($objp->label)) {
|
if (! empty($objp->label)) {
|
||||||
$text.= ' <strong>'.$objp->label.'</strong>';
|
$text.= ' <strong>'.$objp->label.'</strong>';
|
||||||
echo $form->textwithtooltip($text,dol_htmlentitiesbr($objp->description),3,'','',$i,0,'');
|
echo $form->textwithtooltip($text,dol_htmlentitiesbr($objp->description),3,'','',$i,0,'');
|
||||||
} else {
|
} else {
|
||||||
echo $text.' '.dol_htmlentitiesbr($objp->description);
|
echo $text.' '.dol_htmlentitiesbr($objp->description);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show range
|
// Show range
|
||||||
echo get_date_range($objp->date_start,$objp->date_end);
|
echo get_date_range($objp->date_start,$objp->date_end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
$prodreftxt='';
|
$prodreftxt='';
|
||||||
@ -396,16 +396,16 @@ if ($sql_select)
|
|||||||
$prodreftxt = $productstatic->getNomUrl(0);
|
$prodreftxt = $productstatic->getNomUrl(0);
|
||||||
if(!empty($objp->product_label)) $prodreftxt .= ' - '.$objp->product_label;
|
if(!empty($objp->product_label)) $prodreftxt .= ' - '.$objp->product_label;
|
||||||
}
|
}
|
||||||
// Show range
|
// Show range
|
||||||
$prodreftxt .= get_date_range($objp->date_start, $objp->date_end);
|
$prodreftxt .= get_date_range($objp->date_start, $objp->date_end);
|
||||||
// Add description in form
|
// Add description in form
|
||||||
if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
|
if (! empty($conf->global->PRODUIT_DESC_IN_FORM))
|
||||||
{
|
{
|
||||||
$prodreftxt .= (! empty($objp->description) && $objp->description!=$objp->product_label)?'<br>'.dol_htmlentitiesbr($objp->description):'';
|
$prodreftxt .= (! empty($objp->description) && $objp->description!=$objp->product_label)?'<br>'.dol_htmlentitiesbr($objp->description):'';
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
//print '<td align="left">'.$prodreftxt.'</td>';
|
//print '<td align="left">'.$prodreftxt.'</td>';
|
||||||
|
|
||||||
print '<td align="right">'.$objp->prod_qty.'</td>';
|
print '<td align="right">'.$objp->prod_qty.'</td>';
|
||||||
|
|||||||
@ -51,7 +51,7 @@ print_fiche_titre($transAreaType);
|
|||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -152,7 +152,7 @@ print '</table>';
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -60,7 +60,7 @@ $fontsizesmaller=empty($conf->browser->phone)?'11':'11';
|
|||||||
$fontlist='arial,tahoma,verdana,helvetica';
|
$fontlist='arial,tahoma,verdana,helvetica';
|
||||||
//$fontlist='Verdana,Helvetica,Arial,sans-serif';
|
//$fontlist='Verdana,Helvetica,Arial,sans-serif';
|
||||||
|
|
||||||
$path=''; // This value may be used in future for external module to overwrite theme
|
$path=''; // This value may be used in future for external module to overwrite theme
|
||||||
$theme='bureau2crea'; // Value of theme
|
$theme='bureau2crea'; // Value of theme
|
||||||
if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme=$conf->global->MAIN_OVERWRITE_THEME_RES; }
|
if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme=$conf->global->MAIN_OVERWRITE_THEME_RES; }
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,7 @@ $left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
|||||||
|
|
||||||
$path=''; // This value may be used in future for external module to overwrite theme
|
$path=''; // This value may be used in future for external module to overwrite theme
|
||||||
$theme='eldy'; // Value of theme
|
$theme='eldy'; // Value of theme
|
||||||
if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme=$conf->global->MAIN_OVERWRITE_THEME_RES; }
|
if (! empty($conf->global->MAIN_OVERWRITE_THEME_RES)) { $path='/'.$conf->global->MAIN_OVERWRITE_THEME_RES; $theme=$conf->global->MAIN_OVERWRITE_THEME_RES; }
|
||||||
|
|
||||||
// Define image path files
|
// Define image path files
|
||||||
$fontlist='arial,tahoma,verdana,helvetica'; //$fontlist='Verdana,Helvetica,Arial,sans-serif';
|
$fontlist='arial,tahoma,verdana,helvetica'; //$fontlist='Verdana,Helvetica,Arial,sans-serif';
|
||||||
|
|||||||
@ -15,14 +15,14 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Load the smartphone menu manager
|
// Load the smartphone menu manager
|
||||||
$result=@include_once DOL_DOCUMENT_ROOT ."/core/menus/smartphone/".$conf->smart_menu;
|
$result=@include_once DOL_DOCUMENT_ROOT ."/core/menus/smartphone/".$conf->smart_menu;
|
||||||
if (! $result) // If failed to include, we try with standard
|
if (! $result) // If failed to include, we try with standard
|
||||||
{
|
{
|
||||||
$conf->smart_menu='smartphone_menu.php';
|
$conf->smart_menu='smartphone_menu.php';
|
||||||
include_once DOL_DOCUMENT_ROOT ."/core/menus/smartphone/".$conf->smart_menu;
|
include_once DOL_DOCUMENT_ROOT ."/core/menus/smartphone/".$conf->smart_menu;
|
||||||
}
|
}
|
||||||
$menusmart = new MenuSmart($db, $user->societe_id?1:0);
|
$menusmart = new MenuSmart($db, $user->societe_id?1:0);
|
||||||
|
|
||||||
|
|
||||||
top_httphead();
|
top_httphead();
|
||||||
|
|||||||
@ -913,10 +913,10 @@ class User extends CommonObject
|
|||||||
$this->office_fax = $contact->fax;
|
$this->office_fax = $contact->fax;
|
||||||
$this->user_mobile = $contact->phone_mobile;
|
$this->user_mobile = $contact->phone_mobile;
|
||||||
$this->address = $contact->address;
|
$this->address = $contact->address;
|
||||||
$this->zip = $contact->zip;
|
$this->zip = $contact->zip;
|
||||||
$this->town = $contact->town;
|
$this->town = $contact->town;
|
||||||
$this->state_id = $contact->state_id;
|
$this->state_id = $contact->state_id;
|
||||||
$this->country_id = $contact->country_id;
|
$this->country_id = $contact->country_id;
|
||||||
|
|
||||||
if (empty($login)) $login=strtolower(substr($contact->firstname, 0, 4)) . strtolower(substr($contact->lastname, 0, 4));
|
if (empty($login)) $login=strtolower(substr($contact->firstname, 0, 4)) . strtolower(substr($contact->lastname, 0, 4));
|
||||||
$this->login = $login;
|
$this->login = $login;
|
||||||
@ -984,11 +984,11 @@ class User extends CommonObject
|
|||||||
$this->email = $member->email;
|
$this->email = $member->email;
|
||||||
$this->fk_member = $member->id;
|
$this->fk_member = $member->id;
|
||||||
$this->pass = $member->pass;
|
$this->pass = $member->pass;
|
||||||
$this->address = $member->address;
|
$this->address = $member->address;
|
||||||
$this->zip = $member->zip;
|
$this->zip = $member->zip;
|
||||||
$this->town = $member->town;
|
$this->town = $member->town;
|
||||||
$this->state_id = $member->state_id;
|
$this->state_id = $member->state_id;
|
||||||
$this->country_id = $member->country_id;
|
$this->country_id = $member->country_id;
|
||||||
|
|
||||||
if (empty($login)) $login=strtolower(substr($member->firstname, 0, 4)) . strtolower(substr($member->lastname, 0, 4));
|
if (empty($login)) $login=strtolower(substr($member->firstname, 0, 4)) . strtolower(substr($member->lastname, 0, 4));
|
||||||
$this->login = $login;
|
$this->login = $login;
|
||||||
@ -2108,205 +2108,205 @@ class User extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return and array with all instanciated children users of current user
|
* Return and array with all instanciated children users of current user
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function get_children()
|
function get_children()
|
||||||
{
|
{
|
||||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."user";
|
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."user";
|
||||||
$sql.= " WHERE fk_user = ".$this->id;
|
$sql.= " WHERE fk_user = ".$this->id;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::get_children result=".$result, LOG_DEBUG);
|
dol_syslog(get_class($this)."::get_children result=".$result, LOG_DEBUG);
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
if ($res)
|
if ($res)
|
||||||
{
|
{
|
||||||
$users = array ();
|
$users = array ();
|
||||||
while ($rec = $this->db->fetch_array($res))
|
while ($rec = $this->db->fetch_array($res))
|
||||||
{
|
{
|
||||||
$user = new User($this->db);
|
$user = new User($this->db);
|
||||||
$user->fetch($rec['rowid']);
|
$user->fetch($rec['rowid']);
|
||||||
$users[] = $user;
|
$users[] = $user;
|
||||||
}
|
}
|
||||||
return $users;
|
return $users;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load this->parentof that is array(id_son=>id_parent, ...)
|
* Load this->parentof that is array(id_son=>id_parent, ...)
|
||||||
*
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
private function load_parentof()
|
private function load_parentof()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->parentof=array();
|
$this->parentof=array();
|
||||||
|
|
||||||
// Load array[child]=parent
|
// Load array[child]=parent
|
||||||
$sql = "SELECT fk_user as id_parent, rowid as id_son";
|
$sql = "SELECT fk_user as id_parent, rowid as id_son";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user";
|
||||||
$sql.= " WHERE fk_user != 0";
|
$sql.= " WHERE fk_user != 0";
|
||||||
$sql.= " AND entity = ".$conf->entity;
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::load_parentof sql=".$sql);
|
dol_syslog(get_class($this)."::load_parentof sql=".$sql);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
while ($obj= $this->db->fetch_object($resql))
|
while ($obj= $this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$this->parentof[$obj->id_son]=$obj->id_parent;
|
$this->parentof[$obj->id_son]=$obj->id_parent;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reconstruit l'arborescence hierarchique des users sous la forme d'un tableau
|
* Reconstruit l'arborescence hierarchique des users sous la forme d'un tableau
|
||||||
* Renvoi un tableau de tableau('id','id_parent',...) trie selon arbre et avec:
|
* Renvoi un tableau de tableau('id','id_parent',...) trie selon arbre et avec:
|
||||||
* id = id du user
|
* id = id du user
|
||||||
* id_parent = id du user parent
|
* id_parent = id du user parent
|
||||||
* id_children = tableau des id enfant
|
* id_children = tableau des id enfant
|
||||||
* name = nom du user
|
* name = nom du user
|
||||||
* fullname = nom avec chemin complet du user
|
* fullname = nom avec chemin complet du user
|
||||||
* fullpath = chemin complet compose des id
|
* fullpath = chemin complet compose des id
|
||||||
*
|
*
|
||||||
* @param int $markafterid Removed all users including the leaf $markafterid in user tree.
|
* @param int $markafterid Removed all users including the leaf $markafterid in user tree.
|
||||||
* @return array Array of users. this->users and this->parentof are set.
|
* @return array Array of users. this->users and this->parentof are set.
|
||||||
*/
|
*/
|
||||||
function get_full_tree($markafterid=0)
|
function get_full_tree($markafterid=0)
|
||||||
{
|
{
|
||||||
$this->users = array();
|
$this->users = array();
|
||||||
|
|
||||||
// Init this->parentof that is array(id_son=>id_parent, ...)
|
// Init this->parentof that is array(id_son=>id_parent, ...)
|
||||||
$this->load_parentof();
|
$this->load_parentof();
|
||||||
|
|
||||||
// Init $this->users array
|
// Init $this->users array
|
||||||
$sql = "SELECT DISTINCT u.rowid, u.firstname, u.lastname, u.fk_user, u.login, u.statut"; // Distinct reduce pb with old tables with duplicates
|
$sql = "SELECT DISTINCT u.rowid, u.firstname, u.lastname, u.fk_user, u.login, u.statut"; // Distinct reduce pb with old tables with duplicates
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||||
$sql.= " WHERE u.entity IN (".getEntity('user',1).")";
|
$sql.= " WHERE u.entity IN (".getEntity('user',1).")";
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::get_full_tree get user list sql=".$sql, LOG_DEBUG);
|
dol_syslog(get_class($this)."::get_full_tree get user list sql=".$sql, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($obj = $this->db->fetch_object($resql))
|
while ($obj = $this->db->fetch_object($resql))
|
||||||
{
|
{
|
||||||
$this->users[$obj->rowid]['rowid'] = $obj->rowid;
|
$this->users[$obj->rowid]['rowid'] = $obj->rowid;
|
||||||
$this->users[$obj->rowid]['id'] = $obj->rowid;
|
$this->users[$obj->rowid]['id'] = $obj->rowid;
|
||||||
$this->users[$obj->rowid]['fk_user'] = $obj->fk_user;
|
$this->users[$obj->rowid]['fk_user'] = $obj->fk_user;
|
||||||
$this->users[$obj->rowid]['firstname'] = $obj->firstname;
|
$this->users[$obj->rowid]['firstname'] = $obj->firstname;
|
||||||
$this->users[$obj->rowid]['lastname'] = $obj->lastname;
|
$this->users[$obj->rowid]['lastname'] = $obj->lastname;
|
||||||
$this->users[$obj->rowid]['login'] = $obj->login;
|
$this->users[$obj->rowid]['login'] = $obj->login;
|
||||||
$this->users[$obj->rowid]['statut'] = $obj->statut;
|
$this->users[$obj->rowid]['statut'] = $obj->statut;
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We add the fullpath property to each elements of first level (no parent exists)
|
// We add the fullpath property to each elements of first level (no parent exists)
|
||||||
dol_syslog(get_class($this)."::get_full_tree call to build_path_from_id_user", LOG_DEBUG);
|
dol_syslog(get_class($this)."::get_full_tree call to build_path_from_id_user", LOG_DEBUG);
|
||||||
foreach($this->users as $key => $val)
|
foreach($this->users as $key => $val)
|
||||||
{
|
{
|
||||||
$this->build_path_from_id_user($key,0); // Process a branch from the root user key (this user has no parent)
|
$this->build_path_from_id_user($key,0); // Process a branch from the root user key (this user has no parent)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exclude leaf including $markafterid from tree
|
// Exclude leaf including $markafterid from tree
|
||||||
if ($markafterid)
|
if ($markafterid)
|
||||||
{
|
{
|
||||||
//print "Look to discard user ".$markafterid."\n";
|
//print "Look to discard user ".$markafterid."\n";
|
||||||
$keyfilter1='^'.$markafterid.'$';
|
$keyfilter1='^'.$markafterid.'$';
|
||||||
$keyfilter2='_'.$markafterid.'$';
|
$keyfilter2='_'.$markafterid.'$';
|
||||||
$keyfilter3='^'.$markafterid.'_';
|
$keyfilter3='^'.$markafterid.'_';
|
||||||
$keyfilter4='_'.$markafterid.'_';
|
$keyfilter4='_'.$markafterid.'_';
|
||||||
foreach($this->users as $key => $val)
|
foreach($this->users as $key => $val)
|
||||||
{
|
{
|
||||||
if (preg_match('/'.$keyfilter1.'/',$val['fullpath']) || preg_match('/'.$keyfilter2.'/',$val['fullpath'])
|
if (preg_match('/'.$keyfilter1.'/',$val['fullpath']) || preg_match('/'.$keyfilter2.'/',$val['fullpath'])
|
||||||
|| preg_match('/'.$keyfilter3.'/',$val['fullpath']) || preg_match('/'.$keyfilter4.'/',$val['fullpath']))
|
|| preg_match('/'.$keyfilter3.'/',$val['fullpath']) || preg_match('/'.$keyfilter4.'/',$val['fullpath']))
|
||||||
{
|
{
|
||||||
unset($this->users[$key]);
|
unset($this->users[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::get_full_tree dol_sort_array", LOG_DEBUG);
|
dol_syslog(get_class($this)."::get_full_tree dol_sort_array", LOG_DEBUG);
|
||||||
$this->users=dol_sort_array($this->users, 'fullname', 'asc', true, false);
|
$this->users=dol_sort_array($this->users, 'fullname', 'asc', true, false);
|
||||||
|
|
||||||
//$this->debug_users();
|
//$this->debug_users();
|
||||||
|
|
||||||
return $this->users;
|
return $this->users;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For user id_user and its childs available in this->users, define property fullpath and fullname
|
* For user id_user and its childs available in this->users, define property fullpath and fullname
|
||||||
*
|
*
|
||||||
* @param int $id_user id_user entry to update
|
* @param int $id_user id_user entry to update
|
||||||
* @param int $protection Deep counter to avoid infinite loop
|
* @param int $protection Deep counter to avoid infinite loop
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function build_path_from_id_user($id_user,$protection=1000)
|
function build_path_from_id_user($id_user,$protection=1000)
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::build_path_from_id_user id_user=".$id_user." protection=".$protection, LOG_DEBUG);
|
dol_syslog(get_class($this)."::build_path_from_id_user id_user=".$id_user." protection=".$protection, LOG_DEBUG);
|
||||||
|
|
||||||
if (! empty($this->users[$id_user]['fullpath']))
|
if (! empty($this->users[$id_user]['fullpath']))
|
||||||
{
|
{
|
||||||
// Already defined
|
// Already defined
|
||||||
dol_syslog(get_class($this)."::build_path_from_id_user fullpath and fullname already defined", LOG_WARNING);
|
dol_syslog(get_class($this)."::build_path_from_id_user fullpath and fullname already defined", LOG_WARNING);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define fullpath and fullname
|
// Define fullpath and fullname
|
||||||
$this->users[$id_user]['fullpath'] = '_'.$id_user;
|
$this->users[$id_user]['fullpath'] = '_'.$id_user;
|
||||||
$this->users[$id_user]['fullname'] = $this->users[$id_user]['label'];
|
$this->users[$id_user]['fullname'] = $this->users[$id_user]['label'];
|
||||||
$i=0; $cursor_user=$id_user;
|
$i=0; $cursor_user=$id_user;
|
||||||
|
|
||||||
while ((empty($protection) || $i < $protection) && ! empty($this->parentof[$cursor_user]))
|
while ((empty($protection) || $i < $protection) && ! empty($this->parentof[$cursor_user]))
|
||||||
{
|
{
|
||||||
$this->users[$id_user]['fullpath'] = '_'.$this->parentof[$cursor_user].$this->users[$id_user]['fullpath'];
|
$this->users[$id_user]['fullpath'] = '_'.$this->parentof[$cursor_user].$this->users[$id_user]['fullpath'];
|
||||||
$this->users[$id_user]['fullname'] = $this->users[$this->parentof[$cursor_user]]['label'].' >> '.$this->users[$id_user]['fullname'];
|
$this->users[$id_user]['fullname'] = $this->users[$this->parentof[$cursor_user]]['label'].' >> '.$this->users[$id_user]['fullname'];
|
||||||
$i++; $cursor_user=$this->parentof[$cursor_user];
|
$i++; $cursor_user=$this->parentof[$cursor_user];
|
||||||
}
|
}
|
||||||
|
|
||||||
// We count number of _ to have level
|
// We count number of _ to have level
|
||||||
$this->users[$id_user]['level']=dol_strlen(preg_replace('/[^_]/i','',$this->users[$id_user]['fullpath']));
|
$this->users[$id_user]['level']=dol_strlen(preg_replace('/[^_]/i','',$this->users[$id_user]['fullpath']));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Affiche contenu de $this->users
|
* Affiche contenu de $this->users
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function debug_users()
|
function debug_users()
|
||||||
{
|
{
|
||||||
// Affiche $this->users
|
// Affiche $this->users
|
||||||
foreach($this->users as $key => $val)
|
foreach($this->users as $key => $val)
|
||||||
{
|
{
|
||||||
print 'id: '.$this->users[$key]['id'];
|
print 'id: '.$this->users[$key]['id'];
|
||||||
print ' name: '.$this->users[$key]['name'];
|
print ' name: '.$this->users[$key]['name'];
|
||||||
print ' parent: '.$this->users[$key]['fk_user'];
|
print ' parent: '.$this->users[$key]['fk_user'];
|
||||||
print ' fullpath: '.$this->users[$key]['fullpath'];
|
print ' fullpath: '.$this->users[$key]['fullpath'];
|
||||||
print ' fullname: '.$this->users[$key]['fullname'];
|
print ' fullname: '.$this->users[$key]['fullname'];
|
||||||
print "<br>\n";
|
print "<br>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -682,7 +682,7 @@ if (($action == 'create') || ($action == 'adduserldap'))
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print dol_set_focus('#lastname');
|
print dol_set_focus('#lastname');
|
||||||
|
|
||||||
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST" name="createuser">';
|
print '<form action="'.$_SERVER['PHP_SELF'].'" method="POST" name="createuser">';
|
||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
@ -1199,18 +1199,18 @@ else
|
|||||||
print '<tr><td valign="top">'.$langs->trans('Signature').'</td><td>';
|
print '<tr><td valign="top">'.$langs->trans('Signature').'</td><td>';
|
||||||
print dol_htmlentitiesbr($object->signature);
|
print dol_htmlentitiesbr($object->signature);
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
|
||||||
// Hierarchy
|
// Hierarchy
|
||||||
print '<tr><td valign="top">'.$langs->trans("HierarchicalResponsible").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if (empty($object->fk_user)) print $langs->trans("None");
|
if (empty($object->fk_user)) print $langs->trans("None");
|
||||||
else {
|
else {
|
||||||
$huser=new User($db);
|
$huser=new User($db);
|
||||||
$huser->fetch($object->fk_user);
|
$huser->fetch($object->fk_user);
|
||||||
print $huser->getNomUrl(1);
|
print $huser->getNomUrl(1);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
||||||
@ -1283,22 +1283,22 @@ else
|
|||||||
print '</tr>'."\n";
|
print '</tr>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Multicompany
|
// Multicompany
|
||||||
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
if (! empty($conf->multicompany->enabled) && empty($conf->multicompany->transverse_mode) && $conf->entity == 1 && $user->admin && ! $user->entity)
|
||||||
{
|
{
|
||||||
print '<tr><td valign="top">'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
|
print '<tr><td valign="top">'.$langs->trans("Entity").'</td><td width="75%" class="valeur">';
|
||||||
if ($object->admin && ! $object->entity)
|
if ($object->admin && ! $object->entity)
|
||||||
{
|
{
|
||||||
print $langs->trans("AllEntities");
|
print $langs->trans("AllEntities");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$mc->getInfo($object->entity);
|
$mc->getInfo($object->entity);
|
||||||
print $mc->label;
|
print $mc->label;
|
||||||
}
|
}
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters=array('colspan' => ' colspan="2"');
|
$parameters=array('colspan' => ' colspan="2"');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||||
@ -1814,7 +1814,7 @@ else
|
|||||||
print dol_htmlentitiesbr($object->signature);
|
print dol_htmlentitiesbr($object->signature);
|
||||||
}
|
}
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// openid
|
// openid
|
||||||
if (isset($conf->authmode) && preg_match('/myopenid/',$conf->authmode))
|
if (isset($conf->authmode) && preg_match('/myopenid/',$conf->authmode))
|
||||||
{
|
{
|
||||||
@ -1832,10 +1832,10 @@ else
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Hierarchy
|
// Hierarchy
|
||||||
print '<tr><td valign="top">'.$langs->trans("HierarchicalResponsible").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("HierarchicalResponsible").'</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($caneditfield)
|
if ($caneditfield)
|
||||||
{
|
{
|
||||||
print $form->select_dolusers($object->fk_user,'fk_user',1,array($object->id),0,'',0,$object->entity);
|
print $form->select_dolusers($object->fk_user,'fk_user',1,array($object->id),0,'',0,$object->entity);
|
||||||
}
|
}
|
||||||
@ -1845,9 +1845,9 @@ else
|
|||||||
$huser=new User($db);
|
$huser=new User($db);
|
||||||
$huser->fetch($object->fk_user);
|
$huser->fetch($object->fk_user);
|
||||||
print $huser->getNomUrl(1);
|
print $huser->getNomUrl(1);
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
// Status
|
// Status
|
||||||
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
print '<tr><td valign="top">'.$langs->trans("Status").'</td>';
|
||||||
|
|||||||
@ -26,12 +26,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require '../main.inc.php';
|
require '../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/treeview.lib.php';
|
||||||
|
|
||||||
if (! $user->rights->user->user->lire && ! $user->admin)
|
if (! $user->rights->user->user->lire && ! $user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$langs->load("users");
|
$langs->load("users");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
// Security check (for external users)
|
// Security check (for external users)
|
||||||
@ -53,12 +53,12 @@ $companystatic = new Societe($db);
|
|||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
|
|
||||||
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
$arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
|
||||||
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
|
$arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
|
||||||
|
|
||||||
llxHeader('',$langs->trans("ListOfUsers"). ' ('.$langs->trans("HierarchicView").')','','',0,0,$arrayofjs,$arrayofcss);
|
llxHeader('',$langs->trans("ListOfUsers"). ' ('.$langs->trans("HierarchicView").')','','',0,0,$arrayofjs,$arrayofcss);
|
||||||
|
|
||||||
print_fiche_titre($langs->trans("ListOfUsers"). ' ('.$langs->trans("HierarchicView").')', '<form action="'.DOL_URL_ROOT.'/user/index.php" method="POST"><input type="submit" class="button" style="width:120px" name="viewcal" value="'.dol_escape_htmltag($langs->trans("ViewList")).'"></form>');
|
print_fiche_titre($langs->trans("ListOfUsers"). ' ('.$langs->trans("HierarchicView").')', '<form action="'.DOL_URL_ROOT.'/user/index.php" method="POST"><input type="submit" class="button" style="width:120px" name="viewcal" value="'.dol_escape_htmltag($langs->trans("ViewList")).'"></form>');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -67,51 +67,51 @@ $user_arbo = $userstatic->get_full_tree();
|
|||||||
|
|
||||||
// Define fulltree array
|
// Define fulltree array
|
||||||
$fulltree=$user_arbo;
|
$fulltree=$user_arbo;
|
||||||
|
|
||||||
// Define data (format for treeview)
|
// Define data (format for treeview)
|
||||||
$data=array();
|
$data=array();
|
||||||
$data[] = array('rowid'=>0,'fk_menu'=>-1,'title'=>"racine",'mainmenu'=>'','leftmenu'=>'','fk_mainmenu'=>'','fk_leftmenu'=>'');
|
$data[] = array('rowid'=>0,'fk_menu'=>-1,'title'=>"racine",'mainmenu'=>'','leftmenu'=>'','fk_mainmenu'=>'','fk_leftmenu'=>'');
|
||||||
foreach($fulltree as $key => $val)
|
foreach($fulltree as $key => $val)
|
||||||
{
|
{
|
||||||
$userstatic->id=$val['id'];
|
$userstatic->id=$val['id'];
|
||||||
$userstatic->ref=$val['label'];
|
$userstatic->ref=$val['label'];
|
||||||
$userstatic->firstname=$val['firstname'];
|
$userstatic->firstname=$val['firstname'];
|
||||||
$userstatic->lastname=$val['name'];
|
$userstatic->lastname=$val['name'];
|
||||||
$userstatic->statut=$val['statut'];
|
$userstatic->statut=$val['statut'];
|
||||||
$li=$userstatic->getNomUrl(1,'').' ('.$val['login'].')';
|
$li=$userstatic->getNomUrl(1,'').' ('.$val['login'].')';
|
||||||
|
|
||||||
$data[] = array(
|
$data[] = array(
|
||||||
'rowid'=>$val['rowid'],
|
'rowid'=>$val['rowid'],
|
||||||
'fk_menu'=>$val['fk_user'],
|
'fk_menu'=>$val['fk_user'],
|
||||||
'entry'=>'<table class="nobordernopadding centpercent"><tr><td>'.$li.'</td><td align="right">'.$userstatic->getLibStatut(5).'</td></tr></table>'
|
'entry'=>'<table class="nobordernopadding centpercent"><tr><td>'.$li.'</td><td align="right">'.$userstatic->getLibStatut(5).'</td></tr></table>'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '<table class="liste" width="100%">';
|
print '<table class="liste" width="100%">';
|
||||||
print '<tr class="liste_titre"><td>'.$langs->trans("HierarchicView").'</td><td></td><td align="right"><div id="iddivjstreecontrol"><a href="#">'.img_picto('','object_category').' '.$langs->trans("UndoExpandAll").'</a>';
|
print '<tr class="liste_titre"><td>'.$langs->trans("HierarchicView").'</td><td></td><td align="right"><div id="iddivjstreecontrol"><a href="#">'.img_picto('','object_category').' '.$langs->trans("UndoExpandAll").'</a>';
|
||||||
print ' | <a href="#">'.img_picto('','object_category-expanded').' '.$langs->trans("ExpandAll").'</a></div></td></tr>';
|
print ' | <a href="#">'.img_picto('','object_category-expanded').' '.$langs->trans("ExpandAll").'</a></div></td></tr>';
|
||||||
|
|
||||||
$nbofentries=(count($data) - 1);
|
$nbofentries=(count($data) - 1);
|
||||||
|
|
||||||
if ($nbofentries > 0)
|
if ($nbofentries > 0)
|
||||||
{
|
{
|
||||||
print '<tr '.$bc[true].'><td colspan="3">';
|
print '<tr '.$bc[true].'><td colspan="3">';
|
||||||
tree_recur($data,$data[0],0);
|
tree_recur($data,$data[0],0);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr '.$bc[true].'>';
|
print '<tr '.$bc[true].'>';
|
||||||
print '<td colspan="3"><table class="nobordernopadding"><tr class="nobordernopadding"><td>'.img_picto_common('','treemenu/branchbottom.gif').'</td>';
|
print '<td colspan="3"><table class="nobordernopadding"><tr class="nobordernopadding"><td>'.img_picto_common('','treemenu/branchbottom.gif').'</td>';
|
||||||
print '<td valign="middle">';
|
print '<td valign="middle">';
|
||||||
print $langs->trans("NoCategoryYet");
|
print $langs->trans("NoCategoryYet");
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td> </td>';
|
print '<td> </td>';
|
||||||
print '</table></td>';
|
print '</table></td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -58,7 +58,7 @@ print_fiche_titre($langs->trans("MenuUsersAndGroups"));
|
|||||||
|
|
||||||
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
//print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||||
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
//print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
// Search User
|
// Search User
|
||||||
@ -90,7 +90,7 @@ if ($canreadperms)
|
|||||||
|
|
||||||
|
|
||||||
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -254,7 +254,7 @@ if ($canreadperms)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '<div></div></div>';
|
print '<div></div></div>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@ -398,7 +398,7 @@ function getInvoicesForThirdParty($authentication,$idthirdparty)
|
|||||||
//$sql.=" WHERE f.fk_soc = s.rowid AND nom = '".$db->escape($idthirdparty)."'";
|
//$sql.=" WHERE f.fk_soc = s.rowid AND nom = '".$db->escape($idthirdparty)."'";
|
||||||
//$sql.=" WHERE f.fk_soc = s.rowid AND nom = '".$db->escape($idthirdparty)."'";
|
//$sql.=" WHERE f.fk_soc = s.rowid AND nom = '".$db->escape($idthirdparty)."'";
|
||||||
$sql.=" WHERE f.entity = ".$conf->entity;
|
$sql.=" WHERE f.entity = ".$conf->entity;
|
||||||
if ($idthirdparty != 'all' ) $sql.=" AND f.fk_soc = ".$db->escape($idthirdparty);
|
if ($idthirdparty != 'all' ) $sql.=" AND f.fk_soc = ".$db->escape($idthirdparty);
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
@ -413,11 +413,11 @@ function getInvoicesForThirdParty($authentication,$idthirdparty)
|
|||||||
$invoice=new Facture($db);
|
$invoice=new Facture($db);
|
||||||
$invoice->fetch($obj->facid);
|
$invoice->fetch($obj->facid);
|
||||||
|
|
||||||
// Sécurité pour utilisateur externe
|
// Sécurité pour utilisateur externe
|
||||||
if( $socid && ( $socid != $order->socid) )
|
if( $socid && ( $socid != $order->socid) )
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
$errorcode='PERMISSION_DENIED'; $errorlabel=$order->socid.' User does not have permission for this request';
|
$errorcode='PERMISSION_DENIED'; $errorlabel=$order->socid.' User does not have permission for this request';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Define lines of invoice
|
// Define lines of invoice
|
||||||
|
|||||||
@ -71,18 +71,18 @@ $server->wsdl->addComplexType(
|
|||||||
'entity' => array('name'=>'entity','type'=>'xsd:string')
|
'entity' => array('name'=>'entity','type'=>'xsd:string')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
// Define WSDL Return object
|
// Define WSDL Return object
|
||||||
$server->wsdl->addComplexType(
|
$server->wsdl->addComplexType(
|
||||||
'result',
|
'result',
|
||||||
'complexType',
|
'complexType',
|
||||||
'struct',
|
'struct',
|
||||||
'all',
|
'all',
|
||||||
'',
|
'',
|
||||||
array(
|
array(
|
||||||
'result_code' => array('name'=>'result_code','type'=>'xsd:string'),
|
'result_code' => array('name'=>'result_code','type'=>'xsd:string'),
|
||||||
'result_label' => array('name'=>'result_label','type'=>'xsd:string'),
|
'result_label' => array('name'=>'result_label','type'=>'xsd:string'),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Define other specific objects
|
// Define other specific objects
|
||||||
$server->wsdl->addComplexType(
|
$server->wsdl->addComplexType(
|
||||||
@ -389,9 +389,9 @@ function getOrder($authentication,$id='',$ref='',$ref_ext='')
|
|||||||
'project_id' => $order->fk_project,
|
'project_id' => $order->fk_project,
|
||||||
|
|
||||||
'date' => $order->date_commande?dol_print_date($order->date_commande,'dayrfc'):'',
|
'date' => $order->date_commande?dol_print_date($order->date_commande,'dayrfc'):'',
|
||||||
'date_creation' => $invoice->date_creation?dol_print_date($invoice->date_creation,'dayhourrfc'):'',
|
'date_creation' => $invoice->date_creation?dol_print_date($invoice->date_creation,'dayhourrfc'):'',
|
||||||
'date_validation' => $invoice->date_validation?dol_print_date($invoice->date_creation,'dayhourrfc'):'',
|
'date_validation' => $invoice->date_validation?dol_print_date($invoice->date_creation,'dayhourrfc'):'',
|
||||||
'date_modification' => $invoice->datem?dol_print_date($invoice->datem,'dayhourrfc'):'',
|
'date_modification' => $invoice->datem?dol_print_date($invoice->datem,'dayhourrfc'):'',
|
||||||
|
|
||||||
'remise' => $order->remise,
|
'remise' => $order->remise,
|
||||||
'remise_percent' => $order->remise_percent,
|
'remise_percent' => $order->remise_percent,
|
||||||
@ -406,7 +406,7 @@ function getOrder($authentication,$id='',$ref='',$ref_ext='')
|
|||||||
'cond_reglement' => $order->cond_reglement,
|
'cond_reglement' => $order->cond_reglement,
|
||||||
'mode_reglement_id' => $order->mode_reglement_id,
|
'mode_reglement_id' => $order->mode_reglement_id,
|
||||||
'mode_reglement_code' => $order->mode_reglement_code,
|
'mode_reglement_code' => $order->mode_reglement_code,
|
||||||
'mode_reglement' => $order->mode_reglement,
|
'mode_reglement' => $order->mode_reglement,
|
||||||
|
|
||||||
'date_livraison' => $order->date_livraison,
|
'date_livraison' => $order->date_livraison,
|
||||||
'fk_delivery_address' => $order->fk_delivery_address,
|
'fk_delivery_address' => $order->fk_delivery_address,
|
||||||
@ -674,13 +674,13 @@ function createOrder($authentication,$order)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($newobject->statut == 1) // We want order validated
|
if ($newobject->statut == 1) // We want order validated
|
||||||
{
|
{
|
||||||
$result=$newobject->validate($fuser);
|
$result=$newobject->validate($fuser);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
|
|||||||
@ -145,12 +145,12 @@ $server->wsdl->addComplexType(
|
|||||||
'sequence',
|
'sequence',
|
||||||
'',
|
'',
|
||||||
array(
|
array(
|
||||||
'image' => array(
|
'image' => array(
|
||||||
'name' => 'image',
|
'name' => 'image',
|
||||||
'type' => 'tns:image',
|
'type' => 'tns:image',
|
||||||
'minOccurs' => '0',
|
'minOccurs' => '0',
|
||||||
'maxOccurs' => 'unbounded'
|
'maxOccurs' => 'unbounded'
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -31,33 +31,33 @@ if (! defined('NOLOGIN')) define('NOLOGIN','1');
|
|||||||
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1');
|
||||||
|
|
||||||
|
|
||||||
$sapi_type = php_sapi_name();
|
$sapi_type = php_sapi_name();
|
||||||
$script_file = basename(__FILE__);
|
$script_file = basename(__FILE__);
|
||||||
$path=dirname(__FILE__).'/';
|
$path=dirname(__FILE__).'/';
|
||||||
|
|
||||||
// Test if batch mode
|
// Test if batch mode
|
||||||
if (substr($sapi_type, 0, 3) == 'cgi') {
|
if (substr($sapi_type, 0, 3) == 'cgi') {
|
||||||
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
echo "Error: You are using PHP for CGI. To execute ".$script_file." from command line, you must use PHP for CLI mode.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! isset($argv[1]) || ! $argv[1]) {
|
if (! isset($argv[1]) || ! $argv[1]) {
|
||||||
print "Usage: ".$script_file." securitykey userlogin cronjobid(optional)\n";
|
print "Usage: ".$script_file." securitykey userlogin cronjobid(optional)\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$key=$argv[1];
|
$key=$argv[1];
|
||||||
|
|
||||||
|
if (! isset($argv[2]) || ! $argv[2]) {
|
||||||
|
print "Usage: ".$script_file." securitykey userlogin cronjobid(optional)\n";
|
||||||
|
exit;
|
||||||
|
} else {
|
||||||
|
$userlogin=$argv[2];
|
||||||
|
}
|
||||||
|
|
||||||
if (! isset($argv[2]) || ! $argv[2]) {
|
|
||||||
print "Usage: ".$script_file." securitykey userlogin cronjobid(optional)\n";
|
|
||||||
exit;
|
|
||||||
} else {
|
|
||||||
$userlogin=$argv[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once ($path."../../htdocs/master.inc.php");
|
require_once ($path."../../htdocs/master.inc.php");
|
||||||
require_once (DOL_DOCUMENT_ROOT."/cron/class/cronjob.class.php");
|
require_once (DOL_DOCUMENT_ROOT."/cron/class/cronjob.class.php");
|
||||||
require_once (DOL_DOCUMENT_ROOT.'/user/class/user.class.php');
|
require_once (DOL_DOCUMENT_ROOT.'/user/class/user.class.php');
|
||||||
require_once (DOL_DOCUMENT_ROOT."/cron/class/cronjob.class.php");
|
require_once (DOL_DOCUMENT_ROOT."/cron/class/cronjob.class.php");
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -44,7 +44,7 @@ if (! isset($argv[1]) || ! $argv[1] || ! in_array($argv[1],array('test','confirm
|
|||||||
print "If you add a delay (nb of days), only invoice with due date < today + delay are included.\n";
|
print "If you add a delay (nb of days), only invoice with due date < today + delay are included.\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$mode=$argv[1];
|
$mode=$argv[1];
|
||||||
|
|
||||||
|
|
||||||
require($path."../../htdocs/master.inc.php");
|
require($path."../../htdocs/master.inc.php");
|
||||||
@ -60,7 +60,7 @@ $now=dol_now('tzserver');
|
|||||||
$duration_value=$argv[2];
|
$duration_value=$argv[2];
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
print $script_file." launched with mode ".$mode.($duration_value?" delay=".$duration_value:"")."\n";
|
print $script_file." launched with mode ".$mode.($duration_value?" delay=".$duration_value:"")."\n";
|
||||||
|
|
||||||
$sql = "SELECT f.facnumber, f.total_ttc, s.nom as name, u.rowid as uid, u.lastname, u.firstname, u.email, u.lang";
|
$sql = "SELECT f.facnumber, f.total_ttc, s.nom as name, u.rowid as uid, u.lastname, u.firstname, u.email, u.lang";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f";
|
||||||
@ -155,8 +155,8 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang)
|
|||||||
|
|
||||||
$newlangs=new Translate('',$conf);
|
$newlangs=new Translate('',$conf);
|
||||||
$newlangs->setDefaultLang($userlang);
|
$newlangs->setDefaultLang($userlang);
|
||||||
$newlangs->load("main");
|
$newlangs->load("main");
|
||||||
$newlangs->load("bills");
|
$newlangs->load("bills");
|
||||||
|
|
||||||
$subject = "[".(empty($conf->global->MAIN_APPLICATION_TITLE)?'Dolibarr':$conf->global->MAIN_APPLICATION_TITLE)."] ".$newlangs->trans("ListOfYourUnpaidInvoices");
|
$subject = "[".(empty($conf->global->MAIN_APPLICATION_TITLE)?'Dolibarr':$conf->global->MAIN_APPLICATION_TITLE)."] ".$newlangs->trans("ListOfYourUnpaidInvoices");
|
||||||
$sendto = $oldemail;
|
$sendto = $oldemail;
|
||||||
@ -168,8 +168,8 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang)
|
|||||||
dol_syslog("email_unpaid_invoices_to_representatives.php: send mail to ".$oldemail);
|
dol_syslog("email_unpaid_invoices_to_representatives.php: send mail to ".$oldemail);
|
||||||
|
|
||||||
$usehtml=0;
|
$usehtml=0;
|
||||||
if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_FOOTER)) $usehtml+=1;
|
if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_FOOTER)) $usehtml+=1;
|
||||||
if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_HEADER)) $usehtml+=1;
|
if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_HEADER)) $usehtml+=1;
|
||||||
|
|
||||||
$allmessage='';
|
$allmessage='';
|
||||||
if (! empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_HEADER))
|
if (! empty($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_HEADER))
|
||||||
@ -188,7 +188,7 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang)
|
|||||||
{
|
{
|
||||||
$allmessage.=$conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_FOOTER;
|
$allmessage.=$conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_FOOTER;
|
||||||
if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_FOOTER)) $usehtml+=1;
|
if (dol_textishtml($conf->global->SCRIPT_EMAIL_UNPAID_INVOICES_FOOTER)) $usehtml+=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$mail = new CMailFile(
|
$mail = new CMailFile(
|
||||||
$subject,
|
$subject,
|
||||||
@ -207,8 +207,8 @@ function envoi_mail($mode,$oldemail,$message,$total,$userlang)
|
|||||||
$mail->errors_to = $errorsto;
|
$mail->errors_to = $errorsto;
|
||||||
|
|
||||||
// Send or not email
|
// Send or not email
|
||||||
if ($mode == 'confirm')
|
if ($mode == 'confirm')
|
||||||
{
|
{
|
||||||
$result=$mail->sendfile();
|
$result=$mail->sendfile();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -137,8 +137,8 @@ class AllTests
|
|||||||
$suite->addTestSuite('CompanyBankAccountTest');
|
$suite->addTestSuite('CompanyBankAccountTest');
|
||||||
require_once dirname(__FILE__).'/ChargeSocialesTest.php';
|
require_once dirname(__FILE__).'/ChargeSocialesTest.php';
|
||||||
$suite->addTestSuite('ChargeSocialesTest');
|
$suite->addTestSuite('ChargeSocialesTest');
|
||||||
require_once dirname(__FILE__).'/HolidayTest.php';
|
require_once dirname(__FILE__).'/HolidayTest.php';
|
||||||
$suite->addTestSuite('HolidayTest');
|
$suite->addTestSuite('HolidayTest');
|
||||||
|
|
||||||
require_once dirname(__FILE__).'/CategorieTest.php';
|
require_once dirname(__FILE__).'/CategorieTest.php';
|
||||||
$suite->addTestSuite('CategorieTest');
|
$suite->addTestSuite('CategorieTest');
|
||||||
@ -147,12 +147,12 @@ class AllTests
|
|||||||
$suite->addTestSuite('WebservicesInvoicesTest');
|
$suite->addTestSuite('WebservicesInvoicesTest');
|
||||||
require_once dirname(__FILE__).'/WebservicesOrdersTest.php';
|
require_once dirname(__FILE__).'/WebservicesOrdersTest.php';
|
||||||
$suite->addTestSuite('WebservicesOrdersTest');
|
$suite->addTestSuite('WebservicesOrdersTest');
|
||||||
require_once dirname(__FILE__).'/WebservicesOtherTest.php';
|
require_once dirname(__FILE__).'/WebservicesOtherTest.php';
|
||||||
$suite->addTestSuite('WebservicesOtherTest');
|
$suite->addTestSuite('WebservicesOtherTest');
|
||||||
require_once dirname(__FILE__).'/WebservicesThirdpartyTest.php';
|
require_once dirname(__FILE__).'/WebservicesThirdpartyTest.php';
|
||||||
$suite->addTestSuite('WebservicesThirdpartyTest');
|
$suite->addTestSuite('WebservicesThirdpartyTest');
|
||||||
require_once dirname(__FILE__).'/WebservicesUserTest.php';
|
require_once dirname(__FILE__).'/WebservicesUserTest.php';
|
||||||
$suite->addTestSuite('WebservicesUserTest');
|
$suite->addTestSuite('WebservicesUserTest');
|
||||||
|
|
||||||
require_once dirname(__FILE__).'/ExportTest.php';
|
require_once dirname(__FILE__).'/ExportTest.php';
|
||||||
$suite->addTestSuite('ExportTest');
|
$suite->addTestSuite('ExportTest');
|
||||||
|
|||||||
@ -30,10 +30,10 @@ require_once dirname(__FILE__).'/../../htdocs/master.inc.php';
|
|||||||
require_once dirname(__FILE__).'/../../htdocs/contact/class/contact.class.php';
|
require_once dirname(__FILE__).'/../../htdocs/contact/class/contact.class.php';
|
||||||
$langs->load("dict");
|
$langs->load("dict");
|
||||||
|
|
||||||
if ($langs->defaultlang != 'en_US')
|
if ($langs->defaultlang != 'en_US')
|
||||||
{
|
{
|
||||||
print "Error: Default language for company to run tests must be set to en_US or auto. Current is ".$langs->defaultlang."\n";
|
print "Error: Default language for company to run tests must be set to en_US or auto. Current is ".$langs->defaultlang."\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($user->id))
|
if (empty($user->id))
|
||||||
|
|||||||
@ -126,10 +126,10 @@ class CoreTest extends PHPUnit_Framework_TestCase
|
|||||||
global $dolibarr_main_prod;
|
global $dolibarr_main_prod;
|
||||||
|
|
||||||
global $dolibarr_main_url_root;
|
global $dolibarr_main_url_root;
|
||||||
global $dolibarr_main_data_root;
|
global $dolibarr_main_data_root;
|
||||||
global $dolibarr_main_document_root;
|
global $dolibarr_main_document_root;
|
||||||
global $dolibarr_main_data_root_alt;
|
global $dolibarr_main_data_root_alt;
|
||||||
global $dolibarr_main_document_root_alt;
|
global $dolibarr_main_document_root_alt;
|
||||||
global $dolibarr_main_db_host;
|
global $dolibarr_main_db_host;
|
||||||
global $dolibarr_main_db_port;
|
global $dolibarr_main_db_port;
|
||||||
global $dolibarr_main_db_type;
|
global $dolibarr_main_db_type;
|
||||||
|
|||||||
@ -116,63 +116,63 @@ class WebservicesInvoicesTest extends PHPUnit_Framework_TestCase
|
|||||||
print __METHOD__."\n";
|
print __METHOD__."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* testWSInvoices_xxx
|
* testWSInvoices_xxx
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
public function testWSInvoices_xxx()
|
public function testWSInvoices_xxx()
|
||||||
{
|
{
|
||||||
global $conf,$user,$langs,$db;
|
global $conf,$user,$langs,$db;
|
||||||
$conf=$this->savconf;
|
$conf=$this->savconf;
|
||||||
$user=$this->savuser;
|
$user=$this->savuser;
|
||||||
$langs=$this->savlangs;
|
$langs=$this->savlangs;
|
||||||
$db=$this->savdb;
|
$db=$this->savdb;
|
||||||
|
|
||||||
$WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php';
|
$WS_DOL_URL = DOL_MAIN_URL_ROOT.'/webservices/server_invoice.php';
|
||||||
$WS_METHOD = 'xxx';
|
$WS_METHOD = 'xxx';
|
||||||
$ns='http://www.dolibarr.org/ns/';
|
$ns='http://www.dolibarr.org/ns/';
|
||||||
|
|
||||||
// Set the WebService URL
|
// Set the WebService URL
|
||||||
print __METHOD__."Create nusoap_client for URL=".$WS_DOL_URL."\n";
|
print __METHOD__."Create nusoap_client for URL=".$WS_DOL_URL."\n";
|
||||||
$soapclient = new nusoap_client($WS_DOL_URL);
|
$soapclient = new nusoap_client($WS_DOL_URL);
|
||||||
if ($soapclient)
|
if ($soapclient)
|
||||||
{
|
{
|
||||||
$soapclient->soap_defencoding='UTF-8';
|
$soapclient->soap_defencoding='UTF-8';
|
||||||
$soapclient->decodeUTF8(false);
|
$soapclient->decodeUTF8(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call the WebService method and store its result in $result.
|
// Call the WebService method and store its result in $result.
|
||||||
$authentication=array(
|
$authentication=array(
|
||||||
'dolibarrkey'=>$conf->global->WEBSERVICES_KEY,
|
'dolibarrkey'=>$conf->global->WEBSERVICES_KEY,
|
||||||
'sourceapplication'=>'DEMO',
|
'sourceapplication'=>'DEMO',
|
||||||
'login'=>'admin',
|
'login'=>'admin',
|
||||||
'password'=>'admin',
|
'password'=>'admin',
|
||||||
'entity'=>'');
|
'entity'=>'');
|
||||||
|
|
||||||
// Test URL
|
// Test URL
|
||||||
if ($WS_METHOD)
|
if ($WS_METHOD)
|
||||||
{
|
{
|
||||||
$parameters = array('authentication'=>$authentication);
|
$parameters = array('authentication'=>$authentication);
|
||||||
print __METHOD__."Call method ".$WS_METHOD."\n";
|
print __METHOD__."Call method ".$WS_METHOD."\n";
|
||||||
$result = $soapclient->call($WS_METHOD,$parameters,$ns,'');
|
$result = $soapclient->call($WS_METHOD,$parameters,$ns,'');
|
||||||
if (! $result)
|
if (! $result)
|
||||||
{
|
{
|
||||||
//var_dump($soapclient);
|
//var_dump($soapclient);
|
||||||
print $soapclient->error_str;
|
print $soapclient->error_str;
|
||||||
print "<br>\n\n";
|
print "<br>\n\n";
|
||||||
print $soapclient->request;
|
print $soapclient->request;
|
||||||
print "<br>\n\n";
|
print "<br>\n\n";
|
||||||
print $soapclient->response;
|
print $soapclient->response;
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print __METHOD__." result=".$result."\n";
|
print __METHOD__." result=".$result."\n";
|
||||||
//$this->assertEquals('OK',$result['result']['result_code']);
|
//$this->assertEquals('OK',$result['result']['result_code']);
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user