forked from Wavyzz/dolibarr
Qual: Mutualize a lot of duplicate functions into functions.lib.php
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
* \file htdocs/adherents/admin/adherent.php
|
||||
* \ingroup member
|
||||
* \brief Page to setup the module Foundation
|
||||
* \version $Id: adherent.php,v 1.18 2011/08/03 00:45:42 eldy Exp $
|
||||
* \version $Id: adherent.php,v 1.19 2011/08/17 15:56:23 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -195,7 +195,7 @@ print '<br>';
|
||||
$var=!$var;
|
||||
if ($conf->global->ADHERENT_USE_MAILMAN)
|
||||
{
|
||||
$lien=img_tick().' ';
|
||||
$lien=img_picto($langs->trans("Active"),'tick').' ';
|
||||
$lien.='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_MAILMAN">'.$langs->trans("Disable").'</a>';
|
||||
// Edition des varibales globales
|
||||
$constantes=array('ADHERENT_MAILMAN_LISTS',
|
||||
@@ -238,7 +238,7 @@ else
|
||||
$var=!$var;
|
||||
if ($conf->global->ADHERENT_USE_SPIP)
|
||||
{
|
||||
$lien=img_tick().' ';
|
||||
$lien=img_picto($langs->trans("Active"),'tick').' ';
|
||||
$lien.='<a href="'.$_SERVER["PHP_SELF"].'?action=unset&value=0&name=ADHERENT_USE_SPIP">'.$langs->trans("Disable").'</a>';
|
||||
// Edition des varibales globales
|
||||
$constantes=array('ADHERENT_USE_SPIP_AUTO',
|
||||
@@ -331,7 +331,7 @@ $db->close();
|
||||
|
||||
print '<br>';
|
||||
|
||||
llxFooter('$Date: 2011/08/03 00:45:42 $ - $Revision: 1.18 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:23 $ - $Revision: 1.19 $');
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/admin/company.php
|
||||
* \ingroup company
|
||||
* \brief Setup page to configure company/foundation
|
||||
* \version $Id: company.php,v 1.94 2011/07/31 22:23:24 eldy Exp $
|
||||
* \version $Id: company.php,v 1.95 2011/08/17 15:56:23 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -715,7 +715,7 @@ else
|
||||
// On propose la generation de la vignette si elle n'existe pas
|
||||
if (!is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini) && preg_match('/(\.jpg|\.jpeg|\.png)$/i',$mysoc->logo))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_refresh($langs->trans('GenerateThumb')).' </a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=addthumb&file='.urlencode($mysoc->logo).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').' </a>';
|
||||
}
|
||||
else if ($mysoc->logo_mini && is_file($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_mini))
|
||||
{
|
||||
@@ -982,6 +982,6 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:24 $ - $Revision: 1.94 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:23 $ - $Revision: 1.95 $');
|
||||
|
||||
?>
|
||||
@@ -15,14 +15,14 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Id: fckeditor.php,v 1.33 2011/08/17 13:15:10 eldy Exp $
|
||||
* $Id: fckeditor.php,v 1.34 2011/08/17 15:56:23 eldy Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/fckeditor.php
|
||||
* \ingroup fckeditor
|
||||
* \brief Page d'activation du module FCKeditor dans les autres modules
|
||||
* \version $Revision: 1.33 $
|
||||
* \version $Revision: 1.34 $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -132,7 +132,7 @@ foreach($modules as $const => $desc)
|
||||
$constante = 'FCKEDITOR_ENABLE_'.$const;
|
||||
$value = $conf->global->$constante;
|
||||
|
||||
print $value == 1 ? img_tick() : ' ';
|
||||
print $value == 1 ? img_picto($langs->trans("Active"),'tick') : ' ';
|
||||
|
||||
print '</td>';
|
||||
print '<td align="center" width="100">';
|
||||
@@ -172,5 +172,5 @@ print $conf->global->FCKEDITOR_TEST;
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/17 13:15:10 $ - $Revision: 1.33 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:23 $ - $Revision: 1.34 $');
|
||||
?>
|
||||
@@ -21,7 +21,7 @@
|
||||
* \file htdocs/admin/perms.php
|
||||
* \ingroup core
|
||||
* \brief Page d'administration/configuration des permissions par defaut
|
||||
* \version $Id: perms.php,v 1.43 2011/08/01 12:53:37 hregis Exp $
|
||||
* \version $Id: perms.php,v 1.44 2011/08/17 15:56:23 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -194,8 +194,7 @@ if ($result)
|
||||
print '<td align="center">';
|
||||
if ($obj->bydefault == 1)
|
||||
{
|
||||
|
||||
print img_tick();
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
print '</td><td>';
|
||||
print '<a href="perms.php?pid='.$obj->id.'&action=remove#'.$objMod->getName().'">'.img_edit_remove().'</a>';
|
||||
}
|
||||
@@ -218,5 +217,5 @@ print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/01 12:53:37 $ - $Revision: 1.43 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:23 $ - $Revision: 1.44 $');
|
||||
?>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* \file htdocs/admin/security.php
|
||||
* \ingroup setup
|
||||
* \brief Page de configuration du module securite
|
||||
* \version $Id: security.php,v 1.56 2011/07/31 22:23:24 eldy Exp $
|
||||
* \version $Id: security.php,v 1.57 2011/08/17 15:56:23 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -268,8 +268,7 @@ foreach ($arrayhandler as $key => $module)
|
||||
print '<td width="100" align="center">';
|
||||
if ($conf->global->USER_PASSWORD_GENERATED == $key)
|
||||
{
|
||||
$title='';
|
||||
print img_tick($title);
|
||||
print img_picto('','tick');
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -302,7 +301,7 @@ print '<td colspan="3">'.$langs->trans("DoNotStoreClearPassword").'</td>';
|
||||
print '<td align="center" width="60">';
|
||||
if ($conf->global->DATABASE_PWD_ENCRYPTED)
|
||||
{
|
||||
print img_tick();
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
}
|
||||
print '</td>';
|
||||
if (! $conf->global->DATABASE_PWD_ENCRYPTED)
|
||||
@@ -336,7 +335,7 @@ print '<td colspan="3">'.$langs->trans("MainDbPasswordFileConfEncrypted").'</td>
|
||||
print '<td align="center" width="60">';
|
||||
if (preg_match('/crypted:/i',$dolibarr_main_db_pass) || ! empty($dolibarr_main_db_encrypted_pass))
|
||||
{
|
||||
print img_tick();
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
@@ -374,7 +373,7 @@ print '</td>';
|
||||
print '<td align="center" width="60">';
|
||||
if($conf->global->PDF_SECURITY_ENCRYPTION == 1)
|
||||
{
|
||||
print img_tick();
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
}
|
||||
|
||||
print '</td>';
|
||||
@@ -402,7 +401,7 @@ print '<td colspan="3">'.$langs->trans("DisableForgetPasswordLinkOnLogonPage").'
|
||||
print '<td align="center" width="60">';
|
||||
if($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK == 1)
|
||||
{
|
||||
print img_tick();
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
}
|
||||
print '</td>';
|
||||
if ($conf->global->MAIN_SECURITY_DISABLEFORGETPASSLINK == 0)
|
||||
@@ -431,5 +430,5 @@ print '</div>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:24 $ - $Revision: 1.56 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:23 $ - $Revision: 1.57 $');
|
||||
?>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* \file htdocs/admin/security_other.php
|
||||
* \ingroup core
|
||||
* \brief Security options setup
|
||||
* \version $Id: security_other.php,v 1.41 2011/07/31 22:23:22 eldy Exp $
|
||||
* \version $Id: security_other.php,v 1.42 2011/08/17 15:56:23 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -202,11 +202,11 @@ if (function_exists("imagecreatefrompng"))
|
||||
{
|
||||
if ($conf->global->MAIN_SECURITY_ENABLECAPTCHA == 0)
|
||||
{
|
||||
print '<a href="security_other.php?action=activate_captcha">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="security_other.php?action=activate_captcha">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
if($conf->global->MAIN_SECURITY_ENABLECAPTCHA == 1)
|
||||
{
|
||||
print '<a href="security_other.php?action=disable_captcha">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||
print '<a href="security_other.php?action=disable_captcha">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -227,11 +227,11 @@ print '<td colspan="3">'.$langs->trans("UseAdvancedPerms").'</td>';
|
||||
print '<td align="right">';
|
||||
if ($conf->global->MAIN_USE_ADVANCED_PERMS == 0)
|
||||
{
|
||||
print '<a href="security_other.php?action=activate_advancedperms">'.img_picto($langs->trans("Disabled"),'off').'</a>';
|
||||
print '<a href="security_other.php?action=activate_advancedperms">'.img_picto($langs->trans("Disabled"),'switch_off').'</a>';
|
||||
}
|
||||
if($conf->global->MAIN_USE_ADVANCED_PERMS == 1)
|
||||
{
|
||||
print '<a href="security_other.php?action=disable_advancedperms">'.img_picto($langs->trans("Enabled"),'on').'</a>';
|
||||
print '<a href="security_other.php?action=disable_advancedperms">'.img_picto($langs->trans("Enabled"),'switch_on').'</a>';
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
@@ -347,5 +347,5 @@ $formfile->form_attach_new_file(DOL_URL_ROOT.'/admin/security_other.php',$langs-
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:22 $ - $Revision: 1.41 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:23 $ - $Revision: 1.42 $');
|
||||
?>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/categories/photos.php
|
||||
* \ingroup category
|
||||
* \brief Gestion des photos d'une categorie
|
||||
* \version $Id: photos.php,v 1.13 2011/08/03 00:46:32 eldy Exp $
|
||||
* \version $Id: photos.php,v 1.14 2011/08/17 15:56:26 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -266,7 +266,7 @@ if (!empty($id) || !empty($ref))
|
||||
// On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites
|
||||
if (!$obj['photo_vignette'] && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i',$obj['photo']) && ($object->imgWidth > $maxWidth || $object->imgHeight > $maxHeight))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&action=addthumb&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">'.img_refresh($langs->trans('GenerateThumb')).' </a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&action=addthumb&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').' </a>';
|
||||
}
|
||||
if ($user->rights->categorie->creer)
|
||||
{
|
||||
@@ -304,5 +304,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/03 00:46:32 $ - $Revision: 1.13 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:26 $ - $Revision: 1.14 $');
|
||||
?>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
* \file htdocs/comm/action/rapport/index.php
|
||||
* \ingroup commercial
|
||||
* \brief Page with reports of actions
|
||||
* \version $Id: index.php,v 1.48 2011/08/03 00:46:36 eldy Exp $
|
||||
* \version $Id: index.php,v 1.49 2011/08/17 15:56:26 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../../main.inc.php");
|
||||
@@ -116,7 +116,7 @@ if ($resql)
|
||||
print '<td align="center">'.$obj->cc.'</td>';
|
||||
|
||||
print '<td>';
|
||||
print '<a href="index.php?action=builddoc&page='.$page.'&month='.$obj->month.'&year='.$obj->year.'">'.img_file_new().'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=builddoc&page='.$page.'&month='.$obj->month.'&year='.$obj->year.'">'.img_picto('','filenew').'</a>';
|
||||
print '</td>';
|
||||
|
||||
$name = "actions-".$obj->month."-".$obj->year.".pdf";
|
||||
@@ -150,5 +150,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/03 00:46:36 $ - $Revision: 1.48 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:26 $ - $Revision: 1.49 $');
|
||||
?>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* $Id: facturesrejets.php,v 1.13 2011/07/31 22:23:29 eldy Exp $
|
||||
* $Id: facturesrejets.php,v 1.14 2011/08/17 15:56:27 eldy Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -124,7 +124,7 @@ if ($result)
|
||||
print "<td>";
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">';
|
||||
print img_file();
|
||||
print img_picto('','file');
|
||||
print '</a> ';
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/facture.php?facid='.$obj->facid.'">'.$obj->facnumber."</a></td>\n";
|
||||
@@ -155,5 +155,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 22:23:29 $ - $Revision: 1.13 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:27 $ - $Revision: 1.14 $');
|
||||
?>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
* \file htdocs/core/class/html.form.class.php
|
||||
* \ingroup core
|
||||
* \brief File of class with all html predefined components
|
||||
* \version $Id: html.form.class.php,v 1.195 2011/08/12 21:29:29 eldy Exp $
|
||||
* \version $Id: html.form.class.php,v 1.196 2011/08/17 15:56:23 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ class Form
|
||||
// Info or help
|
||||
if ($type == 'info') $img=img_help(0,$alt);
|
||||
if ($type == 'help' || $type ==1) $img=img_help(1,$alt);
|
||||
if ($type == 'superadmin') $img=img_redstar($alt);
|
||||
if ($type == 'superadmin') $img=img_picto($alt,"redstar");
|
||||
if ($type == 'admin') $img=img_picto($alt,"star");
|
||||
// Warnings
|
||||
if ($type == 'warning') $img=img_warning($alt);
|
||||
@@ -3130,7 +3130,6 @@ class Form
|
||||
{
|
||||
$retstring.='<button class="dpInvisibleButtons" id="'.$prefix.'ButtonNow" type="button" name="_useless" value="Now" onClick="'.$reset_scripts.'">';
|
||||
$retstring.=$langs->trans("Now");
|
||||
//print img_refresh($langs->trans("Now"));
|
||||
$retstring.='</button> ';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* \file htdocs/core/class/interfaces.class.php
|
||||
* \ingroup core
|
||||
* \brief Fichier de la classe de gestion des triggers
|
||||
* \version $Id: interfaces.class.php,v 1.9 2011/07/31 23:45:13 eldy Exp $
|
||||
* \version $Id: interfaces.class.php,v 1.10 2011/08/17 15:56:22 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -267,7 +267,7 @@ class Interfaces
|
||||
$triggers[$j]['picto'] = $objMod->picto?img_object('',$objMod->picto):img_object('','generic');
|
||||
$triggers[$j]['file'] = $files[$key];
|
||||
$triggers[$j]['version'] = $objMod->getVersion();
|
||||
$triggers[$j]['status'] = img_tick();
|
||||
$triggers[$j]['status'] = img_picto($langs->trans("Active"),'tick');
|
||||
if ($disabledbyname > 0 || $disabledbymodule > 1) $triggers[$j]['status'] = " ";
|
||||
|
||||
$text ='<b>'.$langs->trans("Description").':</b><br>';
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* \file htdocs/ftp/index.php
|
||||
* \ingroup ftp
|
||||
* \brief Main page for FTP section area
|
||||
* \version $Id: index.php,v 1.24 2011/08/01 00:01:02 eldy Exp $
|
||||
* \version $Id: index.php,v 1.25 2011/08/17 15:56:27 eldy Exp $
|
||||
* \author Laurent Destailleur
|
||||
*/
|
||||
|
||||
@@ -572,7 +572,7 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=download&numero_ftp='.$numero_ftp.'§ion='.urlencode($section).'&file='.urlencode($file).'">'.img_file().'</a>';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=download&numero_ftp='.$numero_ftp.'§ion='.urlencode($section).'&file='.urlencode($file).'">'.img_picto('','file').'</a>';
|
||||
print ' ';
|
||||
print '<input type="checkbox" class="flat checkboxfordelete" id="check_'.$i.'" name="const['.$i.'][check]" value="1">';
|
||||
print ' ';
|
||||
@@ -624,7 +624,7 @@ if ($conn_id) ftp_close($conn_id);
|
||||
// End of page
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/01 00:01:02 $ - $Revision: 1.24 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:27 $ - $Revision: 1.25 $');
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* \file htdocs/imports/import.php
|
||||
* \ingroup import
|
||||
* \brief Pages of import Wizard
|
||||
* \version $Id: import.php,v 1.69 2011/07/31 23:46:39 eldy Exp $
|
||||
* \version $Id: import.php,v 1.70 2011/08/17 15:56:26 eldy Exp $
|
||||
*/
|
||||
|
||||
require_once("../main.inc.php");
|
||||
@@ -1326,7 +1326,7 @@ if ($step == 5 && $datatoimport)
|
||||
$db->rollback(); // We force rollback because this was just a simulation.
|
||||
|
||||
// Show OK
|
||||
if (! sizeof($arrayoferrors) && ! sizeof($arrayofwarnings)) print img_tick().' <b>'.$langs->trans("NoError").'</b><br><br>';
|
||||
if (! sizeof($arrayoferrors) && ! sizeof($arrayofwarnings)) print img_picto($langs->trans("OK"),'tick').' <b>'.$langs->trans("NoError").'</b><br><br>';
|
||||
else print $langs->trans("NbOfLinesOK",$nbok).'</b><br><br>';
|
||||
|
||||
// Show Errors
|
||||
@@ -1668,7 +1668,7 @@ print '<br>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:46:39 $ - $Revision: 1.69 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:26 $ - $Revision: 1.70 $');
|
||||
|
||||
|
||||
/*
|
||||
@@ -1707,7 +1707,6 @@ function show_elem($fieldssource,$i,$pos,$key,$var,$nostyle='')
|
||||
else // Print field of source file
|
||||
{
|
||||
print '<tr '.($nostyle?'':$bc[$var]).' height="20">';
|
||||
//print '<td width="16">'.img_file('','').'</td>';
|
||||
print '<td class="nocellnopadding" width="16" style="font-weight: normal">';
|
||||
// The image must have the class 'boxhandle' beause it's value used in DOM draggable objects to define the area used to catch the full object
|
||||
print img_picto($langs->trans("MoveField",$pos),'uparrow','class="boxhandle" style="cursor:move;"');
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* \file htdocs/lib/functions.lib.php
|
||||
* \brief A set of functions for Dolibarr
|
||||
* This file contains all frequently used functions.
|
||||
* \version $Id: functions.lib.php,v 1.554 2011/08/15 18:37:07 eldy Exp $
|
||||
* \version $Id: functions.lib.php,v 1.555 2011/08/17 15:56:24 eldy Exp $
|
||||
*/
|
||||
|
||||
// For compatibility during upgrade
|
||||
@@ -1501,6 +1501,7 @@ function dol_print_graph($htmlid,$width,$height,$data,$showlegend=0,$type='pie',
|
||||
* Truncate a string to a particular length adding '...' if string larger than length.
|
||||
* If length = max length+1, we do no truncate to avoid having just 1 char replaced with '...'.
|
||||
* MAIN_DISABLE_TRUNC=1 can disable all truncings
|
||||
*
|
||||
* @param string String to truncate
|
||||
* @param size Max string size. 0 for no limit.
|
||||
* @param trunc Where to trunc: right, left, middle, wrap
|
||||
@@ -1561,6 +1562,7 @@ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8')
|
||||
|
||||
/**
|
||||
* Show a picto called object_picto (generic function)
|
||||
*
|
||||
* @param alt Text of alt on image
|
||||
* @param picto Name of image to show object_picto (example: user, group, action, bill, contract, propal, product, ...)
|
||||
* For external modules use imagename@mymodule to search into directory "img" of module.
|
||||
@@ -1571,35 +1573,39 @@ function dol_trunc($string,$size=40,$trunc='right',$stringencoding='UTF-8')
|
||||
*/
|
||||
function img_object($alt, $picto, $options='', $pictoisfullpath=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
global $conf;
|
||||
|
||||
$path = 'theme/'.$conf->theme;
|
||||
$url = DOL_URL_ROOT;
|
||||
// Clean parameters
|
||||
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';
|
||||
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i',$picto,$regs))
|
||||
{
|
||||
$picto = $regs[1];
|
||||
$path = $regs[2];
|
||||
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';
|
||||
// If img file not into standard path, we use alternate path
|
||||
if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/object_'.$picto)) $url = DOL_URL_ROOT_ALT;
|
||||
}
|
||||
// Define fullpathpicto to use into src
|
||||
if (! empty($pictoisfullpath)) $fullpathpicto=$picto;
|
||||
else
|
||||
{
|
||||
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';
|
||||
// By default, we search into theme directory
|
||||
$url = DOL_URL_ROOT;
|
||||
$path = 'theme/'.$conf->theme;
|
||||
if (! empty($conf->global->MAIN_FORCETHEMEDIR)) $path=preg_replace('/^\//','',$conf->global->MAIN_FORCETHEMEDIR).'/'.$path;
|
||||
// If we ask an image into module/img (not into a theme path)
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i',$picto,$regs)) { $picto = $regs[1]; $path=$regs[2]; } // If image into a module/img path
|
||||
// If img file not into standard path, we use alternate path
|
||||
if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/object_'.$picto)) $url = DOL_URL_ROOT_ALT;
|
||||
|
||||
$fullpathpicto=$url.'/'.$path.'/img/object_'.$picto;
|
||||
}
|
||||
if ($pictoisfullpath) return '<img src="'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
||||
return '<img src="'.$url.'/'.$path.'/img/object_'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
||||
|
||||
return '<img src="'.$fullpathpicto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Show picto whatever it's its name (generic function)
|
||||
*
|
||||
* @param alt Text on alt and title of image
|
||||
* @param picto Name of image file to show (If no extension provided, we use '.png'). Image must be stored into img directory.
|
||||
* Example: picto.png if picto.png is stored into htdocs/theme/mytheme/img
|
||||
* Example: picto.png@mymodule if picto.png is stored into htdocs/mymodule/img
|
||||
* Example: /mydir/mysubdir/picto.png if picto.png is stored into htdocs/mydir/mysubdir (pictoisfullpath must be set to 1)
|
||||
* @param options Add more attribute on img tag
|
||||
* @param options Add more attribute on img tag (For example 'style="float: right"')
|
||||
* @param pictoisfullpath If 1, image path is a full path
|
||||
* @return string Return img tag
|
||||
* @see img_object, img_picto_common
|
||||
@@ -1608,28 +1614,31 @@ function img_picto($alt, $picto, $options='', $pictoisfullpath=0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
$path = 'theme/'.$conf->theme;
|
||||
$url = DOL_URL_ROOT;
|
||||
// Clean parameters
|
||||
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';
|
||||
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i',$picto,$regs))
|
||||
{
|
||||
$picto = $regs[1];
|
||||
$path = $regs[2];
|
||||
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';
|
||||
// If img file not into standard path, we use alternate path
|
||||
if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/'.$picto)) $url = DOL_URL_ROOT_ALT;
|
||||
}
|
||||
// Define fullpathpicto to use into src
|
||||
if (! empty($pictoisfullpath)) $fullpathpicto=$picto;
|
||||
else
|
||||
{
|
||||
if (! preg_match('/(\.png|\.gif)$/i',$picto)) $picto.='.png';
|
||||
// By default, we search into theme directory
|
||||
$url = DOL_URL_ROOT;
|
||||
$path = 'theme/'.$conf->theme;
|
||||
if (! empty($conf->global->MAIN_FORCETHEMEDIR)) $path=preg_replace('/^\//','',$conf->global->MAIN_FORCETHEMEDIR).'/'.$path;
|
||||
// If we ask an image into module/img (not into a theme path)
|
||||
if (preg_match('/^([^@]+)@([^@]+)$/i',$picto,$regs)) { $picto = $regs[1]; $path=$regs[2]; } // If image into a module/img path
|
||||
// If img file not into standard path, we use alternate path
|
||||
if (defined('DOL_URL_ROOT_ALT') && DOL_URL_ROOT_ALT && ! file_exists(DOL_DOCUMENT_ROOT.'/'.$path.'/img/'.$picto)) $url = DOL_URL_ROOT_ALT;
|
||||
|
||||
$fullpathpicto=$url.'/'.$path.'/img/'.$picto;
|
||||
}
|
||||
|
||||
if ($pictoisfullpath) return '<img src="'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
||||
return '<img src="'.$url.'/'.$path.'/img/'.$picto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
||||
return '<img src="'.$fullpathpicto.'" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"'.($options?' '.$options:'').'>';
|
||||
}
|
||||
|
||||
/**
|
||||
* Show picto (generic function)
|
||||
*
|
||||
* @param alt Text on alt and title of image
|
||||
* @param picto Name of image file to show (If no extension provided, we use '.png'). Image must be stored into htdocs/theme/common directory.
|
||||
* @param options Add more attribute on img tag
|
||||
@@ -1648,6 +1657,7 @@ function img_picto_common($alt, $picto, $options='', $pictoisfullpath=0)
|
||||
|
||||
/**
|
||||
* Show logo action
|
||||
*
|
||||
* @param alt Text for image alt and title
|
||||
* @param numaction Action to show
|
||||
* @return string Return an img tag
|
||||
@@ -1665,57 +1675,9 @@ function img_action($alt = "default", $numaction)
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/stcomm'.$numaction.'.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Affiche logo fichier
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
function img_file($alt = "default")
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Show");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/file.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo refresh
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
function img_refresh($alt = "default")
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Refresh");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/refresh.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo dossier
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
function img_folder($alt = "default")
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Dossier");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/folder.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo nouveau fichier
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
function img_file_new($alt = "default")
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Show");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/filenew.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo pdf
|
||||
* Show pdf logo
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @param $size Taille de l'icone : 3 = 16x16px , 2 = 14x14px
|
||||
* @return string Retourne tag img
|
||||
@@ -1728,7 +1690,8 @@ function img_pdf($alt = "default",$size=3)
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo +
|
||||
* Show logo +
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
@@ -1736,10 +1699,11 @@ function img_edit_add($alt = "default")
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Add");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/edit_add.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
return img_picto($alt,'edit_add.png');
|
||||
}
|
||||
/**
|
||||
* Affiche logo -
|
||||
* Show logo -
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
@@ -1747,11 +1711,12 @@ function img_edit_remove($alt = "default")
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Remove");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/edit_remove.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
return img_picto($alt,'edit_remove.png');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo editer/modifier fiche
|
||||
* Show logo editer/modifier fiche
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @param float Si il faut y mettre le style "float: right"
|
||||
* @param other Add more attributes on img
|
||||
@@ -1769,7 +1734,8 @@ function img_edit($alt = "default", $float=0, $other='')
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo voir fiche
|
||||
* Show logo view card
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @param float Si il faut y mettre le style "float: right"
|
||||
* @param other Add more attributes on img
|
||||
@@ -1788,6 +1754,7 @@ function img_view($alt = "default", $float=0, $other='')
|
||||
|
||||
/**
|
||||
* Show delete logo
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
@@ -1795,12 +1762,13 @@ function img_delete($alt = "default")
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Delete");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/delete.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
return img_picto($alt,'delete.png');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Show help logo with cursor "?"
|
||||
*
|
||||
* @param usehelpcursor
|
||||
* @param usealttitle Texte to use as alt title
|
||||
* @return string Retourne tag img
|
||||
@@ -1823,6 +1791,7 @@ function img_help($usehelpcursor=1,$usealttitle=1)
|
||||
|
||||
/**
|
||||
* Affiche logo info
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
@@ -1830,11 +1799,12 @@ function img_info($alt = "default")
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Informations");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/info.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
return img_picto($alt,'info.png');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo warning
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @param float Si il faut afficher le style "float: right"
|
||||
* @return string Retourne tag img
|
||||
@@ -1843,32 +1813,12 @@ function img_warning($alt = "default",$float=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Warning");
|
||||
$img='<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/warning.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"';
|
||||
if ($float) $img.=' style="float: right"';
|
||||
$img.='>';
|
||||
|
||||
return $img;
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo redstar
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @param float Si il faut afficher le style "float: right"
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
function img_redstar($alt = "default",$float=0)
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("SuperAdministrator");
|
||||
$img='<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/redstar.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'"';
|
||||
if ($float) $img.=' style="float: right"';
|
||||
$img.='>';
|
||||
|
||||
return $img;
|
||||
return img_picto($alt,'warning.png',$float?'style="float: right"':'');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo error
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
@@ -1876,11 +1826,12 @@ function img_error($alt = "default")
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Error");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/error.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
return img_picto($alt,'error.png');
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo telephone
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @param option Choose of logo
|
||||
* @return string Retourne tag img
|
||||
@@ -1898,6 +1849,7 @@ function img_phone($alt = "default",$option=0)
|
||||
|
||||
/**
|
||||
* Affiche logo suivant
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
@@ -1912,6 +1864,7 @@ function img_next($alt = "default")
|
||||
|
||||
/**
|
||||
* Affiche logo precedent
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
@@ -1924,6 +1877,7 @@ function img_previous($alt = "default")
|
||||
|
||||
/**
|
||||
* Show logo down arrow
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @param selected Affiche version "selected" du logo
|
||||
* @return string Retourne tag img
|
||||
@@ -1938,6 +1892,7 @@ function img_down($alt = "default", $selected=0)
|
||||
|
||||
/**
|
||||
* Show logo top arrow
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @param selected Affiche version "selected" du logo
|
||||
* @return string Retourne tag img
|
||||
@@ -1952,6 +1907,7 @@ function img_up($alt = "default", $selected=0)
|
||||
|
||||
/**
|
||||
* Affiche logo gauche
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @param selected Affiche version "selected" du logo
|
||||
* @return string Retourne tag img
|
||||
@@ -1966,6 +1922,7 @@ function img_left($alt = "default", $selected=0)
|
||||
|
||||
/**
|
||||
* Affiche logo droite
|
||||
*
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @param selected Affiche version "selected" du logo
|
||||
* @return string Retourne tag img
|
||||
@@ -1978,20 +1935,9 @@ function img_right($alt = "default", $selected=0)
|
||||
else return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/1rightarrow.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche logo tick
|
||||
* @param alt Texte sur le alt de l'image
|
||||
* @return string Retourne tag img
|
||||
*/
|
||||
function img_tick($alt = "default")
|
||||
{
|
||||
global $conf,$langs;
|
||||
if ($alt=="default") $alt=$langs->trans("Active");
|
||||
return '<img src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/tick.png" border="0" alt="'.dol_escape_htmltag($alt).'" title="'.dol_escape_htmltag($alt).'">';
|
||||
}
|
||||
|
||||
/**
|
||||
* Affiche le logo tick si allow
|
||||
*
|
||||
* @param allow Authorise ou non
|
||||
* @param alt Alt text for img
|
||||
* @return string Retourne tag img
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file htdocs/lib/security.lib.php
|
||||
* \brief Set of function used for dolibarr security
|
||||
* \version $Id: security.lib.php,v 1.127 2011/08/17 13:59:24 cdelambert Exp $
|
||||
* \version $Id: security.lib.php,v 1.128 2011/08/17 15:56:24 eldy Exp $
|
||||
*/
|
||||
|
||||
|
||||
@@ -231,7 +231,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
if (function_exists("imagecreatefrompng") && ! empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA))
|
||||
{
|
||||
$captcha=1;
|
||||
$captcha_refresh=img_refresh();
|
||||
$captcha_refresh=img_picto($langs->trans("Refresh"),'refresh');
|
||||
}
|
||||
|
||||
// Extra link
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
* \file htdocs/product/admin/produit.php
|
||||
* \ingroup produit
|
||||
* \brief Page d'administration/configuration du module Produit
|
||||
* \version $Id: produit.php,v 1.7 2011/07/31 23:24:02 eldy Exp $
|
||||
* \version $Id: produit.php,v 1.8 2011/08/17 15:56:26 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -267,7 +267,7 @@ if ($conf->global->PRODUCT_CANVAS_ABILITY)
|
||||
|
||||
if ($conf->global->$const)
|
||||
{
|
||||
print img_tick();
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
print '</td><td align="right">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&spe='.$file.'&value=0">'.$langs->trans("Disable").'</a>';
|
||||
}
|
||||
@@ -294,5 +294,5 @@ if ($conf->global->PRODUCT_CANVAS_ABILITY)
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:24:02 $ - $Revision: 1.7 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:26 $ - $Revision: 1.8 $');
|
||||
?>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
* \file htdocs/product/class/product.class.php
|
||||
* \ingroup produit
|
||||
* \brief Fichier de la classe des produits predefinis
|
||||
* \version $Id: product.class.php,v 1.49 2011/08/04 21:46:51 eldy Exp $
|
||||
* \version $Id: product.class.php,v 1.50 2011/08/17 15:56:26 eldy Exp $
|
||||
*/
|
||||
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
|
||||
|
||||
@@ -2580,7 +2580,7 @@ class Product extends CommonObject
|
||||
// On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites
|
||||
if ($photo_vignette && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i',$photo) && ($product->imgWidth > $maxWidth || $product->imgHeight > $maxHeight))
|
||||
{
|
||||
$return.= '<a href="'.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&action=addthumb&file='.urlencode($pdir.$viewfilename).'">'.img_refresh($langs->trans('GenerateThumb')).' </a>';
|
||||
$return.= '<a href="'.$_SERVER["PHP_SELF"].'?id='.$_GET["id"].'&action=addthumb&file='.urlencode($pdir.$viewfilename).'">'.img_picto($langs->trans('GenerateThumb'),'refresh').' </a>';
|
||||
}
|
||||
if ($user->rights->produit->creer || $user->rights->service->creer)
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* \file htdocs/user/group/fiche.php
|
||||
* \brief Onglet groupes utilisateurs
|
||||
* \version $Id: fiche.php,v 1.69 2011/07/31 23:21:25 eldy Exp $
|
||||
* \version $Id: fiche.php,v 1.70 2011/08/17 15:56:24 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -293,7 +293,7 @@ else
|
||||
print '<td width="75%" class="valeur">'.$object->nom;
|
||||
if (empty($object->entity))
|
||||
{
|
||||
print img_redstar($langs->trans("GlobalGroup"));
|
||||
print img_picto($langs->trans("GlobalGroup"),'redstar');
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
|
||||
@@ -386,7 +386,7 @@ else
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td>';
|
||||
print '<a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$useringroup->id.'">'.img_object($langs->trans("ShowUser"),"user").' '.$useringroup->login.'</a>';
|
||||
if ($useringroup->admin && ! $useringroup->entity) print img_redstar($langs->trans("SuperAdministrator"));
|
||||
if ($useringroup->admin && ! $useringroup->entity) print img_picto($langs->trans("SuperAdministrator"),'redstar');
|
||||
else if ($useringroup->admin) print img_picto($langs->trans("Administrator"),'star');
|
||||
print '</td>';
|
||||
print '<td>'.ucfirst(stripslashes($useringroup->lastname)).'</td>';
|
||||
@@ -473,5 +473,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:21:25 $ - $Revision: 1.69 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:24 $ - $Revision: 1.70 $');
|
||||
?>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* \file htdocs/user/group/index.php
|
||||
* \ingroup core
|
||||
* \brief Page of user groups
|
||||
* \version $Id: index.php,v 1.24 2011/07/31 23:21:25 eldy Exp $
|
||||
* \version $Id: index.php,v 1.25 2011/08/17 15:56:24 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -90,7 +90,7 @@ if ($resql)
|
||||
print '<td><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowGroup"),"group").' '.$obj->nom.'</a>';
|
||||
if (!$obj->entity)
|
||||
{
|
||||
print img_redstar($langs->trans("GlobalGroup"));
|
||||
print img_picto($langs->trans("GlobalGroup"),'redstar');
|
||||
}
|
||||
print "</td>";
|
||||
print '<td align="center">'.$obj->nb.'</td>';
|
||||
@@ -108,6 +108,6 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:21:25 $ - $Revision: 1.24 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:24 $ - $Revision: 1.25 $');
|
||||
|
||||
?>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
* \file htdocs/user/group/ldap.php
|
||||
* \ingroup ldap
|
||||
* \brief Page fiche LDAP groupe
|
||||
* \version $Id: ldap.php,v 1.26 2011/07/31 23:21:25 eldy Exp $
|
||||
* \version $Id: ldap.php,v 1.27 2011/08/17 15:56:24 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -115,7 +115,7 @@ print '<tr><td width="25%" valign="top">'.$langs->trans("Name").'</td>';
|
||||
print '<td width="75%" class="valeur">'.$fgroup->nom;
|
||||
if (!$fgroup->entity)
|
||||
{
|
||||
print img_redstar($langs->trans("GlobalGroup"));
|
||||
print img_picto($langs->trans("GlobalGroup"),'redstar');
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
|
||||
@@ -215,5 +215,5 @@ print '</table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:21:25 $ - $Revision: 1.26 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:24 $ - $Revision: 1.27 $');
|
||||
?>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file htdocs/user/group/perms.php
|
||||
* \brief Onglet user et permissions de la fiche utilisateur
|
||||
* \version $Id: perms.php,v 1.40 2011/08/01 13:15:53 hregis Exp $
|
||||
* \version $Id: perms.php,v 1.41 2011/08/17 15:56:24 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../../main.inc.php");
|
||||
@@ -208,7 +208,7 @@ if ($_GET["id"])
|
||||
print '<td colspan="2">'.$fgroup->nom.'';
|
||||
if (! $fgroup->entity)
|
||||
{
|
||||
print img_redstar($langs->trans("GlobalGroup"));
|
||||
print img_picto($langs->trans("GlobalGroup"),'redstar');
|
||||
}
|
||||
print "</td></tr>\n";
|
||||
|
||||
@@ -290,7 +290,7 @@ if ($_GET["id"])
|
||||
print '<td align="center"><a href="perms.php?id='.$fgroup->id.'&action=delrights&rights='.$obj->id.'#'.$objMod->getName().'">'.img_edit_remove($langs->trans("Remove")).'</a></td>';
|
||||
}
|
||||
print '<td align="center">';
|
||||
print img_tick();
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
@@ -316,5 +316,5 @@ if ($_GET["id"])
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/01 13:15:53 $ - $Revision: 1.40 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:24 $ - $Revision: 1.41 $');
|
||||
?>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/**
|
||||
* \file htdocs/user/home.php
|
||||
* \brief Home page of users and groups management
|
||||
* \version $Id: home.php,v 1.48 2011/07/31 23:19:42 eldy Exp $
|
||||
* \version $Id: home.php,v 1.49 2011/08/17 15:56:25 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -123,7 +123,7 @@ if ($resql)
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/user/fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->firstname.' '.$obj->name.'</a>';
|
||||
if ($conf->global->MAIN_MODULE_MULTICOMPANY && $obj->admin && ! $obj->entity)
|
||||
{
|
||||
print img_redstar($langs->trans("SuperAdministrator"));
|
||||
print img_picto($langs->trans("SuperAdministrator"),'redstar');
|
||||
}
|
||||
else if ($obj->admin)
|
||||
{
|
||||
@@ -219,5 +219,5 @@ print '</table>';
|
||||
$db->close();
|
||||
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:19:42 $ - $Revision: 1.48 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:25 $ - $Revision: 1.49 $');
|
||||
?>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
* \file htdocs/user/index.php
|
||||
* \ingroup core
|
||||
* \brief Page of users
|
||||
* \version $Id: index.php,v 1.51 2011/07/31 23:19:42 eldy Exp $
|
||||
* \version $Id: index.php,v 1.52 2011/08/17 15:56:25 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -103,7 +103,7 @@ if ($result)
|
||||
print '<td><a href="fiche.php?id='.$obj->rowid.'">'.img_object($langs->trans("ShowUser"),"user").' '.$obj->login.'</a>';
|
||||
if ($conf->global->MAIN_MODULE_MULTICOMPANY && $obj->admin && ! $obj->entity)
|
||||
{
|
||||
print img_redstar($langs->trans("SuperAdministrator"));
|
||||
print img_picto($langs->trans("SuperAdministrator"),'redstar');
|
||||
}
|
||||
else if ($obj->admin)
|
||||
{
|
||||
@@ -149,5 +149,5 @@ else
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/07/31 23:19:42 $ - $Revision: 1.51 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:25 $ - $Revision: 1.52 $');
|
||||
?>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/**
|
||||
* \file htdocs/user/passwordforgotten.php
|
||||
* \brief Page to ask a new password
|
||||
* \version $Id: passwordforgotten.php,v 1.76 2011/07/31 23:19:43 eldy Exp $
|
||||
* \version $Id: passwordforgotten.php,v 1.77 2011/08/17 15:56:25 eldy Exp $
|
||||
*/
|
||||
|
||||
define("NOLOGIN",1); // This means this output page does not require to be logged.
|
||||
@@ -243,7 +243,7 @@ if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY) && empty($conf->global->MU
|
||||
if (function_exists("imagecreatefrompng") && ! $disabled)
|
||||
{
|
||||
$captcha = 1;
|
||||
$captcha_refresh = img_refresh();
|
||||
$captcha_refresh = img_picto($langs->trans("Refresh"),'refresh');
|
||||
}
|
||||
|
||||
include($template_dir.'passwordforgotten.tpl.php'); // To use native PHP
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
/**
|
||||
* \file htdocs/user/perms.php
|
||||
* \brief Onglet user et permissions de la fiche utilisateur
|
||||
* \version $Id: perms.php,v 1.57 2011/08/01 13:15:54 hregis Exp $
|
||||
* \version $Id: perms.php,v 1.58 2011/08/17 15:56:25 eldy Exp $
|
||||
*/
|
||||
|
||||
require("../main.inc.php");
|
||||
@@ -346,7 +346,7 @@ if ($result)
|
||||
print '<td align="center">'.img_picto($langs->trans("Administrator"),'star').'</td>';
|
||||
}
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
print img_tick();
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
print '</td>';
|
||||
}
|
||||
else if (in_array($obj->id, $permsuser))
|
||||
@@ -357,7 +357,7 @@ if ($result)
|
||||
print '<td align="center"><a href="perms.php?id='.$fuser->id.'&action=delrights&rights='.$obj->id.'#'.$objMod->getName().'">'.img_edit_remove($langs->trans("Remove")).'</a></td>';
|
||||
}
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
print img_tick();
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
print '</td>';
|
||||
}
|
||||
else if (in_array($obj->id, $permsgroup)) {
|
||||
@@ -370,7 +370,7 @@ if ($result)
|
||||
print '</td>';
|
||||
}
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
print img_tick();
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
@@ -395,5 +395,5 @@ print '</table>';
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date: 2011/08/01 13:15:54 $ - $Revision: 1.57 $');
|
||||
llxFooter('$Date: 2011/08/17 15:56:25 $ - $Revision: 1.58 $');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user