Escolar Documentos
Profissional Documentos
Cultura Documentos
<?php
if ( !empty( $_POST['nickname'] ) )
update_usermeta( $aluno_info->id, 'nickname',
esc_attr( $_POST['nickname'] ) );
if ( !empty( $_POST['email'] ) )
update_usermeta( $aluno_info->id, 'user_email',
esc_attr( $_POST['email'] ) );
?>
<p class="warning">
<?php _e('You must be logged in to edit your
profile.', 'frontendprofile'); ?>
</p><!-- .warning -->
<strong>Name</strong>
<p class="first_name">
<label for="first_name"><?php _e('First Name',
'frontendprofile'); ?></label>
<input class="text-input" name="first_name"
type="text" id="first_name" value="<?php the_author_meta( 'first_name',
$aluno_info->id ); ?>" />
</p><!-- .first_name -->
<p class="last_name">
<label for="last_name"><?php _e('Last Name',
'frontendprofile'); ?></label>
<input class="text-input" name="last_name"
type="text" id="last_name" value="<?php the_author_meta( 'last_name', $aluno_info-
>id ); ?>" />
</p><!-- .last_name -->
<p class="display_name">
<label for="display_name"><?php _e('Display Name',
'frontendprofile'); ?></label>
<select name="display_name" id="display_name">
<?php
$public_display = array();
$public_display['display_nickname'] =
$aluno_info->nickname;
$public_display['display_username'] =
$aluno_info->user_login;
if ( !empty($aluno_info->first_name) )
$public_display['display_firstname'] =
$aluno_info->first_name;
if ( !empty($aluno_info->last_name) )
$public_display['display_lastname'] =
$aluno_info->last_name;
if ( !empty($aluno_info->first_name) && !
empty($aluno_info->last_name) ) {
$public_display['display_firstlast'] =
$aluno_info->first_name . ' ' . $aluno_info->last_name;
$public_display['display_lastfirst'] =
$aluno_info->last_name . ' ' . $aluno_info->first_name;
}
if ( !in_array( $aluno_info->display_name,
$public_display ) )// Only add this if it isn't duplicated elsewhere
$public_display =
array( 'display_displayname' => $aluno_info->display_name ) + $public_display;
$public_display = array_map( 'trim',
$public_display );
foreach ( $public_display as $id => $item ) {
?>
<option id="<?php echo $id; ?>" value="<?php
echo esc_attr($item); ?>"<?php selected( $aluno_info->display_name, $item ); ?>><?
php echo $item; ?></option>
<?php
}
?>
</select>
</p><!-- .display_name -->
<p class="form-nucleo">N�cleo
<?php
$args = array('cat'=>$cat_nucleos,'author'=>$current_user-
>ID,'order'=>'ASC','posts_per_page' => -1);query_posts($args);
echo '<select name="new_nucleo" id="new_nucleo">';
echo '<option value="">Alterar N�cleo para�</option>';
if(have_posts()) : while (have_posts()) : the_post();
$nome_nucleo = get_the_title();
$id_nucleo = get_the_ID();
if($id_nucleo == $nucleo_aluno ) $selected = 'selected="slelected"';
else $selected = '';
echo '<option value="' . $nome_nucleo . '" ' . $selected . '>' . $nome_nucleo .
'</option>';
endwhile; endif;
echo '</select>';
?>
</p><!-- .form-nucleo -->
<p class="form-curso">Curso
<?php
$args = array('cat'=>$cat_cursos,'author'=>$current_user-
>ID,'order'=>'ASC','posts_per_page' => -1);query_posts($args);
echo '<select name="new_curso" id="new_curso">';
echo '<option value="">Alterar Curso para�</option>';
if(have_posts()) : while (have_posts()) : the_post();
$nome_curso = get_the_title();
$id_curso = get_the_ID();
if($id_curso == $curso_aluno ) $selected = 'selected="slelected"';
else $selected = '';
echo '<option value="' . $nome_curso . '" ' . $selected . '>' . $nome_curso .
'</option>';
endwhile; endif;
echo '</select>';
?>
</p><!-- .form-curso -->
<p class="form-turma">Turma
<?php
$args = array('cat'=>$cat_turmas,'author'=>$current_user-
>ID,'order'=>'ASC','posts_per_page' => -1);query_posts($args);
echo '<select name="new_turma" id="new_turma">';
echo '<option value="">Alterar Turma para�</option>';
if(have_posts()) : while (have_posts()) : the_post();
$nome_turma = get_the_title();
$id_turma = get_the_ID();
if($id_turma == $turma_aluno ) $selected = 'selected="slelected"';
else $selected = '';
echo '<option value="' . $nome_turma . '" ' . $selected . '>' . $nome_turma .
'</option>';
endwhile; endif;
echo '</select>';
?>
</p><!-- .form-turma -->
<strong>Contact Info</strong>
<p class="form-email">
<label for="email"><?php _e('E-mail (required)',
'frontendprofile'); ?></label>
<input class="text-input" name="email" type="text"
id="email" value="<?php the_author_meta( 'user_email', $aluno_info->id ); ?>" />
</p><!-- .form-email -->
<p class="form-website">
<label for="website"><?php _e('Website',
'frontendprofile'); ?></label>
<input class="text-input" name="website" type="text"
id="website" value="<?php the_author_meta( 'user_url', $aluno_info->id ); ?>" />
</p><!-- .form-website -->
<p class="form-aim">
<label for="aim"><?php _e('AIM',
'frontendprofile'); ?></label>
<input class="text-input" name="aim" type="text"
id="aim" value="<?php the_author_meta( 'aim', $aluno_info->id ); ?>" />
</p><!-- .form-aim -->
<p class="form-yim">
<label for="yim"><?php _e('Yahoo IM',
'frontendprofile'); ?></label>
<input class="text-input" name="yim" type="text"
id="yim" value="<?php the_author_meta( 'yim', $aluno_info->id ); ?>" />
</p><!-- .form-yim -->
<p class="form-jabber">
<label for="jabber"><?php _e('Jabber / Google Talk',
'frontendprofile'); ?></label>
<input class="text-input" name="jabber" type="text"
id="jabber" value="<?php the_author_meta( 'jabber', $aluno_info->id ); ?>" />
</p><!-- .form-jabber -->
<strong>About Yourself</strong>
<p class="form-description">
<label for="description"><?php _e('Biographical
Info', 'frontendprofile'); ?></label>
<textarea class="text-input" name="description"
id="description" rows="5" cols="30"><?php echo the_author_meta( 'description',
$aluno_info->id ); ?></textarea>
</p><!-- .form-description -->
<p class="form-password">
<label for="pass1"><?php _e('New Password',
'frontendprofile'); ?> </label>
<input class="text-input" name="pass1"
type="password" id="pass1" />
</p><!-- .form-password -->
<p class="form-password">
<label for="pass2"><?php _e('Repeat Password',
'frontendprofile'); ?></label>
<input class="text-input" name="pass2"
type="password" id="pass2" />
</p><!-- .form-password -->
<p class="form-twitter">
<label for="twitter"><?php _e('Twitter',
'frontendprofile'); ?></label>
<input class="text-input" name="twitter" type="text"
id="twitter" value="<?php the_author_meta( 'twitter', $aluno_info->id ); ?>" />
</p><!-- .form-twitter -->
<p class="form-birth">
<label for="birth"><?php _e('Year of birth',
'frontendprofile'); ?></label>
<?php
for($i=1900; $i<=2000; $i++)
$years[]=$i;
<p class="form-hobbies">
<label for="hobbies"><?php _e('What are your
hobbies?', 'frontendprofile'); ?></label>
<?php
$hobbies = get_the_author_meta( 'hobbies',
$aluno_info->id );
?>
<ul class="hobbies-type-list">
<li><input value="videogames"
name="hobbies[]" <?php if (is_array($hobbies)) { if (in_array("videogames",
$hobbies)) { ?>checked="checked"<?php } }?> type="checkbox" /> <?php _e('Video
Games', 'frontendprofile'); ?></li>
<li><input value="sabotagingcapitalism"
name="hobbies[]" <?php if (is_array($hobbies)) { if
(in_array("sabotagingcapitalism", $hobbies)) { ?>checked="checked"<?php } }?>
type="checkbox" /> <?php _e('Sabotaging Capitalism', 'frontendprofile'); ?></li>
<li><input value="watchingtv"
name="hobbies[]" <?php if (is_array($hobbies)) { if (in_array("watchingtv",
$hobbies)) { ?>checked="checked"<?php } }?> type="checkbox" /> <?php _e('Watching
TV', 'frontendprofile'); ?></li>
</ul>
</p><!-- .form-hobbies -->
<p class="form-situacao">
<label for="situacao"><?php _e('Situa��o financeira',
'frontendprofile'); ?></label>
<?php $situacao = get_the_author_meta( 'situacao',
$aluno_info->ID ); ?>
<ul>
<li><input value="ag" name="situacao" <?php if
($situacao == 'ag' ) { ?>checked="checked"<?php }?> type="radio" /> <?php
_e('Aguardando', 'frontendprofile'); ?></li>
<li><input value="ed" name="situacao" <?php if
($situacao == 'ed' ) { ?>checked="checked"<?php }?> type="radio" /> <?php _e('Em
dia', 'frontendprofile'); ?></li>
<li><input value="qt" name="situacao" <?php if
($situacao == 'qt' ) { ?>checked="checked"<?php }?> type="radio" /> <?php
_e('Quitado', 'frontendprofile'); ?></li>
<li><input value="at" name="situacao" <?php if
($situacao == 'at' ) { ?>checked="checked"<?php }?> type="radio" /> <?php
_e('Atrasado', 'frontendprofile'); ?></li>
</ul>
</p><!-- .form-situacao -->
<p class="form-submit">
<?php echo $referer; ?>
<input name="updateuser" type="submit"
id="updateuser" class="submit button" value="<?php _e('Update', 'frontendprofile');
?>" />
<?php wp_nonce_field( 'update-user' ) ?>
<input name="action" type="hidden" id="action"
value="update-user" />
</p><!-- .form-submit -->
</form><!-- #edituser -->