Changeset 858 in ExiteCMS for trunk/edit_profile.php


Ignore:
Timestamp:
09/29/07 21:51:40 (5 years ago)
Author:
hverton
Message:

Added language selection and language detection
When adding a new member as sponsor, the member will be added to the 'Sponsors' user_group
Added missing index.php to the new cache directories

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11Copy of config.php 
         2config.backup.php 
        23config.php 
  • trunk/edit_profile.php

    r834 r858  
    3838    $error = ""; $set_avatar = ""; 
    3939    $variables['update_profile'] = true; 
    40      
     40 
     41    $result = dbquery("SELECT locale_code, locale_name FROM ".$db_prefix."locale WHERE locale_id = '".$_POST['user_locale']."'"); 
     42    if ($data = dbarray($result)) { 
     43        if ($data['locale_name'] != $settings['locale']) { 
     44            die('setting locale cookie: '.$data['locale_code']); 
     45            setcookie("locale", $data['locale_code'], time() + 31536000, "/", "", "0"); 
     46        } 
     47    } 
    4148    $username = trim(eregi_replace(" +", " ", $_POST['user_name'])); 
    4249    if ($username == "" || $_POST['user_email'] == "" || $_POST['user_fullname'] == "" ) { 
     
    207214$variables['this_userdata'] = $this_userdata; 
    208215 
     216$variables['locales'] = array(); 
     217$result = dbquery("SELECT locale_id, locale_name FROM ".$db_prefix."locale WHERE locale_active = '1' ORDER BY locale_name"); 
     218while ($data = dbarray($result)) { 
     219    $data['selected'] = $data['locale_name'] == $settings['locale']; 
     220    $variables['locales'][] = $data; 
     221} 
     222 
    209223// define the search body panel variables 
    210224$template_panels[] = array('type' => 'body', 'name' => 'edit_profile', 'template' => 'main.edit_profile.tpl', 'locale' => array(PATH_LOCALE.LOCALESET."members-profile.php", PATH_LOCALE.LOCALESET."user_fields.php")); 
Note: See TracChangeset for help on using the changeset viewer.