23 if (!defined(
'NOTOKENRENEWAL')) define(
'NOTOKENRENEWAL',
'1');
24 if (!defined(
'NOREQUIREMENU')) define(
'NOREQUIREMENU',
'1');
25 if (!defined(
'NOREQUIREHTML')) define(
'NOREQUIREHTML',
'1');
26 if (!defined(
'NOREQUIREAJAX')) define(
'NOREQUIREAJAX',
'1');
27 if (!defined(
'NOREQUIRESOC')) define(
'NOREQUIRESOC',
'1');
28 if (!defined(
'NOREQUIRETRAN')) define(
'NOREQUIRETRAN',
'1');
30 require
'../../main.inc.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/class/genericobject.class.php';
33 $action =
GETPOST(
'action',
'aZ09');
35 $value =
GETPOST(
'value',
'int');
36 $field =
GETPOST(
'field',
'alpha');
37 $element =
GETPOST(
'element',
'alpha');
42 if (!empty($user->socid)) {
43 $socid = $user->socid;
59 if (in_array($field, array(
'status'))) {
61 } elseif ($element ==
'product' && in_array($field, array(
'tosell',
'tobuy',
'tobatch'))) {
62 $result =
restrictedArea($user,
'produit|service', $id,
'product&product',
'',
'',
'rowid');
64 accessforbidden(
"Bad value for combination of parameters element/field.", 0, 0, 1);
69 if (($action ==
'set') && !empty($id)) {
70 $triggerkey = strtoupper($element).
'_UPDATE';
72 if ($triggerkey ==
'SOCIETE_UPDATE') {
73 $triggerkey =
'COMPANY_UPDATE';
76 $tablename = $element;
77 if ($tablename ==
'websitepage') $tablename =
'website_page';
81 $object->setValueFrom($field, $value, $tablename, $id, $format,
'', $user, $triggerkey);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
if(!defined('NOREQUIREMENU')) if(!function_exists("llxHeader")) top_httphead($contenttype= 'text/html', $forcenocache=0)
Show HTTP header.
restrictedArea($user, $features, $objectid=0, $tableandshare= '', $feature2= '', $dbt_keyfield= 'fk_soc', $dbt_select= 'rowid', $isdraft=0)
Check permissions of a user to show a page and an object.
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
print $_SERVER["PHP_SELF"]
Edit parameters.
print
Draft customers invoices.
Class of a generic business object.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $keepmoretags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...