26if (!defined(
'NOTOKENRENEWAL')) {
27 define(
'NOTOKENRENEWAL', 1);
29if (!defined(
'NOREQUIREMENU')) {
30 define(
'NOREQUIREMENU',
'1');
32if (!defined(
'NOREQUIREHTML')) {
33 define(
'NOREQUIREHTML',
'1');
35if (!defined(
'NOREQUIREAJAX')) {
36 define(
'NOREQUIREAJAX',
'1');
38if (!defined(
'NOREQUIRESOC')) {
39 define(
'NOREQUIRESOC',
'1');
43require
'../../main.inc.php';
44require_once DOL_DOCUMENT_ROOT.
'/societe/class/client.class.php';
48$action =
GETPOST(
'action',
'aZ09');
50$prospectstatic =
new Client($db);
54if ($user->socid > 0) {
55 if ($idprospect != $user->socid) {
61$result =
restrictedArea($user,
'societe', $idprospect,
'&societe');
63$permisstiontoupdate = $user->hasRight(
'societe',
'creer');
73if ($action ===
"updatestatusprospect" && $permisstiontoupdate) {
74 $prospectstatic->client = 2;
75 $prospectstatic->loadCacheOfProspStatus();
79 $sql =
"UPDATE ".MAIN_DB_PREFIX.
"societe SET ";
80 $sql .=
"fk_stcomm=".(int) $db->escape($idstatus);
81 $sql .=
" WHERE rowid = ".(int) $db->escape($idprospect);
83 $resql = $db->query($sql);
88 $num = $db->affected_rows($resql);
89 $response =
img_action(
'', $prospectstatic->cacheprospectstatus[$idstatus][
'code'], $prospectstatic->cacheprospectstatus[$idstatus][
'picto'],
'class="inline-block valignmiddle paddingright pictoprospectstatus"');
92 echo json_encode(array(
'img' => $response));
Class to manage customers or prospects.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
img_action($titlealt, $numaction, $picto='', $moreatt='')
Show logo action.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
if(!defined( 'NOREQUIREMENU')) if(!empty(GETPOST('seteventmessages', 'alpha'))) if(!function_exists("llxHeader")) top_httphead($contenttype='text/html', $forcenocache=0)
Show HTTP header.
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=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.