Merge branch '164-crash-on-patching-and-possibly-right-after-login' into 'main/atys...
[ryzomcore.git] / nelns / admin / public_html / prefs.php
blobfb99fb771f75dd3e64e1f35bf372dbbb3e6234b6
1 <?php
2 // NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
3 // Copyright (C) 2010 Winch Gate Property Limited
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU Affero General Public License as
7 // published by the Free Software Foundation, either version 3 of the
8 // License, or (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Affero General Public License for more details.
15 // You should have received a copy of the GNU Affero General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 $publicAccess = true;
19 include('authenticate.php');
22 if (isset($chCookieState))
24 sqlquery("UPDATE user SET useCookie='$chCookieState' WHERE uid='$uid'");
25 $useCookie = $chCookieState;
28 htmlProlog($_SERVER['PHP_SELF'], "Preferences");
30 echo "<br><b>Preferences edit</b><br>\n";
32 echo "<table><tr><td>\n";
34 echo "<br><table><tr><td>Use login cookie</td><form method=post action='".$_SERVER['PHP_SELF']."'><td>\n";
35 echo "<select name='chCookieState' onChange='submit()'>\n";
36 echo "<option value='yes'".($useCookie == 'yes' ? " selected" : "").">Yes\n";
37 echo "<option value='no'".($useCookie != 'yes' ? " selected" : "").">No\n";
38 echo "</td></form></tr></table><br>\n";
40 echo "</td></tr><tr><td><hr></td></tr><tr><td>\n";
42 echo "<table><tr><td colspan=2>Change password</td></tr>\n";
43 echo "<form method=post action='".$_SERVER['PHP_SELF']."'><input type=hidden name='command' value='chPassword'><input type=hidden name='admlogin' value='$admlogin'><input type=hidden name='admpassword' value='$admpassword'>\n";
44 echo "<tr><td>Enter previous password</td><td><input type=password name='chOldPass' size=16 maxlength=16></td></tr>\n";
45 echo "<tr><td>Enter new password</td><td><input type=password name='chNewPass' size=16 maxlength=16></td></tr>\n";
46 echo "<tr><td>Reenter new password</td><td><input type=password name='chConfirmNewPass' size=16 maxlength=16></td></tr>\n";
47 echo "<tr><td colspan=2 align=center><input type=submit type=password name='chPassword' value='Change password'></td></tr>\n";
48 echo "</form></table><br>\n";
50 echo "</td></tr></table>\n";
52 htmlEpilog();