Procházet zdrojové kódy

completed game account preferrence setting

pull/16/head
mauirixxx před 7 roky
rodič
revize
6bed38654e
1 změnil soubory, kde provedl 7 přidání a 9 odebrání
  1. +7
    -9
      preferences.php

+ 7
- 9
preferences.php Zobrazit soubor

@@ -12,26 +12,24 @@ if (!empty($_POST['oldpass'])) {
include_once ('includes/update-password.php');
}

if (!empty($_POST['prefacc'])) {
if (!empty($_POST['setacc'])) {
//this section contains code to set the users preferred game account
#include_once ('includes/set-prefacc.php');
echo 'this line will go away once the include file is completed!<br />';
include_once ('includes/set-prefacc.php');
}
echo '<h3>Change e-mail or password</h3>';

// select which GW account you want to default to
# needed code: select accid from table gwaccounts, store it in prefacc in table userinfo
echo '<form action="preferences.php" method="post"><table><caption>Preferred GW account</caption>';
echo '<tr><td><select name="prefacc"><option value="' . $_SESSION['prefaccid'] . '">' . $_SESSION['prefaccname'] . ' (current selection)</option>';
echo '<option value="0">No default selected</option>';
echo '<form action="preferences.php" method="post"><table border="1"><caption style="white-space: nowrap; overflow: hidden;">Current preferred account: <b>' .$_SESSION['prefaccname'] . '</b></caption>';
echo '<tr><td><select name="prefaccid">';
echo '<option value="nopref">Prefer no deafult</option>';
$prefacc = $con->prepare("SELECT accid, accemail FROM gwaccounts WHERE userid = ?");
$prefacc->bind_param("i", $_SESSION['userid']);
$prefacc->execute();
$resacc = $prefacc->get_result();
while ($row = $resacc->fetch_assoc()) {
echo '<option value=' . $row['accid'] . '">' . $row['accemail'] . '</option>';
echo '<option value="' . $row['accid'] . '">' . $row['accemail'] . '</option>';
}
echo '</td><td><input type="submit" value="Set account"></td></tr></select></table></form><br />';
echo '</td><td><input type="submit" value="Set account"></td></tr></select></table><input type="hidden" name="setacc" value="update"></form><br />';

// select which character from your GW account you want to default to
# needed code: select charrid from table gwchars selected by accid


Načítá se…
Zrušit
Uložit