Exemple #1
0
<?php

# Copyright 2005 Nicolas Marchildon
#
# This file is part of Famesy.
#
# Famesy is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Famesy is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Famesy; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
require_once $abs_path . "../functions.php";
require_once $abs_path . "../../functions.php";
require_once $abs_path . "../../config.php";
$errors = handler_adhesion();
include "../../header.php";
individu_form($_REQUEST, $errors);
include "../../footer.php";
Exemple #2
0
require_once "../../config.php";
handler_modifier();
include "../../header.php";
$m = $_REQUEST['m'];
$member = get_member($m);
?>
<h2>Modifier</h2><?php 
if (!$m) {
    ?>
<div class="error">Paramètre manquant: numéro de membre</div><?php 
}
// Seule une organisation a un 'name'
if ($member['name']) {
    organization_form($member, false, true);
} else {
    individu_form($member, false, true);
}
include "../../footer.php";
function show_error($msg)
{
    ?>
<div class="error"><?php 
    echo $msg;
    ?>
</div><?php 
}
function handler_modifier()
{
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        $vars = array("m", "email", "city", "province", "fingerprint", "phone", "address", "postal_code", "organization_id", "organization_name", "member_type", "first_name", "last_name", "membership_type_id");
        foreach ($vars as $v) {