Fix security on GETPOST('action'). Param must be sanitized.
This commit is contained in:
parent
763f3cd518
commit
4a25317f10
@ -41,7 +41,7 @@ if (empty($user->rights->accounting->chartofaccount))
|
|||||||
accessforbidden();
|
accessforbidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
aZ09
|
aZ09
|
||||||
// Parameters ACCOUNTING_EXPORT_*
|
// Parameters ACCOUNTING_EXPORT_*
|
||||||
$main_option = array (
|
$main_option = array (
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $langs->loadLangs(array("accountancy"));
|
|||||||
$page = GETPOST("page");
|
$page = GETPOST("page");
|
||||||
$sortorder = GETPOST("sortorder");
|
$sortorder = GETPOST("sortorder");
|
||||||
$sortfield = GETPOST("sortfield");
|
$sortfield = GETPOST("sortfield");
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
|
$search_date_start = dol_mktime(0, 0, 0, GETPOST('search_date_startmonth', 'int'), GETPOST('search_date_startday', 'int'), GETPOST('search_date_startyear', 'int'));
|
||||||
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
|
$search_date_end = dol_mktime(0, 0, 0, GETPOST('search_date_endmonth', 'int'), GETPOST('search_date_endday', 'int'), GETPOST('search_date_endyear', 'int'));
|
||||||
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
$search_doc_date = dol_mktime(0, 0, 0, GETPOST('doc_datemonth', 'int'), GETPOST('doc_dateday', 'int'), GETPOST('doc_dateyear', 'int'));
|
||||||
|
|||||||
@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("bills","accountancy"));
|
$langs->loadLangs(array("bills","accountancy"));
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("bills","accountancy","trips"));
|
$langs->loadLangs(array("bills","accountancy","trips"));
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("bills","accountancy"));
|
$langs->loadLangs(array("bills","accountancy"));
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='adherent'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='adherent'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='adherent_type'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='adherent_type'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("admin","members"));
|
$langs->loadLangs(array("admin","members"));
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='actioncomm'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='actioncomm'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ $langs->loadLangs(array("admin","companies","bills","other","banks"));
|
|||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir', 'alpha');
|
$scandir = GETPOST('scan_dir', 'alpha');
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='bank_account'; //Must be the $element of the class that manage extrafield
|
$elementtype='bank_account'; //Must be the $element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ if (!$user->admin)
|
|||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
$arrayofparameters=array(
|
$arrayofparameters=array(
|
||||||
|
|||||||
@ -77,8 +77,6 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*
|
|
||||||
* Put here all code to do according to value of "action" parameter
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$parameters = array();
|
$parameters = array();
|
||||||
@ -105,11 +103,29 @@ if (empty($reshook))
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ($action == 'confirm_collect')
|
||||||
|
{
|
||||||
|
dol_include_once('/emailcollector/class/emailcollector.class.php');
|
||||||
|
|
||||||
|
$res = $object->doCollect();
|
||||||
|
|
||||||
|
if ($res == 0)
|
||||||
|
{
|
||||||
|
setEventMessages($object->output, null, 'mesgs');
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setEventMessages($object->error, null, 'errors');
|
||||||
|
}
|
||||||
|
|
||||||
|
$action = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*
|
|
||||||
* Put here all code to build page
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
@ -302,26 +318,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
|
||||||
|
|
||||||
if ($action == 'confirm_collect')
|
|
||||||
{
|
|
||||||
print_fiche_titre($langs->trans('MessagesFetchingResults'), '', '');
|
|
||||||
|
|
||||||
dol_include_once('/emailcollector/class/emailcollector.class.php');
|
|
||||||
$emailcollector = new EmailCollector($object);
|
|
||||||
|
|
||||||
$res = $emailcollector->doCollect();
|
|
||||||
if (is_array($res)) {
|
|
||||||
if (count($res['actions_done']) > 0) {
|
|
||||||
setEventMessages($langs->trans('XActionsDone', count($res['actions_done'])), null, 'info');
|
|
||||||
} else {
|
|
||||||
setEventMessages($langs->trans('NoActionsdone'), null, 'info');
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
setEventMessages($langs->trans('NoEmailsToProcess'), null, 'info');
|
|
||||||
}
|
|
||||||
$action = '';
|
|
||||||
}
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='expedition'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='expedition'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='expeditiondet'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='expeditiondet'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='expensereport'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='expensereport'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='livraison'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='livraison'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='livraisondet'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='livraisondet'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ $langs->loadLangs(array('admin', 'loan'));
|
|||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
// Other parameters LOAN_*
|
// Other parameters LOAN_*
|
||||||
$list = array (
|
$list = array (
|
||||||
|
|||||||
@ -38,7 +38,7 @@ if (! $user->admin) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $langs->loadLangs(array('admin', 'oauth'));
|
|||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='commande'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='commande'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='commandedet'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='commandedet'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ $langs->loadLangs(array("admin","resource"));
|
|||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -44,7 +44,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='resource'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='resource'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ $langs->loadLangs(array('admin', 'salaries'));
|
|||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
// Other parameters SALARIES_*
|
// Other parameters SALARIES_*
|
||||||
$list = array (
|
$list = array (
|
||||||
|
|||||||
@ -42,7 +42,7 @@ accessforbidden();
|
|||||||
|
|
||||||
$type=GETPOST('type', 'alpha');
|
$type=GETPOST('type', 'alpha');
|
||||||
$value=GETPOST('value', 'alpha');
|
$value=GETPOST('value', 'alpha');
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
|
|
||||||
$specimenthirdparty=new Societe($db);
|
$specimenthirdparty=new Societe($db);
|
||||||
|
|||||||
@ -43,7 +43,7 @@ accessforbidden();
|
|||||||
$type=GETPOST('type', 'alpha');
|
$type=GETPOST('type', 'alpha');
|
||||||
$value=GETPOST('value', 'alpha');
|
$value=GETPOST('value', 'alpha');
|
||||||
$label = GETPOST('label','alpha');
|
$label = GETPOST('label','alpha');
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$scandir = GETPOST('scan_dir','alpha');
|
$scandir = GETPOST('scan_dir','alpha');
|
||||||
|
|
||||||
$specimenthirdparty=new Societe($db);
|
$specimenthirdparty=new Societe($db);
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='facture_fourn'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='facture_fourn'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='facture_fourn_det'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='facture_fourn_det'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -45,7 +45,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='commande_fournisseur'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='commande_fournisseur'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='commande_fournisseurdet'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='commande_fournisseurdet'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ if (!$user->admin) {
|
|||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
$value = GETPOST('value', 'alpha');
|
$value = GETPOST('value', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$label = GETPOST('label', 'alpha');
|
$label = GETPOST('label', 'alpha');
|
||||||
$scandir = GETPOST('scandir', 'alpha');
|
$scandir = GETPOST('scandir', 'alpha');
|
||||||
$type = 'ticket';
|
$type = 'ticket';
|
||||||
|
|||||||
@ -39,7 +39,7 @@ foreach ($tmptype2label as $key => $val) {
|
|||||||
$type2label[$key] = $langs->trans($val);
|
$type2label[$key] = $langs->trans($val);
|
||||||
}
|
}
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$attrname = GETPOST('attrname', 'alpha');
|
$attrname = GETPOST('attrname', 'alpha');
|
||||||
$elementtype = 'ticket'; //Must be the $table_element of the class that manage extrafield
|
$elementtype = 'ticket'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||||||
if (! $user->admin)
|
if (! $user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$confirm=GETPOST('confirm','alpha');
|
$confirm=GETPOST('confirm','alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -31,7 +31,7 @@ $langs->loadLangs(array("companies","install","users","other"));
|
|||||||
if (! $user->admin)
|
if (! $user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$confirm=GETPOST('confirm', 'alpha');
|
$confirm=GETPOST('confirm', 'alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -32,7 +32,7 @@ $langs->loadLangs(array("admin","workflow","propal","workflow","orders","supplie
|
|||||||
|
|
||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
|
|||||||
@ -37,7 +37,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='don'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='don'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='adherent_type'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='adherent_type'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ $langs->loadLangs(array("admin", "assets"));
|
|||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
$arrayofparameters=array('FIXEDASSETS_MYPARAM1'=>array('css'=>'minwidth200'), 'FIXEDASSETS_MYPARAM2'=>array('css'=>'minwidth500'));
|
$arrayofparameters=array('FIXEDASSETS_MYPARAM1'=>array('css'=>'minwidth200'), 'FIXEDASSETS_MYPARAM2'=>array('css'=>'minwidth500'));
|
||||||
|
|||||||
@ -34,7 +34,7 @@ $langs->loadLangs(array("asset"));
|
|||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'aZ09');
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ $langs->loadLangs(array("asset","companies"));
|
|||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'aZ09');
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='categorie'; //Must be the $element of the class that manage extrafield
|
$elementtype='categorie'; //Must be the $element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/cla
|
|||||||
$langs->loadLangs(array('companies', 'commercial', 'other', 'bills'));
|
$langs->loadLangs(array('companies', 'commercial', 'other', 'bills'));
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -39,7 +39,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='propal'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='propal'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
|
|
||||||
$elementtype='propaldet'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='propaldet'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|||||||
@ -40,7 +40,7 @@ if (! $user->rights->societe->lire) accessforbidden();
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("commercial", "propal"));
|
$langs->loadLangs(array("commercial", "propal"));
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$bid=GETPOST('bid', 'int');
|
$bid=GETPOST('bid', 'int');
|
||||||
|
|
||||||
// Securite acces client
|
// Securite acces client
|
||||||
|
|||||||
@ -68,7 +68,7 @@ $error = 0;
|
|||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$origin = GETPOST('origin', 'alpha');
|
$origin = GETPOST('origin', 'alpha');
|
||||||
$originid = GETPOST('originid', 'int');
|
$originid = GETPOST('originid', 'int');
|
||||||
|
|||||||
@ -66,7 +66,7 @@ if (! empty($conf->productbatch->enabled)) $langs->load("productbatch");
|
|||||||
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int'));
|
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int'));
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$lineid = GETPOST('lineid', 'int');
|
$lineid = GETPOST('lineid', 'int');
|
||||||
|
|||||||
@ -36,7 +36,7 @@ $langs->loadLangs(array('banks', 'companies', 'other'));
|
|||||||
|
|
||||||
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int'));
|
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('account', 'int'));
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
|
|
||||||
$mesg = '';
|
$mesg = '';
|
||||||
|
|||||||
@ -44,7 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("banks","categories","companies","bills","trips"));
|
$langs->loadLangs(array("banks","categories","companies","bills","trips"));
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$id=GETPOST('account','int');
|
$id=GETPOST('account','int');
|
||||||
$ref=GETPOST('ref','alpha');
|
$ref=GETPOST('ref','alpha');
|
||||||
$dvid=GETPOST('dvid','alpha');
|
$dvid=GETPOST('dvid','alpha');
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $langs->loadLangs(array("compta", "banks", "bills", "users", "accountancy"));
|
|||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'aZ09');
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='facture'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='facture'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='facture_rec'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='facture_rec'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='facturedet'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='facturedet'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='facturedet_rec'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='facturedet_rec'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -75,7 +75,7 @@ $projectid = (GETPOST('projectid','int') ? GETPOST('projectid', 'int') : 0);
|
|||||||
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
$id = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('facid', 'int')); // For backward compatibility
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$socid = GETPOST('socid', 'int');
|
$socid = GETPOST('socid', 'int');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$lineid = GETPOST('lineid', 'int');
|
$lineid = GETPOST('lineid', 'int');
|
||||||
|
|||||||
@ -50,7 +50,7 @@ $langs->loadLangs(array('compta', 'bills'));
|
|||||||
if (! empty($conf->commande->enabled))
|
if (! empty($conf->commande->enabled))
|
||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$bid=GETPOST('bid', 'int');
|
$bid=GETPOST('bid', 'int');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -38,7 +38,7 @@ $langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'compta'));
|
|||||||
|
|
||||||
$id =GETPOST('id','int');
|
$id =GETPOST('id','int');
|
||||||
$ref=GETPOST('ref', 'alpha');
|
$ref=GETPOST('ref', 'alpha');
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$confirm=GETPOST('confirm', 'alpha');
|
$confirm=GETPOST('confirm', 'alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
|||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|
||||||
$chid=GETPOST("id", 'int');
|
$chid=GETPOST("id", 'int');
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$amounts = array();
|
$amounts = array();
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
|
|||||||
@ -42,7 +42,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='contrat'; //Must be the $element of the class that manage extrafield
|
$elementtype='contrat'; //Must be the $element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='contratdet'; //Must be the $element of the class that manage extrafield
|
$elementtype='contratdet'; //Must be the $element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ $objectdesc=GETPOST('objectdesc', 'alpha');
|
|||||||
$htmlname=GETPOST('htmlname', 'aZ09');
|
$htmlname=GETPOST('htmlname', 'aZ09');
|
||||||
$sqlfilter=GETPOST('sqlfilter', 'alpha');
|
$sqlfilter=GETPOST('sqlfilter', 'alpha');
|
||||||
$outjson=(GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0);
|
$outjson=(GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0);
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$id=GETPOST('id', 'int');
|
$id=GETPOST('id', 'int');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -577,7 +577,11 @@ class Translate
|
|||||||
//$newstr=$this->getLabelFromKey($db,$reg[1],'c_ordersource','code','label');
|
//$newstr=$this->getLabelFromKey($db,$reg[1],'c_ordersource','code','label');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2) dol_syslog(__METHOD__." MAIN_FEATURES_LEVEL=DEVELOP: missing translation for key '".$newstr."' in ".$_SERVER["PHP_SELF"], LOG_DEBUG);
|
/* Disabled. There is too many cases where translation of $newstr is not defined is normal (like when output with setEventMessage an already translated string)
|
||||||
|
if (! empty($conf->global->MAIN_FEATURES_LEVEL) && $conf->global->MAIN_FEATURES_LEVEL >= 2)
|
||||||
|
{
|
||||||
|
dol_syslog(__METHOD__." MAIN_FEATURES_LEVEL=DEVELOP: missing translation for key '".$newstr."' in ".$_SERVER["PHP_SELF"], LOG_DEBUG);
|
||||||
|
}*/
|
||||||
|
|
||||||
return $newstr;
|
return $newstr;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1038,6 +1038,8 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='
|
|||||||
}
|
}
|
||||||
if ($level > $conf->global->SYSLOG_LEVEL) return;
|
if ($level > $conf->global->SYSLOG_LEVEL) return;
|
||||||
|
|
||||||
|
$message = preg_replace('/password=\'[^\']*\'/', 'password=\'hidden\'', $message); // protection to avoid to have value of password in log
|
||||||
|
|
||||||
// If adding log inside HTML page is required
|
// If adding log inside HTML page is required
|
||||||
if (! empty($_REQUEST['logtohtml']) && (! empty($conf->global->MAIN_ENABLE_LOG_TO_HTML) || ! empty($conf->global->MAIN_LOGTOHTML))) // MAIN_LOGTOHTML kept for backward compatibility
|
if (! empty($_REQUEST['logtohtml']) && (! empty($conf->global->MAIN_ENABLE_LOG_TO_HTML) || ! empty($conf->global->MAIN_LOGTOHTML))) // MAIN_LOGTOHTML kept for backward compatibility
|
||||||
{
|
{
|
||||||
@ -1045,7 +1047,7 @@ function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename='
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Remove this. MAIN_ENABLE_LOG_INLINE_HTML should be deprecated and use a log handler dedicated to HTML output
|
//TODO: Remove this. MAIN_ENABLE_LOG_INLINE_HTML should be deprecated and use a log handler dedicated to HTML output
|
||||||
// If enable html log tag enabled and url parameter log defined, we show output log on HTML comments
|
// If html log tag enabled and url parameter log defined, we show output log on HTML comments
|
||||||
if (! empty($conf->global->MAIN_ENABLE_LOG_INLINE_HTML) && ! empty($_GET["log"]))
|
if (! empty($conf->global->MAIN_ENABLE_LOG_INLINE_HTML) && ! empty($_GET["log"]))
|
||||||
{
|
{
|
||||||
print "\n\n<!-- Log start\n";
|
print "\n\n<!-- Log start\n";
|
||||||
|
|||||||
@ -35,7 +35,7 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$backtourl = GETPOST('backtourl', 'alpha');
|
$backtourl = GETPOST('backtourl', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$backtourl = GETPOST('backtourl', 'alpha');
|
$backtourl = GETPOST('backtourl', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$backtourl = GETPOST('backtourl', 'alpha');
|
$backtourl = GETPOST('backtourl', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ $langs->load('datapolicy@datapolicy');
|
|||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
$arrayofparameters=array(
|
$arrayofparameters=array(
|
||||||
|
|||||||
@ -29,7 +29,7 @@ $langs->loadLangs(array('admin', 'companies', 'members', 'datapolicy'));
|
|||||||
|
|
||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
$formadmin = new FormAdmin($db);
|
$formadmin = new FormAdmin($db);
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ dol_include_once('/datapolicy/class/datapolicy.class.php');
|
|||||||
$idc = GETPOST('c', 'int');
|
$idc = GETPOST('c', 'int');
|
||||||
$ids = GETPOST('s', 'int');
|
$ids = GETPOST('s', 'int');
|
||||||
$ida = GETPOST('a', 'int');
|
$ida = GETPOST('a', 'int');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$lang = GETPOST('l', 'alpha');
|
$lang = GETPOST('l', 'alpha');
|
||||||
$code = GETPOST('key', 'alpha');
|
$code = GETPOST('key', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='don'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='don'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -83,7 +83,7 @@ class EmailCollector extends CommonObject
|
|||||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector'),
|
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'visible'=>1, 'enabled'=>1, 'position'=>30, 'notnull'=>-1, 'searchall'=>1, 'help'=>'Example: My Email collector'),
|
||||||
'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1),
|
'description' => array('type'=>'text', 'label'=>'Description', 'visible'=>-1, 'enabled'=>1, 'position'=>60, 'notnull'=>-1),
|
||||||
'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>100, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'),
|
'host' => array('type'=>'varchar(255)', 'label'=>'EMailHost', 'visible'=>1, 'enabled'=>1, 'position'=>100, 'notnull'=>1, 'searchall'=>1, 'comment'=>"IMAP server", 'help'=>'Example: imap.gmail.com'),
|
||||||
'user' => array('type'=>'varchar(128)', 'label'=>'User', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myacount@gmail.com'),
|
'user' => array('type'=>'varchar(128)', 'label'=>'Login', 'visible'=>1, 'enabled'=>1, 'position'=>101, 'notnull'=>1, 'index'=>1, 'comment'=>"IMAP login", 'help'=>'Example: myacount@gmail.com'),
|
||||||
'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>1, 'comment'=>"IMAP password"),
|
'password' => array('type'=>'password', 'label'=>'Password', 'visible'=>-1, 'enabled'=>1, 'position'=>102, 'notnull'=>1, 'comment'=>"IMAP password"),
|
||||||
'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox'),
|
'source_directory' => array('type'=>'varchar(255)', 'label'=>'MailboxSourceDirectory', 'visible'=>-1, 'enabled'=>1, 'position'=>103, 'notnull'=>1, 'default' => 'Inbox'),
|
||||||
//'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105),
|
//'filter' => array('type'=>'text', 'label'=>'Filter', 'visible'=>1, 'enabled'=>1, 'position'=>105),
|
||||||
@ -124,7 +124,6 @@ class EmailCollector extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $label;
|
public $label;
|
||||||
|
|
||||||
public $amount;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int Status
|
* @var int Status
|
||||||
@ -151,13 +150,13 @@ class EmailCollector extends CommonObject
|
|||||||
public $user;
|
public $user;
|
||||||
public $password;
|
public $password;
|
||||||
public $source_directory;
|
public $source_directory;
|
||||||
public $filter;
|
|
||||||
public $actiontodo;
|
|
||||||
public $target_directory;
|
public $target_directory;
|
||||||
public $datelastresult;
|
public $datelastresult;
|
||||||
public $lastresult;
|
public $lastresult;
|
||||||
// END MODULEBUILDER PROPERTIES
|
// END MODULEBUILDER PROPERTIES
|
||||||
|
|
||||||
|
public $rules;
|
||||||
|
public $actions;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -613,6 +612,58 @@ class EmailCollector extends CommonObject
|
|||||||
$this->initAsSpecimenCommon();
|
$this->initAsSpecimenCommon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch rules
|
||||||
|
*
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
|
*/
|
||||||
|
public function fetch_rules()
|
||||||
|
{
|
||||||
|
$this->rules = array();
|
||||||
|
|
||||||
|
$sql='SELECT type, rulevalue FROM '.MAIN_DB_PREFIX.'emailcollector_emailcollectorfilter WHERE status = 1 AND fk_emailcollector = '.$this->id;
|
||||||
|
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$num=$this->db->num_rows($resql);
|
||||||
|
$i = 0;
|
||||||
|
while($i < $num)
|
||||||
|
{
|
||||||
|
$obj=$this->db->fetch_object($resql);
|
||||||
|
$this->rules[]=array('type'=>$obj->type, 'rulevalue'=>$obj->rulevalue);
|
||||||
|
}
|
||||||
|
$this->db->free($resql);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fetch actions
|
||||||
|
*
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
|
*/
|
||||||
|
public function fetch_actions()
|
||||||
|
{
|
||||||
|
$this->actions = array();
|
||||||
|
|
||||||
|
$sql='SELECT type, actionparam FROM '.MAIN_DB_PREFIX.'emailcollector_emailcollectoraction WHERE status = 1 AND fk_emailcollector = '.$this->id;
|
||||||
|
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$num=$this->db->num_rows($resql);
|
||||||
|
$i = 0;
|
||||||
|
while($i < $num)
|
||||||
|
{
|
||||||
|
$obj=$this->db->fetch_object($resql);
|
||||||
|
$this->rules[]=array('type'=>$obj->type, 'actionparam'=>$obj->actionparam);
|
||||||
|
}
|
||||||
|
$this->db->free($resql);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Action executed by scheduler
|
* Action executed by scheduler
|
||||||
@ -623,10 +674,12 @@ class EmailCollector extends CommonObject
|
|||||||
//public function doScheduledJob($param1, $param2, ...)
|
//public function doScheduledJob($param1, $param2, ...)
|
||||||
public function doCollect()
|
public function doCollect()
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
//$conf->global->SYSLOG_FILE = 'DOL_DATA_ROOT/dolibarr_mydedicatedlofile.log';
|
//$conf->global->SYSLOG_FILE = 'DOL_DATA_ROOT/dolibarr_mydedicatedlofile.log';
|
||||||
|
|
||||||
|
dol_syslog("EmailCollector::doCollect start", LOG_DEBUG);
|
||||||
|
|
||||||
$error = 0;
|
$error = 0;
|
||||||
$this->output = '';
|
$this->output = '';
|
||||||
$this->error='';
|
$this->error='';
|
||||||
@ -635,11 +688,127 @@ class EmailCollector extends CommonObject
|
|||||||
|
|
||||||
$now = dol_now();
|
$now = dol_now();
|
||||||
|
|
||||||
|
if (empty($this->host))
|
||||||
|
{
|
||||||
|
$this->error=$langs->trans('ErrorFieldRequired', 'EMailHost');
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (empty($this->user))
|
||||||
|
{
|
||||||
|
$this->error=$langs->trans('ErrorFieldRequired', 'Login');
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (empty($this->source_directory))
|
||||||
|
{
|
||||||
|
$this->error=$langs->trans('ErrorFieldRequired', 'MailboxSourceDirectory');
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (! function_exists('imap_open'))
|
||||||
|
{
|
||||||
|
$this->error='IMAP function not enabled on your PHP';
|
||||||
|
return -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->fetch_rules();
|
||||||
|
$this->fetch_actions();
|
||||||
|
|
||||||
|
$sourcedir = $this->source_directory;
|
||||||
|
$targetdir = ($this->target_directory ? $server.$this->target_directory : '');
|
||||||
|
|
||||||
|
// Connect to IMAP
|
||||||
|
$flags ='/service=imap'; // IMAP
|
||||||
|
$flags.='/ssl'; // '/tls'
|
||||||
|
$flags.='/novalidate-cert';
|
||||||
|
//$flags.='/readonly';
|
||||||
|
//$flags.='/debug';
|
||||||
|
|
||||||
|
$connectstring = '{'.$this->host.':993'.$flags.'}';
|
||||||
|
$connectstring.=imap_utf7_encode($sourcedir);
|
||||||
|
|
||||||
|
$connection = imap_open($connectstring, $this->user, $this->password);
|
||||||
|
if (! $connection)
|
||||||
|
{
|
||||||
|
$this->error = 'Failed to open IMAP connection '.$connectstring;
|
||||||
|
return -3;
|
||||||
|
}
|
||||||
|
|
||||||
|
//$search='ALL';
|
||||||
|
$search='UNDELETED';
|
||||||
|
foreach($this->rules as $key => $rulevalue)
|
||||||
|
{
|
||||||
|
if ($key == 'to') $search=($search?' ':'').'TO "'.str_replace('"', '', $rulevalue).'"';
|
||||||
|
if ($key == 'bcc') $search=($search?' ':'').'BCC';
|
||||||
|
if ($key == 'cc') $search=($search?' ':'').'CC';
|
||||||
|
if ($key == 'from') $search=($search?' ':'').'FROM "'.str_replace('"', '', $rulevalue).'"';
|
||||||
|
if ($key == 'subject') $search=($search?' ':'').'SUBJECT "'.str_replace('"', '', $rulevalue).'"';
|
||||||
|
if ($key == 'body') $search=($search?' ':'').'BODY "'.str_replace('"', '', $rulevalue).'"';
|
||||||
|
if ($key == 'seen') $search=($search?' ':'').'SEEN';
|
||||||
|
if ($key == 'unseen') $search=($search?' ':'').'UNSEEN';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($targetdir)) // Use last date as filter if there is no targetdir defined.
|
||||||
|
{
|
||||||
|
$fromdate=0;
|
||||||
|
if ($this->datelastresult) $fromdate = $this->datelastresult;
|
||||||
|
if ($fromdate > 0) $search.=($search?' ':'').'SINCE '.dol_print_date($fromdate - 1,'dayhourrfc');
|
||||||
|
}
|
||||||
|
dol_syslog("search string = ".$search);
|
||||||
|
|
||||||
|
$nbemailprocessed=0; $nbactiondone=0;
|
||||||
|
|
||||||
|
// Scan IMAP inbox
|
||||||
|
$arrayofemail= imap_search($connection, $search);
|
||||||
|
//var_dump($arrayofemail);
|
||||||
|
|
||||||
|
// Loop on each email found
|
||||||
|
if (! empty($arrayofemail) && count($arrayofemail) > 0)
|
||||||
|
{
|
||||||
|
foreach($arrayofemail as $imapemail)
|
||||||
|
{
|
||||||
|
$errorforactions = 0;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
// ...
|
// Record email
|
||||||
|
foreach($this->actions as $actionkey => $actionvalue)
|
||||||
|
{
|
||||||
|
if ($errorforactions) break;
|
||||||
|
|
||||||
|
// Make action
|
||||||
|
|
||||||
|
|
||||||
|
if (! $errorforactions)
|
||||||
|
{
|
||||||
|
$nbactiondone++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Move email
|
||||||
|
if (! $errorforactions && $targetdir)
|
||||||
|
{
|
||||||
|
//imap_mail_move($connection, $sourcedir, $targetdir);
|
||||||
|
}
|
||||||
|
|
||||||
|
$nbemailprocessed++;
|
||||||
|
|
||||||
$this->db->commit();
|
$this->db->commit();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->output=$langs->trans('XEmailsDoneYActionsDone', $nbemailprocessed, $nbactiondone);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$this->output=$langs->trans('NoNewEmailToProcess');
|
||||||
|
}
|
||||||
|
|
||||||
|
//imap_expunge($connection);
|
||||||
|
imap_close($connection);
|
||||||
|
|
||||||
|
$this->datelastresult = $now;
|
||||||
|
$this->lastresult = $this->output;
|
||||||
|
$this->update($user);
|
||||||
|
|
||||||
|
dol_syslog("EmailCollector::doCollect end", LOG_DEBUG);
|
||||||
|
|
||||||
return $error;
|
return $error;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -124,7 +124,7 @@ $entitytolang = array(
|
|||||||
$array_selected=isset($_SESSION["export_selected_fields"])?$_SESSION["export_selected_fields"]:array();
|
$array_selected=isset($_SESSION["export_selected_fields"])?$_SESSION["export_selected_fields"]:array();
|
||||||
$array_filtervalue=isset($_SESSION["export_filtered_fields"])?$_SESSION["export_filtered_fields"]:array();
|
$array_filtervalue=isset($_SESSION["export_filtered_fields"])?$_SESSION["export_filtered_fields"]:array();
|
||||||
$datatoexport=GETPOST("datatoexport");
|
$datatoexport=GETPOST("datatoexport");
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$confirm=GETPOST('confirm', 'alpha');
|
$confirm=GETPOST('confirm', 'alpha');
|
||||||
$step=GETPOST("step")?GETPOST("step"):1;
|
$step=GETPOST("step")?GETPOST("step"):1;
|
||||||
$export_name=GETPOST("export_name");
|
$export_name=GETPOST("export_name");
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='fichinter'; //Must be the $element of the class that manage extrafield
|
$elementtype='fichinter'; //Must be the $element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='fichinterdet'; //Must be the $element of the class that manage extrafield
|
$elementtype='fichinterdet'; //Must be the $element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ $langs->loadLangs(array("interventions","admin","compta","bills"));
|
|||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
$id=(GETPOST('fichinterid', 'int')?GETPOST('fichinterid', 'int'):GETPOST('id', 'int'));
|
$id=(GETPOST('fichinterid', 'int')?GETPOST('fichinterid', 'int'):GETPOST('id', 'int'));
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$objecttype = 'fichinter_rec';
|
$objecttype = 'fichinter_rec';
|
||||||
if ($action == "create" || $action == "add") $objecttype = '';
|
if ($action == "create" || $action == "add") $objecttype = '';
|
||||||
|
|||||||
@ -38,7 +38,7 @@ $langs->loadLangs(array("facture","orders","sendings","companies"));
|
|||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
// Security check
|
// Security check
|
||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
|
|||||||
@ -49,7 +49,7 @@ if (! $user->rights->fournisseur->facture->creer)
|
|||||||
|
|
||||||
$id = (GETPOST('id') ? GETPOST('id', 'int') : GETPOST("facid")); // For backward compatibility
|
$id = (GETPOST('id') ? GETPOST('id', 'int') : GETPOST("facid")); // For backward compatibility
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$sref = GETPOST('sref');
|
$sref = GETPOST('sref');
|
||||||
$sref_client = GETPOST('sref_client');
|
$sref_client = GETPOST('sref_client');
|
||||||
|
|||||||
@ -39,7 +39,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||||
|
|
||||||
// Get parameters
|
// Get parameters
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$id=GETPOST('id', 'int');
|
$id=GETPOST('id', 'int');
|
||||||
$ref=GETPOST('ref', 'alpha');
|
$ref=GETPOST('ref', 'alpha');
|
||||||
$fuserid = (GETPOST('fuserid','int')?GETPOST('fuserid','int'):$user->id);
|
$fuserid = (GETPOST('fuserid','int')?GETPOST('fuserid','int'):$user->id);
|
||||||
|
|||||||
@ -30,7 +30,7 @@ $langs->loadLangs(array('admin', 'hrm'));
|
|||||||
if (! $user->admin)
|
if (! $user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
|
|
||||||
// Other parameters HRM_*
|
// Other parameters HRM_*
|
||||||
$list = array (
|
$list = array (
|
||||||
|
|||||||
@ -1822,6 +1822,11 @@ MailboxTargetDirectory=Mailbox target directory
|
|||||||
CollectNow=Collect now
|
CollectNow=Collect now
|
||||||
DateLastResult=Date last collect
|
DateLastResult=Date last collect
|
||||||
LastResult=Last result
|
LastResult=Last result
|
||||||
|
EmailCollectorConfirmCollectTitle=Email collect confirmation
|
||||||
|
EmailCollectorConfirmCollect=Do you want to run the collect for this collector now ?
|
||||||
|
NoNewEmailToProcess=No new email to process
|
||||||
|
NothingProcessed=Nothing done
|
||||||
|
XEmailsDoneYActionsDone=%s emails analyzed, %s record/actions done by collector
|
||||||
##### Resource ####
|
##### Resource ####
|
||||||
ResourceSetup=Configuration du module Resource
|
ResourceSetup=Configuration du module Resource
|
||||||
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).
|
UseSearchToSelectResource=Use a search form to choose a resource (rather than a drop-down list).
|
||||||
|
|||||||
@ -50,7 +50,7 @@ $langs->loadLangs(array("sendings","bills",'deliveries','orders'));
|
|||||||
|
|
||||||
if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
|
if (!empty($conf->incoterm->enabled)) $langs->load('incoterm');
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$confirm=GETPOST('confirm', 'alpha');
|
$confirm=GETPOST('confirm', 'alpha');
|
||||||
$backtopage=GETPOST('backtopage','alpha');
|
$backtopage=GETPOST('backtopage','alpha');
|
||||||
|
|
||||||
|
|||||||
@ -29,7 +29,7 @@ $langs->loadLangs(array("admin", "other", "modulebuilder"));
|
|||||||
if (!$user->admin || empty($conf->modulebuilder->enabled))
|
if (!$user->admin || empty($conf->modulebuilder->enabled))
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@ -48,7 +48,7 @@ $langs->loadLangs(array("errors","admin","mymodule@mymodule"));
|
|||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -50,7 +50,7 @@ $langs->loadLangs(array("admin", "mymodule@mymodule"));
|
|||||||
if (! $user->admin) accessforbidden();
|
if (! $user->admin) accessforbidden();
|
||||||
|
|
||||||
// Parameters
|
// Parameters
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
$arrayofparameters=array(
|
$arrayofparameters=array(
|
||||||
|
|||||||
@ -44,7 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
|||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array("mymodule@mymodule"));
|
$langs->loadLangs(array("mymodule@mymodule"));
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
|
|
||||||
|
|
||||||
// Securite acces client
|
// Securite acces client
|
||||||
|
|||||||
@ -50,7 +50,7 @@ $langs->loadLangs(array("mymodule@mymodule","other"));
|
|||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'aZ09');
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -46,7 +46,7 @@ $langs->loadLangs(array("mymodule@mymodule","companies"));
|
|||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'aZ09');
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/product/dynamic_price/class/price_global_variab
|
|||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$save = GETPOST('save', 'alpha');
|
$save = GETPOST('save', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$selection = GETPOST('selection', 'int');
|
$selection = GETPOST('selection', 'int');
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='product'; //Must be the $element of the class that manage extrafield
|
$elementtype='product'; //Must be the $element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='product_lot'; //Must be the $element of the class that manage extrafield
|
$elementtype='product_lot'; //Must be the $element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -39,7 +39,7 @@ $mode = GETPOST('mode', 'int');
|
|||||||
$status = ((GETPOST('status', 'int') >= 0) ? GETPOST('status', 'int') : - 1);
|
$status = ((GETPOST('status', 'int') >= 0) ? GETPOST('status', 'int') : - 1);
|
||||||
$outjson = (GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0);
|
$outjson = (GETPOST('outjson', 'int') ? GETPOST('outjson', 'int') : 0);
|
||||||
$price_level = GETPOST('price_level', 'int');
|
$price_level = GETPOST('price_level', 'int');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$price_by_qty_rowid = GETPOST('pbq', 'int');
|
$price_by_qty_rowid = GETPOST('pbq', 'int');
|
||||||
$finished = GETPOST('finished', 'int');
|
$finished = GETPOST('finished', 'int');
|
||||||
|
|||||||
@ -33,7 +33,7 @@ $langs->loadLangs(array('products', 'accountancy')); //"Back" translation is on
|
|||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$eid = GETPOST('eid', 'int');
|
$eid = GETPOST('eid', 'int');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$title = GETPOST('expression_title', 'alpha');
|
$title = GETPOST('expression_title', 'alpha');
|
||||||
$expression = GETPOST('expression');
|
$expression = GETPOST('expression');
|
||||||
$tab = GETPOST('tab', 'alpha');
|
$tab = GETPOST('tab', 'alpha');
|
||||||
|
|||||||
@ -43,7 +43,7 @@ $langs->loadLangs(array('products', 'suppliers', 'bills', 'margins'));
|
|||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$rowid=GETPOST('rowid','int');
|
$rowid=GETPOST('rowid','int');
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$cancel=GETPOST('cancel', 'alpha');
|
$cancel=GETPOST('cancel', 'alpha');
|
||||||
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'pricesuppliercard';
|
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'pricesuppliercard';
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,7 @@ $langs->loadLangs(array("stocks","other"));
|
|||||||
// Get parameters
|
// Get parameters
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$confirm = GETPOST('confirm', 'alpha');
|
$confirm = GETPOST('confirm', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'aZ09');
|
$cancel = GETPOST('cancel', 'aZ09');
|
||||||
$backtopage = GETPOST('backtopage', 'alpha');
|
$backtopage = GETPOST('backtopage', 'alpha');
|
||||||
|
|||||||
@ -52,7 +52,7 @@ $mesg=''; $error=0; $errors=array();
|
|||||||
|
|
||||||
$id = GETPOST('id', 'int');
|
$id = GETPOST('id', 'int');
|
||||||
$ref = GETPOST('ref', 'alpha');
|
$ref = GETPOST('ref', 'alpha');
|
||||||
$action = GETPOST('action', 'aZ09');
|
$action = GETPOST('action', 'alpha');
|
||||||
$cancel = GETPOST('cancel', 'alpha');
|
$cancel = GETPOST('cancel', 'alpha');
|
||||||
$eid = GETPOST('eid', 'int');
|
$eid = GETPOST('eid', 'int');
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='projet'; //Must be the $table_element of the class that manage extrafield
|
$elementtype='projet'; //Must be the $table_element of the class that manage extrafield
|
||||||
|
|
||||||
|
|||||||
@ -41,7 +41,7 @@ $tmptype2label=ExtraFields::$type2label;
|
|||||||
$type2label=array('');
|
$type2label=array('');
|
||||||
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
foreach ($tmptype2label as $key => $val) $type2label[$key]=$langs->transnoentitiesnoconv($val);
|
||||||
|
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$attrname=GETPOST('attrname', 'alpha');
|
$attrname=GETPOST('attrname', 'alpha');
|
||||||
$elementtype='projet_task';
|
$elementtype='projet_task';
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,7 @@ require '../../main.inc.php';
|
|||||||
|
|
||||||
$htmlname=GETPOST('htmlname','alpha');
|
$htmlname=GETPOST('htmlname','alpha');
|
||||||
$socid=GETPOST('socid','int');
|
$socid=GETPOST('socid','int');
|
||||||
$action=GETPOST('action', 'aZ09');
|
$action=GETPOST('action', 'alpha');
|
||||||
$id=GETPOST('id', 'int');
|
$id=GETPOST('id', 'int');
|
||||||
$discard_closed =GETPOST('discardclosed','int');
|
$discard_closed =GETPOST('discardclosed','int');
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user