Esempio n. 1
0
function formulaireEnregistrement()
{
    startSession();
    if ($_SESSION["connu"] === true) {
        printSession();
        echo "Vous &ecirc;tes d&eacute;j&agrave; connect&eacute;(e).</br>\n";
    } else {
        if (!isset($_POST["submit_register"])) {
            // Afficher le formulaire d'enregistrement
            echo '<div id="form">' . "\n";
            print_register_form();
            echo "</div>";
        } else {
            $err = fullCheck($_POST);
            if ($err != "") {
                echo " COUCOU LES AMIS";
                echo '<div id="form">' . "\n";
                print_register_form();
                echo $err;
                echo "</div>";
            } else {
                addRowToUserTable($_POST);
                login($_POST["mail"], $_POST["mdp"]);
                printSession();
            }
        }
    }
}
Esempio n. 2
0
 /**
  * Wrapper function to call template 'print_register_form' function
  * @param boolean $edit whether this is an edit or a new register
  * @param array $data values to auto fill
  * @param string $msg error message to print out
  * @param string $id member id to edit
  */
 function print_register_form($edit, $data, $msg = '', $id = '')
 {
     print_register_form($edit, $data, $msg, $id);
     // Function in auth.template.php
 }