예제 #1
0

$trip = new Deplacement($db);


/******************************************************************************/
/*                     Actions                                                */
/******************************************************************************/

if ($_POST["action"] == 'update_public' && $user->rights->deplacement->creer)
{
	$db->begin();

	$trip->fetch($_GET["id"]);

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

if ($_POST["action"] == 'update' && $user->rights->deplacement->creer)
{
	$db->begin();