コード例 #1
0
ファイル: note.php プロジェクト: remyyounes/dolibarr
		$db->rollback();
	}
	else
	{
		$db->commit();
	}
}

if ($_POST['action'] == 'update' && $user->rights->propale->creer)
{
	$propal = new Propal($db);
	$propal->fetch($_GET["id"]);

	$db->begin();

	$res=$propal->update_note($_POST["note"],$user);
	if ($res < 0)
	{
		$mesg='<div class="error">'.$propal->error.'</div>';
		$db->rollback();
	}
	else
	{
		$db->commit();
	}
}



/******************************************************************************/
/* Affichage fiche                                                            */
コード例 #2
0
ファイル: note.php プロジェクト: nrjacker4/crm-php
}
$result = restrictedArea($user, 'propale', $id, 'propal');
$object = new Propal($db);
/******************************************************************************/
/*                     Actions                                                */
/******************************************************************************/
if ($action == 'setnote_public' && $user->rights->propale->creer) {
    $object->fetch($id);
    $result = $object->update_note_public(dol_html_entity_decode(GETPOST('note_public'), ENT_QUOTES));
    if ($result < 0) {
        dol_print_error($db, $object->error);
    }
} else {
    if ($action == 'setnote' && $user->rights->propale->creer) {
        $object->fetch($id);
        $result = $object->update_note(dol_html_entity_decode(GETPOST('note'), ENT_QUOTES));
        if ($result < 0) {
            dol_print_error($db, $object->error);
        }
    }
}
/******************************************************************************/
/* Affichage fiche                                                            */
/******************************************************************************/
llxHeader();
$form = new Form($db);
if ($id > 0 || !empty($ref)) {
    if ($mesg) {
        print $mesg;
    }
    $now = dol_now();