@@ -113,10 +113,10 @@ discard block |
||
113 | 113 | $filefound = 0; |
114 | 114 | $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
115 | 115 | foreach ($dirmodels as $reldir) { |
116 | - $file = dol_buildpath($reldir . "core/modules/product_batch/doc/pdf_" . $modele . ".modules.php", 0); |
|
116 | + $file = dol_buildpath($reldir."core/modules/product_batch/doc/pdf_".$modele.".modules.php", 0); |
|
117 | 117 | if (file_exists($file)) { |
118 | 118 | $filefound = 1; |
119 | - $classname = "pdf_" . $modele; |
|
119 | + $classname = "pdf_".$modele; |
|
120 | 120 | break; |
121 | 121 | } |
122 | 122 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $module = new $classname($db); |
128 | 128 | |
129 | 129 | if ($module->write_file($product_batch, $langs) > 0) { |
130 | - header("Location: " . DOL_URL_ROOT . "/document.php?modulepart=product_batch&file=SPECIMEN.pdf"); |
|
130 | + header("Location: ".DOL_URL_ROOT."/document.php?modulepart=product_batch&file=SPECIMEN.pdf"); |
|
131 | 131 | return; |
132 | 132 | } else { |
133 | 133 | setEventMessages($module->error, $module->errors, 'errors'); |
@@ -364,9 +364,9 @@ discard block |
||
364 | 364 | // Module to build doc |
365 | 365 | $def = array(); |
366 | 366 | $sql = "SELECT nom"; |
367 | -$sql .= " FROM " . MAIN_DB_PREFIX . "document_model"; |
|
368 | -$sql .= " WHERE type = '" . $db->escape($type) . "'"; |
|
369 | -$sql .= " AND entity = " . $conf->entity; |
|
367 | +$sql .= " FROM ".MAIN_DB_PREFIX."document_model"; |
|
368 | +$sql .= " WHERE type = '".$db->escape($type)."'"; |
|
369 | +$sql .= " AND entity = ".$conf->entity; |
|
370 | 370 | $resql = $db->query($sql); |
371 | 371 | if ($resql) { |
372 | 372 | $i = 0; |
@@ -387,19 +387,19 @@ discard block |
||
387 | 387 | print '<div class="div-table-responsive-no-min">'; |
388 | 388 | print '<table class="noborder centpercent">'; |
389 | 389 | print '<tr class="liste_titre">'; |
390 | -print '<td>' . $langs->trans("Name") . '</td>'; |
|
391 | -print '<td>' . $langs->trans("Description") . '</td>'; |
|
392 | -print '<td class="center" width="60">' . $langs->trans("Status") . "</td>\n"; |
|
393 | -print '<td class="center" width="60">' . $langs->trans("Default") . "</td>\n"; |
|
390 | +print '<td>'.$langs->trans("Name").'</td>'; |
|
391 | +print '<td>'.$langs->trans("Description").'</td>'; |
|
392 | +print '<td class="center" width="60">'.$langs->trans("Status")."</td>\n"; |
|
393 | +print '<td class="center" width="60">'.$langs->trans("Default")."</td>\n"; |
|
394 | 394 | print '<td class="center"></td>'; |
395 | -print '<td class="center" width="80">' . $langs->trans("Preview") . '</td>'; |
|
395 | +print '<td class="center" width="80">'.$langs->trans("Preview").'</td>'; |
|
396 | 396 | print "</tr>\n"; |
397 | 397 | |
398 | 398 | clearstatcache(); |
399 | 399 | |
400 | 400 | foreach ($dirmodels as $reldir) { |
401 | 401 | foreach (array('', '/doc') as $valdir) { |
402 | - $dir = dol_buildpath($reldir . "core/modules/product_batch" . $valdir); |
|
402 | + $dir = dol_buildpath($reldir."core/modules/product_batch".$valdir); |
|
403 | 403 | if (is_dir($dir)) { |
404 | 404 | $handle = opendir($dir); |
405 | 405 | if (is_resource($handle)) { |
@@ -411,11 +411,11 @@ discard block |
||
411 | 411 | |
412 | 412 | foreach ($filelist as $file) { |
413 | 413 | if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file)) { |
414 | - if (file_exists($dir . '/' . $file)) { |
|
414 | + if (file_exists($dir.'/'.$file)) { |
|
415 | 415 | $name = substr($file, 4, dol_strlen($file) - 16); |
416 | 416 | $classname = substr($file, 0, dol_strlen($file) - 12); |
417 | 417 | |
418 | - require_once $dir . '/' . $file; |
|
418 | + require_once $dir.'/'.$file; |
|
419 | 419 | $module = new $classname($db); |
420 | 420 | |
421 | 421 | $modulequalified = 1; |
@@ -439,14 +439,14 @@ discard block |
||
439 | 439 | |
440 | 440 | // Active |
441 | 441 | if (in_array($name, $def)) { |
442 | - print '<td class="center">' . "\n"; |
|
443 | - print '<a href="' . $_SERVER["PHP_SELF"] . '?action=del&token=' . newToken() . '&value=' . urlencode($name) . '">'; |
|
442 | + print '<td class="center">'."\n"; |
|
443 | + print '<a href="'.$_SERVER["PHP_SELF"].'?action=del&token='.newToken().'&value='.urlencode($name).'">'; |
|
444 | 444 | print img_picto($langs->trans("Enabled"), 'switch_on'); |
445 | 445 | print '</a>'; |
446 | 446 | print '</td>'; |
447 | 447 | } else { |
448 | - print '<td class="center">' . "\n"; |
|
449 | - print '<a href="' . $_SERVER["PHP_SELF"] . '?action=set&token=' . newToken() . '&value=' . urlencode($name) . '&scan_dir=' . urlencode($module->scandir) . '&label=' . urlencode($module->name) . '">' . img_picto($langs->trans("Disabled"), 'switch_off') . '</a>'; |
|
448 | + print '<td class="center">'."\n"; |
|
449 | + print '<a href="'.$_SERVER["PHP_SELF"].'?action=set&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>'; |
|
450 | 450 | print "</td>"; |
451 | 451 | } |
452 | 452 | |
@@ -455,19 +455,19 @@ discard block |
||
455 | 455 | if (getDolGlobalString('PRODUCT_BATCH_ADDON_PDF') == $name) { |
456 | 456 | print img_picto($langs->trans("Default"), 'on'); |
457 | 457 | } else { |
458 | - print '<a href="' . $_SERVER["PHP_SELF"] . '?action=setdoc&token=' . newToken() . '&value=' . urlencode($name) . '&scan_dir=' . urlencode($module->scandir) . '&label=' . urlencode($module->name) . '" alt="' . $langs->trans("Default") . '">' . img_picto($langs->trans("Disabled"), 'off') . '</a>'; |
|
458 | + print '<a href="'.$_SERVER["PHP_SELF"].'?action=setdoc&token='.newToken().'&value='.urlencode($name).'&scan_dir='.urlencode($module->scandir).'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'off').'</a>'; |
|
459 | 459 | } |
460 | 460 | print '</td>'; |
461 | 461 | |
462 | 462 | // Info |
463 | - $htmltooltip = '' . $langs->trans("Name") . ': ' . $module->name; |
|
464 | - $htmltooltip .= '<br>' . $langs->trans("Type") . ': ' . ($module->type ? $module->type : $langs->trans("Unknown")); |
|
463 | + $htmltooltip = ''.$langs->trans("Name").': '.$module->name; |
|
464 | + $htmltooltip .= '<br>'.$langs->trans("Type").': '.($module->type ? $module->type : $langs->trans("Unknown")); |
|
465 | 465 | if ($module->type == 'pdf') { |
466 | - $htmltooltip .= '<br>' . $langs->trans("Width") . '/' . $langs->trans("Height") . ': ' . $module->page_largeur . '/' . $module->page_hauteur; |
|
466 | + $htmltooltip .= '<br>'.$langs->trans("Width").'/'.$langs->trans("Height").': '.$module->page_largeur.'/'.$module->page_hauteur; |
|
467 | 467 | } |
468 | - $htmltooltip .= '<br><br><u>' . $langs->trans("FeaturesSupported") . ':</u>'; |
|
469 | - $htmltooltip .= '<br>' . $langs->trans("Logo") . ': ' . yn($module->option_logo, 1, 1); |
|
470 | - $htmltooltip .= '<br>' . $langs->trans("MultiLanguage") . ': ' . yn($module->option_multilang, 1, 1); |
|
468 | + $htmltooltip .= '<br><br><u>'.$langs->trans("FeaturesSupported").':</u>'; |
|
469 | + $htmltooltip .= '<br>'.$langs->trans("Logo").': '.yn($module->option_logo, 1, 1); |
|
470 | + $htmltooltip .= '<br>'.$langs->trans("MultiLanguage").': '.yn($module->option_multilang, 1, 1); |
|
471 | 471 | |
472 | 472 | |
473 | 473 | print '<td class="center">'; |
@@ -477,7 +477,7 @@ discard block |
||
477 | 477 | // Preview |
478 | 478 | print '<td class="center">'; |
479 | 479 | if ($module->type == 'pdf') { |
480 | - print '<a href="' . $_SERVER["PHP_SELF"] . '?action=specimen&module=' . $name . '">' . img_object($langs->trans("Preview"), 'contract') . '</a>'; |
|
480 | + print '<a href="'.$_SERVER["PHP_SELF"].'?action=specimen&module='.$name.'">'.img_object($langs->trans("Preview"), 'contract').'</a>'; |
|
481 | 481 | } else { |
482 | 482 | print img_object($langs->trans("PreviewNotAvailable"), 'generic'); |
483 | 483 | } |
@@ -39,8 +39,8 @@ |
||
39 | 39 | |
40 | 40 | $id = GETPOST('id', 'int'); |
41 | 41 | $ref = GETPOST('ref', 'alpha'); |
42 | -$batch = GETPOST('batch', 'alpha'); |
|
43 | -$objectid = GETPOST('productid', 'int'); |
|
42 | +$batch = GETPOST('batch', 'alpha'); |
|
43 | +$objectid = GETPOST('productid', 'int'); |
|
44 | 44 | |
45 | 45 | // Security check |
46 | 46 | $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); |
@@ -39,8 +39,8 @@ |
||
39 | 39 | |
40 | 40 | $id = GETPOST('id', 'int'); |
41 | 41 | $ref = GETPOST('ref', 'alpha'); |
42 | -$batch = GETPOST('batch', 'alpha'); |
|
43 | -$objectid = GETPOST('productid', 'int'); |
|
42 | +$batch = GETPOST('batch', 'alpha'); |
|
43 | +$objectid = GETPOST('productid', 'int'); |
|
44 | 44 | |
45 | 45 | // Security check |
46 | 46 | $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php // BEGIN PHP |
2 | -$websitekey=basename(__DIR__); |
|
3 | -if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded |
|
2 | +$websitekey = basename(__DIR__); |
|
3 | +if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded |
|
4 | 4 | require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php'; |
5 | 5 | require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php'; |
6 | 6 | ob_start(); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | // File generated to link to the master file - DO NOT MODIFY - It is just an include |
3 | -if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { |
|
4 | - if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
3 | +if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { |
|
4 | + if (!defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
5 | 5 | require_once '/var/www/html/dolibarr_dev/htdocs/master.inc.php'; |
6 | 6 | } |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php // BEGIN PHP |
2 | -$websitekey=basename(__DIR__); |
|
3 | -if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded |
|
2 | +$websitekey = basename(__DIR__); |
|
3 | +if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded |
|
4 | 4 | require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php'; |
5 | 5 | require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php'; |
6 | 6 | ob_start(); |
7 | -if (! headers_sent()) { /* because file is included inline when in edit mode and we don't want warning */ |
|
7 | +if (!headers_sent()) { /* because file is included inline when in edit mode and we don't want warning */ |
|
8 | 8 | header('Cache-Control: max-age=3600, public, must-revalidate'); |
9 | 9 | header('Content-type: text/css'); |
10 | 10 | } |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | // File generated to link to the master file - DO NOT MODIFY - It is just an include |
3 | -if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { |
|
4 | - if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
3 | +if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { |
|
4 | + if (!defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
5 | 5 | require_once '/home/ldestailleur/git/dolibarr_dev/htdocs/master.inc.php'; |
6 | 6 | } |
7 | 7 | ?> |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php // BEGIN PHP |
2 | -$websitekey=basename(__DIR__); |
|
3 | -if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded |
|
2 | +$websitekey = basename(__DIR__); |
|
3 | +if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { require_once __DIR__.'/master.inc.php'; } // Load env if not already loaded |
|
4 | 4 | require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php'; |
5 | 5 | require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php'; |
6 | 6 | ob_start(); |
7 | -if (! headers_sent()) { /* because file is included inline when in edit mode and we don't want warning */ |
|
7 | +if (!headers_sent()) { /* because file is included inline when in edit mode and we don't want warning */ |
|
8 | 8 | header('Cache-Control: max-age=3600, public, must-revalidate'); |
9 | 9 | header('Content-type: text/css'); |
10 | 10 | } |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | // File generated to link to the master file - DO NOT MODIFY - It is just an include |
3 | -if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { |
|
4 | - if (! defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
3 | +if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { |
|
4 | + if (!defined('USEEXTERNALSERVER')) define('USEEXTERNALSERVER', 1); |
|
5 | 5 | require_once '/home/ldestailleur/git/dolibarr_dev/htdocs/master.inc.php'; |
6 | 6 | } |