Merge branch 'Dolibarr:develop' into new-odt-abbility-to-supplier-invoices

This commit is contained in:
Artem Chernitsov 2022-11-22 10:54:26 +02:00 committed by GitHub
commit 85e282b056
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
124 changed files with 2511 additions and 3548 deletions

View File

@ -9,9 +9,8 @@ For users:
---------------
NEW: Minimal PHP version is now PHP 7.0 instead of PHP 5.6
NEW: #21750 Added "Get lines and Post lines from BOM" at the REST Service
NEW: #21780 Add pid field to Cronjob class and store PID on job execution
NEW: #19680 Add option PRODUCT_ALLOW_EXTERNAL_DOWNLOAD
NEW: #19680 Add option PRODUCT_ALLOW_EXTERNAL_DOWNLOAD to automatically have uploaded files shared publicly by a link
NEW: #20650 can move the checkbox column on left (experimental option)
NEW: #21000 Added columns 'alias_name' on poject, supplier invoice, supplier order, supplier proposals and taks list
NEW: #21395 Added option for dark theme mode in display - color and theme
@ -19,11 +18,9 @@ NEW: #21397 added option to auto define barcode numbers for third-parties in bar
NEW: #21399
NEW: #21442 Enhancement of module builder init
NEW: #21654 add bank account number used on invoices for debit
NEW: #21775 Template 03 manages send mails
NEW: #22048 Added notes to productlot module
NEW: #22298 Bank - Add salaries & vat in tab planned entries
NEW: #22298 Bank - Add salaries & vat in the tab of planned entries of a bank account
NEW: #22328
NEW: #22370 Modulebuilder supports 'alwayseditable' (like extrafields)
NEW: #22424
NEW: #22500 member module set up made easier
NEW: #22527 projects and thirdparties can be viewed as conversation ("Message" view), like events/agenda.
@ -57,7 +54,6 @@ NEW: Add hidden option MAIN_EMAIL_SUPPORT_ACK to restore Email ack checkbox (fea
NEW: Add IMAP port setting on email collector module
NEW: Adding JAPAN Chart-of-Account and regions/departments
NEW: Adding NIF verification for Algeria
NEW: Add 4 other templates in website module
NEW: Add link to create an element from the category page
NEW: add margin infos to takepos invoice lines
NEW: Add max size send for "backup and link to mail" option
@ -98,6 +94,7 @@ NEW: Website Can remove a website template
NEW: Website can set header "Strict-Transport-Security" in web sites.
NEW: Website Can switch status of website and page from the website toolbar
NEW: Website Templates of websites are now directories and not zip into core repo
NEW: Website Add 4 other templates in website module
NEW: Can use products categories to make inventory
NEW: Change filter type on tickets list into a multiselect combo
NEW: conf TIMESPENT_ALWAYS_UPDATE_THM, when it's on we always check current thm of user to update it in task time line
@ -129,7 +126,6 @@ NEW: manage no email with thirdparties (better for GDPR)
NEW: Manage Position (Rank) on Contract Lines
NEW: Manage VAT on all lines on purchases cycle
NEW: manage virtual stock at a future date
NEW: ModuleBuilder can generate code of class from an existing SQL table
NEW: On a bank reconciled line, we can modify the bank receipt
NEW: On a form to send an email, we show all emails of all contacts of object
NEW: Option PRODUCTBATCH_SHOW_WAREHOUSE_ON_SHIPMENT showing wh on PDF
@ -163,7 +159,6 @@ NEW: SMTP using oauth2 authentication
NEW: can substitue project title in mail template
NEW: Supplier order list - Add column private and public note
NEW: Support IP type in extrafields
NEW: support multilang in Civilities API
NEW: Table of membership types
NEW: The purge of files can purge only if older than a number of seconds
NEW: Update ActionComm type_code on email message ticket
@ -174,8 +169,11 @@ NEW: expand/collapse permissions on user permission page
For developers or integrators:
------------------------------
NEW: ModuleBuilder can generate code of class from an existing SQL table
NEW: #22370 Modulebuilder supports 'alwayseditable' (like extrafields)
NEW: #20912 Add trigger to record the event of sending an email from a project
NEW: Removed completely the need for library adodbtime
NEW: #21750 Added "Get lines and Post lines from BOM" at the REST Service
NEW: Removed completely the need for the library adodbtime
NEW: hook on agenda pages
NEW: hook to complete payment in TakePOS
NEW: hook "changeHelpURL" to modify target of the help button
@ -186,6 +184,7 @@ NEW: Add new hooks for actioncomm
NEW: conf->global->SYSLOG_FILE_ONEPERSESSION accept a string
NEW: translate for contact type API, setup/ticket API, shipping method API
NEW: All ajax pages have now a top_httphead()
NEW: support multilang in Civilities API
NEW: Add API for the partnership module
NEW: Add "Get lines and Post lines from BOM" in the API
NEW: Replace fk_categories_product with categories_product in inventory

View File

@ -621,7 +621,6 @@ if ($nboftargetok) {
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/scripts`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/src`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/test`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/php-iban/docs`;
$ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`;

View File

@ -347,6 +347,10 @@ if (empty($reshook)) {
$filter['t.numero_compte<='] = $search_accountancy_code_end;
$param .= '&search_accountancy_code_end='.urlencode($search_accountancy_code_end);
}
if (!empty($search_accountancy_aux_code)) {
$filter['t.subledger_account'] = $search_accountancy_aux_code;
$param .= '&search_accountancy_aux_code='.urlencode($search_accountancy_aux_code);
}
if (!empty($search_accountancy_aux_code_start)) {
$filter['t.subledger_account>='] = $search_accountancy_aux_code_start;
$param .= '&search_accountancy_aux_code_start='.urlencode($search_accountancy_aux_code_start);
@ -989,7 +993,7 @@ if ($massactionbutton && $contextpage != 'poslist') {
$moreforfilter = '';
$parameters = array();
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters); // Note that $action and $object may have been modified by hook
$reshook = $hookmanager->executeHooks('printFieldPreListTitle', $parameters, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // Note that $action and $object may have been modified by hook
if (empty($reshook)) {
$moreforfilter .= $hookmanager->resPrint;
} else {
@ -1001,7 +1005,13 @@ print '<table class="tagtable liste centpercent">';
// Filters lines
print '<tr class="liste_titre_filter">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
// Movement number
if (!empty($arrayfields['t.piece_num']['checked'])) {
print '<td class="liste_titre"><input type="text" name="search_mvt_num" size="6" value="'.dol_escape_htmltag($search_mvt_num).'"></td>';
@ -1137,13 +1147,18 @@ if (!empty($arrayfields['t.import_key']['checked'])) {
print '</td>';
}
// Action column
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
print "</tr>\n";
print '<tr class="liste_titre">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
if (!empty($arrayfields['t.piece_num']['checked'])) {
print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, "", $sortfield, $sortorder);
}
@ -1193,7 +1208,9 @@ if (!empty($arrayfields['t.date_validated']['checked'])) {
if (!empty($arrayfields['t.import_key']['checked'])) {
print_liste_field_titre($arrayfields['t.import_key']['label'], $_SERVER["PHP_SELF"], "t.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
print "</tr>\n";
@ -1248,6 +1265,18 @@ while ($i < min($num, $limit)) {
$total_credit += $line->credit;
print '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowraponall center">';
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($line->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$line->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$line->id.'"'.($selected ? ' checked="checked"' : '').' />';
}
print '</td>';
}
// Piece number
if (!empty($arrayfields['t.piece_num']['checked'])) {
@ -1452,15 +1481,17 @@ while ($i < min($num, $limit)) {
}
// Action column
print '<td class="nowraponall center">';
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($line->id, $arrayofselected)) {
$selected = 1;
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowraponall center">';
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($line->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$line->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$line->id.'"'.($selected ? ' checked="checked"' : '').' />';
}
print '<input id="cb'.$line->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$line->id.'"'.($selected ? ' checked="checked"' : '').' />';
print '</td>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;

View File

@ -686,7 +686,7 @@ if ($massaction == 'preunletteringauto') {
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
if ($massactionbutton && $contextpage != 'poslist') {
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
}
@ -740,7 +740,13 @@ print '<table class="tagtable liste centpercent">';
// Filters lines
print '<tr class="liste_titre_filter">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
// Movement number
if (!empty($arrayfields['t.piece_num']['checked'])) {
print '<td class="liste_titre"><input type="text" name="search_mvt_num" class="width50" value="'.dol_escape_htmltag($search_mvt_num).'"></td>';
@ -819,13 +825,18 @@ $reshook = $hookmanager->executeHooks('printFieldListOption', $parameters); // N
print $hookmanager->resPrint;
// Action column
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
print "</tr>\n";
print '<tr class="liste_titre">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
if (!empty($arrayfields['t.piece_num']['checked'])) {
print_liste_field_titre($arrayfields['t.piece_num']['label'], $_SERVER['PHP_SELF'], "t.piece_num", "", $param, '', $sortfield, $sortorder);
}
@ -863,7 +874,9 @@ if (!empty($arrayfields['t.import_key']['checked'])) {
$parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$sortfield, 'sortorder'=>$sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
print "</tr>\n";
$displayed_account_number = null; // Start with undefined to be able to distinguish with empty
@ -976,7 +989,18 @@ while ($i < min($num, $limit)) {
}
print '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowraponall center">';
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($line->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />';
}
print '</td>';
}
// Piece number
if (!empty($arrayfields['t.piece_num']['checked'])) {
print '<td>';
@ -1149,15 +1173,17 @@ while ($i < min($num, $limit)) {
print $hookmanager->resPrint;
// Action column
print '<td class="nowraponall center">';
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($line->id, $arrayofselected)) {
$selected = 1;
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowraponall center">';
if (($massactionbutton || $massaction) && $contextpage != 'poslist') { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($line->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />';
}
print '<input id="cb' . $line->id . '" class="flat checkforselect" type="checkbox" name="toselect[]" value="' . $line->id . '"' . ($selected ? ' checked="checked"' : '') . ' />';
print '</td>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -53,27 +53,20 @@ if ($action == 'set') {
$error++;
}
if (!$error && $gimcdf && !file_exists($gimcdf)) {
setEventMessages($langs->trans("ErrorFileNotFound", $gimcdf), null, 'errors');
$res1 = dolibarr_set_const($db, "GEOIP_VERSION", GETPOST('geoipversion', 'aZ09'), 'chaine', 0, '', $conf->entity);
if (!($res1 > 0)) {
$error++;
}
$res2 = dolibarr_set_const($db, "GEOIPMAXMIND_COUNTRY_DATAFILE", $gimcdf, 'chaine', 0, '', $conf->entity);
if (!($res2 > 0)) {
$error++;
}
if (!$error) {
$res1 = dolibarr_set_const($db, "GEOIP_VERSION", GETPOST('geoipversion', 'aZ09'), 'chaine', 0, '', $conf->entity);
if (!($res1 > 0)) {
$error++;
}
$res2 = dolibarr_set_const($db, "GEOIPMAXMIND_COUNTRY_DATAFILE", $gimcdf, 'chaine', 0, '', $conf->entity);
if (!($res2 > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
//setEventMessages($langs->trans("Error"), null, 'errors');
}
}
@ -112,8 +105,8 @@ print '<td class="right"><input type="submit" class="button button-edit" value="
print "</tr>\n";
// Lib version
print '<tr class="oddeven"><td width="50%">'.$langs->trans("GeoIPLibVersion").'</td>';
print '<td colspan="2">';
print '<tr class="oddeven"><td>'.$langs->trans("GeoIPLibVersion").'</td>';
print '<td>';
$arrayofvalues = array('php' => 'Native PHP functions', '1' => 'Embedded GeoIP v1', '2' => 'Embedded GeoIP v2');
print $form->selectarray('geoipversion', $arrayofvalues, (isset($conf->global->GEOIP_VERSION) ? $conf->global->GEOIP_VERSION : '2'));
if ($conf->global->GEOIP_VERSION == 'php') {
@ -124,16 +117,29 @@ if ($conf->global->GEOIP_VERSION == 'php') {
print '<br>'.$langs->trans("Version").': '.$version;
}
}
print '</td>';
print '<td>';
print '</td></tr>';
$gimcdf = getDolGlobalString('GEOIPMAXMIND_COUNTRY_DATAFILE');
// Path to database file
print '<tr class="oddeven"><td>'.$langs->trans("PathToGeoIPMaxmindCountryDataFile").'</td>';
print '<td colspan="2">';
print '<td>';
if ($conf->global->GEOIP_VERSION == 'php') {
print 'Using geoip PHP internal functions. Value must be '.geoip_db_filename(GEOIP_COUNTRY_EDITION).' or '.geoip_db_filename(GEOIP_CITY_EDITION_REV1).' or /pathtodatafile/GeoLite2-Country.mmdb<br>';
}
print '<input type="text" class="minwidth200" name="GEOIPMAXMIND_COUNTRY_DATAFILE" value="'.dol_escape_htmltag($conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE).'">';
print '<input type="text" class="minwidth200" name="GEOIPMAXMIND_COUNTRY_DATAFILE" value="'.dol_escape_htmltag(getDolGlobalString('GEOIPMAXMIND_COUNTRY_DATAFILE')).'">';
if (!file_exists($gimcdf)) {
print '<div class="error">'.$langs->trans("ErrorFileNotFound", $gimcdf).'</div>';
}
print '</td><td>';
print '<span class="opacitymedium">';
print $langs->trans("Example").'<br>';
print '/usr/local/share/GeoIP/GeoIP.dat<br>
/usr/share/GeoIP/GeoIP.dat<br>
/usr/share/GeoIP/GeoLite2-Country.mmdb';
print '</span>';
print '</td></tr>';
print '</table>';
@ -145,12 +151,16 @@ print '<br>';
print $langs->trans("NoteOnPathLocation").'<br>';
$url1 = 'http://www.maxmind.com/en/city?rId=awstats';
print $langs->trans("YouCanDownloadFreeDatFileTo", '<a href="'.$url1.'" target="_blank" rel="noopener noreferrer external">'.$url1.'</a>');
$textoshow = $langs->trans("YouCanDownloadFreeDatFileTo", '{s1}');
$textoshow = str_replace('{s1}', '<a href="'.$url1.'" target="_blank" rel="noopener noreferrer external">'.$url1.'</a>', $textoshow);
print $textoshow;
print '<br>';
$url2 = 'http://www.maxmind.com/en/city?rId=awstats';
print $langs->trans("YouCanDownloadAdvancedDatFileTo", '<a href="'.$url2.'" target="_blank" rel="noopener noreferrer external">'.$url2.'</a>');
$textoshow = $langs->trans("YouCanDownloadAdvancedDatFileTo", '{s1}');
$textoshow = str_replace('{s1}', '<a href="'.$url2.'" target="_blank" rel="noopener noreferrer external">'.$url2.'</a>', $textoshow);
print $textoshow;
if ($geoip) {
print '<br><br>';

View File

@ -455,6 +455,25 @@ if ($action == 'edit') {
}
print '</td></tr>';
// Auth mode
if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) {
print '<tr class="oddeven smtp_auth_method"><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td><td>';
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
// Note: Default value for MAIN_MAIL_SMTPS_AUTH_TYPE if not defined is 'LOGIN' (but login/pass may be empty and they won't be provided in such a case)
print '<input type="radio" id="radio_pw" name="MAIN_MAIL_SMTPS_AUTH_TYPE" value="LOGIN"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE', 'LOGIN') == 'LOGIN' ? ' checked' : '').'> ';
print '<label for="radio_pw" >'.$langs->trans("UsePassword").'</label>';
print '&nbsp; &nbsp; &nbsp;';
print '<input type="radio" id="radio_oauth" name="MAIN_MAIL_SMTPS_AUTH_TYPE" value="XOAUTH2"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') == 'XOAUTH2' ? ' checked' : '').'> ';
print '<label for="radio_oauth" >'.$form->textwithpicto($langs->trans("UseOauth"), $langs->trans("OauthNotAvailableForAllAndHadToBeCreatedBefore")).'</label>';
} else {
$value = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE', 'LOGIN');
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE"), $htmltext, 1, 'superadmin');
print '<input type="hidden" id="MAIN_MAIL_SMTPS_AUTH_TYPE" name="MAIN_MAIL_SMTPS_AUTH_TYPE" value="'.$value.'">';
}
print '</td></tr>';
}
// ID
if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) {
$mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID) ? $conf->global->MAIN_MAIL_SMTPS_ID : '');
@ -471,24 +490,6 @@ if ($action == 'edit') {
}
// OAUTH
if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) {
print '<tr class="oddeven smtp_auth_method"><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td><td>';
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print '<input type="radio" id="radio_pw" name="MAIN_MAIL_SMTPS_AUTH_TYPE" value="LOGIN"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') == 'LOGIN' ? ' checked' : '').'> ';
print '<label for="radio_pw" >'.$langs->trans("UsePassword").'</label>';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="radio" id="radio_oauth" name="MAIN_MAIL_SMTPS_AUTH_TYPE" value="XOAUTH2"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') == 'XOAUTH2' ? ' checked' : '').'> ';
print '<label for="radio_oauth" >'.$form->textwithpicto($langs->trans("UseOauth"), $langs->trans("OauthNotAvailableForAllAndHadToBeCreatedBefore")).'</label>';
} else {
$value = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE', 'LOGIN');
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE"), $htmltext, 1, 'superadmin');
print '<input type="hidden" id="MAIN_MAIL_SMTPS_AUTH_TYPE" name="MAIN_MAIL_SMTPS_AUTH_TYPE" value="'.$value.'">';
}
print '</td></tr>';
}
// PW
if (!empty($conf->use_javascript_ajax) || (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')))) {
$mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW) ? $conf->global->MAIN_MAIL_SMTPS_PW : '');
@ -705,11 +706,6 @@ if ($action == 'edit') {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).'</td><td>'.(!empty($conf->global->MAIN_MAIL_SMTP_PORT) ? $conf->global->MAIN_MAIL_SMTP_PORT : '').'</td></tr>';
}
// SMTPS ID
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>'.$conf->global->MAIN_MAIL_SMTPS_ID.'</td></tr>';
}
// AUTH method
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) {
$authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE', 'LOGIN');
@ -717,6 +713,11 @@ if ($action == 'edit') {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td><td>'.$text.'</td></tr>';
}
// SMTPS ID
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer'))) {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>'.$conf->global->MAIN_MAIL_SMTPS_ID.'</td></tr>';
}
// SMTPS PW
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail'), array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE') != "XOAUTH2") {
print '<tr class="oddeven"><td>'.$langs->trans("MAIN_MAIL_SMTPS_PW").'</td><td>'.preg_replace('/./', '*', $conf->global->MAIN_MAIL_SMTPS_PW).'</td></tr>';

View File

@ -34,10 +34,6 @@ $langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'err
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'aZ09');
if (!$user->admin) {
accessforbidden();
}
$usersignature = $user->signature;
// For action = test or send, we ensure that content is not html, even for signature, because this we want a test with NO html.
if ($action == 'test' || $action == 'send') {
@ -61,6 +57,10 @@ $substitutionarrayfortest = array(
);
complete_substitutions_array($substitutionarrayfortest, $langs);
// Security check
if (!$user->admin) {
accessforbidden();
}
/*
@ -394,6 +394,25 @@ if ($action == 'edit') {
}
print '</td></tr>';
// AUTH method
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) {
print '<tr class="oddeven smtp_auth_method hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td><td>';
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
// Note: Default value for MAIN_MAIL_SMTPS_AUTH_TYPE if not defined is 'LOGIN' (but login/pass may be empty and they won't be provided in such a case)
print '<input type="radio" id="radio_pw" name="MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING" value="LOGIN"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING', 'LOGIN') == 'LOGIN' ? ' checked' : '').'> ';
print '<label for="radio_pw" >'.$langs->trans("UsePassword").'</label>';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="radio" id="radio_oauth" name="MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING" value="XOAUTH2"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING') == 'XOAUTH2' ? ' checked' : '').'> ';
print '<label for="radio_oauth" >'.$form->textwithpicto($langs->trans("UseOauth"), $langs->trans("OauthNotAvailableForAllAndHadToBeCreatedBefore")).'</label>';
} else {
$value = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING', 'LOGIN');
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE"), $htmltext, 1, 'superadmin');
print '<input type="hidden" id="MAIN_MAIL_SMTPS_AUTH_TYPE" name="MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING" value="'.$value.'">';
}
print '</td></tr>';
}
// ID
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) {
$mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_ID_EMAILING : '');
@ -409,24 +428,6 @@ if ($action == 'edit') {
print '</td></tr>';
}
// OAUTH
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) {
print '<tr class="oddeven smtp_auth_method hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td><td>';
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) {
print '<input type="radio" id="radio_pw" name="MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING" value="LOGIN"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING') == 'LOGIN' ? ' checked' : '').'> ';
print '<label for="radio_pw" >'.$langs->trans("UsePassword").'</label>';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="radio" id="radio_oauth" name="MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING" value="XOAUTH2"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING') == 'XOAUTH2' ? ' checked' : '').'> ';
print '<label for="radio_oauth" >'.$form->textwithpicto($langs->trans("UseOauth"), $langs->trans("OauthNotAvailableForAllAndHadToBeCreatedBefore")).'</label>';
} else {
$value = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING', 'LOGIN');
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE"), $htmltext, 1, 'superadmin');
print '<input type="hidden" id="MAIN_MAIL_SMTPS_AUTH_TYPE" name="MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING" value="'.$value.'">';
}
print '</td></tr>';
}
// PW
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) {
$mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW_EMAILING) ? $conf->global->MAIN_MAIL_SMTPS_PW_EMAILING : '');
@ -442,7 +443,7 @@ if ($action == 'edit') {
print '</td></tr>';
}
// OAUTH service provider
// OAUTH service provider
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')))) {
print '<tr class="oddeven smtp_oauth_service hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE").'</td><td>';
@ -546,11 +547,6 @@ if ($action == 'edit') {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).'</td><td>'.(!empty($conf->global->MAIN_MAIL_SMTP_PORT_EMAILING) ? $conf->global->MAIN_MAIL_SMTP_PORT_EMAILING : '').'</td></tr>';
}
// SMTPS ID
if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>'.getDolGlobalString('MAIN_MAIL_SMTPS_ID_EMAILING').'</td></tr>';
}
// AUTH method
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_EMAILING'), array('smtps', 'swiftmailer'))) {
$authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING', 'LOGIN');
@ -558,6 +554,11 @@ if ($action == 'edit') {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td><td>'.$text.'</td></tr>';
}
// SMTPS ID
if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer'))) {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>'.getDolGlobalString('MAIN_MAIL_SMTPS_ID_EMAILING').'</td></tr>';
}
// SMTPS PW
if (isset($conf->global->MAIN_MAIL_SENDMODE_EMAILING) && in_array($conf->global->MAIN_MAIL_SENDMODE_EMAILING, array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_EMAILING') != "XOAUTH2") {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_PW").'</td><td>'.preg_replace('/./', '*', getDolGlobalString('MAIN_MAIL_SMTPS_PW_EMAILING')).'</td></tr>';
@ -707,8 +708,8 @@ if ($action == 'edit') {
$formmail->withfrom = 1;
$formmail->witherrorsto = 1;
$formmail->withto = (GETPOSTISSET('sendto') ? GETPOST('sendto', 'restricthtml') : ($user->email ? $user->email : 1));
$formmail->withtocc = (GETPOSTISSET(['sendtocc']) ? GETPOST('sendtocc', 'restricthtml') : 1); // ! empty to keep field if empty
$formmail->withtoccc = (GETPOSTISSET(['sendtoccc']) ? GETPOST('sendtoccc', 'restricthtml') : 1); // ! empty to keep field if empty
$formmail->withtocc = (GETPOSTISSET('sendtocc') ? GETPOST('sendtocc', 'restricthtml') : 1); // ! empty to keep field if empty
$formmail->withtoccc = (GETPOSTISSET('sendtoccc') ? GETPOST('sendtoccc', 'restricthtml') : 1); // ! empty to keep field if empty
$formmail->withtopic = (GETPOSTISSET('subject') ? GETPOST('subject') : $langs->trans("Test"));
$formmail->withtopicreadonly = 0;
$formmail->withfile = 2;

View File

@ -32,23 +32,28 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'errors'));
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha');
$cancel = GETPOST('cancel', 'aZ09');
$usersignature = $user->signature;
// For action = test or send, we ensure that content is not html, even for signature, because this we want a test with NO html.
if ($action == 'test' || $action == 'send') {
$usersignature = dol_string_nohtmltag($usersignature);
$usersignature = dol_string_nohtmltag($usersignature, 2);
}
$substitutionarrayfortest = array(
'__LOGIN__' => $user->login,
'__ID__' => 'TESTIdRecord',
'__EMAIL__' => 'TESTEMail',
'__LASTNAME__' => 'TESTLastname',
'__FIRSTNAME__' => 'TESTFirstname',
'__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''),
'__SENDEREMAIL_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails
//'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet
'__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT,
'__ID__' => 'TESTIdRecord',
'__EMAIL__' => 'TESTEMail',
'__LOGIN__' => $user->login,
'__LASTNAME__' => 'TESTLastname',
'__FIRSTNAME__' => 'TESTFirstname',
'__ADDRESS__'=> 'RecipientAddress',
'__ZIP__'=> 'RecipientZip',
'__TOWN_'=> 'RecipientTown',
'__COUNTRY__'=> 'RecipientCountry',
'__USER_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''),
'__SENDEREMAIL_SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN)) ? $usersignature : ''), // Done into actions_sendmails
//'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet
);
complete_substitutions_array($substitutionarrayfortest, $langs);
@ -94,10 +99,10 @@ $trackid = (($action == 'testhtml') ? "testhtml" : "test");
$sendcontext = 'ticket'; // Force to use dedicated context of setup for ticket
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
if ($action == 'presend' && GETPOST('trackid') == 'test') {
if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'test') {
$action = 'test';
}
if ($action == 'presend' && GETPOST('trackid') == 'testhtml') {
if ($action == 'presend' && GETPOST('trackid', 'alphanohtml') == 'testhtml') {
$action = 'testhtml';
}
@ -317,12 +322,15 @@ if ($action == 'edit') {
// Host server
print '<tr class="oddeven hideifdefault"><td>';
print '<tr class="oddeven hideifdefault">';
if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail') {
print '<td>';
print $langs->trans("MAIN_MAIL_SMTP_SERVER_NotAvailableOnLinuxLike");
print '</td><td>';
print $langs->trans("SeeLocalSendMailSetup");
print '<span class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span>';
print '</td>';
} else {
print '<td>';
$mainserver = (!empty($conf->global->MAIN_MAIL_SMTP_SERVER_TICKET) ? $conf->global->MAIN_MAIL_SMTP_SERVER_TICKET : '');
$smtpserver = ini_get('SMTP') ?ini_get('SMTP') : $langs->transnoentities("Undefined");
if ($linuxlike) {
@ -333,17 +341,18 @@ if ($action == 'edit') {
print '</td><td>';
// SuperAdministrator access only
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print '<input class="flat" id="MAIN_MAIL_SMTP_SERVER_TICKET" name="MAIN_MAIL_SMTP_SERVER_TICKET" size="18" value="'.$mainserver.'">';
print '<input class="flat minwidth300" id="MAIN_MAIL_SMTP_SERVER_TICKET" name="MAIN_MAIL_SMTP_SERVER_TICKET" size="18" value="'.$mainserver.'">';
print '<input type="hidden" id="MAIN_MAIL_SMTP_SERVER_TICKET_sav" name="MAIN_MAIL_SMTP_SERVER_TICKET_sav" value="'.$mainserver.'">';
print '<span id="smtp_server_mess">'.$langs->trans("SeeLocalSendMailSetup").'</span>';
print '<span id="smtp_server_mess" class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span>';
} else {
$text = !empty($mainserver) ? $mainserver : $smtpserver;
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($text, $htmltext, 1, 'superadmin');
print '<input type="hidden" id="MAIN_MAIL_SMTP_SERVER_TICKET" name="MAIN_MAIL_SMTP_SERVER_TICKET" value="'.$mainserver.'">';
}
print '</td>';
}
print '</td></tr>';
print '</tr>';
// Port
@ -351,7 +360,7 @@ if ($action == 'edit') {
if (!$conf->use_javascript_ajax && $linuxlike && $conf->global->MAIN_MAIL_SENDMODE_TICKET == 'mail') {
print $langs->trans("MAIN_MAIL_SMTP_PORT_NotAvailableOnLinuxLike");
print '</td><td>';
print $langs->trans("SeeLocalSendMailSetup");
print '<span class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span>';
} else {
$mainport = (!empty($conf->global->MAIN_MAIL_SMTP_PORT_TICKET) ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : '');
$smtpport = ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined");
@ -365,7 +374,7 @@ if ($action == 'edit') {
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
print '<input class="flat" id="MAIN_MAIL_SMTP_PORT_TICKET" name="MAIN_MAIL_SMTP_PORT_TICKET" size="3" value="'.$mainport.'">';
print '<input type="hidden" id="MAIN_MAIL_SMTP_PORT_TICKET_sav" name="MAIN_MAIL_SMTP_PORT_TICKET_sav" value="'.$mainport.'">';
print '<span id="smtp_port_mess">'.$langs->trans("SeeLocalSendMailSetup").'</span>';
print '<span id="smtp_port_mess" class="opacitymedium">'.$langs->trans("SeeLocalSendMailSetup").'</span>';
} else {
$text = (!empty($mainport) ? $mainport : $smtpport);
$htmltext = $langs->trans("ContactSuperAdminForChange");
@ -375,6 +384,25 @@ if ($action == 'edit') {
}
print '</td></tr>';
// AUTH method
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
print '<tr class="oddeven smtp_auth_method hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td><td>';
if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
// Note: Default value for MAIN_MAIL_SMTPS_AUTH_TYPE if not defined is 'LOGIN' (but login/pass may be empty and they won't be provided in such a case)
print '<input type="radio" id="radio_pw" name="MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET" value="LOGIN"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET', 'LOGIN') == 'LOGIN' ? ' checked' : '').'> ';
print '<label for="radio_pw" >'.$langs->trans("UsePassword").'</label>';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="radio" id="radio_oauth" name="MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET" value="XOAUTH2"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET') == 'XOAUTH2' ? ' checked' : '').'> ';
print '<label for="radio_oauth" >'.$form->textwithpicto($langs->trans("UseOauth"), $langs->trans("OauthNotAvailableForAllAndHadToBeCreatedBefore")).'</label>';
} else {
$value = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET', 'LOGIN');
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE"), $htmltext, 1, 'superadmin');
print '<input type="hidden" id="MAIN_MAIL_SMTPS_AUTH_TYPE" name="MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET" value="'.$value.'">';
}
print '</td></tr>';
}
// ID
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
$mainstmpid = (!empty($conf->global->MAIN_MAIL_SMTPS_ID_TICKET) ? $conf->global->MAIN_MAIL_SMTPS_ID_TICKET : '');
@ -390,25 +418,6 @@ if ($action == 'edit') {
print '</td></tr>';
}
// OAUTH
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
print '<tr class="oddeven smtp_auth_method hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td><td>';
if (empty($conf->multicompany->enabled) || ($user->admin && !$user->entity)) {
print '<input type="radio" id="radio_pw" name="MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET" value="LOGIN"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET') == 'LOGIN' ? ' checked' : '').'> ';
print '<label for="radio_pw" >'.$langs->trans("UsePassword").'</label>';
print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
print '<input type="radio" id="radio_oauth" name="MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET" value="XOAUTH2"'.(getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET') == 'XOAUTH2' ? ' checked' : '').'> ';
print '<label for="radio_oauth" >'.$form->textwithpicto($langs->trans("UseOauth"), $langs->trans("OauthNotAvailableForAllAndHadToBeCreatedBefore")).'</label>';
} else {
$value = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET', 'LOGIN');
$htmltext = $langs->trans("ContactSuperAdminForChange");
print $form->textwithpicto($langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE"), $htmltext, 1, 'superadmin');
print '<input type="hidden" id="MAIN_MAIL_SMTPS_AUTH_TYPE" name="MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET" value="'.$value.'">';
}
print '</td></tr>';
}
// PW
if (!empty($conf->use_javascript_ajax) || (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')))) {
$mainsmtppw = (!empty($conf->global->MAIN_MAIL_SMTPS_PW_TICKET) ? $conf->global->MAIN_MAIL_SMTPS_PW_TICKET : '');
@ -514,11 +523,6 @@ if ($action == 'edit') {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTP_PORT", ini_get('smtp_port') ?ini_get('smtp_port') : $langs->transnoentities("Undefined")).'</td><td>'.(!empty($conf->global->MAIN_MAIL_SMTP_PORT_TICKET) ? $conf->global->MAIN_MAIL_SMTP_PORT_TICKET : '').'</td></tr>';
}
// SMTPS ID
if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>'.$conf->global->MAIN_MAIL_SMTPS_ID_TICKET.'</td></tr>';
}
// AUTH method
if (in_array(getDolGlobalString('MAIN_MAIL_SENDMODE_TICKET'), array('smtps', 'swiftmailer'))) {
$authtype = getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET', 'LOGIN');
@ -526,6 +530,11 @@ if ($action == 'edit') {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_AUTH_TYPE").'</td><td>'.$text.'</td></tr>';
}
// SMTPS ID
if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer'))) {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_ID").'</td><td>'.$conf->global->MAIN_MAIL_SMTPS_ID_TICKET.'</td></tr>';
}
// SMTPS PW
if (isset($conf->global->MAIN_MAIL_SENDMODE_TICKET) && in_array($conf->global->MAIN_MAIL_SENDMODE_TICKET, array('smtps', 'swiftmailer')) && getDolGlobalString('MAIN_MAIL_SMTPS_AUTH_TYPE_TICKET') != "XOAUTH2") {
print '<tr class="oddeven hideifdefault"><td>'.$langs->trans("MAIN_MAIL_SMTPS_PW").'</td><td>'.preg_replace('/./', '*', $conf->global->MAIN_MAIL_SMTPS_PW_TICKET).'</td></tr>';
@ -621,6 +630,7 @@ if ($action == 'edit') {
// Run the test to connect
if ($action == 'testconnect') {
print '<div id="formmailaftertstconnect" name="formmailaftertstconnect"></div>';
print load_fiche_titre($langs->trans("DoTestServerAvailability"));
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
@ -651,8 +661,8 @@ if ($action == 'edit') {
// Cree l'objet formulaire mail
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
$formmail = new FormMail($db);
$formmail->fromname = (GETPOSTISSET('fromname') ? GETPOST('fromname') : $conf->global->MAIN_MAIL_EMAIL_FROM);
$formmail->frommail = (GETPOSTISSET('frommail') ? GETPOST('frommail') : $conf->global->MAIN_MAIL_EMAIL_FROM);
$formmail->fromname = (GETPOSTISSET('fromname') ? GETPOST('fromname', 'restricthtml') : $conf->global->MAIN_MAIL_EMAIL_FROM);
$formmail->frommail = (GETPOSTISSET('frommail') ? GETPOST('frommail', 'restricthtml') : $conf->global->MAIN_MAIL_EMAIL_FROM);
$formmail->trackid = (($action == 'testhtml') ? "testhtml" : "test");
$formmail->withfromreadonly = 0;
$formmail->withsubstit = 0;
@ -679,7 +689,7 @@ if ($action == 'edit') {
$formmail->param["returnurl"] = $_SERVER["PHP_SELF"];
// Init list of files
if (GETPOST("mode") == 'init') {
if (GETPOST("mode", "aZ09") == 'init') {
$formmail->clear_attached_files();
}

View File

@ -46,7 +46,7 @@ $allow_disable_encryption = true;
*/
if ($action == 'setgeneraterule') {
if (!dolibarr_set_const($db, 'USER_PASSWORD_GENERATED', $_GET["value"], 'chaine', 0, '', $conf->entity)) {
if (!dolibarr_set_const($db, 'USER_PASSWORD_GENERATED', GETPOST("value", "alphanohtml"), 'chaine', 0, '', $conf->entity)) {
dol_print_error($db);
}
}
@ -56,7 +56,11 @@ if ($action == 'activate_encrypt') {
$db->begin();
dolibarr_set_const($db, "DATABASE_PWD_ENCRYPTED", "1", 'chaine', 0, '', $conf->entity);
// On old version a bug created the constant into user entity, so we delete it to be sure, such entry won't exists. We want it in entity 0 or nowhere.
dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED", "1", 'chaine', 0, '', $conf->entity);
// We set entity=0 (all) because DATABASE_PWD_ENCRYPTED is a setup into conf file, so always shared for everybody
$entityforall = 0;
dolibarr_set_const($db, "DATABASE_PWD_ENCRYPTED", "1", 'chaine', 0, '', $entityforall);
$sql = "SELECT u.rowid, u.pass, u.pass_crypted";
$sql .= " FROM ".MAIN_DB_PREFIX."user as u";
@ -377,7 +381,8 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso") {
}
// Cryptage mot de passe
// Crypt passwords in database
print '<br>';
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
@ -393,20 +398,20 @@ print '</tr>';
// Disable clear password in database
print '<tr class="oddeven">';
print '<td colspan="3">'.$langs->trans("DoNotStoreClearPassword").'</td>';
print '<td align="center" width="60">';
print '<td class="center" width="60">';
if (getDolGlobalString('DATABASE_PWD_ENCRYPTED')) {
print img_picto($langs->trans("Active"), 'tick');
}
print '</td>';
if (!getDolGlobalString('DATABASE_PWD_ENCRYPTED')) {
print '<td align="center" width="100">';
print '<a class="reposition" href="security.php?action=activate_encrypt&token='.newToken().'">'.$langs->trans("Activate").'</a>';
print '<td class="center" width="100">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=activate_encrypt&token='.newToken().'">'.$langs->trans("Activate").'</a>';
print "</td>";
}
// Database conf file encryption
if (getDolGlobalString('DATABASE_PWD_ENCRYPTED')) {
print '<td align="center" width="100">';
print '<td class="center" width="100">';
if ($allow_disable_encryption) {
//On n'autorise pas l'annulation de l'encryption car les mots de passe ne peuvent pas etre decodes
//Do not allow "disable encryption" as passwords cannot be decrypted
@ -419,7 +424,8 @@ if (getDolGlobalString('DATABASE_PWD_ENCRYPTED')) {
print "</td>";
print '</tr>';
// Cryptage du mot de base de la base dans conf.php
// Crypt password into config file conf.php
print '<tr class="oddeven">';
print '<td colspan="3">'.$langs->trans("MainDbPasswordFileConfEncrypted").'</td>';
@ -430,7 +436,7 @@ if (preg_match('/crypted:/i', $dolibarr_main_db_pass) || !empty($dolibarr_main_d
print '</td>';
print '<td align="center" width="100">';
print '<td class="center" width="100">';
if (empty($dolibarr_main_db_pass) && empty($dolibarr_main_db_encrypted_pass)) {
$langs->load("errors");
print img_warning($langs->trans("WarningPassIsEmpty"));
@ -452,18 +458,18 @@ print '</tr>';
print '<tr class="oddeven">';
print '<td colspan="3">'.$langs->trans("DisableForgetPasswordLinkOnLogonPage").'</td>';
print '<td align="center" width="60">';
print '<td class="center" width="60">';
if (getDolGlobalString('MAIN_SECURITY_DISABLEFORGETPASSLINK')) {
print img_picto($langs->trans("Active"), 'tick');
}
print '</td>';
if (!getDolGlobalString('MAIN_SECURITY_DISABLEFORGETPASSLINK')) {
print '<td align="center" width="100">';
print '<td class="center" width="100">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=activate_MAIN_SECURITY_DISABLEFORGETPASSLINK&token='.newToken().'">'.$langs->trans("Activate").'</a>';
print "</td>";
}
if (getDolGlobalString('MAIN_SECURITY_DISABLEFORGETPASSLINK')) {
print '<td align="center" width="100">';
print '<td center="center" width="100">';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=disable_MAIN_SECURITY_DISABLEFORGETPASSLINK&token='.newToken().'">'.$langs->trans("Disable").'</a>';
print "</td>";
}

View File

@ -542,13 +542,13 @@ print '<br>';
print '<strong>MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL</strong> = '.(empty($conf->global->MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL) ? '<span class="opacitymedium">'.$langs->trans("Undefined").' &nbsp; ('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or").' 0)</span>' : $conf->global->MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL)."<br>";
print '<br>';
print '<strong>MAIN_SECURITY_FORCECSP</strong> = '.(empty($conf->global->MAIN_SECURITY_FORCECSP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_FORCECSP).' &nbsp; <span class="opacitymedium">('.$langs->trans("Example").": \"default-src 'self'; img-src *;\")</span><br>";
print '<strong>MAIN_SECURITY_FORCECSP</strong> = '.(empty($conf->global->MAIN_SECURITY_FORCECSP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_FORCECSP).' &nbsp; <span class="opacitymedium">('.$langs->trans("Example").": \"frame-ancestors 'self'; default-src 'self'; img-src *;\")</span><br>";
print '<br>';
print '<strong>MAIN_SECURITY_FORCERP</strong> = '.(empty($conf->global->MAIN_SECURITY_FORCERP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_FORCERP).' &nbsp; <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or")." \"same-origin\")</span><br>";
print '<strong>MAIN_SECURITY_FORCERP</strong> = '.(empty($conf->global->MAIN_SECURITY_FORCERP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->MAIN_SECURITY_FORCERP).' &nbsp; <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or")." \"same-origin\" so browser doesn't send any referrer when going into another web site domain)</span><br>";
print '<br>';
print '<strong>WEBSITE_MAIN_SECURITY_FORCECSP</strong> = '.(empty($conf->global->WEBSITE_MAIN_SECURITY_FORCECSP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->WEBSITE_MAIN_SECURITY_FORCECSP).' &nbsp; <span class="opacitymedium">('.$langs->trans("Example").": \"default-src 'self'; style-src: https://cdnjs.cloudflare.com https://fonts.googleapis.com; script-src: https://cdn.transifex.com https://www.googletagmanager.com; object-src https://youtube.com; frame-src https://youtube.com; img-src: *;\")</span><br>";
print '<strong>WEBSITE_MAIN_SECURITY_FORCECSP</strong> = '.(empty($conf->global->WEBSITE_MAIN_SECURITY_FORCECSP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->WEBSITE_MAIN_SECURITY_FORCECSP).' &nbsp; <span class="opacitymedium">('.$langs->trans("Example").": \"frame-ancestors 'self'; default-src 'self'; style-src https://cdnjs.cloudflare.com https://fonts.googleapis.com; script-src https://cdn.transifex.com https://www.googletagmanager.com; object-src https://youtube.com; frame-src https://youtube.com; img-src *;\")</span><br>";
print '<br>';
print '<strong>WEBSITE_MAIN_SECURITY_FORCERP</strong> = '.(empty($conf->global->WEBSITE_MAIN_SECURITY_FORCERP) ? '<span class="opacitymedium">'.$langs->trans("Undefined").'</span>' : $conf->global->WEBSITE_MAIN_SECURITY_FORCERP).' &nbsp; <span class="opacitymedium">('.$langs->trans("Recommended").': '.$langs->trans("Undefined").' '.$langs->trans("or")." \"strict-origin-when-cross-origin\")</span><br>";

View File

@ -113,6 +113,9 @@ $outputdir = $conf->admin->dir_output.'/backup';
$result = dol_mkdir($outputdir);
$lowmemorydump = GETPOSTISSET("lowmemorydump") ? GETPOST("lowmemorydump") : getDolGlobalString('MAIN_LOW_MEMORY_DUMP');
// MYSQL
if ($what == 'mysql') {
$cmddump = GETPOST("mysqldump", 'none'); // Do not sanitize here with 'alpha', will be sanitize later by dol_sanitizePathName and escapeshellarg
@ -132,7 +135,7 @@ if ($what == 'mysql') {
}
if (!$errormsg) {
$utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file);
$utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file, 0, 0, $lowmemorydump);
$errormsg = $utils->error;
$_SESSION["commandbackuplastdone"] = $utils->result['commandbackuplastdone'];
$_SESSION["commandbackuptorun"] = $utils->result['commandbackuptorun'];
@ -141,7 +144,7 @@ if ($what == 'mysql') {
// MYSQL NO BIN
if ($what == 'mysqlnobin') {
$utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file);
$utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file, 0, 0, $lowmemorydump);
$errormsg = $utils->error;
$_SESSION["commandbackuplastdone"] = $utils->result['commandbackuplastdone'];
@ -170,7 +173,7 @@ if ($what == 'postgresql') {
}
if (!$errormsg) {
$utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file);
$utils->dumpDatabase(GETPOST('compression', 'alpha'), $what, 0, $file, 0, 0, $lowmemorydump);
$errormsg = $utils->error;
$_SESSION["commandbackuplastdone"] = $utils->result['commandbackuplastdone'];
$_SESSION["commandbackuptorun"] = $utils->result['commandbackuptorun'];

View File

@ -513,7 +513,7 @@ if (!empty($moreforfilter)) {
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print '<div class="div-table-responsive">';
@ -523,6 +523,15 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit
// Fields title search
// --------------------------------------------------------------------
print '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
foreach ($object->fields as $key => $val) {
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
if ($key == 'status') {
@ -561,16 +570,22 @@ $parameters = array('arrayfields'=>$arrayfields);
$reshook = $hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
print '</tr>'."\n";
// Fields title label
// --------------------------------------------------------------------
print '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
}
foreach ($object->fields as $key => $val) {
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
if ($key == 'status') {
@ -593,7 +608,9 @@ $parameters = array('arrayfields'=>$arrayfields, 'param'=>$param, 'sortfield'=>$
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
}
print '</tr>'."\n";
@ -624,6 +641,18 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
// Show here line of result
print '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($object->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
foreach ($object->fields as $key => $val) {
$cssforfield = (empty($val['csslist']) ? (empty($val['css']) ? '' : $val['css']) : $val['csslist']);
if (in_array($val['type'], array('date', 'datetime', 'timestamp'))) {
@ -676,15 +705,17 @@ while ($i < ($limit ? min($num, $limit) : $num)) {
$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
// Action column
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($object->id, $arrayofselected)) {
$selected = 1;
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($object->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '<input id="cb'.$object->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$object->id.'"'.($selected ? ' checked="checked"' : '').'>';
print '</td>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -1399,7 +1399,6 @@ class ActionComm extends CommonObject
if (empty($user->rights->agenda->allactions->read)) {
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm_resources AS ar ON a.id = ar.fk_actioncomm AND ar.element_type ='user' AND ar.fk_element = ".((int) $user->id);
}
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON a.fk_soc = s.rowid";
$sql .= " WHERE 1 = 1";
if (empty($load_state_board)) {
$sql .= " AND a.percent >= 0 AND a.percent < 100";

View File

@ -715,7 +715,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
$moreforfilter = '';
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
if ($massactionbutton) {
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
}
@ -729,6 +729,13 @@ print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
print '<tr class="liste_titre_filter">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre" align="middle">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
if (!empty($arrayfields['a.id']['checked'])) {
print '<td class="liste_titre"><input type="text" class="maxwidth50" name="search_id" value="'.$search_id.'"></td>';
}
@ -795,10 +802,12 @@ if (!empty($arrayfields['a.percent']['checked'])) {
print '</td>';
}
// Action column
print '<td class="liste_titre" align="middle">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre" align="middle">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
print '</tr>'."\n";
$totalarray = array();
@ -807,6 +816,9 @@ $totalarray['nbfield'] = 0;
// Fields title label
// --------------------------------------------------------------------
print '<tr class="liste_titre">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
}
if (!empty($arrayfields['a.id']['checked'])) {
print_liste_field_titre($arrayfields['a.id']['label'], $_SERVER["PHP_SELF"], "a.id", $param, "", "", $sortfield, $sortorder);
$totalarray['nbfield']++;
@ -868,7 +880,9 @@ if (!empty($arrayfields['a.percent']['checked'])) {
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "a.percent", $param, "", 'align="center"', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
}
$totalarray['nbfield']++;
print "</tr>\n";
@ -921,7 +935,18 @@ while ($i < $imaxinloop) {
}
print '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
// Ref
if (!empty($arrayfields['a.id']['checked'])) {
print '<td class="nowraponall">';
@ -1100,15 +1125,17 @@ while ($i < $imaxinloop) {
print '<td align="center" class="nowrap">'.$actionstatic->LibStatut($obj->percent, 5, 0, $datep).'</td>';
}
// Action column
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->id, $arrayofselected)) {
$selected = 1;
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '<input id="cb'.$obj->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->id.'"'.($selected ? ' checked="checked"' : '').'>';
print '</td>';
}
print '</td>';
print '</tr>'."\n";

View File

@ -158,7 +158,7 @@ if (empty($reshook)) {
$action = "";
}
// set accountancy code
// Set accountancy code
if ($action == 'setcustomeraccountancycode') {
$result = $object->fetch($id);
$object->code_compta_client = GETPOST("customeraccountancycode");
@ -169,7 +169,7 @@ if (empty($reshook)) {
}
}
// terms of the settlement
// Payment terms of the settlement
if ($action == 'setconditions' && $user->rights->societe->creer) {
$object->fetch($id);
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'), GETPOST('cond_reglement_id_deposit_percent', 'alpha'));
@ -178,7 +178,7 @@ if (empty($reshook)) {
}
}
// mode de reglement
// Payment mode
if ($action == 'setmode' && $user->rights->societe->creer) {
$object->fetch($id);
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
@ -187,7 +187,7 @@ if (empty($reshook)) {
}
}
// transport mode
// Transport mode
if ($action == 'settransportmode' && $user->rights->societe->creer) {
$object->fetch($id);
$result = $object->setTransportMode(GETPOST('transport_mode_id', 'alpha'));
@ -421,7 +421,7 @@ if ($object->id > 0) {
print "</td>";
print '</tr>';
// Mode de reglement par defaut
// Default payment mode
print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentMode');
@ -440,7 +440,7 @@ if ($object->id > 0) {
print '</tr>';
if (isModEnabled("banque")) {
// Compte bancaire par défaut
// Default bank account for payments
print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentBankAccount');

View File

@ -522,9 +522,10 @@ if (empty($reshook)) {
exit;
}
$mesgs[] = $object->error;
$mesgs = array_merge($mesgs, $object->errors);
}
setEventMessages(null, $mesgs, 'errors');
setEventMessages('', $mesgs, 'errors');
$action = "create";
}
@ -609,9 +610,10 @@ if (empty($reshook)) {
exit;
}
$mesgs[] = $object->error;
$mesgs = array_merge($mesgs, $object->errors);
}
setEventMessages($mesg, $mesgs, 'errors');
setEventMessages('', $mesgs, 'errors');
$action = "edit";
} else {
$action = "edit";

View File

@ -209,12 +209,12 @@ $checkedtypetiers = 0;
$arrayfields = array(
'p.ref'=>array('label'=>"Ref", 'checked'=>1),
'p.ref_client'=>array('label'=>"RefCustomer", 'checked'=>-1),
'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(!isModEnabled('project') ? 0 : 1)),
'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(!isModEnabled('project') ? 0 : 1)),
'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(isModEnabled('project') ? 1 : 0)),
'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(isModEnabled('project') ? 1 : 0)),
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1),
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>-1),
's.town'=>array('label'=>"Town", 'checked'=>-1),
's.zip'=>array('label'=>"Zip", 'checked'=>1),
's.zip'=>array('label'=>"Zip", 'checked'=>-1),
'state.nom'=>array('label'=>"StateShort", 'checked'=>0),
'country.code_iso'=>array('label'=>"Country", 'checked'=>0),
'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers),
@ -1430,6 +1430,14 @@ if ($resql) {
}
print "</tr>\n";
$totalarray = array(
'nbfield' => 0,
'val' => array(
'p.total_ht' => 0,
'p.total_tva' => 0,
'p.total_ttc' => 0,
),
);
// Fields title
print '<tr class="liste_titre">';
@ -1550,14 +1558,6 @@ if ($resql) {
if (!empty($arrayfields['total_mark_rate']['checked'])) {
print_liste_field_titre($arrayfields['total_mark_rate']['label'], $_SERVER['PHP_SELF'], '', '', $param, 'class="right"', $sortfield, $sortorder);
}
$totalarray = array(
'nbfield' => 0,
'val' => array(
'p.total_ht' => 0,
'p.total_tva' => 0,
'p.total_ttc' => 0,
),
);
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
@ -1570,6 +1570,7 @@ if ($resql) {
);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
if (!empty($arrayfields['p.datec']['checked'])) {
print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
@ -1614,6 +1615,7 @@ if ($resql) {
$savnbfield = $totalarray['nbfield'];
$totalarray = array();
$totalarray['nbfield'] = 0;
$imaxinloop = ($limit ? min($num, $limit) : $num);
while ($i < $imaxinloop) {
$obj = $db->fetch_object($resql);
@ -2076,7 +2078,7 @@ if ($resql) {
if (!empty($arrayfields['sale_representative']['checked'])) {
// Sales representatives
print '<td class="tdoverflowmax200">';
print '<td class="tdoverflowmax150">';
if ($obj->socid > 0) {
$listsalesrepresentatives = $companystatic->getSalesRepresentatives($user);
if ($listsalesrepresentatives < 0) {

View File

@ -59,7 +59,10 @@ $search_number = GETPOST('search_number', 'alpha');
$search_status = GETPOST('search_status') ?GETPOST('search_status', 'alpha') : 'opened'; // 'all' or ''='opened'
$optioncss = GETPOST('optioncss', 'alpha');
$search_category_list = GETPOST("search_category_".Categorie::TYPE_ACCOUNT."_list", "array");
$search_category_list ="";
if (isModEnabled('categorie')) {
$search_category_list = GETPOST("search_category_".Categorie::TYPE_ACCOUNT."_list", "array");
}
$socid = 0;
// Security check
@ -384,7 +387,7 @@ if (!empty($moreforfilter)) {
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you dont need reserved height for your table
@ -393,7 +396,13 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit
// Fields title search
// --------------------------------------------------------------------
print '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
// Ref
if (!empty($arrayfields['b.ref']['checked'])) {
print '<td class="liste_titre">';
@ -469,15 +478,20 @@ if (!empty($arrayfields['balance']['checked'])) {
print '<td class="liste_titre"></td>';
}
// Action column
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
print '</tr>'."\n";
// Fields title label
// --------------------------------------------------------------------
print '<tr class="liste_titre">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
if (!empty($arrayfields['b.ref']['checked'])) {
print_liste_field_titre($arrayfields['b.ref']['label'], $_SERVER["PHP_SELF"], 'b.ref', '', $param, '', $sortfield, $sortorder);
}
@ -520,7 +534,9 @@ if (!empty($arrayfields['b.clos']['checked'])) {
if (!empty($arrayfields['balance']['checked'])) {
print_liste_field_titre($arrayfields['balance']['label'], $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'right ');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
print "</tr>\n";
@ -551,7 +567,18 @@ foreach ($accounts as $key => $type) {
}
print '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($objecttmp->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$objecttmp->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$objecttmp->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
// Ref
if (!empty($arrayfields['b.ref']['checked'])) {
print '<td class="nowraponall">'.$objecttmp->getNomUrl(1).'</td>';
@ -734,15 +761,17 @@ foreach ($accounts as $key => $type) {
}
// Action column
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($objecttmp->id, $arrayofselected)) {
$selected = 1;
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($objecttmp->id, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$objecttmp->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$objecttmp->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '<input id="cb'.$objecttmp->id.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$objecttmp->id.'"'.($selected ? ' checked="checked"' : '').'>';
print '</td>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -567,16 +567,17 @@ if (isModEnabled('socialnetworks')) {
if ($value['active'] && strlen($search_[$key])) {
$searchkeyinjsonformat = preg_replace('/"$/', '', preg_replace('/^"/', '', json_encode($search_[$key])));
if (in_array($db->type, array('mysql', 'mysqli'))) {
$sql .= " AND p.socialnetworks REGEXP '\"".$db->escapeforlike($db->escape($key))."\":\"[^\"]*".$db->escapeforlike($db->escape($searchkeyinjsonformat))."'";
$sql .= " AND p.socialnetworks REGEXP '\"".$db->escape($db->escapeforlike($key))."\":\"[^\"]*".$db->escape($db->escapeforlike($searchkeyinjsonformat))."'";
} elseif ($db->type == 'pgsql') {
$sql .= " AND p.socialnetworks ~ '\"".$db->escapeforlike($db->escape($key))."\":\"[^\"]*".$db->escapeforlike($db->escape($searchkeyinjsonformat))."'";
$sql .= " AND p.socialnetworks ~ '\"".$db->escape($db->escapeforlike($key))."\":\"[^\"]*".$db->escape($db->escapeforlike($searchkeyinjsonformat))."'";
} else {
// Works with all database but not reliable because search only for social network code starting with earched value
$sql .= " AND p.socialnetworks LIKE '%\"".$db->escapeforlike($db->escape($key))."\":\"".$db->escapeforlike($db->escape($searchkeyinjsonformat))."%'";
$sql .= " AND p.socialnetworks LIKE '%\"".$db->escape($db->escapeforlike($key))."\":\"".$db->escape($db->escapeforlike($searchkeyinjsonformat))."%'";
}
}
}
}
//print $sql;
if (strlen($search_email)) {
$sql .= natural_search('p.email', $search_email);
}

View File

@ -618,7 +618,7 @@ if (!empty($moreforfilter)) {
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
if ($massactionbutton) {
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
}
@ -627,6 +627,13 @@ print '<div class="div-table-responsive">';
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
print '<tr class="liste_titre_filter">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
if (!empty($arrayfields['c.ref']['checked'])) {
print '<td class="liste_titre">';
print '<input type="text" class="flat" size="3" name="search_contract" value="'.dol_escape_htmltag($search_contract).'">';
@ -723,13 +730,20 @@ if (!empty($arrayfields['lower_planned_end_date']['checked'])) {
if (!empty($arrayfields['status']['checked'])) {
print '<td class="liste_titre right" colspan="4"></td>';
}
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
print "</tr>\n";
print '<tr class="liste_titre">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
if (!empty($arrayfields['c.ref']['checked'])) {
print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder);
}
@ -787,7 +801,9 @@ if (!empty($arrayfields['status']['checked'])) {
print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
print_liste_field_titre($staticcontratligne->LibStatut(5, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
print "</tr>\n";
$totalarray = array();
@ -826,7 +842,18 @@ while ($i < min($num, $limit)) {
print '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
// Ref
if (!empty($arrayfields['c.ref']['checked'])) {
print '<td class="nowraponall">';
@ -1002,15 +1029,17 @@ while ($i < min($num, $limit)) {
print '<td class="center">'.($obj->nb_closed > 0 ? $obj->nb_closed : '').'</td>';
}
// Action column
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
print '</td>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -99,8 +99,7 @@ class box_commandes extends ModeleBoxes
$sql .= ", c.total_ht";
$sql .= ", c.total_tva";
$sql .= ", c.total_ttc";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."commande as c";
$sql .= " FROM ".MAIN_DB_PREFIX."commande as c, ".MAIN_DB_PREFIX."societe as s";
if (empty($user->rights->societe->client->voir) && !$user->socid) {
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
}

View File

@ -99,11 +99,10 @@ class box_factures extends ModeleBoxes
$sql .= ", s.code_client, s.code_compta, s.client";
$sql .= ", s.logo, s.email, s.entity";
$sql .= ", s.tva_intra, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6";
$sql .= " FROM (".MAIN_DB_PREFIX."societe as s,".MAIN_DB_PREFIX."facture as f";
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."societe as s";
if (empty($user->rights->societe->client->voir) && !$user->socid) {
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
}
$sql .= ")";
$sql .= " WHERE f.fk_soc = s.rowid";
$sql .= " AND f.entity IN (".getEntity('invoice').")";
if (empty($user->rights->societe->client->voir) && !$user->socid) {

View File

@ -88,8 +88,7 @@ class box_propales extends ModeleBoxes
$sql .= ", s.code_client, s.code_compta, s.client";
$sql .= ", s.logo, s.email, s.entity";
$sql .= ", p.rowid, p.ref, p.fk_statut as status, p.datep as dp, p.datec, p.fin_validite, p.date_cloture, p.total_ht, p.total_tva, p.total_ttc, p.tms";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql .= ", ".MAIN_DB_PREFIX."propal as p";
$sql .= " FROM ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."societe as s";
if (empty($user->rights->societe->client->voir) && !$user->socid) {
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
}

View File

@ -267,7 +267,7 @@ class CMailFile
}
// Set atleastoneimage if there is at least one embedded file (into ->html_images)
if ($findimg) {
if ($findimg > 0) {
foreach ($this->html_images as $i => $val) {
if ($this->html_images[$i]) {
$this->atleastoneimage = 1;

View File

@ -1756,8 +1756,8 @@ abstract class CommonInvoice extends CommonObject
if ($this->ref_client) {
$complementaryinfo .= '/20/'.$this->ref_client;
}
if ($this->thirdparty->vat_number) {
$complementaryinfo .= '/30/'.$this->thirdparty->vat_number;
if ($this->thirdparty->tva_intra) {
$complementaryinfo .= '/30/'.$this->thirdparty->tva_intra;
}
// Header

View File

@ -923,6 +923,10 @@ class Conf
// Note: Set MAIN_SECURITY_CSRF_TOKEN_RENEWAL_ON_EACH_CALL=1 to have a renewal of token at each page call instead of each session (not recommended)
}
if (!isset($this->global->MAIN_MAIL_ADD_INLINE_IMAGES_IF_DATA)) {
$this->global->MAIN_MAIL_ADD_INLINE_IMAGES_IF_DATA = 1;
}
if (!defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) {
if (defined('MAIN_ANTIVIRUS_COMMAND')) {
$this->global->MAIN_ANTIVIRUS_COMMAND = constant('MAIN_ANTIVIRUS_COMMAND');

View File

@ -46,6 +46,7 @@
* {dol_print_barcode} Print barcode
* {dol_print_logo} Print logo stored on printer. Example : <print_logo>32|32
* {dol_print_logo_old} Print logo stored on printer. Must be followed by logo code. For old printers.
* {dol_print_logo_old_cf} Print logo stored on printer. Must be followed by logo code. For old printers. May help for centering image.
* {dol_print_object_lines} Print object lines
* {dol_print_object_tax} Print object total tax
* {dol_print_object_local_tax} Print object local tax
@ -63,7 +64,8 @@
* <dol_value_month> Replaced by month number
* <dol_value_day> Replaced by day number
* <dol_value_day_letters> Replaced by day number
* <dol_value_currentdate> Replaced by current date
* <dol_value_currentdate> Replaced by current date and time
* <dol_value_currentdate_notime> Replaced by current date without time
* <dol_object_id> Replaced by object id
* <dol_object_ref> Replaced by object ref
* <dol_value_customer_firstname> Replaced by customer firstname
@ -191,10 +193,18 @@ class dolReceiptPrinter extends Printer
'dol_value_day' => 'DOL_VALUE_DAY',
'dol_value_day_letters' => 'DOL_VALUE_DAY',
'dol_value_currentdate' => 'DOL_VALUE_CURRENTDATE',
'dol_value_currentdate_notime' => 'CurrentDateWithTime',
'dol_value_currentdate_letters' => 'DOL_VALUE_CURRENTDATE_LETTERS',
'dol_value_currentyear' => 'CurrentYear',
'dol_value_currentmonth_letters' => 'DOL_VALUE_CURRENT_MONTH_LETTERS',
'dol_value_currentmonth' => 'DOL_VALUE_CURRENT_MONTH',
'dol_value_currentday' => 'DOL_VALUE_CURRENT_DAY',
'dol_value_currentday_letters' => 'DOL_VALUE_CURRENT_DAY',
'dol_print_payment' => 'DOL_PRINT_PAYMENT',
'dol_print_curr_date' => 'DOL_PRINT_CURR_DATE',
'dol_print_logo' => 'DOL_PRINT_LOGO',
'dol_print_logo_old' => 'DOL_PRINT_LOGO_OLD',
'dol_print_logo_old_cf' => 'DOL_PRINT_LOGO_OLD_CF',
'dol_value_object_id' => 'InvoiceID',
'dol_value_object_ref' => 'InvoiceRef',
'dol_print_object_lines' => 'DOL_PRINT_OBJECT_LINES',
@ -577,9 +587,12 @@ class dolReceiptPrinter extends Printer
public function sendToPrinter($object, $templateid, $printerid)
{
global $conf, $mysoc, $langs, $user;
$langs->load('bills');
$error = 0;
$ret = $this->loadTemplate($templateid);
$now = dol_now('tzuser');
// tags a remplacer par leur valeur avant de parser (dol_value_xxx)
$this->template = str_replace('{dol_value_object_id}', $object->id, $this->template);
$this->template = str_replace('{dol_value_object_ref}', $object->ref, $this->template);
@ -591,7 +604,15 @@ class dolReceiptPrinter extends Printer
$this->template = str_replace('{dol_value_month}', dol_print_date($object->date, '%m'), $this->template);
$this->template = str_replace('{dol_value_day}', dol_print_date($object->date, '%d'), $this->template);
$this->template = str_replace('{dol_value_day_letters}', $langs->trans("Day".dol_print_date($object->date, '%m')[1]), $this->template);
$this->template = str_replace('{dol_value_currentdate}', dol_print_date(dol_now(), 'dayhour'), $this->template);
$this->template = str_replace('{dol_value_currentdate}', dol_print_date($now, 'dayhour'), $this->template);
$this->template = str_replace('{dol_value_currentdate_notime}', dol_print_date($now, 'day'), $this->template);
$this->template = str_replace('{dol_value_currentdate_letters}', dol_print_date($now, 'dayhourtext'), $this->template);
$this->template = str_replace('{dol_value_currentyear}', dol_print_date($now, '%Y'), $this->template);
$this->template = str_replace('{dol_value_currentmonth_letters}', $langs->trans("Month".dol_print_date($now, '%m')), $this->template);
$this->template = str_replace('{dol_value_currentmonth}', dol_print_date($now, '%m'), $this->template);
$this->template = str_replace('{dol_value_currentday}', dol_print_date($now, '%d'), $this->template);
$this->template = str_replace('{dol_value_currentday_letters}', $langs->trans("Day".dol_print_date($now, '%m')[1]), $this->template);
$this->template = str_replace('{dol_value_customer_firstname}', $object->thirdparty->firstname, $this->template);
$this->template = str_replace('{dol_value_customer_lastname}', $object->thirdparty->lastname, $this->template);
@ -759,6 +780,10 @@ class dolReceiptPrinter extends Printer
$img = EscposImage::load(DOL_DATA_ROOT.'/mycompany/logos/'.$mysoc->logo);
$this->printer->bitImage($img);
break;
case 'DOL_PRINT_LOGO_OLD_CF':
$img = EscposImage::load(DOL_DATA_ROOT.'/mycompany/logos/'.$mysoc->logo);
$this->printer->bitImageColumnFormat($img);
break;
case 'DOL_PRINT_QRCODE':
// $vals[$tplline]['value'] -> qrCode($content, $ec, $size, $model)
$this->printer->qrcode($vals[$tplline]['value']);
@ -845,9 +870,9 @@ class dolReceiptPrinter extends Printer
}
break;
case 'DOL_VALUE_PLACE':
$sql = "SELECT floor, label FROM ".$this->db->prefix()."takepos_floor_tables where rowid=".((int) str_replace(")", "", str_replace("(PROV-POS".$_SESSION["takeposterminal"]."-", "", $object->ref)));
$resql = $this->db->query($sql);
$obj = $this->db->fetch_object($resql);
$sql = "SELECT floor, label FROM ".$this->db->prefix()."takepos_floor_tables where rowid=".((int) str_replace(")", "", str_replace("(PROV-POS".$_SESSION["takeposterminal"]."-", "", $object->ref)));
$resql = $this->db->query($sql);
$obj = $this->db->fetch_object($resql);
if ($obj) {
$this->printer->text($obj->label);
}

View File

@ -285,7 +285,7 @@ function limitChars(textarea, limit, infodiv)
print '<input type="hidden" name="message" value="'.dol_escape_htmltag($defaultmessage).'">';
} else {
print '<textarea class="quatrevingtpercent" name="message" id="message" rows="'.ROWS_4.'" onkeyup="limitChars(this, 160, \'charlimitinfospan\')">'.$defaultmessage.'</textarea>';
print '<div id="charlimitinfo">'.$langs->trans("SmsInfoCharRemain").': <span id="charlimitinfospan">'.(160 - dol_strlen($defaultmessage)).'</span></div></td>';
print '<div id="charlimitinfo" class="opacitymedium">'.$langs->trans("SmsInfoCharRemain").': <span id="charlimitinfospan">'.(160 - dol_strlen($defaultmessage)).'</span></div></td>';
}
print "</td></tr>\n";
}

View File

@ -334,7 +334,7 @@ class FormTicket
print '</td></tr>';
// Severity => Priority
print '<tr><td><span class="none"><label for="selectseverity_code">'.$langs->trans("TicketSeverity").'</span></label></td><td>';
print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">'.$langs->trans("TicketSeverity").'</span></label></td><td>';
$this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', 2, 1);
print '</td></tr>';

View File

@ -203,9 +203,10 @@ class Utils
* @param string $file 'auto' or filename to build
* @param int $keeplastnfiles Keep only last n files (not used yet)
* @param int $execmethod 0=Use default method (that is 1 by default), 1=Use the PHP 'exec' - need size of dump in memory, but low memory method is used if GETPOST('lowmemorydump') is set, 2=Use the 'popen' method (low memory method)
* @param int $lowmemorydump 1=Use the low memory method. If $lowmemorydump is set, it means we want to make the compression using an external pipe instead retreiving the content of the dump in PHP memory array $output_arr and then print it into the PHP pipe open with xopen().
* @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK)
*/
public function dumpDatabase($compression = 'none', $type = 'auto', $usedefault = 1, $file = 'auto', $keeplastnfiles = 0, $execmethod = 0)
public function dumpDatabase($compression = 'none', $type = 'auto', $usedefault = 1, $file = 'auto', $keeplastnfiles = 0, $execmethod = 0, $lowmemorydump = 0)
{
global $db, $conf, $langs, $dolibarr_main_data_root;
global $dolibarr_main_db_name, $dolibarr_main_db_host, $dolibarr_main_db_user, $dolibarr_main_db_port, $dolibarr_main_db_pass;
@ -358,10 +359,6 @@ class Utils
$handle = '';
// If $lowmemorydump is set, it means we want to make the compression using an external pipe instead retreiving the
// content of the dump in PHP memory array $output_arr and then print it into the PHP pipe open with xopen().
$lowmemorydump = GETPOSTISSET("lowmemorydump") ? GETPOST("lowmemorydump") : getDolGlobalString('MAIN_LOW_MEMORY_DUMP');
// Start call method to execute dump
$fullcommandcrypted = $command." ".$paramcrypted." 2>&1";
$fullcommandclear = $command." ".$paramclear." 2>&1";
@ -377,23 +374,23 @@ class Utils
}
} else {
if ($compression == 'none') {
$fullcommandclear .= ' > "'.dol_sanitizePathName($outputfile).'"';
$fullcommandcrypted .= ' > "'.dol_sanitizePathName($outputfile).'"';
$fullcommandclear .= ' | grep -v "Warning: Using a password on the command line interface can be insecure." > "'.dol_sanitizePathName($outputfile).'"';
$fullcommandcrypted .= ' | grep -v "Warning: Using a password on the command line interface can be insecure." > "'.dol_sanitizePathName($outputfile).'"';
$handle = 1;
} elseif ($compression == 'gz') {
$fullcommandclear .= ' | gzip > "'.dol_sanitizePathName($outputfile).'"';
$fullcommandcrypted .= ' | gzip > "'.dol_sanitizePathName($outputfile).'"';
$paramcrypted .= ' | gzip';
$fullcommandclear .= ' | grep -v "Warning: Using a password on the command line interface can be insecure." | gzip > "'.dol_sanitizePathName($outputfile).'"';
$fullcommandcrypted .= ' | grep -v "Warning: Using a password on the command line interface can be insecure." | gzip > "'.dol_sanitizePathName($outputfile).'"';
$paramcrypted .= ' | grep -v "Warning: Using a password on the command line interface can be insecure." | gzip';
$handle = 1;
} elseif ($compression == 'bz') {
$fullcommandclear .= ' | bzip2 > "'.dol_sanitizePathName($outputfile).'"';
$fullcommandcrypted .= ' | bzip2 > "'.dol_sanitizePathName($outputfile).'"';
$paramcrypted .= ' | bzip2';
$fullcommandclear .= ' | grep -v "Warning: Using a password on the command line interface can be insecure." | bzip2 > "'.dol_sanitizePathName($outputfile).'"';
$fullcommandcrypted .= ' | grep -v "Warning: Using a password on the command line interface can be insecure." | bzip2 > "'.dol_sanitizePathName($outputfile).'"';
$paramcrypted .= ' | grep -v "Warning: Using a password on the command line interface can be insecure." | bzip2';
$handle = 1;
} elseif ($compression == 'zstd') {
$fullcommandclear .= ' | zstd > "'.dol_sanitizePathName($outputfile).'"';
$fullcommandcrypted .= ' | zstd > "'.dol_sanitizePathName($outputfile).'"';
$paramcrypted .= ' | zstd';
$fullcommandclear .= ' | grep -v "Warning: Using a password on the command line interface can be insecure." | zstd > "'.dol_sanitizePathName($outputfile).'"';
$fullcommandcrypted .= ' | grep -v "Warning: Using a password on the command line interface can be insecure." | zstd > "'.dol_sanitizePathName($outputfile).'"';
$paramcrypted .= ' | grep -v "Warning: Using a password on the command line interface can be insecure." | zstd';
$handle = 1;
}
}

View File

@ -401,8 +401,8 @@ function completeFileArrayWithDatabaseInfo(&$filearray, $relativedir)
/**
* Fast compare of 2 files identified by their properties ->name, ->date and ->size
*
* @param string $a File 1
* @param string $b File 2
* @param object $a File 1
* @param object $b File 2
* @return int 1, 0, 1
*/
function dol_compare_file($a, $b)

View File

@ -936,7 +936,7 @@ function getSocialNetworkSharingLinks()
* @param string $langcode Language code ('' or 'en', 'fr', 'es', ...)
* @param array $otherfilters Other filters
* @param int $status 0 or 1, or -1 for both
* @return string HTML content
* @return array Array with results of search
*/
function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC', $langcode = '', $otherfilters = 'null', $status = 1)
{
@ -974,6 +974,8 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so
$found = 0;
if (!$error && (empty($max) || ($found < $max)) && (preg_match('/meta/', $algo) || preg_match('/content/', $algo))) {
include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
$sql = 'SELECT wp.rowid FROM '.MAIN_DB_PREFIX.'website_page as wp';
if (is_array($otherfilters) && !empty($otherfilters['category'])) {
$sql .= ', '.MAIN_DB_PREFIX.'categorie_website_page as cwp';
@ -983,7 +985,7 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so
$sql .= " AND wp.status = ".((int) $status);
}
if ($langcode) {
$sql .= " AND wp.lang ='".$db->escape($langcode)."'";
$sql .= " AND wp.lang = '".$db->escape($langcode)."'";
}
if ($type) {
$tmparrayoftype = explode(',', $type);
@ -996,11 +998,11 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so
$sql .= " AND (";
$searchalgo = '';
if (preg_match('/meta/', $algo)) {
$searchalgo .= ($searchalgo ? ' OR ' : '')."wp.title LIKE '%".$db->escapeforlike($db->escape($searchstring))."%' OR wp.description LIKE '%".$db->escapeforlike($db->escape($searchstring))."%'";
$searchalgo .= ($searchalgo ? ' OR ' : '')."wp.keywords LIKE '".$db->escapeforlike($db->escape($searchstring)).",%' OR wp.keywords LIKE '% ".$db->escapeforlike($db->escape($searchstring))."%'"; // TODO Use a better way to scan keywords
$searchalgo .= ($searchalgo ? ' OR ' : '')."wp.title LIKE '%".$db->escape($db->escapeforlike($searchstring))."%' OR wp.description LIKE '%".$db->escape($db->escapeforlike($searchstring))."%'";
$searchalgo .= ($searchalgo ? ' OR ' : '')."wp.keywords LIKE '".$db->escape($db->escapeforlike($searchstring)).",%' OR wp.keywords LIKE '% ".$db->escape($db->escapeforlike($searchstring))."%'"; // TODO Use a better way to scan keywords
}
if (preg_match('/content/', $algo)) {
$searchalgo .= ($searchalgo ? ' OR ' : '')."wp.content LIKE '%".$db->escapeforlike($db->escape($searchstring))."%'";
$searchalgo .= ($searchalgo ? ' OR ' : '')."wp.content LIKE '%".$db->escape($db->escapeforlike($searchstring))."%'";
}
$sql .= $searchalgo;
if (is_array($otherfilters) && !empty($otherfilters['category'])) {
@ -1012,6 +1014,7 @@ function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $so
//print $sql;
$resql = $db->query($sql);
if ($resql) {
$i = 0;
while (($obj = $db->fetch_object($resql)) && ($i < $max || $max == 0)) {

View File

@ -173,7 +173,9 @@ class doc_generic_asset_odt extends ModelePDFAsset
if ($nbofiles) {
$texte .= '<div id="div_'.get_class($this).'" class="hidden">';
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=asset_asset/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=asset_asset/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=ASSET_ASSET_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -169,7 +169,9 @@ class doc_generic_bom_odt extends ModelePDFBom
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=boms/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=boms/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=BOM_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -159,7 +159,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
$texte .= $conf->global->COMMANDE_ADDON_PDF_ODT_PATH;
$texte .= '</textarea>';
$texte .= '</div><div style="display: inline-block; vertical-align: middle;">';
$texte .= '<input type="submit" class="button small reposition" name="modify" value="'.$langs->trans("Modify").'">';
$texte .= '<input type="submit" class="button small reposition" name="modify" value="'.dol_escape_htmltag($langs->trans("Modify")).'">';
$texte .= '<br></div></div>';
// Scan directories
@ -176,7 +176,9 @@ class doc_generic_order_odt extends ModelePDFCommandes
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=orders/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=orders/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=COMMANDE_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -51,8 +51,7 @@ class doc_generic_contract_odt extends ModelePDFContract
public $phpmin = array(7, 0);
/**
* Dolibarr version of the loaded document
* @var string
* @var string Dolibarr version of the loaded document
*/
public $version = 'dolibarr';
@ -94,7 +93,7 @@ class doc_generic_contract_odt extends ModelePDFContract
$this->option_freetext = 1; // Support add of a personalised text
$this->option_draft_watermark = 0; // Support add of a watermark on drafts
// Recupere emetteur
// Get source company
$this->emetteur = $mysoc;
if (!$this->emetteur->country_code) {
$this->emetteur->country_code = substr($langs->defaultlang, -2); // By default if not defined
@ -123,7 +122,7 @@ class doc_generic_contract_odt extends ModelePDFContract
$texte .= '<input type="hidden" name="page_y" value="">';
$texte .= '<input type="hidden" name="action" value="setModuleOptions">';
$texte .= '<input type="hidden" name="param1" value="CONTRACT_ADDON_PDF_ODT_PATH">';
$texte .= '<table class="nobordernopadding" width="100%">';
$texte .= '<table class="nobordernopadding centpercent">';
// List of directories area
$texte .= '<tr><td>';
@ -161,10 +160,25 @@ class doc_generic_contract_odt extends ModelePDFContract
$texte .= '<br></div></div>';
// Scan directories
if (count($listofdir)) {
$texte .= $langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
$nbofiles = count($listoffiles);
if (!empty($conf->global->CONTRACT_ADDON_PDF_ODT_PATH)) {
$texte .= $langs->trans("NumberOfModelFilesFound").': <b>';
//$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':'';
$texte .= count($listoffiles);
//$texte.=$nbofiles?'</a>':'';
$texte .= '</b>';
}
if ($nbofiles) {
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=contracts/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=CONTRACT_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}
// Add input to upload a new template file.
$texte .= '<div>'.$langs->trans("UploadNewTemplate");
$maxfilesizearray = getMaxFileSizeArray();
@ -228,7 +242,7 @@ class doc_generic_contract_odt extends ModelePDFContract
$sav_charset_output = $outputlangs->charset_output;
$outputlangs->charset_output = 'UTF-8';
// Load traductions files required by page
// Load translation files required by page
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
if ($conf->contrat->multidir_output[$object->entity]) {
@ -382,16 +396,21 @@ class doc_generic_contract_odt extends ModelePDFContract
dol_syslog($e->getMessage(), LOG_INFO);
}
// Call the ODTSubstitution hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
$reshook = $hookmanager->executeHooks('ODTSubstitution', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
foreach ($tmparray as $key => $value) {
try {
if (preg_match('/logo$/', $key)) { // Image
if (preg_match('/logo$/', $key)) {
// Image
if (file_exists($value)) {
$odfHandler->setImage($key, $value);
} else {
$odfHandler->setVars($key, 'ErrorFileNotFound', true, 'UTF-8');
}
} else // Text
{
} else {
// Text
$odfHandler->setVars($key, $value, true, 'UTF-8');
}
} catch (OdfException $e) {
@ -448,7 +467,7 @@ class doc_generic_contract_odt extends ModelePDFContract
}
// Call the beforeODTSave hook
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs);
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
$reshook = $hookmanager->executeHooks('beforeODTSave', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
// Write new file
@ -457,6 +476,7 @@ class doc_generic_contract_odt extends ModelePDFContract
$odfHandler->exportAsAttachedPDF($file);
} catch (Exception $e) {
$this->error = $e->getMessage();
dol_syslog($e->getMessage(), LOG_INFO);
return -1;
}
} else {
@ -464,10 +484,12 @@ class doc_generic_contract_odt extends ModelePDFContract
$odfHandler->saveToDisk($file);
} catch (Exception $e) {
$this->error = $e->getMessage();
dol_syslog($e->getMessage(), LOG_INFO);
return -1;
}
}
$parameters = array('odfHandler'=>&$odfHandler, 'file'=>$file, 'object'=>$object, 'outputlangs'=>$outputlangs, 'substitutionarray'=>&$tmparray);
$reshook = $hookmanager->executeHooks('afterODTCreation', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if (!empty($conf->global->MAIN_UMASK)) {

View File

@ -175,7 +175,9 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=shipments/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=shipments/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=EXPEDITION_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -174,7 +174,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=invoices/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=invoices/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=FACTURE_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -862,8 +862,8 @@ class ImportCsv extends ModeleImports
$stringtosearch = json_encode($socialnetwork).':'.json_encode($json->$socialnetwork);
//var_dump($stringtosearch);
//var_dump($this->db->escape($stringtosearch)); // This provide a value for sql string (but not for a like)
$where[] = $key." LIKE '%".$this->db->escapeforlike($this->db->escape($stringtosearch))."%'";
$filters[] = $col." LIKE '%".$this->db->escapeforlike($this->db->escape($stringtosearch))."%'";
$where[] = $key." LIKE '%".$this->db->escape($this->db->escapeforlike($stringtosearch))."%'";
$filters[] = $col." LIKE '%".$this->db->escape($this->db->escapeforlike($stringtosearch))."%'";
//var_dump($where[1]); // This provide a value for sql string inside a like
} else {
$where[] = $key.' = '.$data[$key];

View File

@ -908,8 +908,8 @@ class ImportXlsx extends ModeleImports
$stringtosearch = json_encode($socialnetwork).':'.json_encode($json->$socialnetwork);
//var_dump($stringtosearch);
//var_dump($this->db->escape($stringtosearch)); // This provide a value for sql string (but not for a like)
$where[] = $key." LIKE '%".$this->db->escapeforlike($this->db->escape($stringtosearch))."%'";
$filters[] = $col." LIKE '%".$this->db->escapeforlike($this->db->escape($stringtosearch))."%'";
$where[] = $key." LIKE '%".$this->db->escape($this->db->escapeforlike($stringtosearch))."%'";
$filters[] = $col." LIKE '%".$this->db->escape($this->db->escapeforlike($stringtosearch))."%'";
//var_dump($where[1]); // This provide a value for sql string inside a like
} else {
$where[] = $key.' = '.$data[$key];

View File

@ -164,7 +164,9 @@ class doc_generic_member_odt extends ModelePDFMember
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=members/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=members/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=MEMBER_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -183,7 +183,7 @@ class modBlockedLog extends DolibarrModules
$result = $b->setObjectData($object, 'MODULE_SET', 0);
if ($result < 0) {
$this->error = $b->error;
$this->errors = $b->erros;
$this->errors = $b->errors;
return 0;
}
@ -226,7 +226,7 @@ class modBlockedLog extends DolibarrModules
$result = $b->setObjectData($object, 'MODULE_RESET', 0);
if ($result < 0) {
$this->error = $b->error;
$this->errors = $b->erros;
$this->errors = $b->errors;
return 0;
}

View File

@ -99,7 +99,7 @@ class modCron extends DolibarrModules
// Cronjobs
$this->cronjobs = array(
0=>array('entity'=>0, 'label'=>'PurgeDeleteTemporaryFilesShort', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'purgeFiles', 'parameters'=>'tempfilesold+logfiles', 'comment'=>'PurgeDeleteTemporaryFiles', 'frequency'=>2, 'unitfrequency'=>3600 * 24 * 7, 'priority'=>50, 'status'=>1, 'test'=>true),
1=>array('entity'=>0, 'label'=>'MakeLocalDatabaseDumpShort', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'dumpDatabase', 'parameters'=>'none,auto,1,auto,10', 'comment'=>'MakeLocalDatabaseDump', 'frequency'=>1, 'unitfrequency'=>3600 * 24 * 7, 'priority'=>90, 'status'=>0, 'test'=>'in_array($conf->db->type, array(\'mysql\', \'mysqli\'))'),
1=>array('entity'=>0, 'label'=>'MakeLocalDatabaseDumpShort', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'dumpDatabase', 'parameters'=>'none,auto,1,auto,10,0,0', 'comment'=>'MakeLocalDatabaseDump', 'frequency'=>1, 'unitfrequency'=>3600 * 24 * 7, 'priority'=>90, 'status'=>0, 'test'=>'in_array($conf->db->type, array(\'mysql\', \'mysqli\'))'),
2=>array('entity'=>0, 'label'=>'MakeSendLocalDatabaseDumpShort', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'sendBackup', 'parameters'=>',,,,,sql', 'comment'=>'MakeSendLocalDatabaseDump', 'frequency'=>1, 'unitfrequency'=>604800, 'priority'=>91, 'status'=>0, 'test'=>'!empty($conf->global->MAIN_ALLOW_BACKUP_BY_EMAIL) && in_array($conf->db->type, array(\'mysql\', \'mysqli\'))'),
3=>array('entity'=>0, 'label'=>'CleanUnfinishedCronjobShort', 'jobtype'=>'method', 'class'=>'core/class/utils.class.php', 'objectname'=>'Utils', 'method'=>'cleanUnfinishedCronjob', 'parameters'=>'', 'comment'=>'CleanUnfinishedCronjob', 'frequency'=>5, 'unitfrequency'=>60, 'priority'=>10, 'status'=>0, 'test'=>'getDolGlobalInt("MAIN_FEATURES_LEVEL") >= 2'),
// 1=>array('entity'=>0, 'label'=>'My label', 'jobtype'=>'command', 'command'=>'', 'parameters'=>'', 'comment'=>'Comment', 'frequency'=>1, 'unitfrequency'=>3600*24)

View File

@ -175,7 +175,9 @@ class doc_generic_mo_odt extends ModelePDFMo
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=mrps/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=mrps/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=MRP_MO_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -468,7 +468,9 @@ class doc_generic_project_odt extends ModelePDFProjects
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=projects/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=projects/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=PROJECT_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -433,7 +433,9 @@ class doc_generic_task_odt extends ModelePDFTask
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=tasks/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=tasks/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=PROJECT_TASK_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -168,7 +168,9 @@ class doc_generic_reception_odt extends ModelePdfReception
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=receptions/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=receptions/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=RECEPTION_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -172,7 +172,9 @@ class doc_generic_stock_odt extends ModelePDFStock
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=stocks/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=stocks/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=STOCK_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -163,7 +163,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
// Scan directories
$nbofiles = count($listoffiles);
if (!empty($conf->global->COMMANDE_ADDON_PDF_ODT_PATH)) {
if (!empty($conf->global->SUPPLIER_ORDER_ADDON_PDF_ODT_PATH)) {
$texte .= $langs->trans("NumberOfModelFilesFound").': <b>';
//$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':'';
$texte .= count($listoffiles);
@ -175,7 +175,9 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=supplier_orders/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=supplier_orders/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=SUPPLIER_ORDER_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -5,7 +5,7 @@
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.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
@ -1567,7 +1567,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
'border-left' => false, // remove left line separator
);
if (!empty($conf->global->MAIN_GENERATE_ORDERS_WITH_PICTURE)) {
if (!empty($conf->global->MAIN_GENERATE_SUPPLIER_ORDER_WITH_PICTURE)) {
$this->cols['photo']['status'] = true;
}

View File

@ -179,7 +179,9 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=supplier_proposal/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=supplier_proposal/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';

View File

@ -161,7 +161,9 @@ class doc_generic_ticket_odt extends ModelePDFTicket
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=tickets/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=tickets/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=TICKET_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -192,7 +192,9 @@ class doc_generic_user_odt extends ModelePDFUser
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=users/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a><br>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=users/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=USER_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}

View File

@ -84,6 +84,13 @@ class Expedition extends CommonObject
*/
public $picto = 'dolly';
/**
* @var array Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
*/
public $fields = array();
public $socid;
/**

View File

@ -131,6 +131,54 @@ class ExpeditionStats extends Stats
return $this->_getNbByYear($sql);
}
/**
* Return the orders amount by month for a year
*
* @param int $year Year to scan
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
* @return array Array with amount by month
*/
public function getAmountByMonth($year, $format = 0)
{
global $user;
$sql = "SELECT date_format(c.date_valid,'%m') as dm, SUM(c.".$this->field.")";
$sql .= " FROM ".$this->from;
if (empty($user->rights->societe->client->voir) && !$this->socid) {
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
}
$sql .= $this->join;
$sql .= " WHERE ".$this->where;
$sql .= " GROUP BY dm";
$sql .= $this->db->order('dm', 'DESC');
$res = $this->_getAmountByMonth($year, $sql, $format);
return $res;
}
/**
* Return the orders amount average by month for a year
*
* @param int $year year for stats
* @return array array with number by month
*/
public function getAverageByMonth($year)
{
global $user;
$sql = "SELECT date_format(c.date_valid,'%m') as dm, AVG(c.".$this->field.")";
$sql .= " FROM ".$this->from;
if (empty($user->rights->societe->client->voir) && !$this->socid) {
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
}
$sql .= $this->join;
$sql .= " WHERE ".$this->where;
$sql .= " GROUP BY dm";
$sql .= $this->db->order('dm', 'DESC');
return $this->_getAverageByMonth($year, $sql);
}
/**
* Return nb, total and average
*

View File

@ -47,11 +47,12 @@ $WIDTH = DolGraph::getDefaultGraphSizeForStats('width');
$HEIGHT = DolGraph::getDefaultGraphSizeForStats('height');
$mesg = '';
$mode = '';
print load_fiche_titre($langs->trans("StatisticsOfSendings").' '.$year, $mesg);
$stats = new ExpeditionStats($db);
$data = $stats->getNbExpeditionByMonth($year);
$stats = new ExpeditionStats($db, $socid, $mode);
$data = $stats->getNbByMonth($year);
dol_mkdir($conf->expedition->dir_temp);

View File

@ -532,7 +532,7 @@ if ($resql) {
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print '<div class="div-table-responsive">';
@ -540,6 +540,13 @@ if ($resql) {
// Filters
print '<tr class="liste_titre_filter">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
if (!empty($arrayfields['d.ref']['checked'])) {
print '<td class="liste_titre" align="left">';
print '<input class="flat" size="15" type="text" name="search_ref" value="'.$search_ref.'">';
@ -626,14 +633,19 @@ if ($resql) {
print '</td>';
}
// Action column
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
print "</tr>\n";
print '<tr class="liste_titre">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
}
if (!empty($arrayfields['d.ref']['checked'])) {
print_liste_field_titre($arrayfields['d.ref']['label'], $_SERVER["PHP_SELF"], "d.ref", "", $param, '', $sortfield, $sortorder);
}
@ -676,7 +688,9 @@ if ($resql) {
if (!empty($arrayfields['d.fk_statut']['checked'])) {
print_liste_field_titre($arrayfields['d.fk_statut']['label'], $_SERVER["PHP_SELF"], "d.fk_statut", "", $param, 'align="right"', $sortfield, $sortorder);
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
}
print "</tr>\n";
$total_total_ht = 0;
@ -712,6 +726,18 @@ if ($resql) {
print '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
// Ref
if (!empty($arrayfields['d.ref']['checked'])) {
print '<td>';
@ -856,15 +882,17 @@ if ($resql) {
}
}
// Action column
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
print '</td>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -493,7 +493,7 @@ if (!empty($moreforfilter)) {
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN', '')); // This also change content of $arrayfields
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
print '<div class="div-table-responsive">';
@ -503,7 +503,7 @@ print '<table class="tagtable nobottomiftotal liste'.($moreforfilter ? " listwit
// --------------------------------------------------------------------
print '<tr class="liste_titre_filter">';
// Action column
if (!empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
@ -588,7 +588,7 @@ if (!empty($arrayfields['fd.duree']['checked'])) {
print '<td class="liste_titre">&nbsp;</td>';
}
// Action column
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
@ -602,6 +602,10 @@ $totalarray['nbfield'] = 0;
// Fields title label
// --------------------------------------------------------------------
print '<tr class="liste_titre">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
if (!empty($arrayfields['f.ref']['checked'])) {
print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
}
@ -650,7 +654,11 @@ if (!empty($arrayfields['fd.date']['checked'])) {
if (!empty($arrayfields['fd.duree']['checked'])) {
print_liste_field_titre($arrayfields['fd.duree']['label'], $_SERVER["PHP_SELF"], "fd.duree", "", $param, '', $sortfield, $sortorder, 'right ');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
print "</tr>\n";
@ -687,7 +695,18 @@ while ($i < $imaxinloop) {
$companystatic->status = $obj->thirdpartystatus;
print '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
if (!empty($arrayfields['f.ref']['checked'])) {
print "<td>";
@ -848,7 +867,7 @@ while ($i < $imaxinloop) {
$totalarray['val']['fd.duree'] += $obj->duree;
}
// Action column
if (empty($conf->global->MAIN_CHECKBOX_LEFT_COLUMN)) {
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;

View File

@ -106,7 +106,7 @@ if (empty($reshook)) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
// terms of the settlement
// Set payment terms of the settlement
if ($action == 'setconditions' && $user->rights->societe->creer) {
$object->fetch($id);
$result = $object->setPaymentTerms(GETPOST('cond_reglement_supplier_id', 'int'));
@ -114,7 +114,7 @@ if (empty($reshook)) {
dol_print_error($db, $object->error);
}
}
// mode de reglement
// Payment mode
if ($action == 'setmode' && $user->rights->societe->creer) {
$object->fetch($id);
$result = $object->setPaymentMethods(GETPOST('mode_reglement_supplier_id', 'int'));
@ -123,6 +123,15 @@ if (empty($reshook)) {
}
}
// Bank account
if ($action == 'setbankaccount' && $user->rights->societe->creer) {
$object->fetch($id);
$result = $object->setBankAccount(GETPOST('fk_account', 'int'));
if ($result < 0) {
setEventMessages($object->error, $object->errors, 'errors');
}
}
// update supplier order min amount
if ($action == 'setsupplier_order_min_amount') {
$object->fetch($id);
@ -276,7 +285,7 @@ if ($object->id > 0) {
print "</td>";
print '</tr>';
// Mode de reglement par defaut
// Default payment mode
print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentMode');
@ -294,6 +303,26 @@ if ($object->id > 0) {
print "</td>";
print '</tr>';
if (isModEnabled("banque")) {
// Default bank account for payments
print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
print $langs->trans('PaymentBankAccount');
print '<td>';
if (($action != 'editbankaccount') && $user->rights->societe->creer) {
print '<td class="right"><a class="editfielda" href="'.$_SERVER["PHP_SELF"].'?action=editbankaccount&token='.newToken().'&socid='.$object->id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'</a></td>';
}
print '</tr></table>';
print '</td><td>';
if ($action == 'editbankaccount') {
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->fk_account, 'fk_account', 1);
} else {
$form->formSelectAccount($_SERVER['PHP_SELF'].'?socid='.$object->id, $object->fk_account, 'none');
}
print "</td>";
print '</tr>';
}
// Relative discounts (Discounts-Drawbacks-Rebates)
print '<tr><td class="nowrap">';
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';

View File

@ -1283,7 +1283,7 @@ if ($resql) {
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
if (GETPOST('autoselectall', 'int')) {
@ -1300,6 +1300,13 @@ if ($resql) {
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
print '<tr class="liste_titre_filter">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre middle">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
// Ref
if (!empty($arrayfields['cf.ref']['checked'])) {
print '<td class="liste_titre"><input size="8" type="text" class="flat maxwidth75" name="search_ref" value="'.$search_ref.'"></td>';
@ -1484,15 +1491,20 @@ if ($resql) {
print '</td>';
}
// Action column
print '<td class="liste_titre middle">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre middle">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
print "</tr>\n";
// Fields title
print '<tr class="liste_titre">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
if (!empty($arrayfields['cf.ref']['checked'])) {
print_liste_field_titre($arrayfields['cf.ref']['label'], $_SERVER["PHP_SELF"], "cf.ref", "", $param, '', $sortfield, $sortorder);
}
@ -1589,7 +1601,9 @@ if ($resql) {
if (!empty($arrayfields['cf.note_private']['checked'])) {
print_liste_field_titre($arrayfields['cf.note_private']['label'], $_SERVER["PHP_SELF"], "cf.note_private", "", $param, '', $sortfield, $sortorder, 'center ');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
print "</tr>\n";
@ -1632,7 +1646,18 @@ if ($resql) {
$objectstatic->statut = $obj->fk_statut;
print '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
// Ref
if (!empty($arrayfields['cf.ref']['checked'])) {
print '<td class="nowrap">';
@ -1939,15 +1964,17 @@ if ($resql) {
}
// Action column
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
print '</td>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -972,7 +972,7 @@ if ($moreforfilter) {
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
if ($massactionbutton) {
$selectedfields .= $form->showCheckAddButtons('checkforselect', 1);
}
@ -982,6 +982,13 @@ print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" :
// Line for filters
print '<tr class="liste_titre_filter">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre middle">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
// Ref
if (!empty($arrayfields['f.ref']['checked'])) {
print '<td class="liste_titre left">';
@ -1202,14 +1209,19 @@ if (!empty($arrayfields['f.fk_statut']['checked'])) {
print '</td>';
}
// Action column
print '<td class="liste_titre middle">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre middle">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
print "</tr>\n";
print '<tr class="liste_titre">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
if (!empty($arrayfields['f.ref']['checked'])) {
print_liste_field_titre($arrayfields['f.ref']['label'], $_SERVER['PHP_SELF'], 'f.ref,f.rowid', '', $param, '', $sortfield, $sortorder);
}
@ -1321,7 +1333,9 @@ if (!empty($arrayfields['f.tms']['checked'])) {
if (!empty($arrayfields['f.fk_statut']['checked'])) {
print_liste_field_titre($arrayfields['f.fk_statut']['label'], $_SERVER["PHP_SELF"], "fk_statut,paye,type", "", $param, '', $sortfield, $sortorder, 'right ');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
}
print "</tr>\n";
$facturestatic = new FactureFournisseur($db);
@ -1395,6 +1409,18 @@ if ($num > 0) {
}
print '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->facid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->facid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->facid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
if (!empty($arrayfields['f.ref']['checked'])) {
print '<td class="nowraponall">';
@ -1767,15 +1793,17 @@ if ($num > 0) {
}
// Action column
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->facid, $arrayofselected)) {
$selected = 1;
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->facid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->facid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->facid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '<input id="cb'.$obj->facid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->facid.'"'.($selected ? ' checked="checked"' : '').'>';
print '</td>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -5,7 +5,7 @@
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014-2017 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2020-2021 Udo Tamm <dev@dolibit.de>
* Copyright (C) 2022 Anthony Berton <anthony.berton@bb2a.fr>
*
@ -261,6 +261,12 @@ if (empty($reshook)) {
$error++;
}
// Fill array 'array_options' with data from add form
$ret = $extrafields->setOptionalsFromPost(null, $object);
if ($ret < 0) {
$error++;
}
$result = 0;
if (!$error) {

View File

@ -3,7 +3,7 @@
* Copyright (C) 2013-2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012-2016 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
* Copyright (C) 2019-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019-2022 Frédéric France <frederic.france@netlogic.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
@ -540,7 +540,7 @@ if ($resql) {
}
$varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields
$selectedfields = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields
$selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
@ -555,7 +555,13 @@ if ($resql) {
// Filters
print '<tr class="liste_titre_filter">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons('left');
print $searchpicto;
print '</td>';
}
if (!empty($arrayfields['cp.ref']['checked'])) {
print '<td class="liste_titre">';
print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
@ -681,14 +687,19 @@ if ($resql) {
}
// Action column
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre maxwidthsearch">';
$searchpicto = $form->showFilterButtons();
print $searchpicto;
print '</td>';
}
print "</tr>\n";
print '<tr class="liste_titre">';
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
}
if (!empty($arrayfields['cp.ref']['checked'])) {
print_liste_field_titre($arrayfields['cp.ref']['label'], $_SERVER["PHP_SELF"], "cp.ref", "", $param, '', $sortfield, $sortorder);
}
@ -731,7 +742,9 @@ if ($resql) {
if (!empty($arrayfields['cp.statut']['checked'])) {
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "cp.statut", "", $param, '', $sortfield, $sortorder, 'right ');
}
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
}
print "</tr>\n";
$listhalfday = array('morning'=>$langs->trans("Morning"), "afternoon"=>$langs->trans("Afternoon"));
@ -789,7 +802,18 @@ if ($resql) {
$endhalfday = ($obj->halfday == 1 || $obj->halfday == 2) ? 'morning' : 'afternoon';
print '<tr class="oddeven">';
// Action column
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '</td>';
}
if (!empty($arrayfields['cp.ref']['checked'])) {
print '<td class="nowraponall">';
print $holidaystatic->getNomUrl(1, 1);
@ -893,15 +917,17 @@ if ($resql) {
}
// Action column
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="nowrap center">';
if ($massactionbutton || $massaction) { // If we are in select mode (massactionbutton defined) or if we have already selected and sent an action ($massaction) defined
$selected = 0;
if (in_array($obj->rowid, $arrayofselected)) {
$selected = 1;
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
}
print '<input id="cb'.$obj->rowid.'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.'"'.($selected ? ' checked="checked"' : '').'>';
print '</td>';
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
@ -923,6 +949,8 @@ if ($resql) {
}
}
}
// status
print '<td></td>';
print '</tr>';
}
}

View File

@ -492,7 +492,8 @@ if ($step == 2 && $datatoimport) {
$text = $objmodelimport->getDriverDescForKey($key);
print '<td>'.$form->textwithpicto($objmodelimport->getDriverLabelForKey($key), $text).'</td>';
print '<td style="text-align:center">';
print '<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$key.$param.'" target="_blank" rel="noopener noreferrer">';
$filename = $langs->trans("ExampleOfImportFile").'_'.$datatoimport.'.'.$key;
print '<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$key.$param.'&output=file&file='.urlencode($filename).'" target="_blank" rel="noopener noreferrer">';
print img_picto('', 'download', 'class="paddingright opacitymedium"');
print $langs->trans("DownloadEmptyExampleShort");
print '</a>';
@ -583,7 +584,8 @@ if ($step == 3 && $datatoimport) {
$text = $objmodelimport->getDriverDescForKey($format);
print $form->textwithpicto($objmodelimport->getDriverLabelForKey($format), $text);
print '</td><td style="text-align:right" class="nowrap">';
print '<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$format.$param.'" target="_blank" rel="noopener noreferrer">';
$filename = $langs->trans("ExampleOfImportFile").'_'.$datatoimport.'.'.$format;
print '<a href="'.DOL_URL_ROOT.'/imports/emptyexample.php?format='.$format.$param.'&output=file&file='.urlencode($filename).'" target="_blank" rel="noopener noreferrer">';
print img_picto('', 'download', 'class="paddingright opacitymedium"');
print $langs->trans("DownloadEmptyExampleShort");
print '</a>';
@ -1066,6 +1068,7 @@ if ($step == 4 && $datatoimport) {
print '<div id="left" class="connectedSortable">'."\n";
// List of source fields
$var = false;
$lefti = 1;
foreach ($fieldssource as $key => $val) {
@ -1088,6 +1091,7 @@ if ($step == 4 && $datatoimport) {
print '</td><td width="50%" class="nopaddingrightimp">';
// Set the list of all possible target fields in Dolibarr.
$optionsall = array();
foreach ($fieldstarget as $code => $line) {
//var_dump($line);
@ -1139,8 +1143,7 @@ if ($step == 4 && $datatoimport) {
$entityicon = !empty($entitytoicon[$entity]) ? $entitytoicon[$entity] : $entity; // $entityicon must string name of picto of the field like 'project', 'company', 'contact', 'modulename', ...
$entitylang = $entitytolang[$entity] ? $entitytolang[$entity] : $objimport->array_import_label[0]; // $entitylang must be a translation key to describe object the field is related to, like 'Company', 'Contact', 'MyModyle', ...
//print '<td class="nowraponall" style="font-weight: normal">=> '.img_object('', $entityicon).' '.$langs->trans($entitylang).'</td>';
print '<td class="nowraponall" style="font-weight: normal">=> </td>';
print '<td class="nowraponall hideonsmartphone" style="font-weight: normal">=> </td>';
print '<td class="nowraponall" style="font-weight: normal">';
//var_dump($_SESSION['dol_array_match_file_to_database_select']);
@ -1508,7 +1511,7 @@ if ($step == 4 && $datatoimport) {
print '<tr class="oddeven"><td>';
print $obj->label;
print '</td>';
print '<td>';
print '<td class="tdoverflowmax150">';
if (empty($obj->fk_user)) {
print $langs->trans("Everybody");
} else {
@ -2336,7 +2339,7 @@ $db->close();
*/
function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
{
global $langs;
global $conf, $langs;
$height = '32px';
@ -2382,7 +2385,7 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
if (isset($fieldssource[$pos]['imported']) && $fieldssource[$pos]['imported'] == false) {
print '<td class="nowraponall boxtdunused" style="font-weight: normal">';
} else {
print '<td class="nowraponall" style="font-weight: normal">';
print '<td class="nowraponall tdoverflowmax500" style="font-weight: normal">';
}
print $langs->trans("Column").' '.num2Alpha($pos - 1).' (#'.$pos.')';
if (empty($fieldssource[$pos]['example1'])) {
@ -2394,7 +2397,12 @@ function show_elem($fieldssource, $pos, $key, $var, $nostyle = '')
if (!utf8_check($example)) {
$example = utf8_encode($example);
}
print ' - ';
if (!empty($conf->dol_optimize_smallscreen)) {
//print '<br>';
print ' - ';
} else {
print ' - ';
}
//print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ExampleOnFirstLine").': </span>';
print '<i class="opacitymedium">'.$example.'</i>';
}

View File

@ -1,7 +0,0 @@
README
======
ADOdb Date Library, part of the ADOdb abstraction library
See Wiki: https://adodb.org/dokuwiki/doku.php?id=v5:datetime:datetime_index
Download: https://github.com/ADOdb/ADOdb/blob/master/adodb-time.inc.php

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
/*
Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
(function(a){if("undefined"==typeof a)throw Error("jQuery should be loaded before CKEditor jQuery adapter.");if("undefined"==typeof CKEDITOR)throw Error("CKEditor should be loaded before CKEditor jQuery adapter.");CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},
ckeditor:function(g,e){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if("function"!==typeof g){var m=e;e=g;g=m}var k=[];e=e||{};this.each(function(){var b=a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,l=new a.Deferred;k.push(l.promise());if(c&&!f)g&&g.apply(c,[this]),l.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function d(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),l.resolve()):setTimeout(d,100)},0)},null,null,
9999);else{if(e.autoUpdateElement||"undefined"==typeof e.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)e.autoUpdateElementJquery=!0;e.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",!0);c=a(this).is("textarea")?CKEDITOR.replace(h,e):CKEDITOR.inline(h,e);b.data("ckeditorInstance",c);c.on("instanceReady",function(e){var d=e.editor;setTimeout(function n(){if(d.element){e.removeListener();d.on("dataReady",function(){b.trigger("dataReady.ckeditor",[d])});d.on("setData",function(a){b.trigger("setData.ckeditor",
[d,a.data])});d.on("getData",function(a){b.trigger("getData.ckeditor",[d,a.data])},999);d.on("destroy",function(){b.trigger("destroy.ckeditor",[d])});d.on("save",function(){a(h.form).trigger("submit");return!1},null,null,20);if(d.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){d.updateElement()})};a(h.form).on("submit",c);a(h.form).on("form-pre-serialize",c);b.on("destroy.ckeditor",function(){a(h.form).off("submit",c);a(h.form).off("form-pre-serialize",
c)})}d.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[d]);g&&g.apply(d,[h]);l.resolve()}else setTimeout(n,100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,k).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}});CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(e){if(arguments.length){var m=
this,k=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(e,function(){f.resolve()});k.push(f.promise());return!0}return g.call(b,e)});if(k.length){var b=new a.Deferred;a.when.apply(this,k).done(function(){b.resolveWith(m)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}}))})(window.jQuery);

View File

@ -1 +1,2 @@
Website generated by Dolibarr ERP CRM
This website template is an example of website for a restaurant

View File

@ -1,2 +1,8 @@
Image are provided under the Unsplash+ License
Rest of templates (HTML and PHP code) content are GPLv3
LICENSE
-------
Images are provided under the license:
Unsplash+ License
Rest of templates (HTML and PHP code) content are under license
CC-BY-SA - https://creativecommons.org/licenses/by/4.0/

View File

@ -1 +1,2 @@
Website generated by Dolibarr ERP CRM
This website template is an example of website for a restaurant

View File

@ -1,5 +1,5 @@
<?php
// File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
global $dolibarr_main_data_root;
if (empty($dolibarr_main_data_root)) require './page169.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page169.tpl.php';
if (empty($dolibarr_main_data_root)) require './page248.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page248.tpl.php';
?>

View File

@ -1,5 +1,5 @@
<?php
// File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
global $dolibarr_main_data_root;
if (empty($dolibarr_main_data_root)) require './page170.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page170.tpl.php';
if (empty($dolibarr_main_data_root)) require './page249.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page249.tpl.php';
?>

View File

@ -0,0 +1,5 @@
<?php
// File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
global $dolibarr_main_data_root;
if (empty($dolibarr_main_data_root)) require './page252.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page252.tpl.php';
?>

View File

@ -0,0 +1,5 @@
<?php
// File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
global $dolibarr_main_data_root;
if (empty($dolibarr_main_data_root)) require './page253.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page253.tpl.php';
?>

View File

@ -1,6 +1,6 @@
<link rel="stylesheet" id="google-fonts-css" href="//fonts.googleapis.com/css?family=Open+Sans:300,400,700" />
<link rel="stylesheet" id="font-wasesome-css" href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" id="font-wasesome-css" type="text/css" href="/dolibarr_dev/htdocs/theme/common/fontawesome-5/css/all.min.css?layout=classic&amp;version=17.0.0-beta">
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>

View File

@ -1,11 +1,5 @@
<?php
// BEGIN PHP File generated to provide an index.php as Home Page or alias redirector - DO NOT MODIFY - It is just a generated wrapper.
$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once './master.inc.php'; } // Load master if not already loaded
if (!empty($_GET['pageref']) || !empty($_GET['pagealiasalt']) || !empty($_GET['pageid'])) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';
redirectToContainer($_GET['pageref'], $_GET['pagealiasalt'], $_GET['pageid']);
}
include_once './page171.tpl.php';
// END PHP
// File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
global $dolibarr_main_data_root;
if (empty($dolibarr_main_data_root)) require './page250.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page250.tpl.php';
?>

View File

@ -8,6 +8,7 @@ header('Cache-Control: max-age=3600, public, must-revalidate');
header('Content-type: application/javascript');
// END PHP ?>
/* JS content (all pages) */
// test
<?php // BEGIN PHP
$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "js");
// END PHP ?>

View File

@ -1,5 +1,5 @@
<?php
// File generated to wrap the alias page - DO NOT MODIFY - It is just a wrapper to real page
global $dolibarr_main_data_root;
if (empty($dolibarr_main_data_root)) require './page172.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page172.tpl.php';
if (empty($dolibarr_main_data_root)) require './page251.tpl.php'; else require $dolibarr_main_data_root.'/website/'.$website->ref.'/page251.tpl.php';
?>

View File

@ -1,198 +0,0 @@
<?php // BEGIN PHP
$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
} // Not already loaded
require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';
ob_start();
// END PHP ?>
<html lang="en">
<head>
<title>About us</title>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="" />
<meta name="title" content="About us" />
<meta name="description" content="" />
<meta name="generator" content="Dolibarr 17.0.0-alpha (https://www.dolibarr.org)" />
<meta name="dolibarr:pageid" content="169" />
<?php if ($website->use_manifest) { print '<link rel="manifest" href="/manifest.json.php" />'."\n"; } ?>
<!-- Include link to CSS file -->
<link rel="stylesheet" href="/styles.css.php?website=<?php echo $websitekey; ?>" type="text/css" />
<!-- Include link to JS file -->
<script async src="/javascript.js.php"></script>
<!-- Include HTML header from common file -->
<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>
<!-- Include HTML header from page header block -->
</head>
<!-- File generated by Dolibarr website module editor -->
<body id="bodywebsite" class="bodywebsite bodywebpage-about">
<!-- Enter here your HTML content. Add a section with an id tag and tag contenteditable="true" if you want to use the inline editor for the content -->
<section id="mysection1" contenteditable="true">
<nav class="navbar navbar-expand-lg bg-white shadow-lg">
<div class="container">
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="index.html"><?php echo $mysoc->name; ?></a>
<div class="d-lg-none">
<a href="contact.php#reservation"
type="button"
class="custom-btn btn btn-danger"
data-bs-toggle="modal"
data-bs-target="#BookingModal"
>
Reservation
</a>
</div>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mx-auto">
<li class="nav-item">
<a class="nav-link" href="index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="about.php">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="menu.php">Menu</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.php">Contact</a>
</li>
</ul>
</div>
<div class="d-none d-lg-block">
<a href="contact.php#reservation"
type="button"
class="custom-btn btn btn-danger"
data-bs-toggle="modal"
data-bs-target="#BookingModal"
>
Reservation
</a>
</div>
</div>
</nav>
<main>
<header class="site-header site-about-header">
<div class="container">
<div class="row">
<div class="col-lg-10 col-12 mx-auto">
<h1 class="text-white">About Us</h1>
<strong class="text-white">Get to know us more</strong>
</div>
</div>
</div>
<div class="overlay"></div>
</header>
<section class="about section-padding">
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="mb-5">Team Members</h2>
</div>
<div class="col-lg-4 col-12">
<div class="team-thumb">
<img src="image/mypersonalsite/team/matthew-hamilton-tNCH0sKSZbA-unsplash.jpg" class="img-fluid team-image" alt="">
<div class="team-info">
<h4 class="mt-3 mb-0">Sophia</h4>
<p>CEO &amp; Founder</p>
</div>
</div>
</div>
<div class="col-lg-4 col-12 my-lg-0 my-4">
<div class="team-thumb">
<img src="image/mypersonalsite/team/nicolas-horn-MTZTGvDsHFY-unsplash.jpg" class="img-fluid team-image" alt="">
<h4 class="mt-3 mb-0">Benjamin W.</h4>
<p>Restaurant Manager</p>
</div>
</div>
<div class="col-lg-4 col-12">
<div class="team-thumb">
<img src="image/mypersonalsite/team/rc-cf-FMh5o5m5N9E-unsplash.jpg" class="img-fluid team-image" alt="">
<h4 class="mt-3 mb-0">Muchen Jack</h4>
<p>Senior Chef</p>
</div>
</div>
</div>
</div>
</section>
<!--
<section class="newsletter section-padding bg-white">
<div class="container">
<div class="row">
<div class="col-lg-6 col-12">
<img src="image/mypersonalsite/charles-deluvio-FdDkfYFHqe4-unsplash.jpg" class="img-fluid newsletter-image" alt="">
</div>
<div class="col-lg-6 col-12 d-flex align-items-center mt-5 mt-lg-0 mx-auto">
<div class="subscribe-form-wrap">
<h4 class="mb-0">Our Newsletter</h4>
<p>The food news every day</p>
<form class="custom-form subscribe-form mt-4" role="form">
<input type="email" name="subscribe-email" id="subscribe-email" pattern="[^ @]*@[^ @]*" class="form-control" placeholder="Your email address" required="">
<button type="submit" class="form-control mb-3" id="subscribe">Subscribe</button>
<small>By signing up, you agree to our Privacy Notice and the data policy</small>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
-->
</main>
</section>
</body>
</html>
<?php // BEGIN PHP
$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "html", 169);
// END PHP ?>

View File

@ -1,597 +0,0 @@
<?php // BEGIN PHP
$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
} // Not already loaded
require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';
ob_start();
// END PHP ?>
<html lang="en">
<head>
<title>Our menus</title>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="" />
<meta name="title" content="Our menus" />
<meta name="description" content="" />
<meta name="generator" content="Dolibarr 17.0.0-alpha (https://www.dolibarr.org)" />
<meta name="dolibarr:pageid" content="172" />
<?php if ($website->use_manifest) { print '<link rel="manifest" href="/manifest.json.php" />'."\n"; } ?>
<!-- Include link to CSS file -->
<link rel="stylesheet" href="/styles.css.php?website=<?php echo $websitekey; ?>" type="text/css" />
<!-- Include link to JS file -->
<script async src="/javascript.js.php"></script>
<!-- Include HTML header from common file -->
<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>
<!-- Include HTML header from page header block -->
</head>
<!-- File generated by Dolibarr website module editor -->
<body id="bodywebsite" class="bodywebsite bodywebpage-menu">
<!-- Enter here your HTML content. Add a section with an id tag and tag contenteditable="true" if you want to use the inline editor for the content -->
<section id="mysection1" contenteditable="true">
<nav class="navbar navbar-expand-lg bg-white shadow-lg">
<div class="container">
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="index.html"><?php echo $mysoc->name; ?></a>
<div class="d-lg-none">
<a href="contact.php#reservation"
type="button"
class="custom-btn btn btn-danger"
data-bs-toggle="modal"
data-bs-target="#BookingModal"
>
Reservation
</a>
</div>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mx-auto">
<li class="nav-item">
<a class="nav-link" href="index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.php">About</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="menu.php">Menu</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.php">Contact</a>
</li>
</ul>
</div>
<div class="d-none d-lg-block">
<a href="contact.php#reservation"
type="button"
class="custom-btn btn btn-danger"
data-bs-toggle="modal"
data-bs-target="#BookingModal"
>
Reservation
</a>
</div>
</div>
</nav>
<main>
<header class="site-header site-menu-header">
<div class="container">
<div class="row">
<div class="col-lg-10 col-12 mx-auto">
<h1 class="text-white">Our Menus</h1>
<strong class="text-white"
>Perfect for all Breakfast, Lunch and
Dinner</strong
>
</div>
</div>
</div>
<div class="overlay"></div>
</header>
<section class="menu section-padding">
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="mb-lg-5 mb-4">Breakfast Menu</h2>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="image/mypersonalsite/breakfast/brett-jordan-8xt8-HIFqc8-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Fresh Start</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>24.50</span
>
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
4.4/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
128 Reviews
</p>
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="/image/mypersonalsite/breakfast/lucas-swennen-1W_MyJSRLuQ-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Baked Creamy</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>16.50</span
>
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
3/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i class="bi-star reviews-icon"></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
64 Reviews
</p>
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="image/mypersonalsite/breakfast/louis-hansel-dphM2U1xq0U-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Burger Set</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>24.50</span
>
<del class="ms-4"
><small>$</small>36.50</del
>
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
3/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i class="bi-star reviews-icon"></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
32 Reviews
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="menu section-padding bg-white">
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="mb-lg-5 mb-4">Lunch Menu</h2>
</div>
<div class="col-lg-6 col-12">
<div class="menu-thumb">
<img
src="image/mypersonalsite/lunch/louis-hansel-cH5IPjaAYyo-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Super Steak Set</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>32.75</span
>
<del class="ms-4"><small>$</small>55</del>
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
4.2/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
66 Reviews
</p>
</div>
</div>
</div>
</div>
<div class="col-lg-6 col-12">
<div class="menu-thumb">
<img
src="image/mypersonalsite/lunch/louis-hansel-rheOvfxOlOA-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Bread &amp; Steak Set</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>42.50</span
>
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
3/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i class="bi-star reviews-icon"></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
84 Reviews
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="menu section-padding">
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="mb-lg-5 mb-4">Dinner Menu</h2>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="image/mypersonalsite/dinner/farhad-ibrahimzade-ZipYER3NLhY-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Seafood Set</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>65.50</span
>
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
4.4/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
102 Reviews
</p>
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="image/mypersonalsite/dinner/keriliwi-c3mFafsFz2w-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Premium Steak</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>74.25</span
>
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
3/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i class="bi-star reviews-icon"></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
56 Reviews
</p>
</div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="image/mypersonalsite/dinner/farhad-ibrahimzade-isHUj3N0194-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Salmon Set</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>60</span
>
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
3/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i class="bi-star reviews-icon"></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
76 Reviews
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<footer class="site-footer section-padding">
<div class="container">
<div class="row">
<div class="col-12">
<h4 class="text-white mb-4 me-5"><?php echo $mysoc->name; ?></h4>
</div>
<div class="col-lg-4 col-md-7 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3">Location</h6>
<p><?php echo $mysoc->getFullAddress(); ?></p>
<a
href="https://goo.gl/maps/CJ8FfebWZHLQBA2r5"
class="custom-btn btn btn-dark mt-2"
>Directions</a
>
</div>
<div class="col-lg-4 col-md-5 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3">Opening Hours</h6>
<?php $days = ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"];
foreach ($days as $day){
echo "<p> $day : " .getDolGlobalString("MAIN_INFO_OPENINGHOURS_$day") ."</p>";
}
?>
<p>
Tel:
<a href="tel: 010-02-0340" class="tel-link"
><?php echo $mysoc->phone ?></a
>
</p>
</div>
<div class="col-lg-4 col-md-6 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3">Social</h6>
<ul class="social-icon">
<?php foreach($mysoc->socialnetworks as $key => $value) {
print '<li> <a class="btn btn-perso2 btn-floating m-1" href="'. (preg_match('/^http/', $value) ? $value : 'https://www.'.$key.'.com/'.$value).'"><span class="fab fa-'.$key.'"></i></a> </li>';
} ?>
</ul>
<p class="copyright-text tooplate-mt60">
Copyright © <?php echo $mysoc->name; ?>
</p>
</div>
</div>
<!-- row ending -->
</div>
<!-- container ending -->
</footer>
</section>
</body>
</html>
<?php // BEGIN PHP
$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "html", 172);
// END PHP ?>

View File

@ -0,0 +1,113 @@
<?php // BEGIN PHP
$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
} // Not already loaded
require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';
ob_start();
// END PHP ?>
<html lang="en">
<head>
<title>About us</title>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="" />
<meta name="title" content="About us" />
<meta name="description" content="" />
<meta name="generator" content="Dolibarr 17.0.0-beta (https://www.dolibarr.org)" />
<meta name="dolibarr:pageid" content="248" />
<?php if ($website->use_manifest) { print '<link rel="manifest" href="/manifest.json.php" />'."\n"; } ?>
<!-- Include link to CSS file -->
<link rel="stylesheet" href="/styles.css.php?website=<?php echo $websitekey; ?>" type="text/css" />
<!-- Include link to JS file -->
<script async src="/javascript.js.php"></script>
<!-- Include HTML header from common file -->
<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>
<!-- Include HTML header from page header block -->
</head>
<!-- File generated by Dolibarr website module editor -->
<body id="bodywebsite" class="bodywebsite bodywebpage-about">
<!-- Enter here your HTML content. Add a section with an id tag and tag contenteditable="true" if you want to use the inline editor for the content -->
<?php includeContainer('header'); ?>
<section id="mysection1" contenteditable="true">
<main>
<header class="site-header site-about-header">
<div class="container">
<div class="row">
<div class="col-lg-10 col-12 mx-auto">
<h1 class="text-white">About Us</h1>
<strong class="text-white">Get to know us more</strong>
</div>
</div>
</div>
<div class="overlay"></div>
</header>
<section class="about section-padding">
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="mb-5">Team Members</h2>
</div>
<div class="col-lg-4 col-12">
<div class="team-thumb">
<img src="image/aaab/team/matthew-hamilton-tNCH0sKSZbA-unsplash.jpg" class="img-fluid team-image" alt="">
<div class="team-info">
<h4 class="mt-3 mb-0">Sophia</h4>
<p>CEO &amp; Founder</p>
</div>
</div>
</div>
<div class="col-lg-4 col-12 my-lg-0 my-4">
<div class="team-thumb">
<img src="image/aaab/team/nicolas-horn-MTZTGvDsHFY-unsplash.jpg" class="img-fluid team-image" alt="">
<h4 class="mt-3 mb-0">Benjamin W.</h4>
<p>Restaurant Manager</p>
</div>
</div>
<div class="col-lg-4 col-12">
<div class="team-thumb">
<img src="image/aaab/team/rc-cf-FMh5o5m5N9E-unsplash.jpg" class="img-fluid team-image" alt="">
<h4 class="mt-3 mb-0">Muchen Jack</h4>
<p>Senior Chef</p>
</div>
</div>
</div>
</div>
</section>
</main>
</section>
<?php includeContainer('footer'); ?>
</body>
</html>
<?php // BEGIN PHP
$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "html", 248);
// END PHP ?>

View File

@ -18,8 +18,8 @@ ob_start();
<meta name="keywords" content="" />
<meta name="title" content="Contact us" />
<meta name="description" content="" />
<meta name="generator" content="Dolibarr 17.0.0-alpha (https://www.dolibarr.org)" />
<meta name="dolibarr:pageid" content="170" />
<meta name="generator" content="Dolibarr 17.0.0-beta (https://www.dolibarr.org)" />
<meta name="dolibarr:pageid" content="249" />
<?php if ($website->use_manifest) { print '<link rel="manifest" href="/manifest.json.php" />'."\n"; } ?>
<!-- Include link to CSS file -->
<link rel="stylesheet" href="/styles.css.php?website=<?php echo $websitekey; ?>" type="text/css" />
@ -34,7 +34,7 @@ ob_start();
<body id="bodywebsite" class="bodywebsite bodywebpage-contact">
<!-- Enter here your HTML content. Add a section with an id tag and tag contenteditable="true" if you want to use the inline editor for the content -->
<?php
if (GETPOST('action') == 'sendmail') {
if (GETPOST('action') == 'sendmail') {
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
$from = GETPOST('email', 'alpha');
$to = $mysoc->email;
@ -51,67 +51,12 @@ ob_start();
}
}
?>
<?php includeContainer('header'); ?>
<section id="mysection1" contenteditable="true">
<nav class="navbar navbar-expand-lg bg-white shadow-lg">
<div class="container">
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="index.html"><?php echo $mysoc->name; ?></a>
<div class="d-lg-none">
<a href="#reservation"
class="custom-btn btn btn-danger"
data-bs-toggle="modal"
data-bs-target="#BookingModal"
>
Reservation
</a>
</div>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mx-auto">
<li class="nav-item">
<a class="nav-link" href="index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="about.php">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="menu.php">Menu</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="contact.php">Contact</a>
</li>
</ul>
</div>
<div class="d-none d-lg-block">
<a href="#reservation"
type="button"
class="custom-btn btn btn-danger"
data-bs-toggle="modal"
data-bs-target="#BookingModal"
>
Reservation
</a>
</div>
</div>
</nav>
<main>
<main>
<header class="site-header site-contact-header">
<div class="container">
<div class="row">
@ -128,7 +73,7 @@ ob_start();
<div class="overlay"></div>
</header>
<a id="reservation"></a>
<a id="reservation"></a><br>
<section class="contact section-padding">
<div class="container">
@ -144,6 +89,9 @@ ob_start();
method="post"
role="form"
>
<input type="hidden" name="action" value="sendmail">
<input type="hidden" name="toekn" value="<?php echo newToken(); ?>">
<div class="col-lg-6 col-6">
<label for="contact-name" class="form-label"
>Full Name</label
@ -163,7 +111,7 @@ ob_start();
<label
for="contact-phone"
class="form-label"
>Phone Number</label
><?php echo $weblangs->trans("Phone"); ?></label
>
<input
@ -178,7 +126,7 @@ ob_start();
<label
for="contact-email"
class="form-label"
>Email</label
><?php echo $weblangs->trans("Email"); ?></label
>
<input
@ -194,7 +142,7 @@ ob_start();
<label
for="contact-message"
class="form-label"
>Message</label
><?php echo $weblangs->trans("Message"); ?></label
>
<textarea
@ -208,7 +156,7 @@ ob_start();
<div class="col-lg-5 col-12 ms-auto">
<button type="submit" class="form-control">
Send
<?php echo $weblangs->trans("Send"); ?>
</button>
</div>
</form>
@ -234,89 +182,25 @@ ob_start();
</div>
</div>
<div class="col-12">
<h4 class="mt-5 mb-4">
<div class="col-12" id="divaddress">
<br><br>
<h4 class="mt-5 mb-4 center">
<?php echo $mysoc->getFullAddress() ?>
</h4>
<div class="google-map pt-3">
<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d90596.06698695973!2d-0.7089680200547398!3d44.79859846268479!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0xd54d8fb00b62b4d%3A0x963d0840e2fa1f97!2sPessac%20Centre!5e0!3m2!1sen!2sfr!4v1659970475018!5m2!1sen!2sfr"
width="100%"
height="300"
style="border: 0"
allowfullscreen=""
loading="lazy"
referrerpolicy="no-referrer-when-downgrade"
></iframe>
<!-- Google MAPS -->
<center><div class="mapouter"><div class="gmap_canvas"><iframe width="600" height="500" id="gmap_canvas" src="https://maps.google.com/maps?q=<?php echo urlencode($mysoc->getFullAddress()); ?>&t=&z=13&ie=UTF8&iwloc=&output=embed" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>
</div>
<style>.mapouter{text-align:right;height:500px;width:600px;}.gmap_canvas {overflow:hidden;background:none!important;height:500px;width:600px;}</style>
</div></center>
</div>
</div>
</div>
</section>
</main>
<footer class="site-footer section-padding">
<div class="container">
<div class="row">
<div class="col-12">
<h4 class="text-white mb-4 me-5"><?php echo $mysoc->name; ?></h4>
</div>
<div class="col-lg-4 col-md-7 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3">Location</h6>
<p><?php echo $mysoc->getFullAddress(); ?></p>
<a
href="https://goo.gl/maps/CJ8FfebWZHLQBA2r5"
class="custom-btn btn btn-dark mt-2"
>Directions</a
>
</div>
<div class="col-lg-4 col-md-5 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3">Opening Hours</h6>
<?php $days = ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"];
foreach ($days as $day){
echo "<p> $day : " .getDolGlobalString("MAIN_INFO_OPENINGHOURS_$day") ."</p>";
}
?>
<p>
Tel:
<a href="tel: 010-02-0340" class="tel-link"
><?php echo $mysoc->phone ?></a
>
</p>
</div>
<div class="col-lg-4 col-md-6 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3">Social</h6>
<ul class="social-icon">
<?php foreach($mysoc->socialnetworks as $key => $value) {
print '<li> <a class="btn btn-perso2 btn-floating m-1" href="'. (preg_match('/^http/', $value) ? $value : 'https://www.'.$key.'.com/'.$value).'"><span class="fab fa-'.$key.'"></i></a> </li>';
} ?>
</ul>
<p class="copyright-text tooplate-mt60">
Copyright © <?php echo $mysoc->name; ?>
</p>
</div>
</div>
<!-- row ending -->
</div>
<!-- container ending -->
</footer>
<!-- Modal -->
<div
@ -346,7 +230,7 @@ ob_start();
<form
class="booking-form row"
role="form"
action="index.php"
action="contact.php"
method="POST"
>
<input type="hidden" name="token" value="<?php echo newToken(); ?>" />
@ -473,8 +357,12 @@ ob_start();
</section>
<?php includeContainer('footer'); ?>
</body>
</html>
<?php // BEGIN PHP
$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "html", 170);
$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "html", 249);
// END PHP ?>

View File

@ -18,8 +18,8 @@ ob_start();
<meta name="keywords" content="" />
<meta name="title" content="index" />
<meta name="description" content="" />
<meta name="generator" content="Dolibarr 17.0.0-alpha (https://www.dolibarr.org)" />
<meta name="dolibarr:pageid" content="171" />
<meta name="generator" content="Dolibarr 17.0.0-beta (https://www.dolibarr.org)" />
<meta name="dolibarr:pageid" content="250" />
<?php if ($website->use_manifest) { print '<link rel="manifest" href="/manifest.json.php" />'."\n"; } ?>
<!-- Include link to CSS file -->
<link rel="stylesheet" href="/styles.css.php?website=<?php echo $websitekey; ?>" type="text/css" />
@ -34,68 +34,10 @@ ob_start();
<body id="bodywebsite" class="bodywebsite bodywebpage-index">
<!-- Enter here your HTML content. Add a section with an id tag and tag contenteditable="true" if you want to use the inline editor for the content -->
<?php includeContainer('header'); ?>
<section id="mysection1" contenteditable="true">
<nav class="navbar navbar-expand-lg bg-white shadow-lg">
<div class="container">
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="index.html"><?php echo $mysoc->name; ?></a>
<div class="d-lg-none">
<a href="contact.php#reservation"
type="button"
class="custom-btn btn btn-danger"
data-bs-toggle="modal"
data-bs-target="#BookingModal"
>
Reservation
</a>
</div>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mx-auto">
<li class="nav-item">
<a class="nav-link active" href="index.php"
>Home</a
>
</li>
<li class="nav-item">
<a class="nav-link" href="about.php">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="menu.php">Menu</a>
</li>
<li class="nav-item">
<a class="nav-link" href="contact.php">Contact</a>
</li>
</ul>
</div>
<div class="d-none d-lg-block">
<a href="contact.php#reservation"
type="button"
class="custom-btn btn btn-danger"
data-bs-toggle="modal"
data-bs-target="#BookingModal"
>
Reservation
</a>
</div>
</div>
</nav>
<main>
<section class="hero">
<div class="container">
@ -106,16 +48,9 @@ ob_start();
Delicious Steaks
</h1>
<div
class="c-reviews my-3 d-flex flex-wrap align-items-center"
>
<div class="c-reviews my-3 d-flex flex-wrap align-items-center">
<div
class="d-flex flex-wrap align-items-center"
>
<h4 class="text-white mb-0 me-3">
4.7/5
</h4>
class="d-flex flex-wrap align-items-center">
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
@ -132,11 +67,6 @@ ob_start();
<i class="bi-star reviews-icon"></i>
</div>
</div>
<p class="text-white w-100">
From <strong>1,206+</strong> Customer
Reviews
</p>
</div>
</div>
</div>
@ -151,7 +81,7 @@ ob_start();
<div class="carousel-item active">
<div class="carousel-image-wrap">
<img
src="image/mypersonalsite/slide/jay-wennington-N_Y88TWmGwA-unsplash.jpg"
src="image/aaab/slide/jay-wennington-N_Y88TWmGwA-unsplash.jpg"
class="img-fluid carousel-image"
alt=""
/>
@ -167,7 +97,7 @@ ob_start();
<div class="carousel-item">
<div class="carousel-image-wrap">
<img
src="image/mypersonalsite/slide/jason-leung-O67LZfeyYBk-unsplash.jpg"
src="image/aaab/slide/jason-leung-O67LZfeyYBk-unsplash.jpg"
class="img-fluid carousel-image"
alt=""
/>
@ -183,41 +113,13 @@ ob_start();
>26.50<small></small></span
>
</div>
<div
class="d-flex flex-wrap align-items-center"
>
<h5
class="reviews-text mb-0 me-3"
>
3.8/5
</h5>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star reviews-icon"
></i>
<i
class="bi-star reviews-icon"
></i>
</div>
</div>
</div>
</div>
<div class="carousel-item">
<div class="carousel-image-wrap">
<img
src="image/mypersonalsite/slide/ivan-torres-MQUqbmszGGM-unsplash.jpg"
src="image/aaab/slide/ivan-torres-MQUqbmszGGM-unsplash.jpg"
class="img-fluid carousel-image"
alt=""
/>
@ -235,34 +137,6 @@ ob_start();
>18.25<small></small></span
>
</div>
<div
class="d-flex flex-wrap align-items-center"
>
<h5
class="reviews-text mb-0 me-3"
>
4.2/5
</h5>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star-fill reviews-icon"
></i>
<i
class="bi-star reviews-icon"
></i>
</div>
</div>
</div>
</div>
</div>
@ -299,22 +173,6 @@ ob_start();
</div>
</div>
<div class="video-wrap">
<video
autoplay=""
loop=""
muted=""
class="custom-video"
poster=""
>
<source
src="image/mypersonalsite/video/production_ID_3769033.mp4"
type="video/mp4"
/>
Your browser does not support the video tag.
</video>
</div>
<div class="overlay"></div>
</section>
@ -331,7 +189,7 @@ ob_start();
<div class="menu-thumb">
<div class="menu-image-wrap">
<img
src="image/mypersonalsite/breakfast/brett-jordan-8xt8-HIFqc8-unsplash.jpg"
src="image/aaab/breakfast/brett-jordan-8xt8-HIFqc8-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
@ -354,10 +212,6 @@ ob_start();
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
4.3/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
@ -373,10 +227,6 @@ ob_start();
></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
102 Reviews
</p>
</div>
</div>
</div>
@ -386,7 +236,7 @@ ob_start();
<div class="menu-thumb">
<div class="menu-image-wrap">
<img
src="image/mypersonalsite/lunch/farhad-ibrahimzade-MGKqxm6u2bc-unsplash.jpg"
src="image/aaab/lunch/farhad-ibrahimzade-MGKqxm6u2bc-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
@ -409,10 +259,6 @@ ob_start();
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
3/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
@ -426,10 +272,6 @@ ob_start();
<i class="bi-star reviews-icon"></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
50 Reviews
</p>
</div>
</div>
</div>
@ -439,7 +281,7 @@ ob_start();
<div class="menu-thumb">
<div class="menu-image-wrap">
<img
src="image/mypersonalsite/dinner/keriliwi-c3mFafsFz2w-unsplash.jpg"
src="image/aaab/dinner/keriliwi-c3mFafsFz2w-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
@ -462,10 +304,6 @@ ob_start();
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
3/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
@ -479,10 +317,6 @@ ob_start();
<i class="bi-star reviews-icon"></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
86 Reviews
</p>
</div>
</div>
</div>
@ -492,7 +326,7 @@ ob_start();
<div class="menu-thumb">
<div class="menu-image-wrap">
<img
src="image/mypersonalsite/dinner/farhad-ibrahimzade-ZipYER3NLhY-unsplash.jpg"
src="image/aaab/dinner/farhad-ibrahimzade-ZipYER3NLhY-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
@ -515,10 +349,6 @@ ob_start();
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
3/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
@ -532,10 +362,6 @@ ob_start();
<i class="bi-star reviews-icon"></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
44 Reviews
</p>
</div>
</div>
</div>
@ -545,7 +371,7 @@ ob_start();
<div class="menu-thumb">
<div class="menu-image-wrap">
<img
src="image/mypersonalsite/breakfast/louis-hansel-dphM2U1xq0U-unsplash.jpg"
src="image/aaab/breakfast/louis-hansel-dphM2U1xq0U-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
@ -568,10 +394,6 @@ ob_start();
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
4.3/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
@ -587,10 +409,6 @@ ob_start();
></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
102 Reviews
</p>
</div>
</div>
</div>
@ -600,7 +418,7 @@ ob_start();
<div class="menu-thumb">
<div class="menu-image-wrap">
<img
src="image/mypersonalsite/lunch/farhad-ibrahimzade-D5c9ZciQy_I-unsplash.jpg"
src="image/aaab/lunch/farhad-ibrahimzade-D5c9ZciQy_I-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
@ -623,10 +441,6 @@ ob_start();
<div
class="d-flex flex-wrap align-items-center w-100 mt-2"
>
<h6 class="reviews-text mb-0 me-3">
3/5
</h6>
<div class="reviews-stars">
<i
class="bi-star-fill reviews-icon"
@ -640,10 +454,6 @@ ob_start();
<i class="bi-star reviews-icon"></i>
<i class="bi-star reviews-icon"></i>
</div>
<p class="reviews-text mb-0 ms-4">
64 Reviews
</p>
</div>
</div>
</div>
@ -653,68 +463,13 @@ ob_start();
</section>
</main>
<footer class="site-footer section-padding">
<div class="container">
<div class="row">
<div class="col-12">
<h4 class="text-white mb-4 me-5"><?php echo $mysoc->name; ?></h4>
</div>
<div class="col-lg-4 col-md-7 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3">Location</h6>
<p><?php echo $mysoc->getFullAddress(); ?></p>
<a
href="https://goo.gl/maps/CJ8FfebWZHLQBA2r5"
class="custom-btn btn btn-dark mt-2"
>Directions</a
>
</div>
<div class="col-lg-4 col-md-5 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3">Opening Hours</h6>
<?php $days = ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"];
foreach ($days as $day){
echo "<p> $day : " .getDolGlobalString("MAIN_INFO_OPENINGHOURS_$day") ."</p>";
}
?>
<p>
Tel:
<a href="tel: 010-02-0340" class="tel-link"
><?php echo $mysoc->phone ?></a
>
</p>
</div>
<div class="col-lg-4 col-md-6 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3">Social</h6>
<ul class="social-icon">
<?php foreach($mysoc->socialnetworks as $key => $value) {
print '<li> <a class="btn btn-perso2 btn-floating m-1" href="'. (preg_match('/^http/', $value) ? $value : 'https://www.'.$key.'.com/'.$value).'"><span class="fab fa-'.$key.'"></i></a> </li>';
} ?>
</ul>
<p class="copyright-text tooplate-mt60">
Copyright © <?php echo $mysoc->name; ?>
</p>
</div>
</div>
<!-- row ending -->
</div>
<!-- container ending -->
</footer>
</section>
<?php includeContainer('footer'); ?>
</body>
</html>
<?php // BEGIN PHP
$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "html", 171);
$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "html", 250);
// END PHP ?>

View File

@ -0,0 +1,273 @@
<?php // BEGIN PHP
$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
} // Not already loaded
require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';
ob_start();
// END PHP ?>
<html lang="en">
<head>
<title>Our menus</title>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="" />
<meta name="title" content="Our menus" />
<meta name="description" content="" />
<meta name="generator" content="Dolibarr 17.0.0-beta (https://www.dolibarr.org)" />
<meta name="dolibarr:pageid" content="251" />
<?php if ($website->use_manifest) { print '<link rel="manifest" href="/manifest.json.php" />'."\n"; } ?>
<!-- Include link to CSS file -->
<link rel="stylesheet" href="/styles.css.php?website=<?php echo $websitekey; ?>" type="text/css" />
<!-- Include link to JS file -->
<script async src="/javascript.js.php"></script>
<!-- Include HTML header from common file -->
<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>
<!-- Include HTML header from page header block -->
</head>
<!-- File generated by Dolibarr website module editor -->
<body id="bodywebsite" class="bodywebsite bodywebpage-menu">
<!-- Enter here your HTML content. Add a section with an id tag and tag contenteditable="true" if you want to use the inline editor for the content -->
<?php includeContainer('header'); ?>
<section id="mysection1" contenteditable="true">
<main>
<header class="site-header site-menu-header">
<div class="container">
<div class="row">
<div class="col-lg-10 col-12 mx-auto">
<h1 class="text-white">Our Menus</h1>
<strong class="text-white"
>Perfect for all Breakfast, Lunch and
Dinner</strong
>
</div>
</div>
</div>
<div class="overlay"></div>
</header>
<section class="menu section-padding">
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="mb-lg-5 mb-4">Breakfast Menu</h2>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="image/aaab/breakfast/brett-jordan-8xt8-HIFqc8-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Fresh Start</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>24.50</span
>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="/image/aaab/breakfast/lucas-swennen-1W_MyJSRLuQ-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Baked Creamy</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>16.50</span
>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="image/aaab/breakfast/louis-hansel-dphM2U1xq0U-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Burger Set</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>24.50</span
>
<del class="ms-4"
><small>$</small>36.50</del
>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="menu section-padding bg-white">
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="mb-lg-5 mb-4">Lunch Menu</h2>
</div>
<div class="col-lg-6 col-12">
<div class="menu-thumb">
<img
src="image/aaab/lunch/louis-hansel-cH5IPjaAYyo-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Super Steak Set</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>32.75</span
>
<del class="ms-4"><small>$</small>55</del>
</div>
</div>
</div>
<div class="col-lg-6 col-12">
<div class="menu-thumb">
<img
src="image/aaab/lunch/louis-hansel-rheOvfxOlOA-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Bread &amp; Steak Set</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>42.50</span
>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="menu section-padding">
<div class="container">
<div class="row">
<div class="col-12">
<h2 class="mb-lg-5 mb-4">Dinner Menu</h2>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="image/aaab/dinner/farhad-ibrahimzade-ZipYER3NLhY-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Seafood Set</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>65.50</span
>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="image/aaab/dinner/keriliwi-c3mFafsFz2w-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Premium Steak</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>74.25</span
>
</div>
</div>
</div>
<div class="col-lg-4 col-md-6 col-12">
<div class="menu-thumb">
<img
src="image/aaab/dinner/farhad-ibrahimzade-isHUj3N0194-unsplash.jpg"
class="img-fluid menu-image"
alt=""
/>
<div
class="menu-info d-flex flex-wrap align-items-center"
>
<h4 class="mb-0">Salmon Set</h4>
<span
class="price-tag bg-white shadow-lg ms-4"
><small>$</small>60</span
>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
</section>
<?php includeContainer('footer'); ?>
</body>
</html>
<?php // BEGIN PHP
$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "html", 251);
// END PHP ?>

View File

@ -0,0 +1,93 @@
<?php // BEGIN PHP
$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
} // Not already loaded
require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';
ob_start();
// END PHP ?>
<html lang="en">
<head>
<title>Footer</title>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="" />
<meta name="title" content="Footer" />
<meta name="description" content="" />
<meta name="generator" content="Dolibarr 17.0.0-beta (https://www.dolibarr.org)" />
<meta name="dolibarr:pageid" content="252" />
<?php if ($website->use_manifest) { print '<link rel="manifest" href="/manifest.json.php" />'."\n"; } ?>
<!-- Include link to CSS file -->
<link rel="stylesheet" href="/styles.css.php?website=<?php echo $websitekey; ?>" type="text/css" />
<!-- Include link to JS file -->
<script async src="/javascript.js.php"></script>
<!-- Include HTML header from common file -->
<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>
<!-- Include HTML header from page header block -->
</head>
<!-- File generated by Dolibarr website module editor -->
<body id="bodywebsite" class="bodywebsite bodywebpage-footer">
<!-- Enter here your HTML content. Add a section with an id tag and tag contenteditable="true" if you want to use the inline editor for the content -->
<section id="footer" contenteditable="true">
<!-- Footer -->
<footer class="site-footer section-padding">
<div class="container">
<div class="row">
<div class="col-lg-4 col-md-7 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3"><?php echo $weblangs->trans("Location"); ?></h6>
<p><?php echo $mysoc->getFullAddress(); ?></p>
<a href="contact.php#divaddress" class="custom-btn btn btn-dark mt-2"><?php echo $weblangs->trans("Map"); ?></a>
</div>
<div class="col-lg-4 col-md-5 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3">Opening Hours</h6>
<?php $days = ["MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY"];
foreach ($days as $day){
echo "<p> $day : " .getDolGlobalString("MAIN_INFO_OPENINGHOURS_$day") ."</p>";
}
?>
<p>
Tel:
<a href="tel: <?php echo $mysoc->phone ?>" class="tel-link"
><?php echo $mysoc->phone ?></a
>
</p>
</div>
<div class="col-lg-4 col-md-6 col-xs-12 tooplate-mt30">
<h6 class="text-white mb-lg-4 mb-3">Social</h6>
<ul class="social-icon">
<?php foreach($mysoc->socialnetworks as $key => $value) {
print '<li> <a class="btn btn-perso2 btn-floating m-1" href="'. (preg_match('/^http/', $value) ? $value : 'https://www.'.$key.'.com/'.$value).'"><span class="fab fa-'.$key.'"></i></a> </li>';
} ?>
</ul>
<p class="copyright-text tooplate-mt60">
Copyright © <?php echo $mysoc->name; ?>
</p>
</div>
</div>
<!-- row ending -->
</div>
<!-- container ending -->
</footer>
</section>
</body>
</html>
<?php // BEGIN PHP
$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "html", 252);
// END PHP ?>

View File

@ -0,0 +1,98 @@
<?php // BEGIN PHP
$websitekey=basename(__DIR__); if (empty($websitepagefile)) $websitepagefile=__FILE__;
if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) {
$pathdepth = count(explode('/', $_SERVER['SCRIPT_NAME'])) - 2;
require_once ($pathdepth ? str_repeat('../', $pathdepth) : './').'master.inc.php';
} // Not already loaded
require_once DOL_DOCUMENT_ROOT.'/core/lib/website.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';
ob_start();
// END PHP ?>
<html lang="en">
<head>
<title>Header</title>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="index, follow" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="keywords" content="" />
<meta name="title" content="Header" />
<meta name="description" content="" />
<meta name="generator" content="Dolibarr 17.0.0-beta (https://www.dolibarr.org)" />
<meta name="dolibarr:pageid" content="253" />
<?php if ($website->use_manifest) { print '<link rel="manifest" href="/manifest.json.php" />'."\n"; } ?>
<!-- Include link to CSS file -->
<link rel="stylesheet" href="/styles.css.php?website=<?php echo $websitekey; ?>" type="text/css" />
<!-- Include link to JS file -->
<script async src="/javascript.js.php"></script>
<!-- Include HTML header from common file -->
<?php if (file_exists(DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html")) include DOL_DATA_ROOT."/website/".$websitekey."/htmlheader.html"; ?>
<!-- Include HTML header from page header block -->
</head>
<!-- File generated by Dolibarr website module editor -->
<body id="bodywebsite" class="bodywebsite bodywebpage-header">
<section id="header" contenteditable="true">
<nav class="navbar navbar-expand-lg bg-white shadow-lg">
<div class="container">
<button
class="navbar-toggler"
type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="index.html"><?php echo $mysoc->name; ?></a>
<div class="d-lg-none">
<a href="contact.php#reservation"
type="button"
class="custom-btn btn btn-danger"
data-bs-toggle="modal"
data-bs-target="#BookingModal"
><?php $langs->trans("Reservation"); ?></a>
</div>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav mx-auto">
<li class="nav-item">
<a class="nav-link<?php echo ($websitepage->ref == 'index' ? ' active' : ''); ?>" href="index.php"><?php echo $weblangs->trans("Home"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link<?php echo ($websitepage->ref == 'about' ? ' active' : ''); ?>" href="about.php"><?php echo $weblangs->trans("About"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link<?php echo ($websitepage->ref == 'menu' ? ' active' : ''); ?>" href="menu.php"><?php echo $weblangs->trans("Menu"); ?></a>
</li>
<li class="nav-item">
<a class="nav-link<?php echo ($websitepage->ref == 'contact' ? ' active' : ''); ?>" href="contact.php"><?php echo $weblangs->trans("Contact"); ?></a>
</li>
</ul>
</div>
<div class="d-none d-lg-block">
<a href="contact.php#reservation"
type="button"
class="custom-btn btn btn-danger"
data-bs-toggle="modal"
data-bs-target="#BookingModal"
><?php echo $weblangs->trans("Reservation"); ?></a>
</div>
</div>
</nav>
</section>
</body>
</html>
<?php // BEGIN PHP
$tmp = ob_get_contents(); ob_end_clean(); dolWebsiteOutput($tmp, "html", 253);
// END PHP ?>

View File

@ -11,44 +11,6 @@ header('Content-type: text/css');
// END PHP ?>
@charset "UTF-8";
.bodywebsite {
/*!
* Bootstrap v5.2.1 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
/* rtl:raw:
[type="tel"],
[type="url"],
[type="email"],
[type="number"] {
direction: ltr;
}
*/
/* rtl:begin:ignore */
/* rtl:end:ignore */
/* rtl:begin:ignore */
/* rtl:end:ignore */
/* rtl:begin:ignore */
/* rtl:end:ignore */
/* rtl:begin:ignore */
/* rtl:end:ignore */
/* rtl:begin:ignore */
/* rtl:end:ignore */
/* rtl:options: {
"autoRename": true,
"stringMap":[ {
"name" : "prev-next",
"search" : "prev",
"replace" : "next"
} ]
} */
/* rtl:begin:remove */
/* rtl:end:remove */
/*# sourceMappingURL=bootstrap.css.map */;
}
.bodywebsite :root {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
@ -143,6 +105,10 @@ header('Content-type: text/css');
-webkit-tap-highlight-color: transparent;
}
.bodywebsite .center {
text-align: center;
}
.bodywebsite hr {
margin: 1rem 0;
color: inherit;
@ -8367,6 +8333,7 @@ header('Content-type: text/css');
.bodywebsite .m-1 {
margin: 0.25rem !important;
padding-left: 0px !important;
}
.bodywebsite .m-2 {
@ -12596,8 +12563,8 @@ body.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; }
}
.bodywebsite .section-padding {
padding-top: 8rem;
padding-bottom: 8rem;
padding-top: 6rem;
padding-bottom: 6rem;
}
.bodywebsite b,
@ -13019,8 +12986,8 @@ body.bodywebsite { margin: 0; font-family: 'Open Sans', sans-serif; }
background-repeat: no-repeat;
background-position: center;
background-size: cover;
padding-top: 7rem;
padding-bottom: 7rem;
padding-top: 3rem;
padding-bottom: 3rem;
position: relative;
}

File diff suppressed because one or more lines are too long

View File

@ -55,6 +55,8 @@ ALTER TABLE llx_user DROP COLUMN idpers3;
-- v17
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_percent (percent);
UPDATE llx_c_paiement SET code = 'BANCON' WHERE code = 'BAN' AND libelle = 'Bancontact';
-- VMYSQL4.3 ALTER TABLE llx_partnership MODIFY COLUMN fk_user_creat integer NULL;

View File

@ -27,5 +27,6 @@ ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datep (datep);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_datep2 (datep2);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_recurid (recurid);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_ref_ext (ref_ext);
ALTER TABLE llx_actioncomm ADD INDEX idx_actioncomm_percent (percent);
ALTER TABLE llx_actioncomm ADD UNIQUE INDEX uk_actioncomm_ref (ref, entity);

View File

@ -57,7 +57,7 @@ create table llx_product
fk_user_modif integer, -- user making last change
tosell tinyint DEFAULT 1, -- Product you sell
tobuy tinyint DEFAULT 1, -- Product you buy
onportal tinyint DEFAULT 0, -- If it is a product you sell and you want to sell it on portal (module website must be on)
onportal tinyint DEFAULT 0, -- If it is a product you sell and you want to sell it from internal portal (module 'portal')
tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management)
sell_or_eat_by_mandatory tinyint DEFAULT 0 NOT NULL, -- Make sell-by or eat-by date mandatory
batch_mask varchar(32) DEFAULT NULL, -- If the product has batch feature, you may want to use a batch mask per product

View File

@ -44,7 +44,7 @@ create table llx_societe
town varchar(50), -- town
fk_departement integer DEFAULT 0, --
fk_pays integer DEFAULT 0, --
fk_account integer DEFAULT 0, --
fk_account integer DEFAULT 0, -- default bank account
phone varchar(20), -- phone number
fax varchar(20), -- fax number
url varchar(255), --

View File

@ -1881,7 +1881,7 @@ SuppliersInvoiceNumberingModel=Vendor invoices numbering models
IfSetToYesDontForgetPermission=If set to a non null value, don't forget to provide permissions to groups or users allowed for the second approval
##### GeoIPMaxmind #####
GeoIPMaxmindSetup=GeoIP Maxmind module setup
PathToGeoIPMaxmindCountryDataFile=Path to file containing Maxmind ip to country translation.<br>Examples:<br>/usr/local/share/GeoIP/GeoIP.dat<br>/usr/share/GeoIP/GeoIP.dat<br>/usr/share/GeoIP/GeoLite2-Country.mmdb
PathToGeoIPMaxmindCountryDataFile=Path to file containing Maxmind ip to country translation
NoteOnPathLocation=Note that your ip to country data file must be inside a directory your PHP can read (Check your PHP open_basedir setup and filesystem permissions).
YouCanDownloadFreeDatFileTo=You can download a <b>free demo version</b> of the Maxmind GeoIP country file at %s.
YouCanDownloadAdvancedDatFileTo=You can also download a more <b>complete version, with updates,</b> of the Maxmind GeoIP country file at %s.
@ -1932,7 +1932,7 @@ BackupDumpWizard=Wizard to build the database dump file
BackupZipWizard=Wizard to build the archive of documents directory
SomethingMakeInstallFromWebNotPossible=Installation of external module is not possible from the web interface for the following reason:
SomethingMakeInstallFromWebNotPossible2=For this reason, process to upgrade described here is a manual process only a privileged user may perform.
InstallModuleFromWebHasBeenDisabledContactUs=Install of external modules from the application is currently locked. Please contact us if you need us to enable this feature.
InstallModuleFromWebHasBeenDisabledContactUs=Install or development of external modules from the application is currently locked for security purpose. Please contact us if you need to enable this feature.
InstallModuleFromWebHasBeenDisabledByFile=Install of external module from application has been disabled by your administrator. You must ask him to remove the file <strong>%s</strong> to allow this feature.
ConfFileMustContainCustom=Installing or building an external module from application need to save the module files into directory <strong>%s</strong>. To have this directory processed by Dolibarr, you must setup your <strong>conf/conf.php</strong> to add the 2 directive lines:<br><strong>$dolibarr_main_url_root_alt='/custom';</strong><br><strong>$dolibarr_main_document_root_alt='%s/custom';</strong>
HighlightLinesOnMouseHover=Highlight table lines when mouse move passes over

View File

@ -240,7 +240,7 @@ OppStatusPENDING=Pending
OppStatusWON=Won
OppStatusLOST=Lost
Budget=Budget
AllowToLinkFromOtherCompany=Allow to link project from other company<br><br><u>Supported values:</u><br>- Keep empty: Can link any project of the company (default)<br>- "all": Can link any projects, even projects of other companies<br>- A list of third-party ids separated by commas: can link all projects of these third partys (Example: 123,4795,53)<br>
AllowToLinkFromOtherCompany=Allow to link an element with a project of other company<br><br><u>Supported values:</u><br>- Keep empty: Can link elements with any projects in the same company (default)<br>- "all": Can link elements with any projects, even projects of other companies<br>- A list of third-party ids separated by commas: can link elements with any projects of these third partys (Example: 123,4795,53)<br>
LatestProjects=Latest %s projects
LatestModifiedProjects=Latest %s modified projects
OtherFilteredTasks=Other filtered tasks
@ -284,7 +284,7 @@ ProfitIsCalculatedWith=Profit is calculated using
AddPersonToTask=Add also to tasks
UsageOrganizeEvent=Usage: Event Organization
PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE=Classify project as closed when all its tasks are completed (100%% progress)
PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks at 100%% progress won't be affected: you will have to close them manually. This option only affects open projects.
PROJECT_CLASSIFY_CLOSED_WHEN_ALL_TASKS_DONE_help=Note: existing projects with all tasks already set to a progress of 100%% won't be affected: you will have to close them manually. This option only affects open projects.
SelectLinesOfTimeSpentToInvoice=Select lines of time spent that are unbilled, then bulk action "Generate Invoice" to bill them
ProjectTasksWithoutTimeSpent=Project tasks without time spent
FormForNewLeadDesc=Thanks to fill the following form to contact us. You can also send us an email directly to <b>%s</b>.

View File

@ -153,3 +153,5 @@ PreviousContainer=Previous page/container
WebsiteMustBeDisabled=The website must have the status "%s"
WebpageMustBeDisabled=The web page must have the status "%s"
SetWebsiteOnlineBefore=When website is offline, all pages are offline. Change status of website first.
Booking=Booking
Reservation=Reservation

View File

@ -1484,7 +1484,7 @@ function top_httphead($contenttype = 'text/html', $forcenocache = 0)
// Referrer-Policy
// Say if we must provide the referrer when we jump onto another web page.
// Default browser are 'strict-origin-when-cross-origin', we want more so we use 'same-origin' so we don't send any referrer when going into another web site
// Default browser are 'strict-origin-when-cross-origin' (only domain is sent on other domain switching), we want more so we use 'same-origin' so browser doesn't send any referrer when going into another web site domain.
if (!defined('MAIN_SECURITY_FORCERP')) {
$referrerpolicy = getDolGlobalString('MAIN_SECURITY_FORCERP', "same-origin");

View File

@ -58,10 +58,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/conf.class.php';
$conf = new Conf();
// Set properties specific to database
$conf->db->host = $dolibarr_main_db_host;
$conf->db->port = $dolibarr_main_db_port;
$conf->db->name = $dolibarr_main_db_name;
$conf->db->user = $dolibarr_main_db_user;
$conf->db->host = empty($dolibarr_main_db_host) ? '' : $dolibarr_main_db_host;
$conf->db->port = empty($dolibarr_main_db_port) ? '' : $dolibarr_main_db_port;
$conf->db->name = empty($dolibarr_main_db_name) ? '' : $dolibarr_main_db_name;
$conf->db->user = empty($dolibarr_main_db_user) ? '' : $dolibarr_main_db_user;
$conf->db->pass = empty($dolibarr_main_db_pass) ? '' : $dolibarr_main_db_pass;
$conf->db->type = $dolibarr_main_db_type;
$conf->db->prefix = $dolibarr_main_db_prefix;

View File

@ -1974,6 +1974,28 @@ if ($message) {
$infomodulesfound = '<div style="padding: 12px 9px 12px">'.$form->textwithpicto('', $langs->trans("ModuleBuilderDesc3", count($listofmodules)).'<br><br>'.$langs->trans("ModuleBuilderDesc4", $FILEFLAG).'<br>'.$textforlistofdirs).'</div>';
$dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT);
$allowonlineinstall = true;
if (dol_is_file($dolibarrdataroot.'/installmodules.lock')) {
$allowonlineinstall = false;
}
if (empty($allowonlineinstall)) {
if (getDolGlobalString('MAIN_MESSAGE_INSTALL_MODULES_DISABLED_CONTACT_US')) {
// Show clean message
$message = info_admin($langs->trans('InstallModuleFromWebHasBeenDisabledContactUs'));
} else {
// Show technical message
$message = info_admin($langs->trans("InstallModuleFromWebHasBeenDisabledByFile", $dolibarrdataroot.'/installmodules.lock'), 0, 0, 1, 'warning');
}
print $message;
llxFooter();
exit(0);
}
// Load module descriptor
$error = 0;
$moduleobj = null;

View File

@ -119,7 +119,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
$form = new Form($this->db);
$texte = $this->description.".<br>\n";
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST" enctype="multipart/form-data">';
$texte .= '<input type="hidden" name="token" value="'.newToken().'">';
$texte .= '<input type="hidden" name="page_y" value="">';
$texte .= '<input type="hidden" name="action" value="setModuleOptions">';
@ -158,7 +158,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
$texte .= $conf->global->MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH;
$texte .= '</textarea>';
$texte .= '</div><div style="display: inline-block; vertical-align: middle;">';
$texte .= '<input type="submit" class="button small reposition" name="modify" value="'.$langs->trans("Modify").'">';
$texte .= '<input type="submit" class="button small reposition" name="modify" value="'.dol_escape_htmltag($langs->trans("Modify")).'">';
$texte .= '<br></div></div>';
// Scan directories
@ -172,18 +172,16 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
}
if ($nbofiles) {
$texte .= '<div id="div_'.get_class($this).'" class="hidden">';
$texte .= '<div id="div_'.get_class($this).'" class="hiddenx">';
// Show list of found files
foreach ($listoffiles as $file) {
$texte .= '- '.$file['name'];
$texte .= ' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=mymodule_myobject/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=COMPANY_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '- '.$file['name'].' <a href="'.DOL_URL_ROOT.'/document.php?modulepart=doctemplates&file=mymodule_myobject/'.urlencode(basename($file['name'])).'">'.img_picto('', 'listlight').'</a>';
$texte .= ' &nbsp; <a class="reposition" href="'.$_SERVER["PHP_SELF"].'?modulepart=doctemplates&keyforuploaddir=MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH&action=deletefile&token='.newToken().'&file='.urlencode(basename($file['name'])).'">'.img_picto('', 'delete').'</a>';
$texte .= '<br>';
}
$texte .= '</div>';
}
$texte .= '</td>';
// Add input to upload a new template file.
$texte .= '<div>'.$langs->trans("UploadNewTemplate");
$maxfilesizearray = getMaxFileSizeArray();
@ -195,6 +193,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
$texte .= '<input type="hidden" value="MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">';
$texte .= '<input type="submit" class="button small reposition" value="'.dol_escape_htmltag($langs->trans("Upload")).'" name="upload">';
$texte .= '</div>';
$texte .= '</td>';
$texte .= '<td rowspan="2" class="tdtop hideonsmartphone">';
@ -282,8 +281,10 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
$newfiletmp = preg_replace('/\.od(t|s)/i', '', $newfile);
$newfiletmp = preg_replace('/template_/i', '', $newfiletmp);
$newfiletmp = preg_replace('/modele_/i', '', $newfiletmp);
$newfiletmp = $objectref . '_' . $newfiletmp;
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
// Get extension (ods or odt)
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
@ -308,7 +309,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
return -1;
}
// If CUSTOMER contact defined on order, we use it
// If CUSTOMER contact defined on object, we use it
$usecontact = false;
$arrayidcontact = $object->getIdContact('external', 'CUSTOMER');
if (count($arrayidcontact) > 0) {
@ -348,7 +349,7 @@ class doc_generic_myobject_odt extends ModelePDFMyObject
// Line of free text
$newfreetext = '';
$paramfreetext = 'ORDER_FREE_TEXT';
$paramfreetext = 'MYMODULE_MYOBJECT_FREE_TEXT';
if (!empty($conf->global->$paramfreetext)) {
$newfreetext = make_substitutions($conf->global->$paramfreetext, $substitutionarray);
}

View File

@ -731,7 +731,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Show links to link elements
$linktoelem = $form->showLinkToObjectBlock($object, null, array('mo'));
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, false, 'MOChild');
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem, false);
print '</div><div class="fichehalfright">';

Some files were not shown because too many files have changed in this diff Show More