Ejemplo n.º 1
0
/*
 * Cr�ation d'un local
 *
 */
if ($action == 'create') {
    llxheader('', $langs->trans("addpropertie"), '');
    $nbligne = 0;
    print '<form action="fiche_local.php" method="post">';
    print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
    print '<input type="hidden" name="action" value="add">';
    print '<table class="border" width="100%">';
    print '<tr><td width="20%">' . $langs->trans("NomLocal") . '</td>';
    print '<td><input name="nom" size="30" value="' . $local->nom . '"</td>';
    print '<td width="20%">' . $langs->trans("Immeuble") . '</td>';
    print '<td>';
    print $htmlimmo->select_immeuble($local->immeuble_id, 'immeuble_id');
    print '</td></tr>';
    print '<tr><td width="20%">' . $langs->trans("Adresse") . '</td>';
    print '<td><input name="adresse" size="30" value="' . $local->adresse . '"</td></tr>';
    print '<tr><td width="20%">' . $langs->trans("superficie") . '</td>';
    print '<td><input name="superficie" size="10" value="' . $local->superficie . '"</td></tr>';
    print '<tr><td width="20%">' . $langs->trans("type") . '</td>';
    print '<td><input name="type" size="10" value="' . $local->type . '"</td></tr>';
    print '<tr><td width="20%">' . $langs->trans("Commentaire") . '</td>';
    print '<td><input name="commentaire" size="10" value="' . $local->commentaire . '"</td></tr>';
    print '<tr><td>&nbsp;</td><td><input type="submit" class="button" value="' . $langs->trans("Sauvegarder") . '"><input type="cancel" class="button" value="' . $langs->trans("Cancel") . '"></td></tr>';
    print '</table>';
    print '</form>';
} elseif ($action == 'update') {
    llxheader('', $langs->trans("changepropertie"), '');
    $nbligne = 0;