Exemplo n.º 1
0
    $sql = "UPDATE " . MAIN_DB_PREFIX . "societe SET fk_stcomm = " . $_GET["stcomm"];
    $sql .= " WHERE rowid = " . $_GET["socid"];
    $db->query($sql);
    $actioncomm = new ActionComm($db);
    $actioncomm->addAutoTask('AC_PROSPECT', $_GET["stcomm"] . " Statut de prospection : " . $obj->libelle, $_GET["socid"], '', '');
    if ($objp->fk_stcomm == 0 && $_GET["stcomm"] > 0) {
        $actioncomm = new ActionComm($db);
        $actioncomm->addAutoTask('AC_SUSP', "Statut de prospection : " . $obj->libelle, $_GET["socid"], '', '');
    }
    if (!empty($_GET["backtopage"])) {
        header("Location: " . $_GET["backtopage"]);
    }
}
// set prospect level
if ($_POST["action"] == 'setprospectlevel' && $user->rights->societe->creer) {
    $object->fetch($_GET["socid"]);
    $object->fk_prospectlevel = $_POST['prospect_level_id'];
    $sql = "UPDATE " . MAIN_DB_PREFIX . "societe SET fk_prospectlevel='" . $_POST['prospect_level_id'];
    $sql .= "' WHERE rowid='" . $_GET["socid"] . "'";
    $result = $db->query($sql);
    if (!$result) {
        dol_print_error($result);
    }
}
/*********************************************************************************
 *
 * Mode fiche
 *
 *********************************************************************************/
llxHeader();
$now = dol_now();