Formulaire
Posté : 14 mars 2013, 13:26
Je n'arrive pas à connecter la BDD à la catégorie $sexe
Comment faire ?
Comment faire ?
<?php
$q = !empty( $acc->question ) ? $acc->question : 'DELETE';
$r = !empty( $acc->reponse ) ? $acc->reponse : 'DELETE?';
$sexe = !empty( $acc->sexe ) ? $acc->sexe : 'Sexe?';
$email = !empty( $acc->email ) ? $acc->email : 'Mettez votre e-mail';
$newl = tag( 'br' );
$champs = array(
array( 'pass', lang( 'acc.register.password' ) . $newl, NULL, $acc->pass ),
array( 'pseudo', $newl . lang( 'pseudo' ) . $newl, NULL, $acc->pseudo ),
array( 'email', $newl . lang( 'acc.register.mail' ) . $newl, NULL, $email ),
array( 'question', $newl . lang( 'acc.register.question' ) . $newl, NULL, $q ),
array( 'reponse', $newl . lang( 'acc.register.answer' ) . $newl, NULL, $r ),
array( 'sexe', $newl . lang ( 'sexe' ) . $newl, NULL, $sexe ),
array( 'guid', NULL, 'hidden', $acc->guid ),
);
if( level( LEVEL_ADMIN ) )
{
$champs = array_merge( $champs, array(
array( 'banned', $newl . lang( 'acc.register.banned' ) . $newl, 'checkbox', intval( $acc->banned ) ),
array( 'level', $newl . lang( 'level' ) . $newl, 'select', Member::getLevels(), $acc->level ),
) );
}
if( NEW_RECORD || level( LEVEL_ADMIN ) )
{
$champs = array_merge( array(
array( 'account', $newl . lang( 'account' ) . $newl, NULL, $acc->account ),
), $champs );
}
echo make_form( NEW_RECORD ? array_merge( array( array( 'tos', lang( 'acc.register.accept_tos' ), 'checkbox' ) ), $champs ) : $champs, APPEND_FORM_TAG );
if( level( LEVEL_ADMIN ) && $acc->Personnages->count() )
{
echo tag( 'h1', ucfirst( pluralize( lang( 'character'), $acc->Personnages->count() ) ) )
. tag( 'br' );
$persos = '';
foreach( $acc->Personnages as $perso )
{
$persos .= tag( 'td', tag( 'b', lang( 'name' ) . ': ' ) . $perso->name
. tag( 'br' ) . tag( 'b', lang( 'acc.ladder.class' ) . ': ' ) . IG::getClass( $perso->class )
. tag( 'br' ) . tag( 'b', lang( 'acc.ladder.sex' ) . ': ' ) . IG::getSexe( $perso->sexe ) );
}
}