Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
mem_param.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: mem_param.php,v 1.8 2004/07/23 14:03:57 anonymous Exp $
4  ----------------------------------------------------------------------
5  AlternC - Web Hosting System
6  Copyright (C) 2002 by the AlternC Development Team.
7  http://alternc.org/
8  ----------------------------------------------------------------------
9  Based on:
10  Valentin Lacambre's web hosting softwares: http://altern.org/
11  ----------------------------------------------------------------------
12  LICENSE
13 
14  This program is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License (GPL)
16  as published by the Free Software Foundation; either version 2
17  of the License, or (at your option) any later version.
18 
19  This program is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  GNU General Public License for more details.
23 
24  To read the license please visit http://www.gnu.org/copyleft/gpl.html
25  ----------------------------------------------------------------------
26  Original Author of file: Benjamin Sonntag
27  Purpose of file: Allow the customization of the user interface
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31 
32 include_once("head.php");
33 
34 $fields = array (
35  "help_setting" => array ("request", "string", ""),
36  "showhelp" => array ("request", "integer", ""),
37 );
39 
40 
41 if (!empty($help_setting)) {
42  $mem->set_help_param($showhelp);
43  $error=_("Your help setting has been updated.");
44 }
45 
46 ?>
47 <div align="center"><h3><?php __("Settings of your account"); ?></h3></div>
48 <?php
49  if (isset($error) && $error) {
50  echo "<font color=red>$error</font>";
51  include_once("foot.php");
52  exit();
53  }
54 ?>
55 
56 <div id="tabsmem">
57 <ul>
58 <li class="hta"><a href="#tabsmem-password"><?php __("Password"); ?></a></li>
59 <li class="mail"><a href="#tabsmem-mail"><?php __("Mail"); ?></a></li>
60 <li class="help"><a href="#tabsmem-help"><?php __("Help"); ?></a></li>
61 <?php
62 if ($mem->user["su"]) { ?>
63 <li class="admin"><a href="#tabsmem-admin"><?php __("Administrator"); ?></a></li> <?php
64 }
65 ?>
66 </ul>
67 
68 <div id="tabsmem-password">
69 <h3><?php __("Password change"); ?></h3>
70 <?php
71 if (!$mem->user["canpass"]) {
72  echo "<p>";
73  __("You cannot change your password");
74  echo "</p>";
75 
76 } else {
77 echo "<p>";
78  __("help_chg_passwd"); ?>
79 </p>
80 <form method="post" action="mem_passwd.php" name="main" id="main">
81 <table border="1" cellspacing="0" cellpadding="4" class="tedit" >
82 <tr><th><?php __("Old password"); ?></th><td><input type="password" class="int" name="oldpass" value="<?php isset($oldpass) ? : $oldpass=""; echo $oldpass; ?>" size="20" maxlength="128" /></td></tr>
83 <tr><th><?php __("New password"); ?> (1)</th><td><input type="password" class="int" id="newpass" name="newpass" value="<?php isset($newpass) ? : $newpass=""; echo $newpass; ?>" size="20" maxlength="60" /><?php display_div_generate_password(DEFAULT_PASS_SIZE,"#newpass","#newpass2"); ?></td></tr>
84 <tr><th><?php __("New password"); ?> (2)</th><td><input type="password" class="int" id="newpass2" name="newpass2" value="<?php isset($newpass2) ? : $newpass2=""; echo $newpass2;?>" size="20" maxlength="61" /></td></tr>
85 <tr class="trbtn"><td colspan="3"><input type="submit" class="inb ok" name="submit" value="<?php __("Change my password"); ?>" /></td></tr>
86 </table>
87 </form>
88 <br />
89 <?php } ?>
90 </div> <!-- tabsmem-password -->
91 <div id="tabsmem-mail">
92 <h3><?php __("Change the email of the account"); ?></h3>
93 <form method="post" action="mem_chgmail.php">
94  <table border="1" cellspacing="0" cellpadding="4" class="tedit">
95  <tr><td colspan="2"><?php __("help_chg_mail"); ?></td></tr>
96  <tr><th><?php __("Current mailbox"); ?></th><td><big><code><?php echo $mem->user["mail"]; ?></code></big></td></tr>
97  <tr><th><?php __("New mailbox"); ?></th><td><input type="text" class="int" name="newmail" value="<?php isset($newmail) ? : $newmail=""; echo $newmail;?>" size="40" maxlength="128" /></td></tr>
98  <tr class="trbtn"><td colspan="3"><input type="submit" class="inb ok" name="submit" value="<?php __("Change my email address"); ?>" /></td></tr>
99  </table>
100 </form>
101 </div> <!-- tabsmem-mail -->
102 <div id="tabsmem-help">
103  <h3><?php __("Online help settings"); ?></h3>
104 <form method="post" action="mem_param.php">
105  <table border="1" cellspacing="0" cellpadding="4" class="tedit">
106  <tr><td colspan="2"><?php __("help_help_settings"); ?></td></tr>
107  <tr><th><label for="showhelp"><?php __("Do you want to see the help texts and links on each page?"); ?></label></th><td><input type="checkbox" class="inc" id="showhelp" name="showhelp" value="1" <?php if ($mem->get_help_param()) echo "checked=\"checked\""; ?> /></td></tr>
108  <tr class="trbtn"><td colspan="3"><input type="submit" class="inb ok" name="help_setting" value="<?php __("Change these settings"); ?>" /></td></tr>
109  </table>
110 </form>
111 </div> <!-- tabsmem-help -->
112 <?php
113 if ($mem->user["su"]) {
114 ?>
115 <div id="tabsmem-admin">
116 <h3><?php __("Admin preferences"); ?></h3>
117 <form method="post" action="mem_admin.php">
118 <table border="1" cellspacing="0" cellpadding="4" class="tedit">
119 <tr><th><?php __("Members list view"); ?></th><td><select name="admlist" class="inl">
120 <option value="0"<?php if ($mem->user["admlist"]==0) echo " selected=\"selected\""; ?>><?php __("Large view"); ?></option>
121 <option value="1"<?php if ($mem->user["admlist"]==1) echo " selected=\"selected\""; ?>><?php __("Short view"); ?></option>
122 </select></td></tr>
123 <tr class="trbtn"><td colspan="2"><input type="submit" class="inb ok" name="submit" value="<?php __("Change my admin preferences"); ?>" /></td></tr>
124 </table>
125 </form>
126 </div> <!-- tabsmem-admin -->
127 <?php } ?>
128 
129 </div> <!-- tabsmem -->
130 
131 <script type="text/javascript">
132 document.forms['main'].oldpass.focus();
133 $(function() {$( "#tabsmem" ).tabs();});
134 </script>
135 
136 <?php include_once("foot.php"); ?>