1 <? $title ='Change Password'; include('elements/header.php'); ?>
2 <? $current_menu = 'password.php'; include('elements/menu.php'); ?>
5 $pwd_change_success = false;
6 if ( isset($_POST['svcnum']) ) {
8 $pwd_change_result = $freeside->myaccount_passwd(array(
9 'session_id' => $_COOKIE['session_id'],
10 'svcnum' => $_POST['svcnum'],
11 'new_password' => $_POST['new_password'],
12 'new_password2' => $_POST['new_password2'],
15 if ($pwd_change_result['error']) {
16 $error = $pwd_change_result['error'];
18 $pwd_change_success = true;
22 if ($pwd_change_success) {
25 <P>Password changed for <? echo $pwd_change_result['value'],' ',$pwd_change_result['label'] ?>.</P>
29 $pwd_change_svcs = $freeside->list_svcs(array(
30 'session_id' => $_COOKIE['session_id'],
31 'svcdb' => 'svc_acct',
33 if (isset($pwd_change_svcs['error'])) {
34 $error = $error || $pwd_change_svcs['error'];
36 if (!isset($pwd_change_svcs['svcs'])) {
37 $pwd_change_svcs['svcs'] = $pwd_change_svcs['svcs'];
38 $error = $error || 'Unknown error loading services';
41 include('elements/error.php');
46 <TABLE BGCOLOR="#cccccc">
48 <TH ALIGN="right">Change password for account: </TH>
50 <SELECT ID="new_password_svcnum" NAME="svcnum">
52 $selected_svcnum = isset($_POST['svcnum']) ? $_POST['svcnum'] : $pwd_change_svcs['svcnum'];
53 foreach ($pwd_change_svcs['svcs'] as $svc) {
55 <OPTION VALUE="<? echo $svc['svcnum'] ?>"<? echo $selected_svcnum == $svc['svcnum'] ? ' SELECTED' : '' ?>>
56 <? echo $svc['label'],': ',$svc['value'] ?>
66 <TH ALIGN="right">New password: </TH>
68 <INPUT ID="new_password" TYPE="password" NAME="new_password" SIZE="18">
69 <DIV ID="new_password_result"></DIV>
70 <? include('elements/add_password_validation.php'); ?>
71 <SCRIPT>add_password_validation('new_password');</SCRIPT>
76 <TH ALIGN="right">Re-enter new password: </TH>
77 <TD><INPUT TYPE="password" NAME="new_password2" SIZE="18"></TD>
83 <INPUT TYPE="submit" VALUE="Change password">
88 } // end if $pwd_change_show_form
91 <? include('elements/menu_footer.php'); ?>
92 <? include('elements/footer.php'); ?>