diff --git a/header-list-accounts.php b/header-list-accounts.php new file mode 100644 index 0000000..b21affc --- /dev/null +++ b/header-list-accounts.php @@ -0,0 +1,13 @@ +prepare("SELECT accid, accemail FROM gwaccounts WHERE userid = ?"); + $als->bind_param("i", $_SESSION['userid']); + $als->execute(); + $alsres = $als->get_result(); + while ($alsrow = $alsres->fetch_assoc()) { + echo ''; + } + $als->close(); +} +?> \ No newline at end of file diff --git a/header.php b/header.php index d3ed9f1..4854ae8 100644 --- a/header.php +++ b/header.php @@ -26,6 +26,10 @@ if (!$userid){ echo 'GWST'; } echo '
'; + if (!empty($_POST['prefaccid'])) { + //this section contains code to set the users preferred game account + include_once ('includes/set-prefacc.php'); + } if (!empty($_POST['prefcharid'])) { //this section contains code to the users preferred character include_once ('includes/set-prefchar.php'); @@ -35,10 +39,15 @@ if (!$userid){ if ($_SESSION['admin'] == 1){ echo'(Administration) '; } - echo '(Logout ' . $_SESSION['username'] . ') ('; + echo ''; + echo ''; + include_once ('header-list-accounts.php'); + echo ') '; + echo '()

'; + echo ') (Logout ' . $_SESSION['username'] . ')

'; } ?> \ No newline at end of file diff --git a/preferences.php b/preferences.php index 4df06c5..b99bc25 100644 --- a/preferences.php +++ b/preferences.php @@ -2,83 +2,75 @@ $pagetitle = "Account options"; include_once ('header.php'); if (isset($_SESSION['userid'])){ - -if (!empty($_POST['useremail'])) { - //this section contains code to update the users e-mail address - include_once ('includes/update-email.php'); -} - -if (!empty($_POST['oldpass'])) { - // this section contains code to update the users password after verifying the old password first - include_once ('includes/update-password.php'); -} - -if (!empty($_POST['setacc'])) { - //this section contains code to set the users preferred game account - include_once ('includes/set-prefacc.php'); -} - -if (!empty($_POST['setchar'])) { - //this section contains code to the users preferred character - include_once ('includes/set-prefchar.php'); -} - -echo '

Set preferred account & character, or change e-mail or password

'; - -// select which GW account you want to default to -echo '
'; -echo '
Current preferred account: ' .$_SESSION['prefaccname'] . '

'; - -// select which character from your GW account you want to default to -echo '
'; -echo '
Current preferred character: ' .$_SESSION['prefcharname'] . '

'; - -// update e-mail address form -echo '
'; -echo ''; -echo ''; -echo '
Update e-mail address


'; - -// update password form -echo << - - - - - - -
Old Password
New password
Verify password
+ + UPDPASS; } - - -UPDPASS; } include_once ('footer.php'); ?> \ No newline at end of file diff --git a/style.css b/style.css index 07e5490..33b593e 100644 --- a/style.css +++ b/style.css @@ -70,6 +70,12 @@ submitLink:focus { .percentbar { background:#CCCCCC; border:1px solid #666666; height:10px; } .percentbar div { background: #28B8C0; height: 10px; } +select.header { + /*background: rgb(255, 255, 255); + background: rgba(255, 255, 255, 0.2);*/ + color: red; +} + select *.profession-0 { background-color: #FFF; } select *.profession-1 { background-color: #FF8; } select *.profession-2 { background-color: #CF9; } diff --git a/updatecharstats.php b/updatecharstats.php index 29f5371..e6a62d4 100644 --- a/updatecharstats.php +++ b/updatecharstats.php @@ -1,6 +1,8 @@ user page'; +if (isset($_SESSION['userid'])) { + echo 'Return to your user page'; +} include_once ('footer.php'); ?> \ No newline at end of file