From 9dc9c553d39e20aa110cb66124fc3e5a5ea1af33 Mon Sep 17 00:00:00 2001 From: gweltas Date: Tue, 26 Apr 2005 09:46:33 +0000 Subject: [PATCH] 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 --- include/user.inc.php | 11 ++++++++++- profile.php | 21 ++++++++++++--------- template/default/default.css | 20 ++++++++++---------- template/default/profile.tpl | 22 +++++++++++----------- 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 @@
{L_TITLE}
-
+ @@ -72,36 +72,36 @@ - + - + - + - + - + + {modify.admin.L_DELETE_HINT} - +
{L_REGISTRATION_INFO}{L_YES}   {L_NO}
{L_MAXWIDTH}
{L_MAXHEIGHT} - +
{modify.admin.L_ADMIN_USER}
{modify.admin.L_STATUS} {modify.admin.STATUS}
{modify.admin.L_DELETE}
- {modify.admin.L_DELETE_HINT}
- - + +