Beispiel #1
0
                        $stmt->execute(array('id' => $i, 'val' => $values[$i]));
                    }
                    $zdb->connection->commit();
                } catch (Exception $e) {
                    $zdb->connection->rollBack();
                    Analog::log('Unable to store field ' . $field_id . ' values (' . $e->getMessage() . ')', Analog::ERROR);
                }
            }
        }
    }
    if (count($error_detected) == 0) {
        header('location: configurer_fiches.php?form=' . $form_name);
        die;
    }
} elseif (isset($_POST['cancel'])) {
    header('location: configurer_fiches.php?form=' . $form_name);
    die;
}
//We load values here, making sure all changes are stored in database
$df->load();
$tpl->assign('page_title', _T("Edit field"));
$tpl->assign('form_name', $form_name);
$tpl->assign('df', $df);
$tpl->assign('error_detected', $error_detected);
$tpl->assign('perm_all', DynamicFields::PERM_ALL);
$tpl->assign('perm_staff', DynamicFields::PERM_STAFF);
$tpl->assign('perm_admin', DynamicFields::PERM_ADM);
$tpl->assign('perm_names', $dyn_fields->getPermsNames());
$content = $tpl->fetch('editer_champ.tpl');
$tpl->assign('content', $content);
$tpl->display('page.tpl');