forked from Wavyzz/dolibarr
Fix: convert line delimiters
This commit is contained in:
@@ -1504,7 +1504,7 @@ class Adherent extends CommonObject
|
|||||||
$langs->load("dict");
|
$langs->load("dict");
|
||||||
|
|
||||||
$code=$this->civilite_id;
|
$code=$this->civilite_id;
|
||||||
return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civilite", "code", "civilite", $code);
|
return $langs->getLabelFromKey($this->db, "Civility".$code, "c_civilite", "code", "civilite", $code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1531,11 +1531,11 @@ class Adherent extends CommonObject
|
|||||||
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.'">';
|
$lien = '<a href="'.DOL_URL_ROOT.'/adherents/card_subscriptions.php?rowid='.$this->id.'">';
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
}
|
}
|
||||||
if ($option == 'category')
|
if ($option == 'category')
|
||||||
{
|
{
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3">';
|
$lien = '<a href="'.DOL_URL_ROOT.'/categories/categorie.php?id='.$this->id.'&type=3">';
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$picto='user';
|
$picto='user';
|
||||||
$label=$langs->trans("ShowMember");
|
$label=$langs->trans("ShowMember");
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ $backtopage=GETPOST('backtopage','alpha');
|
|||||||
$confirm=GETPOST('confirm','alpha');
|
$confirm=GETPOST('confirm','alpha');
|
||||||
$rowid=GETPOST('rowid','int');
|
$rowid=GETPOST('rowid','int');
|
||||||
$typeid=GETPOST('typeid','int');
|
$typeid=GETPOST('typeid','int');
|
||||||
$userid=GETPOST('userid','int');
|
$userid=GETPOST('userid','int');
|
||||||
$socid=GETPOST('socid','int');
|
$socid=GETPOST('socid','int');
|
||||||
|
|
||||||
if (! empty($conf->mailmanspip->enabled))
|
if (! empty($conf->mailmanspip->enabled))
|
||||||
{
|
{
|
||||||
@@ -249,16 +249,16 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
|||||||
$lastname=$_POST["lastname"];
|
$lastname=$_POST["lastname"];
|
||||||
$firstname=$_POST["firstname"];
|
$firstname=$_POST["firstname"];
|
||||||
$morphy=$morphy=$_POST["morphy"];;
|
$morphy=$morphy=$_POST["morphy"];;
|
||||||
if ($morphy != 'mor' && empty($lastname)) {
|
if ($morphy != 'mor' && empty($lastname)) {
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."<br>\n";
|
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Lastname"))."<br>\n";
|
||||||
}
|
}
|
||||||
if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) {
|
if ($morphy != 'mor' && (!isset($firstname) || $firstname=='')) {
|
||||||
$error++;
|
$error++;
|
||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."<br>\n";
|
$errmsg .= $langs->trans("ErrorFieldRequired",$langs->transnoentities("Firstname"))."<br>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create new object
|
// Create new object
|
||||||
if ($result > 0 && ! $error)
|
if ($result > 0 && ! $error)
|
||||||
@@ -383,7 +383,7 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
setEventMessage($object->mesgs, 'mesgs');
|
setEventMessage($object->mesgs, 'mesgs');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$rowid=$object->id;
|
$rowid=$object->id;
|
||||||
@@ -715,7 +715,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||||||
{
|
{
|
||||||
$object = new Adherent($db);
|
$object = new Adherent($db);
|
||||||
$result=$object->fetch($rowid);
|
$result=$object->fetch($rowid);
|
||||||
if ($result <= 0) dol_print_error('',$object->error);
|
if ($result <= 0) dol_print_error('',$object->error);
|
||||||
}
|
}
|
||||||
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
|
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
|
||||||
$objcanvas->display_canvas($action); // Show template
|
$objcanvas->display_canvas($action); // Show template
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ $year = strftime("%Y", time());
|
|||||||
$startyear=$year-2;
|
$startyear=$year-2;
|
||||||
$endyear=$year;
|
$endyear=$year;
|
||||||
|
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,9 +23,9 @@
|
|||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||||
|
|
||||||
$graphwidth=DolGraph::getDefaultGraphSizeForStats('width',700);
|
$graphwidth=DolGraph::getDefaultGraphSizeForStats('width',700);
|
||||||
$mapratio = 0.5;
|
$mapratio = 0.5;
|
||||||
$graphheight = round($graphwidth * $mapratio);
|
$graphheight = round($graphwidth * $mapratio);
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ $year = strftime("%Y", time());
|
|||||||
$startyear=$year-2;
|
$startyear=$year-2;
|
||||||
$endyear=$year;
|
$endyear=$year;
|
||||||
|
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -46,8 +46,8 @@ $year = strftime("%Y", time());
|
|||||||
$startyear=$year-2;
|
$startyear=$year-2;
|
||||||
$endyear=$year;
|
$endyear=$year;
|
||||||
|
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ foreach($boxtoadd as $box)
|
|||||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td>'.img_object("",$logo).' '.$langs->transnoentitiesnoconv($box->boxlabel);
|
print '<td>'.img_object("",$logo).' '.$langs->transnoentitiesnoconv($box->boxlabel);
|
||||||
if (! empty($box->class) && preg_match('/graph_/',$box->class)) print ' ('.$langs->trans("Graph").')';
|
if (! empty($box->class) && preg_match('/graph_/',$box->class)) print ' ('.$langs->trans("Graph").')';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
if ($box->note == '(WarningUsingThisBoxSlowDown)')
|
if ($box->note == '(WarningUsingThisBoxSlowDown)')
|
||||||
|
|||||||
@@ -84,11 +84,11 @@ print '<br>';
|
|||||||
print $langs->trans("ClickToDialUrlDesc").'<br>';
|
print $langs->trans("ClickToDialUrlDesc").'<br>';
|
||||||
print $langs->trans("Example").':<br>http://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__';
|
print $langs->trans("Example").':<br>http://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__';
|
||||||
|
|
||||||
//if (! empty($user->clicktodial_url))
|
//if (! empty($user->clicktodial_url))
|
||||||
//{
|
//{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print info_admin($langs->trans("ValueOverwrittenByUserSetup"));
|
print info_admin($langs->trans("ValueOverwrittenByUserSetup"));
|
||||||
//}
|
//}
|
||||||
|
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@@ -113,9 +113,9 @@ if (! empty($conf->global->CLICKTODIAL_URL))
|
|||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
$setupcomplete=1;
|
$setupcomplete=1;
|
||||||
if (preg_match('/__LOGIN__/',$conf->global->CLICKTODIAL_URL) && empty($user->clicktodial_login)) $setupcomplete=0;
|
if (preg_match('/__LOGIN__/',$conf->global->CLICKTODIAL_URL) && empty($user->clicktodial_login)) $setupcomplete=0;
|
||||||
if (preg_match('/__PASSWORD__/',$conf->global->CLICKTODIAL_URL) && empty($user->clicktodial_password)) $setupcomplete=0;
|
if (preg_match('/__PASSWORD__/',$conf->global->CLICKTODIAL_URL) && empty($user->clicktodial_password)) $setupcomplete=0;
|
||||||
if (preg_match('/__PHONEFROM__/',$conf->global->CLICKTODIAL_URL) && empty($user->clicktodial_poste)) $setupcomplete=0;
|
if (preg_match('/__PHONEFROM__/',$conf->global->CLICKTODIAL_URL) && empty($user->clicktodial_poste)) $setupcomplete=0;
|
||||||
|
|
||||||
if ($setupcomplete)
|
if ($setupcomplete)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,8 +44,8 @@ if (! $user->admin) accessforbidden();
|
|||||||
|
|
||||||
$action = GETPOST('action','alpha');
|
$action = GETPOST('action','alpha');
|
||||||
$value = GETPOST('value','alpha');
|
$value = GETPOST('value','alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$scandir = GETPOST('scandir','alpha');
|
$scandir = GETPOST('scandir','alpha');
|
||||||
$type = 'order';
|
$type = 'order';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require '../../main.inc.php';
|
require '../../main.inc.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
|
||||||
@@ -48,18 +48,18 @@ if (isset($title))
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
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>';
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
$var=false;
|
$var=false;
|
||||||
|
|
||||||
// Recupere la version de l'OS
|
// Recupere la version de l'OS
|
||||||
$phpversion=version_php();
|
$phpversion=version_php();
|
||||||
print "<tr ".$bc[$var].'><td width="220px">'.$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n";
|
print "<tr ".$bc[$var].'><td width="220px">'.$langs->trans("Version")."</td><td>".$phpversion."</td></tr>\n";
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -52,27 +52,27 @@ $template_dir = DOL_DOCUMENT_ROOT.'/core/tpl/';
|
|||||||
$interfaces = new Interfaces($db);
|
$interfaces = new Interfaces($db);
|
||||||
$triggers = $interfaces->getTriggersList(0,'priority');
|
$triggers = $interfaces->getTriggersList(0,'priority');
|
||||||
|
|
||||||
print '<table class="noborder">
|
print '<table class="noborder">
|
||||||
<tr class="liste_titre">
|
<tr class="liste_titre">
|
||||||
<td colspan="2">'.$langs->trans("File").'</td>
|
<td colspan="2">'.$langs->trans("File").'</td>
|
||||||
<td align="center">'.$langs->trans("Active").'</td>
|
<td align="center">'.$langs->trans("Active").'</td>
|
||||||
<td align="center"> </td>
|
<td align="center"> </td>
|
||||||
</tr>
|
</tr>
|
||||||
';
|
';
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
foreach ($triggers as $trigger)
|
foreach ($triggers as $trigger)
|
||||||
{
|
{
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print '<tr '.$bc[$var].'>';
|
print '<tr '.$bc[$var].'>';
|
||||||
print '<td valign="top" width="14" align="center">'.$trigger['picto'].'</td>';
|
print '<td valign="top" width="14" align="center">'.$trigger['picto'].'</td>';
|
||||||
print '<td valign="top">'.$trigger['file'].'</td>';
|
print '<td valign="top">'.$trigger['file'].'</td>';
|
||||||
print '<td valign="top" align="center">'.$trigger['status'].'</td>';
|
print '<td valign="top" align="center">'.$trigger['status'].'</td>';
|
||||||
print '<td valign="top">'.$form->textwithpicto('', $trigger['info']).'</td>';
|
print '<td valign="top">'.$form->textwithpicto('', $trigger['info']).'</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ else print ' ';
|
|||||||
//print '</td></tr></table>';
|
//print '</td></tr></table>';
|
||||||
print '</div></div></div>';
|
print '</div></div></div>';
|
||||||
|
|
||||||
print '<div class="fichecenter"><br>';
|
print '<div class="fichecenter"><br>';
|
||||||
|
|
||||||
|
|
||||||
// Charge tableau des categories
|
// Charge tableau des categories
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ $ref=GETPOST('ref');
|
|||||||
$type=GETPOST('type');
|
$type=GETPOST('type');
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
$confirm=GETPOST('confirm');
|
$confirm=GETPOST('confirm');
|
||||||
$removeelem = GETPOST('removeelem','int');
|
$removeelem = GETPOST('removeelem','int');
|
||||||
|
|
||||||
if ($id == "")
|
if ($id == "")
|
||||||
{
|
{
|
||||||
@@ -62,39 +62,39 @@ $type=$object->type;
|
|||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Remove element from category
|
// Remove element from category
|
||||||
if ($id > 0 && $removeelem > 0)
|
if ($id > 0 && $removeelem > 0)
|
||||||
{
|
{
|
||||||
if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer))
|
if ($type==0 && ($user->rights->produit->creer || $user->rights->service->creer))
|
||||||
{
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
|
||||||
$tmpobject = new Product($db);
|
|
||||||
$result = $tmpobject->fetch($removeelem);
|
|
||||||
$elementtype = 'product';
|
|
||||||
}
|
|
||||||
if ($type==1 && $user->rights->societe->creer)
|
|
||||||
{
|
|
||||||
$tmpobject = new Societe($db);
|
|
||||||
$result = $tmpobject->fetch($removeelem);
|
|
||||||
$elementtype = 'fournisseur';
|
|
||||||
}
|
|
||||||
if ($type==2 && $user->rights->societe->creer)
|
|
||||||
{
|
|
||||||
$tmpobject = new Societe($db);
|
|
||||||
$result = $tmpobject->fetch($removeelem);
|
|
||||||
$elementtype = 'societe';
|
|
||||||
}
|
|
||||||
if ($type == 3 && $user->rights->adherent->creer)
|
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||||
$tmpobject = new Adherent($db);
|
$tmpobject = new Product($db);
|
||||||
$result = $tmpobject->fetch($removeelem);
|
$result = $tmpobject->fetch($removeelem);
|
||||||
|
$elementtype = 'product';
|
||||||
|
}
|
||||||
|
if ($type==1 && $user->rights->societe->creer)
|
||||||
|
{
|
||||||
|
$tmpobject = new Societe($db);
|
||||||
|
$result = $tmpobject->fetch($removeelem);
|
||||||
|
$elementtype = 'fournisseur';
|
||||||
|
}
|
||||||
|
if ($type==2 && $user->rights->societe->creer)
|
||||||
|
{
|
||||||
|
$tmpobject = new Societe($db);
|
||||||
|
$result = $tmpobject->fetch($removeelem);
|
||||||
|
$elementtype = 'societe';
|
||||||
|
}
|
||||||
|
if ($type == 3 && $user->rights->adherent->creer)
|
||||||
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent.class.php';
|
||||||
|
$tmpobject = new Adherent($db);
|
||||||
|
$result = $tmpobject->fetch($removeelem);
|
||||||
$elementtype = 'member';
|
$elementtype = 'member';
|
||||||
}
|
}
|
||||||
|
|
||||||
$result=$object->del_type($tmpobject,$elementtype);
|
$result=$object->del_type($tmpobject,$elementtype);
|
||||||
if ($result < 0) dol_print_error('',$object->error);
|
if ($result < 0) dol_print_error('',$object->error);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($user->rights->categorie->supprimer && $action == 'confirm_delete' && $confirm == 'yes')
|
if ($user->rights->categorie->supprimer && $action == 'confirm_delete' && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
@@ -312,21 +312,21 @@ if ($object->type == 1)
|
|||||||
print '<td class="nowrap" valign="top">';
|
print '<td class="nowrap" valign="top">';
|
||||||
print $soc->getNomUrl(1,'category_supplier');
|
print $soc->getNomUrl(1,'category_supplier');
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
// Link to delete from category
|
// Link to delete from category
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
$typeid=$object->type;
|
$typeid=$object->type;
|
||||||
$permission=0;
|
$permission=0;
|
||||||
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||||
if ($typeid == 1) $permission=$user->rights->societe->creer;
|
if ($typeid == 1) $permission=$user->rights->societe->creer;
|
||||||
if ($typeid == 2) $permission=$user->rights->societe->creer;
|
if ($typeid == 2) $permission=$user->rights->societe->creer;
|
||||||
if ($typeid == 3) $permission=$user->rights->adherent->creer;
|
if ($typeid == 3) $permission=$user->rights->adherent->creer;
|
||||||
if ($permission)
|
if ($permission)
|
||||||
{
|
{
|
||||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$soc->id."'>";
|
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$soc->id."'>";
|
||||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||||
print $langs->trans("DeleteFromCat")."</a>";
|
print $langs->trans("DeleteFromCat")."</a>";
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
@@ -364,20 +364,20 @@ if($object->type == 2)
|
|||||||
print '<td class="nowrap" valign="top">';
|
print '<td class="nowrap" valign="top">';
|
||||||
print $soc->getNomUrl(1,'category');
|
print $soc->getNomUrl(1,'category');
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
// Link to delete from category
|
// Link to delete from category
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
$typeid=$object->type;
|
$typeid=$object->type;
|
||||||
$permission=0;
|
$permission=0;
|
||||||
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
if ($typeid == 0) $permission=($user->rights->produit->creer || $user->rights->service->creer);
|
||||||
if ($typeid == 1) $permission=$user->rights->societe->creer;
|
if ($typeid == 1) $permission=$user->rights->societe->creer;
|
||||||
if ($typeid == 2) $permission=$user->rights->societe->creer;
|
if ($typeid == 2) $permission=$user->rights->societe->creer;
|
||||||
if ($typeid == 3) $permission=$user->rights->adherent->creer;
|
if ($typeid == 3) $permission=$user->rights->adherent->creer;
|
||||||
if ($permission)
|
if ($permission)
|
||||||
{
|
{
|
||||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$soc->id."'>";
|
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$soc->id."'>";
|
||||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||||
print $langs->trans("DeleteFromCat")."</a>";
|
print $langs->trans("DeleteFromCat")."</a>";
|
||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ class ActionComm extends CommonObject
|
|||||||
$this->priority = $obj->priority;
|
$this->priority = $obj->priority;
|
||||||
$this->fulldayevent = $obj->fulldayevent;
|
$this->fulldayevent = $obj->fulldayevent;
|
||||||
$this->location = $obj->location;
|
$this->location = $obj->location;
|
||||||
$this->transparency = $obj->transparency;
|
$this->transparency = $obj->transparency;
|
||||||
|
|
||||||
$this->socid = $obj->fk_soc; // To have fetch_thirdparty method working
|
$this->socid = $obj->fk_soc; // To have fetch_thirdparty method working
|
||||||
$this->societe->id = $obj->fk_soc;
|
$this->societe->id = $obj->fk_soc;
|
||||||
@@ -476,7 +476,7 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= ", priority = '".$this->priority."'";
|
$sql.= ", priority = '".$this->priority."'";
|
||||||
$sql.= ", fulldayevent = '".$this->fulldayevent."'";
|
$sql.= ", fulldayevent = '".$this->fulldayevent."'";
|
||||||
$sql.= ", location = ".($this->location ? "'".$this->db->escape($this->location)."'":"null");
|
$sql.= ", location = ".($this->location ? "'".$this->db->escape($this->location)."'":"null");
|
||||||
$sql.= ", transparency = '".$this->transparency."'";
|
$sql.= ", transparency = '".$this->transparency."'";
|
||||||
$sql.= ", fk_user_mod = '".$user->id."'";
|
$sql.= ", fk_user_mod = '".$user->id."'";
|
||||||
$sql.= ", fk_user_action=".($this->usertodo->id > 0 ? "'".$this->usertodo->id."'":"null");
|
$sql.= ", fk_user_action=".($this->usertodo->id > 0 ? "'".$this->usertodo->id."'":"null");
|
||||||
$sql.= ", fk_user_done=".($this->userdone->id > 0 ? "'".$this->userdone->id."'":"null");
|
$sql.= ", fk_user_done=".($this->userdone->id > 0 ? "'".$this->userdone->id."'":"null");
|
||||||
|
|||||||
@@ -527,8 +527,8 @@ if ($action == 'create')
|
|||||||
|
|
||||||
// Busy
|
// Busy
|
||||||
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td>';
|
print '<tr><td width="30%" class="nowrap">'.$langs->trans("Busy").'</td><td>';
|
||||||
print '<input id="transparency" type="checkbox" name="transparency" value="'.$actioncomm->transparency.'">';
|
print '<input id="transparency" type="checkbox" name="transparency" value="'.$actioncomm->transparency.'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Realised by
|
// Realised by
|
||||||
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
||||||
@@ -768,13 +768,13 @@ if ($id > 0)
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Busy
|
// Busy
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("Busy").'</td><td>';
|
print '<tr><td class="nowrap">'.$langs->trans("Busy").'</td><td>';
|
||||||
print '<input id="transparency" type="checkbox" name="transparency"'.($act->transparency?' checked="checked"':'').'">';
|
print '<input id="transparency" type="checkbox" name="transparency"'.($act->transparency?' checked="checked"':'').'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Realised by
|
// Realised by
|
||||||
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
if ($conf->global->AGENDA_ENABLE_DONEBY)
|
||||||
{
|
{
|
||||||
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
print '<tr><td class="nowrap">'.$langs->trans("ActionDoneBy").'</td><td colspan="3">';
|
||||||
print $form->select_dolusers($act->userdone->id> 0?$act->userdone->id:-1,'doneby',1);
|
print $form->select_dolusers($act->userdone->id> 0?$act->userdone->id:-1,'doneby',1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ $pid=GETPOST("projectid","int",3);
|
|||||||
$status=GETPOST("status");
|
$status=GETPOST("status");
|
||||||
$type=GETPOST("type");
|
$type=GETPOST("type");
|
||||||
$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
$maxprint=(isset($_GET["maxprint"])?GETPOST("maxprint"):$conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||||
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=="0"?'':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':''));
|
$actioncode=GETPOST("actioncode","alpha",3)?GETPOST("actioncode","alpha",3):(GETPOST("actioncode")=="0"?'':(empty($conf->global->AGENDA_USE_EVENT_TYPE)?'AC_OTH':''));
|
||||||
|
|
||||||
if (GETPOST('viewcal')) {
|
if (GETPOST('viewcal')) {
|
||||||
$action='show_month'; $day='';
|
$action='show_month'; $day='';
|
||||||
@@ -965,7 +965,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
print '</td><td align="right" class="nowrap">';
|
print '</td><td align="right" class="nowrap">';
|
||||||
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)
|
if ($user->rights->agenda->myactions->create || $user->rights->agenda->allactions->create)
|
||||||
{
|
{
|
||||||
$newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
|
$newparam.='&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$year;
|
||||||
|
|
||||||
//$param='month='.$monthshown.'&year='.$year;
|
//$param='month='.$monthshown.'&year='.$year;
|
||||||
$hourminsec='100000';
|
$hourminsec='100000';
|
||||||
@@ -1022,17 +1022,17 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
|
|||||||
{
|
{
|
||||||
// Define color index if not yet defined
|
// Define color index if not yet defined
|
||||||
$idusertouse=($event->usertodo->id?$event->usertodo->id:0);
|
$idusertouse=($event->usertodo->id?$event->usertodo->id:0);
|
||||||
if (isset($colorindexused[$idusertouse]))
|
if (isset($colorindexused[$idusertouse]))
|
||||||
{
|
{
|
||||||
$colorindex=$colorindexused[$idusertouse]; // Color already assigned to this user
|
$colorindex=$colorindexused[$idusertouse]; // Color already assigned to this user
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$colorindex=$nextindextouse;
|
$colorindex=$nextindextouse;
|
||||||
$colorindexused[$idusertouse]=$colorindex;
|
$colorindexused[$idusertouse]=$colorindex;
|
||||||
if (! empty($theme_datacolor[$nextindextouse+1])) $nextindextouse++; // Prepare to use next color
|
if (! empty($theme_datacolor[$nextindextouse+1])) $nextindextouse++; // Prepare to use next color
|
||||||
}
|
}
|
||||||
//print '|'.($color).'='.($idusertouse?$idusertouse:0).'='.$colorindex.'<br>';
|
//print '|'.($color).'='.($idusertouse?$idusertouse:0).'='.$colorindex.'<br>';
|
||||||
// Define color
|
// Define color
|
||||||
$color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);
|
$color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|
||||||
$NBMAX=3;
|
$NBMAX=3;
|
||||||
|
|||||||
@@ -376,19 +376,19 @@ if ($object->fetch($id) >= 0)
|
|||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
$cleartext='<br></div><div>'.$langs->trans("ToClearAllRecipientsClickHere").': '.'<input type="submit" name="clearlist" class="button" value="'.$langs->trans("TargetsReset").'">';
|
$cleartext='<br></div><div>'.$langs->trans("ToClearAllRecipientsClickHere").': '.'<input type="submit" name="clearlist" class="button" value="'.$langs->trans("TargetsReset").'">';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("MailSelectedRecipients").$cleartext,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,"",$num,$object->nbemail,'');
|
print_barre_liste($langs->trans("MailSelectedRecipients").$cleartext,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,"",$num,$object->nbemail,'');
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
print "\n<!-- Liste destinataires selectionnes -->\n";
|
print "\n<!-- Liste destinataires selectionnes -->\n";
|
||||||
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'].'">';
|
||||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
|
|
||||||
|
|
||||||
if ($page) $param.= "&page=".$page;
|
if ($page) $param.= "&page=".$page;
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
@@ -521,7 +521,7 @@ if ($object->fetch($id) >= 0)
|
|||||||
}
|
}
|
||||||
print "</table><br>";
|
print "</table><br>";
|
||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1797,10 +1797,10 @@ class Propal extends CommonObject
|
|||||||
$sql.= " WHERE p.entity = ".$conf->entity;
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
$sql.= " AND p.fk_soc = s.rowid";
|
$sql.= " AND p.fk_soc = s.rowid";
|
||||||
$sql.= " AND p.fk_statut = c.id";
|
$sql.= " AND p.fk_statut = c.id";
|
||||||
if (! $user->rights->societe->client->voir && ! $socid) //restriction
|
if (! $user->rights->societe->client->voir && ! $socid) //restriction
|
||||||
{
|
{
|
||||||
$sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
$sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
}
|
}
|
||||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||||
if ($draft) $sql.= " AND p.fk_statut = 0";
|
if ($draft) $sql.= " AND p.fk_statut = 0";
|
||||||
if ($notcurrentuser > 0) $sql.= " AND p.fk_user_author <> ".$user->id;
|
if ($notcurrentuser > 0) $sql.= " AND p.fk_user_author <> ".$user->id;
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/comm/propal/class/propal.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2026,19 +2026,19 @@ class Commande extends CommonOrder
|
|||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($result);
|
$obj = $this->db->fetch_object($result);
|
||||||
|
|
||||||
if ($shortlist == 1)
|
if ($shortlist == 1)
|
||||||
{
|
{
|
||||||
$ga[$obj->cid] = $obj->ref;
|
$ga[$obj->cid] = $obj->ref;
|
||||||
}
|
}
|
||||||
else if ($shortlist == 2)
|
else if ($shortlist == 2)
|
||||||
{
|
{
|
||||||
$ga[$obj->cid] = $obj->ref.' ('.$obj->name.')';
|
$ga[$obj->cid] = $obj->ref.' ('.$obj->name.')';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ga[$i]['id'] = $obj->cid;
|
$ga[$i]['id'] = $obj->cid;
|
||||||
$ga[$i]['ref'] = $obj->ref;
|
$ga[$i]['ref'] = $obj->ref;
|
||||||
$ga[$i]['name'] = $obj->name;
|
$ga[$i]['name'] = $obj->name;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/class/stats.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/commande/class/commande.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php';
|
include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$id = (GETPOST('id','int') ? GETPOST('id','int') : GETPOST('account','int'));
|
$id = (GETPOST('id','int') ? GETPOST('id','int') : GETPOST('account','int'));
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
$id=GETPOST('account');
|
$id=GETPOST('account');
|
||||||
$ref=GETPOST('ref');
|
$ref=GETPOST('ref');
|
||||||
|
|||||||
@@ -27,10 +27,10 @@
|
|||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$action=GETPOST('action');
|
$action=GETPOST('action');
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
if (!$user->rights->banque->lire)
|
if (!$user->rights->banque->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|||||||
@@ -24,10 +24,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
|
|||||||
@@ -24,10 +24,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
if (!$user->rights->banque->configurer)
|
if (!$user->rights->banque->configurer)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbank.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbank.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
$action=GETPOST("action");
|
$action=GETPOST("action");
|
||||||
|
|||||||
@@ -27,12 +27,12 @@ require('../../main.inc.php');
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
|
||||||
$langs->load("categories");
|
|
||||||
|
|
||||||
$WIDTH=DolGraph::getDefaultGraphSizeForStats('width',768);
|
$langs->load("banks");
|
||||||
$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height',200);
|
$langs->load("categories");
|
||||||
|
|
||||||
|
$WIDTH=DolGraph::getDefaultGraphSizeForStats('width',768);
|
||||||
|
$HEIGHT=DolGraph::getDefaultGraphSizeForStats('height',200);
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if (isset($_GET["account"]) || isset($_GET["ref"]))
|
if (isset($_GET["account"]) || isset($_GET["ref"]))
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ require('../../main.inc.php');
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
|
|||||||
@@ -24,10 +24,10 @@
|
|||||||
require('../../main.inc.php');
|
require('../../main.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.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php'
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
if (! $user->rights->banque->consolidate) accessforbidden();
|
if (! $user->rights->banque->consolidate) accessforbidden();
|
||||||
|
|||||||
@@ -25,10 +25,10 @@
|
|||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
|
|||||||
@@ -27,8 +27,8 @@
|
|||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/bankcateg.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@@ -26,10 +26,10 @@
|
|||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
if (! $user->rights->banque->transfer)
|
if (! $user->rights->banque->transfer)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ complete_head_from_modules($conf,$langs,null,$head,$h,'trip_stats');
|
|||||||
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
dol_fiche_head($head,'byyear',$langs->trans("Statistics"));
|
||||||
|
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
// Show filter box
|
// Show filter box
|
||||||
|
|||||||
@@ -2687,7 +2687,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Invoice content
|
// Invoice content
|
||||||
|
|
||||||
|
|||||||
@@ -2660,77 +2660,77 @@ class Facture extends CommonInvoice
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of invoices (eventually filtered on a user) into an array
|
* Return list of invoices (eventually filtered on a user) into an array
|
||||||
*
|
*
|
||||||
* @param int $shortlist 0=Return array[id]=ref, 1=Return array[](id=>id,ref=>ref,name=>name)
|
* @param int $shortlist 0=Return array[id]=ref, 1=Return array[](id=>id,ref=>ref,name=>name)
|
||||||
* @param int $draft 0=not draft, 1=draft
|
* @param int $draft 0=not draft, 1=draft
|
||||||
* @param User $excluser Objet user to exclude
|
* @param User $excluser Objet user to exclude
|
||||||
* @param int $socid Id third pary
|
* @param int $socid Id third pary
|
||||||
* @param int $limit For pagination
|
* @param int $limit For pagination
|
||||||
* @param int $offset For pagination
|
* @param int $offset For pagination
|
||||||
* @param string $sortfield Sort criteria
|
* @param string $sortfield Sort criteria
|
||||||
* @param string $sortorder Sort order
|
* @param string $sortorder Sort order
|
||||||
* @return int -1 if KO, array with result if OK
|
* @return int -1 if KO, array with result if OK
|
||||||
*/
|
*/
|
||||||
function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC')
|
function liste_array($shortlist=0, $draft=0, $excluser='', $socid=0, $limit=0, $offset=0, $sortfield='f.datef,f.rowid', $sortorder='DESC')
|
||||||
{
|
{
|
||||||
global $conf,$user;
|
global $conf,$user;
|
||||||
|
|
||||||
$ga = array();
|
$ga = array();
|
||||||
|
|
||||||
$sql = "SELECT s.rowid, s.nom as name, s.client,";
|
$sql = "SELECT s.rowid, s.nom as name, s.client,";
|
||||||
$sql.= " f.rowid as fid, f.facnumber as ref, f.datef as df";
|
$sql.= " f.rowid as fid, f.facnumber as ref, f.datef as df";
|
||||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f";
|
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."facture as f";
|
||||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE f.entity = ".$conf->entity;
|
$sql.= " WHERE f.entity = ".$conf->entity;
|
||||||
$sql.= " AND f.fk_soc = s.rowid";
|
$sql.= " AND f.fk_soc = s.rowid";
|
||||||
if (! $user->rights->societe->client->voir && ! $socid) //restriction
|
if (! $user->rights->societe->client->voir && ! $socid) //restriction
|
||||||
{
|
{
|
||||||
$sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
$sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||||
}
|
}
|
||||||
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
if ($socid) $sql.= " AND s.rowid = ".$socid;
|
||||||
if ($draft) $sql.= " AND f.fk_statut = 0";
|
if ($draft) $sql.= " AND f.fk_statut = 0";
|
||||||
if (is_object($excluser)) $sql.= " AND f.fk_user_author <> ".$excluser->id;
|
if (is_object($excluser)) $sql.= " AND f.fk_user_author <> ".$excluser->id;
|
||||||
$sql.= $this->db->order($sortfield,$sortorder);
|
$sql.= $this->db->order($sortfield,$sortorder);
|
||||||
$sql.= $this->db->plimit($limit,$offset);
|
$sql.= $this->db->plimit($limit,$offset);
|
||||||
|
|
||||||
$result=$this->db->query($sql);
|
$result=$this->db->query($sql);
|
||||||
if ($result)
|
if ($result)
|
||||||
{
|
{
|
||||||
$numc = $this->db->num_rows($result);
|
$numc = $this->db->num_rows($result);
|
||||||
if ($numc)
|
if ($numc)
|
||||||
{
|
{
|
||||||
$i = 0;
|
$i = 0;
|
||||||
while ($i < $numc)
|
while ($i < $numc)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($result);
|
$obj = $this->db->fetch_object($result);
|
||||||
|
|
||||||
if ($shortlist == 1)
|
if ($shortlist == 1)
|
||||||
{
|
{
|
||||||
$ga[$obj->fid] = $obj->ref;
|
$ga[$obj->fid] = $obj->ref;
|
||||||
}
|
}
|
||||||
else if ($shortlist == 2)
|
else if ($shortlist == 2)
|
||||||
{
|
{
|
||||||
$ga[$obj->fid] = $obj->ref.' ('.$obj->name.')';
|
$ga[$obj->fid] = $obj->ref.' ('.$obj->name.')';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$ga[$i]['id'] = $obj->fid;
|
$ga[$i]['id'] = $obj->fid;
|
||||||
$ga[$i]['ref'] = $obj->ref;
|
$ga[$i]['ref'] = $obj->ref;
|
||||||
$ga[$i]['name'] = $obj->name;
|
$ga[$i]['name'] = $obj->name;
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $ga;
|
return $ga;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_print_error($this->db);
|
dol_print_error($this->db);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3121,7 +3121,7 @@ class Facture extends CommonInvoice
|
|||||||
$this->total_tva += $line->total_tva;
|
$this->total_tva += $line->total_tva;
|
||||||
$this->total_ttc += $line->total_ttc;
|
$this->total_ttc += $line->total_ttc;
|
||||||
}
|
}
|
||||||
$this->revenuestamp = 0;
|
$this->revenuestamp = 0;
|
||||||
|
|
||||||
// Add a line "offered"
|
// Add a line "offered"
|
||||||
$line=new FactureLigne($this->db);
|
$line=new FactureLigne($this->db);
|
||||||
|
|||||||
@@ -156,16 +156,16 @@ if ($action == 'confirm_paiement' && $confirm == 'yes')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->banque->enabled))
|
if (! empty($conf->banque->enabled))
|
||||||
{
|
{
|
||||||
// Si module bank actif, un compte est obligatoire lors de la saisie d'un paiement
|
// Si module bank actif, un compte est obligatoire lors de la saisie d'un paiement
|
||||||
if (GETPOST('accountid') <= 0)
|
if (GETPOST('accountid') <= 0)
|
||||||
{
|
{
|
||||||
$fiche_erreur_message = '<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')).'</div>';
|
$fiche_erreur_message = '<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('AccountToCredit')).'</div>';
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creation of payment line
|
// Creation of payment line
|
||||||
$paiement = new Paiement($db);
|
$paiement = new Paiement($db);
|
||||||
$paiement->datepaye = $datepaye;
|
$paiement->datepaye = $datepaye;
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
$langs->load('companies');
|
$langs->load('companies');
|
||||||
$langs->load('compta');
|
$langs->load('compta');
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
require('../../../main.inc.php');
|
require('../../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
require('../../../main.inc.php');
|
require('../../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@@ -392,7 +392,7 @@ class Paiement extends CommonObject
|
|||||||
$this->error='Bad value for parameter accountid';
|
$this->error='Bad value for parameter accountid';
|
||||||
dol_syslog(get_class($this).'::addPaymentToBank '.$this->error, LOG_ERR);
|
dol_syslog(get_class($this).'::addPaymentToBank '.$this->error, LOG_ERR);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
|||||||
@@ -27,10 +27,10 @@ require('../../main.inc.php');
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,10 @@
|
|||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("widthdrawals");
|
$langs->load("widthdrawals");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("widthdrawals");
|
$langs->load("widthdrawals");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ require('../../main.inc.php');
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/modules/modPrelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/modules/modPrelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("widthdrawals");
|
$langs->load("widthdrawals");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load('withdrawals');
|
$langs->load('withdrawals');
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load('withdrawals');
|
$langs->load('withdrawals');
|
||||||
$langs->load('bills');
|
$langs->load('bills');
|
||||||
|
|
||||||
|
|||||||
@@ -27,11 +27,11 @@ require('../../main.inc.php');
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("withdrawals");
|
$langs->load("withdrawals");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|||||||
@@ -26,10 +26,10 @@
|
|||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
if (!$user->rights->prelevement->bons->lire)
|
if (!$user->rights->prelevement->bons->lire)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|||||||
@@ -31,10 +31,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/prelevement.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("withdrawals");
|
$langs->load("withdrawals");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@@ -29,10 +29,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|||||||
@@ -30,10 +30,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.p
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id > 0) accessforbidden();
|
if ($user->societe_id > 0) accessforbidden();
|
||||||
|
|||||||
@@ -26,9 +26,9 @@
|
|||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/bonprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("withdrawals");
|
$langs->load("withdrawals");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|||||||
@@ -28,10 +28,10 @@ require('../../main.inc.php');
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/rejetprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("withdrawals");
|
$langs->load("withdrawals");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|||||||
@@ -26,10 +26,10 @@
|
|||||||
|
|
||||||
require('../../main.inc.php');
|
require('../../main.inc.php');
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/prelevement/class/ligneprelevement.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||||
|
|
||||||
$langs->load("banks");
|
$langs->load("banks");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
$langs->load("withdrawals");
|
$langs->load("withdrawals");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ $socid = isset($_GET["socid"])?$_GET["socid"]:'';
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
$result = restrictedArea($user, 'tax', '', '', 'charges');
|
||||||
|
|
||||||
$tva = new Tva($db);
|
$tva = new Tva($db);
|
||||||
|
|
||||||
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
// Initialize technical object to manage hooks of thirdparties. Note that conf->hooks_modules contains array array
|
||||||
$hookmanager->initHooks(array('taxvatcard'));
|
$hookmanager->initHooks(array('taxvatcard'));
|
||||||
@@ -54,7 +54,7 @@ $hookmanager->initHooks(array('taxvatcard'));
|
|||||||
|
|
||||||
if ($_POST["cancel"] == $langs->trans("Cancel"))
|
if ($_POST["cancel"] == $langs->trans("Cancel"))
|
||||||
{
|
{
|
||||||
header("Location: reglement.php");
|
header("Location: reglement.php");
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -231,9 +231,9 @@ if ($id)
|
|||||||
print $vatpayment->ref;
|
print $vatpayment->ref;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Label
|
// Label
|
||||||
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$vatpayment->label.'</td></tr>';
|
print '<tr><td>'.$langs->trans("Label").'</td><td>'.$vatpayment->label.'</td></tr>';
|
||||||
|
|
||||||
print "<tr>";
|
print "<tr>";
|
||||||
print '<td>'.$langs->trans("DatePayment").'</td><td colspan="3">';
|
print '<td>'.$langs->trans("DatePayment").'</td><td colspan="3">';
|
||||||
print dol_print_date($vatpayment->datep,'day');
|
print dol_print_date($vatpayment->datep,'day');
|
||||||
|
|||||||
@@ -1010,13 +1010,13 @@ class Contact extends CommonObject
|
|||||||
$this->country = 'France';
|
$this->country = 'France';
|
||||||
$this->email = 'specimen@specimen.com';
|
$this->email = 'specimen@specimen.com';
|
||||||
|
|
||||||
$this->phone_pro = '0909090901';
|
$this->phone_pro = '0909090901';
|
||||||
$this->phone_perso = '0909090902';
|
$this->phone_perso = '0909090902';
|
||||||
$this->phone_mobile = '0909090903';
|
$this->phone_mobile = '0909090903';
|
||||||
$this->fax = '0909090909';
|
$this->fax = '0909090909';
|
||||||
|
|
||||||
$this->note_public='This is a comment (public)';
|
$this->note_public='This is a comment (public)';
|
||||||
$this->note_private='This is a comment (private)';
|
$this->note_private='This is a comment (private)';
|
||||||
|
|
||||||
$socid = rand(1, $num_socs);
|
$socid = rand(1, $num_socs);
|
||||||
$this->socid = $socids[$socid];
|
$this->socid = $socids[$socid];
|
||||||
|
|||||||
@@ -42,21 +42,21 @@ class box_activity extends ModeleBoxes
|
|||||||
var $info_box_contents = array();
|
var $info_box_contents = array();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param string $param More parameters
|
* @param string $param More parameters
|
||||||
*/
|
*/
|
||||||
function __construct($db,$param)
|
function __construct($db,$param)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
// FIXME: Use a cache to save data because this slow down too much main home page. This box slow down too seriously software.
|
// FIXME: Use a cache to save data because this slow down too much main home page. This box slow down too seriously software.
|
||||||
// FIXME: Removed number_format (not compatible with all languages)
|
// FIXME: Removed number_format (not compatible with all languages)
|
||||||
// FIXME: Pb into some status
|
// FIXME: Pb into some status
|
||||||
$this->enabled=$conf->global->MAIN_FEATURES_LEVEL; // Not enabled by default due to bugs (see previous FIXME)
|
$this->enabled=$conf->global->MAIN_FEATURES_LEVEL; // Not enabled by default due to bugs (see previous FIXME)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -39,18 +39,18 @@ class box_graph_invoices_permonth extends ModeleBoxes
|
|||||||
var $info_box_contents = array();
|
var $info_box_contents = array();
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param string $param More parameters
|
* @param string $param More parameters
|
||||||
*/
|
*/
|
||||||
function __construct($db,$param)
|
function __construct($db,$param)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$this->db=$db;
|
$this->db=$db;
|
||||||
$this->enabled=$conf->global->MAIN_FEATURES_LEVEL;
|
$this->enabled=$conf->global->MAIN_FEATURES_LEVEL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -82,24 +82,24 @@ abstract class CommonObject
|
|||||||
return dol_trunc($ret,$maxlen);
|
return dol_trunc($ret,$maxlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return full address of contact
|
* Return full address of contact
|
||||||
*
|
*
|
||||||
* @param int $withcountry 1=Add country into address string
|
* @param int $withcountry 1=Add country into address string
|
||||||
* @param string $sep Separator to use to build string
|
* @param string $sep Separator to use to build string
|
||||||
* @return string Full address string
|
* @return string Full address string
|
||||||
*/
|
*/
|
||||||
function getFullAddress($withcountry=0,$sep="\n")
|
function getFullAddress($withcountry=0,$sep="\n")
|
||||||
{
|
{
|
||||||
if ($withcountry && $this->country_id && (empty($this->country_code) || empty($this->country)))
|
if ($withcountry && $this->country_id && (empty($this->country_code) || empty($this->country)))
|
||||||
{
|
{
|
||||||
require_once DOL_DOCUMENT_ROOT .'/core/lib/company.lib.php';
|
require_once DOL_DOCUMENT_ROOT .'/core/lib/company.lib.php';
|
||||||
$tmparray=getCountry($this->country_id,'all');
|
$tmparray=getCountry($this->country_id,'all');
|
||||||
$this->country_code=$tmparray['code'];
|
$this->country_code=$tmparray['code'];
|
||||||
$this->country =$tmparray['label'];
|
$this->country =$tmparray['label'];
|
||||||
}
|
}
|
||||||
|
|
||||||
return dol_format_address($this, $withcountry, $sep);
|
return dol_format_address($this, $withcountry, $sep);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -63,11 +63,11 @@ class Conf
|
|||||||
//! Used to store list of entities to use for each element
|
//! Used to store list of entities to use for each element
|
||||||
public $entities = array();
|
public $entities = array();
|
||||||
|
|
||||||
public $dol_hide_topmenu; // Set if we force param dol_hide_topmenu into login url
|
public $dol_hide_topmenu; // Set if we force param dol_hide_topmenu into login url
|
||||||
public $dol_hide_leftmenu; // Set if we force param dol_hide_leftmenu into login url
|
public $dol_hide_leftmenu; // Set if we force param dol_hide_leftmenu into login url
|
||||||
public $dol_optimize_smallscreen; // Set if we force param dol_optimize_smallscreen into login url or if browser is smartphone
|
public $dol_optimize_smallscreen; // Set if we force param dol_optimize_smallscreen into login url or if browser is smartphone
|
||||||
public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone
|
public $dol_no_mouse_hover; // Set if we force param dol_no_mouse_hover into login url or if browser is smartphone
|
||||||
public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url
|
public $dol_use_jmobile; // Set if we force param dol_use_jmobile into login url
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -907,7 +907,7 @@ class DolGraph
|
|||||||
|
|
||||||
if ($direction == 'width') return ($conf->dol_optimize_smallscreen?(empty($_SESSION['dol_screen_width'])?'280':$_SESSION['dol_screen_width']-40):($defaultsize?$defaultsize:'500'));
|
if ($direction == 'width') return ($conf->dol_optimize_smallscreen?(empty($_SESSION['dol_screen_width'])?'280':$_SESSION['dol_screen_width']-40):($defaultsize?$defaultsize:'500'));
|
||||||
if ($direction == 'height') return ($conf->dol_optimize_smallscreen?'160':($defaultsize?$defaultsize:'200'));
|
if ($direction == 'height') return ($conf->dol_optimize_smallscreen?'160':($defaultsize?$defaultsize:'200'));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ class HookManager
|
|||||||
{
|
{
|
||||||
foreach($modules as $module => $actionclassinstance)
|
foreach($modules as $module => $actionclassinstance)
|
||||||
{
|
{
|
||||||
//print "Before hook ".get_class($actionclassinstance)." method=".$method." results=".count($actionclassinstance->results)." resprints=".count($actionclassinstance->resprints)." result=".$result." resaction=".$resaction."<br>\n";
|
//print "Before hook ".get_class($actionclassinstance)." method=".$method." results=".count($actionclassinstance->results)." resprints=".count($actionclassinstance->resprints)." result=".$result." resaction=".$resaction."<br>\n";
|
||||||
|
|
||||||
//print 'class='.get_class($actionclassinstance).' method='.$method.' action='.$action;
|
//print 'class='.get_class($actionclassinstance).' method='.$method.' action='.$action;
|
||||||
// jump to next class if method does not exists
|
// jump to next class if method does not exists
|
||||||
@@ -168,8 +168,8 @@ class HookManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results);
|
if (is_array($actionclassinstance->results)) $this->resArray =array_merge($this->resArray, $actionclassinstance->results);
|
||||||
if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints;
|
if (! empty($actionclassinstance->resprints)) $this->resPrint.=$actionclassinstance->resprints;
|
||||||
}
|
}
|
||||||
// Generic hooks that return a string or array (printSearchForm, printLeftBlock, printTopRightMenu, formAddObjectLine, formBuilddocOptions, ...)
|
// Generic hooks that return a string or array (printSearchForm, printLeftBlock, printTopRightMenu, formAddObjectLine, formBuilddocOptions, ...)
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ class FormActions
|
|||||||
//asort($arraylist);
|
//asort($arraylist);
|
||||||
|
|
||||||
if ($selected == 'manual') $selected='AC_OTH';
|
if ($selected == 'manual') $selected='AC_OTH';
|
||||||
if ($selected == 'auto') $selected='AC_OTH_AUTO';
|
if ($selected == 'auto') $selected='AC_OTH_AUTO';
|
||||||
|
|
||||||
print $form->selectarray($htmlname, $arraylist, $selected);
|
print $form->selectarray($htmlname, $arraylist, $selected);
|
||||||
if ($user->admin && empty($onlyautoornot)) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
if ($user->admin && empty($onlyautoornot)) print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionnarySetup"),1);
|
||||||
|
|||||||
@@ -383,18 +383,18 @@ class FormFile
|
|||||||
$buttonlabeltoshow=$buttonlabel;
|
$buttonlabeltoshow=$buttonlabel;
|
||||||
if (empty($buttonlabel)) $buttonlabel=$langs->trans('Generate');
|
if (empty($buttonlabel)) $buttonlabel=$langs->trans('Generate');
|
||||||
|
|
||||||
|
|
||||||
// Keep this. Used for test with jmobile
|
// Keep this. Used for test with jmobile
|
||||||
/*print '
|
/*print '
|
||||||
<form id="form1" name="form1">
|
<form id="form1" name="form1">
|
||||||
<select id="custom-select2a" name="custom-select2a">
|
<select id="custom-select2a" name="custom-select2a">
|
||||||
<option value="" data-placeholder="true">Choose One...</option>
|
<option value="" data-placeholder="true">Choose One...</option>
|
||||||
<option value="option1">Option #1</option>
|
<option value="option1">Option #1</option>
|
||||||
<option value="option2">Option #2</option>
|
<option value="option2">Option #2</option>
|
||||||
<option value="option3">Option #3 - This is a really f fsd f gdfgdgd gd gd gd fgd gd gd fgd fgfdreally really really really long label.</option>
|
<option value="option3">Option #3 - This is a really f fsd f gdfgdgd gd gd gd fgd gd gd fgd fgfdreally really really really long label.</option>
|
||||||
</select>
|
</select>
|
||||||
</form>
|
</form>
|
||||||
';*/
|
';*/
|
||||||
|
|
||||||
if (empty($noform)) $out.= '<form action="'.$urlsource.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc').'" name="'.$forname.'" id="'.$forname.'_form" method="post">';
|
if (empty($noform)) $out.= '<form action="'.$urlsource.(empty($conf->global->MAIN_JUMP_TAG)?'':'#builddoc').'" name="'.$forname.'" id="'.$forname.'_form" method="post">';
|
||||||
$out.= '<input type="hidden" name="action" value="builddoc">';
|
$out.= '<input type="hidden" name="action" value="builddoc">';
|
||||||
@@ -451,7 +451,7 @@ class FormFile
|
|||||||
$langs->load("errors");
|
$langs->load("errors");
|
||||||
$genbutton.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated"));
|
$genbutton.= ' '.img_warning($langs->transnoentitiesnoconv("WarningNoDocumentModelActivated"));
|
||||||
}
|
}
|
||||||
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton='';
|
if (! $allowgenifempty && ! is_array($modellist) && empty($modellist) && empty($conf->dol_no_mouse_hover) && $modulepart != 'unpaid') $genbutton='';
|
||||||
$out.= $genbutton;
|
$out.= $genbutton;
|
||||||
$out.= '</th>';
|
$out.= '</th>';
|
||||||
|
|
||||||
|
|||||||
@@ -945,30 +945,30 @@ class FormOther
|
|||||||
if (! count($arrayboxtoactivatelabel)) print 'jQuery("#boxcombo").hide();';
|
if (! count($arrayboxtoactivatelabel)) print 'jQuery("#boxcombo").hide();';
|
||||||
print '
|
print '
|
||||||
|
|
||||||
jQuery("#left, #right").sortable({
|
jQuery("#left, #right").sortable({
|
||||||
/* placeholder: \'ui-state-highlight\', */
|
/* placeholder: \'ui-state-highlight\', */
|
||||||
handle: \'.boxhandle\',
|
handle: \'.boxhandle\',
|
||||||
revert: \'invalid\',
|
revert: \'invalid\',
|
||||||
items: \'.box\',
|
items: \'.box\',
|
||||||
containment: \'.fiche\',
|
containment: \'.fiche\',
|
||||||
connectWith: \'.connectedSortable\',
|
connectWith: \'.connectedSortable\',
|
||||||
stop: function(event, ui) {
|
stop: function(event, ui) {
|
||||||
updateBoxOrder(0);
|
updateBoxOrder(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
jQuery(".boxclose").click(function() {
|
jQuery(".boxclose").click(function() {
|
||||||
var self = this; // because JQuery can modify this
|
var self = this; // because JQuery can modify this
|
||||||
var boxid=self.id.substring(8);
|
var boxid=self.id.substring(8);
|
||||||
var label=jQuery(\'#boxlabelentry\'+boxid).val();
|
var label=jQuery(\'#boxlabelentry\'+boxid).val();
|
||||||
jQuery(\'#boxto_\'+boxid).remove();
|
jQuery(\'#boxto_\'+boxid).remove();
|
||||||
if (boxid > 0) jQuery(\'#boxcombo\').append(new Option(label, boxid));
|
if (boxid > 0) jQuery(\'#boxcombo\').append(new Option(label, boxid));
|
||||||
updateBoxOrder(1);
|
updateBoxOrder(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
});'."\n";
|
});'."\n";
|
||||||
|
|
||||||
print '</script>'."\n";
|
print '</script>'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$nbboxactivated=count($boxidactivatedforuser);
|
$nbboxactivated=count($boxidactivatedforuser);
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ function run_sql($sqlfile,$silent=1,$entity='',$usesavepoint=1,$handler='',$oker
|
|||||||
$sqlmodified++;
|
$sqlmodified++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($sqlmodified) dol_syslog('Admin.lib::run_sql New Request '.($i+1).' sql='.$newsql, LOG_DEBUG);
|
if ($sqlmodified) dol_syslog('Admin.lib::run_sql New Request '.($i+1).' sql='.$newsql, LOG_DEBUG);
|
||||||
|
|
||||||
$result=$db->query($newsql,$usesavepoint);
|
$result=$db->query($newsql,$usesavepoint);
|
||||||
if ($result)
|
if ($result)
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ function barcode_encode_genbarcode($code,$encoding)
|
|||||||
|
|
||||||
$command=escapeshellarg($genbarcode_loc);
|
$command=escapeshellarg($genbarcode_loc);
|
||||||
//$paramclear=" \"".str_replace("\"", "\\\"",$code)."\" \"".str_replace("\"", "\\\"",strtoupper($encoding))."\"";
|
//$paramclear=" \"".str_replace("\"", "\\\"",$code)."\" \"".str_replace("\"", "\\\"",strtoupper($encoding))."\"";
|
||||||
$paramclear=" ".escapeshellarg($code)." ".escapeshellarg(strtoupper($encoding));
|
$paramclear=" ".escapeshellarg($code)." ".escapeshellarg(strtoupper($encoding));
|
||||||
|
|
||||||
$fullcommandclear=$command." ".$paramclear." 2>&1";
|
$fullcommandclear=$command." ".$paramclear." 2>&1";
|
||||||
//print $fullcommandclear."<br>\n";exit;
|
//print $fullcommandclear."<br>\n";exit;
|
||||||
|
|||||||
@@ -1251,171 +1251,171 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity)
|
|||||||
$ret=array();
|
$ret=array();
|
||||||
|
|
||||||
// Wrapping for some images
|
// Wrapping for some images
|
||||||
if ($modulepart == 'companylogo')
|
if ($modulepart == 'companylogo')
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->mycompany->dir_output.'/logos/'.$original_file;
|
$original_file=$conf->mycompany->dir_output.'/logos/'.$original_file;
|
||||||
}
|
|
||||||
// Wrapping for users photos
|
|
||||||
elseif ($modulepart == 'userphoto')
|
|
||||||
{
|
|
||||||
$accessallowed=1;
|
|
||||||
$original_file=$conf->user->dir_output.'/'.$original_file;
|
|
||||||
}
|
|
||||||
// Wrapping for members photos
|
|
||||||
elseif ($modulepart == 'memberphoto')
|
|
||||||
{
|
|
||||||
$accessallowed=1;
|
|
||||||
$original_file=$conf->adherent->dir_output.'/'.$original_file;
|
|
||||||
}
|
}
|
||||||
// Wrapping pour les apercu factures
|
// Wrapping for users photos
|
||||||
elseif ($modulepart == 'apercufacture')
|
elseif ($modulepart == 'userphoto')
|
||||||
{
|
{
|
||||||
if ($user->rights->facture->lire) $accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->facture->dir_output.'/'.$original_file;
|
$original_file=$conf->user->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les apercu propal
|
// Wrapping for members photos
|
||||||
elseif ($modulepart == 'apercupropal')
|
elseif ($modulepart == 'memberphoto')
|
||||||
{
|
{
|
||||||
if ($user->rights->propale->lire) $accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->propal->dir_output.'/'.$original_file;
|
$original_file=$conf->adherent->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les apercu commande
|
// Wrapping pour les apercu factures
|
||||||
elseif ($modulepart == 'apercucommande')
|
elseif ($modulepart == 'apercufacture')
|
||||||
{
|
{
|
||||||
if ($user->rights->commande->lire) $accessallowed=1;
|
if ($user->rights->facture->lire) $accessallowed=1;
|
||||||
$original_file=$conf->commande->dir_output.'/'.$original_file;
|
$original_file=$conf->facture->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les apercu intervention
|
// Wrapping pour les apercu propal
|
||||||
elseif ($modulepart == 'apercufichinter')
|
elseif ($modulepart == 'apercupropal')
|
||||||
{
|
{
|
||||||
if ($user->rights->ficheinter->lire) $accessallowed=1;
|
if ($user->rights->propale->lire) $accessallowed=1;
|
||||||
$original_file=$conf->ficheinter->dir_output.'/'.$original_file;
|
$original_file=$conf->propal->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats propales
|
// Wrapping pour les apercu commande
|
||||||
elseif ($modulepart == 'propalstats')
|
elseif ($modulepart == 'apercucommande')
|
||||||
{
|
{
|
||||||
if ($user->rights->propale->lire) $accessallowed=1;
|
if ($user->rights->commande->lire) $accessallowed=1;
|
||||||
$original_file=$conf->propal->dir_temp.'/'.$original_file;
|
$original_file=$conf->commande->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats commandes
|
// Wrapping pour les apercu intervention
|
||||||
elseif ($modulepart == 'orderstats')
|
elseif ($modulepart == 'apercufichinter')
|
||||||
{
|
{
|
||||||
if ($user->rights->commande->lire) $accessallowed=1;
|
if ($user->rights->ficheinter->lire) $accessallowed=1;
|
||||||
$original_file=$conf->commande->dir_temp.'/'.$original_file;
|
$original_file=$conf->ficheinter->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
elseif ($modulepart == 'orderstatssupplier')
|
// Wrapping pour les images des stats propales
|
||||||
{
|
elseif ($modulepart == 'propalstats')
|
||||||
if ($user->rights->fournisseur->commande->lire) $accessallowed=1;
|
{
|
||||||
$original_file=$conf->fournisseur->dir_output.'/commande/temp/'.$original_file;
|
if ($user->rights->propale->lire) $accessallowed=1;
|
||||||
}
|
$original_file=$conf->propal->dir_temp.'/'.$original_file;
|
||||||
// Wrapping pour les images des stats factures
|
}
|
||||||
elseif ($modulepart == 'billstats')
|
// Wrapping pour les images des stats commandes
|
||||||
{
|
elseif ($modulepart == 'orderstats')
|
||||||
if ($user->rights->facture->lire) $accessallowed=1;
|
{
|
||||||
$original_file=$conf->facture->dir_temp.'/'.$original_file;
|
if ($user->rights->commande->lire) $accessallowed=1;
|
||||||
}
|
$original_file=$conf->commande->dir_temp.'/'.$original_file;
|
||||||
elseif ($modulepart == 'billstatssupplier')
|
}
|
||||||
{
|
elseif ($modulepart == 'orderstatssupplier')
|
||||||
if ($user->rights->fournisseur->facture->lire) $accessallowed=1;
|
{
|
||||||
$original_file=$conf->fournisseur->dir_output.'/facture/temp/'.$original_file;
|
if ($user->rights->fournisseur->commande->lire) $accessallowed=1;
|
||||||
}
|
$original_file=$conf->fournisseur->dir_output.'/commande/temp/'.$original_file;
|
||||||
// Wrapping pour les images des stats expeditions
|
}
|
||||||
elseif ($modulepart == 'expeditionstats')
|
// Wrapping pour les images des stats factures
|
||||||
{
|
elseif ($modulepart == 'billstats')
|
||||||
if ($user->rights->expedition->lire) $accessallowed=1;
|
{
|
||||||
$original_file=$conf->expedition->dir_temp.'/'.$original_file;
|
if ($user->rights->facture->lire) $accessallowed=1;
|
||||||
}
|
$original_file=$conf->facture->dir_temp.'/'.$original_file;
|
||||||
// Wrapping pour les images des stats expeditions
|
}
|
||||||
elseif ($modulepart == 'tripsexpensesstats')
|
elseif ($modulepart == 'billstatssupplier')
|
||||||
{
|
{
|
||||||
if ($user->rights->deplacement->lire) $accessallowed=1;
|
if ($user->rights->fournisseur->facture->lire) $accessallowed=1;
|
||||||
$original_file=$conf->deplacement->dir_temp.'/'.$original_file;
|
$original_file=$conf->fournisseur->dir_output.'/facture/temp/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats expeditions
|
// Wrapping pour les images des stats expeditions
|
||||||
elseif ($modulepart == 'memberstats')
|
elseif ($modulepart == 'expeditionstats')
|
||||||
{
|
{
|
||||||
if ($user->rights->adherent->lire) $accessallowed=1;
|
if ($user->rights->expedition->lire) $accessallowed=1;
|
||||||
$original_file=$conf->adherent->dir_temp.'/'.$original_file;
|
$original_file=$conf->expedition->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images des stats produits
|
// Wrapping pour les images des stats expeditions
|
||||||
elseif (preg_match('/^productstats_/i',$modulepart))
|
elseif ($modulepart == 'tripsexpensesstats')
|
||||||
{
|
{
|
||||||
if ($user->rights->produit->lire || $user->rights->service->lire) $accessallowed=1;
|
if ($user->rights->deplacement->lire) $accessallowed=1;
|
||||||
$original_file=(!empty($conf->product->multidir_temp[$entity])?$conf->product->multidir_temp[$entity]:$conf->service->multidir_temp[$entity]).'/'.$original_file;
|
$original_file=$conf->deplacement->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping for products or services
|
// Wrapping pour les images des stats expeditions
|
||||||
elseif ($modulepart == 'tax')
|
elseif ($modulepart == 'memberstats')
|
||||||
{
|
{
|
||||||
if ($user->rights->tax->charges->lire) $accessallowed=1;
|
if ($user->rights->adherent->lire) $accessallowed=1;
|
||||||
$original_file=$conf->tax->dir_output.'/'.$original_file;
|
$original_file=$conf->adherent->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping for products or services
|
// Wrapping pour les images des stats produits
|
||||||
elseif ($modulepart == 'actions')
|
elseif (preg_match('/^productstats_/i',$modulepart))
|
||||||
{
|
{
|
||||||
if ($user->rights->agenda->myactions->read) $accessallowed=1;
|
if ($user->rights->produit->lire || $user->rights->service->lire) $accessallowed=1;
|
||||||
$original_file=$conf->agenda->dir_output.'/'.$original_file;
|
$original_file=(!empty($conf->product->multidir_temp[$entity])?$conf->product->multidir_temp[$entity]:$conf->service->multidir_temp[$entity]).'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping for categories
|
// Wrapping for products or services
|
||||||
elseif ($modulepart == 'category')
|
elseif ($modulepart == 'tax')
|
||||||
{
|
{
|
||||||
if ($user->rights->categorie->lire) $accessallowed=1;
|
if ($user->rights->tax->charges->lire) $accessallowed=1;
|
||||||
$original_file=$conf->categorie->multidir_output[$entity].'/'.$original_file;
|
$original_file=$conf->tax->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les prelevements
|
// Wrapping for products or services
|
||||||
elseif ($modulepart == 'prelevement')
|
elseif ($modulepart == 'actions')
|
||||||
|
{
|
||||||
|
if ($user->rights->agenda->myactions->read) $accessallowed=1;
|
||||||
|
$original_file=$conf->agenda->dir_output.'/'.$original_file;
|
||||||
|
}
|
||||||
|
// Wrapping for categories
|
||||||
|
elseif ($modulepart == 'category')
|
||||||
|
{
|
||||||
|
if ($user->rights->categorie->lire) $accessallowed=1;
|
||||||
|
$original_file=$conf->categorie->multidir_output[$entity].'/'.$original_file;
|
||||||
|
}
|
||||||
|
// Wrapping pour les prelevements
|
||||||
|
elseif ($modulepart == 'prelevement')
|
||||||
{
|
{
|
||||||
if ($user->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file))
|
if ($user->rights->prelevement->bons->lire || preg_match('/^specimen/i',$original_file))
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
}
|
}
|
||||||
$original_file=$conf->prelevement->dir_output.'/'.$original_file;
|
$original_file=$conf->prelevement->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les graph energie
|
// Wrapping pour les graph energie
|
||||||
elseif ($modulepart == 'graph_stock')
|
elseif ($modulepart == 'graph_stock')
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->stock->dir_temp.'/'.$original_file;
|
$original_file=$conf->stock->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les graph fournisseurs
|
// Wrapping pour les graph fournisseurs
|
||||||
elseif ($modulepart == 'graph_fourn')
|
elseif ($modulepart == 'graph_fourn')
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->fournisseur->dir_temp.'/'.$original_file;
|
$original_file=$conf->fournisseur->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les graph des produits
|
// Wrapping pour les graph des produits
|
||||||
elseif ($modulepart == 'graph_product')
|
elseif ($modulepart == 'graph_product')
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->product->multidir_temp[$entity].'/'.$original_file;
|
$original_file=$conf->product->multidir_temp[$entity].'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les code barre
|
// Wrapping pour les code barre
|
||||||
elseif ($modulepart == 'barcode')
|
elseif ($modulepart == 'barcode')
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
// If viewimage is called for barcode, we try to output an image on the fly,
|
// If viewimage is called for barcode, we try to output an image on the fly,
|
||||||
// with not build of file on disk.
|
// with not build of file on disk.
|
||||||
//$original_file=$conf->barcode->dir_temp.'/'.$original_file;
|
//$original_file=$conf->barcode->dir_temp.'/'.$original_file;
|
||||||
$original_file='';
|
$original_file='';
|
||||||
}
|
}
|
||||||
// Wrapping pour les icones de background des mailings
|
// Wrapping pour les icones de background des mailings
|
||||||
elseif ($modulepart == 'iconmailing')
|
elseif ($modulepart == 'iconmailing')
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->mailing->dir_temp.'/'.$original_file;
|
$original_file=$conf->mailing->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les icones de background des mailings
|
// Wrapping pour les icones de background des mailings
|
||||||
elseif ($modulepart == 'scanner_user_temp')
|
elseif ($modulepart == 'scanner_user_temp')
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->scanner->dir_temp.'/'.$user->id.'/'.$original_file;
|
$original_file=$conf->scanner->dir_temp.'/'.$user->id.'/'.$original_file;
|
||||||
}
|
}
|
||||||
// Wrapping pour les images fckeditor
|
// Wrapping pour les images fckeditor
|
||||||
elseif ($modulepart == 'fckeditor')
|
elseif ($modulepart == 'fckeditor')
|
||||||
{
|
{
|
||||||
$accessallowed=1;
|
$accessallowed=1;
|
||||||
$original_file=$conf->fckeditor->dir_output.'/'.$original_file;
|
$original_file=$conf->fckeditor->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Wrapping for third parties
|
// Wrapping for third parties
|
||||||
else if ($modulepart == 'company' || $modulepart == 'societe')
|
else if ($modulepart == 'company' || $modulepart == 'societe')
|
||||||
@@ -1707,36 +1707,36 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Define $accessallowed
|
// Define $accessallowed
|
||||||
if (preg_match('/^([a-z]+)_user_temp$/i',$modulepart,$reg))
|
if (preg_match('/^([a-z]+)_user_temp$/i',$modulepart,$reg))
|
||||||
{
|
{
|
||||||
if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1;
|
if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1;
|
||||||
$original_file=$conf->$reg[1]->dir_temp.'/'.$user->id.'/'.$original_file;
|
$original_file=$conf->$reg[1]->dir_temp.'/'.$user->id.'/'.$original_file;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^([a-z]+)_temp$/i',$modulepart,$reg))
|
else if (preg_match('/^([a-z]+)_temp$/i',$modulepart,$reg))
|
||||||
{
|
{
|
||||||
if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1;
|
if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1;
|
||||||
$original_file=$conf->$reg[1]->dir_temp.'/'.$original_file;
|
$original_file=$conf->$reg[1]->dir_temp.'/'.$original_file;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^([a-z]+)_user$/i',$modulepart,$reg))
|
else if (preg_match('/^([a-z]+)_user$/i',$modulepart,$reg))
|
||||||
{
|
{
|
||||||
if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1;
|
if ($user->rights->$reg[1]->lire || $user->rights->$reg[1]->read || ($user->rights->$reg[1]->download)) $accessallowed=1;
|
||||||
$original_file=$conf->$reg[1]->dir_output.'/'.$user->id.'/'.$original_file;
|
$original_file=$conf->$reg[1]->dir_output.'/'.$user->id.'/'.$original_file;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$perm=GETPOST('perm');
|
$perm=GETPOST('perm');
|
||||||
$subperm=GETPOST('subperm');
|
$subperm=GETPOST('subperm');
|
||||||
if ($perm || $subperm)
|
if ($perm || $subperm)
|
||||||
{
|
{
|
||||||
if (($perm && ! $subperm && $user->rights->$modulepart->$perm) || ($perm && $subperm && $user->rights->$modulepart->$perm->$subperm)) $accessallowed=1;
|
if (($perm && ! $subperm && $user->rights->$modulepart->$perm) || ($perm && $subperm && $user->rights->$modulepart->$perm->$subperm)) $accessallowed=1;
|
||||||
$original_file=$conf->$modulepart->dir_output.'/'.$original_file;
|
$original_file=$conf->$modulepart->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($user->rights->$modulepart->lire || $user->rights->$modulepart->read) $accessallowed=1;
|
if ($user->rights->$modulepart->lire || $user->rights->$modulepart->read) $accessallowed=1;
|
||||||
$original_file=$conf->$modulepart->dir_output.'/'.$original_file;
|
$original_file=$conf->$modulepart->dir_output.'/'.$original_file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (preg_match('/^specimen/i',$original_file)) $accessallowed=1; // If link to a specimen
|
if (preg_match('/^specimen/i',$original_file)) $accessallowed=1; // If link to a specimen
|
||||||
if ($user->admin) $accessallowed=1; // If user is admin
|
if ($user->admin) $accessallowed=1; // If user is admin
|
||||||
|
|
||||||
|
|||||||
@@ -741,7 +741,7 @@ function dol_format_address($object,$withcountry=0,$sep="\n")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($withcountry) $ret.=($object->country?$sep.$object->country:'');
|
if ($withcountry) $ret.=($object->country?$sep.$object->country:'');
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
@@ -834,12 +834,12 @@ function dol_print_date($time,$format='',$tzoutput='tzserver',$outputlangs='',$e
|
|||||||
else if ($format == 'dayxcard') $format='%Y%m%d';
|
else if ($format == 'dayxcard') $format='%Y%m%d';
|
||||||
else if ($format == 'dayrfc') $format='%Y-%m-%d'; // DATE_RFC3339
|
else if ($format == 'dayrfc') $format='%Y-%m-%d'; // DATE_RFC3339
|
||||||
else if ($format == 'dayhourrfc') $format='%Y-%m-%dT%H:%M:%SZ'; // DATETIME RFC3339
|
else if ($format == 'dayhourrfc') $format='%Y-%m-%dT%H:%M:%SZ'; // DATETIME RFC3339
|
||||||
else if ($format == 'standard') $format='%Y-%m-%d %H:%M:%S';
|
else if ($format == 'standard') $format='%Y-%m-%d %H:%M:%S';
|
||||||
|
|
||||||
if ($reduceformat)
|
if ($reduceformat)
|
||||||
{
|
{
|
||||||
$format=str_replace('%Y','%y',$format);
|
$format=str_replace('%Y','%y',$format);
|
||||||
$format=str_replace('yyyy','yy',$format);
|
$format=str_replace('yyyy','yy',$format);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If date undefined or "", we return ""
|
// If date undefined or "", we return ""
|
||||||
@@ -1230,8 +1230,8 @@ function dol_print_phone($phone,$country='',$cid=0,$socid=0,$addlink='',$separ="
|
|||||||
{
|
{
|
||||||
if (! empty($conf->browser->phone)) // If phone, we use link of phone
|
if (! empty($conf->browser->phone)) // If phone, we use link of phone
|
||||||
{
|
{
|
||||||
$newphone ='<a href="tel:'.$phone.'"';
|
$newphone ='<a href="tel:'.$phone.'"';
|
||||||
$newphone.='>'.$phone.'</a>';
|
$newphone.='>'.$phone.'</a>';
|
||||||
}
|
}
|
||||||
else if (! empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') // If click to dial, we use click to dial url
|
else if (! empty($conf->clicktodial->enabled) && $addlink == 'AC_TEL') // If click to dial, we use click to dial url
|
||||||
{
|
{
|
||||||
@@ -2331,10 +2331,10 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
|
|||||||
|
|
||||||
if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
|
if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
|
||||||
{
|
{
|
||||||
$options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam);
|
$options=preg_replace('/sortfield=([a-zA-Z0-9,\s\.]+)/i','',$moreparam);
|
||||||
$options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options);
|
$options=preg_replace('/sortorder=([a-zA-Z0-9,\s\.]+)/i','',$options);
|
||||||
$options=preg_replace('/&+/i','&',$options);
|
$options=preg_replace('/&+/i','&',$options);
|
||||||
if (! preg_match('/^&/',$options)) $options='&'.$options;
|
if (! preg_match('/^&/',$options)) $options='&'.$options;
|
||||||
|
|
||||||
if ($sortorder == 'DESC' ) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">';
|
if ($sortorder == 'DESC' ) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=asc&begin='.$begin.$options.'">';
|
||||||
if ($sortorder == 'ASC' ) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">';
|
if ($sortorder == 'ASC' ) $out.= '<a href="'.$file.'?sortfield='.$field.'&sortorder=desc&begin='.$begin.$options.'">';
|
||||||
@@ -2344,7 +2344,7 @@ function getTitleFieldOfList($name, $thead=0, $file="", $field="", $begin="", $m
|
|||||||
|
|
||||||
if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
|
if (! empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
|
||||||
{
|
{
|
||||||
$out.='</a>';
|
$out.='</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
|
if (empty($conf->dol_optimize_smallscreen) && empty($thead) && $field) // If this is a sort field
|
||||||
|
|||||||
@@ -748,18 +748,18 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
|||||||
{
|
{
|
||||||
$counterpadded=str_pad($counter,dol_strlen($maskcounter),"0",STR_PAD_LEFT);
|
$counterpadded=str_pad($counter,dol_strlen($maskcounter),"0",STR_PAD_LEFT);
|
||||||
|
|
||||||
// Define $maskLike
|
// Define $maskLike
|
||||||
$maskLike = dol_string_nospecial($mask);
|
$maskLike = dol_string_nospecial($mask);
|
||||||
$maskLike = str_replace("%","_",$maskLike);
|
$maskLike = str_replace("%","_",$maskLike);
|
||||||
// Replace protected special codes with matching number of _ as wild card caracter
|
// Replace protected special codes with matching number of _ as wild card caracter
|
||||||
$maskLike = preg_replace('/\{yyyy\}/i','____',$maskLike);
|
$maskLike = preg_replace('/\{yyyy\}/i','____',$maskLike);
|
||||||
$maskLike = preg_replace('/\{yy\}/i','__',$maskLike);
|
$maskLike = preg_replace('/\{yy\}/i','__',$maskLike);
|
||||||
$maskLike = preg_replace('/\{y\}/i','_',$maskLike);
|
$maskLike = preg_replace('/\{y\}/i','_',$maskLike);
|
||||||
$maskLike = preg_replace('/\{mm\}/i','__',$maskLike);
|
$maskLike = preg_replace('/\{mm\}/i','__',$maskLike);
|
||||||
$maskLike = preg_replace('/\{dd\}/i','__',$maskLike);
|
$maskLike = preg_replace('/\{dd\}/i','__',$maskLike);
|
||||||
$maskLike = str_replace(dol_string_nospecial('{'.$masktri.'}'),$counterpadded,$maskLike);
|
$maskLike = str_replace(dol_string_nospecial('{'.$masktri.'}'),$counterpadded,$maskLike);
|
||||||
if ($maskrefclient) $maskLike = str_replace(dol_string_nospecial('{'.$maskrefclient.'}'),str_pad("",dol_strlen($maskrefclient),"_"),$maskLike);
|
if ($maskrefclient) $maskLike = str_replace(dol_string_nospecial('{'.$maskrefclient.'}'),str_pad("",dol_strlen($maskrefclient),"_"),$maskLike);
|
||||||
if ($masktype) $maskLike = str_replace(dol_string_nospecial('{'.$masktype.'}'),$masktype_value,$maskLike);
|
if ($masktype) $maskLike = str_replace(dol_string_nospecial('{'.$masktype.'}'),$masktype_value,$maskLike);
|
||||||
|
|
||||||
$ref='';
|
$ref='';
|
||||||
$sql = "SELECT ".$field." as ref";
|
$sql = "SELECT ".$field." as ref";
|
||||||
@@ -767,8 +767,8 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
|
|||||||
$sql.= " WHERE ".$field." LIKE '".$maskLike."'";
|
$sql.= " WHERE ".$field." LIKE '".$maskLike."'";
|
||||||
$sql.= " AND ".$field." NOT LIKE '%PROV%'";
|
$sql.= " AND ".$field." NOT LIKE '%PROV%'";
|
||||||
$sql.= " AND entity IN (".getEntity($table, 1).")";
|
$sql.= " AND entity IN (".getEntity($table, 1).")";
|
||||||
if ($where) $sql.=$where;
|
if ($where) $sql.=$where;
|
||||||
if ($sqlwhere) $sql.=' AND '.$sqlwhere;
|
if ($sqlwhere) $sql.=' AND '.$sqlwhere;
|
||||||
|
|
||||||
dol_syslog("functions2::get_next_value sql=".$sql);
|
dol_syslog("functions2::get_next_value sql=".$sql);
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
|
|||||||
@@ -229,7 +229,7 @@ function rebuild_merge_pdf($db, $langs, $conf, $diroutputpdf, $newlangid, $filte
|
|||||||
$filename='mergedpdf';
|
$filename='mergedpdf';
|
||||||
|
|
||||||
if (! empty($option)) $filename.='_'.$option;
|
if (! empty($option)) $filename.='_'.$option;
|
||||||
$file=$diroutputpdf.'/'.$filename.'.pdf';
|
$file=$diroutputpdf.'/'.$filename.'.pdf';
|
||||||
|
|
||||||
if (! $error && $pagecount)
|
if (! $error && $pagecount)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -291,9 +291,9 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
|||||||
// Set dol_hide_topmenu, dol_hide_leftmenu, dol_optimize_smallscreen, dol_nomousehover
|
// Set dol_hide_topmenu, dol_hide_leftmenu, dol_optimize_smallscreen, dol_nomousehover
|
||||||
$dol_hide_topmenu=GETPOST('dol_hide_topmenu');
|
$dol_hide_topmenu=GETPOST('dol_hide_topmenu');
|
||||||
$dol_hide_leftmenu=GETPOST('dol_hide_leftmenu');
|
$dol_hide_leftmenu=GETPOST('dol_hide_leftmenu');
|
||||||
$dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen');
|
$dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen');
|
||||||
$dol_no_mouse_hover=GETPOST('dol_no_mouse_hover');
|
$dol_no_mouse_hover=GETPOST('dol_no_mouse_hover');
|
||||||
$dol_use_jmobile=GETPOST('dol_use_jmobile');
|
$dol_use_jmobile=GETPOST('dol_use_jmobile');
|
||||||
|
|
||||||
// Include login page template
|
// Include login page template
|
||||||
include $template_dir.'login.tpl.php';
|
include $template_dir.'login.tpl.php';
|
||||||
|
|||||||
@@ -76,8 +76,8 @@ function print_auguria_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0)
|
|||||||
}
|
}
|
||||||
$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);
|
||||||
$url=preg_replace('/__USERID__/',$user->id,$url);
|
$url=preg_replace('/__USERID__/',$user->id,$url);
|
||||||
$shorturl=preg_replace('/__USERID__/',$user->id,$shorturl);
|
$shorturl=preg_replace('/__USERID__/',$user->id,$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"';
|
||||||
@@ -238,54 +238,54 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
$menuArbo = new Menubase($db,'auguria');
|
$menuArbo = new Menubase($db,'auguria');
|
||||||
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,($user->societe_id?1:0),'auguria',$tabMenu);
|
$newmenu = $menuArbo->menuLeftCharger($newmenu,$mainmenu,$leftmenu,($user->societe_id?1:0),'auguria',$tabMenu);
|
||||||
|
|
||||||
// We update newmenu for special dynamic menus
|
// We update newmenu for special dynamic menus
|
||||||
if ($conf->banque->enabled && $user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account
|
if ($conf->banque->enabled && $user->rights->banque->lire && $mainmenu == 'bank') // Entry for each bank account
|
||||||
{
|
{
|
||||||
$sql = "SELECT rowid, label, courant, rappro, courant";
|
$sql = "SELECT rowid, label, courant, rappro, courant";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
|
||||||
$sql.= " WHERE entity = ".$conf->entity;
|
$sql.= " WHERE entity = ".$conf->entity;
|
||||||
$sql.= " AND clos = 0";
|
$sql.= " AND clos = 0";
|
||||||
$sql.= " ORDER BY label";
|
$sql.= " ORDER BY label";
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$numr = $db->num_rows($resql);
|
$numr = $db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
if ($numr > 0) $newmenu->add('/compta/bank/index.php',$langs->trans("BankAccounts"),0,$user->rights->banque->lire);
|
if ($numr > 0) $newmenu->add('/compta/bank/index.php',$langs->trans("BankAccounts"),0,$user->rights->banque->lire);
|
||||||
|
|
||||||
while ($i < $numr)
|
while ($i < $numr)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
$newmenu->add('/compta/bank/fiche.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire);
|
$newmenu->add('/compta/bank/fiche.php?id='.$objp->rowid,$objp->label,1,$user->rights->banque->lire);
|
||||||
if ($objp->rappro && $objp->courant != 2 && empty($objp->clos)) // If not cash account and not closed and can be reconciliate
|
if ($objp->rappro && $objp->courant != 2 && empty($objp->clos)) // If not cash account and not closed and can be reconciliate
|
||||||
{
|
{
|
||||||
$newmenu->add('/compta/bank/rappro.php?account='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate);
|
$newmenu->add('/compta/bank/rappro.php?account='.$objp->rowid,$langs->trans("Conciliate"),2,$user->rights->banque->consolidate);
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else dol_print_error($db);
|
else dol_print_error($db);
|
||||||
$db->free($resql);
|
$db->free($resql);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP
|
if ($conf->ftp->enabled && $mainmenu == 'ftp') // Entry for FTP
|
||||||
{
|
{
|
||||||
$MAXFTP=20;
|
$MAXFTP=20;
|
||||||
$i=1;
|
$i=1;
|
||||||
while ($i <= $MAXFTP)
|
while ($i <= $MAXFTP)
|
||||||
{
|
{
|
||||||
$paramkey='FTP_NAME_'.$i;
|
$paramkey='FTP_NAME_'.$i;
|
||||||
//print $paramkey;
|
//print $paramkey;
|
||||||
if (! empty($conf->global->$paramkey))
|
if (! empty($conf->global->$paramkey))
|
||||||
{
|
{
|
||||||
$link="/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i;
|
$link="/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i;
|
||||||
|
|
||||||
$newmenu->add($link, dol_trunc($conf->global->$paramkey,24));
|
$newmenu->add($link, dol_trunc($conf->global->$paramkey,24));
|
||||||
}
|
}
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -335,8 +335,8 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
|
|
||||||
// Add mainmenu in GET url. This make to go back on correct menu even when using Back on browser.
|
// Add mainmenu in GET url. This make to go back on correct menu even when using Back on browser.
|
||||||
$url=dol_buildpath($menu_array[$i]['url'],1);
|
$url=dol_buildpath($menu_array[$i]['url'],1);
|
||||||
$url=preg_replace('/__LOGIN__/',$user->login,$url);
|
$url=preg_replace('/__LOGIN__/',$user->login,$url);
|
||||||
$url=preg_replace('/__USERID__/',$user->id,$url);
|
$url=preg_replace('/__USERID__/',$user->id,$url);
|
||||||
|
|
||||||
if (! preg_match('/mainmenu=/i',$menu_array[$i]['url']))
|
if (! preg_match('/mainmenu=/i',$menu_array[$i]['url']))
|
||||||
{
|
{
|
||||||
@@ -345,7 +345,7 @@ function print_left_auguria_menu($db,$menu_array_before,$menu_array_after,&$tabM
|
|||||||
$url.='mainmenu='.$mainmenu;
|
$url.='mainmenu='.$mainmenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<!-- Process menu entry with mainmenu='.$menu_array[$i]['mainmenu'].', leftmenu='.$menu_array[$i]['leftmenu'].', level='.$menu_array[$i]['level'].' enabled='.$menu_array[$i]['enabled'].' -->'."\n";
|
print '<!-- Process menu entry with mainmenu='.$menu_array[$i]['mainmenu'].', leftmenu='.$menu_array[$i]['leftmenu'].', level='.$menu_array[$i]['level'].' enabled='.$menu_array[$i]['enabled'].' -->'."\n";
|
||||||
|
|
||||||
// Menu niveau 0
|
// Menu niveau 0
|
||||||
if ($menu_array[$i]['level'] == 0)
|
if ($menu_array[$i]['level'] == 0)
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ class MenuManager
|
|||||||
// 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"]:'';
|
||||||
}
|
}
|
||||||
if (! empty($forceleftmenu)) $leftmenu=$forceleftmenu;
|
if (! empty($forceleftmenu)) $leftmenu=$forceleftmenu;
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
||||||
$tabMenu=array();
|
$tabMenu=array();
|
||||||
@@ -191,8 +191,8 @@ class MenuManager
|
|||||||
if ($val['enabled'] == 1)
|
if ($val['enabled'] == 1)
|
||||||
{
|
{
|
||||||
$relurl=dol_buildpath($val['url'],1);
|
$relurl=dol_buildpath($val['url'],1);
|
||||||
$relurl=preg_replace('/__LOGIN__/',$user->login,$relurl);
|
$relurl=preg_replace('/__LOGIN__/',$user->login,$relurl);
|
||||||
$relurl=preg_replace('/__USERID__/',$user->id,$relurl);
|
$relurl=preg_replace('/__USERID__/',$user->id,$relurl);
|
||||||
|
|
||||||
print '<a href="#">'.$val['titre'].'</a>'."\n";
|
print '<a href="#">'.$val['titre'].'</a>'."\n";
|
||||||
// Search submenu fot this entry
|
// Search submenu fot this entry
|
||||||
@@ -201,7 +201,7 @@ class MenuManager
|
|||||||
$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);
|
||||||
@@ -210,12 +210,12 @@ class MenuManager
|
|||||||
if (($canonrelurl != $canonnexturl && ! in_array($val['mainmenu'],array('tools')))
|
if (($canonrelurl != $canonnexturl && ! in_array($val['mainmenu'],array('tools')))
|
||||||
|| (strpos($canonrelurl,'/product/index.php') !== false || strpos($canonrelurl,'/compta/bank/index.php') !== false))
|
|| (strpos($canonrelurl,'/product/index.php') !== false || strpos($canonrelurl,'/compta/bank/index.php') !== false))
|
||||||
{
|
{
|
||||||
// We add sub entry
|
// We add sub entry
|
||||||
print str_pad('',1).'<li data-role="list-divider" class="lilevel1 ui-btn-icon-right ui-btn">'; // ui-btn to highlight on clic
|
print str_pad('',1).'<li data-role="list-divider" class="lilevel1 ui-btn-icon-right ui-btn">'; // ui-btn to highlight on clic
|
||||||
print '<a href="'.$relurl.'">';
|
print '<a href="'.$relurl.'">';
|
||||||
print str_pad('',12,' ');
|
print str_pad('',12,' ');
|
||||||
print $langs->trans(ucfirst($val['mainmenu'])."Dashboard");
|
print $langs->trans(ucfirst($val['mainmenu'])."Dashboard");
|
||||||
print '</a>';
|
print '</a>';
|
||||||
print '</li>'."\n";
|
print '</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'
|
||||||
@@ -226,8 +226,8 @@ class MenuManager
|
|||||||
$canonurl2=preg_replace('/\?.*$/','',$val2['url']);
|
$canonurl2=preg_replace('/\?.*$/','',$val2['url']);
|
||||||
//var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']);
|
//var_dump($val2['url'].' - '.$canonurl2.' - '.$val2['level']);
|
||||||
if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2='';
|
if (in_array($canonurl2,array('/admin/index.php','/admin/tools/index.php','/core/tools.php'))) $relurl2='';
|
||||||
if ($val2['level']==0) print str_pad('',$val2['level']+1).'<li'.($val2['level']==0?' data-role="list-divider"':'').' class="lilevel'.($val2['level']+1).' ui-btn-icon-right ui-btn">'; // ui-btn to highlight on clic
|
if ($val2['level']==0) print str_pad('',$val2['level']+1).'<li'.($val2['level']==0?' data-role="list-divider"':'').' class="lilevel'.($val2['level']+1).' ui-btn-icon-right ui-btn">'; // ui-btn to highlight on clic
|
||||||
else print str_pad('',$val2['level']+1).'<li class="lilevel'.($val2['level']+1).'">'; // ui-btn to highlight on clic
|
else print str_pad('',$val2['level']+1).'<li class="lilevel'.($val2['level']+1).'">'; // ui-btn to highlight on clic
|
||||||
if ($relurl2) print '<a href="'.$relurl2.'">';
|
if ($relurl2) print '<a href="'.$relurl2.'">';
|
||||||
print str_pad('',($val2['level']+1)*12,' ');
|
print str_pad('',($val2['level']+1)*12,' ');
|
||||||
print $val2['titre'];
|
print $val2['titre'];
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ class MenuManager
|
|||||||
// 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 (! empty($forcemainmenu)) $mainmenu=$forcemainmenu;
|
if (! empty($forcemainmenu)) $mainmenu=$forcemainmenu;
|
||||||
|
|
||||||
if (isset($_GET["leftmenu"]))
|
if (isset($_GET["leftmenu"]))
|
||||||
{
|
{
|
||||||
@@ -98,7 +98,7 @@ class MenuManager
|
|||||||
// 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"]:'';
|
||||||
}
|
}
|
||||||
if (! empty($forceleftmenu)) $leftmenu=$forceleftmenu;
|
if (! empty($forceleftmenu)) $leftmenu=$forceleftmenu;
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/menubase.class.php';
|
||||||
$tabMenu=array();
|
$tabMenu=array();
|
||||||
@@ -145,8 +145,8 @@ class MenuManager
|
|||||||
if ($val['enabled'] == 1)
|
if ($val['enabled'] == 1)
|
||||||
{
|
{
|
||||||
$relurl=dol_buildpath($val['url'],1);
|
$relurl=dol_buildpath($val['url'],1);
|
||||||
$relurl=preg_replace('/__LOGIN__/',$user->login,$relurl);
|
$relurl=preg_replace('/__LOGIN__/',$user->login,$relurl);
|
||||||
$relurl=preg_replace('/__USERID__/',$user->id,$relurl);
|
$relurl=preg_replace('/__USERID__/',$user->id,$relurl);
|
||||||
|
|
||||||
print '<a href="#">'.$val['titre'].'</a>'."\n";
|
print '<a href="#">'.$val['titre'].'</a>'."\n";
|
||||||
// Search submenu fot this entry
|
// Search submenu fot this entry
|
||||||
@@ -158,7 +158,7 @@ class MenuManager
|
|||||||
|
|
||||||
$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>'."\n";
|
print '<ul>'."\n";
|
||||||
if (($canonrelurl != $canonnexturl && ! in_array($val['mainmenu'],array('tools')))
|
if (($canonrelurl != $canonnexturl && ! in_array($val['mainmenu'],array('tools')))
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class MenuManager
|
|||||||
if (empty($noout)) print_start_menu_entry_empty($idsel, $classname, $showmode);
|
if (empty($noout)) print_start_menu_entry_empty($idsel, $classname, $showmode);
|
||||||
if (empty($noout)) print_text_menu_entry_empty($langs->trans("Home"), 1, dol_buildpath('/index.php',1).'?mainmenu=home&leftmenu=', $id, $idsel, $classname, $this->atarget);
|
if (empty($noout)) print_text_menu_entry_empty($langs->trans("Home"), 1, dol_buildpath('/index.php',1).'?mainmenu=home&leftmenu=', $id, $idsel, $classname, $this->atarget);
|
||||||
if (empty($noout)) print_end_menu_entry_empty($showmode);
|
if (empty($noout)) print_end_menu_entry_empty($showmode);
|
||||||
$this->menu->add(dol_buildpath('/index.php',1), $langs->trans("Home"), 0, $showmode, $this->atarget, 'home', '');
|
$this->menu->add(dol_buildpath('/index.php',1), $langs->trans("Home"), 0, $showmode, $this->atarget, 'home', '');
|
||||||
|
|
||||||
if (empty($noout)) print_end_menu_array_empty();
|
if (empty($noout)) print_end_menu_array_empty();
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ class MenuManager
|
|||||||
{
|
{
|
||||||
$this->leftmenu=dol_clone($this->menu);
|
$this->leftmenu=dol_clone($this->menu);
|
||||||
unset($this->menu->liste);
|
unset($this->menu->liste);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'jmobile')
|
if ($mode == 'jmobile')
|
||||||
@@ -221,32 +221,32 @@ class MenuManager
|
|||||||
//var_dump($canonnexturl);
|
//var_dump($canonnexturl);
|
||||||
print '<ul>';
|
print '<ul>';
|
||||||
if ($canonrelurl != $canonnexturl && ! in_array($val['mainmenu'],array('home','tools')))
|
if ($canonrelurl != $canonnexturl && ! in_array($val['mainmenu'],array('home','tools')))
|
||||||
{
|
{
|
||||||
// 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);
|
||||||
$relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2);
|
$relurl2=preg_replace('/__LOGIN__/',$user->login,$relurl2);
|
||||||
$relurl2=preg_replace('/__USERID__/',$user->id,$relurl2);
|
$relurl2=preg_replace('/__USERID__/',$user->id,$relurl2);
|
||||||
//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";
|
||||||
|
|
||||||
break; // Only first menu entry (so home)
|
break; // Only first menu entry (so home)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unset($this->menu);
|
unset($this->menu);
|
||||||
|
|
||||||
return $res;
|
return $res;
|
||||||
|
|||||||
@@ -609,7 +609,7 @@ abstract class DolibarrModules
|
|||||||
$file = $this->boxes[$key]['file'];
|
$file = $this->boxes[$key]['file'];
|
||||||
//$note = $this->boxes[$key][2];
|
//$note = $this->boxes[$key][2];
|
||||||
|
|
||||||
if (empty($file)) $file = isset($this->boxes[$key][1])?$this->boxes[$key][1]:''; // For backward compatibility
|
if (empty($file)) $file = isset($this->boxes[$key][1])?$this->boxes[$key][1]:''; // For backward compatibility
|
||||||
|
|
||||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes";
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes";
|
||||||
$sql.= " USING ".MAIN_DB_PREFIX."boxes, ".MAIN_DB_PREFIX."boxes_def";
|
$sql.= " USING ".MAIN_DB_PREFIX."boxes, ".MAIN_DB_PREFIX."boxes_def";
|
||||||
|
|||||||
@@ -655,9 +655,9 @@ function tablewithentity($table)
|
|||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$resql=$db->DDLDescTable($table,'entity');
|
$resql=$db->DDLDescTable($table,'entity');
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$i=0;
|
$i=0;
|
||||||
$obj=$db->fetch_object($resql);
|
$obj=$db->fetch_object($resql);
|
||||||
if ($obj) return 1;
|
if ($obj) return 1;
|
||||||
else return 0;
|
else return 0;
|
||||||
|
|||||||
@@ -150,17 +150,17 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
{
|
{
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
// Definition of $dir and $file
|
// Definition of $dir and $file
|
||||||
if ($object->specimen)
|
if ($object->specimen)
|
||||||
{
|
{
|
||||||
$dir = $conf->expedition->dir_output."/receipt";
|
$dir = $conf->expedition->dir_output."/receipt";
|
||||||
$file = $dir . "/SPECIMEN.pdf";
|
$file = $dir . "/SPECIMEN.pdf";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$objectref = dol_sanitizeFileName($object->ref);
|
$objectref = dol_sanitizeFileName($object->ref);
|
||||||
$dir = $conf->expedition->dir_output."/receipt/" . $objectref;
|
$dir = $conf->expedition->dir_output."/receipt/" . $objectref;
|
||||||
$file = $dir . "/" . $objectref . ".pdf";
|
$file = $dir . "/" . $objectref . ".pdf";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! file_exists($dir))
|
if (! file_exists($dir))
|
||||||
@@ -287,39 +287,39 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
// Description of product line
|
// Description of product line
|
||||||
$curX = $this->posxdesc-1;
|
$curX = $this->posxdesc-1;
|
||||||
|
|
||||||
$showpricebeforepagebreak=1;
|
$showpricebeforepagebreak=1;
|
||||||
|
|
||||||
$pdf->startTransaction();
|
$pdf->startTransaction();
|
||||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxcomm-$curX,3,$curX,$curY,$hideref,$hidedesc);
|
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxcomm-$curX,3,$curX,$curY,$hideref,$hidedesc);
|
||||||
$pageposafter=$pdf->getPage();
|
$pageposafter=$pdf->getPage();
|
||||||
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
||||||
{
|
{
|
||||||
$pdf->rollbackTransaction(true);
|
$pdf->rollbackTransaction(true);
|
||||||
$pageposafter=$pageposbefore;
|
$pageposafter=$pageposbefore;
|
||||||
//print $pageposafter.'-'.$pageposbefore;exit;
|
//print $pageposafter.'-'.$pageposbefore;exit;
|
||||||
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
||||||
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxcomm-$curX,4,$curX,$curY,$hideref,$hidedesc);
|
pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxcomm-$curX,4,$curX,$curY,$hideref,$hidedesc);
|
||||||
$posyafter=$pdf->GetY();
|
$posyafter=$pdf->GetY();
|
||||||
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
if ($posyafter > ($this->page_hauteur - ($heightforfooter+$heightforfreetext+$heightforinfotot))) // There is no space left for total+free text
|
||||||
{
|
{
|
||||||
if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
|
if ($i == ($nblines-1)) // No more lines, and no space left to show total, so we create a new page
|
||||||
{
|
{
|
||||||
$pdf->AddPage('','',true);
|
$pdf->AddPage('','',true);
|
||||||
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
if (! empty($tplidx)) $pdf->useTemplate($tplidx);
|
||||||
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
if (empty($conf->global->MAIN_PDF_DONOTREPEAT_HEAD)) $this->_pagehead($pdf, $object, 0, $outputlangs);
|
||||||
$pdf->setPage($pagenb+1);
|
$pdf->setPage($pagenb+1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// We found a page break
|
// We found a page break
|
||||||
$showpricebeforepagebreak=0;
|
$showpricebeforepagebreak=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else // No pagebreak
|
else // No pagebreak
|
||||||
{
|
{
|
||||||
$pdf->commitTransaction();
|
$pdf->commitTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
$nexY = $pdf->GetY();
|
$nexY = $pdf->GetY();
|
||||||
$pageposafter=$pdf->getPage();
|
$pageposafter=$pdf->getPage();
|
||||||
@@ -526,31 +526,31 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show miscellaneous information (payment mode, payment term, ...)
|
* Show miscellaneous information (payment mode, payment term, ...)
|
||||||
*
|
*
|
||||||
* @param PDF &$pdf Object PDF
|
* @param PDF &$pdf Object PDF
|
||||||
* @param Object $object Object to show
|
* @param Object $object Object to show
|
||||||
* @param int $posy Y
|
* @param int $posy Y
|
||||||
* @param Translate $outputlangs Langs object
|
* @param Translate $outputlangs Langs object
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
function _tableau_info(&$pdf, $object, $posy, $outputlangs)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size);
|
$pdf->SetFont('','', $default_font_size);
|
||||||
$pdf->SetXY($this->marge_gauche, $posy);
|
$pdf->SetXY($this->marge_gauche, $posy);
|
||||||
|
|
||||||
$larg_sign = ($this->page_largeur-$this->marge_gauche-$this->marge_droite)/3;
|
$larg_sign = ($this->page_largeur-$this->marge_gauche-$this->marge_droite)/3;
|
||||||
$pdf->Rect($this->marge_gauche, $posy + 1, $larg_sign, 25);
|
$pdf->Rect($this->marge_gauche, $posy + 1, $larg_sign, 25);
|
||||||
$pdf->SetXY($this->marge_gauche + 2, $posy + 2);
|
$pdf->SetXY($this->marge_gauche + 2, $posy + 2);
|
||||||
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("For").' '.$outputlangs->convToOutputCharset($mysoc->name).":",'','L');
|
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("For").' '.$outputlangs->convToOutputCharset($mysoc->name).":",'','L');
|
||||||
|
|
||||||
$pdf->Rect(2*$larg_sign+$this->marge_gauche, $posy + 1, $larg_sign, 25);
|
$pdf->Rect(2*$larg_sign+$this->marge_gauche, $posy + 1, $larg_sign, 25);
|
||||||
$pdf->SetXY(2*$larg_sign+$this->marge_gauche + 2, $posy + 2);
|
$pdf->SetXY(2*$larg_sign+$this->marge_gauche + 2, $posy + 2);
|
||||||
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("ForCustomer").':','','L');
|
$pdf->MultiCell($larg_sign,2, $outputlangs->trans("ForCustomer").':','','L');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -629,19 +629,19 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
|
pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
|
||||||
|
|
||||||
// Show Draft Watermark
|
// Show Draft Watermark
|
||||||
if($object->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) )
|
if($object->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) )
|
||||||
{
|
{
|
||||||
pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK);
|
pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
$pdf->SetTextColor(0,0,60);
|
$pdf->SetTextColor(0,0,60);
|
||||||
$pdf->SetFont('','B', $default_font_size + 3);
|
$pdf->SetFont('','B', $default_font_size + 3);
|
||||||
|
|
||||||
$posy=$this->marge_haute;
|
$posy=$this->marge_haute;
|
||||||
$posx=$this->page_largeur-$this->marge_droite-100;
|
$posx=$this->page_largeur-$this->marge_droite-100;
|
||||||
|
|
||||||
$pdf->SetXY($this->marge_gauche,$posy);
|
$pdf->SetXY($this->marge_gauche,$posy);
|
||||||
|
|
||||||
// Logo
|
// Logo
|
||||||
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
|
$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
|
||||||
@@ -695,8 +695,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
|
|
||||||
$posy+=2;
|
$posy+=2;
|
||||||
|
|
||||||
// Show list of linked objects
|
// Show list of linked objects
|
||||||
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size);
|
$posy = pdf_writeLinkedObjects($pdf, $object, $outputlangs, $posx, $posy, 100, 3, 'R', $default_font_size);
|
||||||
|
|
||||||
if ($showaddress)
|
if ($showaddress)
|
||||||
{
|
{
|
||||||
@@ -724,10 +724,10 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
|||||||
$pdf->SetFont('','B',$default_font_size);
|
$pdf->SetFont('','B',$default_font_size);
|
||||||
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
|
||||||
|
|
||||||
// Show sender information
|
// Show sender information
|
||||||
$pdf->SetXY($posx+2,$posy+8);
|
$pdf->SetXY($posx+2,$posy+8);
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('','', $default_font_size - 1);
|
||||||
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
|
||||||
|
|
||||||
// Client destinataire
|
// Client destinataire
|
||||||
$posy=42;
|
$posy=42;
|
||||||
|
|||||||
@@ -114,14 +114,14 @@ class modOpenSurvey extends DolibarrModules
|
|||||||
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
$this->rights[$r][5] = 'read'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
// Add here list of permission defined by an id, a label, a boolean and two constant strings.
|
// Add here list of permission defined by an id, a label, a boolean and two constant strings.
|
||||||
// Example:
|
// Example:
|
||||||
$this->rights[$r][0] = 55002; // Permission id (must not be already used)
|
$this->rights[$r][0] = 55002; // Permission id (must not be already used)
|
||||||
$this->rights[$r][1] = 'Create/modify surveys'; // Permission label
|
$this->rights[$r][1] = 'Create/modify surveys'; // Permission label
|
||||||
$this->rights[$r][2] = 'w'; // Permission by default for new user (0/1)
|
$this->rights[$r][2] = 'w'; // Permission by default for new user (0/1)
|
||||||
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
$this->rights[$r][3] = 0; // Permission by default for new user (0/1)
|
||||||
$this->rights[$r][4] = 'survey'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
$this->rights[$r][4] = 'survey'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||||
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
$this->rights[$r][5] = 'write'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ class modOpenSurvey extends DolibarrModules
|
|||||||
*/
|
*/
|
||||||
function init($options='')
|
function init($options='')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove($options);
|
$this->remove($options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|||||||
@@ -107,60 +107,60 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices
|
|||||||
{
|
{
|
||||||
global $db,$conf;
|
global $db,$conf;
|
||||||
|
|
||||||
if ($object->type == 2) $prefix=$this->prefixcreditnote;
|
if ($object->type == 2) $prefix=$this->prefixcreditnote;
|
||||||
else $prefix=$this->prefixinvoice;
|
else $prefix=$this->prefixinvoice;
|
||||||
|
|
||||||
// D'abord on recupere la valeur max
|
// D'abord on recupere la valeur max
|
||||||
$posindice=8;
|
$posindice=8;
|
||||||
$sql = "SELECT MAX(SUBSTRING(ref FROM ".$posindice.")) as max"; // This is standard SQL
|
$sql = "SELECT MAX(SUBSTRING(ref FROM ".$posindice.")) as max"; // This is standard SQL
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn";
|
||||||
$sql.= " WHERE ref LIKE '".$prefix."____-%'";
|
$sql.= " WHERE ref LIKE '".$prefix."____-%'";
|
||||||
$sql.= " AND entity = ".$conf->entity;
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
|
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
dol_syslog(get_class($this)."::getNextValue sql=".$sql);
|
dol_syslog(get_class($this)."::getNextValue sql=".$sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if ($obj) $max = intval($obj->max);
|
if ($obj) $max = intval($obj->max);
|
||||||
else $max=0;
|
else $max=0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::getNextValue sql=".$sql, LOG_ERR);
|
dol_syslog(get_class($this)."::getNextValue sql=".$sql, LOG_ERR);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mode == 'last')
|
if ($mode == 'last')
|
||||||
{
|
{
|
||||||
$num = sprintf("%04s",$max);
|
$num = sprintf("%04s",$max);
|
||||||
|
|
||||||
$ref='';
|
$ref='';
|
||||||
$sql = "SELECT ref as ref";
|
$sql = "SELECT ref as ref";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn";
|
$sql.= " FROM ".MAIN_DB_PREFIX."facture_fourn";
|
||||||
$sql.= " WHERE ref LIKE '".$prefix."____-".$num."'";
|
$sql.= " WHERE ref LIKE '".$prefix."____-".$num."'";
|
||||||
$sql.= " AND entity = ".$conf->entity;
|
$sql.= " AND entity = ".$conf->entity;
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::getNextValue sql=".$sql);
|
dol_syslog(get_class($this)."::getNextValue sql=".$sql);
|
||||||
$resql=$db->query($sql);
|
$resql=$db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$obj = $db->fetch_object($resql);
|
$obj = $db->fetch_object($resql);
|
||||||
if ($obj) $ref = $obj->ref;
|
if ($obj) $ref = $obj->ref;
|
||||||
}
|
}
|
||||||
else dol_print_error($db);
|
else dol_print_error($db);
|
||||||
|
|
||||||
return $ref;
|
return $ref;
|
||||||
}
|
}
|
||||||
else if ($mode == 'next')
|
else if ($mode == 'next')
|
||||||
{
|
{
|
||||||
$date=$object->date; // This is invoice date (not creation date)
|
$date=$object->date; // This is invoice date (not creation date)
|
||||||
$yymm = strftime("%y%m",$date);
|
$yymm = strftime("%y%m",$date);
|
||||||
$num = sprintf("%04s",$max+1);
|
$num = sprintf("%04s",$max+1);
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num);
|
dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num);
|
||||||
return $prefix.$yymm."-".$num;
|
return $prefix.$yymm."-".$num;
|
||||||
}
|
}
|
||||||
else dol_print_error('','Bad parameter for getNextValue');
|
else dol_print_error('','Bad parameter for getNextValue');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ $title=$langs->trans("Search");
|
|||||||
|
|
||||||
// URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests
|
// URL http://mydolibarr/core/search_page?dol_use_jmobile=1 can be used for tests
|
||||||
$head='<!-- Quick access -->'."\n";
|
$head='<!-- Quick access -->'."\n";
|
||||||
$arrayofjs=array();
|
$arrayofjs=array();
|
||||||
$arrayofcss=array();
|
$arrayofcss=array();
|
||||||
top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
|
top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -127,8 +127,8 @@ if ($forgetpasslink || $helpcenterlink)
|
|||||||
{
|
{
|
||||||
$moreparam='';
|
$moreparam='';
|
||||||
if ($dol_hide_topmenu) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_topmenu='.$dol_hide_topmenu;
|
if ($dol_hide_topmenu) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_topmenu='.$dol_hide_topmenu;
|
||||||
if ($dol_hide_leftmenu) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_leftmenu='.$dol_hide_leftmenu;
|
if ($dol_hide_leftmenu) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_leftmenu='.$dol_hide_leftmenu;
|
||||||
if ($dol_no_mouse_hover) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_no_mouse_hover='.$dol_no_mouse_hover;
|
if ($dol_no_mouse_hover) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_no_mouse_hover='.$dol_no_mouse_hover;
|
||||||
if ($dol_use_jmobile) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_use_jmobile='.$dol_use_jmobile;
|
if ($dol_use_jmobile) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_use_jmobile='.$dol_use_jmobile;
|
||||||
|
|
||||||
echo '<br>';
|
echo '<br>';
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
header('Cache-Control: Public, must-revalidate');
|
header('Cache-Control: Public, must-revalidate');
|
||||||
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
header("Content-type: text/html; charset=".$conf->file->character_set_client);
|
||||||
|
|
||||||
if (GETPOST('dol_hide_topmenu')) $conf->dol_use_jmobile=1;
|
if (GETPOST('dol_hide_topmenu')) $conf->dol_use_jmobile=1;
|
||||||
if (GETPOST('dol_hide_leftmenu')) $conf->dol_hide_leftmenu=1;
|
if (GETPOST('dol_hide_leftmenu')) $conf->dol_hide_leftmenu=1;
|
||||||
if (GETPOST('dol_optimize_smallscreen')) $conf->dol_optimize_smallscreen=1;
|
if (GETPOST('dol_optimize_smallscreen')) $conf->dol_optimize_smallscreen=1;
|
||||||
if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover=1;
|
if (GETPOST('dol_no_mouse_hover')) $conf->dol_no_mouse_hover=1;
|
||||||
if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1;
|
if (GETPOST('dol_use_jmobile')) $conf->dol_use_jmobile=1;
|
||||||
|
|
||||||
print top_htmlhead('',$langs->trans('Login').' '.$title);
|
print top_htmlhead('',$langs->trans('Login').' '.$title);
|
||||||
?>
|
?>
|
||||||
<!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP -->
|
<!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP -->
|
||||||
|
|
||||||
@@ -111,11 +111,11 @@ if (! empty($hookmanager->resArray['options'])) {
|
|||||||
<br>
|
<br>
|
||||||
<div align="center" style="margin-top: 4px;">
|
<div align="center" style="margin-top: 4px;">
|
||||||
<?php
|
<?php
|
||||||
$moreparam='';
|
$moreparam='';
|
||||||
if (! empty($conf->dol_hide_topmenu)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_topmenu='.$conf->dol_hide_topmenu;
|
if (! empty($conf->dol_hide_topmenu)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_topmenu='.$conf->dol_hide_topmenu;
|
||||||
if (! empty($conf->dol_hide_leftmenu)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_leftmenu='.$conf->dol_hide_leftmenu;
|
if (! empty($conf->dol_hide_leftmenu)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_hide_leftmenu='.$conf->dol_hide_leftmenu;
|
||||||
if (! empty($conf->dol_no_mouse_hover)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_no_mouse_hover='.$conf->dol_no_mouse_hover;
|
if (! empty($conf->dol_no_mouse_hover)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_no_mouse_hover='.$conf->dol_no_mouse_hover;
|
||||||
if (! empty($conf->dol_use_jmobile)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_use_jmobile='.$conf->dol_use_jmobile;
|
if (! empty($conf->dol_use_jmobile)) $moreparam.=(strpos($moreparam,'?')===false?'?':'&').'dol_use_jmobile='.$conf->dol_use_jmobile;
|
||||||
|
|
||||||
print '<a style="color: #888888; font-size: 10px" href="'.$dol_url_root.'/index.php'.$moreparam.'">('.$langs->trans('BackToLoginPage').')</a>';
|
print '<a style="color: #888888; font-size: 10px" href="'.$dol_url_root.'/index.php'.$moreparam.'">('.$langs->trans('BackToLoginPage').')</a>';
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -119,16 +119,16 @@ print_fiche_titre($pagetitle,'','setup');
|
|||||||
print $langs->trans('CronInfo');
|
print $langs->trans('CronInfo');
|
||||||
|
|
||||||
|
|
||||||
if ($action == 'delete')
|
if ($action == 'delete')
|
||||||
{
|
{
|
||||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1);
|
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronDelete"),$langs->trans("CronConfirmDelete"),"confirm_delete",'','',1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'execute'){
|
if ($action == 'execute'){
|
||||||
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
|
$ret=$form->form_confirm($_SERVER['PHP_SELF']."?id=".$id.'&status='.$status,$langs->trans("CronExecute"),$langs->trans("CronConfirmExecute"),"confirm_execute",'','',1);
|
||||||
if ($ret == 'html') print '<br>';
|
if ($ret == 'html') print '<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// liste des jobs creer
|
// liste des jobs creer
|
||||||
@@ -181,7 +181,7 @@ if (count($object->lines)>0) {
|
|||||||
print '<td class="liste_titre" align="center">';
|
print '<td class="liste_titre" align="center">';
|
||||||
print $form->selectarray('status', array('0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")), GETPOST('status'), 1);
|
print $form->selectarray('status', array('0'=>$langs->trans("No"),'1'=>$langs->trans("Yes")), GETPOST('status'), 1);
|
||||||
print '</td><td class="liste_titre" align="right">';
|
print '</td><td class="liste_titre" align="right">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
print '<input class="liste_titre" type="image" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" value="'.dol_escape_htmltag($langs->trans("Search")).'" title="'.dol_escape_htmltag($langs->trans("Search")).'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
print '<input type="image" class="liste_titre" name="button_removefilter" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/searchclear.png" value="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'" title="'.dol_escape_htmltag($langs->trans("RemoveFilter")).'">';
|
||||||
@@ -265,7 +265,7 @@ if (count($object->lines)>0) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="center">';
|
print '<td align="center">';
|
||||||
print yn($line->status);
|
print yn($line->status);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
print '<td align="right">';
|
print '<td align="right">';
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ if (empty($modulepart)) accessforbidden('Bad value for parameter modulepart');
|
|||||||
$check_access = dol_check_secure_access_document($modulepart,$original_file,$entity);
|
$check_access = dol_check_secure_access_document($modulepart,$original_file,$entity);
|
||||||
$accessallowed = $check_access['accessallowed'];
|
$accessallowed = $check_access['accessallowed'];
|
||||||
$sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals'];
|
$sqlprotectagainstexternals = $check_access['sqlprotectagainstexternals'];
|
||||||
$original_file = $check_access['original_file'];
|
$original_file = $check_access['original_file'];
|
||||||
|
|
||||||
// Basic protection (against external users only)
|
// Basic protection (against external users only)
|
||||||
if ($user->societe_id > 0)
|
if ($user->societe_id > 0)
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ print $langs->trans("FormatedExportDesc3").'<br>';
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|
||||||
|
|
||||||
// List export set
|
// List export set
|
||||||
@@ -108,7 +108,7 @@ if (count($export->array_export_code))
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
print '</center>';
|
print '</center>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
|
|||||||
@@ -1467,7 +1467,7 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
$somethingshown=$object->showLinkedObjectBlock();
|
$somethingshown=$object->showLinkedObjectBlock();
|
||||||
|
|
||||||
//print '</td><td valign="top" width="50%">';
|
//print '</td><td valign="top" width="50%">';
|
||||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
// List of actions on element
|
// List of actions on element
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||||
|
|||||||
@@ -855,42 +855,42 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$this->oldref = '';
|
$this->oldref = '';
|
||||||
|
|
||||||
// Rename directory if dir was a temporary ref
|
// Rename directory if dir was a temporary ref
|
||||||
if (preg_match('/^[\(]?PROV/i', $this->ref))
|
if (preg_match('/^[\(]?PROV/i', $this->ref))
|
||||||
{
|
{
|
||||||
// On renomme repertoire facture ($this->ref = ancienne ref, $num = nouvelle ref)
|
// On renomme repertoire facture ($this->ref = ancienne ref, $num = nouvelle ref)
|
||||||
// afin de ne pas perdre les fichiers attaches
|
// afin de ne pas perdre les fichiers attaches
|
||||||
$facref = dol_sanitizeFileName($this->ref);
|
$facref = dol_sanitizeFileName($this->ref);
|
||||||
$snumfa = dol_sanitizeFileName($num);
|
$snumfa = dol_sanitizeFileName($num);
|
||||||
|
|
||||||
$dirsource = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2).$facref;
|
$dirsource = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2).$facref;
|
||||||
$dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2).$snumfa;
|
$dirdest = $conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2).$snumfa;
|
||||||
if (file_exists($dirsource))
|
if (file_exists($dirsource))
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest);
|
dol_syslog(get_class($this)."::validate rename dir ".$dirsource." into ".$dirdest);
|
||||||
|
|
||||||
if (@rename($dirsource, $dirdest))
|
if (@rename($dirsource, $dirdest))
|
||||||
{
|
{
|
||||||
$this->oldref = $facref;
|
$this->oldref = $facref;
|
||||||
|
|
||||||
dol_syslog("Rename ok");
|
dol_syslog("Rename ok");
|
||||||
// Suppression ancien fichier PDF dans nouveau rep
|
// Suppression ancien fichier PDF dans nouveau rep
|
||||||
dol_delete_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2).$snumfa.'/'.$facref.'*.*');
|
dol_delete_file($conf->fournisseur->facture->dir_output.'/'.get_exdir($this->id,2).$snumfa.'/'.$facref.'*.*');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set new ref and define current statut
|
// Set new ref and define current statut
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$this->ref = $num;
|
$this->ref = $num;
|
||||||
$this->statut=1;
|
$this->statut=1;
|
||||||
//$this->date_validation=$now; this is stored into log table
|
//$this->date_validation=$now; this is stored into log table
|
||||||
}
|
}
|
||||||
|
|
||||||
// Triggers call
|
// Triggers call
|
||||||
|
|||||||
@@ -114,14 +114,14 @@ elseif ($action == 'confirm_valid' && $confirm == 'yes' && $user->rights->fourni
|
|||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
$qualified_for_stock_change=0;
|
$qualified_for_stock_change=0;
|
||||||
if (empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
if (empty($conf->global->STOCK_SUPPORTS_SERVICES))
|
||||||
{
|
{
|
||||||
$qualified_for_stock_change=$object->hasProductsOrServices(2);
|
$qualified_for_stock_change=$object->hasProductsOrServices(2);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$qualified_for_stock_change=$object->hasProductsOrServices(1);
|
$qualified_for_stock_change=$object->hasProductsOrServices(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check parameters
|
// Check parameters
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ if ($object->fetch($id))
|
|||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
print '</div><div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
//print '</td><td valign="top" width="50%" class="notopnoleftnoright">';
|
//print '</td><td valign="top" width="50%" class="notopnoleftnoright">';
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1314,11 +1314,11 @@ if ($step == 5 && $datatoimport)
|
|||||||
$sourcelinenb++;
|
$sourcelinenb++;
|
||||||
// Read line and stor it into $arrayrecord
|
// Read line and stor it into $arrayrecord
|
||||||
$arrayrecord=$obj->import_read_record();
|
$arrayrecord=$obj->import_read_record();
|
||||||
if ($arrayrecord === false)
|
if ($arrayrecord === false)
|
||||||
{
|
{
|
||||||
$arrayofwarnings[$sourcelinenb][0]=array('lib'=>'File has '.$nboflines.' lines. However we reach end of file after record '.$sourcelinenb.'. This may occurs when some records are split onto several lines.','type'=>'EOF_RECORD_ON_SEVERAL_LINES');
|
$arrayofwarnings[$sourcelinenb][0]=array('lib'=>'File has '.$nboflines.' lines. However we reach end of file after record '.$sourcelinenb.'. This may occurs when some records are split onto several lines.','type'=>'EOF_RECORD_ON_SEVERAL_LINES');
|
||||||
$endoffile++;
|
$endoffile++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ($excludefirstline && $sourcelinenb == 1) continue;
|
if ($excludefirstline && $sourcelinenb == 1) continue;
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ if (count($import->array_import_code))
|
|||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
print '</center>';
|
print '</center>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
|
|
||||||
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
print '</div><div class="fichetwothirdright"><div class="ficheaddleft">';
|
||||||
@@ -137,5 +137,5 @@ print '</div></div></div>';
|
|||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -335,11 +335,11 @@ if (! GETPOST("action") || preg_match('/upgrade/i',GETPOST('action')))
|
|||||||
$beforeversionarray=explode('.','3.4.9');
|
$beforeversionarray=explode('.','3.4.9');
|
||||||
if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0)
|
if (versioncompare($versiontoarray,$afterversionarray) >= 0 && versioncompare($versiontoarray,$beforeversionarray) <= 0)
|
||||||
{
|
{
|
||||||
// Reload modules (this must be always and only into last targeted version)
|
// Reload modules (this must be always and only into last targeted version)
|
||||||
migrate_reload_modules($db,$langs,$conf);
|
migrate_reload_modules($db,$langs,$conf);
|
||||||
|
|
||||||
// Reload menus (this must be always and only into last targeted version)
|
// Reload menus (this must be always and only into last targeted version)
|
||||||
migrate_reload_menu($db,$langs,$conf,$versionto);
|
migrate_reload_menu($db,$langs,$conf,$versionto);
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<tr><td colspan="4"><br>'.$langs->trans("MigrationFinished").'</td></tr>';
|
print '<tr><td colspan="4"><br>'.$langs->trans("MigrationFinished").'</td></tr>';
|
||||||
@@ -3526,9 +3526,9 @@ function migrate_delete_old_files($db,$langs,$conf)
|
|||||||
DOL_DOCUMENT_ROOT.'/core/menus/smartphone/iphone.lib.php',
|
DOL_DOCUMENT_ROOT.'/core/menus/smartphone/iphone.lib.php',
|
||||||
DOL_DOCUMENT_ROOT.'/core/menus/smartphone/iphone_backoffice.php',
|
DOL_DOCUMENT_ROOT.'/core/menus/smartphone/iphone_backoffice.php',
|
||||||
DOL_DOCUMENT_ROOT.'/core/menus/smartphone/iphone_frontoffice.php',
|
DOL_DOCUMENT_ROOT.'/core/menus/smartphone/iphone_frontoffice.php',
|
||||||
DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria_backoffice.php',
|
DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria_backoffice.php',
|
||||||
DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria_frontoffice.php',
|
DOL_DOCUMENT_ROOT.'/core/menus/standard/auguria_frontoffice.php',
|
||||||
DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy_backoffice.php',
|
DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy_backoffice.php',
|
||||||
DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy_frontoffice.php',
|
DOL_DOCUMENT_ROOT.'/core/menus/standard/eldy_frontoffice.php',
|
||||||
DOL_DOCUMENT_ROOT.'/core/modules/mailings/dolibarr_services_expired.modules.php',
|
DOL_DOCUMENT_ROOT.'/core/modules/mailings/dolibarr_services_expired.modules.php',
|
||||||
DOL_DOCUMENT_ROOT.'/core/modules/mailings/peche.modules.php',
|
DOL_DOCUMENT_ROOT.'/core/modules/mailings/peche.modules.php',
|
||||||
|
|||||||
@@ -42,8 +42,8 @@ class MailmanSpip
|
|||||||
|
|
||||||
var $mladded_ok;
|
var $mladded_ok;
|
||||||
var $mladded_ko;
|
var $mladded_ko;
|
||||||
var $mlremoved_ok;
|
var $mlremoved_ok;
|
||||||
var $mlremoved_ko;
|
var $mlremoved_ko;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -345,17 +345,17 @@ if (! defined('NOLOGIN'))
|
|||||||
// It is not already authenticated and it requests the login / password
|
// It is not already authenticated and it requests the login / password
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
|
||||||
|
|
||||||
$dol_dst_observed=GETPOST("dst_observed",3);
|
$dol_dst_observed=GETPOST("dst_observed",3);
|
||||||
$dol_dst_first=GETPOST("dst_first",3);
|
$dol_dst_first=GETPOST("dst_first",3);
|
||||||
$dol_dst_second=GETPOST("dst_second",3);
|
$dol_dst_second=GETPOST("dst_second",3);
|
||||||
$dol_screenwidth=GETPOST("screenwidth",3);
|
$dol_screenwidth=GETPOST("screenwidth",3);
|
||||||
$dol_screenheight=GETPOST("screenheight",3);
|
$dol_screenheight=GETPOST("screenheight",3);
|
||||||
$dol_hide_topmenu=GETPOST('dol_hide_topmenu',3);
|
$dol_hide_topmenu=GETPOST('dol_hide_topmenu',3);
|
||||||
$dol_hide_leftmenu=GETPOST('dol_hide_leftmenu',3);
|
$dol_hide_leftmenu=GETPOST('dol_hide_leftmenu',3);
|
||||||
$dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen',3);
|
$dol_optimize_smallscreen=GETPOST('dol_optimize_smallscreen',3);
|
||||||
$dol_no_mouse_hover=GETPOST('dol_no_mouse_hover',3);
|
$dol_no_mouse_hover=GETPOST('dol_no_mouse_hover',3);
|
||||||
$dol_use_jmobile=GETPOST('dol_use_jmobile',3);
|
$dol_use_jmobile=GETPOST('dol_use_jmobile',3);
|
||||||
//dol_syslog("POST key=".join(array_keys($_POST),',').' value='.join($_POST,','));
|
//dol_syslog("POST key=".join(array_keys($_POST),',').' value='.join($_POST,','));
|
||||||
|
|
||||||
// If in demo mode, we check we go to home page through the public/demo/index.php page
|
// If in demo mode, we check we go to home page through the public/demo/index.php page
|
||||||
if (! empty($dolibarr_main_demo) && $_SERVER['PHP_SELF'] == DOL_URL_ROOT.'/index.php') // We ask index page
|
if (! empty($dolibarr_main_demo) && $_SERVER['PHP_SELF'] == DOL_URL_ROOT.'/index.php') // We ask index page
|
||||||
@@ -589,7 +589,7 @@ if (! defined('NOLOGIN'))
|
|||||||
if (! empty($dol_hide_leftmenu)) $_SESSION['dol_hide_leftmenu']=$dol_hide_leftmenu;
|
if (! empty($dol_hide_leftmenu)) $_SESSION['dol_hide_leftmenu']=$dol_hide_leftmenu;
|
||||||
if (! empty($dol_optimize_smallscreen)) $_SESSION['dol_optimize_smallscreen']=$dol_optimize_smallscreen;
|
if (! empty($dol_optimize_smallscreen)) $_SESSION['dol_optimize_smallscreen']=$dol_optimize_smallscreen;
|
||||||
if (! empty($dol_no_mouse_hover)) $_SESSION['dol_no_mouse_hover']=$dol_no_mouse_hover;
|
if (! empty($dol_no_mouse_hover)) $_SESSION['dol_no_mouse_hover']=$dol_no_mouse_hover;
|
||||||
if (! empty($dol_use_jmobile)) $_SESSION['dol_use_jmobile']=$dol_use_jmobile;
|
if (! empty($dol_use_jmobile)) $_SESSION['dol_use_jmobile']=$dol_use_jmobile;
|
||||||
|
|
||||||
dol_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"]." Session id=".session_id());
|
dol_syslog("This is a new started user session. _SESSION['dol_login']=".$_SESSION["dol_login"]." Session id=".session_id());
|
||||||
|
|
||||||
@@ -679,17 +679,17 @@ if (GETPOST('theme'))
|
|||||||
$conf->theme=GETPOST('theme','alpha',1);
|
$conf->theme=GETPOST('theme','alpha',1);
|
||||||
$conf->css = "/theme/".$conf->theme."/style.css.php";
|
$conf->css = "/theme/".$conf->theme."/style.css.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Set javascript option
|
|
||||||
if (! GETPOST('nojs')) // If javascript was not disabled on URL
|
// Set javascript option
|
||||||
{
|
if (! GETPOST('nojs')) // If javascript was not disabled on URL
|
||||||
if (! empty($user->conf->MAIN_DISABLE_JAVASCRIPT))
|
{
|
||||||
{
|
if (! empty($user->conf->MAIN_DISABLE_JAVASCRIPT))
|
||||||
$conf->use_javascript_ajax=! $user->conf->MAIN_DISABLE_JAVASCRIPT;
|
{
|
||||||
}
|
$conf->use_javascript_ajax=! $user->conf->MAIN_DISABLE_JAVASCRIPT;
|
||||||
}
|
}
|
||||||
else $conf->use_javascript_ajax=0;
|
}
|
||||||
|
else $conf->use_javascript_ajax=0;
|
||||||
|
|
||||||
// Set terminal output option
|
// Set terminal output option
|
||||||
if (GETPOST('dol_hide_leftmenu') || ! empty($_SESSION['dol_hide_leftmenu'])) $conf->dol_hide_leftmenu=1;
|
if (GETPOST('dol_hide_leftmenu') || ! empty($_SESSION['dol_hide_leftmenu'])) $conf->dol_hide_leftmenu=1;
|
||||||
@@ -703,11 +703,11 @@ if (! empty($conf->browser->phone))
|
|||||||
$conf->dol_no_mouse_hover=1;
|
$conf->dol_no_mouse_hover=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disabled bugged themes
|
// Disabled bugged themes
|
||||||
if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea','cameleo')))
|
if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea','cameleo')))
|
||||||
{
|
{
|
||||||
$conf->theme='eldy';
|
$conf->theme='eldy';
|
||||||
$conf->css = "/theme/".$conf->theme."/style.css.php";
|
$conf->css = "/theme/".$conf->theme."/style.css.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! defined('NOREQUIRETRAN'))
|
if (! defined('NOREQUIRETRAN'))
|
||||||
@@ -945,9 +945,9 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
print '<meta name="author" content="Dolibarr Development Team">'."\n";
|
print '<meta name="author" content="Dolibarr Development Team">'."\n";
|
||||||
$favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1);
|
$favicon=dol_buildpath('/theme/'.$conf->theme.'/img/favicon.ico',1);
|
||||||
print '<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>'."\n";
|
print '<link rel="shortcut icon" type="image/x-icon" href="'.$favicon.'"/>'."\n";
|
||||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="top" title="'.$langs->trans("Home").'" href="'.(DOL_URL_ROOT?DOL_URL_ROOT:'/').'">'."\n";
|
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="top" title="'.$langs->trans("Home").'" href="'.(DOL_URL_ROOT?DOL_URL_ROOT:'/').'">'."\n";
|
||||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1">'."\n";
|
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1">'."\n";
|
||||||
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="author" title="Dolibarr Development Team" href="http://www.dolibarr.org">'."\n";
|
if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print '<link rel="author" title="Dolibarr Development Team" href="http://www.dolibarr.org">'."\n";
|
||||||
|
|
||||||
// Displays title
|
// Displays title
|
||||||
$appli='Dolibarr';
|
$appli='Dolibarr';
|
||||||
@@ -988,9 +988,9 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
{
|
{
|
||||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css" />'."\n";
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.css" />'."\n";
|
||||||
}
|
}
|
||||||
// jQuery jMobile
|
// jQuery jMobile
|
||||||
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile))
|
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || ! empty($conf->dol_use_jmobile))
|
||||||
{
|
{
|
||||||
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />'."\n";
|
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.css" />'."\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1153,28 +1153,28 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
|||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.js"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/timepicker/jquery-ui-timepicker-addon.js"></script>'."\n";
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/timepicker.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/core/js/timepicker.js.php?lang='.$langs->defaultlang.'"></script>'."\n";
|
||||||
}
|
}
|
||||||
// jQuery jMobile
|
// jQuery jMobile
|
||||||
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0))
|
if (! empty($conf->global->MAIN_USE_JQUERY_JMOBILE) || defined('REQUIRE_JQUERY_JMOBILE') || (! empty($conf->dol_use_jmobile) && $conf->dol_use_jmobile > 0))
|
||||||
{
|
{
|
||||||
// We must force not using ajax because cache of jquery does not load js of other pages.
|
// We must force not using ajax because cache of jquery does not load js of other pages.
|
||||||
// This also increase seriously speed onto mobile device where complex js code is very slow and memory very low.
|
// This also increase seriously speed onto mobile device where complex js code is very slow and memory very low.
|
||||||
if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 2)
|
if (empty($conf->dol_use_jmobile) || $conf->dol_use_jmobile != 2)
|
||||||
{
|
{
|
||||||
print '<script type="text/javascript">
|
print '<script type="text/javascript">
|
||||||
$(document).bind("mobileinit", function(){
|
$(document).bind("mobileinit", function(){
|
||||||
$.extend( $.mobile , {
|
$.extend( $.mobile , {
|
||||||
ajaxFormsEnabled : false,
|
ajaxFormsEnabled : false,
|
||||||
ajaxLinksEnabled : false, /* old param */
|
ajaxLinksEnabled : false, /* old param */
|
||||||
ajaxEnabled : false /* new param */
|
ajaxEnabled : false /* new param */
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>';
|
</script>';
|
||||||
}
|
}
|
||||||
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
|
print '<script type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! $disablejs && ! empty($conf->use_javascript_ajax))
|
if (! $disablejs && ! empty($conf->use_javascript_ajax))
|
||||||
{
|
{
|
||||||
// CKEditor
|
// CKEditor
|
||||||
if (! empty($conf->fckeditor->enabled) && (empty($conf->global->FCKEDITOR_EDITORNAME) || $conf->global->FCKEDITOR_EDITORNAME == 'ckeditor'))
|
if (! empty($conf->fckeditor->enabled) && (empty($conf->global->FCKEDITOR_EDITORNAME) || $conf->global->FCKEDITOR_EDITORNAME == 'ckeditor'))
|
||||||
@@ -1583,19 +1583,19 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||||||
print "<!-- End Bookmarks -->\n";
|
print "<!-- End Bookmarks -->\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
//Dolibarr version
|
//Dolibarr version
|
||||||
$doliurl='http://www.dolibarr.org';
|
$doliurl='http://www.dolibarr.org';
|
||||||
$appli='Dolibarr';
|
$appli='Dolibarr';
|
||||||
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) {
|
if (! empty($conf->global->MAIN_APPLICATION_TITLE)) {
|
||||||
$appli=$conf->global->MAIN_APPLICATION_TITLE; $doliurl='';
|
$appli=$conf->global->MAIN_APPLICATION_TITLE; $doliurl='';
|
||||||
}
|
}
|
||||||
$appli.=" ".DOL_VERSION;
|
$appli.=" ".DOL_VERSION;
|
||||||
print '<div id="blockvmenuhelp" class="blockvmenuhelp">';
|
print '<div id="blockvmenuhelp" class="blockvmenuhelp">';
|
||||||
if ($doliurl) print '<a class="help" target="_blank" href="'.$doliurl.'">';
|
if ($doliurl) print '<a class="help" target="_blank" href="'.$doliurl.'">';
|
||||||
print $appli;
|
print $appli;
|
||||||
if ($doliurl) print '</a>';
|
if ($doliurl) print '</a>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
// Link to Dolibarr wiki pages
|
// Link to Dolibarr wiki pages
|
||||||
if ($helppagename && empty($conf->global->MAIN_HELP_DISABLELINK))
|
if ($helppagename && empty($conf->global->MAIN_HELP_DISABLELINK))
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user