aboutsummaryrefslogtreecommitdiffstats
path: root/profile.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-08-27 00:24:31 +0000
committerplegall <plg@piwigo.org>2005-08-27 00:24:31 +0000
commita891960d5a9ac504a173520f4604e6740c58493b (patch)
tree88f15e6cedf4fede92988cc1b0589a8e659b9725 /profile.php
parent1abfbf5eaec88e63cea97bde6d1ecceae8e51520 (diff)
(not in ChangeLog)
- adds PHPWG_ROOT_PATH to form action in identification.php - adds link to home on identification.php - avoid using language_select and template_select in profile.php (maybe these functions becom obsolete) - [template cclear] solution #3 from http://forum.phpwebgallery.net/viewtopic.php?pid=21443#p21443 : adds the fix on min-height. - [template cclear] new FORM class : properties. Used in identification, profile, register. - [template cclear] deletion of now useless DIV.formbox - [template cclear] footer update : link to phpwebgallery website and not pierrick email. git-svn-id: http://piwigo.org/svn/trunk@854 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--profile.php55
1 files changed, 53 insertions, 2 deletions
diff --git a/profile.php b/profile.php
index 55b121691..170b14913 100644
--- a/profile.php
+++ b/profile.php
@@ -162,10 +162,8 @@ $template->assign_vars(
'USERNAME'=>$userdata['username'],
'USERID'=>$userdata['id'],
'EMAIL'=>@$userdata['email'],
- 'LANG_SELECT'=>language_select($userdata['language'], 'language'),
'NB_IMAGE_LINE'=>$userdata['nb_image_line'],
'NB_ROW_PAGE'=>$userdata['nb_line_page'],
- 'STYLE_SELECT'=>style_select($userdata['template'], 'template'),
'RECENT_PERIOD'=>$userdata['recent_period'],
'MAXWIDTH'=>@$userdata['maxwidth'],
'MAXHEIGHT'=>@$userdata['maxheight'],
@@ -204,6 +202,59 @@ $template->assign_vars(
'F_ACTION'=>add_session_id($url_action),
));
+
+$blockname = 'template_option';
+
+foreach (get_templates() as $pwg_template)
+{
+ if (isset($_POST['submit']))
+ {
+ $selected = $_POST['template']==$pwg_template ? 'selected="selected"' : '';
+ }
+ else if ($userdata['template'] == $pwg_template)
+ {
+ $selected = 'selected="selected"';
+ }
+ else
+ {
+ $selected = '';
+ }
+
+ $template->assign_block_vars(
+ $blockname,
+ array(
+ 'VALUE'=> $pwg_template,
+ 'CONTENT' => $pwg_template,
+ 'SELECTED' => $selected
+ ));
+}
+
+$blockname = 'language_option';
+
+foreach (get_languages() as $language_code => $language_name)
+{
+ if (isset($_POST['submit']))
+ {
+ $selected = $_POST['language']==$language_code ? 'selected="selected"':'';
+ }
+ else if ($userdata['language'] == $language_code)
+ {
+ $selected = 'selected="selected"';
+ }
+ else
+ {
+ $selected = '';
+ }
+
+ $template->assign_block_vars(
+ $blockname,
+ array(
+ 'VALUE'=> $language_code,
+ 'CONTENT' => $language_name,
+ 'SELECTED' => $selected
+ ));
+}
+
// +-----------------------------------------------------------------------+
// | errors display |
// +-----------------------------------------------------------------------+