aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgweltas <gweltas@piwigo.org>2005-04-26 09:46:33 +0000
committergweltas <gweltas@piwigo.org>2005-04-26 09:46:33 +0000
commit9dc9c553d39e20aa110cb66124fc3e5a5ea1af33 (patch)
treeda5f78a1b9eacc4a76e29aaa21d5de5d947d9313
parent60ed679b36df10e5ded2c0a9190ac10f95f2143a (diff)
Bug 99 : javascript error in profile.php
Enhancement of the radio class under IE git-svn-id: http://piwigo.org/svn/trunk@772 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--include/user.inc.php11
-rw-r--r--profile.php21
-rw-r--r--template/default/default.css20
-rw-r--r--template/default/profile.tpl22
4 files changed, 43 insertions, 31 deletions
diff --git a/include/user.inc.php b/include/user.inc.php
index f64c28a46..6e5e0c8ed 100644
--- a/include/user.inc.php
+++ b/include/user.inc.php
@@ -25,8 +25,17 @@
// | USA. |
// +-----------------------------------------------------------------------+
-// retrieving connected user informations
+// Dynamic change of language with database persistency
+if (isset($_POST['language']))
+{
+ $query = "UPDATE ".USERS_TABLE." SET language = '";
+ $query.= $_POST['language'];
+ $query.= "' WHERE id = ".$_POST['userid'].";";
+ pwg_query($query);
+}
+
+// retrieving connected user informations
if (isset($_COOKIE['id']))
{
$session_id = $_COOKIE['id'];
diff --git a/profile.php b/profile.php
index 57f6255be..ff75b0c67 100644
--- a/profile.php
+++ b/profile.php
@@ -34,7 +34,7 @@ if (defined('IN_ADMIN') and IN_ADMIN and isset($_GET['user_id']))
{
$userdata = getuserdata(intval($_GET['user_id']));
}
-elseif (defined('IN_ADMIN') and isset($_POST['submit']))
+elseif (defined('IN_ADMIN') and (isset($_POST['validate'])) )
{
$userdata = getuserdata(intval($_POST['userid']));
}
@@ -51,7 +51,7 @@ $infos = array('nb_image_line', 'nb_line_page', 'language',
'recent_period', 'template', 'mail_address');
$errors = array();
-if (isset($_POST['submit']))
+if (isset($_POST['username']) && !isset($_POST['reset']))
{
$int_pattern = '/^\d+$/';
@@ -193,14 +193,17 @@ UPDATE '.USERS_TABLE.'
}
// redirection
- if (!defined('IN_ADMIN') or !IN_ADMIN)
+ if (isset($_POST['validate']))
{
- $url = PHPWG_ROOT_PATH.'category.php?'.$_SERVER['QUERY_STRING'];
- redirect(add_session_id($url));
- }
- else
- {
- redirect(add_session_id(PHPWG_ROOT_PATH.'admin.php?page=profile'));
+ if (!defined('IN_ADMIN') or !IN_ADMIN)
+ {
+ $url = PHPWG_ROOT_PATH.'category.php?'.$_SERVER['QUERY_STRING'];
+ redirect(add_session_id($url));
+ }
+ else
+ {
+ redirect(add_session_id(PHPWG_ROOT_PATH.'admin.php?page=profile'));
+ }
}
}
}
diff --git a/template/default/default.css b/template/default/default.css
index 0d39b2052..8337b8dbc 100644
--- a/template/default/default.css
+++ b/template/default/default.css
@@ -1,7 +1,7 @@
/* BACKGROUND */
body { background-color:#000000;} /*General background color*/
-.main, .throw, .admin { background-color:#3F3F3F;} /*Main background color*/
+.main, .throw, .admin, .radio { background-color:#3F3F3F;} /*Main background color*/
.row1,input,select,textarea, .table1, .home { background-color:#5F5F5F;} /* Tables & forms */
.table2, .commentTitle { background-color: #797979;} /* Alternate table & comments */
.errors { background-color:red;} /* Errors display */
@@ -19,13 +19,10 @@ input,select,textarea { color:#FFFFCC;} /* Forms font color */
.throw { color:#FFFFCC;} /* First line of tables */
.bouton, .errors { color:#FFFFFF;} /* Buttons & errors */
-/* Update results (admin side only) */
-.update_summary_new, .best_gen_time
-{ color:#9cb4ce;}
+/* FONT COLORS (admin side) */
-/* Update results (admin side only) */
-.update_summary_del,.worst_gen_time
-{ color:#ffe1e1;}
+.update_summary_new, .best_gen_time { color:#9cb4ce;}
+.update_summary_del,.worst_gen_time { color:#ffe1e1;}
/* ANCHORS */
@@ -94,8 +91,11 @@ h2 /* H2 tag style (admin side only) */
div.information { font-size:14px; font-weight:bold;}
/*----------------------------------------------*/
-/* Under this point, do not modify the values */
-/* unless you are aware of what you are doing! */
+/* A good understanding of the CSS mechanism */
+/* is required below. */
+/* */
+/* Do not modify the valuesunless you are aware */
+/* of what you are doing! */
/*----------------------------------------------*/
/* POSITION */
@@ -345,7 +345,7 @@ input,select,textarea
padding: 0;
}
-.radio{ border:0;}
+.radio{ border:0px ;}
/* ADMIN LAYOUT STYLES */
diff --git a/template/default/profile.tpl b/template/default/profile.tpl
index f8b9dd2e5..7d435304f 100644
--- a/template/default/profile.tpl
+++ b/template/default/profile.tpl
@@ -11,7 +11,7 @@
<!-- BEGIN profile -->
<div class="titrePage">{L_TITLE}</div>
<!-- END profile -->
-<form method="post" action="{F_ACTION}">
+<form method="post" name="profile" action="{F_ACTION}">
<table width="70%" align="center">
<tr class="admin">
<th colspan="2">{L_REGISTRATION_INFO}</th>
@@ -72,36 +72,36 @@
<td><input type="radio" class="radio" name="show_nb_comments" value="true" {NB_COMMENTS_YES} />{L_YES}&nbsp;&nbsp;
<input type="radio" class="radio" name="show_nb_comments" value="false" {NB_COMMENTS_NO} />{L_NO}</td>
</tr>
- <tr>
+ <tr>
<td>{L_MAXWIDTH}</td>
<td><input type="text" size="4" maxlength="4" name="maxwidth" value="{MAXWIDTH}" />
</td>
</tr>
- <tr>
+ <tr>
<td>{L_MAXHEIGHT}</td>
- <td><input type="text" size="4" maxlength="4" name="maxheight" value="{MAXHEIGHT}" />
- </td>
+ <td><input type="text" size="4" maxlength="4" name="maxheight" value="{MAXHEIGHT}" />
+ </td>
</tr>
<!-- BEGIN admin -->
<tr class="admin">
<th colspan="2">{modify.admin.L_ADMIN_USER}</th>
</tr>
- <tr>
+ <tr>
<td>{modify.admin.L_STATUS}</td>
<td>{modify.admin.STATUS}
</td>
</tr>
- <tr>
+ <tr>
<td>{modify.admin.L_DELETE}<br />
- <span class="small">{modify.admin.L_DELETE_HINT}</span></td>
+ <span class="small">{modify.admin.L_DELETE_HINT}</span></td>
<td><input name="user_delete" type="checkbox" value="1">
</td>
</tr>
<!-- END admin -->
-<tr>
+ <tr>
<td colspan="2" align="center">
- <input type="submit" name="submit" value="{L_SUBMIT}" class="bouton" />
- <input type="reset" name="reset" value="{L_RESET}" class="bouton" />
+ <input type="submit" name="validate" value="{L_SUBMIT}" class="bouton" />
+ <input type="reset" name="reset" value="{L_RESET}" class="bouton" />
</td>
</tr>
</table>