Merge branch 'develop' of ssh://git@github.com/Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2011-12-28 12:48:37 +01:00
commit 49146c4f83
27 changed files with 386 additions and 169 deletions

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
*
* 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
@ -37,14 +37,15 @@ $langs->load("companies");
$langs->load("products");
$langs->load("members");
if (!$user->admin)
accessforbidden();
if (! $user->admin) accessforbidden();
$action = GETPOST('action','alpha');
/*
* Actions
*/
if (isset($_POST["action"]) && $_POST["action"] == 'update')
if ($action == 'update')
{
dolibarr_set_const($db, "MAIN_PDF_FORMAT", $_POST["MAIN_PDF_FORMAT"],'chaine',0,'',$conf->entity);
@ -75,8 +76,9 @@ print_fiche_titre($langs->trans("PDF"),'','setup');
print $langs->trans("PDFDesc")."<br>\n";
print "<br>\n";
$noCountryCode = (empty($mysoc->country_code) ? true : false);
if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit
if ($action == 'edit') // Edit
{
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@ -113,35 +115,75 @@ if (isset($_GET["action"]) && $_GET["action"] == 'edit') // Edit
// Show prof id 1 in address into pdf
$var=!$var;
$pid1=$langs->transcountry("ProfId1",$mysoc->pays_code);
if ($pid1 == '-') $pid1=$langs->transcountry("ProfId1");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1);
print '</td></tr>';
if (! $noCountryCode)
{
$pid1=$langs->transcountry("ProfId1",$mysoc->country_code);
if ($pid1 == '-') $pid1=false;
}
else
{
$pid1 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid1)
{
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
print $form->selectyesno('MAIN_PROFID1_IN_ADDRESS',isset($conf->global->MAIN_PROFID1_IN_ADDRESS)?$conf->global->MAIN_PROFID1_IN_ADDRESS:0,1,$noCountryCode);
print '</td></tr>';
}
// Show prof id 2 in address into pdf
$var=!$var;
$pid2=$langs->transcountry("ProfId2",$mysoc->pays_code);
if ($pid2 == '-') $pid2=$langs->transcountry("ProfId2");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1);
print '</td></tr>';
if (! $noCountryCode)
{
$pid2=$langs->transcountry("ProfId2",$mysoc->country_code);
if ($pid2 == '-') $pid2=false;
}
else
{
$pid2 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid2)
{
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
print $form->selectyesno('MAIN_PROFID2_IN_ADDRESS',isset($conf->global->MAIN_PROFID2_IN_ADDRESS)?$conf->global->MAIN_PROFID2_IN_ADDRESS:0,1,$noCountryCode);
print '</td></tr>';
}
// Show prof id 3 in address into pdf
$var=!$var;
$pid3=$langs->transcountry("ProfId3",$mysoc->pays_code);
if ($pid3 == '-') $pid3=$langs->transcountry("ProfId3");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1);
print '</td></tr>';
if (! $noCountryCode)
{
$pid3=$langs->transcountry("ProfId3",$mysoc->country_code);
if ($pid3 == '-') $pid3=false;
}
else
{
$pid3 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid3)
{
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
print $form->selectyesno('MAIN_PROFID3_IN_ADDRESS',isset($conf->global->MAIN_PROFID3_IN_ADDRESS)?$conf->global->MAIN_PROFID3_IN_ADDRESS:0,1,$noCountryCode);
print '</td></tr>';
}
// Show prof id 4 in address into pdf
$var=!$var;
$pid4=$langs->transcountry("ProfId4",$mysoc->pays_code);
if ($pid4 == '-') $pid4=$langs->transcountry("ProfId4");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1);
print '</td></tr>';
if (! $noCountryCode)
{
$pid4=$langs->transcountry("ProfId4",$mysoc->country_code);
if ($pid4 == '-') $pid4=false;
}
else
{
$pid4 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid4)
{
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
print $form->selectyesno('MAIN_PROFID4_IN_ADDRESS',isset($conf->global->MAIN_PROFID4_IN_ADDRESS)?$conf->global->MAIN_PROFID4_IN_ADDRESS:0,1,$noCountryCode);
print '</td></tr>';
}
print '</table>';
@ -207,35 +249,75 @@ else // Show
// Show prof id 1 in address into pdf
$var=!$var;
$pid1=$langs->transcountry("ProfId1",$mysoc->pays_code);
if ($pid1 == '-') $pid1=$langs->transcountry("ProfId1");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
print yn($conf->global->MAIN_PROFID1_IN_ADDRESS,1);
print '</td></tr>';
if (! $noCountryCode)
{
$pid1=$langs->transcountry("ProfId1",$mysoc->country_code);
if ($pid1 == '-') $pid1=false;
}
else
{
$pid1 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid1)
{
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid1.'</td><td>';
print yn($conf->global->MAIN_PROFID1_IN_ADDRESS,1);
print '</td></tr>';
}
// Show prof id 2 in address into pdf
$var=!$var;
$pid2=$langs->transcountry("ProfId2",$mysoc->pays_code);
if ($pid2 == '-') $pid2=$langs->transcountry("ProfId2");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
print yn($conf->global->MAIN_PROFID2_IN_ADDRESS,1);
print '</td></tr>';
if (! $noCountryCode)
{
$pid2=$langs->transcountry("ProfId2",$mysoc->country_code);
if ($pid2 == '-') $pid2=false;
}
else
{
$pid2 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid2)
{
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid2.'</td><td>';
print yn($conf->global->MAIN_PROFID2_IN_ADDRESS,1);
print '</td></tr>';
}
// Show prof id 3 in address into pdf
$var=!$var;
$pid3=$langs->transcountry("ProfId3",$mysoc->pays_code);
if ($pid3 == '-') $pid3=$langs->transcountry("ProfId3");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
print yn($conf->global->MAIN_PROFID3_IN_ADDRESS,1);
print '</td></tr>';
if (! $noCountryCode)
{
$pid3=$langs->transcountry("ProfId3",$mysoc->country_code);
if ($pid3 == '-') $pid3=false;
}
else
{
$pid3 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid3)
{
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid3.'</td><td>';
print yn($conf->global->MAIN_PROFID3_IN_ADDRESS,1);
print '</td></tr>';
}
// Show prof id 4 in address into pdf
$var=!$var;
$pid4=$langs->transcountry("ProfId4",$mysoc->pays_code);
if ($pid4 == '-') $pid4=$langs->transcountry("ProfId4");
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
print yn($conf->global->MAIN_PROFID4_IN_ADDRESS,1);
print '</td></tr>';
if (! $noCountryCode)
{
$pid4=$langs->transcountry("ProfId4",$mysoc->country_code);
if ($pid4 == '-') $pid4=false;
}
else
{
$pid4 = img_warning().' <font class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("CompanyCountry")).'</font>';
}
if ($pid4)
{
print '<tr '.$bc[$var].'><td>'.$langs->trans("ShowProfIdInAddress").' - '.$pid4.'</td><td>';
print yn($conf->global->MAIN_PROFID4_IN_ADDRESS,1);
print '</td></tr>';
}
print '</table>'."\n";

View File

@ -83,6 +83,9 @@ if ($_GET["msg"])
print "\n";
}
$label=getStaticMember($db, 'label');
?>
<!-- Dump of a server -->
@ -99,7 +102,7 @@ if ($_GET["msg"])
<div id="div_container_exportoptions">
<fieldset id="exportoptions"><legend><?php echo $langs->trans("ExportMethod"); ?></legend>
<?php
if ($db::$label == 'MySQL')
if ($label == 'MySQL')
{
?>
<div class="formelementrow"><input type="radio" name="what" value="mysql" id="radio_dump_mysql" />
@ -112,7 +115,7 @@ if ($_GET["msg"])
<?php
}
}
else if ($db::$label == 'PostgreSQL')
else if ($label == 'PostgreSQL')
{
?>
<div class="formelementrow"><input type="radio" name="what" value="postgresql" id="radio_dump_postgresql" />
@ -122,7 +125,7 @@ if ($_GET["msg"])
}
else
{
print 'No method available with database '.$db::$label;
print 'No method available with database '.$label;
}
?>
</fieldset>
@ -134,7 +137,7 @@ if ($_GET["msg"])
<div id="div_container_sub_exportoptions">
<?php
if ($db::$label == 'MySQL')
if ($label == 'MySQL')
{
?> <!-- Fieldset mysqldump -->
<fieldset id="mysql_options"><legend><?php echo $langs->trans("MySqlExportParameters"); ?></legend>
@ -217,7 +220,7 @@ if ($_GET["msg"])
<?php
}
if ($db::$label == 'PostgreSQL')
if ($label == 'PostgreSQL')
{
?> <!-- Fieldset pg_dump -->
<fieldset id="postgresql_options"><legend><?php echo $langs->trans("PostgreSqlExportParameters"); ?></legend>
@ -281,8 +284,8 @@ if ($_GET["msg"])
id="filename_template"
value="<?php
$prefix='dump';
if ($db::$label == 'MySQL') $prefix='mysqldump';
if ($db::$label == 'PostgreSQL') $prefix='pg_dump';
if ($label == 'MySQL') $prefix='mysqldump';
if ($label == 'PostgreSQL') $prefix='pg_dump';
$file=$prefix.'_'.$dolibarr_main_db_name.'_'.dol_sanitizeFileName(DOL_VERSION).'_'.strftime("%Y%m%d%H%M").'.sql';
echo $file;
?>" /> <br>
@ -296,7 +299,7 @@ $compression=array(
// 'zip' => array('function' => 'zip_open', 'id' => 'radio_compression_zip', 'label' => $langs->trans("Zip")), Not open source
'gz' => array('function' => 'gzopen', 'id' => 'radio_compression_gzip', 'label' => $langs->trans("Gzip")),
);
if ($db::$label == 'MySQL')
if ($label == 'MySQL')
{
$compression['bz']=array('function' => 'bzopen', 'id' => 'radio_compression_bzip', 'label' => $langs->trans("Bzip2"));
}
@ -339,10 +342,10 @@ print "\n";
</form>
<?php
$result=$formfile->show_documents('systemtools','backup',$conf->admin->dir_output.'/backup',$_SERVER['PHP_SELF'],0,1,'',1,0,0,54,0,'',$langs->trans("PreviousDumpFiles"));
//if ($result) print '<br><br>';
llxFooter();
$db->close();
?>

View File

@ -58,6 +58,8 @@ print $langs->trans("RestoreDesc",DOL_DATA_ROOT).'<br><br>';
print $langs->trans("RestoreDesc2",DOL_DATA_ROOT).'<br><br>';
print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'<br><br>';
$label=getStaticMember($db, 'label');
?>
<fieldset id="fieldsetexport">
@ -69,7 +71,7 @@ print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'<br><br>';
<fieldset id="exportoptions">
<legend><?php echo $langs->trans("ImportMethod"); ?></legend>
<?php
if ($db::$label == 'MySQL')
if ($label == 'MySQL')
{
?>
<div class="formelementrow">
@ -78,7 +80,7 @@ print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'<br><br>';
</div>
<?php
}
else if ($db::$label == 'PostgreSQL')
else if ($label == 'PostgreSQL')
{
?>
<div class="formelementrow">
@ -89,7 +91,7 @@ print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'<br><br>';
}
else
{
print 'No method available with database '.$db::$label;
print 'No method available with database '.$label;
}
?>
</fieldset>
@ -101,7 +103,7 @@ print $langs->trans("RestoreDesc3",DOL_DATA_ROOT).'<br><br>';
<div id="div_container_sub_exportoptions">
<?php
if ($db::$label == 'MySQL')
if ($label == 'MySQL')
{
?>
<fieldset id="mysql_options">
@ -135,7 +137,7 @@ if ($db::$label == 'MySQL')
</fieldset>
<?php
}
else if ($db::$label == 'PostgreSQL')
else if ($label == 'PostgreSQL')
{
?>
<fieldset id="postgresql_options">
@ -180,8 +182,7 @@ else if ($db::$label == 'PostgreSQL')
</fieldset>
<?php
llxFooter();
$db->close();
llxFooter();
?>

View File

@ -394,7 +394,7 @@ function backup_tables($outputfile, $tables='*')
// Print headers and global mysql config vars
$sqlhead = '';
$sqlhead .= "-- ".$db::$label." dump via php
$sqlhead .= "-- ".getStaticMember($db, 'label')." dump via php
--
-- Host: ".$db->db->host_info." Database: ".$db->database_name."
-- ------------------------------------------------------

View File

@ -3528,14 +3528,15 @@ class Form
/**
* Return an html string with a select combo box to choose yes or no
* Return an html string with a select combo box to choose yes or no
*
* @param name Name of html select field
* @param value Pre-selected value
* @param option 0 return yes/no, 1 return 1/0
* @return int or string See option
* @param string $name Name of html select field
* @param string $value Pre-selected value
* @param int $option 0 return yes/no, 1 return 1/0
* @param bool $disabled true or false
* @return mixed See option
*/
function selectyesno($htmlname,$value='',$option=0)
function selectyesno($htmlname,$value='',$option=0,$disabled=false)
{
global $langs;
@ -3546,8 +3547,10 @@ class Form
$yes="1";
$no="0";
}
$disabled = ($disabled ? ' disabled="disabled"' : '');
$resultyesno = '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'">'."\n";
$resultyesno = '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.$disabled.'>'."\n";
if (("$value" == 'yes') || ($value == 1))
{
$resultyesno .= '<option value="'.$yes.'" selected="selected">'.$langs->trans("Yes").'</option>'."\n";

View File

@ -145,6 +145,33 @@ if (! function_exists('json_decode'))
}
}
/**
* Function to return value of a static property when class
* name is dynamically defined (not hard coded).
* This is because $myclass::$myvar works from PHP 5.3.0+ only
*
* @param string $class Class name
* @param string $member Name of property
* @return string Return value of static property.
*/
function getStaticMember($class, $member)
{
if (is_object($class)) $class = get_class($class);
$classObj = new ReflectionClass($class);
$result = null;
foreach($classObj->getStaticProperties() as $prop => $value)
{
if($prop == $member)
{
$result = $value;
break;
}
}
return $result;
}
/**
* Return a DoliDB instance (database handler).
@ -3522,10 +3549,10 @@ function picto_required()
/**
* Clean a string from all HTML tags and entities
*
* @param StringHtml String to clean
* @param removelinefeed Replace also all lines feeds by a space
* @param pagecodeto Encoding of input string
* @return string String cleaned
* @param string $StringHtml String to clean
* @param string $removelinefeed Replace also all lines feeds by a space
* @param string $pagecodeto Encoding of input string
* @return string String cleaned
*/
function dol_string_nohtmltag($StringHtml,$removelinefeed=1,$pagecodeto='UTF-8')
{
@ -3549,10 +3576,10 @@ function dol_string_nohtmltag($StringHtml,$removelinefeed=1,$pagecodeto='UTF-8')
/**
* Replace CRLF in string with a HTML BR tag
*
* @param stringtoencode String to encode
* @param nl2brmode 0=Adding br before \n, 1=Replacing \n by br
* @param forxml false=Use <br>, true=Use <br />
* @return string String encoded
* @param string $stringtoencode String to encode
* @param string $nl2brmode 0=Adding br before \n, 1=Replacing \n by br
* @param string $forxml false=Use <br>, true=Use <br />
* @return string String encoded
*/
function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false)
{
@ -3583,6 +3610,7 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false)
* @param string $stringtoencode String to encode
* @param int $nl2brmode 0=Adding br before \n, 1=Replacing \n by br (for use with FPDF writeHTMLCell function for example)
* @param string $pagecodefrom Pagecode stringtoencode is encoded
* @return string String encoded
*/
function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8')
{
@ -3608,8 +3636,9 @@ function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8')
/**
* This function is called to decode a HTML string (it decodes entities and br tags)
*
* @param stringtodecode String to decode
* @param pagecodeto Page code for result
* @param string $stringtodecode String to decode
* @param string $pagecodeto Page code for result
* @return string String decoded
*/
function dol_htmlentitiesbr_decode($stringtodecode,$pagecodeto='UTF-8')
{
@ -3624,7 +3653,8 @@ function dol_htmlentitiesbr_decode($stringtodecode,$pagecodeto='UTF-8')
/**
* This function remove all ending \n and br at end
*
* @param stringtodecode String to decode
* @param string $stringtodecode String to decode
* @return string String decoded
*/
function dol_htmlcleanlastbr($stringtodecode)
{
@ -3635,9 +3665,9 @@ function dol_htmlcleanlastbr($stringtodecode)
/**
* This function is called to decode a string with HTML entities (it decodes entities tags)
*
* @param stringhtml stringhtml
* @param pagecodeto Encoding of input string
* @return string decodestring
* @param string $stringhtml stringhtml
* @param string $pagecodeto Encoding of input string
* @return string decodestring
*/
function dol_entity_decode($stringhtml,$pagecodeto='UTF-8')
{
@ -3648,10 +3678,10 @@ function dol_entity_decode($stringhtml,$pagecodeto='UTF-8')
/**
* Replace html_entity_decode functions to manage errors
*
* @param a
* @param b
* @param c
* @return string String decoded
* @param string $a Operand a
* @param string $b Operand b
* @param string $c Operand c
* @return string String decoded
*/
function dol_html_entity_decode($a,$b,$c)
{
@ -3663,10 +3693,10 @@ function dol_html_entity_decode($a,$b,$c)
/**
* Replace htmlentities functions to manage errors
*
* @param a
* @param b
* @param c
* @return string String encoded
* @param string $a Operand a
* @param string $b Operand b
* @param string $c Operand c
* @return string String encoded
*/
function dol_htmlentities($a,$b,$c)
{
@ -3681,8 +3711,8 @@ function dol_htmlentities($a,$b,$c)
* If not, it will we considered not HTML encoded even if it is by FPDF.
* Example, if string contains euro symbol that has ascii code 128
*
* @param s String to check
* @return int 0 if bad iso, 1 if good iso
* @param string $s String to check
* @return int 0 if bad iso, 1 if good iso
*/
function dol_string_is_good_iso($s)
{
@ -3915,8 +3945,8 @@ function get_date_range($date_start,$date_end,$format = '',$outputlangs='')
* @param int $keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify)
* @return string Return html output
*
* @see dol_print_error
* @see dol_htmloutput_errors
* @see dol_print_error
* @see dol_htmloutput_errors
*/
function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepembedded=0)
{
@ -3997,8 +4027,8 @@ function get_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb
* @param int $keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify)
* @return string Return html output
*
* @see dol_print_error
* @see dol_htmloutput_mesg
* @see dol_print_error
* @see dol_htmloutput_mesg
*/
function get_htmloutput_errors($mesgstring='', $mesgarray='', $keepembedded=0)
{
@ -4014,8 +4044,8 @@ function get_htmloutput_errors($mesgstring='', $mesgarray='', $keepembedded=0)
* @param int $keepembedded Set to 1 if message must be kept embedded into its html place (this disable jnotify)
* @return void
*
* @see dol_print_error
* @see dol_htmloutput_errors
* @see dol_print_error
* @see dol_htmloutput_errors
*/
function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepembedded=0)
{
@ -4064,8 +4094,8 @@ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb
* @param int $keepembedded Set to 1 in error message must be kept embedded into its html place (this disable jnotify)
* @return void
*
* @see dol_print_error
* @see dol_htmloutput_mesg
* @see dol_print_error
* @see dol_htmloutput_mesg
*/
function dol_htmloutput_errors($mesgstring='', $mesgarray='', $keepembedded=0)
{
@ -4229,8 +4259,8 @@ function verifCond($strRights)
* Replace eval function to add more security.
* This function is called by verifCond()
*
* @param string $s
* @return void
* @param string $s String to evaluate
* @return mixed Result of eval
*/
function dol_eval($s)
{

View File

@ -192,7 +192,7 @@ if (! defined('ODTPHP_PATHTOPCLZIP')) { define('ODTPHP_PATHTOPCLZIP', (!isset(
if (! defined('ARTICHOW_PATH')) { define('ARTICHOW_PATH', (!isset($dolibarr_lib_ARTICHOW))?DOL_DOCUMENT_ROOT.'/includes/artichow/':(empty($dolibarr_lib_ARTICHOW)?'':$dolibarr_lib_ARTICHOW.'/')); }
// Other required path
if (! defined('ARTICHOW_FONT')) { define('ARTICHOW_FONT', (!isset($dolibarr_font_DOL_DEFAULT_TTF_BOLD))?DOL_DOCUMENT_ROOT.'/includes/fonts':dirname($dolibarr_font_DOL_DEFAULT_TTF_BOLD)); }
if (! defined('ARTICHOW_FONT_NAMES')) { define('ARTICHOW_FONT_NAMES', (!isset($dolibarr_font_DOL_DEFAULT_TTF_BOLD))?'Tuffy,TuffyBold,TuffyBoldItalic,TuffyItalic':'DejaVuSans,DejaVuSans-Bold,DejaVuSans-BoldOblique,DejaVuSans-Oblique'); }
if (! defined('ARTICHOW_FONT_NAMES')) { define('ARTICHOW_FONT_NAMES', (!isset($dolibarr_font_DOL_DEFAULT_TTF_BOLD))?'Aerial,AerialBd,AerialBdIt,AerialIt':'DejaVuSans,DejaVuSans-Bold,DejaVuSans-BoldOblique,DejaVuSans-Oblique'); }
if (! defined('DOL_DEFAULT_TTF')) { define('DOL_DEFAULT_TTF', (!isset($dolibarr_font_DOL_DEFAULT_TTF))?DOL_DOCUMENT_ROOT.'/includes/fonts/Aerial.ttf':(empty($dolibarr_font_DOL_DEFAULT_TTF)?'':$dolibarr_font_DOL_DEFAULT_TTF)); }
if (! defined('DOL_DEFAULT_TTF_BOLD')) { define('DOL_DEFAULT_TTF_BOLD', (!isset($dolibarr_font_DOL_DEFAULT_TTF_BOLD))?DOL_DOCUMENT_ROOT.'/includes/fonts/AerialBd.ttf':(empty($dolibarr_font_DOL_DEFAULT_TTF_BOLD)?'':$dolibarr_font_DOL_DEFAULT_TTF_BOLD)); }
// Old path to root deprecated (no more used).

View File

@ -73,10 +73,10 @@ define('ARTICHOW_DEPRECATED', TRUE);
// DOL_CHANGE LDR
if (defined('ARTICHOW_FONT_NAMES')) $fonts=explode(',',constant('ARTICHOW_FONT_NAMES'));
else $fonts = array(
'Tuffy',
'TuffyBold',
'TuffyBoldItalic',
'TuffyItalic'
'Aerial',
'AerialBd',
'AerialBdIt',
'AerialIt'
);
global $artichow_defaultfont;
$artichow_defaultfont=$fonts[0];

View File

@ -122,11 +122,12 @@ class awAntiSpam extends awImage {
*/
public function draw() {
// We redefine $fonts here because we need a full path to font
$fonts = array(
ARTICHOW_FONT.DIRECTORY_SEPARATOR.'Tuffy.ttf',
ARTICHOW_FONT.DIRECTORY_SEPARATOR.'TuffyBold.ttf',
ARTICHOW_FONT.DIRECTORY_SEPARATOR.'TuffyItalic.ttf',
ARTICHOW_FONT.DIRECTORY_SEPARATOR.'TuffyBoldItalic.ttf'
ARTICHOW_FONT.DIRECTORY_SEPARATOR.'Aerial.ttf',
ARTICHOW_FONT.DIRECTORY_SEPARATOR.'AerialBd.ttf',
ARTICHOW_FONT.DIRECTORY_SEPARATOR.'AerialBdIt.ttf',
ARTICHOW_FONT.DIRECTORY_SEPARATOR.'AerialIt.ttf'
);
$sizes = array(12, 12.5, 13, 13.5, 14, 15, 16, 17, 18, 19);

Binary file not shown.

Binary file not shown.

View File

@ -284,8 +284,8 @@ if (! empty($force_install_message))
include_once($dir."/".$file);
// Version min of database
$versionbasemin=$class::$versionmin;
$note='('.$class::$label.' >= '.versiontostring($versionbasemin).')';
$versionbasemin=getStaticMember($class, 'versionmin');
$note='('.getStaticMember($class, 'label').' >= '.versiontostring($versionbasemin).')';
// Switch to mysql if mysqli is not present
if ($defaultype=='mysqli' && !function_exists('mysqli_connect')) $defaultype = 'mysql';

View File

@ -200,6 +200,16 @@ INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, act
-- Regions Mexique (id country=154)
insert into llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) values (15401, 154, 15401, '', 0, 'Mexique', 1);
-- Regions Barbados (id country=46)
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (4601, 46, 4601, '', 0, 'Barbados', 1);
-- Regions Venezuela (id country=232)
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23201, 232, 23201, '', 0, 'Los Andes', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23202, 232, 23202, '', 0, 'Capital', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23203, 232, 23203, '', 0, 'Central', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23204, 232, 23204, '', 0, 'Cento Occidental', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23205, 232, 23205, '', 0, 'Guayana', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23206, 232, 23206, '', 0, 'Insular', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23207, 232, 23207, '', 0, 'Los Llanos', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23208, 232, 23208, '', 0, 'Nor-Oriental', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23209, 232, 23209, '', 0, 'Zuliana', 1);

View File

@ -644,3 +644,30 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SP', 4601, 'Speightstown', 0, 'SP', 'Saint Peter', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('SC', 4601, 'Crane', 0, 'SC', 'Saint Philip', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('ST', 4601, 'Hillaby', 0, 'ST', 'Saint Thomas', 1);
-- Provinces Venezuela (id country=232)
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-L', 23201, '', 0, 'VE-L', 'Mérida', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-T', 23201, '', 0, 'VE-T', 'Trujillo', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-E', 23201, '', 0, 'VE-E', 'Barinas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-M', 23202, '', 0, 'VE-M', 'Miranda', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-W', 23202, '', 0, 'VE-W', 'Vargas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-A', 23202, '', 0, 'VE-A', 'Distrito Capital', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-D', 23203, '', 0, 'VE-D', 'Aragua', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-G', 23203, '', 0, 'VE-G', 'Carabobo', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-I', 23204, '', 0, 'VE-I', 'Falcón', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-K', 23204, '', 0, 'VE-K', 'Lara', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-U', 23204, '', 0, 'VE-U', 'Yaracuy', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-F', 23205, '', 0, 'VE-F', 'Bolívar', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-X', 23205, '', 0, 'VE-X', 'Amazonas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-Y', 23205, '', 0, 'VE-Y', 'Delta Amacuro', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-O', 23206, '', 0, 'VE-O', 'Nueva Esparta', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-Z', 23206, '', 0, 'VE-Z', 'Dependencias Federales', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-C', 23207, '', 0, 'VE-C', 'Apure', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-J', 23207, '', 0, 'VE-J', 'Guárico', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-H', 23207, '', 0, 'VE-H', 'Cojedes', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-P', 23207, '', 0, 'VE-P', 'Portuguesa', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-B', 23208, '', 0, 'VE-B', 'Anzoátegui', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-N', 23208, '', 0, 'VE-N', 'Monagas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-R', 23208, '', 0, 'VE-R', 'Sucre', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-V', 23209, '', 0, 'VE-V', 'Zulia', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-S', 23209, '', 0, 'VE-S', 'Táchira', 1);

View File

@ -88,4 +88,4 @@ insert into llx_c_currencies ( code, code_iso, active, label ) values ( 'LK', 'L
insert into llx_c_currencies ( code, code_iso, active, label ) values ( 'MU', 'MUR', 1, 'Roupies mauritiennes');
insert into llx_c_currencies ( code, code_iso, active, label ) values ( 'SR', 'SAR', 1, 'Saudi riyal');
insert into llx_c_currencies ( code, code_iso, active, label ) VALUES ( 'MX', 'MXP', 1, 'Pesos Mexicans');
insert into llx_c_currencies ( code, code_iso, active, label ) VALUES ( 'VE', 'VEF', 1, 'Venezuelan Bolívar');

View File

@ -243,3 +243,7 @@ INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (46
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (462,46, '15','0','VAT 15%',1);
INSERT INTO llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) VALUES (463,46, '7.5','0','VAT 7.5%',1);
-- VENEZUELA (id country=232)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2321,232, '0','0','No VAT',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2322,232, '12','0','VAT 12%',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2323,232, '8','0','VAT 8%',1);

View File

@ -119,3 +119,47 @@ ALTER TABLE llx_societe ADD COLUMN fk_barcode_type integer DEFAULT 0;
UPDATE llx_menu SET leftmenu = NULL where leftmenu in ('', '0', '1');
-- Regions Venezuela (id country=232)
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23201, 232, 23201, '', 0, 'Los Andes', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23202, 232, 23202, '', 0, 'Capital', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23203, 232, 23203, '', 0, 'Central', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23204, 232, 23204, '', 0, 'Cento Occidental', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23205, 232, 23205, '', 0, 'Guayana', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23206, 232, 23206, '', 0, 'Insular', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23207, 232, 23207, '', 0, 'Los Llanos', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23208, 232, 23208, '', 0, 'Nor-Oriental', 1);
INSERT INTO llx_c_regions (rowid, fk_pays, code_region, cheflieu, tncc, nom, active) VALUES (23209, 232, 23209, '', 0, 'Zuliana', 1);
-- Provinces Venezuela (id country=232)
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-L', 23201, '', 0, 'VE-L', 'Mérida', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-T', 23201, '', 0, 'VE-T', 'Trujillo', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-E', 23201, '', 0, 'VE-E', 'Barinas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-M', 23202, '', 0, 'VE-M', 'Miranda', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-W', 23202, '', 0, 'VE-W', 'Vargas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-A', 23202, '', 0, 'VE-A', 'Distrito Capital', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-D', 23203, '', 0, 'VE-D', 'Aragua', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-G', 23203, '', 0, 'VE-G', 'Carabobo', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-I', 23204, '', 0, 'VE-I', 'Falcón', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-K', 23204, '', 0, 'VE-K', 'Lara', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-U', 23204, '', 0, 'VE-U', 'Yaracuy', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-F', 23205, '', 0, 'VE-F', 'Bolívar', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-X', 23205, '', 0, 'VE-X', 'Amazonas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-Y', 23205, '', 0, 'VE-Y', 'Delta Amacuro', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-O', 23206, '', 0, 'VE-O', 'Nueva Esparta', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-Z', 23206, '', 0, 'VE-Z', 'Dependencias Federales', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-C', 23207, '', 0, 'VE-C', 'Apure', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-J', 23207, '', 0, 'VE-J', 'Guárico', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-H', 23207, '', 0, 'VE-H', 'Cojedes', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-P', 23207, '', 0, 'VE-P', 'Portuguesa', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-B', 23208, '', 0, 'VE-B', 'Anzoátegui', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-N', 23208, '', 0, 'VE-N', 'Monagas', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-R', 23208, '', 0, 'VE-R', 'Sucre', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-V', 23209, '', 0, 'VE-V', 'Zulia', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('VE-S', 23209, '', 0, 'VE-S', 'Táchira', 1);
-- Currency Venezuela
insert into llx_c_currencies ( code, code_iso, active, label ) VALUES ( 'VE', 'VEF', 1, 'Venezuelan Bolívar');
-- VENEZUELA (id country=232)
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2321,232, '0','0','No VAT',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2322,232, '12','0','VAT 12%',1);
insert into llx_c_tva(rowid,fk_pays,taux,recuperableonly,note,active) values (2323,232, '8','0','VAT 8%',1);

View File

@ -248,10 +248,12 @@ Bytes=Bytes
KiloBytes=Kilobytes
MegaBytes=Megabytes
GigaBytes=Gigabytes
TeraBytes=Terabytes
b=b.
Kb=Kb
Mb=Mb
Gb=Gb
Tb=Tb
Cut=Tallar
Copy=Copiar
Paste=Pegar
@ -599,6 +601,8 @@ IM=Missatgeria instantània
NewAttribute=Nou atribut
AttributeCode=Codi atribut
OptionalFieldsSetup=Configuració dels atributs opcionals
URLPhoto=Url de la foto/logo
SetLinkToThirdParty=Vincular a un altre tercer
CreateDraft=Crea esborrany
ClickToEdit=Clic per a editar

View File

@ -1105,6 +1105,8 @@ LDAPDescValues=Example values are designed for <b>OpenLDAP</b> with following lo
ForANonAnonymousAccess=For an authenticated acces (for a write access for example)
##### Products #####
ProductSetup=Products module setup
ServiceSetup=Services module setup
ProductServiceSetup=Products and Services modules setup
NumberOfProductShowInSelect=Max number of products in combos select lists (0=no limit)
ConfirmDeleteProductLineAbility=Confirmation when removing product lines in forms
ModifyProductDescAbility=Personalization of product descriptions in forms

View File

@ -602,6 +602,7 @@ NewAttribute=New attribute
AttributeCode=Attribute code
OptionalFieldsSetup=Extra attributes setup
URLPhoto=Url of photo/logo
SetLinkToThirdParty=Link to another third party
CreateDraft=Create draft
ClickToEdit=Click to edit

View File

@ -248,10 +248,12 @@ Bytes=Bytes
KiloBytes=Kilobytes
MegaBytes=Megabytes
GigaBytes=Gigabytes
TeraBytes=Terabytes
b=b.
Kb=Kb
Mb=Mb
Gb=Gb
Tb=Tb
Cut=Cortar
Copy=Copiar
Paste=Pegar
@ -599,6 +601,8 @@ IM=Mensajería instantánea
NewAttribute=Nuevo atributo
AttributeCode=Código atributo
OptionalFieldsSetup=Configuración de los atributos opcionales
URLPhoto=Url de la foto/logo
SetLinkToThirdParty=Vincular a otro tercero
CreateDraft=Crear borrador
ClickToEdit=Clic para editar

View File

@ -1111,8 +1111,10 @@ LDAPDescGroups= Cette page permet de définir le nom des attributs de l'arbre LD
LDAPDescMembers= Cette page permet de définir le nom des attributs de l'arbre LDAP pour chaque information des membres du module adhérents Dolibarr.
LDAPDescValues= Les valeurs exemples sont adaptées à <b>OpenLDAP</b> avec les schémas suivant chargés: <b>core.schema, cosine.schema, inetorgperson.schema</b>). Si vous utilisez les valeurs suggérées et OpenLDAP, modifiez votre fichier de configuration LDAP <b>slapd.conf</b> pour avoir tous ces schémas actifs.
ForANonAnonymousAccess= Pour un accès authentifié (pour accès en écriture par exemple)
##### Products #####
##### Products/Services #####
ProductSetup= Configuration du module Produits
ServiceSetup= Configuration du module Services
ProductServiceSetup= Configuration des modules Produits et Services
NumberOfProductShowInSelect= Nombre de produits max dans les listes déroulantes (0=aucune limite)
ConfirmDeleteProductLineAbility= Confirmation de suppression d'une ligne produit dans les formulaires
ModifyProductDescAbility= Personnalisation des descriptions produits dans les formulaires

View File

@ -602,6 +602,7 @@ NewAttribute=Nouvel attribut
AttributeCode=Code de l'attribut
OptionalFieldsSetup=Configuration des attributs complémentaires
URLPhoto=Url vers photo/logo
SetLinkToThirdParty=Lier vers un autre tiers
CreateDraft=Créer brouillon
ClickToEdit=Cliquer ici pour éditer

View File

@ -1,9 +1,9 @@
<?php
/* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2006-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007 Auguria SARL <info@auguria.org>
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
*
* This program is free software; you can redistribute it and/or modify
@ -31,6 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/core/class/html.formbarcode.class.php");
$langs->load("admin");
$langs->load("products");
// Security check
if (! $user->admin) accessforbidden();
@ -91,11 +92,11 @@ if($action)
if (! $error)
{
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
$mesg = '<font class="ok">'.$langs->trans("SetupSaved").'</font>';
}
else
{
$mesg = "<font class=\"error\">".$langs->trans("Error")."</font>";
$mesg = '<font class="error">'.$langs->trans("Error").'</font>';
}
}
@ -105,15 +106,28 @@ if($action)
$formbarcode=new FormBarCode($db);
llxHeader('',$langs->trans("ProductSetup"));
$title = $langs->trans('ProductServiceSetup');
$tab = $langs->trans("ProductsAndServices");
if (empty($conf->produit->enabled))
{
$title = $langs->trans('ServiceSetup');
$tab = $langs->trans('Services');
}
else if (empty($conf->service->enabled))
{
$title = $langs->trans('ProductSetup');
$tab = $langs->trans('Products');
}
llxHeader('',$title);
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("ProductSetup"),$linkback,'setup');
print_fiche_titre($title,$linkback,'setup');
$h = 0;
$head[$h][0] = DOL_URL_ROOT."/product/admin/produit.php";
$head[$h][1] = $langs->trans("Products");
$head[$h][1] = $tab;
$hselected=$h;
$h++;
@ -123,9 +137,9 @@ $form=new Form($db);
$var=true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print " <td>".$langs->trans("Parameters")."</td>\n";
print " <td align=\"right\" width=\"60\">".$langs->trans("Value")."</td>\n";
print " <td width=\"80\">&nbsp;</td></tr>\n";
print '<td>'.$langs->trans("Parameters").'</td>'."\n";
print '<td align="right" width="60">'.$langs->trans("Value").'</td>'."\n";
print '<td width="80">&nbsp;</td></tr>'."\n";
/*
* Formulaire parametres divers
@ -133,16 +147,16 @@ print " <td width=\"80\">&nbsp;</td></tr>\n";
// multiprix activation/desactivation
$var=!$var;
print "<form method=\"post\" action=\"produit.php\">";
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"multiprix\">";
print "<tr ".$bc[$var].">";
print '<input type="hidden" name="action" value="multiprix">';
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("MultiPricesAbility").'</td>';
print '<td width="60" align="right">';
print $form->selectyesno("activate_multiprix",$conf->global->PRODUIT_MULTIPRICES,1);
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td>";
print '</td>';
print '</tr>';
print '</form>';
@ -151,12 +165,12 @@ print '</form>';
if($conf->global->PRODUIT_MULTIPRICES)
{
$var=!$var;
print "<form method=\"post\" action=\"produit.php\">";
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"multiprix_num\">";
print "<tr ".$bc[$var].">";
print '<input type="hidden" name="action" value="multiprix_num">';
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("MultiPricesNumPrices").'</td>';
print "<td align=\"right\"><input size=\"3\" type=\"text\" class=\"flat\" name=\"value\" value=\"".$conf->global->PRODUIT_MULTIPRICES_LIMIT."\"></td>";
print '<td align="right"><input size="3" type="text" class="flat" name="value" value="'.$conf->global->PRODUIT_MULTIPRICES_LIMIT.'"></td>';
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '</tr>';
print '</form>';
@ -164,31 +178,31 @@ if($conf->global->PRODUIT_MULTIPRICES)
// sousproduits activation/desactivation
$var=!$var;
print "<form method=\"post\" action=\"produit.php\">";
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"sousproduits\">";
print "<tr ".$bc[$var].">";
print '<input type="hidden" name="action" value="sousproduits">';
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("AssociatedProductsAbility").'</td>';
print '<td width="60" align="right">';
print $form->selectyesno("activate_sousproduits",$conf->global->PRODUIT_SOUSPRODUITS,1);
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td>";
print '</td>';
print '</tr>';
print '</form>';
// utilisation formulaire Ajax sur choix produit
$var=!$var;
print "<form method=\"post\" action=\"produit.php\">";
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"usesearchtoselectproduct\">";
print "<tr ".$bc[$var].">";
print '<input type="hidden" name="action" value="usesearchtoselectproduct">';
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("UseSearchToSelectProduct").'</td>';
if (! $conf->use_javascript_ajax)
{
print '<td nowrap="nowrap" align="right" colspan="2">';
print $langs->trans("NotAvailableWhenAjaxDisabled");
print "</td>";
print '</td>';
}
else
{
@ -201,7 +215,7 @@ else
print $form->selectarray("activate_usesearchtoselectproduct",$arrval,$conf->global->PRODUIT_USE_SEARCH_TO_SELECT);
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td>";
print '</td>';
}
print '</tr>';
print '</form>';
@ -209,12 +223,12 @@ print '</form>';
if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT))
{
$var=!$var;
print "<form method=\"post\" action=\"produit.php\">";
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"nbprod\">";
print "<tr ".$bc[$var].">";
print '<input type="hidden" name="action" value="nbprod">';
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("NumberOfProductShowInSelect").'</td>';
print "<td align=\"right\"><input size=\"3\" type=\"text\" class=\"flat\" name=\"value\" value=\"".$conf->global->PRODUIT_LIMIT_SIZE."\"></td>";
print '<td align="right"><input size="3" type="text" class="flat" name="value" value="'.$conf->global->PRODUIT_LIMIT_SIZE.'"></td>';
print '<td align="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'"></td>';
print '</tr>';
print '</form>';
@ -222,36 +236,19 @@ if (empty($conf->global->PRODUIT_USE_SEARCH_TO_SELECT))
// Visualiser description produit dans les formulaires activation/desactivation
$var=!$var;
print "<form method=\"post\" action=\"produit.php\">";
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"viewProdDescInForm\">";
print "<tr ".$bc[$var].">";
print '<input type="hidden" name="action" value="viewProdDescInForm">';
print '<tr '.$bc[$var].'>';
print '<td>'.$langs->trans("ViewProductDescInFormAbility").'</td>';
print '<td width="60" align="right">';
print $form->selectyesno("activate_viewProdDescInForm",$conf->global->PRODUIT_DESC_IN_FORM,1);
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td>";
print '</td>';
print '</tr>';
print '</form>';
// Confirmation de suppression d'un ligne produit dans les formulaires activation/desactivation
/*
$var=!$var;
print "<form method=\"post\" action=\"produit.php\">";
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print "<input type=\"hidden\" name=\"action\" value=\"confirmDeleteProdLineInForm\">";
print "<tr ".$bc[$var].">";
print '<td>'.$langs->trans("ConfirmDeleteProductLineAbility").'</td>';
print '<td width="60" align="right">';
print $form->selectyesno("activate_confirmDeleteProdLineInForm",$conf->global->PRODUIT_CONFIRM_DELETE_LINE,1);
print '</td><td align="right">';
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
print "</td>";
print '</tr>';
print '</form>';
*/
if ($conf->global->PRODUCT_CANVAS_ABILITY)
{
// Add canvas feature

View File

@ -33,6 +33,7 @@ $langs->load("errors");
$langs->load("users");
$langs->load("companies");
$langs->load("ldap");
$langs->load("other");
// Security check
if ($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK)