Fix: can use alertnative path
This commit is contained in:
parent
11da59feea
commit
eb01c964d9
@ -1,10 +1,10 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr>
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -316,7 +316,6 @@ else
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
$dir = "../includes/modules/propale/";
|
||||
|
||||
print "<table class=\"noborder\" width=\"100%\">\n";
|
||||
print "<tr class=\"liste_titre\">\n";
|
||||
@ -330,92 +329,98 @@ print "</tr>\n";
|
||||
|
||||
clearstatcache();
|
||||
|
||||
$handle=opendir($dir);
|
||||
|
||||
$var=true;
|
||||
if (is_resource($handle))
|
||||
foreach ($conf->file->dol_document_root as $dirroot)
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (substr($file, dol_strlen($file) -12) == '.modules.php' && substr($file,0,12) == 'pdf_propale_')
|
||||
{
|
||||
$name = substr($file, 12, dol_strlen($file) - 24);
|
||||
$classname = substr($file, 0, dol_strlen($file) -12);
|
||||
$dir = $dirroot . "/includes/modules/propale/";
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">\n <td>";
|
||||
print $name;
|
||||
print "</td>\n <td>\n";
|
||||
require_once($dir.$file);
|
||||
$module = new $classname($db);
|
||||
print $module->description;
|
||||
print '</td>';
|
||||
|
||||
// Activate
|
||||
print "<td align=\"center\">\n";
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
if ($conf->global->PROPALE_ADDON_PDF != "$name")
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||
print img_picto($langs->trans("Activated"),'on');
|
||||
print '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_picto($langs->trans("Activated"),'on');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">';
|
||||
print img_picto($langs->trans("Disabled"),'off');
|
||||
print '</a>';
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
// Default
|
||||
print "<td align=\"center\">";
|
||||
if ($conf->global->PROPALE_ADDON_PDF == "$name")
|
||||
{
|
||||
print img_picto($langs->trans("Yes"),'on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'">';
|
||||
print img_picto($langs->trans("No"),'off');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Info
|
||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||
$htmltooltip.='<br>'.$langs->trans("Height").'/'.$langs->trans("Width").': '.$module->page_hauteur.'/'.$module->page_largeur;
|
||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
|
||||
//$htmltooltip.='<br>'.$langs->trans("Escompte").': '.yn($module->option_escompte,1,1);
|
||||
//$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark,1,1);
|
||||
|
||||
|
||||
|
||||
print '<td align="center">';
|
||||
print $html->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'propal').'</a>';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
if (is_dir($dir))
|
||||
{
|
||||
$handle=opendir($dir);
|
||||
if (is_resource($handle))
|
||||
{
|
||||
while (($file = readdir($handle))!==false)
|
||||
{
|
||||
if (substr($file, dol_strlen($file) -12) == '.modules.php' && substr($file,0,12) == 'pdf_propale_')
|
||||
{
|
||||
$name = substr($file, 12, dol_strlen($file) - 24);
|
||||
$classname = substr($file, 0, dol_strlen($file) -12);
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">\n <td>";
|
||||
print $name;
|
||||
print "</td>\n <td>\n";
|
||||
require_once($dir.$file);
|
||||
$module = new $classname($db);
|
||||
print $module->description;
|
||||
print '</td>';
|
||||
|
||||
// Activate
|
||||
print '<td align="center">'."\n";
|
||||
if (in_array($name, $def))
|
||||
{
|
||||
if ($conf->global->PROPALE_ADDON_PDF != "$name")
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&value='.$name.'">';
|
||||
print img_picto($langs->trans("Activated"),'on');
|
||||
print '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_picto($langs->trans("Activated"),'on');
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&value='.$name.'">';
|
||||
print img_picto($langs->trans("Disabled"),'off');
|
||||
print '</a>';
|
||||
}
|
||||
print "</td>";
|
||||
|
||||
// Default
|
||||
print '<td align="center">';
|
||||
if ($conf->global->PROPALE_ADDON_PDF == "$name")
|
||||
{
|
||||
print img_picto($langs->trans("Yes"),'on');
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&value='.$name.'">';
|
||||
print img_picto($langs->trans("No"),'off');
|
||||
print '</a>';
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Info
|
||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||
$htmltooltip.='<br>'.$langs->trans("Height").'/'.$langs->trans("Width").': '.$module->page_hauteur.'/'.$module->page_largeur;
|
||||
$htmltooltip.='<br><br><u>'.$langs->trans("FeaturesSupported").':</u>';
|
||||
$htmltooltip.='<br>'.$langs->trans("Logo").': '.yn($module->option_logo,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("PaymentMode").': '.yn($module->option_modereg,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("PaymentConditions").': '.yn($module->option_condreg,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang,1,1);
|
||||
//$htmltooltip.='<br>'.$langs->trans("Escompte").': '.yn($module->option_escompte,1,1);
|
||||
//$htmltooltip.='<br>'.$langs->trans("CreditNote").': '.yn($module->option_credit_note,1,1);
|
||||
$htmltooltip.='<br>'.$langs->trans("WatermarkOnDraftProposal").': '.yn($module->option_draft_watermark,1,1);
|
||||
|
||||
print '<td align="center">';
|
||||
print $html->textwithpicto('',$htmltooltip,1,0);
|
||||
print '</td>';
|
||||
print '<td align="center">';
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"),'propal').'</a>';
|
||||
print '</td>';
|
||||
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print '</table>';
|
||||
print '<br>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user