forked from Wavyzz/dolibarr
Fix: convert line delimiters !!
This commit is contained in:
@@ -294,12 +294,12 @@ if ($resql)
|
||||
$staticmember->id=$obj->rowid;
|
||||
$staticmember->lastname=$obj->lastname;
|
||||
$staticmember->firstname=$obj->firstname;
|
||||
if (! empty($obj->fk_soc)) {
|
||||
$staticmember->socid = $obj->fk_soc;
|
||||
if (! empty($obj->fk_soc)) {
|
||||
$staticmember->socid = $obj->fk_soc;
|
||||
$staticmember->fetch_thirdparty();
|
||||
$staticmember->name=$staticmember->thirdparty->name;
|
||||
} else {
|
||||
$staticmember->name=$obj->company;
|
||||
$staticmember->name=$staticmember->thirdparty->name;
|
||||
} else {
|
||||
$staticmember->name=$obj->company;
|
||||
}
|
||||
$staticmember->ref=$staticmember->getFullName($langs);
|
||||
print '<td>'.$subscriptionstatic->getNomUrl(1).'</td>';
|
||||
|
||||
@@ -268,12 +268,12 @@ if ($resql)
|
||||
$memberstatic->lastname=$objp->lastname;
|
||||
$memberstatic->firstname=$objp->firstname;
|
||||
|
||||
if (! empty($objp->fk_soc)) {
|
||||
$memberstatic->socid = $objp->fk_soc;
|
||||
$memberstatic->fetch_thirdparty();
|
||||
$companyname=$memberstatic->thirdparty->name;
|
||||
} else {
|
||||
$companyname=$objp->company;
|
||||
if (! empty($objp->fk_soc)) {
|
||||
$memberstatic->socid = $objp->fk_soc;
|
||||
$memberstatic->fetch_thirdparty();
|
||||
$companyname=$memberstatic->thirdparty->name;
|
||||
} else {
|
||||
$companyname=$objp->company;
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
|
||||
@@ -116,18 +116,18 @@ if ($action == 'add')
|
||||
$leftmenu=''; $mainmenu='';
|
||||
if (! empty($_POST['menuId']) && ! is_numeric($_POST['menuId']))
|
||||
{
|
||||
$tmp=explode('&',$_POST['menuId']);
|
||||
foreach($tmp as $s)
|
||||
{
|
||||
if (preg_match('/fk_mainmenu=/',$s))
|
||||
{
|
||||
$mainmenu=preg_replace('/fk_mainmenu=/','',$s);
|
||||
}
|
||||
if (preg_match('/fk_leftmenu=/',$s))
|
||||
{
|
||||
$leftmenu=preg_replace('/fk_leftmenu=/','',$s);
|
||||
}
|
||||
}
|
||||
$tmp=explode('&',$_POST['menuId']);
|
||||
foreach($tmp as $s)
|
||||
{
|
||||
if (preg_match('/fk_mainmenu=/',$s))
|
||||
{
|
||||
$mainmenu=preg_replace('/fk_mainmenu=/','',$s);
|
||||
}
|
||||
if (preg_match('/fk_leftmenu=/',$s))
|
||||
{
|
||||
$leftmenu=preg_replace('/fk_leftmenu=/','',$s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$langs->load("errors");
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
|
||||
@@ -40,22 +40,22 @@ llxHeader();
|
||||
|
||||
$title='InfoPHP';
|
||||
|
||||
if (isset($title))
|
||||
{
|
||||
print_fiche_titre($langs->trans($title), '', 'setup');
|
||||
}
|
||||
if (isset($title))
|
||||
{
|
||||
print_fiche_titre($langs->trans($title), '', 'setup');
|
||||
}
|
||||
|
||||
// Get php_info array
|
||||
// Get php_info array
|
||||
$phparray=phpinfo_array();
|
||||
foreach($phparray as $key => $value)
|
||||
{
|
||||
//print_titre($key);
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<table class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
//print '<td width="220px">'.$langs->trans("Parameter").'</td>';
|
||||
print '<td width="220px">'.$key.'</td>';
|
||||
print '<td colspan="2">'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
print '<td width="220px">'.$key.'</td>';
|
||||
print '<td colspan="2">'.$langs->trans("Value").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
//var_dump($value);
|
||||
@@ -65,10 +65,10 @@ foreach($phparray as $key => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$keyparam.'</td>';
|
||||
print '<td>'.$keyparam.'</td>';
|
||||
$valtoshow=$keyvalue;
|
||||
if ($keyparam == 'X-ChromePhp-Data') $valtoshow=dol_trunc($keyvalue,80);
|
||||
print '<td colspan="2">'.$valtoshow.'</td>';
|
||||
print '<td colspan="2">'.$valtoshow.'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
else
|
||||
@@ -77,13 +77,13 @@ foreach($phparray as $key => $value)
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td>'.$keyparam.'</td>';
|
||||
$i=0;
|
||||
foreach($keyvalue as $keyparam2 => $keyvalue2)
|
||||
foreach($keyvalue as $keyparam2 => $keyvalue2)
|
||||
{
|
||||
print '<td>';
|
||||
$valtoshow=$keyvalue2;
|
||||
if ($keyparam == 'disable_functions') $valtoshow=join(', ',explode(',',trim($valtoshow)));
|
||||
//print $keyparam2.' = ';
|
||||
print $valtoshow;
|
||||
print $valtoshow;
|
||||
$i++;
|
||||
print '</td>';
|
||||
}
|
||||
@@ -92,7 +92,7 @@ foreach($phparray as $key => $value)
|
||||
}
|
||||
print '</table><br>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
llxFooter();
|
||||
|
||||
|
||||
@@ -40,12 +40,12 @@ $langs->load('orders');
|
||||
$langs->load('deliveries');
|
||||
$langs->load('companies');
|
||||
|
||||
if (! $user->rights->facture->creer)
|
||||
if (! $user->rights->facture->creer)
|
||||
accessforbidden();
|
||||
|
||||
$id = (GETPOST('id')?GETPOST("id"):GETPOST("facid")); // For backward compatibility
|
||||
$ref = GETPOST('ref','alpha');
|
||||
$action = GETPOST('action','alpha');
|
||||
$id = (GETPOST('id')?GETPOST("id"):GETPOST("facid")); // For backward compatibility
|
||||
$ref = GETPOST('ref','alpha');
|
||||
$action = GETPOST('action','alpha');
|
||||
$confirm = GETPOST('confirm','alpha');
|
||||
$sref = GETPOST('sref');
|
||||
$sref_client = GETPOST('sref_client');
|
||||
|
||||
@@ -1856,8 +1856,8 @@ if ($action == 'create')
|
||||
{
|
||||
$newinvoice_static->id=$key;
|
||||
$newinvoice_static->ref=$valarray['ref'];
|
||||
$newinvoice_static->statut=$valarray['status'];
|
||||
$newinvoice_static->type=$valarray['type'];
|
||||
$newinvoice_static->statut=$valarray['status'];
|
||||
$newinvoice_static->type=$valarray['type'];
|
||||
$newinvoice_static->paye=$valarray['paye'];
|
||||
|
||||
$optionsav.='<option value="'.$key.'"';
|
||||
|
||||
@@ -140,7 +140,7 @@ if ($socid > 0)
|
||||
|
||||
print '<td aling="left">'.$fac->getLibStatut(2,$totalpaye).'</td>';
|
||||
print '<td align="right">'.price($fac->total_ttc)."</td>\n";
|
||||
if (($fac->statut == 3 ) || ($fac->statut == 2 && ! $fact->close_code) ) $solde = $solde = $solde + $totalpaye;
|
||||
if (($fac->statut == 3 ) || ($fac->statut == 2 && ! $fact->close_code) ) $solde = $solde = $solde + $totalpaye;
|
||||
else $solde = $solde + $fac->total_ttc;
|
||||
|
||||
print '<td align="right"> </td>';
|
||||
|
||||
@@ -98,12 +98,12 @@ class box_members extends ModeleBoxes
|
||||
$memberstatic->lastname=$objp->lastname;
|
||||
$memberstatic->firstname=$objp->firstname;
|
||||
|
||||
if (! empty($objp->fk_soc)) {
|
||||
$memberstatic->socid = $objp->fk_soc;
|
||||
$memberstatic->fetch_thirdparty();
|
||||
$memberstatic->name=$memberstatic->thirdparty->name;
|
||||
} else {
|
||||
$memberstatic->name=$objp->company;
|
||||
if (! empty($objp->fk_soc)) {
|
||||
$memberstatic->socid = $objp->fk_soc;
|
||||
$memberstatic->fetch_thirdparty();
|
||||
$memberstatic->name=$memberstatic->thirdparty->name;
|
||||
} else {
|
||||
$memberstatic->name=$objp->company;
|
||||
}
|
||||
|
||||
$this->info_box_contents[$i][0] = array('td' => 'align="left" width="16"',
|
||||
|
||||
@@ -38,8 +38,8 @@ class ExtraFields
|
||||
var $attribute_label;
|
||||
// Tableau contenant le nom des champs en clef et la taille de ces champs en value
|
||||
var $attribute_size;
|
||||
// Tableau contenant le statut unique ou non
|
||||
var $attribute_unique;
|
||||
// Tableau contenant le statut unique ou non
|
||||
var $attribute_unique;
|
||||
|
||||
var $error;
|
||||
var $errno;
|
||||
@@ -311,10 +311,10 @@ class ExtraFields
|
||||
$result=$this->db->DDLUpdateField(MAIN_DB_PREFIX.$table, $attrname, $field_desc);
|
||||
if ($result > 0)
|
||||
{
|
||||
if ($label)
|
||||
{
|
||||
$result=$this->update_label($attrname,$label,$type,$length,$elementtype,$unique);
|
||||
}
|
||||
if ($label)
|
||||
{
|
||||
$result=$this->update_label($attrname,$label,$type,$length,$elementtype,$unique);
|
||||
}
|
||||
if ($result > 0)
|
||||
{
|
||||
$sql='';
|
||||
@@ -324,7 +324,7 @@ class ExtraFields
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql="ALTER TABLE ".MAIN_DB_PREFIX.$table." DROP INDEX uk_".$table."_".$attrname;
|
||||
$sql="ALTER TABLE ".MAIN_DB_PREFIX.$table." DROP INDEX uk_".$table."_".$attrname;
|
||||
}
|
||||
dol_syslog(get_class($this).'::update sql='.$sql);
|
||||
$resql=$this->db->query($sql,1,'dml');
|
||||
|
||||
@@ -146,28 +146,28 @@ function group_prepare_head($object)
|
||||
return $head;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @param Object $object Object related to tabs
|
||||
* @param array $aEntities Entities array
|
||||
* @return array Array of tabs
|
||||
*/
|
||||
function entity_prepare_head($object, $aEntities)
|
||||
{
|
||||
global $mc;
|
||||
|
||||
* @param array $aEntities Entities array
|
||||
* @return array Array of tabs
|
||||
*/
|
||||
function entity_prepare_head($object, $aEntities)
|
||||
{
|
||||
global $mc;
|
||||
|
||||
$head = array();
|
||||
|
||||
foreach($aEntities as $entity)
|
||||
{
|
||||
$mc->getInfo($entity);
|
||||
$head[$entity][0] = $_SERVER['PHP_SELF'].'?id='.$object->id.'&entity='.$entity;
|
||||
$head[$entity][1] = $mc->label;
|
||||
$head[$entity][0] = $_SERVER['PHP_SELF'].'?id='.$object->id.'&entity='.$entity;
|
||||
$head[$entity][1] = $mc->label;
|
||||
$head[$entity][2] = $entity;
|
||||
}
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -481,7 +481,7 @@ elseif ($action == 'addline')
|
||||
|
||||
$localtax1tx= get_localtax($tvatx, 1, $object->thirdparty);
|
||||
$localtax2tx= get_localtax($tvatx, 2, $object->thirdparty);
|
||||
$remise_percent=GETPOST('remise_percent');
|
||||
$remise_percent=GETPOST('remise_percent');
|
||||
$type = $product->type;
|
||||
|
||||
$result=$object->addline($label, $product->fourn_pu, $tvatx, $localtax1tx, $localtax2tx, $_POST['qty'], $idprod, $remise_percent);
|
||||
@@ -499,7 +499,7 @@ elseif ($action == 'addline')
|
||||
$tauxtva = price2num($_POST['tauxtva']);
|
||||
$localtax1tx= get_localtax($tauxtva, 1, $object->thirdparty);
|
||||
$localtax2tx= get_localtax($tauxtva, 2, $object->thirdparty);
|
||||
$remise_percent=GETPOST('remise_percent');
|
||||
$remise_percent=GETPOST('remise_percent');
|
||||
|
||||
if (! $_POST['dp_desc'])
|
||||
{
|
||||
|
||||
@@ -382,7 +382,7 @@ if($cp_events == 1) {
|
||||
}
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER['PHP_SELF'].'?leftmenu=setup" name="event_create">'."\n";
|
||||
print '<input type="hidden" name="action" value="create_event" />'."\n";
|
||||
print '<input type="hidden" name="action" value="create_event" />'."\n";
|
||||
|
||||
print $langs->trans('TitleCreateEventCP');
|
||||
|
||||
|
||||
@@ -140,8 +140,8 @@ if ($action == 'create')
|
||||
|
||||
if ($action == 'update')
|
||||
{
|
||||
$date_debut = dol_mktime(0, 0, 0, $_POST['date_debut_month'], $_POST['date_debut_day'], $_POST['date_debut_year']);
|
||||
$date_fin = dol_mktime(0, 0, 0, $_POST['date_fin_month'], $_POST['date_fin_day'], $_POST['date_fin_year']);
|
||||
$date_debut = dol_mktime(0, 0, 0, $_POST['date_debut_month'], $_POST['date_debut_day'], $_POST['date_debut_year']);
|
||||
$date_fin = dol_mktime(0, 0, 0, $_POST['date_fin_month'], $_POST['date_fin_day'], $_POST['date_fin_year']);
|
||||
|
||||
// Si pas le droit de modifier une demande
|
||||
if(!$user->rights->holiday->write)
|
||||
@@ -304,7 +304,7 @@ if ($action == 'confirm_send')
|
||||
|
||||
// Si l'option pour avertir le valideur en cas de solde inférieur à la demande
|
||||
if($cp->getConfCP('AlertValidatorSolde')) {
|
||||
$nbopenedday=num_open_day($cp->date_debut,$cp->date_fin,0,1);
|
||||
$nbopenedday=num_open_day($cp->date_debut,$cp->date_fin,0,1);
|
||||
if ($nbopenedday > $cp->getCPforUser($cp->fk_user))
|
||||
{
|
||||
$message.= "\n";
|
||||
|
||||
@@ -294,7 +294,7 @@ if (! empty($holiday->holiday))
|
||||
print '<td style="text-align: center;">'.$infos_CP['date_fin'].'</td>';
|
||||
print '<td>';
|
||||
$nbopenedday=num_open_day($infos_CP['date_debut'],$infos_CP['date_fin'],0,1);
|
||||
print $nbopenedday.' '.$langs->trans('Jours');
|
||||
print $nbopenedday.' '.$langs->trans('Jours');
|
||||
print '<td align="center"><a href="./fiche.php?id='.$infos_CP['rowid'].'">'.$statut.'</a></td>';
|
||||
print '</tr>'."\n";
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ if($num == '0') {
|
||||
print '<td>'.$holiday['date_debut'].'</td>';
|
||||
print '<td>'.$holiday['date_fin'].'</td>';
|
||||
print '<td>';
|
||||
$nbopenedday=num_open_day($holiday['date_debut'],$holiday['date_fin'],0,1);
|
||||
$nbopenedday=num_open_day($holiday['date_debut'],$holiday['date_fin'],0,1);
|
||||
print $nbopenedday;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -269,11 +269,11 @@ if ($user->admin) print info_admin($langs->trans("WarningOnlyPermissionOfActivat
|
||||
// For multicompany transversal mode
|
||||
if (! empty($conf->multicompany->enabled) && ! empty($conf->multicompany->transverse_mode))
|
||||
{
|
||||
$aEntities=array_keys($permsgroupbyentity);
|
||||
$aEntities=array_keys($permsgroupbyentity);
|
||||
sort($aEntities);
|
||||
$entity = (GETPOST('entity', 'int')?GETPOST('entity', 'int'):$aEntities[0]);
|
||||
$entity = (GETPOST('entity', 'int')?GETPOST('entity', 'int'):$aEntities[0]);
|
||||
$head = entity_prepare_head($fuser, $aEntities);
|
||||
$title = $langs->trans("Entities");
|
||||
$title = $langs->trans("Entities");
|
||||
dol_fiche_head($head, $entity, $title, 1, 'multicompany@multicompany');
|
||||
}
|
||||
|
||||
@@ -281,7 +281,7 @@ print "\n";
|
||||
print '<table width="100%" class="noborder">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Module").'</td>';
|
||||
if ($caneditperms) print '<td> </td>';
|
||||
if ($caneditperms) print '<td> </td>';
|
||||
print '<td align="center" width="24"> </td>';
|
||||
print '<td>'.$langs->trans("Permissions").'</td>';
|
||||
print '</tr>'."\n";
|
||||
@@ -314,29 +314,29 @@ if ($result)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (isset($obj->module) && ($oldmod <> $obj->module))
|
||||
{
|
||||
$oldmod = $obj->module;
|
||||
$var = !$var;
|
||||
|
||||
// Rupture detectee, on recupere objMod
|
||||
$objMod=$modules[$obj->module];
|
||||
$picto=($objMod->picto?$objMod->picto:'generic');
|
||||
|
||||
if ($caneditperms && (empty($objMod->rights_admin_allowed) || empty($fuser->admin)))
|
||||
{
|
||||
// On affiche ligne pour modifier droits
|
||||
if (isset($obj->module) && ($oldmod <> $obj->module))
|
||||
{
|
||||
$oldmod = $obj->module;
|
||||
$var = !$var;
|
||||
|
||||
// Rupture detectee, on recupere objMod
|
||||
$objMod=$modules[$obj->module];
|
||||
$picto=($objMod->picto?$objMod->picto:'generic');
|
||||
|
||||
if ($caneditperms && (empty($objMod->rights_admin_allowed) || empty($fuser->admin)))
|
||||
{
|
||||
// On affiche ligne pour modifier droits
|
||||
print '<tr '. $bc[$var].'>';
|
||||
print '<td nowrap="nowrap">'.img_object('',$picto).' '.$objMod->getName();
|
||||
print '<td nowrap="nowrap">'.img_object('',$picto).' '.$objMod->getName();
|
||||
print '<a name="'.$objMod->getName().'"> </a></td>';
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
print '<a title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="perms.php?id='.$fuser->id.'&action=addrights&entity='.$entity.'&module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("All")."</a>";
|
||||
print '/';
|
||||
print '<a title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="perms.php?id='.$fuser->id.'&action=delrights&entity='.$entity.'&module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("None")."</a>";
|
||||
print '</td>';
|
||||
print '<td colspan="2"> </td>';
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
print '<a title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="perms.php?id='.$fuser->id.'&action=addrights&entity='.$entity.'&module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("All")."</a>";
|
||||
print '/';
|
||||
print '<a title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="perms.php?id='.$fuser->id.'&action=delrights&entity='.$entity.'&module='.$obj->module.'#'.$objMod->getName().'">'.$langs->trans("None")."</a>";
|
||||
print '</td>';
|
||||
print '<td colspan="2"> </td>';
|
||||
print '</tr>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
print '<tr '. $bc[$var].'>';
|
||||
@@ -344,47 +344,47 @@ if ($result)
|
||||
// Picto and label of permission
|
||||
print '<td>'.img_object('',$picto).' '.$objMod->getName().'</td>';
|
||||
|
||||
// Permission and tick
|
||||
if (! empty($fuser->admin) && ! empty($objMod->rights_admin_allowed)) // Permission own because admin
|
||||
{
|
||||
if ($caneditperms)
|
||||
{
|
||||
print '<td align="center">'.img_picto($langs->trans("Administrator"),'star').'</td>';
|
||||
}
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
print '</td>';
|
||||
}
|
||||
else if (in_array($obj->id, $permsuser)) // Permission own by user
|
||||
{
|
||||
if ($caneditperms)
|
||||
{
|
||||
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_picto($langs->trans("Active"),'tick');
|
||||
print '</td>';
|
||||
}
|
||||
else if (in_array($obj->id, $permsgroupbyentity[$entity])) // Permission own by group
|
||||
{
|
||||
if ($caneditperms)
|
||||
{
|
||||
print '<td align="center">';
|
||||
print $form->textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup"));
|
||||
print '</td>';
|
||||
}
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Do not own permission
|
||||
if ($caneditperms)
|
||||
{
|
||||
print '<td align="center"><a href="perms.php?id='.$fuser->id.'&action=addrights&entity='.$entity.'&rights='.$obj->id.'#'.$objMod->getName().'">'.img_edit_add($langs->trans("Add")).'</a></td>';
|
||||
}
|
||||
print '<td> </td>';
|
||||
// Permission and tick
|
||||
if (! empty($fuser->admin) && ! empty($objMod->rights_admin_allowed)) // Permission own because admin
|
||||
{
|
||||
if ($caneditperms)
|
||||
{
|
||||
print '<td align="center">'.img_picto($langs->trans("Administrator"),'star').'</td>';
|
||||
}
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
print '</td>';
|
||||
}
|
||||
else if (in_array($obj->id, $permsuser)) // Permission own by user
|
||||
{
|
||||
if ($caneditperms)
|
||||
{
|
||||
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_picto($langs->trans("Active"),'tick');
|
||||
print '</td>';
|
||||
}
|
||||
else if (in_array($obj->id, $permsgroupbyentity[$entity])) // Permission own by group
|
||||
{
|
||||
if ($caneditperms)
|
||||
{
|
||||
print '<td align="center">';
|
||||
print $form->textwithtooltip($langs->trans("Inherited"),$langs->trans("PermissionInheritedFromAGroup"));
|
||||
print '</td>';
|
||||
}
|
||||
print '<td align="center" nowrap="nowrap">';
|
||||
print img_picto($langs->trans("Active"),'tick');
|
||||
print '</td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// Do not own permission
|
||||
if ($caneditperms)
|
||||
{
|
||||
print '<td align="center"><a href="perms.php?id='.$fuser->id.'&action=addrights&entity='.$entity.'&rights='.$obj->id.'#'.$objMod->getName().'">'.img_edit_add($langs->trans("Add")).'</a></td>';
|
||||
}
|
||||
print '<td> </td>';
|
||||
}
|
||||
|
||||
$perm_libelle=($conf->global->MAIN_USE_ADVANCED_PERMS && ($langs->trans("PermissionAdvanced".$obj->id)!=("PermissionAdvanced".$obj->id))?$langs->trans("PermissionAdvanced".$obj->id):(($langs->trans("Permission".$obj->id)!=("Permission".$obj->id))?$langs->trans("Permission".$obj->id):$obj->libelle));
|
||||
|
||||
Reference in New Issue
Block a user