2017-02-12 18:13:49 +01:00
< ? php
/* Copyright ( C ) 2004 Rodolphe Quiedeville < rodolphe @ quiedeville . org >
2018-08-22 13:23:46 +02:00
* Copyright ( C ) 2004 - 2018 Laurent Destailleur < eldy @ users . sourceforge . net >
2017-02-12 18:13:49 +01:00
* Copyright ( C ) 2004 Benoit Mortier < benoit . mortier @ opensides . be >
2018-10-27 14:43:12 +02:00
* Copyright ( C ) 2005 - 2012 Regis Houssin < regis . houssin @ inodbox . com >
2017-02-12 18:13:49 +01:00
* Copyright ( C ) 2010 - 2016 Juanjo Menent < jmenent @ 2 byte . es >
2018-05-03 21:27:52 +02:00
* Copyright ( C ) 2011 - 2018 Philippe Grand < philippe . grand @ atoo - net . com >
2017-02-12 18:13:49 +01:00
* Copyright ( C ) 2011 Remy Younes < ryounes @ gmail . com >
* Copyright ( C ) 2012 - 2015 Marcos García < marcosgdf @ gmail . com >
* Copyright ( C ) 2012 Christophe Battarel < christophe . battarel @ ltairis . fr >
2019-01-28 21:39:22 +01:00
* Copyright ( C ) 2011 - 2016 Alexandre Spangaro < aspangaro @ open - dsi . fr >
2024-04-21 00:14:39 +02:00
* Copyright ( C ) 2015 - 2024 Ferran Marcet < fmarcet @ 2 byte . es >
2017-02-12 18:13:49 +01:00
* Copyright ( C ) 2016 Raphaël Doursenaud < rdoursenaud @ gpcsolutions . fr >
2024-07-08 21:45:35 +02:00
* Copyright ( C ) 2018 - 2024 Frédéric France < frederic . france @ free . fr >
2024-09-18 03:27:25 +02:00
* Copyright ( C ) 2024 MDW < mdeweerd @ users . noreply . github . com >
2017-02-12 18:13:49 +01:00
*
* 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
* the Free Software Foundation ; either version 3 of the License , or
* ( at your option ) any later version .
*
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
*
* You should have received a copy of the GNU General Public License
2019-09-23 21:55:30 +02:00
* along with this program . If not , see < https :// www . gnu . org / licenses />.
2017-02-12 18:13:49 +01:00
*/
/**
2017-04-18 01:39:06 +02:00
* \file htdocs / admin / mails_templates . php
2017-09-08 12:21:47 +02:00
* \ingroup core
* \brief Page to administer emails templates
2017-02-12 18:13:49 +01:00
*/
2022-09-07 20:08:59 +02:00
// Load Dolibarr environment
2017-02-12 18:13:49 +01:00
require '../main.inc.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formadmin.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formcompany.class.php' ;
2024-07-23 02:12:46 +02:00
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php' ;
2017-02-12 18:13:49 +01:00
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php' ;
require_once DOL_DOCUMENT_ROOT . '/core/lib/accounting.lib.php' ;
2024-11-04 23:53:20 +01:00
/**
* @ var Conf $conf
* @ var DoliDB $db
* @ var HookManager $hookmanager
* @ var Translate $langs
* @ var User $user
*/
2018-05-26 18:41:16 +02:00
// Load translation files required by the page
2024-03-07 20:16:48 +01:00
$langsArray = array ( " errors " , " admin " , " mails " , " languages " );
2021-02-14 16:41:57 +01:00
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'member' )) {
2024-03-07 20:16:48 +01:00
$langsArray [] = 'members' ;
2021-02-14 16:41:57 +01:00
}
2022-08-31 22:38:53 +02:00
if ( isModEnabled ( 'eventorganization' )) {
2024-03-07 20:16:48 +01:00
$langsArray [] = 'eventorganization' ;
2021-02-14 16:41:57 +01:00
}
$langs -> loadLangs ( $langsArray );
2017-02-12 18:13:49 +01:00
2022-06-29 07:32:25 +02:00
$toselect = GETPOST ( 'toselect' , 'array' );
2022-10-04 23:53:17 +02:00
$action = GETPOST ( 'action' , 'aZ09' ) ? GETPOST ( 'action' , 'aZ09' ) : 'view' ;
2021-04-14 16:06:53 +02:00
$massaction = GETPOST ( 'massaction' , 'alpha' );
2019-12-16 13:06:25 +01:00
$confirm = GETPOST ( 'confirm' , 'alpha' ); // Result of a confirmation
2022-05-23 00:12:16 +02:00
$mode = GETPOST ( 'mode' , 'aZ09' );
2022-06-29 07:32:25 +02:00
$optioncss = GETPOST ( 'optioncss' , 'alpha' );
2024-10-27 14:08:59 +01:00
$contextpage = GETPOST ( 'contextpage' , 'aZ09' );
2017-10-13 12:02:26 +02:00
2024-07-23 02:12:46 +02:00
$id = $rowid = ( GETPOSTINT ( 'id' ) ? GETPOSTINT ( 'id' ) : GETPOSTINT ( 'rowid' ));
2019-12-16 13:06:25 +01:00
$search_label = GETPOST ( 'search_label' , 'alphanohtml' ); // Must allow value like 'Abc Def' or '(MyTemplateName)'
$search_type_template = GETPOST ( 'search_type_template' , 'alpha' );
$search_lang = GETPOST ( 'search_lang' , 'alpha' );
$search_fk_user = GETPOST ( 'search_fk_user' , 'intcomma' );
$search_topic = GETPOST ( 'search_topic' , 'alpha' );
2023-01-04 12:40:21 +01:00
$search_module = GETPOST ( 'search_module' , 'alpha' );
2017-02-12 18:13:49 +01:00
2020-02-16 18:06:25 +01:00
$acts = array ();
$actl = array ();
2017-02-12 18:13:49 +01:00
$acts [ 0 ] = " activate " ;
$acts [ 1 ] = " disable " ;
2021-04-19 22:52:13 +02:00
$actl [ 0 ] = img_picto ( $langs -> trans ( " Disabled " ), 'switch_off' , 'class="size15x"' );
$actl [ 1 ] = img_picto ( $langs -> trans ( " Activated " ), 'switch_on' , 'class="size15x"' );
2017-02-12 18:13:49 +01:00
2019-12-16 13:06:25 +01:00
$listoffset = GETPOST ( 'listoffset' , 'alpha' );
2023-12-04 11:41:14 +01:00
$listlimit = GETPOST ( 'listlimit' , 'alpha' ) > 0 ? GETPOST ( 'listlimit' , 'alpha' ) : 1000 ;
2017-02-12 18:13:49 +01:00
2024-03-16 11:41:00 +01:00
$limit = GETPOSTINT ( 'limit' ) ? GETPOSTINT ( 'limit' ) : $conf -> liste_limit ;
2022-01-13 11:09:37 +01:00
$sortfield = GETPOST ( 'sortfield' , 'aZ09comma' );
$sortorder = GETPOST ( 'sortorder' , 'aZ09comma' );
2024-03-01 01:52:40 +01:00
$page = GETPOSTISSET ( 'pageplusone' ) ? ( GETPOSTINT ( 'pageplusone' ) - 1 ) : GETPOSTINT ( " page " );
2021-02-26 22:04:03 +01:00
if ( empty ( $page ) || $page == - 1 ) {
$page = 0 ;
} // If $page is not defined, or '' or -1
2019-12-16 13:06:25 +01:00
$offset = $listlimit * $page ;
2017-02-12 18:13:49 +01:00
$pageprev = $page - 1 ;
$pagenext = $page + 1 ;
2021-02-26 22:04:03 +01:00
if ( empty ( $sortfield )) {
2023-04-13 16:31:06 +02:00
$sortfield = 'type_template,lang,position,label' ;
2021-02-26 22:04:03 +01:00
}
if ( empty ( $sortorder )) {
$sortorder = 'ASC' ;
}
2017-09-22 11:47:36 +02:00
2024-06-30 21:02:50 +02:00
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
2017-02-12 18:13:49 +01:00
$hookmanager -> initHooks ( array ( 'emailtemplates' ));
2022-05-08 18:25:22 +02:00
2017-02-12 18:13:49 +01:00
// Name of SQL tables of dictionaries
2019-12-16 13:06:25 +01:00
$tabname = array ();
$tabname [ 25 ] = MAIN_DB_PREFIX . " c_email_templates " ;
2017-02-12 18:13:49 +01:00
// Nom des champs en resultat de select pour affichage du dictionnaire
2019-12-16 13:06:25 +01:00
$tabfield = array ();
2023-04-13 20:34:54 +02:00
$tabfield [ 25 ] = " label,lang,type_template,fk_user,private,position,module,topic,joinfiles,defaultfortype,content " ;
2023-10-24 17:00:13 +02:00
if ( getDolGlobalString ( 'MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES' )) {
2021-02-26 22:04:03 +01:00
$tabfield [ 25 ] .= ',content_lines' ;
}
2017-02-12 18:13:49 +01:00
// Nom des champs d'edition pour modification d'un enregistrement
2019-12-16 13:06:25 +01:00
$tabfieldvalue = array ();
2023-08-02 12:05:44 +02:00
$tabfieldvalue [ 25 ] = " label,lang,type_template,fk_user,private,position,topic,email_from,joinfiles,defaultfortype,content " ;
2023-10-24 17:00:13 +02:00
if ( getDolGlobalString ( 'MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES' )) {
2021-02-26 22:04:03 +01:00
$tabfieldvalue [ 25 ] .= ',content_lines' ;
}
2017-02-12 18:13:49 +01:00
// Nom des champs dans la table pour insertion d'un enregistrement
2019-12-16 13:06:25 +01:00
$tabfieldinsert = array ();
2023-08-02 12:05:44 +02:00
$tabfieldinsert [ 25 ] = " label,lang,type_template,fk_user,private,position,topic,email_from,joinfiles,defaultfortype,content " ;
2023-10-24 17:00:13 +02:00
if ( getDolGlobalString ( 'MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES' )) {
2021-02-26 22:04:03 +01:00
$tabfieldinsert [ 25 ] .= ',content_lines' ;
}
2019-12-16 13:06:25 +01:00
$tabfieldinsert [ 25 ] .= ',entity' ; // Must be at end because not into other arrays
2017-02-12 18:13:49 +01:00
// Condition to show dictionary in setup page
2019-12-16 13:06:25 +01:00
$tabcond = array ();
$tabcond [ 25 ] = true ;
2017-02-12 18:13:49 +01:00
// List of help for fields
// Set MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES to allow edit of template for lines
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formmail.class.php' ;
2019-12-16 13:06:25 +01:00
$formmail = new FormMail ( $db );
2023-10-24 17:00:13 +02:00
if ( ! getDolGlobalString ( 'MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES' )) {
2020-09-07 10:18:17 +02:00
$tmp = FormMail :: getAvailableSubstitKey ( 'formemail' );
$tmp [ '__(AnyTranslationKey)__' ] = 'Translation' ;
$helpsubstit = $langs -> trans ( " AvailableVariables " ) . ':<br>' ;
$helpsubstitforlines = $langs -> trans ( " AvailableVariables " ) . ':<br>' ;
2021-02-26 22:04:03 +01:00
foreach ( $tmp as $key => $val ) {
2020-09-07 10:18:17 +02:00
$helpsubstit .= $key . ' -> ' . $val . '<br>' ;
$helpsubstitforlines .= $key . ' -> ' . $val . '<br>' ;
}
2020-05-21 09:35:30 +02:00
} else {
2020-09-07 10:18:17 +02:00
$tmp = FormMail :: getAvailableSubstitKey ( 'formemailwithlines' );
$tmp [ '__(AnyTranslationKey)__' ] = 'Translation' ;
$helpsubstit = $langs -> trans ( " AvailableVariables " ) . ':<br>' ;
$helpsubstitforlines = $langs -> trans ( " AvailableVariables " ) . ':<br>' ;
2021-02-26 22:04:03 +01:00
foreach ( $tmp as $key => $val ) {
2020-09-07 10:18:17 +02:00
$helpsubstit .= $key . ' -> ' . $val . '<br>' ;
}
$tmp = FormMail :: getAvailableSubstitKey ( 'formemailforlines' );
2021-02-26 22:04:03 +01:00
foreach ( $tmp as $key => $val ) {
2020-09-07 10:18:17 +02:00
$helpsubstitforlines .= $key . ' -> ' . $val . '<br>' ;
}
2017-02-12 18:13:49 +01:00
}
2019-12-16 13:06:25 +01:00
$tabhelp = array ();
2020-11-01 13:48:32 +01:00
$tabhelp [ 25 ] = array (
2024-03-07 20:16:48 +01:00
'label' => $langs -> trans ( 'EnterAnyCode' ),
'type_template' => $langs -> trans ( " TemplateForElement " ),
'private' => $langs -> trans ( " TemplateIsVisibleByOwnerOnly " ),
'position' => $langs -> trans ( " PositionIntoComboList " ),
'topic' => '<span class="small">' . $helpsubstit . '</span>' ,
'email_from' => $langs -> trans ( 'ForceEmailFrom' ),
'joinfiles' => $langs -> trans ( 'AttachMainDocByDefault' ),
'defaultfortype' => $langs -> trans ( " DefaultForTypeDesc " ),
'content' => '<span class="small">' . $helpsubstit . '</span>' ,
'content_lines' => '<span class="small">' . $helpsubstitforlines . '</span>'
2020-11-01 13:48:32 +01:00
);
2017-02-12 18:13:49 +01:00
// We save list of template email Dolibarr can manage. This list can found by a grep into code on "->param['models']"
$elementList = array ();
2020-10-17 12:59:22 +02:00
// Add all and none after the sort
2021-06-22 19:11:58 +02:00
2020-10-17 12:59:22 +02:00
$elementList [ 'all' ] = '-- ' . dol_escape_htmltag ( $langs -> trans ( " All " )) . ' --' ;
$elementList [ 'none' ] = '-- ' . dol_escape_htmltag ( $langs -> trans ( " None " )) . ' --' ;
2022-08-15 02:27:07 +02:00
$elementList [ 'user' ] = img_picto ( '' , 'user' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToUser' ));
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'member' ) && $user -> hasRight ( 'adherent' , 'lire' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'member' ] = img_picto ( '' , 'object_member' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToMember' ));
2020-11-01 13:48:32 +01:00
}
2023-06-19 20:18:59 +02:00
if ( isModEnabled ( 'recruitment' ) && $user -> hasRight ( 'recruitment' , 'recruitmentjobposition' , 'read' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'recruitmentcandidature_send' ] = img_picto ( '' , 'recruitmentcandidature' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'RecruitmentCandidatures' ));
2020-11-01 13:48:32 +01:00
}
2022-09-10 11:13:02 +02:00
if ( isModEnabled ( " societe " ) && $user -> hasRight ( 'societe' , 'lire' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'thirdparty' ] = img_picto ( '' , 'company' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToThirdparty' ));
2020-11-01 13:48:32 +01:00
}
2024-04-21 00:14:39 +02:00
if ( isModEnabled ( " societe " ) && $user -> hasRight ( 'societe' , 'contact' , 'lire' )) {
$elementList [ 'contact' ] = img_picto ( '' , 'contact' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToContact' ));
}
2022-08-31 21:46:25 +02:00
if ( isModEnabled ( 'project' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'project' ] = img_picto ( '' , 'project' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToProject' ));
2020-11-01 13:48:32 +01:00
}
2023-06-12 20:17:21 +02:00
if ( isModEnabled ( " propal " ) && $user -> hasRight ( 'propal' , 'lire' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'propal_send' ] = img_picto ( '' , 'propal' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendProposal' ));
2020-11-01 13:48:32 +01:00
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'order' ) && $user -> hasRight ( 'commande' , 'lire' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'order_send' ] = img_picto ( '' , 'order' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendOrder' ));
2020-11-01 13:48:32 +01:00
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'invoice' ) && $user -> hasRight ( 'facture' , 'lire' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'facture_send' ] = img_picto ( '' , 'bill' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendInvoice' ));
2020-11-01 13:48:32 +01:00
}
2024-03-12 11:07:18 +01:00
if ( isModEnabled ( " shipping " )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'shipping_send' ] = img_picto ( '' , 'dolly' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendShipment' ));
2020-11-01 13:48:32 +01:00
}
2022-08-23 20:01:34 +02:00
if ( isModEnabled ( " reception " )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'reception_send' ] = img_picto ( '' , 'dollyrevert' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendReception' ));
2020-11-01 13:48:32 +01:00
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'intervention' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'fichinter_send' ] = img_picto ( '' , 'intervention' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendIntervention' ));
2020-11-01 13:48:32 +01:00
}
2022-08-31 22:02:31 +02:00
if ( isModEnabled ( 'supplier_proposal' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'supplier_proposal_send' ] = img_picto ( '' , 'propal' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendSupplierRequestForQuotation' ));
2020-11-01 13:48:32 +01:00
}
2023-04-18 16:40:38 +02:00
if ( isModEnabled ( " supplier_order " ) && ( $user -> hasRight ( 'fournisseur' , 'commande' , 'lire' ) || $user -> hasRight ( 'supplier_order' , 'read' ))) {
2022-08-15 02:27:07 +02:00
$elementList [ 'order_supplier_send' ] = img_picto ( '' , 'order' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendSupplierOrder' ));
2020-11-01 13:48:32 +01:00
}
2023-04-18 16:40:38 +02:00
if ( isModEnabled ( " supplier_invoice " ) && ( $user -> hasRight ( 'fournisseur' , 'facture' , 'lire' ) || $user -> hasRight ( 'supplier_invoice' , 'read' ))) {
2022-08-15 02:27:07 +02:00
$elementList [ 'invoice_supplier_send' ] = img_picto ( '' , 'bill' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendSupplierInvoice' ));
2020-11-01 13:48:32 +01:00
}
2024-02-27 15:30:37 +01:00
if ( isModEnabled ( 'contract' ) && $user -> hasRight ( 'contrat' , 'lire' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'contract' ] = img_picto ( '' , 'contract' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendContract' ));
2020-11-01 13:48:32 +01:00
}
2023-10-11 19:44:06 +02:00
if ( isModEnabled ( 'ticket' ) && $user -> hasRight ( 'ticket' , 'read' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'ticket_send' ] = img_picto ( '' , 'ticket' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToTicket' ));
2020-11-01 13:48:32 +01:00
}
2023-10-11 19:44:06 +02:00
if ( isModEnabled ( 'expensereport' ) && $user -> hasRight ( 'expensereport' , 'lire' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'expensereport_send' ] = img_picto ( '' , 'trip' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToExpenseReport' ));
2021-11-28 12:12:16 +01:00
}
2022-06-09 22:16:48 +02:00
if ( isModEnabled ( 'agenda' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'actioncomm_send' ] = img_picto ( '' , 'action' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendEventPush' ));
2020-11-01 13:48:32 +01:00
}
2023-10-11 19:44:06 +02:00
if ( isModEnabled ( 'eventorganization' ) && $user -> hasRight ( 'eventorganization' , 'read' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'conferenceorbooth' ] = img_picto ( '' , 'action' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToSendEventOrganization' ));
2021-02-14 16:41:57 +01:00
}
2023-10-11 19:44:06 +02:00
if ( isModEnabled ( 'partnership' ) && $user -> hasRight ( 'partnership' , 'read' )) {
2022-08-15 02:27:07 +02:00
$elementList [ 'partnership_send' ] = img_picto ( '' , 'partnership' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'MailToPartnership' ));
2021-08-09 18:01:41 +02:00
}
2025-01-24 16:52:50 +01:00
if ( isModEnabled ( 'product' ) && ! empty ( $user -> rights -> produit -> lire )) {
$elementList [ 'product_send' ] = img_picto ( '' , 'product' , 'class="pictofixedwidth"' ) . dol_escape_htmltag ( $langs -> trans ( 'Product' ));
}
2019-12-16 13:06:25 +01:00
2024-03-07 20:16:48 +01:00
$parameters = array ( 'elementList' => $elementList );
2019-12-16 13:06:25 +01:00
$reshook = $hookmanager -> executeHooks ( 'emailElementlist' , $parameters ); // Note that $action and $object may have been modified by some hooks
2017-02-12 18:13:49 +01:00
if ( $reshook == 0 ) {
foreach ( $hookmanager -> resArray as $item => $value ) {
$elementList [ $item ] = $value ;
}
}
2024-07-22 21:49:47 +02:00
$error = 0 ;
2022-05-08 18:25:22 +02:00
2022-12-13 16:50:29 +01:00
$acceptlocallinktomedia = ( acceptLocalLinktoMedia () > 0 ? 1 : 0 );
2022-05-08 18:25:22 +02:00
2022-12-13 16:50:29 +01:00
// Security
2022-05-08 18:25:22 +02:00
if ( ! empty ( $user -> socid )) {
accessforbidden ();
}
2022-02-01 11:57:33 +01:00
$permissiontoadd = 1 ;
2024-07-23 02:12:46 +02:00
$permissiontoedit = ( $user -> admin ? 1 : 0 );
$permissiontodelete = ( $user -> admin ? 1 : 0 );
if ( $rowid > 0 ) {
$tmpmailtemplate = new ModelMail ( $db );
$tmpmailtemplate -> fetch ( $rowid );
if ( $tmpmailtemplate -> fk_user == $user -> id ) {
$permissiontoedit = 1 ;
$permissiontodelete = 1 ;
}
}
2017-02-12 18:13:49 +01:00
2022-02-01 11:57:33 +01:00
2017-02-12 18:13:49 +01:00
/*
* Actions
*/
2020-11-01 13:48:32 +01:00
if ( GETPOST ( 'cancel' , 'alpha' )) {
$action = 'list' ;
$massaction = '' ;
}
2021-02-26 22:04:03 +01:00
if ( ! GETPOST ( 'confirmmassaction' , 'alpha' ) && $massaction != 'presend' && $massaction != 'confirm_presend' ) {
$massaction = '' ;
}
2017-06-20 12:54:26 +02:00
2019-12-16 13:06:25 +01:00
$parameters = array ();
$reshook = $hookmanager -> executeHooks ( 'doActions' , $parameters , $object , $action ); // Note that $action and $object may have been modified by some hooks
2020-11-01 13:48:32 +01:00
if ( $reshook < 0 ) {
setEventMessages ( $hookmanager -> error , $hookmanager -> errors , 'errors' );
}
2017-02-12 18:13:49 +01:00
2020-11-01 13:48:32 +01:00
if ( empty ( $reshook )) {
2022-05-08 18:25:22 +02:00
// Selection of new fields
include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php' ;
2020-09-07 10:18:17 +02:00
// Purge search criteria
2020-11-01 13:48:32 +01:00
if ( GETPOST ( 'button_removefilter_x' , 'alpha' ) || GETPOST ( 'button_removefilter.x' , 'alpha' ) || GETPOST ( 'button_removefilter' , 'alpha' )) {
// All tests are required to be compatible with all browsers
2020-09-07 10:18:17 +02:00
$search_label = '' ;
$search_type_template = '' ;
$search_lang = '' ;
$search_fk_user = '' ;
$search_topic = '' ;
2023-01-04 12:40:21 +01:00
$search_module = '' ;
2022-05-08 18:25:22 +02:00
$toselect = array ();
2020-09-07 10:18:17 +02:00
$search_array_options = array ();
}
2020-02-16 18:06:25 +01:00
2022-12-13 16:50:29 +01:00
// Actions add or modify an email template
2024-07-23 02:12:46 +02:00
if (( GETPOST ( 'actionadd' , 'alpha' ) && $permissiontoadd ) || ( GETPOST ( 'actionmodify' , 'alpha' ) && $permissiontoedit )) {
$listfield = explode ( ',' , str_replace ( ' ' , '' , $tabfield [ 25 ]));
$listfieldinsert = explode ( ',' , $tabfieldinsert [ 25 ]);
$listfieldmodify = explode ( ',' , $tabfieldinsert [ 25 ]);
$listfieldvalue = explode ( ',' , $tabfieldvalue [ 25 ]);
2020-09-07 10:18:17 +02:00
// Check that all fields are filled
$ok = 1 ;
2020-11-01 13:48:32 +01:00
foreach ( $listfield as $f => $value ) {
2020-09-07 10:18:17 +02:00
// Not mandatory fields
2023-04-13 20:34:54 +02:00
if ( in_array ( $value , [ 'joinfiles' , 'defaultfortype' , 'content' , 'content_lines' , 'module' ])) {
2021-02-26 22:04:03 +01:00
continue ;
}
2020-09-07 10:18:17 +02:00
2020-11-26 22:59:05 +01:00
// Rename some POST variables into a generic name
2021-02-26 22:04:03 +01:00
if ( GETPOST ( 'actionmodify' , 'alpha' ) && $value == 'topic' ) {
2022-02-22 23:44:56 +01:00
$_POST [ 'topic' ] = GETPOST ( 'topic-' . $rowid );
2021-02-26 22:04:03 +01:00
}
2020-09-07 10:18:17 +02:00
2021-02-26 22:04:03 +01:00
if (( ! GETPOSTISSET ( $value ) || GETPOST ( $value ) == '' || GETPOST ( $value ) == '-1' ) && $value != 'lang' && $value != 'fk_user' && $value != 'position' ) {
2020-09-07 10:18:17 +02:00
$ok = 0 ;
$fieldnamekey = $listfield [ $f ];
// We take translate key of field
2021-02-26 22:04:03 +01:00
if ( $fieldnamekey == 'libelle' || ( $fieldnamekey == 'label' )) {
$fieldnamekey = 'Code' ;
}
if ( $fieldnamekey == 'code' ) {
$fieldnamekey = 'Code' ;
}
if ( $fieldnamekey == 'note' ) {
$fieldnamekey = 'Note' ;
}
if ( $fieldnamekey == 'type_template' ) {
$fieldnamekey = 'TypeOfTemplate' ;
}
if ( $fieldnamekey == 'fk_user' ) {
$fieldnamekey = 'Owner' ;
}
if ( $fieldnamekey == 'private' ) {
$fieldnamekey = 'Private' ;
}
if ( $fieldnamekey == 'position' ) {
$fieldnamekey = 'Position' ;
}
if ( $fieldnamekey == 'topic' ) {
$fieldnamekey = 'Topic' ;
}
2020-09-07 10:18:17 +02:00
setEventMessages ( $langs -> transnoentities ( " ErrorFieldRequired " , $langs -> transnoentities ( $fieldnamekey )), null , 'errors' );
2022-10-04 23:53:17 +02:00
$action = 'create' ;
2020-09-07 10:18:17 +02:00
}
}
2021-05-06 16:57:49 +02:00
// If previous test is ok action is add, we add the line
2021-02-26 22:04:03 +01:00
if ( $ok && GETPOST ( 'actionadd' )) {
2020-09-07 10:18:17 +02:00
// Add new entry
2024-07-23 02:12:46 +02:00
$sql = " INSERT INTO " . $tabname [ 25 ] . " ( " ;
2020-09-07 10:18:17 +02:00
// List of fields
2024-07-23 02:12:46 +02:00
$sql .= $tabfieldinsert [ 25 ];
2021-05-06 20:32:41 +02:00
$sql .= " , active, enabled) " ;
2020-09-07 10:18:17 +02:00
$sql .= " VALUES( " ;
// List of values
$i = 0 ;
2021-02-26 22:04:03 +01:00
foreach ( $listfieldinsert as $f => $value ) {
2022-11-15 15:18:17 +01:00
$keycode = isset ( $listfieldvalue [ $i ]) ? $listfieldvalue [ $i ] : " " ;
2021-02-26 22:04:03 +01:00
if ( $value == 'lang' ) {
$keycode = 'langcode' ;
}
if ( empty ( $keycode )) {
$keycode = $value ;
}
2020-09-07 10:18:17 +02:00
2020-11-26 22:59:05 +01:00
// Clean input variables
2021-02-26 22:04:03 +01:00
if ( $value == 'entity' ) {
$_POST [ $keycode ] = $conf -> entity ;
}
if ( $value == 'fk_user' && ! ( $_POST [ $keycode ] > 0 )) {
$_POST [ $keycode ] = '' ;
}
if ( $value == 'private' && ! is_numeric ( $_POST [ $keycode ])) {
$_POST [ $keycode ] = '0' ;
}
if ( $value == 'position' && ! is_numeric ( $_POST [ $keycode ])) {
$_POST [ $keycode ] = '1' ;
}
2023-04-13 20:34:54 +02:00
if ( $value == 'defaultfortype' && ! is_numeric ( $_POST [ $keycode ])) {
$_POST [ $keycode ] = '0' ;
}
2020-09-07 10:18:17 +02:00
//var_dump($keycode.' '.$value);
2021-02-26 22:04:03 +01:00
if ( $i ) {
$sql .= " , " ;
}
if ( GETPOST ( $keycode ) == '' && $keycode != 'langcode' ) {
$sql .= " null " ; // langcode must be '' if not defined so the unique key that include lang will work
} elseif ( GETPOST ( $keycode ) == '0' && $keycode == 'langcode' ) {
$sql .= " '' " ; // langcode must be '' if not defined so the unique key that include lang will work
} elseif ( $keycode == 'fk_user' ) {
2020-10-31 14:32:18 +01:00
if ( ! $user -> admin ) { // A non admin user can only edit its own template
2020-10-22 15:03:12 +02:00
$sql .= " " . (( int ) $user -> id );
} else {
Fix: GETPOST(...,'int') to GETPOSTINT(...) (#28448)
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: Update spelling exceptions
* Qual: Ignore Phan Notice
2024-02-27 14:05:53 +01:00
$sql .= " " . ( GETPOSTINT ( $keycode ));
2020-10-22 15:03:12 +02:00
}
} elseif ( $keycode == 'content' ) {
2020-09-07 10:18:17 +02:00
$sql .= " ' " . $db -> escape ( GETPOST ( $keycode , 'restricthtml' )) . " ' " ;
2023-04-13 20:34:54 +02:00
} elseif ( in_array ( $keycode , array ( 'joinfiles' , 'defaultfortype' , 'private' , 'position' , 'entity' ))) {
Fix: GETPOST(...,'int') to GETPOSTINT(...) (#28448)
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: Update spelling exceptions
* Qual: Ignore Phan Notice
2024-02-27 14:05:53 +01:00
$sql .= GETPOSTINT ( $keycode );
2020-09-07 10:18:17 +02:00
} else {
2022-06-13 10:44:20 +02:00
$sql .= " ' " . $db -> escape ( GETPOST ( $keycode , 'alphanohtml' )) . " ' " ;
2020-09-07 10:18:17 +02:00
}
$i ++ ;
}
2021-05-06 16:57:49 +02:00
$sql .= " , 1, 1) " ;
2020-09-07 10:18:17 +02:00
dol_syslog ( " actionadd " , LOG_DEBUG );
$result = $db -> query ( $sql );
2021-02-26 22:04:03 +01:00
if ( $result ) { // Add is ok
2020-09-07 10:18:17 +02:00
setEventMessages ( $langs -> transnoentities ( " RecordSaved " ), null , 'mesgs' );
2024-07-23 02:12:46 +02:00
$_POST = array ( 'id' => 25 ); // Clean $_POST array, we keep only id
2020-09-07 10:18:17 +02:00
} else {
if ( $db -> errno () == 'DB_ERROR_RECORD_ALREADY_EXISTS' ) {
setEventMessages ( $langs -> transnoentities ( " ErrorRecordAlreadyExists " ), null , 'errors' );
} else {
dol_print_error ( $db );
}
2022-10-04 23:53:17 +02:00
$action = 'create' ;
2020-09-07 10:18:17 +02:00
}
}
2020-10-17 12:59:22 +02:00
// We modify the line
2021-02-26 22:04:03 +01:00
if ( $ok && GETPOST ( 'actionmodify' )) {
2020-09-07 10:18:17 +02:00
$rowidcol = " rowid " ;
2024-07-22 21:49:47 +02:00
if ( GETPOSTINT ( 'fk_user' ) <= 0 && GETPOST ( 'private' )) {
setEventMessages ( $langs -> trans ( " AnOwnerMustBeSetIfEmailTemplateIsPrivate " ), null , 'errors' );
$error ++ ;
$action = 'edit' ;
}
2022-06-12 12:41:15 +02:00
2024-07-22 21:49:47 +02:00
if ( ! $error ) {
// Modify entry
2024-07-23 02:12:46 +02:00
$sql = " UPDATE " . $tabname [ 25 ] . " SET " ;
2024-07-22 21:49:47 +02:00
// Modify value of fields
$i = 0 ;
foreach ( $listfieldmodify as $field ) {
if ( $field == 'entity' ) {
// entity not present on listfieldmodify array
$keycode = $field ;
$_POST [ $keycode ] = $conf -> entity ;
} else {
$keycode = $listfieldvalue [ $i ];
}
2020-09-07 10:18:17 +02:00
2024-07-22 21:49:47 +02:00
if ( $field == 'lang' ) {
$keycode = 'langcode' ;
}
if ( empty ( $keycode )) {
$keycode = $field ;
}
2021-02-26 22:04:03 +01:00
2024-07-22 21:49:47 +02:00
// Rename some POST variables into a generic name
if ( $field == 'fk_user' && ! ( GETPOSTINT ( 'fk_user' ) > 0 )) {
$_POST [ 'fk_user' ] = '' ;
}
if ( $field == 'topic' ) {
$_POST [ 'topic' ] = GETPOST ( 'topic-' . $rowid );
}
if ( $field == 'joinfiles' ) {
$_POST [ 'joinfiles' ] = GETPOST ( 'joinfiles-' . $rowid );
}
if ( $field == 'content' ) {
$_POST [ 'content' ] = GETPOST ( 'content-' . $rowid , 'restricthtml' );
}
if ( $field == 'content_lines' ) {
$_POST [ 'content_lines' ] = GETPOST ( 'content_lines-' . $rowid , 'restricthtml' );
}
2024-11-19 12:40:23 +01:00
if ( $field == 'email_from' ) {
$_POST [ 'email_from' ] = GETPOST ( 'email_from-' . $rowid , 'restricthtml' );
2024-07-22 21:49:47 +02:00
}
2020-09-07 10:18:17 +02:00
2024-07-22 21:49:47 +02:00
if ( $i ) {
$sql .= " , " ;
}
$sql .= $field . " = " ;
if ( GETPOST ( $keycode ) == '' || ( ! in_array ( $keycode , array ( 'langcode' , 'position' , 'private' , 'defaultfortype' )) && ! GETPOST ( $keycode ))) {
$sql .= " null " ; // langcode,... must be '' if not defined so the unique key that include lang will work
} elseif ( GETPOST ( $keycode ) == '0' && $keycode == 'langcode' ) {
$sql .= " '' " ; // langcode must be '' if not defined so the unique key that include lang will work
} elseif ( $keycode == 'fk_user' ) {
if ( ! $user -> admin ) { // A non admin user can only edit its own template
$sql .= " " . (( int ) $user -> id );
} else {
$sql .= " " . ( GETPOSTINT ( $keycode ));
}
} elseif ( $keycode == 'content' ) {
$sql .= " ' " . $db -> escape ( GETPOST ( $keycode , 'restricthtml' )) . " ' " ;
} elseif ( in_array ( $keycode , array ( 'joinfiles' , 'defaultfortype' , 'private' , 'position' ))) {
$sql .= GETPOSTINT ( $keycode );
2020-10-22 15:03:12 +02:00
} else {
2024-07-22 21:49:47 +02:00
$sql .= " ' " . $db -> escape ( GETPOST ( $keycode , 'alphanohtml' )) . " ' " ;
2020-10-22 15:03:12 +02:00
}
2024-07-22 21:49:47 +02:00
$i ++ ;
2020-09-07 10:18:17 +02:00
}
2020-09-17 21:09:16 +02:00
2024-07-22 21:49:47 +02:00
$sql .= " WHERE " . $db -> escape ( $rowidcol ) . " = " . (( int ) $rowid );
if ( ! $user -> admin ) { // A non admin user can only edit its own template
$sql .= " AND fk_user = " . (( int ) $user -> id );
}
//print $sql;exit;
dol_syslog ( " actionmodify " , LOG_DEBUG );
//print $sql;
$resql = $db -> query ( $sql );
if ( ! $resql ) {
$error ++ ;
setEventMessages ( $db -> error (), null , 'errors' );
$action = 'edit' ;
}
2020-10-22 15:03:12 +02:00
}
2024-07-22 21:49:47 +02:00
if ( ! $error ) {
2020-09-07 10:18:17 +02:00
setEventMessages ( $langs -> transnoentities ( " RecordSaved " ), null , 'mesgs' );
}
}
}
2022-12-13 16:50:29 +01:00
if ( $action == 'confirm_delete' && $confirm == 'yes' && $permissiontodelete ) { // delete
2020-09-07 10:18:17 +02:00
$rowidcol = " rowid " ;
2024-07-23 02:12:46 +02:00
$sql = " DELETE from " . $tabname [ 25 ] . " WHERE " . $rowidcol . " = " . (( int ) $rowid );
2020-10-31 14:32:18 +01:00
if ( ! $user -> admin ) { // A non admin user can only edit its own template
2022-05-08 18:25:22 +02:00
$sql .= " AND fk_user = " . (( int ) $user -> id );
2020-10-22 15:03:12 +02:00
}
2020-09-07 10:18:17 +02:00
dol_syslog ( " delete " , LOG_DEBUG );
$result = $db -> query ( $sql );
2021-02-26 22:04:03 +01:00
if ( ! $result ) {
if ( $db -> errno () == 'DB_ERROR_CHILD_EXISTS' ) {
2020-09-07 10:18:17 +02:00
setEventMessages ( $langs -> transnoentities ( " ErrorRecordIsUsedByChild " ), null , 'errors' );
} else {
dol_print_error ( $db );
}
}
}
// activate
2024-07-23 02:12:46 +02:00
if ( $action == $acts [ 0 ] && $permissiontoedit ) {
2020-09-07 10:18:17 +02:00
$rowidcol = " rowid " ;
2024-07-23 02:12:46 +02:00
$sql = " UPDATE " . $tabname [ 25 ] . " SET active = 1 WHERE rowid = " . (( int ) $rowid );
2020-09-07 10:18:17 +02:00
$result = $db -> query ( $sql );
2021-02-26 22:04:03 +01:00
if ( ! $result ) {
2020-09-07 10:18:17 +02:00
dol_print_error ( $db );
}
}
// disable
2024-07-23 02:12:46 +02:00
if ( $action == $acts [ 1 ] && $permissiontoedit ) {
2020-09-07 10:18:17 +02:00
$rowidcol = " rowid " ;
2024-07-23 02:12:46 +02:00
$sql = " UPDATE " . $tabname [ 25 ] . " SET active = 0 WHERE rowid = " . (( int ) $rowid );
2020-02-16 18:06:25 +01:00
2020-09-07 10:18:17 +02:00
$result = $db -> query ( $sql );
2021-02-26 22:04:03 +01:00
if ( ! $result ) {
2020-09-07 10:18:17 +02:00
dol_print_error ( $db );
}
}
2017-02-12 18:13:49 +01:00
}
/*
* View
*/
$form = new Form ( $db );
2024-07-23 02:12:46 +02:00
$formadmin = new FormAdmin ( $db );
2022-05-08 18:25:22 +02:00
$now = dol_now ();
//$help_url = "EN:Module_MyObject|FR:Module_MyObject_FR|ES:Módulo_MyObject";
2020-08-25 19:40:17 +02:00
$help_url = '' ;
2022-02-01 11:57:33 +01:00
if ( ! empty ( $user -> admin ) && ( empty ( $_SESSION [ 'leftmenu' ]) || $_SESSION [ 'leftmenu' ] != 'email_templates' )) {
$title = $langs -> trans ( " EMailsSetup " );
} else {
2022-05-08 15:18:34 +02:00
$title = $langs -> trans ( " EMailTemplates " );
2022-02-01 11:57:33 +01:00
}
2022-05-08 18:25:22 +02:00
$morejs = array ();
$morecss = array ();
2017-06-20 12:54:26 +02:00
2023-08-02 12:05:44 +02:00
$sql = " SELECT rowid as rowid, module, label, type_template, lang, fk_user, private, position, topic, email_from,joinfiles, defaultfortype, content_lines, content, enabled, active " ;
2019-12-16 13:06:25 +01:00
$sql .= " FROM " . MAIN_DB_PREFIX . " c_email_templates " ;
$sql .= " WHERE entity IN ( " . getEntity ( 'email_template' ) . " ) " ;
2021-02-26 22:04:03 +01:00
if ( ! $user -> admin ) {
2021-08-23 17:41:11 +02:00
$sql .= " AND (private = 0 OR (private = 1 AND fk_user = " . (( int ) $user -> id ) . " )) " ; // Show only public and private to me
$sql .= " AND (active = 1 OR fk_user = " . (( int ) $user -> id ) . " ) " ; // Show only active or owned by me
2017-02-12 18:13:49 +01:00
}
2022-09-24 15:04:40 +02:00
if ( ! getDolGlobalInt ( 'MAIN_MULTILANGS' )) {
2020-09-19 23:11:38 +02:00
$sql .= " AND (lang = ' " . $db -> escape ( $langs -> defaultlang ) . " ' OR lang IS NULL OR lang = '') " ;
2017-02-12 18:13:49 +01:00
}
2021-02-26 22:04:03 +01:00
if ( $search_label ) {
$sql .= natural_search ( 'label' , $search_label );
}
if ( $search_type_template != '' && $search_type_template != '-1' ) {
$sql .= natural_search ( 'type_template' , $search_type_template );
}
if ( $search_lang ) {
$sql .= natural_search ( 'lang' , $search_lang );
}
if ( $search_fk_user != '' && $search_fk_user != '-1' ) {
$sql .= natural_search ( 'fk_user' , $search_fk_user , 2 );
}
2023-01-04 12:40:21 +01:00
if ( $search_module ) {
$sql .= natural_search ( 'module' , $search_module );
}
2021-02-26 22:04:03 +01:00
if ( $search_topic ) {
$sql .= natural_search ( 'topic' , $search_topic );
}
2018-04-25 16:01:06 +02:00
// If sort order is "country", we use country_code instead
2021-02-26 22:04:03 +01:00
if ( $sortfield == 'country' ) {
$sortfield = 'country_code' ;
}
2019-12-16 13:06:25 +01:00
$sql .= $db -> order ( $sortfield , $sortorder );
$sql .= $db -> plimit ( $listlimit + 1 , $offset );
2017-02-12 18:13:49 +01:00
//print $sql;
2022-05-08 18:25:22 +02:00
// Output page
// --------------------------------------------------------------------
2024-06-08 14:53:14 +02:00
llxHeader ( '' , $title , $help_url , '' , 0 , 0 , $morejs , $morecss , '' , 'mod-admin page-mails_templates' );
2022-05-08 18:25:22 +02:00
$arrayofselected = is_array ( $toselect ) ? $toselect : array ();
$param = '' ;
if ( ! empty ( $mode )) {
$param .= '&mode=' . urlencode ( $mode );
}
if ( ! empty ( $contextpage ) && $contextpage != $_SERVER [ " PHP_SELF " ]) {
$param .= '&contextpage=' . urlencode ( $contextpage );
}
if ( $limit > 0 && $limit != $conf -> liste_limit ) {
2023-04-08 01:43:21 +02:00
$param .= '&limit=' . (( int ) $limit );
2022-05-08 18:25:22 +02:00
}
2022-05-23 00:12:16 +02:00
if ( ! empty ( $search ) && is_array ( $search )) {
foreach ( $search as $key => $val ) {
if ( is_array ( $search [ $key ]) && count ( $search [ $key ])) {
foreach ( $search [ $key ] as $skey ) {
if ( $skey != '' ) {
$param .= '&search_' . $key . '[]=' . urlencode ( $skey );
}
2022-05-08 18:25:22 +02:00
}
2022-05-23 00:12:16 +02:00
} elseif ( $search [ $key ] != '' ) {
$param .= '&search_' . $key . '=' . urlencode ( $search [ $key ]);
2022-05-08 18:25:22 +02:00
}
}
}
if ( $optioncss != '' ) {
$param .= '&optioncss=' . urlencode ( $optioncss );
}
// Add $param from extra fields
include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_param.tpl.php' ;
// Add $param from hooks
$parameters = array ();
$reshook = $hookmanager -> executeHooks ( 'printFieldListSearchParam' , $parameters , $object ); // Note that $action and $object may have been modified by hook
$param .= $hookmanager -> resPrint ;
$linkback = '' ;
$titlepicto = 'title_setup' ;
2022-10-04 23:53:17 +02:00
$url = DOL_URL_ROOT . '/admin/mails_templates.php?action=create' ;
2023-10-20 03:20:44 +02:00
$newcardbutton = '' ;
$newcardbutton .= dolGetButtonTitle ( $langs -> trans ( 'NewEMailTemplate' ), '' , 'fa fa-plus-circle' , $url , '' , $permissiontoadd );
2022-05-08 18:25:22 +02:00
if ( ! empty ( $user -> admin ) && ( empty ( $_SESSION [ 'leftmenu' ]) || $_SESSION [ 'leftmenu' ] != 'email_templates' )) {
print load_fiche_titre ( $title , '' , $titlepicto );
} else {
print load_fiche_titre ( $title , $newcardbutton , $titlepicto );
}
if ( ! empty ( $user -> admin ) && ( empty ( $_SESSION [ 'leftmenu' ]) || $_SESSION [ 'leftmenu' ] != 'email_templates' )) {
$head = email_admin_prepare_head ();
print dol_get_fiche_head ( $head , 'templates' , '' , - 1 );
if ( ! empty ( $user -> admin ) && ( empty ( $_SESSION [ 'leftmenu' ]) || $_SESSION [ 'leftmenu' ] != 'email_templates' )) {
print load_fiche_titre ( '' , $newcardbutton , '' );
}
}
2023-02-10 14:16:30 +01:00
// Confirm deletion of record
2022-05-08 18:25:22 +02:00
if ( $action == 'delete' ) {
2024-07-23 02:12:46 +02:00
print $form -> formconfirm ( $_SERVER [ " PHP_SELF " ] . '?' . ( $page ? 'page=' . $page . '&' : '' ) . 'sortfield=' . $sortfield . '&sortorder=' . $sortorder . '&rowid=' . (( int ) $rowid ), $langs -> trans ( 'DeleteLine' ), $langs -> trans ( 'ConfirmDeleteLine' ), 'confirm_delete' , '' , 0 , 1 );
2022-05-08 18:25:22 +02:00
}
2024-07-23 02:12:46 +02:00
$fieldlist = explode ( ',' , $tabfield [ 25 ]);
2017-02-12 18:13:49 +01:00
2022-10-04 23:53:17 +02:00
if ( $action == 'create' ) {
2023-02-10 14:16:30 +01:00
// If data was already input, we define them in obj to populate input fields.
$obj = new stdClass ();
$obj -> label = GETPOST ( 'label' );
$obj -> lang = GETPOST ( 'lang' );
$obj -> type_template = GETPOST ( 'type_template' );
Fix: GETPOST(...,'int') to GETPOSTINT(...) (#28448)
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: GETPOST(...,'int') to GETPOSTINT(...)
# Fix: GETPOST(...,'int') to GETPOSTINT(...)
Converted using Phan plugin
* Fix: Update spelling exceptions
* Qual: Ignore Phan Notice
2024-02-27 14:05:53 +01:00
$obj -> fk_user = GETPOSTINT ( 'fk_user' );
$obj -> private = GETPOSTINT ( 'private' );
2023-02-10 14:16:30 +01:00
$obj -> position = GETPOST ( 'position' );
$obj -> topic = GETPOST ( 'topic' );
$obj -> joinfiles = GETPOST ( 'joinfiles' );
2023-04-13 20:34:54 +02:00
$obj -> defaultfortype = GETPOST ( 'defaultfortype' ) ? 1 : 0 ;
2023-02-10 14:16:30 +01:00
$obj -> content = GETPOST ( 'content' , 'restricthtml' );
2020-10-05 15:24:17 +02:00
// Form to add a new line
2024-07-23 02:12:46 +02:00
print '<form action="' . $_SERVER [ 'PHP_SELF' ] . '" method="POST">' ;
2020-10-05 15:24:17 +02:00
print '<input type="hidden" name="token" value="' . newToken () . '">' ;
2022-10-04 23:53:17 +02:00
print '<input type="hidden" name="action" value="add">' ;
2020-10-05 15:24:17 +02:00
print '<input type="hidden" name="from" value="' . dol_escape_htmltag ( GETPOST ( 'from' , 'alpha' )) . '">' ;
2017-02-12 18:13:49 +01:00
2020-10-05 15:24:17 +02:00
print '<div class="div-table-responsive-no-min">' ;
print '<table class="noborder centpercent">' ;
2017-02-12 18:13:49 +01:00
2020-10-05 15:24:17 +02:00
// Line to enter new values (title)
print '<tr class="liste_titre">' ;
2021-02-26 22:04:03 +01:00
foreach ( $fieldlist as $field => $value ) {
2020-10-05 15:24:17 +02:00
// Determine le nom du champ par rapport aux noms possibles
// dans les dictionnaires de donnees
2024-01-11 09:59:52 +01:00
$valuetoshow = ucfirst ( $fieldlist [ $field ]); // Par default
2020-10-05 15:24:17 +02:00
$valuetoshow = $langs -> trans ( $valuetoshow ); // try to translate
2023-04-13 20:34:54 +02:00
$css = " left " ;
2023-01-04 12:40:21 +01:00
if ( $fieldlist [ $field ] == 'module' ) {
2023-04-13 20:34:54 +02:00
$valuetoshow = ' ' ;
2023-01-04 12:40:21 +01:00
}
2021-02-26 22:04:03 +01:00
if ( $fieldlist [ $field ] == 'fk_user' ) {
$valuetoshow = $langs -> trans ( " Owner " );
}
if ( $fieldlist [ $field ] == 'lang' ) {
2022-09-24 15:04:40 +02:00
$valuetoshow = ( ! getDolGlobalInt ( 'MAIN_MULTILANGS' ) ? ' ' : $langs -> trans ( " Language " ));
2021-02-26 22:04:03 +01:00
}
if ( $fieldlist [ $field ] == 'type' ) {
$valuetoshow = $langs -> trans ( " Type " );
}
2023-04-13 20:34:54 +02:00
if ( $fieldlist [ $field ] == 'position' ) {
$css = 'center' ;
}
2021-02-26 22:04:03 +01:00
if ( $fieldlist [ $field ] == 'code' ) {
$valuetoshow = $langs -> trans ( " Code " );
}
2023-04-13 20:34:54 +02:00
if ( $fieldlist [ $field ] == 'label' ) {
2021-02-26 22:04:03 +01:00
$valuetoshow = $langs -> trans ( " Code " );
}
if ( $fieldlist [ $field ] == 'type_template' ) {
2023-12-04 11:41:14 +01:00
$valuetoshow = $langs -> trans ( " TypeOfTemplate " );
$css = " center " ;
2021-02-26 22:04:03 +01:00
}
2023-04-13 20:34:54 +02:00
if ( in_array ( $fieldlist [ $field ], array ( 'private' , 'private' , 'defaultfortype' ))) {
$css = 'center' ;
2021-02-26 22:04:03 +01:00
}
if ( $fieldlist [ $field ] == 'topic' ) {
$valuetoshow = '' ;
}
if ( $fieldlist [ $field ] == 'joinfiles' ) {
$valuetoshow = '' ;
}
if ( $fieldlist [ $field ] == 'content' ) {
$valuetoshow = '' ;
}
if ( $fieldlist [ $field ] == 'content_lines' ) {
$valuetoshow = '' ;
}
if ( $valuetoshow != '' ) {
2023-04-13 20:34:54 +02:00
print '<th class="' . $css . '">' ;
2024-07-23 02:12:46 +02:00
if ( ! empty ( $tabhelp [ 25 ][ $value ]) && preg_match ( '/^http(s*):/i' , $tabhelp [ 25 ][ $value ])) {
print '<a href="' . $tabhelp [ 25 ][ $value ] . '" target="_blank" rel="noopener noreferrer">' . $valuetoshow . ' ' . img_help ( 1 , $valuetoshow ) . '</a>' ;
} elseif ( ! empty ( $tabhelp [ 25 ][ $value ])) {
2021-02-26 22:04:03 +01:00
if ( in_array ( $value , array ( 'topic' ))) {
2024-07-23 02:12:46 +02:00
print $form -> textwithpicto ( $valuetoshow , $tabhelp [ 25 ][ $value ], 1 , 'help' , '' , 0 , 2 , $value ); // Tooltip on click
2021-02-26 22:04:03 +01:00
} else {
2024-07-23 02:12:46 +02:00
print $form -> textwithpicto ( $valuetoshow , $tabhelp [ 25 ][ $value ], 1 , 'help' , '' , 0 , 2 ); // Tooltip on hover
2021-02-26 22:04:03 +01:00
}
} else {
print $valuetoshow ;
}
2022-05-08 18:25:22 +02:00
print '</th>' ;
2020-10-05 15:24:17 +02:00
}
2018-12-12 11:50:10 +01:00
}
2022-05-08 18:25:22 +02:00
print '<th>' ;
print '</th>' ;
2020-10-05 15:24:17 +02:00
print '</tr>' ;
$tmpaction = 'create' ;
$parameters = array (
2021-09-28 11:53:00 +02:00
'fieldlist' => $fieldlist ,
2024-07-23 02:12:46 +02:00
'tabname' => $tabname [ 25 ]
2020-10-05 15:24:17 +02:00
);
$reshook = $hookmanager -> executeHooks ( 'createEmailTemplateFieldlist' , $parameters , $obj , $tmpaction ); // Note that $action and $object may have been modified by some hooks
$error = $hookmanager -> error ;
$errors = $hookmanager -> errors ;
2017-06-01 01:53:55 +02:00
2020-10-05 15:24:17 +02:00
// Line to enter new values (input fields)
print '<tr class="oddeven">' ;
2017-06-01 01:53:55 +02:00
2021-02-26 22:04:03 +01:00
if ( empty ( $reshook )) {
2020-10-05 15:24:17 +02:00
if ( $action == 'edit' ) {
2024-07-23 02:12:46 +02:00
fieldList ( $fieldlist , $obj , $tabname [ 25 ], 'hide' );
2020-10-05 15:24:17 +02:00
} else {
2024-07-23 02:12:46 +02:00
fieldList ( $fieldlist , $obj , $tabname [ 25 ], 'add' );
2020-10-05 15:24:17 +02:00
}
2017-09-08 12:21:47 +02:00
}
2023-04-13 20:34:54 +02:00
// Action column
2020-10-05 15:24:17 +02:00
print '<td class="right">' ;
print '</td>' ;
print " </tr> " ;
2020-08-07 14:38:03 +02:00
2024-05-16 15:02:28 +02:00
print '<tr class="oddeven nodrag nodrop nohover"><td colspan="9">' ;
2023-04-25 16:13:15 +02:00
2020-10-05 15:24:17 +02:00
// Show fields for topic, join files and body
2023-08-02 12:05:44 +02:00
$fieldsforcontent = array ( 'topic' , 'email_from' , 'joinfiles' , 'content' );
2023-10-24 17:00:13 +02:00
if ( getDolGlobalString ( 'MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES' )) {
2023-08-02 12:05:44 +02:00
$fieldsforcontent = array ( 'topic' , 'email_from' , 'joinfiles' , 'content' , 'content_lines' );
2021-02-26 22:04:03 +01:00
}
foreach ( $fieldsforcontent as $tmpfieldlist ) {
2023-01-04 12:40:21 +01:00
// Topic of email
2021-02-26 22:04:03 +01:00
if ( $tmpfieldlist == 'topic' ) {
2024-07-23 02:12:46 +02:00
print '<strong>' . $form -> textwithpicto ( $langs -> trans ( " Topic " ), $tabhelp [ 25 ][ $tmpfieldlist ], 1 , 'help' , '' , 0 , 2 , $tmpfieldlist ) . '</strong> ' ;
2020-10-05 15:24:17 +02:00
}
2023-08-02 12:05:44 +02:00
if ( $tmpfieldlist == 'email_from' ) {
2024-07-23 02:12:46 +02:00
print $form -> textwithpicto ( $langs -> trans ( " MailFrom " ), $tabhelp [ 25 ][ $tmpfieldlist ], 1 , 'help' , '' , 0 , 2 , $tmpfieldlist );
2023-08-02 12:05:44 +02:00
}
2021-02-26 22:04:03 +01:00
if ( $tmpfieldlist == 'joinfiles' ) {
2024-07-23 02:12:46 +02:00
print '<strong>' . $form -> textwithpicto ( $langs -> trans ( " FilesAttachedToEmail " ), $tabhelp [ 25 ][ $tmpfieldlist ], 1 , 'help' , '' , 0 , 2 , $tmpfieldlist ) . '</strong> ' ;
2020-10-05 15:24:17 +02:00
}
2021-02-26 22:04:03 +01:00
if ( $tmpfieldlist == 'content' ) {
2024-07-23 02:12:46 +02:00
print $form -> textwithpicto ( $langs -> trans ( " Content " ), $tabhelp [ 25 ][ $tmpfieldlist ], 1 , 'help' , '' , 0 , 2 , $tmpfieldlist ) . '<br>' ;
2021-02-26 22:04:03 +01:00
}
if ( $tmpfieldlist == 'content_lines' ) {
2024-07-23 02:12:46 +02:00
print $form -> textwithpicto ( $langs -> trans ( " ContentForLines " ), $tabhelp [ 25 ][ $tmpfieldlist ], 1 , 'help' , '' , 0 , 2 , $tmpfieldlist ) . '<br>' ;
2021-02-26 22:04:03 +01:00
}
2020-08-07 14:38:03 +02:00
2020-10-05 15:24:17 +02:00
// Input field
if ( $tmpfieldlist == 'topic' ) {
2022-10-04 23:53:17 +02:00
print '<input type="text" class="flat minwidth500" name="' . $tmpfieldlist . '" value="' . ( ! empty ( $obj -> $tmpfieldlist ) ? $obj -> $tmpfieldlist : '' ) . '">' ;
2023-08-02 12:05:44 +02:00
} elseif ( $tmpfieldlist == 'email_from' ) {
print '<input type="text" class="flat minwidth500" name="' . $tmpfieldlist . '" value="' . ( ! empty ( $obj -> $tmpfieldlist ) ? $obj -> $tmpfieldlist : '' ) . '">' ;
2020-10-05 15:24:17 +02:00
} elseif ( $tmpfieldlist == 'joinfiles' ) {
2022-10-04 23:53:17 +02:00
print $form -> selectyesno ( $tmpfieldlist , ( isset ( $obj -> $tmpfieldlist ) ? $obj -> $tmpfieldlist : '0' ), 1 , false , 0 , 1 );
2020-10-05 15:24:17 +02:00
} else {
2020-10-17 12:59:22 +02:00
$okforextended = true ;
2023-10-24 17:00:13 +02:00
if ( ! getDolGlobalString ( 'FCKEDITOR_ENABLE_MAIL' )) {
2021-02-26 22:04:03 +01:00
$okforextended = false ;
}
2023-04-25 16:13:15 +02:00
$doleditor = new DolEditor ( $tmpfieldlist , ( ! empty ( $obj -> $tmpfieldlist ) ? $obj -> $tmpfieldlist : '' ), '' , 400 , 'dolibarr_mailings' , 'In' , false , $acceptlocallinktomedia , $okforextended , ROWS_6 , '90%' );
2020-10-17 12:59:22 +02:00
print $doleditor -> Create ( 1 );
2017-09-08 12:21:47 +02:00
}
2023-04-25 16:13:15 +02:00
print '<br>' ;
2017-09-08 12:21:47 +02:00
}
2017-06-01 01:53:55 +02:00
2023-04-25 16:13:15 +02:00
print '</tr>' ;
2020-10-05 15:24:17 +02:00
print '</table>' ;
2022-05-08 18:25:22 +02:00
if ( $action != 'edit' ) {
print '<center>' ;
print '<input type="submit" class="button button-add" name="actionadd" value="' . $langs -> trans ( " Add " ) . '"> ' ;
print '<input type="submit" class="button button-cancel" name="actioncancel" value="' . $langs -> trans ( " Cancel " ) . '">' ;
print '</center>' ;
}
2020-10-05 15:24:17 +02:00
print '</div>' ;
print '</form>' ;
2024-05-16 15:02:28 +02:00
print '<br><br><br>' ;
2023-02-10 14:16:30 +01:00
}
2017-06-20 12:54:26 +02:00
2022-05-08 18:25:22 +02:00
// List of available record in database
dol_syslog ( " htdocs/admin/dict " , LOG_DEBUG );
$resql = $db -> query ( $sql );
if ( ! $resql ) {
dol_print_error ( $db );
exit ;
}
$num = $db -> num_rows ( $resql );
2024-07-23 02:12:46 +02:00
print '<form action="' . $_SERVER [ 'PHP_SELF' ] . '" method="POST">' ;
2019-12-18 23:12:31 +01:00
print '<input type="hidden" name="token" value="' . newToken () . '">' ;
2019-01-27 11:55:16 +01:00
print '<input type="hidden" name="from" value="' . dol_escape_htmltag ( GETPOST ( 'from' , 'alpha' )) . '">' ;
2017-06-20 12:54:26 +02:00
2017-09-08 10:09:22 +02:00
print '<div class="div-table-responsive-no-min">' ;
2019-11-05 21:24:41 +01:00
print '<table class="noborder centpercent">' ;
2017-02-12 18:13:49 +01:00
2022-05-08 18:25:22 +02:00
$i = 0 ;
2020-09-07 10:18:17 +02:00
2024-07-23 02:12:46 +02:00
$param = '' ;
2022-05-08 18:25:22 +02:00
if ( $search_label ) {
$param .= '&search_label=' . urlencode ( $search_label );
}
2024-05-13 19:11:50 +02:00
if ( ! empty ( $search_lang ) && $search_lang != '-1' ) {
2022-05-08 18:25:22 +02:00
$param .= '&search_lang=' . urlencode ( $search_lang );
}
if ( $search_type_template != '-1' ) {
$param .= '&search_type_template=' . urlencode ( $search_type_template );
}
if ( $search_fk_user > 0 ) {
$param .= '&search_fk_user=' . urlencode ( $search_fk_user );
}
2023-01-04 12:40:21 +01:00
if ( $search_module ) {
$param .= '&search_module=' . urlencode ( $search_module );
}
2022-05-08 18:25:22 +02:00
if ( $search_topic ) {
$param .= '&search_topic=' . urlencode ( $search_topic );
}
$paramwithsearch = $param ;
if ( $sortorder ) {
$paramwithsearch .= '&sortorder=' . urlencode ( $sortorder );
}
if ( $sortfield ) {
$paramwithsearch .= '&sortfield=' . urlencode ( $sortfield );
}
if ( GETPOST ( 'from' , 'alpha' )) {
$paramwithsearch .= '&from=' . urlencode ( GETPOST ( 'from' , 'alpha' ));
}
// There is several pages
if ( $num > $listlimit ) {
print '<tr class="none"><td class="right" colspan="' . ( 3 + count ( $fieldlist )) . '">' ;
2024-07-08 21:45:35 +02:00
print_fleche_navigation ( $page , $_SERVER [ " PHP_SELF " ], $paramwithsearch , ( $num > $listlimit ? 1 : 0 ), '<li class="pagination"><span>' . $langs -> trans ( " Page " ) . ' ' . ( $page + 1 ) . '</span></li>' );
2022-05-08 18:25:22 +02:00
print '</td></tr>' ;
}
// Title line with search boxes
print '<tr class="liste_titre">' ;
2023-04-25 16:13:15 +02:00
// Action column
if ( getDolGlobalString ( 'MAIN_CHECKBOX_LEFT_COLUMN' )) {
print '<td class="liste_titre center" width="64">' ;
$searchpicto = $form -> showFilterButtons ();
print $searchpicto ;
print '</td>' ;
}
2022-05-08 18:25:22 +02:00
foreach ( $fieldlist as $field => $value ) {
2023-01-04 12:40:21 +01:00
if ( $value == 'module' ) {
print '<td class="liste_titre"><input type="text" name="search_module" class="maxwidth75" value="' . dol_escape_htmltag ( $search_module ) . '"></td>' ;
} elseif ( $value == 'label' ) {
2023-11-07 15:51:31 +01:00
print '<td class="liste_titre"><input type="text" name="search_label" class="maxwidth75" value="' . dol_escape_htmltag ( $search_label ) . '"></td>' ;
2022-05-08 18:25:22 +02:00
} elseif ( $value == 'lang' ) {
print '<td class="liste_titre">' ;
2024-09-18 03:27:25 +02:00
print $formadmin -> select_language ( $search_lang , 'search_lang' , 0 , array (), 1 , 0 , 0 , 'maxwidth100' );
2022-05-08 18:25:22 +02:00
print '</td>' ;
} elseif ( $value == 'fk_user' ) {
print '<td class="liste_titre">' ;
2024-09-18 03:27:25 +02:00
print $form -> select_dolusers ( $search_fk_user , 'search_fk_user' , 1 , null , 0 , ( $user -> admin ? '' : 'hierarchyme' ), array (), 0 , 0 , 0 , '' , 0 , '' , 'maxwidth100' , 1 );
2022-05-08 18:25:22 +02:00
print '</td>' ;
} elseif ( $value == 'topic' ) {
print '<td class="liste_titre"><input type="text" name="search_topic" value="' . dol_escape_htmltag ( $search_topic ) . '"></td>' ;
} elseif ( $value == 'type_template' ) {
print '<td class="liste_titre center">' ;
2024-03-08 12:34:25 +01:00
// @phan-suppress-next-line PhanPluginSuspiciousParamOrder
2022-12-13 16:50:29 +01:00
print $form -> selectarray ( 'search_type_template' , $elementList , $search_type_template , 1 , 0 , 0 , '' , 0 , 0 , 0 , '' , 'minwidth100 maxwidth125' , 1 , '' , 0 , 1 );
2022-05-08 18:25:22 +02:00
print '</td>' ;
} elseif ( ! in_array ( $value , array ( 'content' , 'content_lines' ))) {
print '<td class="liste_titre"></td>' ;
2021-02-26 22:04:03 +01:00
}
2022-05-08 18:25:22 +02:00
}
2023-04-13 20:34:54 +02:00
/* if ( empty ( $conf -> global -> MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES )) {
2022-05-08 18:25:22 +02:00
print '<td class="liste_titre"></td>' ;
2023-04-13 20:34:54 +02:00
} */
// Status
print '<td></td>' ;
2022-05-08 18:25:22 +02:00
// Action column
2023-04-25 16:13:15 +02:00
if ( ! getDolGlobalString ( 'MAIN_CHECKBOX_LEFT_COLUMN' )) {
print '<td class="liste_titre center" width="64">' ;
$searchpicto = $form -> showFilterButtons ();
print $searchpicto ;
print '</td>' ;
}
2022-05-08 18:25:22 +02:00
print '</tr>' ;
// Title of lines
print '<tr class="liste_titre">' ;
2023-04-25 16:13:15 +02:00
// Action column
if ( getDolGlobalString ( 'MAIN_CHECKBOX_LEFT_COLUMN' )) {
print getTitleFieldOfList ( '' );
}
2022-05-08 18:25:22 +02:00
foreach ( $fieldlist as $field => $value ) {
2024-01-11 09:59:52 +01:00
$showfield = 1 ; // By default
2023-04-13 20:34:54 +02:00
$css = " left " ;
2022-05-08 18:25:22 +02:00
$sortable = 1 ;
$valuetoshow = '' ;
$forcenowrap = 1 ;
/*
$tmparray = getLabelOfField ( $fieldlist [ $field ]);
$showfield = $tmp [ 'showfield' ];
$valuetoshow = $tmp [ 'valuetoshow' ];
2023-04-13 20:34:54 +02:00
$css = $tmp [ 'align' ];
2022-05-08 18:25:22 +02:00
$sortable = $tmp [ 'sortable' ];
*/
2024-01-11 09:59:52 +01:00
$valuetoshow = ucfirst ( $fieldlist [ $field ]); // By default
2022-05-08 18:25:22 +02:00
$valuetoshow = $langs -> trans ( $valuetoshow ); // try to translate
2023-01-04 12:40:21 +01:00
if ( $fieldlist [ $field ] == 'module' ) {
2023-04-13 20:34:54 +02:00
$css = 'tdoverflowmax100' ;
2023-01-04 12:40:21 +01:00
}
2022-05-08 18:25:22 +02:00
if ( $fieldlist [ $field ] == 'fk_user' ) {
$valuetoshow = $langs -> trans ( " Owner " );
2021-02-26 22:04:03 +01:00
}
2022-05-08 18:25:22 +02:00
if ( $fieldlist [ $field ] == 'lang' ) {
$valuetoshow = $langs -> trans ( " Language " );
2021-02-26 22:04:03 +01:00
}
2022-05-08 18:25:22 +02:00
if ( $fieldlist [ $field ] == 'type' ) {
$valuetoshow = $langs -> trans ( " Type " );
2021-02-26 22:04:03 +01:00
}
2022-05-08 18:25:22 +02:00
if ( $fieldlist [ $field ] == 'libelle' || $fieldlist [ $field ] == 'label' ) {
$valuetoshow = $langs -> trans ( " Code " );
2021-02-26 22:04:03 +01:00
}
2022-05-08 18:25:22 +02:00
if ( $fieldlist [ $field ] == 'type_template' ) {
2023-04-13 20:34:54 +02:00
$css = 'center' ;
2022-05-08 18:25:22 +02:00
$valuetoshow = $langs -> trans ( " TypeOfTemplate " );
2021-02-26 22:04:03 +01:00
}
2022-05-08 18:25:22 +02:00
if ( $fieldlist [ $field ] == 'private' ) {
2023-04-13 20:34:54 +02:00
$css = 'center' ;
2021-02-26 22:04:03 +01:00
}
2022-05-08 18:25:22 +02:00
if ( $fieldlist [ $field ] == 'position' ) {
2023-04-13 20:34:54 +02:00
$css = 'center' ;
2021-02-26 22:04:03 +01:00
}
2020-09-07 10:18:17 +02:00
2022-05-08 18:25:22 +02:00
if ( $fieldlist [ $field ] == 'joinfiles' ) {
2023-04-13 20:34:54 +02:00
$valuetoshow = $langs -> trans ( " FilesAttachedToEmail " );
$css = 'center' ;
$forcenowrap = 0 ;
2020-09-07 10:18:17 +02:00
}
2022-05-08 18:25:22 +02:00
if ( $fieldlist [ $field ] == 'content' ) {
2023-12-04 11:41:14 +01:00
$valuetoshow = $langs -> trans ( " Content " );
$showfield = 0 ;
2020-09-07 10:18:17 +02:00
}
2022-05-08 18:25:22 +02:00
if ( $fieldlist [ $field ] == 'content_lines' ) {
2023-12-04 11:41:14 +01:00
$valuetoshow = $langs -> trans ( " ContentForLines " );
$showfield = 0 ;
2021-02-26 22:04:03 +01:00
}
2020-09-07 10:18:17 +02:00
2022-05-08 18:25:22 +02:00
// Show fields
if ( $showfield ) {
2024-07-23 02:12:46 +02:00
if ( ! empty ( $tabhelp [ 25 ][ $value ])) {
2022-05-08 18:25:22 +02:00
if ( in_array ( $value , array ( 'topic' ))) {
2024-07-23 02:12:46 +02:00
$valuetoshow = $form -> textwithpicto ( $valuetoshow , $tabhelp [ 25 ][ $value ], 1 , 'help' , '' , 0 , 2 , 'tooltip' . $value , $forcenowrap ); // Tooltip on click
2022-05-08 18:25:22 +02:00
} else {
2024-07-23 02:12:46 +02:00
$valuetoshow = $form -> textwithpicto ( $valuetoshow , $tabhelp [ 25 ][ $value ], 1 , 'help' , '' , 0 , 2 , '' , $forcenowrap ); // Tooltip on hover
2020-09-07 10:18:17 +02:00
}
}
2022-12-26 17:02:43 +01:00
$sortfieldtouse = ( $sortable ? $fieldlist [ $field ] : '' );
if ( $sortfieldtouse == 'type_template' ) {
2024-03-28 15:13:38 +01:00
$sortfieldtouse .= ',lang,position,label' ;
2022-12-26 17:02:43 +01:00
}
2023-04-13 20:34:54 +02:00
print getTitleFieldOfList ( $valuetoshow , 0 , $_SERVER [ " PHP_SELF " ], $sortfieldtouse , ( $page ? 'page=' . $page . '&' : '' ), $param , '' , $sortfield , $sortorder , $css . ' ' );
2020-09-07 10:18:17 +02:00
}
2022-05-08 18:25:22 +02:00
}
2017-06-01 01:53:55 +02:00
2022-12-26 17:02:43 +01:00
print getTitleFieldOfList ( $langs -> trans ( " Status " ), 0 , $_SERVER [ " PHP_SELF " ], " active " , ( $page ? 'page=' . $page . '&' : '' ), $param , '' , $sortfield , $sortorder , 'center ' );
2023-04-25 16:13:15 +02:00
// Action column
if ( ! getDolGlobalString ( 'MAIN_CHECKBOX_LEFT_COLUMN' )) {
print getTitleFieldOfList ( '' );
}
2022-05-08 18:25:22 +02:00
print '</tr>' ;
2020-09-07 10:18:17 +02:00
2024-09-18 03:27:25 +02:00
$nbqualified = 0 ;
2022-05-08 18:25:22 +02:00
if ( $num ) {
// Lines with values
while ( $i < $num ) {
$obj = $db -> fetch_object ( $resql );
2020-09-07 10:18:17 +02:00
2022-05-08 18:25:22 +02:00
if ( $obj ) {
2024-02-09 15:58:49 +01:00
if (( $action == 'edit' || $action == 'preview' ) && ( $rowid == ( ! empty ( $obj -> rowid ) ? $obj -> rowid : $obj -> code ))) {
2022-05-08 18:25:22 +02:00
print '<tr class="oddeven" id="rowid-' . $obj -> rowid . '">' ;
2020-09-07 10:18:17 +02:00
2022-05-08 18:25:22 +02:00
$tmpaction = 'edit' ;
2024-07-23 02:12:46 +02:00
$parameters = array ( 'fieldlist' => $fieldlist , 'tabname' => $tabname [ 25 ]);
2022-05-08 18:25:22 +02:00
$reshook = $hookmanager -> executeHooks ( 'editEmailTemplateFieldlist' , $parameters , $obj , $tmpaction ); // Note that $action and $object may have been modified by some hooks
2023-12-04 11:41:14 +01:00
$error = $hookmanager -> error ;
$errors = $hookmanager -> errors ;
2020-09-07 10:18:17 +02:00
2023-04-25 16:13:15 +02:00
// Action column
if ( getDolGlobalString ( 'MAIN_CHECKBOX_LEFT_COLUMN' )) {
print '<td class="center">' ;
print '<input type="hidden" name="page" value="' . $page . '">' ;
print '<input type="hidden" name="rowid" value="' . $rowid . '">' ;
2024-02-09 15:58:49 +01:00
if ( $action == 'edit' ) {
print '<input type="submit" class="button buttongen button-save" name="actionmodify" value="' . $langs -> trans ( " Modify " ) . '">' ;
}
2023-04-25 16:13:15 +02:00
print '<div name="' . ( ! empty ( $obj -> rowid ) ? $obj -> rowid : $obj -> code ) . '"></div>' ;
print '<input type="submit" class="button buttongen button-cancel" name="actioncancel" value="' . $langs -> trans ( " Cancel " ) . '">' ;
print '</td>' ;
}
2022-10-04 23:53:17 +02:00
// Show main fields
2022-05-08 18:25:22 +02:00
if ( empty ( $reshook )) {
2024-07-23 02:12:46 +02:00
fieldList ( $fieldlist , $obj , $tabname [ 25 ], $action );
2022-05-08 18:25:22 +02:00
}
2023-04-25 16:13:15 +02:00
// Action column
if ( ! getDolGlobalString ( 'MAIN_CHECKBOX_LEFT_COLUMN' )) {
print '<td class="center">' ;
print '<input type="hidden" name="page" value="' . $page . '">' ;
print '<input type="hidden" name="rowid" value="' . $rowid . '">' ;
2024-02-09 15:58:49 +01:00
if ( $action == 'edit' ) {
print '<input type="submit" class="button buttongen button-save" name="actionmodify" value="' . $langs -> trans ( " Modify " ) . '">' ;
}
2023-04-25 16:13:15 +02:00
print '<div name="' . ( ! empty ( $obj -> rowid ) ? $obj -> rowid : $obj -> code ) . '"></div>' ;
print '<input type="submit" class="button buttongen button-cancel" name="actioncancel" value="' . $langs -> trans ( " Cancel " ) . '">' ;
print '</td>' ;
}
print " </tr> \n " ;
2022-05-08 15:18:34 +02:00
2024-03-18 20:38:51 +01:00
print '<tr class="oddeven nohover" id="tr-aaa-' . $rowid . '">' ;
2024-10-14 01:33:15 +02:00
print '<td colspan="10" class="paddingleft" style="padding-left: 20px">' ;
2022-05-08 18:25:22 +02:00
2023-08-02 12:05:44 +02:00
$fieldsforcontent = array ( 'topic' , 'email_from' , 'joinfiles' , 'content' );
2023-10-24 17:00:13 +02:00
if ( getDolGlobalString ( 'MAIN_EMAIL_TEMPLATES_FOR_OBJECT_LINES' )) {
2023-04-25 16:13:15 +02:00
$fieldsforcontent [] = 'content_lines' ;
2022-05-08 18:25:22 +02:00
}
2024-11-16 14:51:24 +01:00
$parameters = array ( 'fieldsforcontent' => & $fieldsforcontent , 'tabname' => $tabname [ $id ]);
$hookmanager -> executeHooks ( 'editEmailTemplateFieldsForContent' , $parameters , $obj , $tmpaction ); // Note that $action and $object may have been modified by some hooks
2022-05-08 18:25:22 +02:00
foreach ( $fieldsforcontent as $tmpfieldlist ) {
$showfield = 1 ;
2023-04-13 20:34:54 +02:00
$css = " left " ;
2022-10-04 23:53:17 +02:00
$valuetoshow = $obj -> $tmpfieldlist ;
2022-05-08 18:25:22 +02:00
$class = 'tddict' ;
// Show value for field
if ( $showfield ) {
// Show line for topic, joinfiles and content
if ( $tmpfieldlist == 'topic' ) {
2024-07-23 02:12:46 +02:00
print '<div class="minwidth150 inline-block bold">' . $form -> textwithpicto ( $langs -> trans ( " Topic " ), $tabhelp [ 25 ][ $tmpfieldlist ], 1 , 'help' , '' , 0 , 2 , $tmpfieldlist ) . '</div> ' ;
2024-02-09 15:58:49 +01:00
print '<input type="text" class="flat minwidth500" name="' . $tmpfieldlist . '-' . $rowid . '" value="' . ( ! empty ( $obj -> { $tmpfieldlist }) ? $obj -> { $tmpfieldlist } : '' ) . '"' . ( $action != 'edit' ? ' disabled' : '' ) . '>' ;
2023-04-25 16:13:15 +02:00
print '<br>' . " \n " ;
2022-05-08 18:25:22 +02:00
}
2023-08-02 12:05:44 +02:00
if ( $tmpfieldlist == 'email_from' ) {
2024-07-23 02:12:46 +02:00
print '<div class="minwidth150 inline-block bold">' . $form -> textwithpicto ( $langs -> trans ( " MailFrom " ), $tabhelp [ 25 ][ $tmpfieldlist ], 1 , 'help' , '' , 0 , 2 , $tmpfieldlist ) . '</div> ' ;
2024-02-09 15:58:49 +01:00
print '<input type="text" class="flat minwidth500" name="' . $tmpfieldlist . '-' . $rowid . '" value="' . ( ! empty ( $obj -> { $tmpfieldlist }) ? $obj -> { $tmpfieldlist } : '' ) . '"' . ( $action != 'edit' ? ' disabled' : '' ) . '>' ;
2023-08-02 12:05:44 +02:00
print '<br>' . " \n " ;
}
2022-05-08 18:25:22 +02:00
if ( $tmpfieldlist == 'joinfiles' ) {
2024-07-23 02:12:46 +02:00
print '<div class="minwidth150 inline-block bold">' . $form -> textwithpicto ( $langs -> trans ( " FilesAttachedToEmail " ), $tabhelp [ 25 ][ $tmpfieldlist ], 1 , 'help' , '' , 0 , 2 , $tmpfieldlist ) . '</div> ' ;
2024-02-09 15:58:49 +01:00
print $form -> selectyesno ( $tmpfieldlist . '-' . $rowid , ( isset ( $obj -> $tmpfieldlist ) ? $obj -> $tmpfieldlist : '0' ), 1 , ( $action != 'edit' ), 0 , 1 );
2023-04-25 16:13:15 +02:00
print '<br>' . " \n " ;
2022-05-08 18:25:22 +02:00
}
2022-09-08 23:49:25 +02:00
2022-05-08 18:25:22 +02:00
if ( $tmpfieldlist == 'content' ) {
2024-10-14 01:33:15 +02:00
print $form -> textwithpicto ( $langs -> trans ( " Content " ), $tabhelp [ 25 ][ $tmpfieldlist ], 1 , 'help' , 'margintoponly' , 0 , 2 , $tmpfieldlist ) . '<br>' ;
2022-05-08 18:25:22 +02:00
$okforextended = true ;
2023-10-24 17:00:13 +02:00
if ( ! getDolGlobalString ( 'FCKEDITOR_ENABLE_MAIL' )) {
2022-05-08 18:25:22 +02:00
$okforextended = false ;
2022-05-08 15:18:34 +02:00
}
2024-10-25 13:24:10 +02:00
$doleditor = new DolEditor ( $tmpfieldlist . '-' . $rowid , ( ! empty ( $obj -> { $tmpfieldlist }) ? $obj -> { $tmpfieldlist } : '' ), '' , 500 , 'dolibarr_mailings' , 'In' , false , $acceptlocallinktomedia , $okforextended , ROWS_6 , '90%' , ( $action != 'edit' ? 1 : 0 ));
2022-05-08 18:25:22 +02:00
print $doleditor -> Create ( 1 );
2020-09-07 10:18:17 +02:00
}
2022-05-08 18:25:22 +02:00
if ( $tmpfieldlist == 'content_lines' ) {
2023-04-25 16:13:15 +02:00
print '<br>' . " \n " ;
2024-10-14 01:33:15 +02:00
print $form -> textwithpicto ( $langs -> trans ( " ContentForLines " ), $tabhelp [ 25 ][ $tmpfieldlist ], 1 , 'help' , 'margintoponly' , 0 , 2 , $tmpfieldlist ) . '<br>' ;
2022-05-08 18:25:22 +02:00
$okforextended = true ;
2023-10-24 17:00:13 +02:00
if ( ! getDolGlobalString ( 'FCKEDITOR_ENABLE_MAIL' )) {
2022-05-08 18:25:22 +02:00
$okforextended = false ;
2022-09-08 23:49:25 +02:00
}
2024-10-25 13:24:10 +02:00
$doleditor = new DolEditor ( $tmpfieldlist . '-' . $rowid , ( ! empty ( $obj -> { $tmpfieldlist }) ? $obj -> { $tmpfieldlist } : '' ), '' , 140 , 'dolibarr_mailings' , 'In' , false , $acceptlocallinktomedia , $okforextended , ROWS_6 , '90%' );
2022-05-08 18:25:22 +02:00
print $doleditor -> Create ( 1 );
2021-10-21 23:53:37 +02:00
}
2020-09-07 10:18:17 +02:00
}
2022-05-08 18:25:22 +02:00
}
2023-04-25 16:13:15 +02:00
print '</td>' ;
print '<td></td>' ;
print '<td></td>' ;
2018-04-19 20:12:43 +02:00
2022-05-08 18:25:22 +02:00
print " </tr> \n " ;
$nbqualified ++ ;
} else {
// If template is for a module, check module is enabled.
if ( $obj -> module ) {
$tempmodulekey = $obj -> module ;
2023-06-12 20:43:28 +02:00
if ( empty ( $conf -> $tempmodulekey ) || ! isModEnabled ( $tempmodulekey )) {
2022-05-08 15:18:34 +02:00
$i ++ ;
2022-05-08 18:25:22 +02:00
continue ;
2020-10-31 14:32:18 +01:00
}
2022-05-08 18:25:22 +02:00
}
2018-04-19 20:12:43 +02:00
2022-05-08 18:25:22 +02:00
$keyforobj = 'type_template' ;
if ( ! in_array ( $obj -> $keyforobj , array_keys ( $elementList ))) {
$i ++ ;
continue ; // It means this is a type of template not into elementList (may be because enabled condition of this type is false because module is not enabled)
}
// Test on 'enabled'
2024-03-06 17:07:24 +01:00
if ( ! ( int ) dol_eval ( $obj -> enabled , 1 , 1 , '1' )) {
2022-05-08 18:25:22 +02:00
$i ++ ;
continue ; // Email template not qualified
}
2018-04-19 20:12:43 +02:00
2022-05-08 18:25:22 +02:00
$nbqualified ++ ;
2017-02-12 18:13:49 +01:00
2023-04-25 16:13:15 +02:00
// Can an entry be erased or disabled ?
2023-12-04 11:41:14 +01:00
$iserasable = 1 ;
$canbedisabled = 1 ;
$canbemodified = 1 ; // true by default
2023-04-25 16:13:15 +02:00
if ( ! $user -> admin && $obj -> fk_user != $user -> id ) {
$iserasable = 0 ;
$canbedisabled = 0 ;
$canbemodified = 0 ;
}
2024-05-13 19:11:50 +02:00
$url = $_SERVER [ " PHP_SELF " ] . '?' . ( $page ? 'page=' . $page . '&' : '' ) . 'sortfield=' . $sortfield . '&sortorder=' . $sortorder . '&rowid=' . ( ! empty ( $obj -> rowid ) ? $obj -> rowid : ( ! empty ( $obj -> code ) ? $obj -> code : '' )) . ( ! empty ( $obj -> code ) ? '&code=' . urlencode ( $obj -> code ) : '' );
2023-04-25 16:13:15 +02:00
if ( $param ) {
$url .= '&' . $param ;
}
2022-05-08 18:25:22 +02:00
print '<tr class="oddeven" id="rowid-' . $obj -> rowid . '">' ;
2017-02-12 18:13:49 +01:00
2023-04-25 16:13:15 +02:00
// Action column - Modify link / Delete link
if ( getDolGlobalString ( 'MAIN_CHECKBOX_LEFT_COLUMN' )) {
print '<td class="center nowraponall" width="64">' ;
if ( $canbemodified ) {
print '<a class="reposition editfielda" href="' . $url . '&action=edit&token=' . newToken () . '">' . img_edit () . '</a>' ;
2024-02-09 15:58:49 +01:00
} else {
print '<a class="reposition editfielda" href="' . $url . '&action=preview&token=' . newToken () . '">' . img_view () . '</a>' ;
2023-04-25 16:13:15 +02:00
}
if ( $iserasable ) {
2024-10-27 14:08:59 +01:00
print '<a class="reposition marginleftonly" href="' . $url . '&action=delete&token=' . newToken () . $param . '">' . img_delete () . '</a>' ;
2023-04-25 16:13:15 +02:00
}
print '</td>' ;
}
2022-05-08 18:25:22 +02:00
$tmpaction = 'view' ;
2024-07-23 02:12:46 +02:00
$parameters = array ( 'fieldlist' => $fieldlist , 'tabname' => $tabname [ 25 ]);
2022-05-08 18:25:22 +02:00
$reshook = $hookmanager -> executeHooks ( 'viewEmailTemplateFieldlist' , $parameters , $obj , $tmpaction ); // Note that $action and $object may have been modified by some hooks
2023-12-04 11:41:14 +01:00
$error = $hookmanager -> error ;
$errors = $hookmanager -> errors ;
2022-05-08 18:25:22 +02:00
if ( empty ( $reshook )) {
foreach ( $fieldlist as $field => $value ) {
if ( in_array ( $fieldlist [ $field ], array ( 'content' , 'content_lines' ))) {
continue ;
}
$showfield = 1 ;
2023-04-13 20:34:54 +02:00
$css = " " ;
2022-05-08 18:25:22 +02:00
$class = " tddict " ;
$title = '' ;
2022-12-30 18:43:43 +01:00
$tmpvar = $fieldlist [ $field ];
$valuetoshow = $obj -> $tmpvar ;
2022-05-08 18:25:22 +02:00
if ( $value == 'label' || $value == 'topic' ) {
if ( $langs -> trans ( $valuetoshow ) != $valuetoshow ) {
$valuetoshow = $langs -> trans ( $valuetoshow );
2022-05-08 15:18:34 +02:00
}
2022-05-08 18:25:22 +02:00
$valuetoshow = dol_escape_htmltag ( $valuetoshow );
}
if ( $value == 'label' ) {
2023-11-07 15:51:31 +01:00
$class .= ' tdoverflowmax200' ;
2022-05-08 18:25:22 +02:00
}
if ( $value == 'topic' ) {
2022-10-18 23:18:22 +02:00
$class .= ' tdoverflowmax200 small' ;
2022-05-08 18:25:22 +02:00
}
if ( $value == 'type_template' ) {
$valuetoshow = isset ( $elementList [ $valuetoshow ]) ? $elementList [ $valuetoshow ] : $valuetoshow ;
2023-05-10 02:17:11 +02:00
$css = " center tdoverflowmax150 " ;
2022-05-08 18:25:22 +02:00
}
if ( $value == 'lang' && $valuetoshow ) {
$valuetoshow = $valuetoshow . ' - ' . $langs -> trans ( " Language_ " . $valuetoshow );
2023-05-10 02:17:11 +02:00
$class .= ' tdoverflowmax100' ;
2022-05-08 18:25:22 +02:00
}
if ( $value == 'fk_user' ) {
if ( $valuetoshow > 0 ) {
$fuser = new User ( $db );
$fuser -> fetch ( $valuetoshow );
2024-05-13 20:44:23 +02:00
$valuetoshow = $fuser -> getNomUrl ( - 1 );
2023-05-10 02:17:11 +02:00
$class .= ' tdoverflowmax100' ;
2022-05-08 15:18:34 +02:00
}
2022-05-08 18:25:22 +02:00
}
if ( $value == 'private' ) {
2023-04-13 20:34:54 +02:00
$css = " center " ;
2022-05-08 18:25:22 +02:00
if ( $valuetoshow ) {
$valuetoshow = yn ( $valuetoshow );
} else {
$valuetoshow = '' ;
2022-05-08 15:18:34 +02:00
}
2022-05-08 18:25:22 +02:00
}
if ( $value == 'position' ) {
2023-04-13 20:34:54 +02:00
$css = " center " ;
2022-05-08 18:25:22 +02:00
}
2023-04-13 20:34:54 +02:00
if ( in_array ( $value , array ( 'joinfiles' , 'defaultfortype' ))) {
$css = " center " ;
2022-05-08 18:25:22 +02:00
if ( $valuetoshow ) {
2023-05-10 02:17:11 +02:00
//$valuetoshow = yn(1);
$valuetoshow = '<input type="checkbox" checked="checked" disabled>' ;
2022-05-08 18:25:22 +02:00
} else {
$valuetoshow = '' ;
2021-02-26 22:04:03 +01:00
}
2022-05-08 18:25:22 +02:00
}
2023-04-13 20:34:54 +02:00
if ( $css ) {
$class .= ' ' . $css ;
2022-05-08 18:25:22 +02:00
}
2020-09-07 10:18:17 +02:00
2022-05-08 18:25:22 +02:00
// Show value for field
if ( $showfield ) {
print '<!-- ' . $fieldlist [ $field ] . ' -->' ;
print '<td class="' . $class . '"' ;
if ( in_array ( $value , array ( 'code' , 'label' , 'topic' ))) {
print ' title="' . dol_escape_htmltag ( $valuetoshow ) . '"' ;
2021-04-19 22:52:13 +02:00
}
2022-05-08 18:25:22 +02:00
print '>' ;
print $valuetoshow ;
print '</td>' ;
2017-02-12 18:13:49 +01:00
}
2020-09-07 10:18:17 +02:00
}
2022-05-08 18:25:22 +02:00
}
2017-02-12 18:13:49 +01:00
2022-05-08 18:25:22 +02:00
// Status / Active
print '<td class="center nowrap">' ;
if ( $canbedisabled ) {
2022-09-10 16:05:33 +02:00
print '<a class="reposition" href="' . $url . '&action=' . $acts [ $obj -> active ] . '&token=' . newToken () . '">' . $actl [ $obj -> active ] . '</a>' ;
2022-05-08 18:25:22 +02:00
} else {
print '<span class="opacitymedium">' . $actl [ $obj -> active ] . '</span>' ;
}
print " </td> " ;
2017-02-12 18:13:49 +01:00
2023-04-25 16:13:15 +02:00
// Action column - Modify link / Delete link
if ( ! getDolGlobalString ( 'MAIN_CHECKBOX_LEFT_COLUMN' )) {
print '<td class="center nowraponall" width="64">' ;
if ( $canbemodified ) {
print '<a class="reposition editfielda" href="' . $url . '&action=edit&token=' . newToken () . '">' . img_edit () . '</a>' ;
}
if ( $iserasable ) {
2023-08-30 23:42:45 +02:00
print '<a class="reposition marginleftonly" href="' . $url . '&action=delete&token=' . newToken () . '">' . img_delete () . '</a>' ;
2023-04-25 16:13:15 +02:00
//else print '<a href="#">'.img_delete().'</a>'; // Some dictionary can be edited by other profile than admin
}
print '</td>' ;
2022-05-08 18:25:22 +02:00
}
2017-06-01 01:53:55 +02:00
2022-05-08 18:25:22 +02:00
print " </tr> \n " ;
}
2020-09-07 10:18:17 +02:00
}
2022-05-08 18:25:22 +02:00
$i ++ ;
2020-09-07 10:18:17 +02:00
}
2022-05-08 18:25:22 +02:00
}
// If no record found
if ( $nbqualified == 0 ) {
2023-06-08 23:16:05 +02:00
$colspan = 12 ;
2022-05-08 18:25:22 +02:00
print '<tr><td colspan="' . $colspan . '"><span class="opacitymedium">' . $langs -> trans ( " NoRecordFound " ) . '</span></td></tr>' ;
2017-02-12 18:13:49 +01:00
}
print '</table>' ;
2017-09-08 10:09:22 +02:00
print '</div>' ;
2017-02-12 18:13:49 +01:00
print '</form>' ;
2022-02-01 11:57:33 +01:00
if ( ! empty ( $user -> admin ) && ( empty ( $_SESSION [ 'leftmenu' ]) || $_SESSION [ 'leftmenu' ] != 'email_templates' )) {
print dol_get_fiche_end ();
}
2017-02-12 18:13:49 +01:00
2018-07-28 18:03:14 +02:00
// End of page
2017-02-12 18:13:49 +01:00
llxFooter ();
$db -> close ();
/**
* Show fields in insert / edit mode
*
2024-09-18 03:27:25 +02:00
* @ param array < int | string , null | int | float | string > $fieldlist Array of fields and their values
* @ param ? Object $obj If we show a particular record , obj is filled with record fields
2017-02-12 18:13:49 +01:00
* @ param string $tabname Name of SQL table
2024-02-09 15:58:49 +01:00
* @ param string $context 'add' = Output field for the " add form " , 'edit' = Output field for the " edit form " , 'preview' = show in readonly the template , 'hide' = Output field for the " add form " but we don ' t want it to be rendered
2017-02-12 18:13:49 +01:00
* @ return void
*/
2023-12-20 14:22:45 +01:00
function fieldList ( $fieldlist , $obj = null , $tabname = '' , $context = '' )
2017-02-12 18:13:49 +01:00
{
2023-01-04 12:40:21 +01:00
global $langs , $user , $db ;
2017-02-12 18:13:49 +01:00
global $form ;
2020-10-17 12:59:22 +02:00
global $elementList ;
2017-02-12 18:13:49 +01:00
$formadmin = new FormAdmin ( $db );
2021-02-26 22:04:03 +01:00
foreach ( $fieldlist as $field => $value ) {
2023-04-13 20:34:54 +02:00
//print $value;
2023-01-04 12:40:21 +01:00
if ( $value == 'module' ) {
2023-01-04 13:01:11 +01:00
print '<td></td>' ;
} elseif ( $value == 'fk_user' ) {
2017-02-12 18:13:49 +01:00
print '<td>' ;
2024-02-09 15:58:49 +01:00
if ( $user -> admin && $context != 'preview' ) {
2024-09-18 03:27:25 +02:00
print $form -> select_dolusers ( GETPOSTISSET ( 'fk_user' ) ? GETPOSTINT ( 'fk_user' ) : ( empty ( $obj -> $value ) ? '' : $obj -> $value ), 'fk_user' , 1 , array (), 0 , ( $user -> admin ? '' : 'hierarchyme' ), array (), 0 , 0 , 0 , '' , 0 , '' , 'minwidth75 maxwidth100' );
2020-05-21 09:35:30 +02:00
} else {
2021-02-26 22:04:03 +01:00
if ( $context == 'add' ) { // I am not admin and we show the add form
2024-05-13 20:44:23 +02:00
print $user -> getNomUrl ( - 1 ); // Me
2019-12-16 13:06:25 +01:00
$forcedvalue = $user -> id ;
2020-05-21 09:35:30 +02:00
} else {
2022-12-30 18:43:43 +01:00
if ( $obj && ! empty ( $obj -> $value ) && $obj -> $value > 0 ) {
2019-12-16 13:06:25 +01:00
$fuser = new User ( $db );
2022-12-30 18:43:43 +01:00
$fuser -> fetch ( $obj -> $value );
2024-05-13 20:44:23 +02:00
print $fuser -> getNomUrl ( - 1 );
2019-12-16 13:06:25 +01:00
$forcedvalue = $fuser -> id ;
2020-05-21 09:35:30 +02:00
} else {
2022-12-30 18:43:43 +01:00
$forcedvalue = $obj -> $value ;
2017-09-08 12:21:47 +02:00
}
}
2021-04-13 16:32:19 +02:00
$keyname = $value ;
2017-09-08 12:21:47 +02:00
print '<input type="hidden" value="' . $forcedvalue . '" name="' . $keyname . '">' ;
}
print '</td>' ;
2021-04-13 16:32:19 +02:00
} elseif ( $value == 'lang' ) {
2017-02-12 18:13:49 +01:00
print '<td>' ;
2024-02-09 15:58:49 +01:00
if ( getDolGlobalInt ( 'MAIN_MULTILANGS' ) && $context != 'preview' ) {
2023-12-04 11:41:14 +01:00
$selectedlang = GETPOSTISSET ( 'langcode' ) ? GETPOST ( 'langcode' , 'aZ09' ) : $langs -> defaultlang ;
2021-02-26 22:04:03 +01:00
if ( $context == 'edit' ) {
2022-10-04 23:53:17 +02:00
$selectedlang = $obj -> lang ;
2021-02-26 22:04:03 +01:00
}
2024-09-18 03:27:25 +02:00
print $formadmin -> select_language ( $selectedlang , 'langcode' , 0 , array (), 1 , 0 , 0 , 'maxwidth100' );
2020-05-21 09:35:30 +02:00
} else {
2022-10-04 23:53:17 +02:00
if ( ! empty ( $obj -> lang )) {
print $obj -> lang . ' - ' . $langs -> trans ( 'Language_' . $obj -> lang );
2017-08-25 17:13:33 +02:00
}
2021-04-13 16:32:19 +02:00
$keyname = $value ;
2021-02-26 22:04:03 +01:00
if ( $keyname == 'lang' ) {
$keyname = 'langcode' ; // Avoid conflict with lang param
}
2022-10-04 23:53:17 +02:00
print '<input type="hidden" value="' . ( empty ( $obj -> lang ) ? '' : $obj -> lang ) . '" name="' . $keyname . '">' ;
2017-08-25 16:38:45 +02:00
}
2017-02-12 18:13:49 +01:00
print '</td>' ;
2021-04-13 16:32:19 +02:00
} elseif ( $value == 'type_template' ) {
2021-02-26 22:04:03 +01:00
// Le type de template
2020-10-17 12:59:22 +02:00
print '<td class="center">' ;
2024-02-09 15:58:49 +01:00
if (( $context == 'edit' && ! empty ( $obj -> type_template ) && ! in_array ( $obj -> type_template , array_keys ( $elementList ))) || $context == 'preview' ) {
2020-12-05 15:35:52 +01:00
// Current template type is an unknown type, so we must keep it as it is.
2022-10-04 23:53:17 +02:00
print '<input type="hidden" name="type_template" value="' . $obj -> type_template . '">' ;
print $obj -> type_template ;
2020-05-21 09:35:30 +02:00
} else {
2023-12-04 11:41:14 +01:00
print $form -> selectarray ( 'type_template' , $elementList , ( ! empty ( $obj -> type_template ) ? $obj -> type_template : '' ), 1 , 0 , 0 , '' , 0 , 0 , 0 , '' , 'minwidth75 maxwidth125' , 1 , '' , 0 , 1 );
2017-09-08 12:21:47 +02:00
}
2017-02-12 18:13:49 +01:00
print '</td>' ;
2021-04-13 16:32:19 +02:00
} elseif ( $context == 'add' && in_array ( $value , array ( 'topic' , 'joinfiles' , 'content' , 'content_lines' ))) {
2023-04-13 20:34:54 +02:00
//print '<td></td>';
2021-04-13 16:32:19 +02:00
} elseif ( $context == 'edit' && in_array ( $value , array ( 'topic' , 'joinfiles' , 'content' , 'content_lines' ))) {
2023-04-13 20:34:54 +02:00
print '<td></td>' ;
2024-02-09 15:58:49 +01:00
} elseif ( $context == 'preview' && in_array ( $value , array ( 'topic' , 'joinfiles' , 'content' , 'content_lines' ))) {
print '<td></td>' ;
2021-04-13 16:32:19 +02:00
} elseif ( $context == 'hide' && in_array ( $value , array ( 'topic' , 'joinfiles' , 'content' , 'content_lines' ))) {
2023-04-13 20:34:54 +02:00
//print '<td></td>';
2021-02-26 22:04:03 +01:00
} else {
2023-12-04 11:41:14 +01:00
$size = '' ;
$class = '' ;
$classtd = '' ;
2021-04-13 16:32:19 +02:00
if ( $value == 'code' ) {
2021-02-26 22:04:03 +01:00
$class = 'maxwidth100' ;
}
2021-04-13 16:32:19 +02:00
if ( $value == 'label' ) {
2021-02-26 22:04:03 +01:00
$class = 'maxwidth200' ;
}
2021-04-13 16:32:19 +02:00
if ( $value == 'private' ) {
2023-04-13 20:34:54 +02:00
$class = 'maxwidth50' ;
$classtd = 'center' ;
2021-02-26 22:04:03 +01:00
}
2021-04-13 16:32:19 +02:00
if ( $value == 'position' ) {
2023-04-13 20:34:54 +02:00
$class = 'maxwidth50 center' ;
$classtd = 'center' ;
2021-02-26 22:04:03 +01:00
}
2021-04-13 16:32:19 +02:00
if ( $value == 'topic' ) {
2021-02-26 22:04:03 +01:00
$class = 'quatrevingtpercent' ;
}
2023-04-13 20:34:54 +02:00
if ( $value == 'defaultfortype' ) {
$class = 'width25 center' ;
$classtd = 'center' ;
2021-02-26 22:04:03 +01:00
}
2019-12-16 13:06:25 +01:00
print '<td' . ( $classtd ? ' class="' . $classtd . '"' : '' ) . '>' ;
2024-02-09 15:58:49 +01:00
if ( $value == 'private' && $context != 'preview' ) {
2021-02-26 22:04:03 +01:00
if ( empty ( $user -> admin )) {
2024-03-07 20:16:48 +01:00
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
2024-07-23 02:12:46 +02:00
print $form -> selectyesno ( $value , GETPOSTISSET ( $value ) ? GETPOSTINT ( $value ) : (( $context != 'add' && isset ( $obj -> $value )) ? $obj -> $value : '1' ), 1 , false , 0 , 1 );
2020-05-21 09:35:30 +02:00
} else {
2024-03-07 20:16:48 +01:00
// @phan-suppress-next-line PhanPluginSuspiciousParamPosition
2024-07-22 21:49:47 +02:00
print $form -> selectyesno ( $value , ( isset ( $obj -> $value ) ? $obj -> $value : '' ), 1 , false , 0 , 1 );
2017-09-22 11:47:36 +02:00
}
2020-05-21 09:35:30 +02:00
} else {
2024-02-09 15:58:49 +01:00
print '<input type="text" ' . $size . 'class="flat' . ( $class ? ' ' . $class : '' ) . '" value="' . ( isset ( $obj -> $value ) ? $obj -> $value : '' ) . '" name="' . $value . '"' . ( $context == 'preview' ? ' disabled' : '' ) . '>' ;
2017-09-08 12:21:47 +02:00
}
2017-02-12 18:13:49 +01:00
print '</td>' ;
}
}
}