Merge remote branch 'upstream/develop' into selectdelivery
Conflicts: htdocs/install/mysql/migration/3.6.0-3.7.0.sql
This commit is contained in:
commit
395b003266
@ -5,6 +5,7 @@ English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 3.7 compared to 3.6.* *****
|
||||
For users:
|
||||
- New: Add info page about browser.
|
||||
- New: Enable feature developed for 3.6 we forgot to enabled: Adding prefix
|
||||
on uploaded file names.
|
||||
- New: No more dependency between contract and service module.
|
||||
@ -43,12 +44,14 @@ For users:
|
||||
- Fix: [ bug #1501 ] DEPLACEMENT_CREATE trigger do not intercept trigger action
|
||||
- Fix: [ bug #1506, #1507 ] ECM trigger error problem
|
||||
- Fix: [ bug #1469 ] Triggers CONTACT_MODIFY and CONTACT_DELETE duplicates error message
|
||||
- Fix: [ bug #1537 ] Difference between societe.nom and adherent.societe.
|
||||
- New: [ task #1204 ] add a External reference to contract
|
||||
|
||||
For translators:
|
||||
- Update language files.
|
||||
|
||||
For developers:
|
||||
- New: getBrowserInfo can return type of layout (classic/phone/tablet)
|
||||
- New: Add hook "searchAgendaFrom".
|
||||
- New: Add trigger DON_UPDATE, DON_DELETE
|
||||
- New: Add country iso code on 3 chars into table of countries.
|
||||
@ -56,6 +59,8 @@ For developers:
|
||||
- LINEBILL_DELETE, LINK_DELETE, ORDER_SUPPLIER_DELETE, RESOURCE_DELETE trigger called before SQL delete
|
||||
- New: [ Task #1481 ] Add trigger BILL_SUPPLIER_UPDATE.
|
||||
- New: [ Task #1495 ] Add trigger LINECONTRACT_CREATE.
|
||||
- New: Added hook "formConfirm" and "doActions" for supplier invoice card
|
||||
- New: [ task #1511, #1426 ] Added hook "doActions" for supplier card and supplier order card
|
||||
|
||||
WARNING: Following change may create regression for some external modules, but was necessary to make
|
||||
Dolibarr better:
|
||||
|
||||
@ -153,6 +153,7 @@ from origin/upstream and origin/pristine.
|
||||
|
||||
* Into root dir, launch:
|
||||
> debian/get-orig-source.sh
|
||||
If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0 " to solve this.
|
||||
|
||||
* Staying into git root directory, run
|
||||
> git-import-orig -vv ../tcpdf_x.y.z+dfsg.orig.tar.xz
|
||||
@ -162,7 +163,7 @@ Note: If there was errors solved manually, you may need to make a git commit
|
||||
* Add an entry into debian/changelog
|
||||
> dch -v x.y.z-dsfg-1 "My comment" will add entry.
|
||||
For example: dch -v x.y.z-dsfg-1 "New upstream release." for a new version
|
||||
Then modify changelog to replace "unstable" with "UNRELEASED".
|
||||
Then modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
||||
|
||||
Warning: Date must have format reported by "date -R"
|
||||
Warning: Name and email must match value into debian/control file (Entry added here is used by next step).
|
||||
@ -228,8 +229,13 @@ from origin/upstream and origin/pristine.
|
||||
|
||||
* If new upstream is available onto sourceforge, launch:
|
||||
> debian/get-orig-source.sh
|
||||
If script fails with error Bad certificate, you can set "export PERL_LWP_SSL_VERIFY_HOSTNAME=0 " to solve this.
|
||||
|
||||
* Edit tgz file to remove ckeditor and phpexcel and rename file into
|
||||
* Edit tgz file to remove
|
||||
- ckeditor
|
||||
- phpexcel
|
||||
- tcpdf
|
||||
And rename file into
|
||||
dolibarr-x.y.z+dsfgw.tgz
|
||||
(x.y.z = version, w start from 1 and is increased for each new import)
|
||||
|
||||
@ -244,7 +250,7 @@ Note: If there was errors solved manually after get-orig-sources.sh, you may nee
|
||||
* Add an entry into debian/changelog
|
||||
> dch -v x.y.z-w "My comment" will add entry.
|
||||
For example: dch -v x.y.z-w "New upstream release." for a new version (x.y.z = version, w start from 1 and increaed for each new import)
|
||||
Then modify changelog to replace "unstable" with "UNRELEASED".
|
||||
Then modify changelog to replace "version" or "unstable" with "UNRELEASED".
|
||||
Then check/modify also the user/date signature:
|
||||
- Date must have format reported by "date -R"
|
||||
- Name and email must match value into debian/control file (Entry added here is used by next step).
|
||||
|
||||
@ -959,8 +959,8 @@ if ($nboftargetok) {
|
||||
}
|
||||
}
|
||||
|
||||
# Build package for each target
|
||||
#------------------------------
|
||||
# Publish package for each target
|
||||
#--------------------------------
|
||||
foreach my $target (keys %CHOOSEDPUBLISH)
|
||||
{
|
||||
if ($CHOOSEDPUBLISH{$target} < 0) { next; }
|
||||
@ -1035,9 +1035,7 @@ if ($nboftargetok) {
|
||||
print "$command\n";
|
||||
my $ret=`$command 2>&1`;
|
||||
print "$ret\n";
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,4 +5,3 @@
|
||||
//
|
||||
// This file will be filled by installer
|
||||
//
|
||||
?>
|
||||
@ -11,10 +11,16 @@
|
||||
|
||||
<!-- List of all tests -->
|
||||
|
||||
|
||||
<!-- Rules from Internal Standard -->
|
||||
|
||||
<rule ref="Internal.NoCodeFound">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
|
||||
<!-- Rules from Generic Standard -->
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement" />
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.EmptyStatement.NotAllowed">
|
||||
@ -24,9 +30,6 @@
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
|
||||
<rule ref="Zend.Files.ClosingTag"/>
|
||||
|
||||
<!-- <rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop" /> -->
|
||||
|
||||
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall" />
|
||||
@ -153,6 +156,10 @@
|
||||
<!-- Disabled as this does not support tab -->
|
||||
<!-- <rule ref="Generic.WhiteSpace.ScopeIndent" /> -->
|
||||
|
||||
|
||||
|
||||
<!-- Rules from PEAR Standard -->
|
||||
|
||||
<rule ref="PEAR.Classes.ClassDeclaration" />
|
||||
|
||||
<!-- Check for duplicate class names -->
|
||||
@ -270,4 +277,10 @@
|
||||
<!-- Already found as a Generic rule -->
|
||||
<!-- <rule ref="PEAR.WhiteSpace.ScopeIndent" /> -->
|
||||
|
||||
|
||||
<!-- Rules from Zend Standard-->
|
||||
|
||||
<!-- The closing ?> tag MUST be omitted from files containing only PHP. -->
|
||||
<rule ref="Zend.Files.ClosingTag"/>
|
||||
|
||||
</ruleset>
|
||||
|
||||
@ -364,8 +364,37 @@ $tabhelp[24] = array();
|
||||
$tabhelp[25] = array();
|
||||
$tabhelp[26] = array();
|
||||
|
||||
// List of check for fields (NOT USED YET)
|
||||
$tabfieldcheck=array();
|
||||
$tabfieldcheck[1] = array();
|
||||
$tabfieldcheck[2] = array();
|
||||
$tabfieldcheck[3] = array();
|
||||
$tabfieldcheck[4] = array();
|
||||
$tabfieldcheck[5] = array();
|
||||
$tabfieldcheck[6] = array();
|
||||
$tabfieldcheck[7] = array();
|
||||
$tabfieldcheck[8] = array();
|
||||
$tabfieldcheck[9] = array();
|
||||
$tabfieldcheck[10] = array();
|
||||
$tabfieldcheck[11] = array();
|
||||
$tabfieldcheck[12] = array();
|
||||
$tabfieldcheck[13] = array();
|
||||
$tabfieldcheck[14] = array();
|
||||
$tabfieldcheck[15] = array();
|
||||
$tabfieldcheck[16] = array();
|
||||
$tabfieldcheck[17] = array();
|
||||
$tabfieldcheck[18] = array();
|
||||
$tabfieldcheck[19] = array();
|
||||
$tabfieldcheck[20] = array();
|
||||
$tabfieldcheck[21] = array();
|
||||
$tabfieldcheck[22] = array();
|
||||
$tabfieldcheck[23] = array();
|
||||
$tabfieldcheck[24] = array();
|
||||
$tabfieldcheck[25] = array();
|
||||
$tabfieldcheck[26] = array();
|
||||
|
||||
// Complete all arrays with entries found into modules
|
||||
complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp);
|
||||
complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp,$tabfieldcheck);
|
||||
|
||||
|
||||
// Define elementList and sourceList (used for dictionary "type of contacts")
|
||||
|
||||
80
htdocs/admin/system/browser.php
Normal file
80
htdocs/admin/system/browser.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/system/browser.php
|
||||
* \brief Page to show Dolibarr informations
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("install");
|
||||
$langs->load("other");
|
||||
|
||||
if (! $user->admin)
|
||||
accessforbidden();
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
llxHeader();
|
||||
|
||||
print_fiche_titre($langs->trans("InfoBrowser"),'','setup');
|
||||
|
||||
$tmp=getBrowserInfo();
|
||||
|
||||
// Browser
|
||||
$var=true;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Parameter").'</td><td colspan="2">'.$langs->trans("Value").'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("UserAgent").'</td><td colspan="2">'.$_SERVER['HTTP_USER_AGENT'].'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("BrowserName").'</td><td colspan="2">'.$tmp['browsername'].'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("BrowserOS").'</td><td colspan="2">'.$tmp['browseros'].'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Version").'</td><td colspan="2">'.$tmp['browserversion'].'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Layout").' (phone/tablet/classic)</td><td colspan="2">'.$tmp['layout'].'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("IPAddress").'</td><td colspan="2">'.$_SERVER['REMOTE_ADDR'].'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("SessionName").'</td><td colspan="2">'.session_name().'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("SessionId").'</td><td colspan="2">'.session_id().'</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Screen").'</td><td colspan="2">';
|
||||
print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight'];
|
||||
print '</td></tr>'."\n";
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
@ -90,6 +90,20 @@ $var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("CurrentMenuHandler").'</td><td colspan="2">';
|
||||
print $conf->standard_menu;
|
||||
print '</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Screen").'</td><td colspan="2">';
|
||||
print $_SESSION['dol_screenwidth'].' x '.$_SESSION['dol_screenheight'];
|
||||
print '</td></tr>'."\n";
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td width="300">'.$langs->trans("Session").'</td><td colspan="2">';
|
||||
$i=0;
|
||||
foreach($_SESSION as $key => $val)
|
||||
{
|
||||
if ($i > 0) print ', ';
|
||||
print $key.' => '.$val;
|
||||
$i++;
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
@ -41,19 +41,23 @@ print '<tr><td valign="top" width="40%" class="notopnoleft">';
|
||||
/*
|
||||
* Turnover
|
||||
*/
|
||||
|
||||
print_titre($langs->trans('SalesTurnover'));
|
||||
|
||||
print '<table class="noborder" cellspacing="0" cellpadding="3" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Description").'</td>';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Month").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Total").'</td></tr>';
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
$sql = "SELECT sum(t.value) as value, MONTH(o.date_purchased) as mois";
|
||||
$sql .= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t";
|
||||
$sql .= " JOIN ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o ON o.orders_id = t.orders_id";
|
||||
$sql .= " WHERE t.class = 'ot_subtotal' AND YEAR(o.date_purchased) = YEAR(".$dbosc->idate($now).")";
|
||||
$sql .= " GROUP BY mois ORDER BY mois";
|
||||
$sql = "SELECT SUM(t.value) as value, MONTH(o.date_purchased) as month";
|
||||
$sql.= " FROM ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders_total as t";
|
||||
$sql.= " JOIN ".$conf->global->OSC_DB_NAME.".".$conf->global->OSC_DB_TABLE_PREFIX."orders as o ON o.orders_id = t.orders_id";
|
||||
//$sql.= " WHERE t.class = 'ot_subtotal' AND YEAR(o.date_purchased) = YEAR(".$dbosc->idate($now).")";
|
||||
$sql.= " WHERE t.class = 'ot_subtotal' AND YEAR(o.date_purchased) = YEAR('".$db->idate($now)."')";
|
||||
$sql.= " GROUP BY month";
|
||||
$sql.= " ORDER BY month";
|
||||
//print $sql;exit;
|
||||
|
||||
$result=$dbosc->query($sql);
|
||||
if ($result)
|
||||
@ -116,7 +120,7 @@ if ($resql)
|
||||
{
|
||||
|
||||
$obj = $dbosc->fetch_object($resql);
|
||||
print "<tr><td>$obj->orders_id</td><td>$obj->customers_name</td><td>".price($obj->value)."</td><td>$obj->payment_method</td></tr>";
|
||||
print "<tr><td>".$obj->orders_id."</td><td>".$obj->customers_name."</td><td>".price($obj->value)."</td><td>".$obj->payment_method."</td></tr>";
|
||||
$i++;
|
||||
}
|
||||
print "</table><br>";
|
||||
@ -235,6 +239,7 @@ else
|
||||
}
|
||||
print '</tr></table>';
|
||||
|
||||
$dbosc->close();
|
||||
|
||||
llxFooter();
|
||||
|
||||
$dbosc->close();
|
||||
|
||||
@ -335,6 +335,9 @@ class Categorie extends CommonObject
|
||||
|
||||
$error=0;
|
||||
|
||||
// Clean parameters
|
||||
$this->fk_parent = ($this->fk_parent != "" ? intval($this->fk_parent) : 0);
|
||||
|
||||
dol_syslog(get_class($this)."::remove");
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -481,7 +481,7 @@ if ($action == 'add')
|
||||
}
|
||||
|
||||
// Action update description of emailing
|
||||
if ($action == 'settitre' || $action == 'setemail_from' || $actino == 'setreplyto' || $action == 'setemail_errorsto')
|
||||
if ($action == 'settitre' || $action == 'setemail_from' || $action == 'setreplyto' || $action == 'setemail_errorsto')
|
||||
{
|
||||
$upload_dir = $conf->mailing->dir_output . "/" . get_exdir($object->id,2,0,1);
|
||||
|
||||
|
||||
@ -2012,10 +2012,10 @@ if ($action == 'create') {
|
||||
}
|
||||
|
||||
// Bank Account
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print '<tr><td">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td>';
|
||||
print $langs->trans('BankAccount');
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
if ($action != 'editbankaccount' && $user->rights->propal->creer)
|
||||
print '<td align="right"><a href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&id='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'),1).'</a></td>';
|
||||
print '</tr></table>';
|
||||
|
||||
@ -3463,7 +3463,7 @@ if ($action == 'create')
|
||||
if ($resteapayer == 0) {
|
||||
print '<div class="inline-block divButAction"><span class="butActionRefused" title="' . $langs->trans("DisabledBecauseRemainderToPayIsZero") . '">' . $langs->trans('DoPayment') . '</span></div>';
|
||||
} else {
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid=' . $object->id . '&action=create &accountid='.$object->fk_account.'">' . $langs->trans('DoPayment') . '</a></div>';
|
||||
print '<div class="inline-block divButAction"><a class="butAction" href="paiement.php?facid=' . $object->id . '&action=create&accountid='.$object->fk_account.'">' . $langs->trans('DoPayment') . '</a></div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1248
htdocs/core/class/MobileDetect.class.php
Normal file
1248
htdocs/core/class/MobileDetect.class.php
Normal file
File diff suppressed because one or more lines are too long
@ -2601,7 +2601,7 @@ class Form
|
||||
require_once DOL_DOCUMENT_ROOT .'/compta/bank/class/account.class.php';
|
||||
$bankstatic=new Account($this->db);
|
||||
$bankstatic->fetch($selected);
|
||||
print $bankstatic->label.' ('.$bankstatic->currency_code.')';
|
||||
print $this->textwithpicto($bankstatic->label,$langs->trans("AccountCurrency").' '.$bankstatic->currency_code);
|
||||
} else {
|
||||
print " ";
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ class FormAdmin
|
||||
$newprefix=$tab[0];
|
||||
if ($newprefix=='1' && ($conf->global->MAIN_FEATURES_LEVEL < 1)) continue;
|
||||
if ($newprefix=='2' && ($conf->global->MAIN_FEATURES_LEVEL < 2)) continue;
|
||||
if (! empty($conf->browser->firefox) && $newprefix != $oldprefix) // Add separators
|
||||
if ($newprefix != $oldprefix) // Add separators
|
||||
{
|
||||
// Affiche titre
|
||||
print '<option value="-1" disabled="disabled">';
|
||||
|
||||
@ -491,7 +491,7 @@ class FormOther
|
||||
{
|
||||
if ($lines[$i]->fk_project != $lastprojectid) // Break found on project
|
||||
{
|
||||
if ($i > 0 && $conf->browser->firefox) print '<option value="0" disabled="disabled">----------</option>';
|
||||
if ($i > 0) print '<option value="0" disabled="disabled">----------</option>';
|
||||
print '<option value="'.$lines[$i]->fk_project.'_0"';
|
||||
if ($selectedproject == $lines[$i]->fk_project) print ' selected="selected"';
|
||||
print '>'; // Project -> Task
|
||||
|
||||
@ -349,6 +349,8 @@ class DoliDBMssql extends DoliDB
|
||||
|
||||
//print "<!--".$query."-->";
|
||||
|
||||
dol_syslog('sql='.$query, LOG_DEBUG);
|
||||
|
||||
if (! $this->database_name)
|
||||
{
|
||||
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
|
||||
@ -359,8 +361,6 @@ class DoliDBMssql extends DoliDB
|
||||
$ret = mssql_query($query, $this->db);
|
||||
}
|
||||
|
||||
dol_syslog('sql='.$query, LOG_DEBUG);
|
||||
|
||||
if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query))
|
||||
{
|
||||
// Si requete utilisateur, on la sauvegarde ainsi que son resultset
|
||||
|
||||
@ -252,6 +252,8 @@ class DoliDBMysql extends DoliDB
|
||||
{
|
||||
$query = trim($query);
|
||||
|
||||
dol_syslog('sql='.$query, LOG_DEBUG);
|
||||
|
||||
if (! $this->database_name)
|
||||
{
|
||||
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
|
||||
@ -263,8 +265,6 @@ class DoliDBMysql extends DoliDB
|
||||
$ret = mysql_query($query, $this->db);
|
||||
}
|
||||
|
||||
dol_syslog('sql='.$query, LOG_DEBUG);
|
||||
|
||||
if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query))
|
||||
{
|
||||
// Si requete utilisateur, on la sauvegarde ainsi que son resultset
|
||||
@ -829,7 +829,7 @@ class DoliDBMysql extends DoliDB
|
||||
$resql=$this->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
if ($this->lasterrno != 'DB_ERROR_USER_ALREADY_EXISTS')
|
||||
if ($this->lasterrno != 'DB_ERROR_USER_ALREADY_EXISTS')
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -255,6 +255,9 @@ class DoliDBMysqli extends DoliDB
|
||||
function query($query,$usesavepoint=0,$type='auto')
|
||||
{
|
||||
$query = trim($query);
|
||||
|
||||
dol_syslog('sql='.$query, LOG_DEBUG);
|
||||
|
||||
if (! $this->database_name)
|
||||
{
|
||||
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
|
||||
@ -265,8 +268,6 @@ class DoliDBMysqli extends DoliDB
|
||||
$ret = mysqli_query($this->db,$query);
|
||||
}
|
||||
|
||||
dol_syslog('sql='.$query, LOG_DEBUG);
|
||||
|
||||
if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query))
|
||||
{
|
||||
// Si requete utilisateur, on la sauvegarde ainsi que son resultset
|
||||
@ -833,7 +834,7 @@ class DoliDBMysqli extends DoliDB
|
||||
$resql=$this->query($sql);
|
||||
if (! $resql)
|
||||
{
|
||||
if ($this->lasterrno != 'DB_ERROR_USER_ALREADY_EXISTS')
|
||||
if ($this->lasterrno != 'DB_ERROR_USER_ALREADY_EXISTS')
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -491,10 +491,10 @@ class DoliDBPgsql extends DoliDB
|
||||
@pg_query($this->db, 'SAVEPOINT mysavepoint');
|
||||
}
|
||||
|
||||
$ret = @pg_query($this->db, $query);
|
||||
|
||||
dol_syslog('sql='.$query, LOG_DEBUG);
|
||||
|
||||
$ret = @pg_query($this->db, $query);
|
||||
|
||||
//print $query;
|
||||
if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query)) // Si requete utilisateur, on la sauvegarde ainsi que son resultset
|
||||
{
|
||||
|
||||
@ -389,7 +389,9 @@ class DoliDBSqlite extends DoliDB
|
||||
$query=$this->convertSQLFromMysql($query,$type);
|
||||
//print "After convertSQLFromMysql:\n".$query."<br>\n";
|
||||
|
||||
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
|
||||
dol_syslog('sql='.$query, LOG_DEBUG);
|
||||
|
||||
// Ordre SQL ne necessitant pas de connexion a une base (exemple: CREATE DATABASE)
|
||||
try {
|
||||
//$ret = $this->db->exec($query);
|
||||
$ret = $this->db->query($query); // $ret is a PDO object
|
||||
@ -399,8 +401,6 @@ class DoliDBSqlite extends DoliDB
|
||||
$this->error=$e->getMessage();
|
||||
}
|
||||
|
||||
dol_syslog('sql='.$query, LOG_DEBUG);
|
||||
|
||||
if (! preg_match("/^COMMIT/i",$query) && ! preg_match("/^ROLLBACK/i",$query))
|
||||
{
|
||||
// Si requete utilisateur, on la sauvegarde ainsi que son resultset
|
||||
|
||||
@ -101,6 +101,13 @@ function SendError($number, $text)
|
||||
exit ;
|
||||
}
|
||||
|
||||
/**
|
||||
* SendErrorNode
|
||||
*
|
||||
* @param integer $number Number
|
||||
* @param string $text Text of error
|
||||
* @return string Error node
|
||||
*/
|
||||
function SendErrorNode($number, $text)
|
||||
{
|
||||
if ($text)
|
||||
|
||||
@ -70,6 +70,14 @@ function GetResourceTypeDirectory($resourceType, $sCommand)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* GetUrlFromPath
|
||||
*
|
||||
* @param string $resourceType Resource type
|
||||
* @param string $folderPath Path
|
||||
* @param string $sCommand Command
|
||||
* @return string Full url
|
||||
*/
|
||||
function GetUrlFromPath($resourceType, $folderPath, $sCommand)
|
||||
{
|
||||
return CombinePaths(GetResourceTypePath($resourceType, $sCommand), $folderPath);
|
||||
|
||||
@ -862,9 +862,10 @@ function unActivateModule($value, $requiredby=1)
|
||||
* @param array &$tabrowid Tabrowid
|
||||
* @param array &$tabcond Tabcond
|
||||
* @param array &$tabhelp Tabhelp
|
||||
* @param array &$tabfieldcheck Tabfieldcheck
|
||||
* @return int 1
|
||||
*/
|
||||
function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond,&$tabhelp)
|
||||
function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond,&$tabhelp,&$tabfieldcheck)
|
||||
{
|
||||
global $db, $modules, $conf, $langs;
|
||||
|
||||
@ -887,7 +888,7 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
if (is_dir($dirroot.'/'.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' && $file != 'includes')
|
||||
{
|
||||
if (is_dir($dirroot . '/' . $file . '/core/modules/'))
|
||||
{
|
||||
@ -898,7 +899,6 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
//var_dump($modulesdir);
|
||||
|
||||
foreach ($modulesdir as $dir)
|
||||
{
|
||||
@ -959,7 +959,8 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql
|
||||
|
||||
// Complete arrays
|
||||
//&$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond
|
||||
//$objMod
|
||||
if (empty($objMod->dictionaries) && ! empty($objMod->dictionnaries)) $objMod->dictionaries=$objMod->dictionnaries; // For backward compatibility
|
||||
|
||||
if (! empty($objMod->dictionaries))
|
||||
{
|
||||
//var_dump($objMod->dictionaries['tabname']);
|
||||
@ -977,6 +978,7 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql
|
||||
foreach($objMod->dictionaries['tabfieldinsert'] as $val) $tabfieldinsert[] = $val;
|
||||
foreach($objMod->dictionaries['tabrowid'] as $val) $tabrowid[] = $val;
|
||||
foreach($objMod->dictionaries['tabcond'] as $val) $tabcond[] = $val;
|
||||
foreach($objMod->dictionaries['tabfieldcheck'] as $val) $tabfieldcheck[] = $val;
|
||||
if (! empty($objMod->dictionaries['tabhelp'])) foreach($objMod->dictionaries['tabhelp'] as $val) $tabhelp[] = $val;
|
||||
//foreach($objMod->dictionaries['tabsqlsort'] as $val) $tablib[] = $val;
|
||||
//$tabname = array_merge ($tabname, $objMod->dictionaries['tabname']);
|
||||
|
||||
@ -120,11 +120,11 @@ function getEntity($element=false, $shared=false)
|
||||
/**
|
||||
* Return information about user browser
|
||||
*
|
||||
* @return array Array of information ('browsername'=>,'browseros'=>,'phone'=>,'browserfirefox'=>)
|
||||
* @return array Array of information ('browsername'=>,'browseros'=>,'browserversion'=>,'layout'=>(classic|phone|tablet))
|
||||
*/
|
||||
function getBrowserInfo()
|
||||
{
|
||||
$name='unknown'; $version=''; $os='unknown'; $phone='';
|
||||
$name='unknown'; $version=''; $os='unknown'; $phone=''; $tablet='';
|
||||
|
||||
// If phone/smartphone, we set phone os name.
|
||||
if (preg_match('/android/i',$_SERVER["HTTP_USER_AGENT"])) { $os=$phone='android'; }
|
||||
@ -138,6 +138,11 @@ function getBrowserInfo()
|
||||
// MS products at end
|
||||
elseif (preg_match('/iemobile/i',$_SERVER["HTTP_USER_AGENT"])) { $os='windows'; $phone='unkown'; }
|
||||
elseif (preg_match('/windows ce/i',$_SERVER["HTTP_USER_AGENT"])) { $os='windows'; $phone='unkown'; }
|
||||
|
||||
// OS
|
||||
if (preg_match('/android/i',$_SERVER["HTTP_USER_AGENT"])) { $os='android'; }
|
||||
elseif (preg_match('/linux/i',$_SERVER["HTTP_USER_AGENT"])) { $os='linux'; }
|
||||
|
||||
// Name
|
||||
if (preg_match('/firefox(\/|\s)([\d\.]*)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='firefox'; $version=$reg[2]; }
|
||||
elseif (preg_match('/chrome(\/|\s)([\d\.]+)/i', $_SERVER["HTTP_USER_AGENT"], $reg)) { $name='chrome'; $version=$reg[2]; } // we can have 'chrome (Mozilla...) chrome x.y' in one string
|
||||
@ -151,7 +156,12 @@ function getBrowserInfo()
|
||||
$firefox=0;
|
||||
if (in_array($name,array('firefox','iceweasel'))) $firefox=1;
|
||||
|
||||
return array('browsername'=>$name, 'browserversion'=>$version, 'browseros'=>$os, 'phone'=>$phone, 'browserfirefox'=>$firefox);
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/MobileDetect.class.php';
|
||||
$detectmobile=new MobileDetect();
|
||||
$phone=$detectmobile->isMobile();
|
||||
$tablet=$detectmobile->isTablet();
|
||||
|
||||
return array('browsername'=>$name, 'browserversion'=>$version, 'browseros'=>$os, 'browserfirefox'=>$firefox, 'layout'=> ($tablet?'tablet':($phone?'phone':'classic')), 'phone'=>$phone, 'tablet'=>$tablet);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -240,6 +250,8 @@ function dol_getprefix()
|
||||
*/
|
||||
function dol_include_once($relpath, $classname='')
|
||||
{
|
||||
global $conf,$langs,$user,$mysoc; // Do not remove this. They must be defined for files we include. Other globals var must be retreived with $GLOBALS['var']
|
||||
|
||||
$fullpath = dol_buildpath($relpath);
|
||||
|
||||
if (!file_exists($fullpath)) {
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -1363,20 +1364,24 @@ function getListOfModels($db,$type,$maxfilenamelength=0)
|
||||
/**
|
||||
* This function evaluates a string that should be a valid IPv4
|
||||
*
|
||||
* @param string $ip IP Address
|
||||
* @return It returns 0 if $ip is not a valid IPv4
|
||||
* It returns 1 if $ip is a valid IPv4 and is a public IP
|
||||
* It returns 2 if $ip is a valid IPv4 and is a private lan IP
|
||||
* @param string $ip IP Address
|
||||
* @return int 0 if not valid or reserved range, 1 if valid and public IP, 2 if valid and private range IP
|
||||
*/
|
||||
function is_ip($ip)
|
||||
{
|
||||
if (!preg_match("/^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/", $ip)) return 0;
|
||||
if (sprintf("%u",ip2long($ip)) == sprintf("%u",ip2long('255.255.255.255'))) return 0;
|
||||
if (sprintf("%u",ip2long('10.0.0.0')) <= sprintf("%u",ip2long($ip)) and sprintf("%u",ip2long($ip)) <= sprintf("%u",ip2long('10.255.255.255'))) return 2;
|
||||
if (sprintf("%u",ip2long('172.16.0.0')) <= sprintf("%u",ip2long($ip)) and sprintf("%u",ip2long($ip)) <= sprintf("%u",ip2long('172.31.255.255'))) return 2;
|
||||
if (sprintf("%u",ip2long('192.168.0.0')) <= sprintf("%u",ip2long($ip)) and sprintf("%u",ip2long($ip)) <= sprintf("%u",ip2long('192.168.255.255'))) return 2;
|
||||
if (sprintf("%u",ip2long('169.254.0.0')) <= sprintf("%u",ip2long($ip)) and sprintf("%u",ip2long($ip)) <= sprintf("%u",ip2long('169.254.255.255'))) return 2;
|
||||
return 1;
|
||||
// First we test if it is a valid IPv4
|
||||
if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4)) {
|
||||
|
||||
// Then we test if it is a private range
|
||||
if (! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE)) return 2;
|
||||
|
||||
// Then we test if it is a reserved range
|
||||
if (! filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE)) return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -41,19 +41,20 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 201__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/dolibarr.php?leftmenu=admintools', 'InfoDolibarr', 1, 'admin', '', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 208__+MAX_llx_menu__, 'home', '', 201__+MAX_llx_menu__, '/admin/system/modules.php?leftmenu=admintools', 'Modules', 2, 'admin', '', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 207__+MAX_llx_menu__, 'home', '', 201__+MAX_llx_menu__, '/admin/triggers.php?leftmenu=admintools', 'Triggers', 2, 'admin', '', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 204__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/os.php?leftmenu=admintools', 'InfoOS', 1, 'admin', '', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 205__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/web.php?leftmenu=admintools', 'InfoWebServer', 1, 'admin', '', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 206__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/phpinfo.php?leftmenu=admintools', 'InfoPHP', 1, 'admin', '', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 210__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/database.php?leftmenu=admintools', 'InfoDatabase', 1, 'admin', '', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 301__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_export.php?leftmenu=admintools', 'Backup', 1, 'admin', '', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 302__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_import.php?leftmenu=admintools', 'Restore', 1, 'admin', '', '', 2, 6, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 305__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/update.php?leftmenu=admintools', 'MenuUpgrade', 1, 'admin', '', '', 2, 7, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools" && function_exists("eaccelerator_info")', __HANDLER__, 'left', 304__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/eaccelerator.php?leftmenu=admintools', 'EAccelerator', 1, 'admin', '', '', 2, 8, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 306__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listevents.php?leftmenu=admintools', 'Audit', 1, 'admin', '', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 308__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listsessions.php?leftmenu=admintools', 'Sessions', 1, 'admin', '', '', 2, 10, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 303__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/purge.php?leftmenu=admintools', 'Purge', 1, 'admin', '', '', 2, 11, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 307__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/support/index.php?leftmenu=admintools', 'HelpCenter', 1, 'help', '', '_blank', 2, 12, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 203__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 13, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 204__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/browser.php?leftmenu=admintools', 'InfoBrowser', 1, 'admin', '', '', 2, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 204__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/os.php?leftmenu=admintools', 'InfoOS', 1, 'admin', '', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 205__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/web.php?leftmenu=admintools', 'InfoWebServer', 1, 'admin', '', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 206__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/phpinfo.php?leftmenu=admintools', 'InfoPHP', 1, 'admin', '', '', 2, 4, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 210__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/database.php?leftmenu=admintools', 'InfoDatabase', 1, 'admin', '', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 301__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_export.php?leftmenu=admintools', 'Backup', 1, 'admin', '', '', 2, 6, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 302__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/dolibarr_import.php?leftmenu=admintools', 'Restore', 1, 'admin', '', '', 2, 7, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 305__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/update.php?leftmenu=admintools', 'MenuUpgrade', 1, 'admin', '', '', 2, 8, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools" && function_exists("eaccelerator_info")', __HANDLER__, 'left', 304__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/eaccelerator.php?leftmenu=admintools', 'EAccelerator', 1, 'admin', '', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 306__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listevents.php?leftmenu=admintools', 'Audit', 1, 'admin', '', '', 2, 10, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 308__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/listsessions.php?leftmenu=admintools', 'Sessions', 1, 'admin', '', '', 2, 11, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 303__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/tools/purge.php?leftmenu=admintools', 'Purge', 1, 'admin', '', '', 2, 12, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 307__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/support/index.php?leftmenu=admintools', 'HelpCenter', 1, 'help', '', '_blank', 2, 13, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="admintools"', __HANDLER__, 'left', 203__+MAX_llx_menu__, 'home', '', 300__+MAX_llx_menu__, '/admin/system/about.php?leftmenu=admintools', 'About', 1, 'admin', '', '', 2, 14, __ENTITY__);
|
||||
-- Home - Menu users and groups
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '1', __HANDLER__, 'left', 400__+MAX_llx_menu__, 'home', 'users', 1__+MAX_llx_menu__, '/user/home.php?leftmenu=users', 'MenuUsersAndGroups', 0, 'users', '', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$leftmenu=="users"', __HANDLER__, 'left', 401__+MAX_llx_menu__, 'home', '', 400__+MAX_llx_menu__, '/user/index.php?leftmenu=users', 'Users', 1, 'users', '$user->rights->user->user->lire || $user->admin', '', 2, 0, __ENTITY__);
|
||||
|
||||
@ -524,6 +524,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
$newmenu->add('/admin/system/dolibarr.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('InfoDolibarr'), 1);
|
||||
if (empty($leftmenu) || $leftmenu=='admintools_info') $newmenu->add('/admin/system/modules.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Modules'), 2);
|
||||
if (empty($leftmenu) || $leftmenu=='admintools_info') $newmenu->add('/admin/triggers.php?mainmenu=home&leftmenu=admintools_info', $langs->trans('Triggers'), 2);
|
||||
$newmenu->add('/admin/system/browser.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoBrowser'), 1);
|
||||
$newmenu->add('/admin/system/os.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoOS'), 1);
|
||||
$newmenu->add('/admin/system/web.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoWebServer'), 1);
|
||||
$newmenu->add('/admin/system/phpinfo.php?mainmenu=home&leftmenu=admintools', $langs->trans('InfoPHP'), 1);
|
||||
|
||||
@ -852,6 +852,7 @@ abstract class DolibarrModules
|
||||
|
||||
dol_syslog(get_class($this)."::insert_permissions", LOG_DEBUG);
|
||||
$resql=$this->db->query($sql_del);
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
$obj=$this->db->fetch_object($resql);
|
||||
@ -870,45 +871,57 @@ abstract class DolibarrModules
|
||||
|
||||
if (empty($r_type)) $r_type='w';
|
||||
|
||||
if (dol_strlen($r_perms) )
|
||||
// Search if perm already present
|
||||
$sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."rights_def";
|
||||
$sql.= " WHERE id = ".$r_id." AND entity = ".$entity;
|
||||
$resqlselect=$this->db->query($sql);
|
||||
|
||||
$obj = $this->db->fetch_object($resqlselect);
|
||||
if ($obj->nb == 0)
|
||||
{
|
||||
if (dol_strlen($r_subperms) )
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."rights_def";
|
||||
$sql.= " (id, entity, libelle, module, type, bydefault, perms, subperms)";
|
||||
$sql.= " VALUES ";
|
||||
$sql.= "(".$r_id.",".$entity.",'".$this->db->escape($r_desc)."','".$r_modul."','".$r_type."',".$r_def.",'".$r_perms."','".$r_subperms."')";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."rights_def";
|
||||
$sql.= " (id, entity, libelle, module, type, bydefault, perms)";
|
||||
$sql.= " VALUES ";
|
||||
$sql.= "(".$r_id.",".$entity.",'".$this->db->escape($r_desc)."','".$r_modul."','".$r_type."',".$r_def.",'".$r_perms."')";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."rights_def ";
|
||||
$sql .= " (id, entity, libelle, module, type, bydefault)";
|
||||
$sql .= " VALUES ";
|
||||
$sql .= "(".$r_id.",".$entity.",'".$this->db->escape($r_desc)."','".$r_modul."','".$r_type."',".$r_def.")";
|
||||
if (dol_strlen($r_perms) )
|
||||
{
|
||||
if (dol_strlen($r_subperms) )
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."rights_def";
|
||||
$sql.= " (id, entity, libelle, module, type, bydefault, perms, subperms)";
|
||||
$sql.= " VALUES ";
|
||||
$sql.= "(".$r_id.",".$entity.",'".$this->db->escape($r_desc)."','".$r_modul."','".$r_type."',".$r_def.",'".$r_perms."','".$r_subperms."')";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."rights_def";
|
||||
$sql.= " (id, entity, libelle, module, type, bydefault, perms)";
|
||||
$sql.= " VALUES ";
|
||||
$sql.= "(".$r_id.",".$entity.",'".$this->db->escape($r_desc)."','".$r_modul."','".$r_type."',".$r_def.",'".$r_perms."')";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."rights_def ";
|
||||
$sql .= " (id, entity, libelle, module, type, bydefault)";
|
||||
$sql .= " VALUES ";
|
||||
$sql .= "(".$r_id.",".$entity.",'".$this->db->escape($r_desc)."','".$r_modul."','".$r_type."',".$r_def.")";
|
||||
}
|
||||
|
||||
$resqlinsert=$this->db->query($sql,1);
|
||||
|
||||
if (! $resqlinsert)
|
||||
{
|
||||
if ($this->db->errno() != "DB_ERROR_RECORD_ALREADY_EXISTS")
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
$err++;
|
||||
break;
|
||||
}
|
||||
else dol_syslog(get_class($this)."::insert_permissions record already exists", LOG_INFO);
|
||||
|
||||
}
|
||||
|
||||
$this->db->free($resqlinsert);
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::insert_permissions", LOG_DEBUG);
|
||||
$resqlinsert=$this->db->query($sql,1);
|
||||
if (! $resqlinsert)
|
||||
{
|
||||
if ($this->db->errno() != "DB_ERROR_RECORD_ALREADY_EXISTS")
|
||||
{
|
||||
$this->error=$this->db->lasterror();
|
||||
$err++;
|
||||
break;
|
||||
}
|
||||
else dol_syslog(get_class($this)."::insert_permissions record already exists", LOG_INFO);
|
||||
|
||||
}
|
||||
$this->db->free($resqlinsert);
|
||||
$this->db->free($resqlselect);
|
||||
|
||||
// If we want to init permissions on admin users
|
||||
if ($reinitadminperms)
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -85,6 +86,9 @@ $permissionnote=$user->rights->fournisseur->facture->creer; // Used by the inclu
|
||||
* Actions
|
||||
*/
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once
|
||||
|
||||
// Action clone object
|
||||
@ -1476,7 +1480,7 @@ else
|
||||
// Confirmation de la suppression d'une ligne produit
|
||||
if ($action == 'confirm_delete_line')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_delete_line', '', 1, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id.'&lineid='.$_GET["lineid"], $langs->trans('DeleteProductLine'), $langs->trans('ConfirmDeleteProductLine'), 'confirm_delete_line', '', 1, 1);
|
||||
}
|
||||
|
||||
// Clone confirmation
|
||||
@ -1488,7 +1492,7 @@ else
|
||||
//array('type' => 'checkbox', 'name' => 'clone_content', 'label' => $langs->trans("CloneMainAttributes"), 'value' => 1)
|
||||
);
|
||||
// Paiement incomplet. On demande si motif = escompte ou autre
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id,$langs->trans('CloneInvoice'),$langs->trans('ConfirmCloneInvoice',$object->ref),'confirm_clone',$formquestion,'yes', 1);
|
||||
}
|
||||
|
||||
// Confirmation de la validation
|
||||
@ -1544,24 +1548,32 @@ else
|
||||
array('type' => 'other', 'name' => 'idwarehouse', 'label' => $langs->trans("SelectWarehouseForStockIncrease"), 'value' => $formproduct->selectWarehouses(GETPOST('idwarehouse'),'idwarehouse','',1)));
|
||||
}
|
||||
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ValidateBill'), $text, 'confirm_valid', $formquestion, 1, 1, 240);
|
||||
|
||||
}
|
||||
|
||||
// Confirmation set paid
|
||||
if ($action == 'paid')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('ClassifyPaid'), $langs->trans('ConfirmClassifyPaidBill', $object->ref), 'confirm_paid', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
// Confirmation de la suppression de la facture fournisseur
|
||||
if ($action == 'delete')
|
||||
{
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1);
|
||||
$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('DeleteBill'), $langs->trans('ConfirmDeleteBill'), 'confirm_delete', '', 0, 1);
|
||||
|
||||
}
|
||||
|
||||
if (!$formconfirm) {
|
||||
$parameters=array('lineid'=>$lineid);
|
||||
$formconfirm=$hookmanager->executeHooks('formConfirm',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||
}
|
||||
|
||||
// Print form confirm
|
||||
print $formconfirm;
|
||||
|
||||
|
||||
/**
|
||||
* Invoice
|
||||
|
||||
@ -52,6 +52,9 @@ $object = new Fournisseur($db);
|
||||
* Action
|
||||
*/
|
||||
|
||||
$parameters=array('socid'=>$socid);
|
||||
$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
if ($action == 'setsupplieraccountancycode')
|
||||
{
|
||||
$result=$object->fetch($id);
|
||||
|
||||
@ -31,9 +31,9 @@
|
||||
--
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (1,'CATCH','Catch','Catch by client','',1);
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (2,'TRANS','Transporter','Generic transporter','',1);
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi','',0);
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (3,'COLSUI','Colissimo Suivi','Colissimo Suivi','http://www.colissimo.fr/portail_colissimo/suivre.do?colispart={TRACKID}',0);
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (4,'LETTREMAX','Lettre Max','Courrier Suivi et Lettre Max','',0);
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (5,'UPS','UPS','United Parcel Service','http://wwwapps.ups.com/etracking/tracking.cgi?InquiryNumber2=&InquiryNumber3=&tracknums_displayed=3&loc=fr_FR&TypeOfInquiryNumber=T&HTMLVersion=4.0&InquiryNumber22=&InquiryNumber32=&track=Track&Suivi.x=64&Suivi.y=7&Suivi=Valider&InquiryNumber1={TRACKID}',0);
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (6,'KIALA','KIALA','Relais Kiala','http://www.kiala.fr/tnt/delivery/{TRACKID}',0);
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (7,'GLS','GLS','General Logistics Systems','http://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/FR01/FR/5004.htm?txtAction=71000&txtRefNo={TRACKID}',0);
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (7,'GLS','GLS','General Logistics Systems','https://gls-group.eu/FR/fr/suivi-colis?match={TRACKID}',0);
|
||||
INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (8,'CHRONO','Chronopost','Chronopost','http://www.chronopost.fr/expedier/inputLTNumbersNoJahia.do?listeNumeros={TRACKID}',0);
|
||||
|
||||
@ -126,3 +126,5 @@ ALTER TABLE llx_contrat ADD COLUMN ref_ext varchar(30) after ref;
|
||||
ALTER TABLE llx_propal ADD COLUMN fk_shipping_method integer AFTER date_livraison;
|
||||
ALTER TABLE llx_commande ADD COLUMN fk_shipping_method integer AFTER date_livraison;
|
||||
|
||||
ALTER TABLE llx_adherents MODIFY COLUMN societe VARCHAR(60);
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ create table llx_adherent
|
||||
pass varchar(50), -- password
|
||||
fk_adherent_type integer NOT NULL,
|
||||
morphy varchar(3) NOT NULL, -- personne morale / personne physique
|
||||
societe varchar(50),
|
||||
societe varchar(60), -- company name (should be same lenght than societe.name)
|
||||
fk_soc integer NULL, -- Link to third party linked to member
|
||||
address text,
|
||||
zip varchar(30),
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
create table llx_societe
|
||||
(
|
||||
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||
nom varchar(60), -- company reference name
|
||||
nom varchar(60), -- company reference name (should be smae length than adherent.societe)
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
|
||||
ref_ext varchar(128), -- reference into an external system (not used by dolibarr)
|
||||
|
||||
@ -928,11 +928,14 @@ EventsSetup=Setup for events logs
|
||||
LogEvents=Security audit events
|
||||
Audit=Audit
|
||||
InfoDolibarr=Infos Dolibarr
|
||||
InfoBrowser=Infos Browser
|
||||
InfoOS=Infos OS
|
||||
InfoWebServer=Infos web server
|
||||
InfoDatabase=Infos database
|
||||
InfoPHP=Infos PHP
|
||||
InfoPerf=Infos performances
|
||||
BrowserName=Browser name
|
||||
BrowserOS=Browser OS
|
||||
ListEvents=Audit events
|
||||
ListOfSecurityEvents=List of Dolibarr security events
|
||||
SecurityEventsPurged=Security events purged
|
||||
|
||||
@ -672,6 +672,8 @@ HelpCopyToClipboard=Use Ctrl+C to copy to clipboard
|
||||
SaveUploadedFileWithMask=Save file on server with name "<strong>%s</strong>" (otherwise "%s")
|
||||
OriginFileName=Original filename
|
||||
SetDemandReason=Set source
|
||||
SetBankAccount=Define Bank Account
|
||||
AccountCurrency=Account Currency
|
||||
ViewPrivateNote=View notes
|
||||
XMoreLines=%s line(s) hidden
|
||||
PublicUrl=Public URL
|
||||
|
||||
@ -672,6 +672,8 @@ HelpCopyToClipboard=Utilisez Ctrl+C pour copier dans le presse-papier
|
||||
SaveUploadedFileWithMask=Sauver le fichier sur le serveur sous le nom "<strong>%s</strong>" (sinon "%s")
|
||||
OriginFileName=nom du fichier source
|
||||
SetDemandReason=Définir la source
|
||||
SetBankAccount=Définir le compte bancaire
|
||||
AccountCurrency=Devise du compte
|
||||
ViewPrivateNote=Voir les notes
|
||||
XMoreLines=%s ligne(s) cachées
|
||||
PublicUrl=URL publique
|
||||
|
||||
@ -112,7 +112,7 @@ class MailmanSpip
|
||||
/**
|
||||
* Function used to connect to Mailman
|
||||
*
|
||||
* @param object $object Object with the data
|
||||
* @param Adherent $object Object with the data
|
||||
* @param string $url Mailman URL to be called with patterns
|
||||
* @param string $list Name of mailing-list
|
||||
* @return mixed Boolean or string
|
||||
|
||||
@ -209,11 +209,12 @@ register_shutdown_function('dol_shutdown');
|
||||
if (isset($_SERVER["HTTP_USER_AGENT"]))
|
||||
{
|
||||
$tmp=getBrowserInfo();
|
||||
$conf->browser->phone=$tmp['phone'];
|
||||
$conf->browser->name=$tmp['browsername'];
|
||||
$conf->browser->os=$tmp['browseros'];
|
||||
$conf->browser->firefox=$tmp['browserfirefox'];
|
||||
$conf->browser->version=$tmp['browserversion'];
|
||||
$conf->browser->layout=$tmp['layout'];
|
||||
$conf->browser->phone=$tmp['phone']; // deprecated, use layout
|
||||
$conf->browser->tablet=$tmp['tablet']; // deprecated, use layout
|
||||
}
|
||||
|
||||
|
||||
@ -717,10 +718,13 @@ if (GETPOST('dol_hide_topmenu') || ! empty($_SESSION['dol_hide_topmenu']))
|
||||
if (GETPOST('dol_optimize_smallscreen') || ! empty($_SESSION['dol_optimize_smallscreen'])) $conf->dol_optimize_smallscreen=1;
|
||||
if (GETPOST('dol_no_mouse_hover') || ! empty($_SESSION['dol_no_mouse_hover'])) $conf->dol_no_mouse_hover=1;
|
||||
if (GETPOST('dol_use_jmobile') || ! empty($_SESSION['dol_use_jmobile'])) $conf->dol_use_jmobile=1;
|
||||
if (! empty($conf->browser->phone))
|
||||
if (! empty($conf->browser->phone)) $conf->dol_no_mouse_hover=1;
|
||||
if (! empty($conf->browser->phone)
|
||||
|| (! empty($_SESSION['dol_screenwidth']) && $_SESSION['dol_screenwidth'] < 400)
|
||||
|| (! empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 400)
|
||||
)
|
||||
{
|
||||
$conf->dol_optimize_smallscreen=1;
|
||||
$conf->dol_no_mouse_hover=1;
|
||||
}
|
||||
|
||||
// Disabled bugged themes
|
||||
@ -1037,14 +1041,14 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
}
|
||||
}
|
||||
}
|
||||
$themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):'').'&userid='.$user->id.'&entity='.$conf->entity;
|
||||
$themeparam.=($ext?'&'.$ext:'');
|
||||
if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache'];
|
||||
if (GETPOST('dol_hide_topmenu')) { $themeparam.='&dol_hide_topmenu='.GETPOST('dol_hide_topmenu','int'); }
|
||||
if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu','int'); }
|
||||
if (GETPOST('dol_optimize_smallscreen')) { $themeparam.='&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen','int'); }
|
||||
if (GETPOST('dol_no_mouse_hover')) { $themeparam.='&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover','int'); }
|
||||
if (GETPOST('dol_use_jmobile')) { $themeparam.='&dol_use_jmobile='.GETPOST('dol_use_jmobile','int'); $conf->dol_use_jmobile=GETPOST('dol_use_jmobile','int'); }
|
||||
$themeparam='?lang='.$langs->defaultlang.'&theme='.$conf->theme.(GETPOST('optioncss')?'&optioncss='.GETPOST('optioncss','alpha',1):'').'&userid='.$user->id.'&entity='.$conf->entity;
|
||||
$themeparam.=($ext?'&'.$ext:'');
|
||||
if (! empty($_SESSION['dol_resetcache'])) $themeparam.='&dol_resetcache='.$_SESSION['dol_resetcache'];
|
||||
if (GETPOST('dol_hide_topmenu')) { $themeparam.='&dol_hide_topmenu='.GETPOST('dol_hide_topmenu','int'); }
|
||||
if (GETPOST('dol_hide_leftmenu')) { $themeparam.='&dol_hide_leftmenu='.GETPOST('dol_hide_leftmenu','int'); }
|
||||
if (GETPOST('dol_optimize_smallscreen')) { $themeparam.='&dol_optimize_smallscreen='.GETPOST('dol_optimize_smallscreen','int'); }
|
||||
if (GETPOST('dol_no_mouse_hover')) { $themeparam.='&dol_no_mouse_hover='.GETPOST('dol_no_mouse_hover','int'); }
|
||||
if (GETPOST('dol_use_jmobile')) { $themeparam.='&dol_use_jmobile='.GETPOST('dol_use_jmobile','int'); $conf->dol_use_jmobile=GETPOST('dol_use_jmobile','int'); }
|
||||
//print 'themepath='.$themepath.' themeparam='.$themeparam;exit;
|
||||
print '<link rel="stylesheet" type="text/css" title="default" href="'.$themepath.$themeparam.'">'."\n";
|
||||
|
||||
@ -1802,10 +1806,10 @@ function printSearchForm($urlaction,$urlobject,$title,$htmlmodesearch,$htmlinput
|
||||
$ret='';
|
||||
$ret.='<form action="'.$urlaction.'" method="post">';
|
||||
$ret.='<label for="'.$htmlinputname.'">';
|
||||
$ret.='<div class="menu_titre">';
|
||||
$ret.='<div class="menu_titre menu_titre_search">';
|
||||
$ret.='<a class="vsmenu" href="'.$urlobject.'">';
|
||||
$ret.=$title;
|
||||
$ret.='</a><br>';
|
||||
$ret.='</a>';
|
||||
$ret.='</div>';
|
||||
$ret.='</label>';
|
||||
$ret.='<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
||||
define("NOCSRFCHECK",1); // We accept to go on this page from external web site.
|
||||
|
||||
|
||||
require '../../main.inc.php';
|
||||
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||
@ -9,11 +10,18 @@ if (!empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||
print "Page available onto dev environment only";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
$usedolheader=0; // 1 = Test inside a dolibarr page, 0 = Use hard coded header
|
||||
|
||||
|
||||
// HEADER
|
||||
//--------
|
||||
|
||||
if (empty($usedolheader))
|
||||
{
|
||||
header("Content-type: text/html; charset=UTF8");
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta name="robots" content="noindex,nofollow" />
|
||||
<meta name="author" content="Dolibarr Development Team">
|
||||
@ -31,20 +39,33 @@ if (!empty($conf->global->MAIN_FEATURES_LEVEL))
|
||||
<script type="text/javascript" src="<?php echo DOL_URL_ROOT ?>/includes/jquery/plugins/mobile/jquery.mobile-latest.min.js"></script>
|
||||
</head>
|
||||
|
||||
|
||||
|
||||
<body style="margin: 4px;">
|
||||
<div data-role="page">
|
||||
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
llxHeader();
|
||||
}
|
||||
|
||||
|
||||
// CONTENT
|
||||
//---------
|
||||
?>
|
||||
|
||||
|
||||
<br>
|
||||
This page is a sample of page using tables. To make test with<br>
|
||||
- css (edit page to change)<br>
|
||||
- jmobile (edit page to enable/disable)<br>
|
||||
- dataTables<br>
|
||||
- tablednd<br>
|
||||
<br>
|
||||
|
||||
|
||||
Example 0a : Table with div+div+div containg a select that should be overflowed and truncated<br>
|
||||
<br><hr><br>Example 0a : Table with div+div+div containg a select that should be overflowed and truncated => Use this to align text or form<br>
|
||||
|
||||
|
||||
<div class="tagtable centpercent">
|
||||
<div class="tagtr">
|
||||
<div class="tagtd" style="overflow: hidden; white-space: nowrap; max-width: 100px;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
||||
@ -55,7 +76,9 @@ Example 0a : Table with div+div+div containg a select that should be overflowed
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Example 0b: Table with div+form+div containg a select that should be overflowed and truncated<br>
|
||||
|
||||
<br><hr><br>Example 0b: Table with div+form+div containg a select that should be overflowed and truncated => Use this to align text or form<br>
|
||||
|
||||
<div class="tagtable centpercent">
|
||||
<form action="xxx" method="POST" class="tagtr">
|
||||
<div class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
||||
@ -66,7 +89,9 @@ Example 0b: Table with div+form+div containg a select that should be overflowed
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
Example 0c: Table with table+tr+td containg a select that should be overflowed and truncated<br>
|
||||
|
||||
<br><hr><br>Example 0c: Table with table+tr+td containg a select that should be overflowed and truncated => Use this to align text or form<br>
|
||||
|
||||
<table class="centpercent">
|
||||
<tr>
|
||||
<td class="tagtd maxwidthonsmartphone" style="overflow: hidden; white-space: nowrap;"> <!-- If you remove max-width, the jmobile overflow does not work -->
|
||||
@ -80,8 +105,9 @@ Example 0c: Table with table+tr+td containg a select that should be overflowed a
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
Example 1 : Table using tags: div.tagtable+div.tagtr+div or div.tagtable+div.tagtr+div.tagtd<br>
|
||||
<br><hr><br>Example 1 : Table using tags: div.tagtable+div.tagtr+div or div.tagtable+div.tagtr+div.tagtd => Use this for tables that are edited forms<br><br>
|
||||
|
||||
|
||||
<?php
|
||||
$tasksarray=array(1,2,3); // To force having several lines
|
||||
$tagidfortablednd='tablelines';
|
||||
@ -124,19 +150,48 @@ Example 1 : Table using tags: div.tagtable+div.tagtr+div or div.tagtable+div.tag
|
||||
|
||||
|
||||
|
||||
<br><br>
|
||||
<br><hr><br>Example 2 : Table using tags: table/thead/tbody/tr/td + dataTable => Use this for long result tables<br>
|
||||
|
||||
|
||||
|
||||
Example 2 : Table using tags: table/thead/tbody/tr/td + dataTable<br>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function(){
|
||||
$('#idtableexample2').dataTable();
|
||||
$('#idtableexample2').dataTable( {
|
||||
"sPaginationType": "full_numbers",
|
||||
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "Tous"]],
|
||||
"oLanguage": {
|
||||
"sLengthMenu": "Voir _MENU_ lignes",
|
||||
"sSearch": "Recherche:",
|
||||
"sZeroRecords": "Aucune ligne à afficher",
|
||||
"sInfoEmpty": "Aucune ligne à afficher",
|
||||
"sInfoFiltered": "(Filtrer sur _MAX_ Total de lignes)",
|
||||
"sInfo": "Afficher _START_ à _END_ sur les _TOTAL_ lignes à afficher",
|
||||
"oPaginate": {
|
||||
"sFirst": "Début",
|
||||
"sLast": "Fin",
|
||||
"sPrevious": "Précédent",
|
||||
"sNext": "Suivant"
|
||||
}
|
||||
},
|
||||
"aaSorting": [[0,'desc']],
|
||||
"sDom": 'T<"clear">lfrtip',
|
||||
/* To get flash tools
|
||||
"oTableTools": {
|
||||
"sSwfPath": "<?php echo DOL_URL_ROOT.'/includes/jquery/plugins/datatables/extras/TableTools/swf/copy_csv_xls_pdf.swf'; ?>"
|
||||
}
|
||||
*/
|
||||
/* To use in ajax mode
|
||||
"bProcessing": true, // Show "processing message"
|
||||
"bServerSide": true,
|
||||
"bJQueryUI": true,
|
||||
"sAjaxSource": "../ajaxlist.php"
|
||||
*/
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
// counts total number of td in a head so that we can can use it for label extraction
|
||||
// counts total number of td in a head so that we can use it for label extraction
|
||||
var head_col_count = $('xxxthead td').size();
|
||||
// loop which replaces td
|
||||
for ( i=0; i <= head_col_count; i++ ) {
|
||||
@ -176,7 +231,7 @@ $('xxxth').replaceWith(
|
||||
*/
|
||||
</script>
|
||||
|
||||
<table id="idtableexample2">
|
||||
<table id="idtableexample2" class="centpercent">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>snake</th>
|
||||
@ -249,12 +304,9 @@ $('xxxth').replaceWith(
|
||||
</table>
|
||||
|
||||
|
||||
<br><br>
|
||||
|
||||
<br><hr><br>Example 3 : Standard table => Use this if you need the drag and drop for lines<br>
|
||||
|
||||
|
||||
<br>
|
||||
Example 3 : Standard table<br>
|
||||
<?php
|
||||
$tasksarray=array(1,2,3); // To force having several lines
|
||||
$tagidfortablednd='tablelines3';
|
||||
@ -269,6 +321,13 @@ Example 3 : Standard table<br>
|
||||
<br>
|
||||
|
||||
|
||||
<?php
|
||||
if (! empty($usedolheader))
|
||||
{
|
||||
llxFooter();
|
||||
} else { ?>
|
||||
</div>
|
||||
</body>
|
||||
<?php } ?>
|
||||
|
||||
</html>
|
||||
@ -356,7 +356,6 @@ div.tmenu {
|
||||
height: <?php print $heightmenu; ?>px;
|
||||
background: #7FAEC6;
|
||||
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/table_bg.gif',1); ?>);
|
||||
/* background-position: center bottom; */
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
<?php } ?>
|
||||
@ -375,7 +374,9 @@ div.mainmenu {
|
||||
}
|
||||
*/
|
||||
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) {
|
||||
|
||||
/* Do not load menu img if hidden to save bandwidth */
|
||||
<?php if (empty($dol_hide_topmenu)) {
|
||||
|
||||
// Add here more div for other menu entries. moduletomainmenu=array('module name'=>'name of class for div')
|
||||
|
||||
@ -434,7 +435,7 @@ foreach($mainmenuusedarray as $val)
|
||||
?>
|
||||
|
||||
<?php
|
||||
} // End test if not phone
|
||||
} // End test if $dol_hide_topmenu
|
||||
?>
|
||||
|
||||
.tmenu{
|
||||
@ -707,8 +708,8 @@ div.blockvmenusearch
|
||||
{
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
height: 16px;
|
||||
background: #DDDDDD !important;
|
||||
min-height: 16px;
|
||||
}
|
||||
|
||||
div.blockvmenubookmarks
|
||||
@ -2295,6 +2296,11 @@ div.ecmjqft {
|
||||
{
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled, .paginate_button_disabled {
|
||||
opacity: .35;
|
||||
filter: Alpha(Opacity=35);
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
@ -364,16 +364,8 @@ div.ficheaddleft {
|
||||
/* ============================================================================== */
|
||||
|
||||
<?php
|
||||
if (! empty($conf->dol_optimize_smallscreen))
|
||||
{
|
||||
$minwidthtmenu=70;
|
||||
$heightmenu=39;
|
||||
}
|
||||
else
|
||||
{
|
||||
$minwidthtmenu=70;
|
||||
$heightmenu=39;
|
||||
}
|
||||
$minwidthtmenu=70;
|
||||
$heightmenu=39;
|
||||
?>
|
||||
|
||||
/* This theme is bugged. If width not large enough, menu are not wrapped on next line
|
||||
@ -392,7 +384,6 @@ div.tmenu {
|
||||
border-left: 0px;
|
||||
padding: 0px;
|
||||
margin: 5px 0px 10px 0px;
|
||||
font-size: 13px;
|
||||
background-image : url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/bg_mainNav.jpg',1); ?>);
|
||||
background-repeat: no-repeat;
|
||||
background-color: #996644;
|
||||
@ -414,7 +405,9 @@ div.mainmenu {
|
||||
}
|
||||
*/
|
||||
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) {
|
||||
|
||||
/* Do not load menu img if hidden to save bandwidth */
|
||||
<?php if (empty($dol_hide_topmenu)) {
|
||||
|
||||
// Add here more div for other menu entries. moduletomainmenu=array('module name'=>'name of class for div')
|
||||
|
||||
@ -787,6 +780,12 @@ div.blockvmenusearch div.menu_titre {
|
||||
min-height: 14px;
|
||||
}
|
||||
|
||||
#blockvmenusearch form
|
||||
{
|
||||
clear: both;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
div.blockvmenubookmarks
|
||||
{
|
||||
margin: 0px;
|
||||
@ -2483,6 +2482,11 @@ div.ecmjqft {
|
||||
{
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled, .paginate_button_disabled {
|
||||
opacity: .35;
|
||||
filter: Alpha(Opacity=35);
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
|
||||
@ -328,16 +328,8 @@ div.ficheaddleft {
|
||||
/* ============================================================================== */
|
||||
|
||||
<?php
|
||||
if (! empty($conf->dol_optimize_smallscreen))
|
||||
{
|
||||
$minwidthtmenu=0;
|
||||
$heightmenu=19;
|
||||
}
|
||||
else
|
||||
{
|
||||
$minwidthtmenu=70;
|
||||
$heightmenu=47;
|
||||
}
|
||||
$minwidthtmenu=70;
|
||||
$heightmenu=47;
|
||||
?>
|
||||
|
||||
div#tmenu_tooltip {
|
||||
@ -479,7 +471,9 @@ div.mainmenu {
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { ?>
|
||||
|
||||
/* Do not load menu img if hidden to save bandwidth */
|
||||
<?php if (empty($dol_hide_topmenu)) { ?>
|
||||
|
||||
div.mainmenu.agenda {
|
||||
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/agenda.png',1); ?>);
|
||||
@ -610,7 +604,7 @@ foreach($mainmenuusedarray as $val)
|
||||
?>
|
||||
|
||||
<?php
|
||||
} // End test if not phone
|
||||
} // End test if $dol_hide_topmenu
|
||||
?>
|
||||
|
||||
.tmenuimage {
|
||||
@ -859,9 +853,14 @@ div.blockvmenusearch div.menu_titre {
|
||||
{
|
||||
padding-top: 1px;
|
||||
padding-bottom: 1px;
|
||||
height: 20px;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
#blockvmenusearch form
|
||||
{
|
||||
clear: both;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
div.blockvmenubookmarks
|
||||
{
|
||||
@ -2378,7 +2377,11 @@ div.ecmjqft {
|
||||
{
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled, .paginate_button_disabled {
|
||||
opacity: .35;
|
||||
filter: Alpha(Opacity=35);
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
/* ============================================================================== */
|
||||
/* JMobile */
|
||||
|
||||
@ -207,6 +207,8 @@ print 'dol_hide_leftmenu='.$dol_hide_leftmenu."\n";
|
||||
print 'dol_optimize_smallscreen='.$dol_optimize_smallscreen."\n";
|
||||
print 'dol_no_mouse_hover='.$dol_no_mouse_hover."\n";
|
||||
print 'dol_use_jmobile='.$dol_use_jmobile."\n";
|
||||
print 'dol_screenwidth='.$_SESSION['dol_screenwidth']."\n";
|
||||
print 'dol_screenheight='.$_SESSION['dol_screenheight']."\n";
|
||||
print '*/'."\n";
|
||||
|
||||
if (! empty($conf->dol_optimize_smallscreen)) $fontsize=11;
|
||||
@ -458,25 +460,25 @@ div.fichecenter {
|
||||
clear: both; /* This is to have div fichecenter that are true rectangles */
|
||||
}
|
||||
div.fichethirdleft {
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 35%;\n"; } ?>
|
||||
<?php if (! empty($conf->dol_optimize_smallscreen)) { print "padding-bottom: 6px;\n"; } ?>
|
||||
<?php if ($conf->browser->layout != 'phone') { print "float: ".$left.";\n"; } ?>
|
||||
<?php if ($conf->browser->layout != 'phone') { print "width: 35%;\n"; } ?>
|
||||
<?php if ($conf->browser->layout == 'phone') { print "padding-bottom: 6px;\n"; } ?>
|
||||
}
|
||||
div.fichetwothirdright {
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$right.";\n"; } ?>
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 65%;\n"; } ?>
|
||||
<?php if (! empty($conf->dol_optimize_smallscreen)) { print "padding-bottom: 6px\n"; } ?>
|
||||
<?php if ($conf->browser->layout != 'phone') { print "float: ".$right.";\n"; } ?>
|
||||
<?php if ($conf->browser->layout != 'phone') { print "width: 65%;\n"; } ?>
|
||||
<?php if ($conf->browser->layout == 'phone') { print "padding-bottom: 6px\n"; } ?>
|
||||
}
|
||||
div.fichehalfleft {
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$left.";\n"; } ?>
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
|
||||
<?php if ($conf->browser->layout != 'phone') { print "float: ".$left.";\n"; } ?>
|
||||
<?php if ($conf->browser->layout != 'phone') { print "width: 50%;\n"; } ?>
|
||||
}
|
||||
div.fichehalfright {
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "float: ".$right.";\n"; } ?>
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "width: 50%;\n"; } ?>
|
||||
<?php if ($conf->browser->layout != 'phone') { print "float: ".$right.";\n"; } ?>
|
||||
<?php if ($conf->browser->layout != 'phone') { print "width: 50%;\n"; } ?>
|
||||
}
|
||||
div.ficheaddleft {
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { print "padding-".$left.": 16px;\n"; }
|
||||
<?php if ($conf->browser->layout != 'phone') { print "padding-".$left.": 16px;\n"; }
|
||||
else print "margin-top: 10px;\n"; ?>
|
||||
}
|
||||
.containercenter {
|
||||
@ -490,18 +492,9 @@ margin : 0px auto;
|
||||
/* ============================================================================== */
|
||||
|
||||
<?php
|
||||
if (! empty($conf->dol_optimize_smallscreen))
|
||||
{
|
||||
$minwidthtmenu=0;
|
||||
$heightmenu=19;
|
||||
$heightmenu2=19;
|
||||
}
|
||||
else
|
||||
{
|
||||
$minwidthtmenu=66;
|
||||
$heightmenu=52;
|
||||
$heightmenu2=40;
|
||||
}
|
||||
$minwidthtmenu=66;
|
||||
$heightmenu=52;
|
||||
$heightmenu2=40;
|
||||
?>
|
||||
|
||||
div#tmenu_tooltip {
|
||||
@ -579,7 +572,6 @@ ul.tmenu { /* t r b l */
|
||||
padding: 0px 0px 0px 0px;
|
||||
margin: 0px 0px 0px 0px;
|
||||
list-style: none;
|
||||
/* height: <?php print $heightmenu; ?>px; */
|
||||
box-shadow: 0 0 6px rgba(0, 0, 0, .4) !important;
|
||||
}
|
||||
ul.tmenu li {
|
||||
@ -623,11 +615,13 @@ li.tmenusel, li.tmenu:hover {
|
||||
.tmenuend .tmenuleft { width: 0px; }
|
||||
div.tmenuleft
|
||||
{
|
||||
width: 5px;
|
||||
float: <?php print $left; ?>;
|
||||
height: <?php print $heightmenu+4; ?>px;
|
||||
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menutab-r.png',1); ?>) 0 0 no-repeat;
|
||||
margin-top: 0px;
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { ?>
|
||||
width: 5px;
|
||||
height: <?php print $heightmenu+4; ?>px;
|
||||
background: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menutab-r.png',1); ?>) 0 0 no-repeat;
|
||||
<?php } ?>
|
||||
}
|
||||
div.tmenucenter
|
||||
{
|
||||
@ -640,7 +634,6 @@ div.tmenucenter
|
||||
.mainmenuaspan
|
||||
{
|
||||
padding-right: 4px;
|
||||
/*text-shadow: 1px 1px 1px #DDD;*/
|
||||
}
|
||||
|
||||
div.mainmenu {
|
||||
@ -652,7 +645,8 @@ div.mainmenu {
|
||||
min-width: 40px;
|
||||
}
|
||||
|
||||
<?php if (empty($conf->dol_optimize_smallscreen)) { ?>
|
||||
/* Do not load menu img if hidden to save bandwidth */
|
||||
<?php if (empty($dol_hide_topmenu)) { ?>
|
||||
|
||||
div.mainmenu.home{
|
||||
background-image: url(<?php echo dol_buildpath($path.'/theme/'.$theme.'/img/menus/home.png',1) ?>);
|
||||
@ -798,7 +792,7 @@ foreach($mainmenuusedarray as $val)
|
||||
?>
|
||||
|
||||
<?php
|
||||
} // End test if not phone
|
||||
} // End test if $dol_hide_topmenu
|
||||
?>
|
||||
|
||||
.tmenuimage {
|
||||
@ -1651,11 +1645,10 @@ table.noborder, table.formdoc, div.noborder {
|
||||
border-bottom-style: solid;
|
||||
|
||||
margin: 0px 0px 2px 0px;
|
||||
/*padding: 1px 2px 1px 2px;*/
|
||||
|
||||
-moz-box-shadow: 3px 3px 4px #DDD;
|
||||
-webkit-box-shadow: 3px 3px 4px #DDD;
|
||||
box-shadow: 3px 3px 4px #DDD;
|
||||
-moz-box-shadow: 2px 2px 4px #DDD;
|
||||
-webkit-box-shadow: 2px 2px 4px #DDD;
|
||||
box-shadow: 2px 2px 4px #DDD;
|
||||
|
||||
-moz-border-radius: 0.2em;
|
||||
-webkit-border-radius: 0.2em;
|
||||
@ -2709,6 +2702,12 @@ div.dolEventError h1, div.dolEventError h2 {
|
||||
/* Disable this. It breaks wrapping of boxes
|
||||
.ui-corner-all { white-space: nowrap; } */
|
||||
|
||||
.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled, .paginate_button_disabled {
|
||||
opacity: .35;
|
||||
filter: Alpha(Opacity=35);
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================================================== */
|
||||
/* JMobile */
|
||||
|
||||
@ -471,6 +471,11 @@ function createThirdParty($authentication,$thirdparty)
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
|
||||
// Patch to add capability to associate (one) sale representative
|
||||
if($thirdparty['commid'] && $thirdparty['commid']>0)
|
||||
$newobject->add_commercial($fuser, $thirdparty["commid"]);
|
||||
|
||||
$objectresp=array('result'=>array('result_code'=>'OK', 'result_label'=>''),'id'=>$newobject->id,'ref'=>$newobject->ref);
|
||||
}
|
||||
else
|
||||
|
||||
@ -130,7 +130,7 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* isValidMailDomain
|
||||
* testIsValidMailDomain
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@ -140,7 +140,7 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* isValidURL
|
||||
* testIsValidURL
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@ -155,22 +155,30 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
|
||||
/**
|
||||
* isIP
|
||||
* testIsIP
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testIsIP()
|
||||
{
|
||||
// Not valid
|
||||
$ip='a299.299.299.299';
|
||||
$result=is_ip($ip);
|
||||
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||
$this->assertEquals(0,$result,$ip);
|
||||
|
||||
// Reserved IP range (not checked by is_ip function)
|
||||
$ip='169.254.0.0';
|
||||
$result=is_ip($ip);
|
||||
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||
$this->assertEquals(0,$result,$ip);
|
||||
|
||||
$ip='1.2.3.4';
|
||||
$result=is_ip($ip);
|
||||
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||
$this->assertEquals(1,$result,$ip);
|
||||
|
||||
// Private IP ranges
|
||||
$ip='10.0.0.0';
|
||||
$result=is_ip($ip);
|
||||
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||
@ -186,9 +194,5 @@ class Functions2LibTest extends PHPUnit_Framework_TestCase
|
||||
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||
$this->assertEquals(2,$result,$ip);
|
||||
|
||||
$ip='169.254.0.0';
|
||||
$result=is_ip($ip);
|
||||
print __METHOD__." for ".$ip." result=".$result."\n";
|
||||
$this->assertEquals(2,$result,$ip);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user