mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
CSS
This commit is contained in:
commit
2d6b9a2a0a
2
.github/FUNDING.yml
vendored
2
.github/FUNDING.yml
vendored
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
open_collective: dolibarr
|
||||
custom: https://wiki.dolibarr.org/index.php/Subscribe
|
||||
# github: [eldy]
|
||||
github: [eldy]
|
||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
|
@ -3,7 +3,7 @@
|
|||
*Please:*
|
||||
- *only keep the "Fix", "Close" or "New" section*
|
||||
- *follow the project [contributing guidelines](/.github/CONTRIBUTING.md)*
|
||||
- *replace the bracket enclosed textswith meaningful informations*
|
||||
- *replace the bracket enclosed texts with meaningful information*
|
||||
|
||||
|
||||
# Fix #[*issue_number Short description*]
|
||||
|
|
|
|||
24
.tx/config
24
.tx/config
|
|
@ -170,12 +170,6 @@ source_file = htdocs/langs/en_US/hrm.lang
|
|||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.intracommreport]
|
||||
file_filter = htdocs/langs/<lang>/intracommreport.lang
|
||||
source_file = htdocs/langs/en_US/intracommreport.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.install]
|
||||
file_filter = htdocs/langs/<lang>/install.lang
|
||||
source_file = htdocs/langs/en_US/install.lang
|
||||
|
|
@ -188,6 +182,12 @@ source_file = htdocs/langs/en_US/interventions.lang
|
|||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.intracommreport]
|
||||
file_filter = htdocs/langs/<lang>/intracommreport.lang
|
||||
source_file = htdocs/langs/en_US/intracommreport.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.knowledgemanagement]
|
||||
file_filter = htdocs/langs/<lang>/knowledgemanagement.lang
|
||||
source_file = htdocs/langs/en_US/knowledgemanagement.lang
|
||||
|
|
@ -392,18 +392,18 @@ source_file = htdocs/langs/en_US/stripe.lang
|
|||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.suppliers]
|
||||
file_filter = htdocs/langs/<lang>/suppliers.lang
|
||||
source_file = htdocs/langs/en_US/suppliers.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.supplier_proposal]
|
||||
file_filter = htdocs/langs/<lang>/supplier_proposal.lang
|
||||
source_file = htdocs/langs/en_US/supplier_proposal.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.suppliers]
|
||||
file_filter = htdocs/langs/<lang>/suppliers.lang
|
||||
source_file = htdocs/langs/en_US/suppliers.lang
|
||||
source_lang = en_US
|
||||
type = MOZILLAPROPERTIES
|
||||
|
||||
[dolibarr.ticket]
|
||||
file_filter = htdocs/langs/<lang>/ticket.lang
|
||||
source_file = htdocs/langs/en_US/ticket.lang
|
||||
|
|
|
|||
23
ChangeLog
23
ChangeLog
|
|
@ -42,6 +42,19 @@ FIX: using Tulip, deposit mask was not saved
|
|||
FIX: #yogosha6907
|
||||
|
||||
|
||||
***** ChangeLog for 15.0.0 compared to 14.0.0 *****
|
||||
|
||||
For developers:
|
||||
---------------
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* Update hook 'printOriginObjectLine', removed check on product type and special code. Need now reshook.
|
||||
* Old deprecated module "SimplePOS" has been completely removed. Use module "TakePOS" is you need a Point Of Sale.
|
||||
|
||||
|
||||
|
||||
***** ChangeLog for 14.0.0 compared to 13.0.0 *****
|
||||
|
||||
For users:
|
||||
|
|
@ -262,7 +275,7 @@ Following changes may create regressions for some external modules, but were nec
|
|||
* The ICS value for direct debit or credit transfer is now stored on each bank account instead of into the global setup.
|
||||
* API /setup/shipment_methods has been replaced with API /setup/shipping_methods
|
||||
* Field "total" renamed into "total_ht" for table llx_facture, llx_facture_rec for better field name consistency
|
||||
* Field "tva" renamed into "total_tva" for table llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency
|
||||
* Field "tva" renamed into "total_tva" for llx_facture, table llx_propal, llx_supplier_proposal, llx_commande, llx_commande_fournisseur for better field name consistency
|
||||
* Field "total" renamed into "total_ttc" for table llx_propal, llx_supplier_proposal for better field name consistency
|
||||
* If your database is PostgreSQL, you must use version 9.1.0 or more (Dolibarr need the SQL function CONCAT)
|
||||
* If your database is MySQL or MariaDB, you need at least version 5.1
|
||||
|
|
@ -275,11 +288,11 @@ Following changes may create regressions for some external modules, but were nec
|
|||
***** ChangeLog for 13.0.4 compared to 13.0.3 *****
|
||||
|
||||
FIX: Allow disabling of a module (not a dangerous action) even if there is problem with token (due to bugged modules).
|
||||
FIX: 13.0 - fatal - missing inclusion of ajax.lib.php for calling `ajax_autocompleter()`
|
||||
FIX: #17919 pictures in docs.
|
||||
FIX: 13.0 - fatal - missing inclusion of ajax.lib.php for calling 'ajax_autocompleter()'
|
||||
FIX: #17919 pictures in docs
|
||||
FIX: #18006
|
||||
FIX: Accountancy - if we define a date start, automatic binding try to continue to solve old binding
|
||||
FIX: Accoutancy Limit date payment not registered on purchases operations
|
||||
FIX: Accountancy - Limit date payment not registered on purchases operations
|
||||
FIX: Can't edit replacement invoice
|
||||
FIX: deposit can create credit note in payment conf
|
||||
FIX: division by zero on create
|
||||
|
|
@ -383,7 +396,7 @@ FIX: File attachment on lots/batches
|
|||
FIX: handling $heightforinfotot when he's superior to a page height on Supplier Invoice
|
||||
FIX: hourglass and hide button to pay
|
||||
FIX: massaction validate invoice do not regenerate PDF
|
||||
FIX: missing mp4 video mime
|
||||
FIX: #16627 fix missing mp4 video mime
|
||||
FIX: picto on shipment to reset qty to 0. Some quantities were not reset.
|
||||
FIX: Protection to avoid #16504
|
||||
FIX: rounding amount on card updating
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ If you don't have time to install it yourself, you can try some commercial 'read
|
|||
|
||||
## UPGRADING
|
||||
|
||||
Dolibarr supports upgrading usually wihtout the need for any (commercial) support (depending on if you use any commercial extensions) and supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
|
||||
Dolibarr supports upgrading, usually without the need for any (commercial) support (depending on if you use any commercial extensions). It supports upgrading all the way from any version after 2.8 without breakage. This is unique in the ERP ecosystem and a benefit our users highly appreciate!
|
||||
|
||||
- At first make a backup of your Dolibarr files & than [see](https://wiki.dolibarr.org/index.php/Installation_-_Upgrade#Upgrade_Dolibarr)
|
||||
- Check that your installed PHP version is supported by the new version [see PHP support](./doc/phpmatrix.md).
|
||||
|
|
|
|||
|
|
@ -50,6 +50,10 @@ then
|
|||
then
|
||||
aaupper="SA"
|
||||
fi
|
||||
if [ $bb = "IQ" ]
|
||||
then
|
||||
aaupper="SA"
|
||||
fi
|
||||
|
||||
bblower=`echo $dirshort | nawk -F"_" '{ print tolower($2) }'`
|
||||
|
||||
|
|
@ -57,23 +61,29 @@ then
|
|||
if [ "$aa" != "$bblower" -a "$dirshort" != "en_US" ]
|
||||
then
|
||||
reflang="htdocs/langs/"$aa"_"$aaupper
|
||||
if [ -d $reflang -a $aa"_"$bb != $aa"_"$aaupper ]
|
||||
echo $reflang" "$aa"_"$bb != $aa"_"$aaupper
|
||||
|
||||
# If $reflang is a main language to use to sanitize the alternative file
|
||||
if [ -d $reflang ]
|
||||
then
|
||||
echo "***** Search original into "$reflang
|
||||
echo $dirshort is an alternative language of $reflang
|
||||
echo ./dev/translation/strip_language_file.php $aa"_"$aaupper $aa"_"$bb $2
|
||||
./dev/translation/strip_language_file.php $aa"_"$aaupper $aa"_"$bb $2
|
||||
for fic in `ls htdocs/langs/${aa}_${bb}/*.delta`; do f=`echo $fic | sed -e 's/\.delta//'`; echo $f; mv $f.delta $f; done
|
||||
for fic in `ls htdocs/langs/${aa}_${bb}/*.lang`;
|
||||
do f=`cat $fic | wc -l`;
|
||||
#echo $f lines into file $fic;
|
||||
if [ $f = 1 ]
|
||||
then
|
||||
echo Only one line remainging into file $fic, we delete it;
|
||||
rm $fic
|
||||
fi;
|
||||
done
|
||||
fi
|
||||
if [ $aa"_"$bb != $aa"_"$aaupper ]
|
||||
then
|
||||
echo "***** Search original into "$reflang
|
||||
echo $dirshort is an alternative language of $reflang
|
||||
echo ./dev/translation/strip_language_file.php $aa"_"$aaupper $aa"_"$bb $2
|
||||
./dev/translation/strip_language_file.php $aa"_"$aaupper $aa"_"$bb $2
|
||||
for fic in `ls htdocs/langs/${aa}_${bb}/*.delta`; do f=`echo $fic | sed -e 's/\.delta//'`; echo $f; mv $f.delta $f; done
|
||||
for fic in `ls htdocs/langs/${aa}_${bb}/*.lang`;
|
||||
do f=`cat $fic | wc -l`;
|
||||
#echo $f lines into file $fic;
|
||||
if [ $f = 1 ]
|
||||
then
|
||||
echo Only one line remainging into file $fic, we delete it;
|
||||
rm $fic
|
||||
fi;
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done;
|
||||
fi
|
||||
|
|
|
|||
145
dev/tools/spider.php
Normal file
145
dev/tools/spider.php
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
/*
|
||||
* 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file dev/tools/spider.php
|
||||
* \brief Script to spider Dolibarr app.
|
||||
*
|
||||
* To use it:
|
||||
* - Disable module "bookmark"
|
||||
* - Exclude param optioncss, token, sortfield, sortorder
|
||||
*/
|
||||
|
||||
$crawledLinks=array();
|
||||
const MAX_DEPTH=2;
|
||||
|
||||
|
||||
/**
|
||||
* @param string $url URL
|
||||
* @param string $depth Depth
|
||||
* @return string String
|
||||
*/
|
||||
function followLink($url, $depth = 0)
|
||||
{
|
||||
global $crawledLinks;
|
||||
$crawling=array();
|
||||
if ($depth>MAX_DEPTH) {
|
||||
echo "<div style='color:red;'>The Crawler is giving up!</div>";
|
||||
return;
|
||||
}
|
||||
$options=array(
|
||||
'http'=>array(
|
||||
'method'=>"GET",
|
||||
'user-agent'=>"gfgBot/0.1\n"
|
||||
)
|
||||
);
|
||||
$context=stream_context_create($options);
|
||||
$doc=new DomDocument();
|
||||
@$doc->loadHTML(file_get_contents($url, false, $context));
|
||||
$links=$doc->getElementsByTagName('a');
|
||||
$pageTitle=getDocTitle($doc, $url);
|
||||
$metaData=getDocMetaData($doc);
|
||||
foreach ($links as $i) {
|
||||
$link=$i->getAttribute('href');
|
||||
if (ignoreLink($link)) continue;
|
||||
$link=convertLink($url, $link);
|
||||
if (!in_array($link, $crawledLinks)) {
|
||||
$crawledLinks[]=$link;
|
||||
$crawling[]=$link;
|
||||
insertIntoDatabase($link, $pageTitle, $metaData, $depth);
|
||||
}
|
||||
}
|
||||
foreach ($crawling as $crawlURL)
|
||||
followLink($crawlURL, $depth+1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $site Site
|
||||
* @param string $path Path
|
||||
* @return string String
|
||||
*/
|
||||
function convertLink($site, $path)
|
||||
{
|
||||
if (substr_compare($path, "//", 0, 2)==0)
|
||||
return parse_url($site)['scheme'].$path;
|
||||
elseif (substr_compare($path, "http://", 0, 7)==0 or
|
||||
substr_compare($path, "https://", 0, 8)==0 or
|
||||
substr_compare($path, "www.", 0, 4)==0)
|
||||
return $path;
|
||||
else return $site.'/'.$path;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $url URL
|
||||
* @return boolean
|
||||
*/
|
||||
function ignoreLink($url)
|
||||
{
|
||||
return $url[0]=="#" or substr($url, 0, 11) == "javascript:";
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $link URL
|
||||
* @param string $title Title
|
||||
* @param string $metaData Array
|
||||
* @param int $depth Depth
|
||||
* @return void
|
||||
*/
|
||||
function insertIntoDatabase($link, $title, &$metaData, $depth)
|
||||
{
|
||||
//global $crawledLinks;
|
||||
|
||||
echo "Inserting new record {URL= ".$link.", Title = '$title', Description = '".$metaData['description']."', Keywords = ' ".$metaData['keywords']."'}<br/><br/><br/>";
|
||||
|
||||
//²$crawledLinks[]=$link;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $doc Doc
|
||||
* @param string $url URL
|
||||
* @return string URL/Title
|
||||
*/
|
||||
function getDocTitle(&$doc, $url)
|
||||
{
|
||||
$titleNodes=$doc->getElementsByTagName('title');
|
||||
if (count($titleNodes)==0 or !isset($titleNodes[0]->nodeValue))
|
||||
return $url;
|
||||
$title=str_replace('', '\n', $titleNodes[0]->nodeValue);
|
||||
return (strlen($title)<1)?$url:$title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $doc Doc
|
||||
* @return array Array
|
||||
*/
|
||||
function getDocMetaData(&$doc)
|
||||
{
|
||||
$metaData=array();
|
||||
$metaNodes=$doc->getElementsByTagName('meta');
|
||||
foreach ($metaNodes as $node)
|
||||
$metaData[$node->getAttribute("name")] = $node->getAttribute("content");
|
||||
if (!isset($metaData['description']))
|
||||
$metaData['description']='No Description Available';
|
||||
if (!isset($metaData['keywords'])) $metaData['keywords']='';
|
||||
return array(
|
||||
'keywords'=>str_replace('', '\n', $metaData['keywords']),
|
||||
'description'=>str_replace('', '\n', $metaData['description'])
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
followLink("http://localhost/dolibarr_dev/htdocs");
|
||||
|
|
@ -177,7 +177,7 @@ foreach ($filesToProcess as $fileToProcess) {
|
|||
|
||||
|
||||
// Start reading and parsing English
|
||||
|
||||
$aEnglish = array();
|
||||
if ($handle = fopen($lEnglishFile, 'r')) {
|
||||
print "Read English File $lEnglishFile:\n";
|
||||
$cnt = 0;
|
||||
|
|
@ -246,6 +246,9 @@ foreach ($filesToProcess as $fileToProcess) {
|
|||
|
||||
fwrite($oh, "# Dolibarr language file - Source file is en_US - ".(preg_replace('/\.lang$/', '', $fileToProcess))."\n");
|
||||
|
||||
$fileFirstFound = array();
|
||||
$lineFirstFound = array();
|
||||
|
||||
$cnt = 0;
|
||||
while (($line = fgets($handle)) !== false) {
|
||||
$cnt++;
|
||||
|
|
@ -299,6 +302,7 @@ foreach ($filesToProcess as $fileToProcess) {
|
|||
}
|
||||
|
||||
// String exists in both files and value into alternative language differs from main language but also from english files
|
||||
// so we keep it.
|
||||
if ((! empty($aSecondary[$key]) && $aSecondary[$key] != $aPrimary[$key]
|
||||
&& ! empty($aEnglish[$key]) && $aSecondary[$key] != $aEnglish[$key])
|
||||
|| in_array($key, $arrayofkeytoalwayskeep) || preg_match('/^FormatDate/', $key) || preg_match('/^FormatHour/', $key)
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ if ($resql) {
|
|||
}
|
||||
print "</select>";
|
||||
print ajax_combobox("chartofaccounts");
|
||||
print '<input type="'.(empty($conf->use_javascript_ajax) ? 'submit' : 'button').'" class="button" name="change_chart" id="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
|
||||
print '<input type="'.(empty($conf->use_javascript_ajax) ? 'submit' : 'button').'" class="button button-edit" name="change_chart" id="change_chart" value="'.dol_escape_htmltag($langs->trans("ChangeAndLoad")).'">';
|
||||
|
||||
print '<br>';
|
||||
print '<br>';
|
||||
|
|
|
|||
|
|
@ -535,7 +535,7 @@ if ($id) {
|
|||
}
|
||||
|
||||
print '<td colspan="3" class="right">';
|
||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="submit" class="button button-add" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
|
||||
|
|
@ -553,16 +553,16 @@ if ($id) {
|
|||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
$param = '&id='.$id;
|
||||
$param = '&id='.urlencode($id);
|
||||
if ($search_country_id > 0) {
|
||||
$param .= '&search_country_id='.$search_country_id;
|
||||
$param .= '&search_country_id='.urlencode($search_country_id);
|
||||
}
|
||||
$paramwithsearch = $param;
|
||||
if ($sortorder) {
|
||||
$paramwithsearch .= '&sortorder='.$sortorder;
|
||||
$paramwithsearch .= '&sortorder='.urlencode($sortorder);
|
||||
}
|
||||
if ($sortfield) {
|
||||
$paramwithsearch .= '&sortfield='.$sortfield;
|
||||
$paramwithsearch .= '&sortfield='.urlencode($sortfield);
|
||||
}
|
||||
|
||||
// There is several pages
|
||||
|
|
@ -631,7 +631,7 @@ if ($id) {
|
|||
fieldListAccountModel($fieldlist, $obj, $tabname[$id], 'edit');
|
||||
}
|
||||
|
||||
print '<td colspan="3" class="right"><a name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"> </a><input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<td colspan="3" class="right"><a name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"> </a><input type="submit" class="button button-edit" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print ' <input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'"></td>';
|
||||
} else {
|
||||
$tmpaction = 'view';
|
||||
|
|
|
|||
|
|
@ -257,7 +257,20 @@ if ($action == 'create') {
|
|||
print $form->textwithpicto($langs->trans("Pcgtype"), $langs->transnoentitiesnoconv("PcgtypeDesc"));
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '<input type="text" name="pcg_type" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">';
|
||||
print '<input type="text" name="pcg_type" list="pcg_type_datalist" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">';
|
||||
// autosuggest from existing account types if found
|
||||
print '<datalist id="pcg_type_datalist">';
|
||||
$sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account';
|
||||
$sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
|
||||
$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy.
|
||||
$sql .= ' LIMIT 50000'; // just as a sanity check
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
while ($obj = $db->fetch_object($resql)) {
|
||||
print '<option value="' . dol_escape_htmltag($obj->pcg_type) . '">';
|
||||
}
|
||||
}
|
||||
print '</datalist>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Category
|
||||
|
|
@ -320,7 +333,20 @@ if ($action == 'create') {
|
|||
print $form->textwithpicto($langs->trans("Pcgtype"), $langs->transnoentitiesnoconv("PcgtypeDesc"));
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '<input type="text" name="pcg_type" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">';
|
||||
print '<input type="text" name="pcg_type" list="pcg_type_datalist" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">';
|
||||
// autosuggest from existing account types if found
|
||||
print '<datalist id="pcg_type_datalist">';
|
||||
$sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account';
|
||||
$sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
|
||||
$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy.
|
||||
$sql .= ' LIMIT 50000'; // just as a sanity check
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
while ($obj = $db->fetch_object($resql)) {
|
||||
print '<option value="' . dol_escape_htmltag($obj->pcg_type) . '">';
|
||||
}
|
||||
}
|
||||
print '</datalist>';
|
||||
print '</td></tr>';
|
||||
|
||||
// Category
|
||||
|
|
@ -335,11 +361,7 @@ if ($action == 'create') {
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel();
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ print '<table class="border centpercent">';
|
|||
print '<tr><td class="titlefield">'.$langs->trans("AccountingCategory").'</td>';
|
||||
print '<td>';
|
||||
$formaccounting->select_accounting_category($cat_id, 'account_category', 1, 0, 0, 1);
|
||||
print '<input class="button" type="submit" value="'.$langs->trans("Select").'">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Select").'">';
|
||||
print '</td></tr>';
|
||||
|
||||
// Select the accounts
|
||||
|
|
@ -137,7 +137,7 @@ if (!empty($cat_id)) {
|
|||
print '</select><br>';
|
||||
print ajax_combobox('cpt_bk');
|
||||
*/
|
||||
print '<input class="button" type="submit" id="" class="action-delete" value="'.$langs->trans("Add").'"> ';
|
||||
print '<input type="submit" class="button button-add" id="" class="action-delete" value="'.$langs->trans("Add").'"> ';
|
||||
}
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ if ($tabname[$id]) {
|
|||
}
|
||||
|
||||
print '<td colspan="4" class="right">';
|
||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="submit" class="button button-add" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
|
||||
|
|
@ -580,7 +580,7 @@ if ($resql) {
|
|||
|
||||
$param = '&id='.$id;
|
||||
if ($search_country_id > 0) {
|
||||
$param .= '&search_country_id='.$search_country_id;
|
||||
$param .= '&search_country_id='.urlencode($search_country_id);
|
||||
}
|
||||
$paramwithsearch = $param;
|
||||
if ($sortorder) {
|
||||
|
|
@ -734,7 +734,7 @@ if ($resql) {
|
|||
print '<td class="center">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<div name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"></div>';
|
||||
print '<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td>';
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ print '</td></tr>';
|
|||
|
||||
print "</table>\n";
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
|
||||
print '<div class="center"><input type="submit" class="button button-edit" name="button" value="'.$langs->trans('Modify').'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ foreach ($list_account as $key) {
|
|||
print "</table>\n";
|
||||
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
|
||||
print '<div class="center"><input type="submit" class="button button-edit" name="button" value="'.$langs->trans('Modify').'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -242,11 +242,7 @@ if ($action == 'create') {
|
|||
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel();
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ print '</tr>';
|
|||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
|
||||
print '<div class="center"><input type="submit" class="button button-edit" name="button" value="'.$langs->trans('Modify').'"></div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -494,7 +494,7 @@ if ($id) {
|
|||
}
|
||||
|
||||
print '<td colspan="4" class="right">';
|
||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="submit" class="button button-add" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
|
||||
|
|
@ -512,7 +512,7 @@ if ($id) {
|
|||
|
||||
$param = '&id='.$id;
|
||||
if ($search_country_id > 0) {
|
||||
$param .= '&search_country_id='.$search_country_id;
|
||||
$param .= '&search_country_id='.urlencode($search_country_id);
|
||||
}
|
||||
$paramwithsearch = $param;
|
||||
if ($sortorder) {
|
||||
|
|
@ -606,7 +606,7 @@ if ($id) {
|
|||
print '<td class="center" colspan="4">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$rowid.'">';
|
||||
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '<div name="'.(!empty($obj->rowid) ? $obj->rowid : $obj->code).'"></div>';
|
||||
print '</td>';
|
||||
|
|
|
|||
|
|
@ -198,7 +198,7 @@ if ($action == 'update') {
|
|||
$sql .= " WHERE rowid = ".((int) $productid);
|
||||
}
|
||||
|
||||
dol_syslog("/accountancy/admin/productaccount.php sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog("/accountancy/admin/productaccount.php", LOG_DEBUG);
|
||||
if ($db->query($sql)) {
|
||||
$ok++;
|
||||
$db->commit();
|
||||
|
|
@ -329,7 +329,7 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
|
|||
|
||||
$sql .= $db->plimit($limit + 1, $offset);
|
||||
|
||||
dol_syslog("/accountancy/admin/productaccount.php:: sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog("/accountancy/admin/productaccount.php", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result) {
|
||||
$num = $db->num_rows($result);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
|||
$langs->loadLangs(array("accountancy", "compta"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ09');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
|
|
@ -120,19 +121,19 @@ if ($limit > 0 && $limit != $conf->liste_limit) {
|
|||
$filter = array();
|
||||
if (!empty($search_date_start)) {
|
||||
$filter['t.doc_date>='] = $search_date_start;
|
||||
$param .= '&date_startmonth='.GETPOST('date_startmonth', 'int').'&date_startday='.GETPOST('date_startday', 'int').'&date_startyear='.GETPOST('date_startyear', 'int');
|
||||
$param .= '&date_startmonth='.GETPOST('date_startmonth', 'int').'&date_startday='.GETPOST('date_startday', 'int').'&date_startyear='.GETPOST('date_startyear', 'int');
|
||||
}
|
||||
if (!empty($search_date_end)) {
|
||||
$filter['t.doc_date<='] = $search_date_end;
|
||||
$param .= '&date_endmonth='.GETPOST('date_endmonth', 'int').'&date_endday='.GETPOST('date_endday', 'int').'&date_endyear='.GETPOST('date_endyear', 'int');
|
||||
$param .= '&date_endmonth='.GETPOST('date_endmonth', 'int').'&date_endday='.GETPOST('date_endday', 'int').'&date_endyear='.GETPOST('date_endyear', 'int');
|
||||
}
|
||||
if (!empty($search_accountancy_code_start)) {
|
||||
$filter['t.numero_compte>='] = $search_accountancy_code_start;
|
||||
$param .= '&search_accountancy_code_start='.$search_accountancy_code_start;
|
||||
$param .= '&search_accountancy_code_start='.urlencode($search_accountancy_code_start);
|
||||
}
|
||||
if (!empty($search_accountancy_code_end)) {
|
||||
$filter['t.numero_compte<='] = $search_accountancy_code_end;
|
||||
$param .= '&search_accountancy_code_end='.$search_accountancy_code_end;
|
||||
$param .= '&search_accountancy_code_end='.urlencode($search_accountancy_code_end);
|
||||
}
|
||||
if (!empty($search_ledger_code)) {
|
||||
$filter['t.code_journal'] = $search_ledger_code;
|
||||
|
|
|
|||
|
|
@ -389,11 +389,7 @@ if ($action == 'create') {
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Create").'">';
|
||||
print ' ';
|
||||
print '<input type="button" value="'.$langs->trans("Cancel").'" class="button button-cancel" onclick="history.go(-1)" />';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel("Create");
|
||||
|
||||
print '</form>';
|
||||
} else {
|
||||
|
|
@ -450,7 +446,7 @@ if ($action == 'create') {
|
|||
print '<input type="hidden" name="action" value="setdate">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print $form->selectDate($object->doc_date ? $object->doc_date : - 1, 'doc_date', '', '', '', "setdate");
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $object->doc_date ? dol_print_date($object->doc_date, 'day') : ' ';
|
||||
|
|
@ -477,7 +473,7 @@ if ($action == 'create') {
|
|||
print '<input type="hidden" name="action" value="setjournal">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print $formaccounting->select_journal($object->code_journal, 'code_journal', 0, 0, array(), 1, 1);
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $object->code_journal;
|
||||
|
|
@ -504,7 +500,7 @@ if ($action == 'create') {
|
|||
print '<input type="hidden" name="action" value="setdocref">';
|
||||
print '<input type="hidden" name="mode" value="'.$mode.'">';
|
||||
print '<input type="text" size="20" name="doc_ref" value="'.dol_escape_htmltag($object->doc_ref).'">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans('Modify').'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans('Modify').'">';
|
||||
print '</form>';
|
||||
} else {
|
||||
print $object->doc_ref;
|
||||
|
|
|
|||
|
|
@ -530,25 +530,25 @@ $sqlwhere = array();
|
|||
if (count($filter) > 0) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if ($key == 't.doc_date') {
|
||||
$sqlwhere[] = $key.'=\''.$db->idate($value).'\'';
|
||||
$sqlwhere[] = $key."='".$db->idate($value)."'";
|
||||
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
||||
$sqlwhere[] = $key.'\''.$db->idate($value).'\'';
|
||||
$sqlwhere[] = $key."'".$db->idate($value)."'";
|
||||
} elseif ($key == 't.numero_compte>=' || $key == 't.numero_compte<=') {
|
||||
$sqlwhere[] = $key.'\''.$db->escape($value).'\'';
|
||||
$sqlwhere[] = $key."'".$db->escape($value)."'";
|
||||
} elseif ($key == 't.fk_doc' || $key == 't.fk_docdet' || $key == 't.piece_num') {
|
||||
$sqlwhere[] = $key.'='.$value;
|
||||
$sqlwhere[] = $key.'='.((int) $value);
|
||||
} elseif ($key == 't.numero_compte') {
|
||||
$sqlwhere[] = $key.' LIKE \''.$db->escape($value).'%\'';
|
||||
$sqlwhere[] = $key." LIKE '".$db->escape($value)."%'";
|
||||
} elseif ($key == 't.subledger_account') {
|
||||
$sqlwhere[] = natural_search($key, $value, 0, 1);
|
||||
} elseif ($key == 't.date_creation>=' || $key == 't.date_creation<=') {
|
||||
$sqlwhere[] = $key.'\''.$db->idate($value).'\'';
|
||||
$sqlwhere[] = $key."'".$db->idate($value)."'";
|
||||
} elseif ($key == 't.tms>=' || $key == 't.tms<=') {
|
||||
$sqlwhere[] = $key.'\''.$db->idate($value).'\'';
|
||||
$sqlwhere[] = $key."'".$db->idate($value)."'";
|
||||
} elseif ($key == 't.date_export>=' || $key == 't.date_export<=') {
|
||||
$sqlwhere[] = $key.'\''.$db->idate($value).'\'';
|
||||
$sqlwhere[] = $key."'".$db->idate($value)."'";
|
||||
} elseif ($key == 't.date_validated>=' || $key == 't.date_validated<=') {
|
||||
$sqlwhere[] = $key.'\''.$db->idate($value).'\'';
|
||||
$sqlwhere[] = $key."'".$db->idate($value)."'";
|
||||
} elseif ($key == 't.credit' || $key == 't.debit') {
|
||||
$sqlwhere[] = natural_search($key, $value, 1, 1);
|
||||
} elseif ($key == 't.reconciled_option') {
|
||||
|
|
@ -612,7 +612,7 @@ if ($action == 'export_fileconfirm' && $user->rights->accounting->mouvements->ex
|
|||
}
|
||||
$sql .= " WHERE rowid = ".((int) $movement->id);
|
||||
|
||||
dol_syslog("/accountancy/bookeeping/list.php Function export_file Specify movements as exported sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog("/accountancy/bookeeping/list.php Function export_file Specify movements as exported", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ class AccountancyCategory // extends CommonObject
|
|||
$sql .= " ".(!isset($this->position) ? 'NULL' : ((int) $this->position)).",";
|
||||
$sql .= " ".(!isset($this->fk_country) ? 'NULL' : ((int) $this->fk_country)).",";
|
||||
$sql .= " ".(!isset($this->active) ? 'NULL' : ((int) $this->active));
|
||||
$sql .= ", ".$conf->entity;
|
||||
$sql .= ", ".((int) $conf->entity);
|
||||
$sql .= ")";
|
||||
|
||||
$this->db->begin();
|
||||
|
|
@ -433,7 +433,7 @@ class AccountancyCategory // extends CommonObject
|
|||
|
||||
$this->lines_display = array();
|
||||
|
||||
dol_syslog(__METHOD__." sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
|
@ -632,7 +632,7 @@ class AccountancyCategory // extends CommonObject
|
|||
$sql .= " WHERE aa.rowid = ".((int) $cpt_id);
|
||||
$this->db->begin();
|
||||
|
||||
dol_syslog(__METHOD__." sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ class AccountancyExport
|
|||
public static $EXPORT_TYPE_LDCOMPTA10 = 120;
|
||||
public static $EXPORT_TYPE_GESTIMUMV3 = 130;
|
||||
public static $EXPORT_TYPE_GESTIMUMV5 = 135;
|
||||
public static $EXPORT_TYPE_ISUITEEXPERT = 200;
|
||||
// Generic FEC after that
|
||||
public static $EXPORT_TYPE_FEC = 1000;
|
||||
public static $EXPORT_TYPE_FEC2 = 1010;
|
||||
|
||||
|
|
@ -123,6 +125,7 @@ class AccountancyExport
|
|||
self::$EXPORT_TYPE_GESTIMUMV5 => $langs->trans('Modelcsv_Gestinum_v5'),
|
||||
self::$EXPORT_TYPE_FEC => $langs->trans('Modelcsv_FEC'),
|
||||
self::$EXPORT_TYPE_FEC2 => $langs->trans('Modelcsv_FEC2'),
|
||||
self::$EXPORT_TYPE_ISUITEEXPERT => 'Export iSuite Expert',
|
||||
);
|
||||
|
||||
ksort($listofexporttypes, SORT_NUMERIC);
|
||||
|
|
@ -158,6 +161,7 @@ class AccountancyExport
|
|||
self::$EXPORT_TYPE_GESTIMUMV5 => 'gestimumv5',
|
||||
self::$EXPORT_TYPE_FEC => 'fec',
|
||||
self::$EXPORT_TYPE_FEC2 => 'fec2',
|
||||
self::$EXPORT_TYPE_ISUITEEXPERT => 'isuiteexpert',
|
||||
);
|
||||
|
||||
return $formatcode[$type];
|
||||
|
|
@ -243,6 +247,10 @@ class AccountancyExport
|
|||
'label' => $langs->trans('Modelcsv_FEC2'),
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'txt',
|
||||
),
|
||||
self::$EXPORT_TYPE_ISUITEEXPERT => array(
|
||||
'label' => 'iSuite Expert',
|
||||
'ACCOUNTING_EXPORT_FORMAT' => 'csv',
|
||||
),
|
||||
),
|
||||
'cr'=> array(
|
||||
'1' => $langs->trans("Unix"),
|
||||
|
|
@ -334,6 +342,9 @@ class AccountancyExport
|
|||
case self::$EXPORT_TYPE_FEC2:
|
||||
$this->exportFEC2($TData);
|
||||
break;
|
||||
case self::$EXPORT_TYPE_ISUITEEXPERT :
|
||||
$this->exportiSuiteExpert($TData);
|
||||
break;
|
||||
default:
|
||||
$this->errors[] = $langs->trans('accountancy_error_modelnotfound');
|
||||
break;
|
||||
|
|
@ -1763,6 +1774,62 @@ class AccountancyExport
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export format : iSuite Expert
|
||||
*
|
||||
* by OpenSolus [https://opensolus.fr]
|
||||
*
|
||||
* @param array $objectLines data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function exportiSuiteExpert($objectLines)
|
||||
{
|
||||
$this->separator = ';';
|
||||
$this->end_line = "\r\n";
|
||||
|
||||
|
||||
foreach ($objectLines as $line) {
|
||||
$tab = array();
|
||||
|
||||
$date = dol_print_date($line->doc_date, '%d/%m/%Y');
|
||||
|
||||
$tab[] = $line->piece_num;
|
||||
$tab[] = $date;
|
||||
$tab[] = substr($date, 6, 4);
|
||||
$tab[] = substr($date, 3, 2);
|
||||
$tab[] = substr($date, 0, 2);
|
||||
$tab[] = $line->doc_ref;
|
||||
//Conversion de chaine UTF8 en Latin9
|
||||
$tab[] = mb_convert_encoding(str_replace(' - Compte auxiliaire', '', $line->label_operation), "Windows-1252", 'UTF-8');
|
||||
|
||||
//Calcul de la longueur des numéros de comptes
|
||||
$taille_numero = strlen(length_accountg($line->numero_compte));
|
||||
|
||||
//Création du numéro de client générique
|
||||
$numero_cpt_client = '411';
|
||||
for ($i = 1; $i <= ($taille_numero - 3); $i++) {
|
||||
$numero_cpt_client .= '0';
|
||||
}
|
||||
|
||||
//Création des comptes auxiliaire des clients
|
||||
if (length_accountg($line->numero_compte) == $numero_cpt_client) {
|
||||
$tab[] = rtrim(length_accounta($line->subledger_account), "0");
|
||||
} else {
|
||||
$tab[] = length_accountg($line->numero_compte);
|
||||
}
|
||||
$nom_client = explode(" - ", $line->label_operation);
|
||||
$tab[] = mb_convert_encoding($nom_client[0], "Windows-1252", 'UTF-8');
|
||||
$tab[] = price($line->debit);
|
||||
$tab[] = price($line->credit);
|
||||
$tab[] = price($line->montant);
|
||||
$tab[] = $line->code_journal;
|
||||
|
||||
$separator = $this->separator;
|
||||
print implode($separator, $tab) . $this->end_line;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* trunc
|
||||
*
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class AccountancySystem
|
|||
$sql .= " a.pcg_version = '".$this->db->escape($ref)."'";
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
|
|
@ -143,9 +143,9 @@ class AccountancySystem
|
|||
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."accounting_system";
|
||||
$sql .= " (date_creation, fk_user_author, numero, label)";
|
||||
$sql .= " VALUES ('".$this->db->idate($now)."',".$user->id.",'".$this->db->escape($this->numero)."','".$this->db->escape($this->label)."')";
|
||||
$sql .= " VALUES ('".$this->db->idate($now)."',".((int) $user->id).",'".$this->db->escape($this->numero)."','".$this->db->escape($this->label)."')";
|
||||
|
||||
dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$id = $this->db->last_insert_id(MAIN_DB_PREFIX."accounting_system");
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class AccountingAccount extends CommonObject
|
|||
global $conf;
|
||||
|
||||
$this->db = $db;
|
||||
$this->next_prev_filter = 'fk_pcg_version IN (SELECT pcg_version FROM '.MAIN_DB_PREFIX.'accounting_system WHERE rowid='.$conf->global->CHARTOFACCOUNTS.')'; // Used to add a filter in Form::showrefnav method
|
||||
$this->next_prev_filter = "fk_pcg_version IN (SELECT pcg_version FROM ".MAIN_DB_PREFIX."accounting_system WHERE rowid=".((int) $conf->global->CHARTOFACCOUNTS).")"; // Used to add a filter in Form::showrefnav method
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -185,7 +185,7 @@ class AccountingAccount extends CommonObject
|
|||
$sql .= " AND a.fk_pcg_version = '".$this->db->escape($limittoachartaccount)."'";
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
|
|
@ -274,7 +274,7 @@ class AccountingAccount extends CommonObject
|
|||
$sql .= ", reconcilable";
|
||||
$sql .= ") VALUES (";
|
||||
$sql .= " '".$this->db->idate($now)."'";
|
||||
$sql .= ", ".$conf->entity;
|
||||
$sql .= ", ".((int) $conf->entity);
|
||||
$sql .= ", ".(empty($this->fk_pcg_version) ? 'NULL' : "'".$this->db->escape($this->fk_pcg_version)."'");
|
||||
$sql .= ", ".(empty($this->pcg_type) ? 'NULL' : "'".$this->db->escape($this->pcg_type)."'");
|
||||
$sql .= ", ".(empty($this->account_number) ? 'NULL' : "'".$this->db->escape($this->account_number)."'");
|
||||
|
|
@ -282,14 +282,14 @@ class AccountingAccount extends CommonObject
|
|||
$sql .= ", ".(empty($this->label) ? "''" : "'".$this->db->escape($this->label)."'");
|
||||
$sql .= ", ".(empty($this->labelshort) ? "''" : "'".$this->db->escape($this->labelshort)."'");
|
||||
$sql .= ", ".(empty($this->account_category) ? 0 : (int) $this->account_category);
|
||||
$sql .= ", ".$user->id;
|
||||
$sql .= ", ".((int) $user->id);
|
||||
$sql .= ", ".(int) $this->active;
|
||||
$sql .= ", ".(int) $this->reconcilable;
|
||||
$sql .= ")";
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
dol_syslog(get_class($this)."::create sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
|
|
@ -352,7 +352,7 @@ class AccountingAccount extends CommonObject
|
|||
$sql .= " , reconcilable = ".(int) $this->reconcilable;
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$this->db->commit();
|
||||
|
|
@ -374,12 +374,12 @@ class AccountingAccount extends CommonObject
|
|||
global $langs;
|
||||
|
||||
$sql = "(SELECT fk_code_ventilation FROM ".MAIN_DB_PREFIX."facturedet";
|
||||
$sql .= " WHERE fk_code_ventilation=".$this->id.")";
|
||||
$sql .= " WHERE fk_code_ventilation=".((int) $this->id).")";
|
||||
$sql .= "UNION";
|
||||
$sql .= " (SELECT fk_code_ventilation FROM ".MAIN_DB_PREFIX."facture_fourn_det";
|
||||
$sql .= " WHERE fk_code_ventilation=".$this->id.")";
|
||||
$sql .= " WHERE fk_code_ventilation=".((int) $this->id).")";
|
||||
|
||||
dol_syslog(get_class($this)."::checkUsage sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::checkUsage", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
if ($resql) {
|
||||
|
|
@ -604,7 +604,7 @@ class AccountingAccount extends CommonObject
|
|||
$sql .= "SET ".$fieldtouse." = '0'";
|
||||
$sql .= " WHERE rowid = ".((int) $id);
|
||||
|
||||
dol_syslog(get_class($this)."::accountDeactivate ".$fieldtouse." sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::accountDeactivate ".$fieldtouse, LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
|
|
@ -642,7 +642,7 @@ class AccountingAccount extends CommonObject
|
|||
$sql .= " SET ".$fieldtouse." = '1'";
|
||||
$sql .= " WHERE rowid = ".((int) $id);
|
||||
|
||||
dol_syslog(get_class($this)."::account_activate ".$fieldtouse." sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::account_activate ".$fieldtouse, LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$this->db->commit();
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ class AccountingJournal extends CommonObject
|
|||
$sql .= " AND entity = ".$conf->entity;
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
|
|
@ -170,18 +170,18 @@ class AccountingJournal extends CommonObject
|
|||
$sql .= ' WHERE 1 = 1';
|
||||
$sql .= " AND entity IN (".getEntity('accountancy').")";
|
||||
if (count($sqlwhere) > 0) {
|
||||
$sql .= ' AND '.implode(' '.$filtermode.' ', $sqlwhere);
|
||||
$sql .= " AND ".implode(" ".$filtermode." ", $sqlwhere);
|
||||
}
|
||||
|
||||
if (!empty($sortfield)) {
|
||||
$sql .= $this->db->order($sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($limit)) {
|
||||
$sql .= ' '.$this->db->plimit($limit + 1, $offset);
|
||||
$sql .= $this->db->plimit($limit + 1, $offset);
|
||||
}
|
||||
$this->lines = array();
|
||||
|
||||
dol_syslog(get_class($this)."::fetch sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $this->db->num_rows($resql);
|
||||
|
|
|
|||
|
|
@ -382,15 +382,15 @@ class BookKeeping extends CommonObject
|
|||
$sql .= ", '".$this->db->escape($this->numero_compte)."'";
|
||||
$sql .= ", ".(!empty($this->label_compte) ? ("'".$this->db->escape($this->label_compte)."'") : "NULL");
|
||||
$sql .= ", '".$this->db->escape($this->label_operation)."'";
|
||||
$sql .= ", ".$this->debit;
|
||||
$sql .= ", ".$this->credit;
|
||||
$sql .= ", ".$this->montant;
|
||||
$sql .= ", ".((float) $this->debit);
|
||||
$sql .= ", ".((float) $this->credit);
|
||||
$sql .= ", ".((float) $this->montant);
|
||||
$sql .= ", ".(!empty($this->sens) ? ("'".$this->db->escape($this->sens)."'") : "NULL");
|
||||
$sql .= ", '".$this->db->escape($this->fk_user_author)."'";
|
||||
$sql .= ", '".$this->db->idate($now)."'";
|
||||
$sql .= ", '".$this->db->escape($this->code_journal)."'";
|
||||
$sql .= ", ".(!empty($this->journal_label) ? ("'".$this->db->escape($this->journal_label)."'") : "NULL");
|
||||
$sql .= ", ".$this->db->escape($this->piece_num);
|
||||
$sql .= ", ".((int) $this->piece_num);
|
||||
$sql .= ", ".(!isset($this->entity) ? $conf->entity : $this->entity);
|
||||
$sql .= ")";
|
||||
|
||||
|
|
@ -647,7 +647,7 @@ class BookKeeping extends CommonObject
|
|||
$sql .= ' '.(!isset($this->credit) ? 'NULL' : $this->credit).',';
|
||||
$sql .= ' '.(!isset($this->montant) ? 'NULL' : $this->montant).',';
|
||||
$sql .= ' '.(!isset($this->sens) ? 'NULL' : "'".$this->db->escape($this->sens)."'").',';
|
||||
$sql .= ' '.$user->id.',';
|
||||
$sql .= ' '.((int) $user->id).',';
|
||||
$sql .= ' '."'".$this->db->idate($now)."',";
|
||||
$sql .= ' '.(empty($this->code_journal) ? 'NULL' : "'".$this->db->escape($this->code_journal)."'").',';
|
||||
$sql .= ' '.(empty($this->journal_label) ? 'NULL' : "'".$this->db->escape($this->journal_label)."'").',';
|
||||
|
|
@ -883,7 +883,7 @@ class BookKeeping extends CommonObject
|
|||
$sql .= ' WHERE 1 = 1';
|
||||
$sql .= " AND entity IN (".getEntity('accountancy').")";
|
||||
if (count($sqlwhere) > 0) {
|
||||
$sql .= ' AND '.implode(' '.$filtermode.' ', $sqlwhere);
|
||||
$sql .= " AND ".implode(" ".$filtermode." ", $sqlwhere);
|
||||
}
|
||||
// Affichage par compte comptable
|
||||
if (!empty($option)) {
|
||||
|
|
@ -893,11 +893,9 @@ class BookKeeping extends CommonObject
|
|||
$sql .= ' ORDER BY t.numero_compte ASC';
|
||||
}
|
||||
|
||||
if (!empty($sortfield)) {
|
||||
$sql .= ', '.$sortfield.' '.$sortorder;
|
||||
}
|
||||
$sql .= $this->db->order($sortfield, $sortorder);
|
||||
if (!empty($limit)) {
|
||||
$sql .= ' '.$this->db->plimit($limit + 1, $offset);
|
||||
$sql .= $this->db->plimit($limit + 1, $offset);
|
||||
}
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
@ -1043,13 +1041,13 @@ class BookKeeping extends CommonObject
|
|||
$sql .= " AND t.date_export IS NULL";
|
||||
}
|
||||
if (count($sqlwhere) > 0) {
|
||||
$sql .= ' AND '.implode(' '.$filtermode.' ', $sqlwhere);
|
||||
$sql .= ' AND '.implode(" ".$filtermode." ", $sqlwhere);
|
||||
}
|
||||
if (!empty($sortfield)) {
|
||||
$sql .= $this->db->order($sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($limit)) {
|
||||
$sql .= ' '.$this->db->plimit($limit + 1, $offset);
|
||||
$sql .= $this->db->plimit($limit + 1, $offset);
|
||||
}
|
||||
$this->lines = array();
|
||||
|
||||
|
|
@ -1137,17 +1135,17 @@ class BookKeeping extends CommonObject
|
|||
if (count($filter) > 0) {
|
||||
foreach ($filter as $key => $value) {
|
||||
if ($key == 't.doc_date') {
|
||||
$sqlwhere[] = $key.'=\''.$this->db->idate($value).'\'';
|
||||
$sqlwhere[] = $key." = '".$this->db->idate($value)."'";
|
||||
} elseif ($key == 't.doc_date>=' || $key == 't.doc_date<=') {
|
||||
$sqlwhere[] = $key.'\''.$this->db->idate($value).'\'';
|
||||
$sqlwhere[] = $key."'".$this->db->idate($value)."'";
|
||||
} elseif ($key == 't.numero_compte>=' || $key == 't.numero_compte<=' || $key == 't.subledger_account>=' || $key == 't.subledger_account<=') {
|
||||
$sqlwhere[] = $key.'\''.$this->db->escape($value).'\'';
|
||||
$sqlwhere[] = $key."'".$this->db->escape($value)."'";
|
||||
} elseif ($key == 't.fk_doc' || $key == 't.fk_docdet' || $key == 't.piece_num') {
|
||||
$sqlwhere[] = $key.'='.$value;
|
||||
$sqlwhere[] = $key." = ".((int) $value);
|
||||
} elseif ($key == 't.subledger_account' || $key == 't.numero_compte') {
|
||||
$sqlwhere[] = $key.' LIKE \''.$this->db->escape($value).'%\'';
|
||||
$sqlwhere[] = $key." LIKE '".$this->db->escape($value)."%'";
|
||||
} elseif ($key == 't.subledger_label') {
|
||||
$sqlwhere[] = $key.' LIKE \''.$this->db->escape($value).'%\'';
|
||||
$sqlwhere[] = $key." LIKE '".$this->db->escape($value)."%'";
|
||||
} elseif ($key == 't.code_journal' && !empty($value)) {
|
||||
if (is_array($value)) {
|
||||
$sqlwhere[] = natural_search("t.code_journal", join(',', $value), 3, 1);
|
||||
|
|
@ -1155,13 +1153,13 @@ class BookKeeping extends CommonObject
|
|||
$sqlwhere[] = natural_search("t.code_journal", $value, 3, 1);
|
||||
}
|
||||
} else {
|
||||
$sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\'';
|
||||
$sqlwhere[] = $key." LIKE '%".$this->db->escape($value)."%'";
|
||||
}
|
||||
}
|
||||
}
|
||||
$sql .= ' WHERE entity IN ('.getEntity('accountancy').')';
|
||||
if (count($sqlwhere) > 0) {
|
||||
$sql .= ' AND '.implode(' '.$filtermode.' ', $sqlwhere);
|
||||
$sql .= " AND ".implode(" ".$filtermode." ", $sqlwhere);
|
||||
}
|
||||
|
||||
$sql .= ' GROUP BY t.numero_compte';
|
||||
|
|
@ -1170,7 +1168,7 @@ class BookKeeping extends CommonObject
|
|||
$sql .= $this->db->order($sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($limit)) {
|
||||
$sql .= ' '.$this->db->plimit($limit + 1, $offset);
|
||||
$sql .= $this->db->plimit($limit + 1, $offset);
|
||||
}
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
@ -1347,8 +1345,9 @@ class BookKeeping extends CommonObject
|
|||
$this->db->begin();
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element.$mode;
|
||||
$sql .= ' SET '.$field.'='.(is_numeric($value) ? $value : "'".$this->db->escape($value)."'");
|
||||
$sql .= " WHERE piece_num = '".$this->db->escape($piece_num)."'";
|
||||
$sql .= " SET ".$field." = ".(is_numeric($value) ? ((float) $value) : "'".$this->db->escape($value)."'");
|
||||
$sql .= " WHERE piece_num = ".((int) $piece_num);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
|
||||
if (!$resql) {
|
||||
|
|
@ -1637,7 +1636,7 @@ class BookKeeping extends CommonObject
|
|||
$sql .= ", date_export";
|
||||
}
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element.$mode;
|
||||
$sql .= " WHERE piece_num = ".$piecenum;
|
||||
$sql .= " WHERE piece_num = ".((int) $piecenum);
|
||||
$sql .= " AND entity IN (".getEntity('accountancy').")";
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
|
@ -1678,7 +1677,7 @@ class BookKeeping extends CommonObject
|
|||
$sql = "SELECT MAX(piece_num)+1 as max FROM ".MAIN_DB_PREFIX.$this->table_element.$mode;
|
||||
$sql .= " WHERE entity IN (".getEntity('accountancy').")";
|
||||
|
||||
dol_syslog(get_class($this)."getNextNumMvt sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."getNextNumMvt", LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
|
|
@ -1718,7 +1717,7 @@ class BookKeeping extends CommonObject
|
|||
$sql .= ", date_export";
|
||||
}
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element.$mode;
|
||||
$sql .= " WHERE piece_num = ".$piecenum;
|
||||
$sql .= " WHERE piece_num = ".((int) $piecenum);
|
||||
$sql .= " AND entity IN (".getEntity('accountancy').")";
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
|
@ -1858,7 +1857,7 @@ class BookKeeping extends CommonObject
|
|||
$sql .= ' SELECT doc_date, doc_type,';
|
||||
$sql .= ' doc_ref, fk_doc, fk_docdet, entity, thirdparty_code, subledger_account, subledger_label,';
|
||||
$sql .= ' numero_compte, label_compte, label_operation, debit, credit,';
|
||||
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, '.$next_piecenum.", '".$this->db->idate($now)."'";
|
||||
$sql .= ' montant, sens, fk_user_author, import_key, code_journal, journal_label, '.((int) $next_piecenum).", '".$this->db->idate($now)."'";
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.'_tmp WHERE piece_num = '.((int) $piece_num);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
|
|
@ -2017,7 +2016,7 @@ class BookKeeping extends CommonObject
|
|||
$sql .= " WHERE aa.account_number = '".$this->db->escape($account)."'";
|
||||
$sql .= " AND aa.entity IN (".getEntity('accountancy').")";
|
||||
|
||||
dol_syslog(get_class($this)."::select_account sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::select_account", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$obj = '';
|
||||
|
|
@ -2057,7 +2056,7 @@ class BookKeeping extends CommonObject
|
|||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_accounting_category as cat ON aa.fk_accounting_category = cat.rowid";
|
||||
$sql .= " WHERE aa.entity IN (".getEntity('accountancy').")";
|
||||
|
||||
dol_syslog(get_class($this)."::select_account sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::select_account", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) {
|
||||
$obj = '';
|
||||
|
|
|
|||
|
|
@ -279,7 +279,7 @@ class Lettering extends BookKeeping
|
|||
$sql .= " WHERE rowid IN (".$this->db->sanitize(implode(',', $ids)).") AND date_validated IS NULL ";
|
||||
$this->db->begin();
|
||||
|
||||
dol_syslog(get_class($this)."::update sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ if ($action == 'validate_movements_confirm' && !empty($user->rights->accounting-
|
|||
$sql .= " AND doc_date >= '" . $db->idate($date_start) . "'";
|
||||
$sql .= " AND doc_date <= '" . $db->idate($date_end) . "'";
|
||||
|
||||
dol_syslog("/accountancy/closure/index.php :: Function validate_movement_confirm Specify movements as validated sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog("/accountancy/closure/index.php :: Function validate_movement_confirm Specify movements as validated", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if (!$result) {
|
||||
$error++;
|
||||
|
|
@ -189,7 +189,7 @@ for ($i = 1; $i <= 12; $i++) {
|
|||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql('MONTH(b.doc_date)='.$j, '1', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(b.doc_date)=".$j, "1", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " COUNT(b.rowid) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."accounting_bookkeeping as b";
|
||||
|
|
@ -198,7 +198,7 @@ $sql .= " AND b.doc_date <= '".$db->idate($search_date_end)."'";
|
|||
$sql .= " AND b.entity IN (".getEntity('bookkeeping', 0).")"; // We don't share object for accountancy
|
||||
$sql .= " AND date_validated IS NULL";
|
||||
|
||||
dol_syslog('htdocs/accountancy/closure/index.php sql='.$sql, LOG_DEBUG);
|
||||
dol_syslog('htdocs/accountancy/closure/index.php', LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ if (!empty($id)) {
|
|||
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = ".((int) $id);
|
||||
$sql .= " AND f.entity IN (".getEntity('invoice', 0).")"; // We don't share object for accountancy
|
||||
|
||||
dol_syslog("/accounting/customer/card.php sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog("/accounting/customer/card.php", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
|
|
|
|||
|
|
@ -85,8 +85,8 @@ if ($action == 'clean' || $action == 'validatehistory') {
|
|||
$sql1 .= ' (SELECT accnt.rowid ';
|
||||
$sql1 .= ' FROM '.MAIN_DB_PREFIX.'accounting_account as accnt';
|
||||
$sql1 .= ' INNER JOIN '.MAIN_DB_PREFIX.'accounting_system as syst';
|
||||
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid='.$conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity.')';
|
||||
$sql1 .= ' AND fd.fk_facture IN (SELECT rowid FROM '.MAIN_DB_PREFIX.'facture WHERE entity = '.$conf->entity.')';
|
||||
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid='.((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.((int) $conf->entity).')';
|
||||
$sql1 .= ' AND fd.fk_facture IN (SELECT rowid FROM '.MAIN_DB_PREFIX.'facture WHERE entity = '.((int) $conf->entity).')';
|
||||
$sql1 .= ' AND fk_code_ventilation <> 0';
|
||||
|
||||
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
|
||||
|
|
@ -110,13 +110,13 @@ if ($action == 'validatehistory') {
|
|||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet";
|
||||
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
|
||||
$sql1 .= " FROM " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "facturedet.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . ((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.$conf->entity;
|
||||
$sql1 .= " WHERE " . MAIN_DB_PREFIX . "facturedet.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . ((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.((int) $conf->entity);
|
||||
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
|
||||
$sql1 .= " AND " . MAIN_DB_PREFIX . "facturedet.fk_code_ventilation = 0";
|
||||
} else {
|
||||
$sql1 = "UPDATE " . MAIN_DB_PREFIX . "facturedet as fd, " . MAIN_DB_PREFIX . "product as p, " . MAIN_DB_PREFIX . "accounting_account as accnt , " . MAIN_DB_PREFIX . "accounting_system as syst";
|
||||
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
|
||||
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . ((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.$conf->entity;
|
||||
$sql1 .= " WHERE fd.fk_product = p.rowid AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid=" . ((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.((int) $conf->entity);
|
||||
$sql1 .= " AND accnt.active = 1 AND p.accountancy_code_sell=accnt.account_number";
|
||||
$sql1 .= " AND fd.fk_code_ventilation = 0";
|
||||
}*/
|
||||
|
|
@ -283,7 +283,7 @@ for ($i = 1; $i <= 12; $i++) {
|
|||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql('MONTH(f.datef)='.$j, 'fd.total_ht', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(f.datef)=".$j, "fd.total_ht", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM(fd.total_ht) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
|
|
@ -306,7 +306,7 @@ if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
|
|||
}
|
||||
$sql .= " GROUP BY fd.fk_code_ventilation,aa.account_number,aa.label";
|
||||
|
||||
dol_syslog('htdocs/accountancy/customer/index.php sql='.$sql, LOG_DEBUG);
|
||||
dol_syslog('htdocs/accountancy/customer/index.php', LOG_DEBUG);
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$num = $db->num_rows($resql);
|
||||
|
|
@ -367,7 +367,7 @@ for ($i = 1; $i <= 12; $i++) {
|
|||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql('MONTH(f.datef)='.$j, 'fd.total_ht', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(f.datef)=".$j, "fd.total_ht", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM(fd.total_ht) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
|
|
@ -452,7 +452,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
|
|||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql('MONTH(f.datef)='.$j, 'fd.total_ht', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(f.datef)=".$j, "fd.total_ht", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM(fd.total_ht) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
|
|
@ -513,7 +513,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
|
|||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql('MONTH(f.datef)='.$j, '(fd.total_ht-(fd.qty * fd.buy_price_ht))', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(f.datef)=".$j, "(fd.total_ht-(fd.qty * fd.buy_price_ht))", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM((fd.total_ht-(fd.qty * fd.buy_price_ht))) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as fd";
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ if ($massaction == 'ventil' && $user->rights->accounting->bind->write) {
|
|||
$accountventilated = new AccountingAccount($db);
|
||||
$accountventilated->fetch($monCompte, '', 1);
|
||||
|
||||
dol_syslog("accountancy/customer/list.php sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog("accountancy/customer/list.php", LOG_DEBUG);
|
||||
if ($db->query($sql)) {
|
||||
$msg .= '<div><span style="color:green">'.$langs->trans("Lineofinvoice", $monId).' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'</span></div>';
|
||||
$ok++;
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ if (!empty($id)) {
|
|||
$sql .= " WHERE er.fk_statut > 0 AND erd.rowid = ".((int) $id);
|
||||
$sql .= " AND er.entity IN (".getEntity('expensereport', 0).")"; // We don't share object for accountancy
|
||||
|
||||
dol_syslog("/accounting/expensereport/card.php sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog("/accounting/expensereport/card.php", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
|
|
|
|||
|
|
@ -79,8 +79,8 @@ if (($action == 'clean' || $action == 'validatehistory') && $user->rights->accou
|
|||
$sql1 .= ' (SELECT accnt.rowid ';
|
||||
$sql1 .= ' FROM '.MAIN_DB_PREFIX.'accounting_account as accnt';
|
||||
$sql1 .= ' INNER JOIN '.MAIN_DB_PREFIX.'accounting_system as syst';
|
||||
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid='.$conf->global->CHARTOFACCOUNTS.' AND accnt.entity = '.$conf->entity.')';
|
||||
$sql1 .= ' AND erd.fk_expensereport IN (SELECT rowid FROM '.MAIN_DB_PREFIX.'expensereport WHERE entity = '.$conf->entity.')';
|
||||
$sql1 .= ' ON accnt.fk_pcg_version = syst.pcg_version AND syst.rowid='.((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.((int) $conf->entity).')';
|
||||
$sql1 .= ' AND erd.fk_expensereport IN (SELECT rowid FROM '.MAIN_DB_PREFIX.'expensereport WHERE entity = '.((int) $conf->entity).')';
|
||||
$sql1 .= ' AND fk_code_ventilation <> 0';
|
||||
dol_syslog("htdocs/accountancy/customer/index.php fixaccountancycode", LOG_DEBUG);
|
||||
$resql1 = $db->query($sql1);
|
||||
|
|
@ -103,13 +103,13 @@ if ($action == 'validatehistory') {
|
|||
$sql1 = "UPDATE ".MAIN_DB_PREFIX."expensereport_det";
|
||||
$sql1 .= " SET fk_code_ventilation = accnt.rowid";
|
||||
$sql1 .= " FROM ".MAIN_DB_PREFIX."c_type_fees as t, ".MAIN_DB_PREFIX."accounting_account as accnt , ".MAIN_DB_PREFIX."accounting_system as syst";
|
||||
$sql1 .= " WHERE ".MAIN_DB_PREFIX."expensereport_det.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid = ".((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.$conf->entity;
|
||||
$sql1 .= " WHERE ".MAIN_DB_PREFIX."expensereport_det.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid = ".((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.((int) $conf->entity);
|
||||
$sql1 .= " AND accnt.active = 1 AND t.accountancy_code = accnt.account_number";
|
||||
$sql1 .= " AND ".MAIN_DB_PREFIX."expensereport_det.fk_code_ventilation = 0";
|
||||
} else {
|
||||
$sql1 = "UPDATE ".MAIN_DB_PREFIX."expensereport_det as erd, ".MAIN_DB_PREFIX."c_type_fees as t, ".MAIN_DB_PREFIX."accounting_account as accnt , ".MAIN_DB_PREFIX."accounting_system as syst";
|
||||
$sql1 .= " SET erd.fk_code_ventilation = accnt.rowid";
|
||||
$sql1 .= " WHERE erd.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid = ".((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.$conf->entity;
|
||||
$sql1 .= " WHERE erd.fk_c_type_fees = t.id AND accnt.fk_pcg_version = syst.pcg_version AND syst.rowid = ".((int) $conf->global->CHARTOFACCOUNTS).' AND accnt.entity = '.((int) $conf->entity);
|
||||
$sql1 .= " AND accnt.active = 1 AND t.accountancy_code=accnt.account_number";
|
||||
$sql1 .= " AND erd.fk_code_ventilation = 0";
|
||||
}
|
||||
|
|
@ -166,13 +166,13 @@ for ($i = 1; $i <= 12; $i++) {
|
|||
print '<td width="60" class="right"><b>'.$langs->trans("Total").'</b></td></tr>';
|
||||
|
||||
$sql = "SELECT ".$db->ifsql('aa.account_number IS NULL', "'tobind'", 'aa.account_number')." AS codecomptable,";
|
||||
$sql .= " ".$db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label')." AS intitule,";
|
||||
$sql .= " ".$db->ifsql('aa.label IS NULL', "'tobind'", 'aa.label')." AS intitule,";
|
||||
for ($i = 1; $i <= 12; $i++) {
|
||||
$j = $i + ($conf->global->SOCIETE_FISCAL_MONTH_START ? $conf->global->SOCIETE_FISCAL_MONTH_START : 1) - 1;
|
||||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql('MONTH(er.date_debut)='.$j, 'erd.total_ht', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(er.date_debut)=".$j, "erd.total_ht", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM(erd.total_ht) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as erd";
|
||||
|
|
@ -251,7 +251,7 @@ for ($i = 1; $i <= 12; $i++) {
|
|||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql('MONTH(er.date_debut)='.$j, 'erd.total_ht', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(er.date_debut)=".$j, "erd.total_ht", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " ROUND(SUM(erd.total_ht),2) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as erd";
|
||||
|
|
@ -330,7 +330,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
|
|||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql('MONTH(er.date_create)='.$j, 'erd.total_ht', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(er.date_create)=".$j, "erd.total_ht", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM(erd.total_ht) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport_det as erd";
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ if ($massaction == 'ventil' && $user->rights->accounting->bind->write) {
|
|||
$accountventilated = new AccountingAccount($db);
|
||||
$accountventilated->fetch($monCompte, '', 1);
|
||||
|
||||
dol_syslog('accountancy/expensereport/list.php:: sql='.$sql, LOG_DEBUG);
|
||||
dol_syslog('accountancy/expensereport/list.php', LOG_DEBUG);
|
||||
if ($db->query($sql)) {
|
||||
$msg .= '<div><span style="color:green">'.$langs->trans("LineOfExpenseReport").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'</span></div>';
|
||||
$ok++;
|
||||
|
|
|
|||
|
|
@ -364,10 +364,10 @@ if ($result) {
|
|||
// Note: We have the social contribution id, it can be faster to get accounting code from social contribution id.
|
||||
$sqlmid = 'SELECT cchgsoc.accountancy_code';
|
||||
$sqlmid .= " FROM ".MAIN_DB_PREFIX."c_chargesociales cchgsoc";
|
||||
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."chargesociales as chgsoc ON chgsoc.fk_type=cchgsoc.id";
|
||||
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."paiementcharge as paycharg ON paycharg.fk_charge=chgsoc.rowid";
|
||||
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."chargesociales as chgsoc ON chgsoc.fk_type = cchgsoc.id";
|
||||
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."paiementcharge as paycharg ON paycharg.fk_charge = chgsoc.rowid";
|
||||
$sqlmid .= " INNER JOIN ".MAIN_DB_PREFIX."bank_url as bkurl ON bkurl.url_id=paycharg.rowid AND bkurl.type = 'payment_sc'";
|
||||
$sqlmid .= " WHERE bkurl.fk_bank=".$obj->rowid;
|
||||
$sqlmid .= " WHERE bkurl.fk_bank = ".((int) $obj->rowid);
|
||||
|
||||
dol_syslog("accountancy/journal/bankjournal.php:: sqlmid=".$sqlmid, LOG_DEBUG);
|
||||
$resultmid = $db->query($sqlmid);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ if (!empty($id)) {
|
|||
$sql .= " WHERE f.fk_statut > 0 AND l.rowid = ".((int) $id);
|
||||
$sql .= " AND f.entity IN (".getEntity('facture_fourn', 0).")"; // We don't share object for accountancy
|
||||
|
||||
dol_syslog("/accounting/supplier/card.php sql=".$sql, LOG_DEBUG);
|
||||
dol_syslog("/accounting/supplier/card.php", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
|
||||
if ($result) {
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ for ($i = 1; $i <= 12; $i++) {
|
|||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql('MONTH(ff.datef)='.$j, 'ffd.total_ht', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(ff.datef)=".$j, "ffd.total_ht", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM(ffd.total_ht) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as ffd";
|
||||
|
|
@ -362,7 +362,7 @@ for ($i = 1; $i <= 12; $i++) {
|
|||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql('MONTH(ff.datef)='.$j, 'ffd.total_ht', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(ff.datef)=".$j, "ffd.total_ht", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM(ffd.total_ht) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as ffd";
|
||||
|
|
@ -441,7 +441,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL > 0) { // This part of code looks strange
|
|||
if ($j > 12) {
|
||||
$j -= 12;
|
||||
}
|
||||
$sql .= " SUM(".$db->ifsql('MONTH(ff.datef)='.$j, 'ffd.total_ht', '0').") AS month".str_pad($j, 2, '0', STR_PAD_LEFT).",";
|
||||
$sql .= " SUM(".$db->ifsql("MONTH(ff.datef)=".$j, "ffd.total_ht", "0").") AS month".str_pad($j, 2, "0", STR_PAD_LEFT).",";
|
||||
}
|
||||
$sql .= " SUM(ffd.total_ht) as total";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn_det as ffd";
|
||||
|
|
|
|||
|
|
@ -193,7 +193,7 @@ if ($massaction == 'ventil' && $user->rights->accounting->bind->write) {
|
|||
$accountventilated = new AccountingAccount($db);
|
||||
$accountventilated->fetch($monCompte, '', 1);
|
||||
|
||||
dol_syslog('accountancy/supplier/list.php sql='.$sql, LOG_DEBUG);
|
||||
dol_syslog('accountancy/supplier/list.php', LOG_DEBUG);
|
||||
if ($db->query($sql)) {
|
||||
$msg .= '<div><span style="color:green">'.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'</span></div>';
|
||||
$ok++;
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) {
|
|||
print '</div>';
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,6 @@ print load_fiche_titre($this->control->tpl['title']);
|
|||
|
||||
dol_htmloutput_errors((is_numeric($object->error) ? '' : $object->error), $object->errors);
|
||||
|
||||
dol_htmloutput_errors((is_numeric($GLOBALS['error']) ? '' : $GLOBALS['error']), $GLOBALS['errors']);
|
||||
|
||||
dol_htmloutput_errors($this->control->tpl['error'], $this->control->tpl['errors']);
|
||||
|
||||
echo $this->control->tpl['ajax_selectcountry']; ?>
|
||||
|
|
|
|||
|
|
@ -124,8 +124,23 @@ if ($reshook < 0) {
|
|||
}
|
||||
|
||||
if (empty($reshook)) {
|
||||
$backurlforlist = DOL_URL_ROOT.'/adherents/list.php';
|
||||
|
||||
if (empty($backtopage) || ($cancel && empty($id))) {
|
||||
if (empty($backtopage) || ($cancel && strpos($backtopage, '__ID__'))) {
|
||||
if (empty($id) && (($action != 'add' && $action != 'create') || $cancel)) {
|
||||
$backtopage = $backurlforlist;
|
||||
} else {
|
||||
$backtopage = DOL_URL_ROOT.'/adherents/card.php?id='.((!empty($id) && $id > 0) ? $id : '__ID__');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($cancel) {
|
||||
if (!empty($backtopage)) {
|
||||
if (!empty($backtopageforcancel)) {
|
||||
header("Location: ".$backtopageforcancel);
|
||||
exit;
|
||||
} elseif (!empty($backtopage)) {
|
||||
header("Location: ".$backtopage);
|
||||
exit;
|
||||
}
|
||||
|
|
@ -535,7 +550,7 @@ if (empty($reshook)) {
|
|||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Type")), null, 'errors');
|
||||
}
|
||||
if ($conf->global->ADHERENT_MAIL_REQUIRED && !isValidEMail($email)) {
|
||||
if (!empty($conf->global->ADHERENT_MAIL_REQUIRED) && !isValidEMail($email)) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorBadEMail", $email), null, 'errors');
|
||||
|
|
@ -1032,7 +1047,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
print '</td></tr>';
|
||||
|
||||
// EMail
|
||||
print '<tr><td>'.($conf->global->ADHERENT_MAIL_REQUIRED ? '<span class="fieldrequired">' : '').$langs->trans("EMail").($conf->global->ADHERENT_MAIL_REQUIRED ? '</span>' : '').'</td>';
|
||||
print '<tr><td>'.(!empty($conf->global->ADHERENT_MAIL_REQUIRED) ? '<span class="fieldrequired">' : '').$langs->trans("EMail").(!empty($conf->global->ADHERENT_MAIL_REQUIRED) ? '</span>' : '').'</td>';
|
||||
print '<td>'.img_picto('', 'object_email').' <input type="text" name="member_email" class="minwidth300" maxlength="255" value="'.(GETPOSTISSET('member_email') ? GETPOST('member_email', 'alpha') : $object->email).'"></td></tr>';
|
||||
|
||||
// Website
|
||||
|
|
@ -1121,15 +1136,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("AddMember").'">';
|
||||
print ' ';
|
||||
if (!empty($backtopage)) {
|
||||
print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
} else {
|
||||
print '<input type="button" class="button button-cancel" value="'.$langs->trans("Cancel").'" onClick="javascript:history.go(-1)">';
|
||||
}
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel("AddMember");
|
||||
|
||||
print "</form>\n";
|
||||
}
|
||||
|
|
@ -1396,11 +1403,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
print '</table>';
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
|
@ -1814,7 +1817,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
print '<tr><td>';
|
||||
print $form->select_company($object->socid, 'socid', '', 1);
|
||||
print '</td>';
|
||||
print '<td class="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '<td class="left"><input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr></table></form>';
|
||||
} else {
|
||||
if ($object->socid) {
|
||||
|
|
@ -1949,7 +1952,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
if (!empty($conf->societe->enabled) && !$object->socid) {
|
||||
if ($user->rights->societe->creer) {
|
||||
if (Adherent::STATUS_DRAFT != $object->statut) {
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_thirdparty" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrThirdPartyDesc")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n";;
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?rowid='.$object->id.'&action=create_thirdparty" title="'.dol_escape_htmltag($langs->trans("CreateDolibarrThirdPartyDesc")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n";
|
||||
} else {
|
||||
print '<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("ValidateBefore")).'">'.$langs->trans("CreateDolibarrThirdParty").'</a>'."\n";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) {
|
|||
// Add fields from extrafields
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : '');
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key." as options_".$key : '');
|
||||
}
|
||||
}
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as t, ".MAIN_DB_PREFIX."adherent as d";
|
||||
|
|
@ -276,7 +276,7 @@ foreach (array_keys($_Avery_Labels) as $codecards) {
|
|||
}
|
||||
asort($arrayoflabels);
|
||||
print $form->selectarray('model', $arrayoflabels, (GETPOST('model') ? GETPOST('model') : (empty($conf->global->ADHERENT_CARD_TYPE) ? '' : $conf->global->ADHERENT_CARD_TYPE)), 1, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print '<br><input class="button" type="submit" value="'.$langs->trans("BuildDoc").'">';
|
||||
print '<br><input type="submit" class="button" value="'.$langs->trans("BuildDoc").'">';
|
||||
print '</form>';
|
||||
|
||||
print '<br><br>';
|
||||
|
|
@ -295,7 +295,7 @@ foreach (array_keys($_Avery_Labels) as $codecards) {
|
|||
asort($arrayoflabels);
|
||||
print $form->selectarray('model', $arrayoflabels, (GETPOST('model') ?GETPOST('model') : (empty($conf->global->ADHERENT_CARD_TYPE) ? '' : $conf->global->ADHERENT_CARD_TYPE)), 1, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print '<br>'.$langs->trans("Login").': <input size="10" type="text" name="foruserlogin" value="'.GETPOST('foruserlogin').'">';
|
||||
print '<br><input class="button" type="submit" value="'.$langs->trans("BuildDoc").'">';
|
||||
print '<br><input type="submit" class="button" value="'.$langs->trans("BuildDoc").'">';
|
||||
print '</form>';
|
||||
|
||||
print '<br><br>';
|
||||
|
|
@ -313,7 +313,7 @@ foreach (array_keys($_Avery_Labels) as $codecards) {
|
|||
}
|
||||
asort($arrayoflabels);
|
||||
print $form->selectarray('modellabel', $arrayoflabels, (GETPOST('modellabel') ? GETPOST('modellabel') : (empty($conf->global->ADHERENT_ETIQUETTE_TYPE) ? '' : $conf->global->ADHERENT_ETIQUETTE_TYPE)), 1, 0, 0, '', 0, 0, 0, '', '', 1);
|
||||
print '<br><input class="button" type="submit" value="'.$langs->trans("BuildDoc").'">';
|
||||
print '<br><input type="submit" class="button" value="'.$langs->trans("BuildDoc").'">';
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
|
|
|
|||
|
|
@ -574,7 +574,7 @@ class Adherent extends CommonObject
|
|||
$sql .= ", ".($this->login ? "'".$this->db->escape($this->login)."'" : "null");
|
||||
$sql .= ", ".($user->id > 0 ? $user->id : "null"); // Can be null because member can be created by a guest or a script
|
||||
$sql .= ", null, null, '".$this->db->escape($this->morphy)."'";
|
||||
$sql .= ", ".$this->typeid;
|
||||
$sql .= ", ".((int) $this->typeid);
|
||||
$sql .= ", ".$conf->entity;
|
||||
$sql .= ", ".(!empty($this->import_key) ? "'".$this->db->escape($this->import_key)."'" : "null");
|
||||
$sql .= ")";
|
||||
|
|
@ -774,7 +774,7 @@ class Adherent extends CommonObject
|
|||
// Remove links to user and replace with new one
|
||||
if (!$error) {
|
||||
dol_syslog(get_class($this)."::update update link to user");
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = NULL WHERE fk_member = ".$this->id;
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = NULL WHERE fk_member = ".((int) $this->id);
|
||||
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
|
|
@ -784,7 +784,7 @@ class Adherent extends CommonObject
|
|||
}
|
||||
// If there is a user linked to this member
|
||||
if ($this->user_id > 0) {
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = ".$this->id." WHERE rowid = ".$this->user_id;
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."user SET fk_member = ".((int) $this->id)." WHERE rowid = ".((int) $this->user_id);
|
||||
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if (!$resql) {
|
||||
|
|
@ -926,7 +926,7 @@ class Adherent extends CommonObject
|
|||
// Search for last subscription id and end date
|
||||
$sql = "SELECT rowid, datec as dateop, dateadh as datedeb, datef as datefin";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."subscription";
|
||||
$sql .= " WHERE fk_adherent=".$this->id;
|
||||
$sql .= " WHERE fk_adherent = ".((int) $this->id);
|
||||
$sql .= " ORDER by dateadh DESC"; // Sort by start subscription date
|
||||
|
||||
dol_syslog(get_class($this)."::update_end_date", LOG_DEBUG);
|
||||
|
|
@ -939,7 +939,7 @@ class Adherent extends CommonObject
|
|||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||
$sql .= " datefin=".($datefin != '' ? "'".$this->db->idate($datefin)."'" : "null");
|
||||
$sql .= " WHERE rowid = ".$this->id;
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
dol_syslog(get_class($this)."::update_end_date", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
@ -1100,7 +1100,7 @@ class Adherent extends CommonObject
|
|||
} else {
|
||||
$sql .= ", pass = '".$this->db->escape($password_indatabase)."'";
|
||||
}
|
||||
$sql .= " WHERE rowid = ".$this->id;
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
//dol_syslog("Adherent::Password sql=hidden");
|
||||
dol_syslog(get_class($this)."::setPassword", LOG_DEBUG);
|
||||
|
|
@ -1223,7 +1223,7 @@ class Adherent extends CommonObject
|
|||
|
||||
// Add link to third party for current member
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET fk_soc = ".($thirdpartyid > 0 ? $thirdpartyid : 'null');
|
||||
$sql .= " WHERE rowid = ".$this->id;
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
dol_syslog(get_class($this)."::setThirdPartyId", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
@ -1465,7 +1465,7 @@ class Adherent extends CommonObject
|
|||
$sql .= " c.dateadh as dateh,";
|
||||
$sql .= " c.datef as datef";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."subscription as c";
|
||||
$sql .= " WHERE c.fk_adherent = ".$this->id;
|
||||
$sql .= " WHERE c.fk_adherent = ".((int) $this->id);
|
||||
$sql .= " ORDER BY c.dateadh";
|
||||
dol_syslog(get_class($this)."::fetch_subscriptions", LOG_DEBUG);
|
||||
|
||||
|
|
@ -1831,8 +1831,8 @@ class Adherent extends CommonObject
|
|||
|
||||
if (!$error && !empty($bank_line_id)) {
|
||||
// Update fk_bank into subscription table
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'subscription SET fk_bank='.$bank_line_id;
|
||||
$sql .= ' WHERE rowid='.$subscriptionid;
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'subscription SET fk_bank='.((int) $bank_line_id);
|
||||
$sql .= ' WHERE rowid='.((int) $subscriptionid);
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if (!$result) {
|
||||
|
|
@ -1900,8 +1900,8 @@ class Adherent extends CommonObject
|
|||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||
$sql .= " statut = ".self::STATUS_VALIDATED;
|
||||
$sql .= ", datevalid = '".$this->db->idate($now)."'";
|
||||
$sql .= ", fk_user_valid=".$user->id;
|
||||
$sql .= " WHERE rowid = ".$this->id;
|
||||
$sql .= ", fk_user_valid = ".((int) $user->id);
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
dol_syslog(get_class($this)."::validate", LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
|
|
@ -1952,7 +1952,7 @@ class Adherent extends CommonObject
|
|||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||
$sql .= " statut = ".self::STATUS_RESILIATED;
|
||||
$sql .= ", fk_user_valid=".$user->id;
|
||||
$sql .= " WHERE rowid = ".$this->id;
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
|
|
@ -2002,7 +2002,7 @@ class Adherent extends CommonObject
|
|||
$sql = "UPDATE ".MAIN_DB_PREFIX."adherent SET";
|
||||
$sql .= " statut = ".self::STATUS_EXCLUDED;
|
||||
$sql .= ", fk_user_valid=".$user->id;
|
||||
$sql .= " WHERE rowid = ".$this->id;
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ class AdherentType extends CommonObject
|
|||
|
||||
$sql = "SELECT lang, label, description, email";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type_lang";
|
||||
$sql .= " WHERE fk_type=".$this->id;
|
||||
$sql .= " WHERE fk_type = ".((int) $this->id);
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
|
|
@ -181,21 +181,21 @@ class AdherentType extends CommonObject
|
|||
if ($key == $current_lang) {
|
||||
$sql = "SELECT rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type_lang";
|
||||
$sql .= " WHERE fk_type=".$this->id;
|
||||
$sql .= " WHERE fk_type = ".((int) $this->id);
|
||||
$sql .= " AND lang = '".$this->db->escape($key)."'";
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
|
||||
if ($this->db->num_rows($result)) { // if there is already a description line for this language
|
||||
$sql2 = "UPDATE ".MAIN_DB_PREFIX."adherent_type_lang";
|
||||
$sql2 .= " SET ";
|
||||
$sql2 .= " label='".$this->db->escape($this->label)."',";
|
||||
$sql2 .= " description='".$this->db->escape($this->description)."'";
|
||||
$sql2 .= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'";
|
||||
$sql2 .= " SET";
|
||||
$sql2 .= " label = '".$this->db->escape($this->label)."',";
|
||||
$sql2 .= " description = '".$this->db->escape($this->description)."'";
|
||||
$sql2 .= " WHERE fk_type = ".((int) $this->id)." AND lang='".$this->db->escape($key)."'";
|
||||
} else {
|
||||
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description";
|
||||
$sql2 .= ")";
|
||||
$sql2 .= " VALUES(".$this->id.",'".$this->db->escape($key)."','".$this->db->escape($this->label)."',";
|
||||
$sql2 .= " VALUES(".((int) $this->id).",'".$this->db->escape($key)."','".$this->db->escape($this->label)."',";
|
||||
$sql2 .= " '".$this->db->escape($this->description)."'";
|
||||
$sql2 .= ")";
|
||||
}
|
||||
|
|
@ -207,7 +207,7 @@ class AdherentType extends CommonObject
|
|||
} elseif (isset($this->multilangs[$key])) {
|
||||
$sql = "SELECT rowid";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."adherent_type_lang";
|
||||
$sql .= " WHERE fk_type=".$this->id;
|
||||
$sql .= " WHERE fk_type = ".((int) $this->id);
|
||||
$sql .= " AND lang = '".$this->db->escape($key)."'";
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
|
|
@ -215,9 +215,9 @@ class AdherentType extends CommonObject
|
|||
if ($this->db->num_rows($result)) { // if there is already a description line for this language
|
||||
$sql2 = "UPDATE ".MAIN_DB_PREFIX."adherent_type_lang";
|
||||
$sql2 .= " SET ";
|
||||
$sql2 .= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',";
|
||||
$sql2 .= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'";
|
||||
$sql2 .= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'";
|
||||
$sql2 .= " label = '".$this->db->escape($this->multilangs["$key"]["label"])."',";
|
||||
$sql2 .= " description = '".$this->db->escape($this->multilangs["$key"]["description"])."'";
|
||||
$sql2 .= " WHERE fk_type = ".((int) $this->id)." AND lang='".$this->db->escape($key)."'";
|
||||
} else {
|
||||
$sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description";
|
||||
$sql2 .= ")";
|
||||
|
|
@ -259,7 +259,7 @@ class AdherentType extends CommonObject
|
|||
public function delMultiLangs($langtodelete, $user)
|
||||
{
|
||||
$sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_type_lang";
|
||||
$sql .= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($langtodelete)."'";
|
||||
$sql .= " WHERE fk_type = ".((int) $this->id)." AND lang = '".$this->db->escape($langtodelete)."'";
|
||||
|
||||
dol_syslog(get_class($this).'::delMultiLangs', LOG_DEBUG);
|
||||
$result = $this->db->query($sql);
|
||||
|
|
@ -584,7 +584,7 @@ class AdherentType extends CommonObject
|
|||
/**
|
||||
* Return array of Member objects for member type this->id (or all if this->id not defined)
|
||||
*
|
||||
* @param string $excludefilter Filter to exclude
|
||||
* @param string $excludefilter Filter to exclude. This value must not come from a user input.
|
||||
* @param int $mode 0=Return array of member instance
|
||||
* 1=Return array of member instance without extra data
|
||||
* 2=Return array of members id only
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ class Members extends DolibarrApi
|
|||
* @param int $limit Limit for list
|
||||
* @param int $page Page number
|
||||
* @param string $typeid ID of the type of member
|
||||
* @param int $category Use this param to filter list by category
|
||||
* @param int $category Use this param to filter list by category
|
||||
* @param string $sqlfilters Other criteria to filter answers separated by a comma.
|
||||
* Example: "(t.ref:like:'SO-%') and ((t.date_creation:<:'20160101') or (t.nature:is:NULL))"
|
||||
* @return array Array of member objects
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ class Subscription extends CommonObject
|
|||
$sql .= " datef='".$this->db->idate($this->datef)."',";
|
||||
$sql .= " datec='".$this->db->idate($this->datec)."',";
|
||||
$sql .= " fk_bank = ".($this->fk_bank ? ((int) $this->fk_bank) : 'null');
|
||||
$sql .= " WHERE rowid = ".$this->id;
|
||||
$sql .= " WHERE rowid = ".((int) $this->id);
|
||||
|
||||
dol_syslog(get_class($this)."::update", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ if ($result > 0) {
|
|||
$result = show_ldap_content($records, 0, $records['count'], true);
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven"><td colspan="2">'.$langs->trans("LDAPRecordNotFound").' (dn='.$dn.' - search='.$search.')</td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="2">'.$langs->trans("LDAPRecordNotFound").' (dn='.dol_escape_htmltag($dn).' - search='.dol_escape_htmltag($search).')</td></tr>';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ $search_filter = GETPOST("search_filter", 'alpha');
|
|||
$search_status = GETPOST("search_status", 'intcomma');
|
||||
$catid = GETPOST("catid", 'int');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$socid = GETPOST('socid', 'int');
|
||||
|
||||
$filter = GETPOST("filter", 'alpha');
|
||||
if ($filter) {
|
||||
|
|
@ -323,7 +324,7 @@ $sql .= " state.code_departement as state_code, state.nom as state_name,";
|
|||
// Add fields from extrafields
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : '');
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key." as options_".$key.', ' : '');
|
||||
}
|
||||
}
|
||||
// Add fields from hooks
|
||||
|
|
@ -601,7 +602,7 @@ if ($user->rights->societe->creer) {
|
|||
if ($user->rights->adherent->creer && $user->rights->user->user->creer) {
|
||||
$arrayofmassactions['createexternaluser'] = img_picto('', 'user', 'class="pictofixedwidth"').$langs->trans("CreateExternalUser");
|
||||
}
|
||||
if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
|
||||
if (in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) {
|
||||
$arrayofmassactions = array();
|
||||
}
|
||||
$massactionbutton = $form->selectMassAction('', $arrayofmassactions);
|
||||
|
|
|
|||
|
|
@ -68,16 +68,21 @@ if ($id) {
|
|||
$caneditfieldmember = $user->rights->adherent->creer;
|
||||
}
|
||||
|
||||
$hookmanager->initHooks(array('membernote'));
|
||||
|
||||
// Security check
|
||||
$result = restrictedArea($user, 'adherent', $object->id, '', '', 'socid', 'rowid', 0);
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
|
||||
|
||||
$reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
}
|
||||
if (empty($reshook)) {
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -308,7 +308,7 @@ if ($mode) {
|
|||
print '</tr>';
|
||||
|
||||
foreach ($data as $val) {
|
||||
$year = isset($val['year']) ? $val['year'] : '';;
|
||||
$year = isset($val['year']) ? $val['year'] : '';
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$val['label'].'</td>';
|
||||
if (isset($label2)) {
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
|||
// Subscription informations
|
||||
$datesubscription = 0;
|
||||
$datesubend = 0;
|
||||
$paymentdate = ''; // Do not use 0 here, default value is '' that means not filled where 0 means 1970-01-01
|
||||
$paymentdate = ''; // Do not use 0 here, default value is '' that means not filled where 0 means 1970-01-01
|
||||
if (GETPOST("reyear", "int") && GETPOST("remonth", "int") && GETPOST("reday", "int")) {
|
||||
$datesubscription = dol_mktime(0, 0, 0, GETPOST("remonth", "int"), GETPOST("reday", "int"), GETPOST("reyear", "int"));
|
||||
}
|
||||
|
|
@ -601,7 +601,7 @@ if ($rowid > 0) {
|
|||
print '<tr><td>';
|
||||
print $form->select_company($object->fk_soc, 'socid', '', 1);
|
||||
print '</td>';
|
||||
print '<td class="left"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '<td class="left"><input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr></table></form>';
|
||||
} else {
|
||||
if ($object->fk_soc) {
|
||||
|
|
|
|||
|
|
@ -245,11 +245,7 @@ if ($user->rights->adherent->cotisation->creer && $action == 'edit') {
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button button-save" name="submit" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel();
|
||||
|
||||
print '</form>';
|
||||
print "\n";
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ if ($action == 'update' && $user->rights->adherent->configurer) {
|
|||
$object->morphy = trim($morphy);
|
||||
$object->status = (int) $status;
|
||||
$object->subscription = (int) $subscription;
|
||||
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));;
|
||||
$object->amount = ($amount == '' ? '' : price2num($amount, 'MT'));
|
||||
$object->duration_value = $duration_value;
|
||||
$object->duration_unit = $duration_unit;
|
||||
$object->note = trim($comment);
|
||||
|
|
@ -381,12 +381,12 @@ if ($action == 'create') {
|
|||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('comment', $object->note, '', 200, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor = new DolEditor('comment', $object->note, '', 200, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor->Create();
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 250, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 250, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>';
|
||||
|
||||
|
|
@ -398,11 +398,7 @@ if ($action == 'create') {
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" name="button" class="button" value="'.$langs->trans("Add").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans("Cancel").'" onclick="history.go(-1)" />';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel();
|
||||
|
||||
print "</form>\n";
|
||||
}
|
||||
|
|
@ -814,12 +810,12 @@ if ($rowid > 0) {
|
|||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("Description").'</td><td>';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor('comment', $object->note, '', 280, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor = new DolEditor('comment', $object->note, '', 280, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor->Create();
|
||||
print "</td></tr>";
|
||||
|
||||
print '<tr><td class="tdtop">'.$langs->trans("WelcomeEMail").'</td><td>';
|
||||
$doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 280, 'dolibarr_notes', '', false, true, $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor = new DolEditor('mail_valid', $object->mail_valid, '', 280, 'dolibarr_notes', '', false, true, empty($conf->fckeditor->enabled) ? false : $conf->fckeditor->enabled, 15, '90%');
|
||||
$doleditor->Create();
|
||||
print "</td></tr>";
|
||||
|
||||
|
|
@ -830,11 +826,7 @@ if ($rowid > 0) {
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" name="cancel" class="button button-cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel();
|
||||
|
||||
print "</form>";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ if ($result > 0) {
|
|||
$result = show_ldap_content($records, 0, $records['count'], true);
|
||||
}
|
||||
} else {
|
||||
print '<tr class="oddeven"><td colspan="2">'.$langs->trans("LDAPRecordNotFound").' (dn='.$dn.' - search='.$search.')</td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="2">'.$langs->trans("LDAPRecordNotFound").' (dn='.dol_escape_htmltag($dn).' - search='.dol_escape_htmltag($search).')</td></tr>';
|
||||
}
|
||||
|
||||
$ldap->unbind();
|
||||
|
|
|
|||
|
|
@ -228,13 +228,7 @@ if ($action == 'edit') {
|
|||
}
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel();
|
||||
|
||||
print '</form>';
|
||||
} elseif ($action != 'create') {
|
||||
|
|
@ -297,11 +291,7 @@ if ($action == 'create' && $user->rights->adherent->configurer) {
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel();
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -177,12 +177,7 @@ print '</td></tr>';
|
|||
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">';
|
||||
//print ' ';
|
||||
//print '<input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
//print '<br>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -209,9 +209,7 @@ print '</div>';
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" name="save" class="button button-save" value="'.$langs->trans("Save").'">';
|
||||
print "</div>";
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -41,8 +41,7 @@ if (!$user->admin) {
|
|||
$langs->loadLangs(array('agenda', 'admin', 'other'));
|
||||
|
||||
$def = array();
|
||||
$actiontest = GETPOST('test', 'alpha');
|
||||
$actionsave = GETPOST('save', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
|
||||
if (empty($conf->global->AGENDA_EXT_NB)) {
|
||||
$conf->global->AGENDA_EXT_NB = 5;
|
||||
|
|
@ -57,14 +56,57 @@ $colorlist = array('BECEDD', 'DDBECE', 'BFDDBE', 'F598B4', 'F68654', 'CBF654', '
|
|||
* Actions
|
||||
*/
|
||||
|
||||
if ($actionsave) {
|
||||
$error = 0;
|
||||
$errors = array();
|
||||
|
||||
if (preg_match('/set_(.*)/', $action, $reg)) {
|
||||
$db->begin();
|
||||
|
||||
$code = $reg[1];
|
||||
$value = (GETPOST($code) ? GETPOST($code) : 1);
|
||||
|
||||
$res = dolibarr_set_const($db, $code, $value, 'chaine', 0, '', $conf->entity);
|
||||
if (!$res > 0) {
|
||||
$error++;
|
||||
$errors[] = $db->lasterror();
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
$db->rollback();
|
||||
setEventMessages('', $errors, 'errors');
|
||||
} else {
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans('SetupSaved'));
|
||||
header('Location: ' . $_SERVER["PHP_SELF"]);
|
||||
exit();
|
||||
}
|
||||
} elseif (preg_match('/del_(.*)/', $action, $reg)) {
|
||||
$db->begin();
|
||||
|
||||
$code = $reg[1];
|
||||
|
||||
$res = dolibarr_del_const($db, $code, $conf->entity);
|
||||
if (!$res > 0) {
|
||||
$error++;
|
||||
$errors[] = $db->lasterror();
|
||||
}
|
||||
|
||||
if ($error) {
|
||||
$db->rollback();
|
||||
setEventMessages('', $errors, 'errors');
|
||||
} else {
|
||||
$db->commit();
|
||||
setEventMessage($langs->trans('SetupSaved'));
|
||||
header('Location: ' . $_SERVER["PHP_SELF"]);
|
||||
exit();
|
||||
}
|
||||
} elseif ($action == 'save') {
|
||||
$db->begin();
|
||||
|
||||
$disableext = GETPOST('AGENDA_DISABLE_EXT', 'alpha');
|
||||
$res = dolibarr_set_const($db, 'AGENDA_DISABLE_EXT', $disableext, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
$i = 1; $errorsaved = 0;
|
||||
$error = 0;
|
||||
|
||||
// Save agendas
|
||||
while ($i <= $MAXAGENDA) {
|
||||
|
|
@ -159,6 +201,10 @@ print dol_get_fiche_head($head, 'extsites', $langs->trans("Agenda"), -1, 'action
|
|||
print '<span class="opacitymedium">'.$langs->trans("AgendaExtSitesDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
$selectedvalue=$conf->global->AGENDA_DISABLE_EXT;
|
||||
if ($selectedvalue==1) $selectedvalue=0; else $selectedvalue=1;
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
|
||||
print "<tr class=\"liste_titre\">";
|
||||
|
|
@ -203,31 +249,44 @@ print "<td>".$langs->trans("Name")."</td>";
|
|||
print "<td>".$langs->trans("ExtSiteUrlAgenda")." (".$langs->trans("Example").': http://yoursite/agenda/agenda.ics)</td>';
|
||||
print "<td>".$form->textwithpicto($langs->trans("FixTZ"), $langs->trans("FillFixTZOnlyIfRequired"), 1).'</td>';
|
||||
print '<td class="right">'.$langs->trans("Color").'</td>';
|
||||
print '<td class="right">'.$langs->trans("ActiveByDefault").'</td>';
|
||||
print "</tr>";
|
||||
|
||||
$i = 1;
|
||||
while ($i <= $MAXAGENDA) {
|
||||
$key = $i;
|
||||
$name = 'AGENDA_EXT_NAME'.$key;
|
||||
$src = 'AGENDA_EXT_SRC'.$key;
|
||||
$offsettz = 'AGENDA_EXT_OFFSETTZ'.$key;
|
||||
$color = 'AGENDA_EXT_COLOR'.$key;
|
||||
$enabled = 'AGENDA_EXT_ENABLED'.$key;
|
||||
|
||||
$name = 'AGENDA_EXT_NAME' . $key;
|
||||
$src = 'AGENDA_EXT_SRC' . $key;
|
||||
$offsettz = 'AGENDA_EXT_OFFSETTZ' . $key;
|
||||
$color = 'AGENDA_EXT_COLOR' . $key;
|
||||
$enabled = 'AGENDA_EXT_ENABLED' . $key;
|
||||
$default = 'AGENDA_EXT_ACTIVEBYDEFAULT' . $key;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
// Nb
|
||||
print '<td width="180" class="nowrap">'.$langs->trans("AgendaExtNb", $key)."</td>";
|
||||
print '<td width="180" class="nowrap">' . $langs->trans("AgendaExtNb", $key) . "</td>";
|
||||
// Name
|
||||
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME'.$key.'" value="'.(GETPOST('AGENDA_EXT_NAME'.$key) ?GETPOST('AGENDA_EXT_NAME'.$key, 'alpha') : getDolGlobalString($name)).'" size="28"></td>';
|
||||
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_NAME' . $key . '" value="' . (GETPOST('AGENDA_EXT_NAME' . $key) ? GETPOST('AGENDA_EXT_NAME' . $key, 'alpha') : getDolGlobalString($name)) . '" size="28"></td>';
|
||||
// URL
|
||||
print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC'.$key.'" value="'.(GETPOST('AGENDA_EXT_SRC'.$key) ?GETPOST('AGENDA_EXT_SRC'.$key, 'alpha') : getDolGlobalString($src)).'" size="60"></td>';
|
||||
print '<td><input type="url" class="flat hideifnotset" name="AGENDA_EXT_SRC' . $key . '" value="' . (GETPOST('AGENDA_EXT_SRC' . $key) ? GETPOST('AGENDA_EXT_SRC' . $key, 'alpha') : getDolGlobalString($src)) . '" size="60"></td>';
|
||||
// Offset TZ
|
||||
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ'.$key.'" value="'.(GETPOST('AGENDA_EXT_OFFSETTZ'.$key) ? GETPOST('AGENDA_EXT_OFFSETTZ'.$key) : getDolGlobalString($offsettz)).'" size="2"></td>';
|
||||
print '<td><input type="text" class="flat hideifnotset" name="AGENDA_EXT_OFFSETTZ' . $key . '" value="' . (GETPOST('AGENDA_EXT_OFFSETTZ' . $key) ? GETPOST('AGENDA_EXT_OFFSETTZ' . $key) : getDolGlobalString($offsettz)) . '" size="2"></td>';
|
||||
// Color (Possible colors are limited by Google)
|
||||
print '<td class="nowrap right">';
|
||||
//print $formadmin->selectColor($conf->global->$color, "google_agenda_color".$key, $colorlist);
|
||||
print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR".$key) ?GETPOST("AGENDA_EXT_COLOR".$key) : getDolGlobalString($color)), "AGENDA_EXT_COLOR".$key, 'extsitesconfig', 1, '', 'hideifnotset');
|
||||
print $formother->selectColor((GETPOST("AGENDA_EXT_COLOR" . $key) ? GETPOST("AGENDA_EXT_COLOR" . $key) : getDolGlobalString($color)), "AGENDA_EXT_COLOR" . $key, 'extsitesconfig', 1, '', 'hideifnotset');
|
||||
print '</td>';
|
||||
// Calendar active by default
|
||||
print '<td class="nowrap right">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('AGENDA_EXT_ACTIVEBYDEFAULT' . $key);
|
||||
} else {
|
||||
if (empty($conf->global->{$default})) {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=set_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '">' . img_picto($langs->trans("Enabled"), 'on') . '</a>';
|
||||
} else {
|
||||
print '<a href="' . $_SERVER['PHP_SELF'] . '?action=del_AGENDA_EXT_ACTIVEBYDEFAULT' . $key . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>';
|
||||
}
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>";
|
||||
$i++;
|
||||
|
|
|
|||
|
|
@ -392,7 +392,7 @@ print '</table>';
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center"><input class="button button-save" type="submit" name="save" value="'.dol_escape_htmltag($langs->trans("Save")).'"></div>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -139,9 +139,7 @@ print '</table>';
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" name="save" class="button button-save" value="'.$langs->trans("Save").'">';
|
||||
print "</div>";
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -499,9 +499,7 @@ print "</tr>\n";
|
|||
print '</table>';
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" id="save" name="save" class="button hideifnotset button-save" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print "</form>\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -272,8 +272,7 @@ if ($resql) {
|
|||
print "</table>\n";
|
||||
|
||||
if (empty($conf->use_javascript_ajax)) {
|
||||
print '<div class="center"><input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'"></div>';
|
||||
print '</form>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
}
|
||||
|
||||
print "<br>";
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ foreach ($dirmodels as $reldir) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
@ -457,7 +457,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
|||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
|
|
@ -471,7 +471,7 @@ print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1,
|
|||
print '</td><td>';
|
||||
print '<input class="flat minwidth200" type="text" name="BOM_DRAFT_WATERMARK" value="'.$conf->global->BOM_DRAFT_WATERMARK.'">';
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -473,9 +473,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL == 2 || !empty($conf->global->MAIN_ACTIVA
|
|||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
print '<div class="center"><input type="submit" class="button button-save" value="'.$langs->trans("Save").'" name="Button"></div>';
|
||||
print '<br>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '</form>';
|
||||
print "\n".'<!-- End Other Const -->'."\n";
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ foreach ($dirmodels as $reldir) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
@ -268,7 +268,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
|||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</table>';
|
||||
print "<br>";
|
||||
|
|
|
|||
|
|
@ -101,8 +101,8 @@ print '<br>';
|
|||
print $langs->trans("ClickToDialUrlDesc").'<br>';
|
||||
print '<br>';
|
||||
print '<span class="opacitymedium">';
|
||||
print $langs->trans("Example").':<br>';
|
||||
print 'http://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__<br>';
|
||||
print $langs->trans("Examples").':<br>';
|
||||
print 'https://myphoneserver/mypage?login=__LOGIN__&password=__PASS__&caller=__PHONEFROM__&called=__PHONETO__<br>';
|
||||
print 'sip:__PHONETO__@my.sip.server';
|
||||
print '</span>';
|
||||
|
||||
|
|
@ -117,7 +117,7 @@ print '</td></tr>';
|
|||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
print '<div class="center"><br><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
print $form->buttonsSaveCancel("Modify", '');
|
||||
|
||||
print '</form><br><br>';
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ if (!empty($conf->global->CLICKTODIAL_URL)) {
|
|||
}
|
||||
|
||||
if ($setupcomplete) {
|
||||
print $langs->trans("LinkToTest", $user->login).': '.dol_print_phone($phonefortest, '', 0, 0, 'AC_TEL', '', 1);
|
||||
print $langs->trans("LinkToTest", $user->login).': '.dol_print_phone($phonefortest, '', 0, 0, 'AC_TEL', '', 'mobile');
|
||||
} else {
|
||||
$langs->load("errors");
|
||||
print '<div class="warning">'.$langs->trans("WarningClickToDialUserSetupNotComplete").'</div>';
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ foreach ($dirmodels as $reldir) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
@ -507,7 +507,7 @@ print '<input type="hidden" name="action" value="setribchq">';
|
|||
print $langs->trans("PaymentMode").'</td>';
|
||||
print '<td align="right">';
|
||||
if (empty($conf->facture->enabled)) {
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
|
|
@ -628,7 +628,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
|||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
|
|
@ -642,7 +642,7 @@ print $form->textwithpicto($langs->trans("WatermarkOnDraftOrders"), $htmltext, 1
|
|||
print '</td><td>';
|
||||
print '<input class="flat minwidth200" type="text" name="COMMANDE_DRAFT_WATERMARK" value="'.$conf->global->COMMANDE_DRAFT_WATERMARK.'">';
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -824,10 +824,7 @@ if ($mysoc->useRevenueStamp()) {
|
|||
|
||||
print "</table>";
|
||||
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -135,9 +135,7 @@ print '</div>';
|
|||
|
||||
print '<br>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ print '</td></tr>';
|
|||
|
||||
print "</table>\n";
|
||||
|
||||
print '<br><br><div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
|
||||
print '<br><br><div style="text-align:center"><input type="submit" class="button button-edit" name="button" value="'.$langs->trans('Modify').'"></div>';
|
||||
print '</form>';
|
||||
|
||||
// End of page
|
||||
|
|
|
|||
|
|
@ -222,7 +222,7 @@ if (!empty($conf->multicompany->enabled) && !$user->entity) {
|
|||
print '<td class="center">';
|
||||
print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
|
||||
}
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'" name="add">';
|
||||
print '<input type="submit" class="button button-add" name="add" value="'.$langs->trans("Add").'">';
|
||||
print "</td>\n";
|
||||
print '</tr>';
|
||||
|
||||
|
|
@ -310,10 +310,10 @@ print '</div>';
|
|||
if ($conf->use_javascript_ajax) {
|
||||
print '<br>';
|
||||
print '<div id="updateconst" class="right">';
|
||||
print '<input type="submit" name="update" class="button marginbottomonly" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit marginbottomonly" name="update" value="'.$langs->trans("Modify").'">';
|
||||
print '</div>';
|
||||
print '<div id="delconst" class="right">';
|
||||
print '<input type="submit" name="delete" class="button marginbottomonly" value="'.$langs->trans("Delete").'">';
|
||||
print '<input type="submit" class="button button-cancel marginbottomonly" name="delete" value="'.$langs->trans("Delete").'">';
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ foreach ($dirmodels as $reldir) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
@ -468,9 +468,7 @@ print '</tr>';
|
|||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -399,7 +399,7 @@ if (!is_array($result) && $result<0) {
|
|||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="rowid" value="'.$id.'">';
|
||||
print '<div name="'.(!empty($defaultvalue->id) ? $defaultvalue->id : 'none').'"></div>';
|
||||
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||
}
|
||||
print '</td>';
|
||||
|
|
|
|||
|
|
@ -448,8 +448,8 @@ if (empty($conf->global->MAIN_DISABLE_METEO) || $conf->global->MAIN_DISABLE_METE
|
|||
|
||||
|
||||
if ($action == 'edit') {
|
||||
print '<br><div class="center"><input type="submit" class="button button-save" value="'.$langs->trans("Save").'"></div>';
|
||||
print '<br></form>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
print '</form>';
|
||||
} else {
|
||||
print '<br><div class="tabsAction">';
|
||||
print '<a class="butAction" href="delais.php?action=edit">'.$langs->trans("Modify").'</a></div>';
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ foreach ($dirmodels as $reldir) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
@ -439,7 +439,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
|||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ $tabsql[3] = "SELECT r.rowid as rowid, r.code_region as state_code, r.nom as lib
|
|||
$tabsql[4] = "SELECT c.rowid as rowid, c.code, c.label, c.active, c.favorite FROM ".MAIN_DB_PREFIX."c_country AS c";
|
||||
$tabsql[5] = "SELECT c.rowid as rowid, c.code as code, c.label, c.active FROM ".MAIN_DB_PREFIX."c_civility AS c";
|
||||
$tabsql[6] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.type, a.active, a.module, a.color, a.position FROM ".MAIN_DB_PREFIX."c_actioncomm AS a";
|
||||
$tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.accountancy_code as accountancy_code, a.deductible, c.code as country_code, c.label as country, a.fk_pays as country_id, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_pays=c.rowid and c.active=1";
|
||||
$tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.accountancy_code as accountancy_code, c.code as country_code, c.label as country, a.fk_pays as country_id, a.active FROM ".MAIN_DB_PREFIX."c_chargesociales AS a, ".MAIN_DB_PREFIX."c_country as c WHERE a.fk_pays=c.rowid and c.active=1";
|
||||
$tabsql[8] = "SELECT t.id as rowid, t.code as code, t.libelle, t.fk_country as country_id, c.code as country_code, c.label as country, t.position, t.active FROM ".MAIN_DB_PREFIX."c_typent as t LEFT JOIN ".MAIN_DB_PREFIX."c_country as c ON t.fk_country=c.rowid";
|
||||
$tabsql[9] = "SELECT c.code_iso as code, c.label, c.unicode, c.active FROM ".MAIN_DB_PREFIX."c_currencies AS c";
|
||||
$tabsql[10] = "SELECT t.rowid, t.code, t.taux, t.localtax1_type, t.localtax1, t.localtax2_type, t.localtax2, c.label as country, c.code as country_code, t.fk_pays as country_id, t.recuperableonly, t.note, t.active, t.accountancy_code_sell, t.accountancy_code_buy FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_country as c WHERE t.fk_pays=c.rowid";
|
||||
|
|
@ -294,7 +294,7 @@ $tabfield[3] = "code,libelle,country_id,country";
|
|||
$tabfield[4] = "code,label";
|
||||
$tabfield[5] = "code,label";
|
||||
$tabfield[6] = "code,libelle,type,color,position";
|
||||
$tabfield[7] = "code,libelle,country,accountancy_code,deductible";
|
||||
$tabfield[7] = "code,libelle,country,accountancy_code";
|
||||
$tabfield[8] = "code,libelle,country_id,country".(!empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? ',position' : '');
|
||||
$tabfield[9] = "code,label,unicode";
|
||||
$tabfield[10] = "country_id,country,code,taux,localtax1_type,localtax1,localtax2_type,localtax2,recuperableonly,accountancy_code_sell,accountancy_code_buy,note";
|
||||
|
|
@ -340,7 +340,7 @@ $tabfieldvalue[3] = "code,libelle,country";
|
|||
$tabfieldvalue[4] = "code,label";
|
||||
$tabfieldvalue[5] = "code,label";
|
||||
$tabfieldvalue[6] = "code,libelle,type,color,position";
|
||||
$tabfieldvalue[7] = "code,libelle,country,accountancy_code,deductible";
|
||||
$tabfieldvalue[7] = "code,libelle,country,accountancy_code";
|
||||
$tabfieldvalue[8] = "code,libelle,country".(!empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? ',position' : '');
|
||||
$tabfieldvalue[9] = "code,label,unicode";
|
||||
$tabfieldvalue[10] = "country,code,taux,localtax1_type,localtax1,localtax2_type,localtax2,recuperableonly,accountancy_code_sell,accountancy_code_buy,note";
|
||||
|
|
@ -386,7 +386,7 @@ $tabfieldinsert[3] = "code_region,nom,fk_pays";
|
|||
$tabfieldinsert[4] = "code,label";
|
||||
$tabfieldinsert[5] = "code,label";
|
||||
$tabfieldinsert[6] = "code,libelle,type,color,position";
|
||||
$tabfieldinsert[7] = "code,libelle,fk_pays,accountancy_code,deductible";
|
||||
$tabfieldinsert[7] = "code,libelle,fk_pays,accountancy_code";
|
||||
$tabfieldinsert[8] = "code,libelle,fk_country".(!empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? ',position' : '');
|
||||
$tabfieldinsert[9] = "code_iso,label,unicode";
|
||||
$tabfieldinsert[10] = "fk_pays,code,taux,localtax1_type,localtax1,localtax2_type,localtax2,recuperableonly,accountancy_code_sell,accountancy_code_buy,note";
|
||||
|
|
@ -695,7 +695,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify')) {
|
|||
$listfieldmodify = explode(',', $tabfieldinsert[$id]);
|
||||
$listfieldvalue = explode(',', $tabfieldvalue[$id]);
|
||||
|
||||
// Check that all fields are filled
|
||||
// Check that all mandatory fields are filled
|
||||
$ok = 1;
|
||||
foreach ($listfield as $f => $value) {
|
||||
// Discard check of mandatory fields for country for some tables
|
||||
|
|
@ -1341,6 +1341,9 @@ if ($id) {
|
|||
if ($value == 'short_label') {
|
||||
$valuetoshow = $langs->trans("ShortLabel");
|
||||
}
|
||||
if ($value == 'fk_parent') {
|
||||
$valuetoshow = $langs->trans("ParentID"); $class = 'center';
|
||||
}
|
||||
if ($value == 'range_account') {
|
||||
$valuetoshow = $langs->trans("Range");
|
||||
}
|
||||
|
|
@ -1484,7 +1487,7 @@ if ($id) {
|
|||
}
|
||||
print '<td colspan="3" class="center">';
|
||||
if ($action != 'edit') {
|
||||
print '<input type="submit" class="button" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
print '<input type="submit" class="button button-add" name="actionadd" value="'.$langs->trans("Add").'">';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
|
|
@ -1683,6 +1686,9 @@ if ($id) {
|
|||
if ($value == 'short_label') {
|
||||
$valuetoshow = $langs->trans("ShortLabel");
|
||||
}
|
||||
if ($value == 'fk_parent') {
|
||||
$valuetoshow = $langs->trans("ParentID"); $cssprefix = 'center ';
|
||||
}
|
||||
if ($value == 'range_account') {
|
||||
$valuetoshow = $langs->trans("Range");
|
||||
}
|
||||
|
|
@ -1807,7 +1813,7 @@ if ($id) {
|
|||
if (!is_null($withentity)) {
|
||||
print '<input type="hidden" name="entity" value="'.$withentity.'">';
|
||||
}
|
||||
print '<input type="submit" class="button" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" name="actionmodify" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-cancel" name="actioncancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</td>';
|
||||
} else {
|
||||
|
|
@ -1992,10 +1998,7 @@ if ($id) {
|
|||
if (in_array($value, array('pos', 'position'))) {
|
||||
$class .= ' right';
|
||||
}
|
||||
if ($value == 'localtax1_type') {
|
||||
$class .= ' nowrap';
|
||||
}
|
||||
if ($value == 'localtax2_type') {
|
||||
if (in_array($value, array('localtax1_type', 'localtax2_type'))) {
|
||||
$class .= ' nowrap';
|
||||
}
|
||||
if (in_array($value, array('use_default', 'fk_parent'))) {
|
||||
|
|
@ -2265,7 +2268,13 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
|||
print '<td>';
|
||||
print $form->selectarray('source', $sourceList, (!empty($obj->{$value}) ? $obj->{$value}:''));
|
||||
print '</td>';
|
||||
} elseif (in_array($value, array('public', 'use_default'))) {
|
||||
// Fields 0/1 with a combo select Yes/No
|
||||
print '<td class="center">';
|
||||
print $form->selectyesno($value, (!empty($obj->{$value}) ? $obj->{$value}:''), 1);
|
||||
print '</td>';
|
||||
} elseif ($value == 'private') {
|
||||
// Fields 'no'/'yes' with a combo select Yes/No
|
||||
print '<td>';
|
||||
print $form->selectyesno("private", (!empty($obj->{$value}) ? $obj->{$value}:''));
|
||||
print '</td>';
|
||||
|
|
@ -2361,7 +2370,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
|||
print $form->selectExpenseRanges($obj->fk_range);
|
||||
print '</td>';
|
||||
} else {
|
||||
$fieldValue = isset($obj->{$value}) ? $obj->{$value}:'';
|
||||
$fieldValue = isset($obj->{$value}) ? $obj->{$value}: '';
|
||||
|
||||
if ($value == 'sortorder') {
|
||||
$fieldlist[$field] = 'position';
|
||||
|
|
@ -2377,12 +2386,18 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
|||
if (in_array($fieldlist[$field], array('dayrule', 'day', 'month', 'year', 'use_default', 'affect', 'delay', 'public', 'sortorder', 'sens', 'category_type', 'fk_parent'))) {
|
||||
$class = 'maxwidth50 center';
|
||||
}
|
||||
if (in_array($fieldlist[$field], array('use_default', 'public'))) {
|
||||
if (in_array($fieldlist[$field], array('use_default', 'public', 'fk_parent'))) {
|
||||
$classtd = 'center';
|
||||
}
|
||||
if (in_array($fieldlist[$field], array('libelle', 'label', 'tracking'))) {
|
||||
$class = 'quatrevingtpercent';
|
||||
}
|
||||
// Fields that must be suggested as '0' instead of ''
|
||||
if ($fieldlist[$field] == 'fk_parent') {
|
||||
if (empty($fieldValue)) {
|
||||
$fieldValue = '0';
|
||||
}
|
||||
}
|
||||
print '<td class="'.$classtd.'">';
|
||||
$transfound = 0;
|
||||
$transkey = '';
|
||||
|
|
|
|||
|
|
@ -276,11 +276,7 @@ if ($action == 'create') {
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button" name="add" value="'.dol_escape_htmltag($langs->trans("Create")).'">';
|
||||
print ' ';
|
||||
print '<input type="'.($backtopage ? "submit" : "button").'" class="button button-cancel" name="cancel" value="'.dol_escape_htmltag($langs->trans("Cancel")).'"'.($backtopage ? '' : ' onclick="javascript:history.go(-1)"').'>'; // Cancel for create does not post form if we don't know the backtopage
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel("Create");
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
|
@ -309,9 +305,7 @@ if (($id || $ref) && $action == 'edit') {
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button button-save" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' <input type="submit" class="button button-cancel" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel();
|
||||
|
||||
print '</form>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -208,12 +208,12 @@ $title = $langs->trans('ListOf', $langs->transnoentitiesnoconv("EmailCollector")
|
|||
// --------------------------------------------------------------------
|
||||
$sql = 'SELECT ';
|
||||
foreach ($object->fields as $key => $val) {
|
||||
$sql .= 't.'.$key.', ';
|
||||
$sql .= "t.".$key.", ";
|
||||
}
|
||||
// Add fields from extrafields
|
||||
if (!empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : '');
|
||||
$sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key." as options_".$key.', ' : '');
|
||||
}
|
||||
}
|
||||
// Add fields from hooks
|
||||
|
|
@ -259,7 +259,7 @@ $sql .= $hookmanager->resPrint;
|
|||
$sql.= " GROUP BY ";
|
||||
foreach ($object->fields as $key => $val)
|
||||
{
|
||||
$sql.='t.'.$key.', ';
|
||||
$sql .= "t.".$key.", ";
|
||||
}
|
||||
// Add fields from extrafields
|
||||
if (! empty($extrafields->attributes[$object->table_element]['label'])) {
|
||||
|
|
|
|||
|
|
@ -298,11 +298,7 @@ if ($action == 'edit') {
|
|||
}
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button button-save" type="submit" name="save" value="'.$langs->trans("Save").'">';
|
||||
print ' ';
|
||||
print '<input class="button button-cancel" type="submit" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel();
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
|
|
@ -449,7 +445,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ foreach ($dirmodels as $reldir) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
@ -454,7 +454,7 @@ print "</td></tr>\n";
|
|||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
print $form->buttonsSaveCancel("Modify", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ foreach ($dirmodels as $reldir) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
@ -460,9 +460,7 @@ print '</td></tr>'."\n";
|
|||
|
||||
print '</table>';
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ if ($action != 'edit') {
|
|||
echo '<td>'.$form->selectDate(strtotime(date('Y-m-t', dol_now())), 'end', '', '', 0, '', 1, 0).'</td>';
|
||||
echo '<td><input type="text" value="" class="maxwidth100" name="amount" class="amount" /> '.$conf->currency.'</td>';
|
||||
echo '<td>'.$form->selectyesno('restrictive', 0, 1).'</td>';
|
||||
echo '<td class="right"><input type="submit" class="button" value="'.$langs->trans('Add').'" /></td>';
|
||||
echo '<td class="right"><input type="submit" class="button button-add" value="'.$langs->trans('Add').'" /></td>';
|
||||
echo '</tr>';
|
||||
|
||||
echo '</table>';
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ print '</td></tr>';
|
|||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ExportCsvSeparator").'</td>';
|
||||
print '<td width="60" align="center"><input class="flat width50" maxlength="3" type="text" name="EXPORT_CSV_SEPARATOR_TO_USE" value="'.(empty($conf->global->EXPORT_CSV_SEPARATOR_TO_USE) ? ',' : $conf->global->EXPORT_CSV_SEPARATOR_TO_USE).'"></td>';
|
||||
print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '<td class="right"><input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>';
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ if (GETPOST("delete")) {
|
|||
/*
|
||||
* View
|
||||
*/
|
||||
$form = new Form($db);
|
||||
|
||||
llxHeader('', $langs->trans("ExternalRSSSetup"));
|
||||
|
||||
|
|
@ -209,11 +210,9 @@ print '<td>http://news.google.com/news?ned=us&topic=h&output=rss<br>http://www.d
|
|||
print '</tr>';
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Add").'">';
|
||||
print $form->buttonsSaveCancel("Add", '');
|
||||
print '<input type="hidden" name="action" value="add">';
|
||||
print '<input type="hidden" name="norss" value="'.($lastexternalrss + 1).'">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ foreach ($dirmodels as $reldir) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
@ -579,7 +579,7 @@ if (!empty($conf->global->INVOICE_USE_DEFAULT_DOCUMENT)) { // Hidden conf
|
|||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Type").'</td>';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '<td class="right"><input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$listtype = array(
|
||||
|
|
@ -623,7 +623,7 @@ print '<tr class="liste_titre">';
|
|||
print '<td>';
|
||||
print '<input type="hidden" name="action" value="setribchq">';
|
||||
print $langs->trans("PaymentMode").'</td>';
|
||||
print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '<td class="right"><input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
|
@ -716,7 +716,7 @@ print $langs->trans("ForceInvoiceDate");
|
|||
print '</td><td width="60" class="center">';
|
||||
print $form->selectyesno("forcedate", $conf->global->FAC_FORCE_DATE_VALIDATION, 1);
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'" />';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
|
|
@ -742,7 +742,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
|||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'" />';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
|
|
@ -755,7 +755,7 @@ print $form->textwithpicto($langs->trans("WatermarkOnDraftBill"), $htmltext, 1,
|
|||
print '</td>';
|
||||
print '<td><input class="flat minwidth200imp" type="text" name="FACTURE_DRAFT_WATERMARK" value="'.$conf->global->FACTURE_DRAFT_WATERMARK.'" />';
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'" />';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'" />';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ if (empty($conf->use_javascript_ajax)) {
|
|||
print $conf->global->FCKEDITOR_TEST;
|
||||
print '</div>';
|
||||
}
|
||||
print '<br><div class="center"><input class="button button-save" type="submit" name="save" value="'.$langs->trans("Save").'"></div>'."\n";
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
print '<div id="divforlog"></div>';
|
||||
print '</form>'."\n";
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ foreach ($dirmodels as $reldir) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
@ -512,7 +512,7 @@ if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
|||
print $doleditor->Create();
|
||||
}
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
|
||||
|
|
@ -525,7 +525,7 @@ print $form->textwithpicto($langs->trans("WatermarkOnDraftInterventionCards"), $
|
|||
print '</td><td>';
|
||||
print '<input class="flat minwidth200" type="text" name="FICHINTER_DRAFT_WATERMARK" value="'.$conf->global->FICHINTER_DRAFT_WATERMARK.'">';
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
// print products on fichinter
|
||||
|
|
@ -540,7 +540,7 @@ if ($conf->global->FICHINTER_PRINT_PRODUCTS) {
|
|||
}
|
||||
print '/>';
|
||||
print '</td><td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print "</td></tr>\n";
|
||||
print '</form>';
|
||||
// Use services duration
|
||||
|
|
@ -555,7 +555,7 @@ print '<td class="center">';
|
|||
print '<input type="checkbox" name="FICHINTER_USE_SERVICE_DURATION"'.($conf->global->FICHINTER_USE_SERVICE_DURATION ? ' checked' : '').'>';
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
|
@ -571,7 +571,7 @@ print '<td class="center">';
|
|||
print '<input type="checkbox" name="FICHINTER_WITHOUT_DURATION"'.($conf->global->FICHINTER_WITHOUT_DURATION ? ' checked' : '').'>';
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
|
@ -587,7 +587,7 @@ print '<td class="center">';
|
|||
print '<input type="checkbox" name="FICHINTER_DATE_WITHOUT_HOUR"'.($conf->global->FICHINTER_DATE_WITHOUT_HOUR ? ' checked' : '').'>';
|
||||
print '</td>';
|
||||
print '<td class="right">';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
print '</form>';
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ print '<input type="hidden" name="action" value="set">';
|
|||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '<td class="right"><input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Lib version
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ foreach ($dirmodels as $reldir) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
@ -274,147 +274,141 @@ print '</div>';
|
|||
print '<br>';
|
||||
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL < 2) {
|
||||
print dol_get_fiche_end();
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
exit;
|
||||
}
|
||||
|
||||
/*
|
||||
* Documents models for Holidays
|
||||
*/
|
||||
|
||||
print load_fiche_titre($langs->trans("TemplatePDFHolidays"), '', '');
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
print load_fiche_titre($langs->trans("TemplatePDFHolidays"), '', '');
|
||||
|
||||
// Defined model definition table
|
||||
$def = array();
|
||||
$sql = "SELECT nom";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||
$sql .= " WHERE type = '".$db->escape($type)."'";
|
||||
$sql .= " AND entity = ".$conf->entity;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
$num_rows = $db->num_rows($resql);
|
||||
while ($i < $num_rows) {
|
||||
$array = $db->fetch_array($resql);
|
||||
array_push($def, $array[0]);
|
||||
$i++;
|
||||
// Defined model definition table
|
||||
$def = array();
|
||||
$sql = "SELECT nom";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."document_model";
|
||||
$sql .= " WHERE type = '".$db->escape($type)."'";
|
||||
$sql .= " AND entity = ".$conf->entity;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$i = 0;
|
||||
$num_rows = $db->num_rows($resql);
|
||||
while ($i < $num_rows) {
|
||||
$array = $db->fetch_array($resql);
|
||||
array_push($def, $array[0]);
|
||||
$i++;
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
|
||||
print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td align="center" width="80">'.$langs->trans("Preview").'</td>';
|
||||
print "</tr>\n";
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Name").'</td>';
|
||||
print '<td>'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center" width="60">'.$langs->trans("Status")."</td>\n";
|
||||
print '<td align="center" width="60">'.$langs->trans("Default")."</td>\n";
|
||||
print '<td align="center" width="80">'.$langs->trans("ShortInfo").'</td>';
|
||||
print '<td align="center" width="80">'.$langs->trans("Preview").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
clearstatcache();
|
||||
|
||||
foreach ($dirmodels as $reldir) {
|
||||
foreach (array('', '/doc') as $valdir) {
|
||||
$realpath = $reldir."core/modules/holiday".$valdir;
|
||||
$dir = dol_buildpath($realpath);
|
||||
foreach ($dirmodels as $reldir) {
|
||||
foreach (array('', '/doc') as $valdir) {
|
||||
$realpath = $reldir."core/modules/holiday".$valdir;
|
||||
$dir = dol_buildpath($realpath);
|
||||
|
||||
if (is_dir($dir)) {
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle)) {
|
||||
while (($file = readdir($handle)) !== false) {
|
||||
$filelist[] = $file;
|
||||
}
|
||||
closedir($handle);
|
||||
arsort($filelist);
|
||||
if (is_dir($dir)) {
|
||||
$handle = opendir($dir);
|
||||
if (is_resource($handle)) {
|
||||
while (($file = readdir($handle)) !== false) {
|
||||
$filelist[] = $file;
|
||||
}
|
||||
closedir($handle);
|
||||
arsort($filelist);
|
||||
|
||||
foreach ($filelist as $file) {
|
||||
if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
|
||||
if (file_exists($dir.'/'.$file)) {
|
||||
$name = substr($file, 4, dol_strlen($file) - 16);
|
||||
$classname = substr($file, 0, dol_strlen($file) - 12);
|
||||
foreach ($filelist as $file) {
|
||||
if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) {
|
||||
if (file_exists($dir.'/'.$file)) {
|
||||
$name = substr($file, 4, dol_strlen($file) - 16);
|
||||
$classname = substr($file, 0, dol_strlen($file) - 12);
|
||||
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
require_once $dir.'/'.$file;
|
||||
$module = new $classname($db);
|
||||
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
|
||||
if ($modulequalified) {
|
||||
print '<tr class="oddeven"><td width="100">';
|
||||
print (empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
} else {
|
||||
print $module->description;
|
||||
$modulequalified = 1;
|
||||
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
|
||||
$modulequalified = 0;
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Active
|
||||
if (in_array($name, $def)) {
|
||||
print '<td class="center">'."\n";
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
if ($modulequalified) {
|
||||
print '<tr class="oddeven"><td width="100">';
|
||||
print (empty($module->name) ? $name : $module->name);
|
||||
print "</td><td>\n";
|
||||
if (method_exists($module, 'info')) {
|
||||
print $module->info($langs);
|
||||
} else {
|
||||
print $module->description;
|
||||
}
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td class="center">'."\n";
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
|
||||
// Active
|
||||
if (in_array($name, $def)) {
|
||||
print '<td class="center">'."\n";
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||
print img_picto($langs->trans("Enabled"), 'switch_on');
|
||||
print '</a>';
|
||||
print '</td>';
|
||||
} else {
|
||||
print '<td class="center">'."\n";
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
// Default
|
||||
print '<td class="center">';
|
||||
if ($conf->global->HOLIDAY_ADDON_PDF == $name) {
|
||||
print img_picto($langs->trans("Default"), 'on');
|
||||
} else {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Info
|
||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
|
||||
if ($module->type == 'pdf') {
|
||||
$htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
||||
}
|
||||
$htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
|
||||
|
||||
$htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf') {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
|
||||
} else {
|
||||
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
// Default
|
||||
print '<td class="center">';
|
||||
if ($conf->global->HOLIDAY_ADDON_PDF == $name) {
|
||||
print img_picto($langs->trans("Default"), 'on');
|
||||
} else {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.$name.'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Info
|
||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown"));
|
||||
if ($module->type == 'pdf') {
|
||||
$htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur;
|
||||
}
|
||||
$htmltooltip .= '<br>'.$langs->trans("Path").': '.preg_replace('/^\//', '', $realpath).'/'.$file;
|
||||
|
||||
$htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1);
|
||||
$htmltooltip .= '<br>'.$langs->trans("WatermarkOnDraftOrders").': '.yn($module->option_draft_watermark, 1, 1);
|
||||
|
||||
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto('', $htmltooltip, 1, 0);
|
||||
print '</td>';
|
||||
|
||||
// Preview
|
||||
print '<td class="center">';
|
||||
if ($module->type == 'pdf') {
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'pdf').'</a>';
|
||||
} else {
|
||||
print img_object($langs->trans("PreviewNotAvailable"), 'generic');
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -422,11 +416,11 @@ foreach ($dirmodels as $reldir) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
print "<br>";
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
print "<br>";
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -446,42 +440,123 @@ print '<td>'.$langs->trans("Parameter").'</td>';
|
|||
print '<td align="center" width="60">'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$substitutionarray = pdf_getSubstitutionArray($langs, array('objectamount'), null, 2);
|
||||
$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
|
||||
$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
||||
foreach ($substitutionarray as $key => $val) {
|
||||
$htmltext .= $key.'<br>';
|
||||
/*var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY);
|
||||
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY);
|
||||
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY);
|
||||
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY);
|
||||
*/
|
||||
if (!isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY)) {
|
||||
$conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY = 1;
|
||||
}
|
||||
$htmltext .= '</i>';
|
||||
if (!isset($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY)) {
|
||||
$conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY = 1;
|
||||
}
|
||||
/*
|
||||
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY);
|
||||
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY);
|
||||
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY);
|
||||
var_dump($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY);
|
||||
*/
|
||||
|
||||
print '<tr class="oddeven"><td colspan="2">';
|
||||
print $form->textwithpicto($langs->trans("FreeLegalTextOnHolidays"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'tooltiphelp');
|
||||
print '<br>';
|
||||
$variablename = 'HOLIDAY_FREE_TEXT';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
// Set working days
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("XIsAUsualNonWorkingDay", $langs->transnoentitiesnoconv("Monday"))."</td>";
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY', array(), null, 0);
|
||||
} else {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
|
||||
print $doleditor->Create();
|
||||
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY)) {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
} else {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_MONDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
|
||||
//Use draft Watermark
|
||||
// Set working days
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("XIsAUsualNonWorkingDay", $langs->transnoentitiesnoconv("Friday"))."</td>";
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY', array(), null, 0);
|
||||
} else {
|
||||
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY)) {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
} else {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_FRIDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
}
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftHolidayCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
||||
print '</td><td>';
|
||||
print '<input class="flat minwidth200" type="text" name="HOLIDAY_DRAFT_WATERMARK" value="'.$conf->global->HOLIDAY_DRAFT_WATERMARK.'">';
|
||||
print '</td></tr>'."\n";
|
||||
// Set working days
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("XIsAUsualNonWorkingDay", $langs->transnoentitiesnoconv("Saturday"))."</td>";
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY', array(), null, 0, 0, 0, 2, 0, 1);
|
||||
} else {
|
||||
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY)) {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
} else {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_SATURDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
}
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
|
||||
// Set working days
|
||||
print '<tr class="oddeven">';
|
||||
print "<td>".$langs->trans("XIsAUsualNonWorkingDay", $langs->transnoentitiesnoconv("Sunday"))."</td>";
|
||||
print '<td class="center">';
|
||||
if ($conf->use_javascript_ajax) {
|
||||
print ajax_constantonoff('MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY', array(), null, 0, 0, 0, 2, 0, 1);
|
||||
} else {
|
||||
if (!empty($conf->global->MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY)) {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY=1">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
|
||||
} else {
|
||||
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_other&MAIN_NON_WORKING_DAYS_INCLUDE_SUNDAY=0">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
|
||||
}
|
||||
}
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL >= 2) {
|
||||
$substitutionarray = pdf_getSubstitutionArray($langs, array('objectamount'), null, 2);
|
||||
$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
|
||||
$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
|
||||
foreach ($substitutionarray as $key => $val) {
|
||||
$htmltext .= $key.'<br>';
|
||||
}
|
||||
$htmltext .= '</i>';
|
||||
|
||||
print '<tr class="oddeven"><td colspan="2">';
|
||||
print $form->textwithpicto($langs->trans("FreeLegalTextOnHolidays"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'tooltiphelp');
|
||||
print '<br>';
|
||||
$variablename = 'HOLIDAY_FREE_TEXT';
|
||||
if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
|
||||
print '<textarea name="'.$variablename.'" class="flat" cols="120">'.$conf->global->$variablename.'</textarea>';
|
||||
} else {
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
$doleditor = new DolEditor($variablename, $conf->global->$variablename, '', 80, 'dolibarr_notes');
|
||||
print $doleditor->Create();
|
||||
}
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
//Use draft Watermark
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
print $form->textwithpicto($langs->trans("WatermarkOnDraftHolidayCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
|
||||
print '</td><td>';
|
||||
print '<input class="flat minwidth200" type="text" name="HOLIDAY_DRAFT_WATERMARK" value="'.$conf->global->HOLIDAY_DRAFT_WATERMARK.'">';
|
||||
print '</td></tr>'."\n";
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input type="submit" class="button button-save" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@ if (!$user->admin) {
|
|||
$action = GETPOST('action', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'adminihm'; // To manage different context of search
|
||||
|
||||
$mode = GETPOST('mode', 'aZ09') ? GETPOST('mode', 'aZ09') : 'language'; // 'language', 'template', 'login', 'other'
|
||||
|
||||
if (!defined("MAIN_MOTD")) {
|
||||
define("MAIN_MOTD", "");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Action
|
||||
*/
|
||||
|
|
@ -94,168 +94,178 @@ if ($action == 'removebackgroundlogin' && !empty($conf->global->MAIN_LOGIN_BACKG
|
|||
}
|
||||
|
||||
if ($action == 'update') {
|
||||
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
|
||||
//dolibarr_set_const($db, "MAIN_MULTILANGS", GETPOST("MAIN_MULTILANGS"), 'chaine', 0, '', $conf->entity);
|
||||
$error = 0;
|
||||
|
||||
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
/*$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
||||
if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
|
||||
else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);*/
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', $val, 'chaine', 0, '', $conf->entity);
|
||||
if ($mode == 'language') {
|
||||
dolibarr_set_const($db, "MAIN_LANG_DEFAULT", GETPOST("MAIN_LANG_DEFAULT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
|
||||
//dolibarr_set_const($db, "MAIN_MULTILANGS", GETPOST("MAIN_MULTILANGS"), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TOPMENU_BACK1', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', $val, 'chaine', 0, '', $conf->entity);
|
||||
if ($mode == 'template') {
|
||||
dolibarr_set_const($db, "MAIN_THEME", GETPOST("main_theme", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
/*$val=GETPOST('THEME_TOPMENU_DISABLE_IMAGE');
|
||||
if (! $val) dolibarr_del_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', $conf->entity);
|
||||
else dolibarr_set_const($db, 'THEME_TOPMENU_DISABLE_IMAGE', GETPOST('THEME_TOPMENU_DISABLE_IMAGE'), 'chaine', 0, '', $conf->entity);*/
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKBODY'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_BACKBODY', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_BACKBODY', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TOPMENU_BACK1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TOPMENU_BACK1', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_TOPMENU_BACK1', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_VERMENU_BACK1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_VERMENU_BACK1', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_VERMENU_BACK1', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLE'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLELINK'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLELINK', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLELINK', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR1', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR2', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR2', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR1', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR1', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR2', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR2', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_HOVER'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_USE_HOVER', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_CHECKED'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_USE_CHECKED', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_VERMENU_BACK1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_VERMENU_BACK1', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_VERMENU_BACK1', $val, 'chaine', 0, '', $conf->entity);
|
||||
if ($mode == 'other') {
|
||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
//dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", GETPOST("MAIN_DISABLE_JAVASCRIPT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
//dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", GETPOST("MAIN_BUTTON_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
//dolibarr_set_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", GETPOST("MAIN_MENU_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_START_WEEK", GETPOST("MAIN_START_WEEK", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLENOTAB'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLENOTAB', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
if ($mode == 'login') {
|
||||
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
||||
//dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_BACKTITLE1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_BACKTITLE1', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_BACKTITLE1', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
$varforimage = 'imagebackground';
|
||||
$dirforimage = $conf->mycompany->dir_output . '/logos/';
|
||||
if ($_FILES[$varforimage]["tmp_name"]) {
|
||||
$reg = array();
|
||||
if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) {
|
||||
$original_file = $reg[1];
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLE'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLE', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLE', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTTITLELINK'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTTITLELINK', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTTITLELINK', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR1', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR1', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEIMPAIR1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_LINEIMPAIR2', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_LINEIMPAIR2', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR1', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR1', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_LINEPAIR1'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_LINEPAIR2', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_LINEPAIR2', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_TEXTLINK'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_TEXTLINK', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, 'THEME_ELDY_TEXTLINK', $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_HOVER'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_USE_HOVER', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, "THEME_ELDY_USE_HOVER", $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
$val = (implode(',', (colorStringToArray(GETPOST('THEME_ELDY_USE_CHECKED'), array()))));
|
||||
if ($val == '') {
|
||||
dolibarr_del_const($db, 'THEME_ELDY_USE_CHECKED', $conf->entity);
|
||||
} else {
|
||||
dolibarr_set_const($db, "THEME_ELDY_USE_CHECKED", $val, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", GETPOST("main_size_liste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", GETPOST("main_size_shortliste_limit", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
//dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", GETPOST("MAIN_DISABLE_JAVASCRIPT", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
//dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", GETPOST("MAIN_BUTTON_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
//dolibarr_set_const($db, "MAIN_MENU_HIDE_UNAUTHORIZED", GETPOST("MAIN_MENU_HIDE_UNAUTHORIZED", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_START_WEEK", GETPOST("MAIN_START_WEEK", 'int'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", GETPOST("MAIN_DEFAULT_WORKING_DAYS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_HOURS", GETPOST("MAIN_DEFAULT_WORKING_HOURS", 'alphanohtml'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_BUGTRACK_ENABLELINK", GETPOST("MAIN_BUGTRACK_ENABLELINK", 'alpha'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_FIRSTNAME_NAME_POSITION", GETPOST("MAIN_FIRSTNAME_NAME_POSITION", 'aZ09'), 'chaine', 0, '', $conf->entity);
|
||||
|
||||
dolibarr_set_const($db, "MAIN_MOTD", dol_htmlcleanlastbr(GETPOST("main_motd", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_HOME", dol_htmlcleanlastbr(GETPOST("main_home", 'restricthtml')), 'chaine', 0, '', $conf->entity);
|
||||
//dolibarr_set_const($db, "MAIN_HELP_DISABLELINK", GETPOST("MAIN_HELP_DISABLELINK", 'aZ09'), 'chaine', 0, '', 0); // Param for all entities
|
||||
|
||||
$varforimage = 'imagebackground'; $dirforimage = $conf->mycompany->dir_output.'/logos/';
|
||||
if ($_FILES[$varforimage]["tmp_name"]) {
|
||||
$reg = array();
|
||||
if (preg_match('/([^\\/:]+)$/i', $_FILES[$varforimage]["name"], $reg)) {
|
||||
$original_file = $reg[1];
|
||||
|
||||
$isimage = image_format_supported($original_file);
|
||||
if ($isimage >= 0) {
|
||||
dol_syslog("Move file ".$_FILES[$varforimage]["tmp_name"]." to ".$dirforimage.$original_file);
|
||||
if (!is_dir($dirforimage)) {
|
||||
dol_mkdir($dirforimage);
|
||||
}
|
||||
$result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage.$original_file, 1, 0, $_FILES[$varforimage]['error']);
|
||||
if ($result > 0) {
|
||||
dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND", $original_file, 'chaine', 0, '', $conf->entity);
|
||||
} elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
$tmparray = explode(':', $result);
|
||||
setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus', $tmparray[1]), null, 'errors');
|
||||
$isimage = image_format_supported($original_file);
|
||||
if ($isimage >= 0) {
|
||||
dol_syslog("Move file " . $_FILES[$varforimage]["tmp_name"] . " to " . $dirforimage . $original_file);
|
||||
if (!is_dir($dirforimage)) {
|
||||
dol_mkdir($dirforimage);
|
||||
}
|
||||
$result = dol_move_uploaded_file($_FILES[$varforimage]["tmp_name"], $dirforimage . $original_file, 1, 0, $_FILES[$varforimage]['error']);
|
||||
if ($result > 0) {
|
||||
dolibarr_set_const($db, "MAIN_LOGIN_BACKGROUND", $original_file, 'chaine', 0, '', $conf->entity);
|
||||
} elseif (preg_match('/^ErrorFileIsInfectedWithAVirus/', $result)) {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
$tmparray = explode(':', $result);
|
||||
setEventMessages($langs->trans('ErrorFileIsInfectedWithAVirus', $tmparray[1]), null, 'errors');
|
||||
} else {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
|
||||
}
|
||||
} else {
|
||||
$error++;
|
||||
setEventMessages($langs->trans("ErrorFailedToSaveFile"), null, 'errors');
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
|
||||
}
|
||||
} else {
|
||||
$error++;
|
||||
$langs->load("errors");
|
||||
setEventMessages($langs->trans("ErrorBadImageFormat"), null, 'errors');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION["mainmenu"] = ""; // The menu manager may have changed
|
||||
|
||||
|
||||
$_SESSION["mainmenu"] = ""; // Le gestionnaire de menu a pu changer
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup".(GETPOSTISSET('page_y', 'int') ? '&page_y='.GETPOST('page_y', 'int') : ''));
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup".'&mode='.$mode.(GETPOSTISSET('page_y') ? '&page_y='.GETPOST('page_y', 'int') : ''));
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -274,6 +284,7 @@ $formadmin = new FormAdmin($db);
|
|||
print load_fiche_titre($langs->trans("GUISetup"), '', 'title_setup');
|
||||
|
||||
print '<span class="opacitymedium">'.$langs->trans("DisplayDesc")."</span><br>\n";
|
||||
print "<br>\n";
|
||||
|
||||
//WYSIWYG Editor
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
||||
|
|
@ -282,242 +293,223 @@ print '<form enctype="multipart/form-data" method="POST" action="'.$_SERVER["PHP
|
|||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="update">';
|
||||
print '<input type="hidden" name="page_y" value="">';
|
||||
print '<input type="hidden" id="mode" name="mode" value="'.dol_escape_htmltag($mode).'">';
|
||||
|
||||
$head = ihm_prepare_head();
|
||||
|
||||
print dol_get_fiche_head($head, $mode, '', -1, '');
|
||||
|
||||
clearstatcache();
|
||||
|
||||
print '<br>';
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
||||
print '<tr class="liste_titre"><th>'.img_picto('', 'language').' '.$langs->trans("Language").'</th><th></th>';
|
||||
print '</tr>';
|
||||
if ($mode == 'language') {
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
||||
|
||||
// Default language
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||
print img_picto('', 'language', 'class="pictofixedwidth"');
|
||||
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2);
|
||||
//print '<input class="button button-save smallpaddingimp" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
// Default language
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultLanguage").'</td><td>';
|
||||
print img_picto('', 'language', 'class="pictofixedwidth"');
|
||||
print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'MAIN_LANG_DEFAULT', 1, null, '', 0, 0, 'minwidth300', 2);
|
||||
//print '<input class="button button-save smallpaddingimp" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Multilingual GUI
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("EnableMultilangInterface").'</td><td>';
|
||||
print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
// Multilingual GUI
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("EnableMultilangInterface") . '</td><td>';
|
||||
print ajax_constantonoff("MAIN_MULTILANGS", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
print '<div class="center">';
|
||||
print '<input class="button button-save" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
// Themes and themes options
|
||||
showSkins(null, 1);
|
||||
print '<br>';
|
||||
print '<div class="center">';
|
||||
print '<input class="button button-save reposition" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
// Other
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="otherparameters" class="noborder centpercent editmode tableforfield">';
|
||||
print '<tr class="liste_titre"><th class="titlefieldmiddle">'.$langs->trans("Miscellaneous").'</th>';
|
||||
print '<th></th>';
|
||||
print '<th width="20"> </tg>';
|
||||
print '</tr>';
|
||||
|
||||
// Disable javascript and ajax
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print ' <span class="opacitymedium"> '.$langs->trans("DisableJavascriptNote").'</span>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Max size of lists
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat" name="main_size_liste_limit" size="4" value="'.$conf->global->MAIN_SIZE_LISTE_LIMIT.'"></td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Max size of short lists on customer card
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="'.$conf->global->MAIN_SIZE_SHORTLIST_LIMIT.'"></td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// show input border
|
||||
/*
|
||||
print '<tr><td>'.$langs->trans("showInputBorder").'</td><td>';
|
||||
print $form->selectyesno('main_showInputBorder',isset($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)?$conf->global->THEME_ELDY_SHOW_BORDER_INPUT:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// First day for weeks
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("WeekStartOnDay").'</td><td>';
|
||||
print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : '1'), 'MAIN_START_WEEK', 0);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// DefaultWorkingDays
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingDays").'</td><td>';
|
||||
print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS : '1-5').'">';
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// DefaultWorkingHours
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultWorkingHours").'</td><td>';
|
||||
print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="'.(isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS : '9-18').'">';
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname/Name
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("FirstnameNamePosition").'</td><td>';
|
||||
$array = array(0=>$langs->trans("Firstname").' '.$langs->trans("Lastname"), 1=>$langs->trans("Lastname").' '.$langs->trans("Firstname"));
|
||||
print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0));
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide unauthorized menus
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("HideUnauthorizedMenu").'</td><td>';
|
||||
//print $form->selectyesno('MAIN_MENU_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_MENU_HIDE_UNAUTHORIZED : 0, 1);
|
||||
print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide unauthorized button
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ButtonHideUnauthorized").'</td><td>';
|
||||
//print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1);
|
||||
print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide version link
|
||||
/*
|
||||
|
||||
print '<tr><td>'.$langs->trans("HideVersionLink").'</td><td>';
|
||||
print $form->selectyesno('MAIN_HIDE_VERSION',$conf->global->MAIN_HIDE_VERSION,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// Show bugtrack link
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")).'</td><td>';
|
||||
print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="'.(empty($conf->global->MAIN_BUGTRACK_ENABLELINK) ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK).'">';
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide wiki link on login page
|
||||
$pictohelp = '<span class="fa fa-question-circle"></span>';
|
||||
print '<tr class="oddeven"><td>'.str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')).'</td><td>';
|
||||
print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0);
|
||||
//print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Message of the day on home page
|
||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
|
||||
complete_substitutions_array($substitutionarray, $langs);
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
||||
foreach ($substitutionarray as $key => $val) {
|
||||
$texthelp .= $key.'<br>';
|
||||
print '</table>' . "\n";
|
||||
print '</div>';
|
||||
}
|
||||
print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
|
||||
|
||||
print '</td><td colspan="2">';
|
||||
|
||||
$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
|
||||
print '<br>';
|
||||
|
||||
print '<div class="center">';
|
||||
print '<input class="button button-save reposition" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
|
||||
print '<br><br>';
|
||||
|
||||
// Other
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
||||
print '<tr class="liste_titre"><th class="titlefieldmiddle">'.$langs->trans("LoginPage").'</th>';
|
||||
print '<th></th>';
|
||||
print '<th width="20"> </th>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide helpcenter link on login page
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DisableLinkToHelpCenter").'</td><td>';
|
||||
print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Message on login page
|
||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user'));
|
||||
complete_substitutions_array($substitutionarray, $langs);
|
||||
print '<tr class="oddeven"><td>';
|
||||
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted").'<br>';
|
||||
foreach ($substitutionarray as $key => $val) {
|
||||
$texthelp .= $key.'<br>';
|
||||
if ($mode == 'template') {
|
||||
// Themes and themes options
|
||||
showSkins(null, 1);
|
||||
}
|
||||
print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin');
|
||||
print '</td><td colspan="2">';
|
||||
$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>'."\n";
|
||||
|
||||
// Background
|
||||
print '<tr class="oddeven"><td><label for="imagebackground">'.$langs->trans("BackgroundImageLogin").' (png,jpg)</label></td><td colspan="2">';
|
||||
print '<div class="centpercent inline-block">';
|
||||
$disabled = '';
|
||||
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
||||
$disabled = ' disabled="disabled"';
|
||||
}
|
||||
print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"'.$disabled.'>';
|
||||
if ($disabled) {
|
||||
print '('.$langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND").') ';
|
||||
}
|
||||
if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) {
|
||||
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=removebackgroundlogin">'.img_delete($langs->trans("Delete")).'</a>';
|
||||
if (file_exists($conf->mycompany->dir_output.'/logos/'.$conf->global->MAIN_LOGIN_BACKGROUND)) {
|
||||
print ' ';
|
||||
print '<img class="paddingleft valignmiddle" width="100" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&file='.urlencode('logos/'.$conf->global->MAIN_LOGIN_BACKGROUND).'">';
|
||||
if ($mode == 'other') {
|
||||
// Other
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="otherparameters" class="noborder centpercent editmode tableforfield">';
|
||||
|
||||
// Disable javascript and ajax
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("DisableJavascript") . '</td><td>';
|
||||
print ajax_constantonoff("MAIN_DISABLE_JAVASCRIPT", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print ' <span class="opacitymedium"> ' . $langs->trans("DisableJavascriptNote") . '</span>';
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Max size of lists
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeList") . '</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '"></td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Max size of short lists on customer card
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("DefaultMaxSizeShortList") . '</td><td><input class="flat" name="main_size_shortliste_limit" size="4" value="' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '"></td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// show input border
|
||||
/*
|
||||
print '<tr><td>'.$langs->trans("showInputBorder").'</td><td>';
|
||||
print $form->selectyesno('main_showInputBorder',isset($conf->global->THEME_ELDY_SHOW_BORDER_INPUT)?$conf->global->THEME_ELDY_SHOW_BORDER_INPUT:0,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// First day for weeks
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("WeekStartOnDay") . '</td><td>';
|
||||
print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : '1'), 'MAIN_START_WEEK', 0);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// DefaultWorkingDays
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingDays") . '</td><td>';
|
||||
print '<input type="text" name="MAIN_DEFAULT_WORKING_DAYS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_DAYS) ? $conf->global->MAIN_DEFAULT_WORKING_DAYS : '1-5') . '">';
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// DefaultWorkingHours
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("DefaultWorkingHours") . '</td><td>';
|
||||
print '<input type="text" name="MAIN_DEFAULT_WORKING_HOURS" size="5" value="' . (isset($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? $conf->global->MAIN_DEFAULT_WORKING_HOURS : '9-18') . '">';
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Firstname/Name
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("FirstnameNamePosition") . '</td><td>';
|
||||
$array = array(0 => $langs->trans("Firstname") . ' ' . $langs->trans("Lastname"), 1 => $langs->trans("Lastname") . ' ' . $langs->trans("Firstname"));
|
||||
print $form->selectarray('MAIN_FIRSTNAME_NAME_POSITION', $array, (isset($conf->global->MAIN_FIRSTNAME_NAME_POSITION) ? $conf->global->MAIN_FIRSTNAME_NAME_POSITION : 0));
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide unauthorized menus
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("HideUnauthorizedMenu") . '</td><td>';
|
||||
//print $form->selectyesno('MAIN_MENU_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_MENU_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_MENU_HIDE_UNAUTHORIZED : 0, 1);
|
||||
print ajax_constantonoff("MAIN_MENU_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide unauthorized button
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("ButtonHideUnauthorized") . '</td><td>';
|
||||
//print $form->selectyesno('MAIN_BUTTON_HIDE_UNAUTHORIZED', isset($conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED) ? $conf->global->MAIN_BUTTON_HIDE_UNAUTHORIZED : 0, 1);
|
||||
print ajax_constantonoff("MAIN_BUTTON_HIDE_UNAUTHORIZED", array(), $conf->entity, 0, 0, 1, 0);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide version link
|
||||
/*
|
||||
|
||||
print '<tr><td>'.$langs->trans("HideVersionLink").'</td><td>';
|
||||
print $form->selectyesno('MAIN_HIDE_VERSION',$conf->global->MAIN_HIDE_VERSION,1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// Show bugtrack link
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("ShowBugTrackLink", $langs->transnoentitiesnoconv("FindBug")) . '</td><td>';
|
||||
print '<input type="text" name="MAIN_BUGTRACK_ENABLELINK" value="' . (empty($conf->global->MAIN_BUGTRACK_ENABLELINK) ? '' : $conf->global->MAIN_BUGTRACK_ENABLELINK) . '">';
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Hide wiki link on login page
|
||||
$pictohelp = '<span class="fa fa-question-circle"></span>';
|
||||
print '<tr class="oddeven"><td>' . str_replace('{picto}', $pictohelp, $langs->trans("DisableLinkToHelp", '{picto}')) . '</td><td>';
|
||||
print ajax_constantonoff("MAIN_HELP_DISABLELINK", array(), $conf->entity, 0, 0, 1, 0);
|
||||
//print $form->selectyesno('MAIN_HELP_DISABLELINK', isset($conf->global->MAIN_HELP_DISABLELINK) ? $conf->global->MAIN_HELP_DISABLELINK : 0, 1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Message of the day on home page
|
||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount'));
|
||||
complete_substitutions_array($substitutionarray, $langs);
|
||||
|
||||
print '<tr class="oddeven"><td>';
|
||||
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>';
|
||||
foreach ($substitutionarray as $key => $val) {
|
||||
$texthelp .= $key . '<br>';
|
||||
}
|
||||
} else {
|
||||
print '<img class="paddingleft valignmiddle" width="100" src="'.DOL_URL_ROOT.'/public/theme/common/nophoto.png">';
|
||||
}
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
print $form->textwithpicto($langs->trans("MessageOfDay"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessageofday');
|
||||
|
||||
print '</table>'."\n";
|
||||
print '</div>';
|
||||
print '</td><td colspan="2">';
|
||||
|
||||
$doleditor = new DolEditor('main_motd', (isset($conf->global->MAIN_MOTD) ? $conf->global->MAIN_MOTD : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
print '</table>' . "\n";
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
if ($mode == 'login') {
|
||||
// Other
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table summary="edit" class="noborder centpercent editmode tableforfield">';
|
||||
|
||||
// Hide helpcenter link on login page
|
||||
print '<tr class="oddeven"><td>' . $langs->trans("DisableLinkToHelpCenter") . '</td><td>';
|
||||
print ajax_constantonoff("MAIN_HELPCENTER_DISABLELINK", array(), $conf->entity, 0, 0, 0, 0);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Message on login page
|
||||
$substitutionarray = getCommonSubstitutionArray($langs, 0, array('object', 'objectamount', 'user'));
|
||||
complete_substitutions_array($substitutionarray, $langs);
|
||||
print '<tr class="oddeven"><td>';
|
||||
$texthelp = $langs->trans("FollowingConstantsWillBeSubstituted") . '<br>';
|
||||
foreach ($substitutionarray as $key => $val) {
|
||||
$texthelp .= $key . '<br>';
|
||||
}
|
||||
print $form->textwithpicto($langs->trans("MessageLogin"), $texthelp, 1, 'help', '', 0, 2, 'tooltipmessagelogin');
|
||||
print '</td><td colspan="2">';
|
||||
$doleditor = new DolEditor('main_home', (isset($conf->global->MAIN_HOME) ? $conf->global->MAIN_HOME : ''), '', 142, 'dolibarr_notes', 'In', false, true, true, ROWS_4, '90%');
|
||||
$doleditor->Create();
|
||||
print '</td></tr>' . "\n";
|
||||
|
||||
// Background
|
||||
print '<tr class="oddeven"><td><label for="imagebackground">' . $langs->trans("BackgroundImageLogin") . ' (png,jpg)</label></td><td colspan="2">';
|
||||
print '<div class="centpercent inline-block">';
|
||||
$disabled = '';
|
||||
if (!empty($conf->global->ADD_UNSPLASH_LOGIN_BACKGROUND)) {
|
||||
$disabled = ' disabled="disabled"';
|
||||
}
|
||||
print '<input type="file" class="flat maxwidthinputfileonsmartphone" name="imagebackground" id="imagebackground"' . $disabled . '>';
|
||||
if ($disabled) {
|
||||
print '(' . $langs->trans("DisabledByOptionADD_UNSPLASH_LOGIN_BACKGROUND") . ') ';
|
||||
}
|
||||
if (!empty($conf->global->MAIN_LOGIN_BACKGROUND)) {
|
||||
print '<a class="reposition" href="' . $_SERVER["PHP_SELF"] . '?action=removebackgroundlogin">' . img_delete($langs->trans("Delete")) . '</a>';
|
||||
if (file_exists($conf->mycompany->dir_output . '/logos/' . $conf->global->MAIN_LOGIN_BACKGROUND)) {
|
||||
print ' ';
|
||||
print '<img class="paddingleft valignmiddle" width="100" src="' . DOL_URL_ROOT . '/viewimage.php?modulepart=mycompany&file=' . urlencode('logos/' . $conf->global->MAIN_LOGIN_BACKGROUND) . '">';
|
||||
}
|
||||
} else {
|
||||
print '<img class="paddingleft valignmiddle" width="100" src="' . DOL_URL_ROOT . '/public/theme/common/nophoto.png">';
|
||||
}
|
||||
print '</div>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>' . "\n";
|
||||
print '</div>';
|
||||
}
|
||||
|
||||
print '<br>';
|
||||
print '<div class="center">';
|
||||
print '<input class="button button-save reposition" type="submit" name="submit" value="'.$langs->trans("Save").'">';
|
||||
print '<input class="button button-save reposition" type="submit" name="submit" value="' . $langs->trans("Save") . '">';
|
||||
print '</div>';
|
||||
|
||||
print '</form>';
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ print '<td class="center" width="100"></td>'."\n";
|
|||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("ImportCsvSeparator").' ('.$langs->trans("ByDefault").')</td>';
|
||||
print '<td width="60" align="center">'."<input size=\"3\" class=\"flat\" type=\"text\" name=\"value\" value=\"".(empty($conf->global->IMPORT_CSV_SEPARATOR_TO_USE) ? ',' : $conf->global->IMPORT_CSV_SEPARATOR_TO_USE)."\"></td>";
|
||||
print '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '<td class="right"><input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'"></td>';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ if (!empty($conf->global->MAIN_MOTD_SETUPPAGE)) {
|
|||
$conf->global->MAIN_MOTD_SETUPPAGE = preg_replace('/<br(\s[\sa-zA-Z_="]*)?\/?>/i', '<br>', $conf->global->MAIN_MOTD_SETUPPAGE);
|
||||
if (!empty($conf->global->MAIN_MOTD_SETUPPAGE)) {
|
||||
$i = 0;
|
||||
$reg = array();
|
||||
while (preg_match('/__\(([a-zA-Z|@]+)\)__/i', $conf->global->MAIN_MOTD_SETUPPAGE, $reg) && $i < 100) {
|
||||
$tmp = explode('|', $reg[1]);
|
||||
if (!empty($tmp[1])) {
|
||||
|
|
@ -81,7 +82,8 @@ print '<br><br>';
|
|||
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY)) {
|
||||
$setupcompanynotcomplete = 1;
|
||||
}
|
||||
print img_picto('', 'company', 'class="paddingright"').' '.$langs->trans("SetupDescription3", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ? '' : '&action=edit'), $langs->transnoentities("Setup"), $langs->transnoentities("MenuCompanySetup"));
|
||||
print img_picto('', 'company', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/company.php?mainmenu=home'.(empty($setupcompanynotcomplete) ? '' : '&action=edit'), $langs->transnoentities("Setup"), $langs->transnoentities("MenuCompanySetup"));
|
||||
print '<br><br>'.$langs->trans("SetupDescription3b");
|
||||
if (!empty($setupcompanynotcomplete)) {
|
||||
$langs->load("errors");
|
||||
$warnpicto = img_warning($langs->trans("WarningMandatorySetupNotComplete"), 'style="padding-right: 6px;"');
|
||||
|
|
@ -92,7 +94,8 @@ print '<br>';
|
|||
print '<br>';
|
||||
|
||||
// Show info setup module
|
||||
print img_picto('', 'cog', 'class="paddingright"').' '.$langs->trans("SetupDescription4", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules"));
|
||||
print img_picto('', 'cog', 'class="paddingright valignmiddle double"').' '.$langs->trans("SetupDescriptionLink", DOL_URL_ROOT.'/admin/modules.php?mainmenu=home', $langs->transnoentities("Setup"), $langs->transnoentities("Modules"));
|
||||
print '<br><br>'.$langs->trans("SetupDescription4b");
|
||||
if (count($conf->modules) <= (empty($conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING) ? 1 : $conf->global->MAIN_MIN_NB_ENABLED_MODULE_FOR_WARNING)) { // If only minimal initial modules enabled
|
||||
$langs->load("errors");
|
||||
$warnpicto = img_warning($langs->trans("WarningEnableYourModulesApplications"), 'style="padding-right: 6px;"');
|
||||
|
|
|
|||
|
|
@ -258,9 +258,7 @@ if ($action == 'edit') {
|
|||
}
|
||||
print '</table>';
|
||||
|
||||
print '<br><div class="center">';
|
||||
print '<input class="button button-save" type="submit" value="'.$langs->trans("Save").'">';
|
||||
print '</div>';
|
||||
print $form->buttonsSaveCancel("Save", '');
|
||||
|
||||
print '</form>';
|
||||
print '<br>';
|
||||
|
|
@ -398,7 +396,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) {
|
|||
$langs->load("errors");
|
||||
print '<div class="error">'.$langs->trans($tmp).'</div>';
|
||||
} elseif ($tmp == 'NotConfigured') {
|
||||
print $langs->trans($tmp);
|
||||
print '<span class="opacitymedium">'.$langs->trans($tmp).'</span>';
|
||||
} else {
|
||||
print $tmp;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ print '</table>';
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
print $form->buttonsSaveCancel("Modify", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ print info_admin($langs->trans("LDAPDescValues"));
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
print $form->buttonsSaveCancel("Modify", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ print info_admin($langs->trans("LDAPDescValues"));
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
print $form->buttonsSaveCancel("Modify", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ print info_admin($langs->trans("LDAPDescValues"));
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
print $form->buttonsSaveCancel("Modify", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ print info_admin($langs->trans("LDAPDescValues"));
|
|||
|
||||
print dol_get_fiche_end();
|
||||
|
||||
print '<div class="center"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></div>';
|
||||
print $form->buttonsSaveCancel("Modify", '');
|
||||
|
||||
print '</form>';
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user