425 { |
439 { |
426 frm.submit.disabled = true; |
440 frm.submit.disabled = true; |
427 len = ( typeof cryptkey == 'string' || typeof cryptkey == 'object' ) ? '\nLen: '+cryptkey.length : ''; |
441 len = ( typeof cryptkey == 'string' || typeof cryptkey == 'object' ) ? '\nLen: '+cryptkey.length : ''; |
428 alert('The key is messed up\nType: '+typeof(cryptkey)+len); |
442 alert('The key is messed up\nType: '+typeof(cryptkey)+len); |
429 } |
443 } |
430 } |
|
431 pass1 = frm.newpass.value; |
|
432 pass2 = frm.newpass_conf.value; |
|
433 if ( pass1 != pass2 ) |
|
434 { |
|
435 alert('The passwords you entered do not match.'); |
|
436 return false; |
|
437 } |
|
438 if ( pass1.length < 6 && pass1.length > 0 ) |
|
439 { |
|
440 alert('The new password must be 6 characters or greater in length.'); |
|
441 return false; |
|
442 } |
|
443 if(aes_testpassed) |
|
444 { |
|
445 pass = frm.newpass.value; |
444 pass = frm.newpass.value; |
446 pass = stringToByteArray(pass); |
445 pass = stringToByteArray(pass); |
447 cryptstring = rijndaelEncrypt(pass, cryptkey, 'ECB'); |
446 cryptstring = rijndaelEncrypt(pass, cryptkey, 'ECB'); |
448 if(!cryptstring) |
447 if(!cryptstring) |
449 { |
448 { |
546 WHERE user_id=$session->user_id;"); |
545 WHERE user_id=$session->user_id;"); |
547 |
546 |
548 if ( !$q ) |
547 if ( !$q ) |
549 $db->_die(); |
548 $db->_die(); |
550 |
549 |
551 echo '<div class="info-box" style="margin: 0 0 10px 0;">Your profile has been updated.</div>'; |
550 echo '<div class="info-box" style="margin: 0 0 10px 0;">' . $lang->get('usercp_publicinfo_msg_save_success') . '</div>'; |
552 } |
551 } |
553 echo '<form action="'.makeUrl($paths->fullpage).'" method="post">'; |
552 echo '<form action="'.makeUrl($paths->fullpage).'" method="post">'; |
554 ?> |
553 ?> |
555 <div class="tblholder"> |
554 <div class="tblholder"> |
556 <table border="0" cellspacing="1" cellpadding="4"> |
555 <table border="0" cellspacing="1" cellpadding="4"> |
557 <tr> |
556 <tr> |
558 <th colspan="2">Your public profile</th> |
557 <th colspan="2"><?php echo $lang->get('usercp_publicinfo_heading_main'); ?></th> |
559 </tr> |
558 </tr> |
560 <tr> |
559 <tr> |
561 <td colspan="2" class="row3">Please note that all of the information you enter here will be <b>publicly viewable.</b> All of the fields on this page are optional and may be left blank if you so desire.</td> |
560 <td colspan="2" class="row3"><?php echo $lang->get('usercp_publicinfo_note_optional'); ?></td> |
562 </tr> |
561 </tr> |
563 <tr> |
562 <tr> |
564 <td class="row2" style="width: 50%;">Real name:</td> |
563 <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_realname'); ?></td> |
565 <td class="row1" style="width: 50%;"><input type="text" name="real_name" value="<?php echo $session->real_name; ?>" size="30" /></td> |
564 <td class="row1" style="width: 50%;"><input type="text" name="real_name" value="<?php echo $session->real_name; ?>" size="30" /></td> |
566 </tr> |
565 </tr> |
567 <tr> |
566 <tr> |
568 <td class="row2">Change theme:</td> |
567 <td class="row2"><?php echo $lang->get('usercp_publicinfo_field_changetheme_title'); ?></td> |
569 <td class="row1">If you don't like the look of the site, need a visual break, or are just curious, we might have some different themes for you to try out! <a href="<?php echo makeUrlNS('Special', 'ChangeStyle/' . $paths->page); ?>" onclick="ajaxChangeStyle(); return false;">Change my theme...</a></td> |
568 <td class="row1"><?php echo $lang->get('usercp_publicinfo_field_changetheme_hint'); ?> <a href="<?php echo makeUrlNS('Special', 'ChangeStyle/' . $paths->page); ?>" onclick="ajaxChangeStyle(); return false;"><?php echo $lang->get('usercp_publicinfo_field_changetheme'); ?></a></td> |
570 </tr> |
569 </tr> |
571 <tr> |
570 <tr> |
572 <th class="subhead" colspan="2"> |
571 <th class="subhead" colspan="2"> |
573 Instant messenger contact information |
572 <?php echo $lang->get('usercp_publicinfo_th_im'); ?> |
574 </th> |
573 </th> |
575 <tr> |
574 <tr> |
576 <td class="row2" style="width: 50%;">AIM handle:</td> |
575 <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_aim'); ?></td> |
577 <td class="row1" style="width: 50%;"><input type="text" name="imaddr_aim" value="<?php echo $session->user_extra['user_aim']; ?>" size="30" /></td> |
576 <td class="row1" style="width: 50%;"><input type="text" name="imaddr_aim" value="<?php echo $session->user_extra['user_aim']; ?>" size="30" /></td> |
578 </tr> |
577 </tr> |
579 <tr> |
578 <tr> |
580 <td class="row2" style="width: 50%;"><acronym title="Windows™ Live Messenger">WLM</acronym> handle:<br /><small>If you don't specify the domain (@whatever.com), "@hotmail.com" will be assumed.</small></td> |
579 <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_wlm'); ?></td> |
581 <td class="row1" style="width: 50%;"><input type="text" name="imaddr_msn" value="<?php echo $session->user_extra['user_msn']; ?>" size="30" /></td> |
580 <td class="row1" style="width: 50%;"><input type="text" name="imaddr_msn" value="<?php echo $session->user_extra['user_msn']; ?>" size="30" /></td> |
582 </tr> |
581 </tr> |
583 <tr> |
582 <tr> |
584 <td class="row2" style="width: 50%;">Yahoo! IM handle:</td> |
583 <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_yim'); ?></td> |
585 <td class="row1" style="width: 50%;"><input type="text" name="imaddr_yahoo" value="<?php echo $session->user_extra['user_yahoo']; ?>" size="30" /></td> |
584 <td class="row1" style="width: 50%;"><input type="text" name="imaddr_yahoo" value="<?php echo $session->user_extra['user_yahoo']; ?>" size="30" /></td> |
586 </tr> |
585 </tr> |
587 <tr> |
586 <tr> |
588 <td class="row2" style="width: 50%;">Jabber/XMPP handle:</td> |
587 <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_xmpp'); ?></td> |
589 <td class="row1" style="width: 50%;"><input type="text" name="imaddr_xmpp" value="<?php echo $session->user_extra['user_xmpp']; ?>" size="30" /></td> |
588 <td class="row1" style="width: 50%;"><input type="text" name="imaddr_xmpp" value="<?php echo $session->user_extra['user_xmpp']; ?>" size="30" /></td> |
590 </tr> |
589 </tr> |
591 <tr> |
590 <tr> |
592 <th class="subhead" colspan="2"> |
591 <th class="subhead" colspan="2"> |
593 Extra contact information |
592 <?php echo $lang->get('usercp_publicinfo_th_contact'); ?> |
594 </th> |
593 </th> |
595 </tr> |
594 </tr> |
596 <tr> |
595 <tr> |
597 <td class="row2" style="width: 50%;">Your homepage:<br /><small>Please remember the http:// prefix.</small></td> |
596 <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_homepage'); ?></td> |
598 <td class="row1" style="width: 50%;"><input type="text" name="homepage" value="<?php echo $session->user_extra['user_homepage']; ?>" size="30" /></td> |
597 <td class="row1" style="width: 50%;"><input type="text" name="homepage" value="<?php echo $session->user_extra['user_homepage']; ?>" size="30" /></td> |
599 </tr> |
598 </tr> |
600 <tr> |
599 <tr> |
601 <td class="row2" style="width: 50%;">Your location:</td> |
600 <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_location'); ?></td> |
602 <td class="row1" style="width: 50%;"><input type="text" name="location" value="<?php echo $session->user_extra['user_location']; ?>" size="30" /></td> |
601 <td class="row1" style="width: 50%;"><input type="text" name="location" value="<?php echo $session->user_extra['user_location']; ?>" size="30" /></td> |
603 </tr> |
602 </tr> |
604 <tr> |
603 <tr> |
605 <td class="row2" style="width: 50%;">Your job:</td> |
604 <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_job'); ?></td> |
606 <td class="row1" style="width: 50%;"><input type="text" name="occupation" value="<?php echo $session->user_extra['user_job']; ?>" size="30" /></td> |
605 <td class="row1" style="width: 50%;"><input type="text" name="occupation" value="<?php echo $session->user_extra['user_job']; ?>" size="30" /></td> |
607 </tr> |
606 </tr> |
608 <tr> |
607 <tr> |
609 <td class="row2" style="width: 50%;">Your hobbies:</td> |
608 <td class="row2" style="width: 50%;"><?php echo $lang->get('usercp_publicinfo_field_hobbies'); ?></td> |
610 <td class="row1" style="width: 50%;"><input type="text" name="hobbies" value="<?php echo $session->user_extra['user_hobbies']; ?>" size="30" /></td> |
609 <td class="row1" style="width: 50%;"><input type="text" name="hobbies" value="<?php echo $session->user_extra['user_hobbies']; ?>" size="30" /></td> |
611 </tr> |
610 </tr> |
612 <tr> |
611 <tr> |
613 <td class="row2" style="width: 50%;"><label for="chk_email_public">E-mail address is public</label><br /><small>If this is checked, your e-mail address will be displayed on your user page. To protect your address from spambots, your e-mail address will be encrypted.</small></td> |
612 <td class="row2" style="width: 50%;"><label for="chk_email_public"><?php echo $lang->get('usercp_publicinfo_field_email_public'); ?></label><br /><small><?php echo $lang->get('usercp_publicinfo_field_email_public_hint'); ?></small></td> |
614 <td class="row1" style="width: 50%;"><input type="checkbox" id="chk_email_public" name="email_public" <?php if ($session->user_extra['email_public'] == 1) echo 'checked="checked"'; ?> size="30" /></td> |
613 <td class="row1" style="width: 50%;"><input type="checkbox" id="chk_email_public" name="email_public" <?php if ($session->user_extra['email_public'] == 1) echo 'checked="checked"'; ?> size="30" /></td> |
615 </tr> |
614 </tr> |
616 <tr> |
615 <tr> |
617 <th class="subhead" colspan="2"> |
616 <th class="subhead" colspan="2"> |
618 <input type="submit" name="submit" value="Save profile" /> |
617 <input type="submit" name="submit" value="<?php echo $lang->get('usercp_publicinfo_btn_save'); ?>" /> |
619 </th> |
618 </th> |
620 </tr> |
619 </tr> |
621 </table> |
620 </table> |
622 </div> |
621 </div> |
623 <?php |
622 <?php |