Changeset 772


Ignore:
Timestamp:
Apr 26, 2005, 11:46:33 AM (19 years ago)
Author:
gweltas
Message:

Bug 99 : javascript error in profile.php
Enhancement of the radio class under IE

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/user.inc.php

    r680 r772  
    2626// +-----------------------------------------------------------------------+
    2727
     28// Dynamic change of language with database persistency
     29if (isset($_POST['language']))
     30{
     31  $query = "UPDATE ".USERS_TABLE." SET language = '";
     32  $query.= $_POST['language'];
     33  $query.= "' WHERE id = ".$_POST['userid'].";";
     34  pwg_query($query);
     35}
     36
     37
    2838// retrieving connected user informations
    29 
    3039if (isset($_COOKIE['id']))
    3140{
  • trunk/profile.php

    r768 r772  
    3535  $userdata = getuserdata(intval($_GET['user_id']));
    3636}
    37 elseif (defined('IN_ADMIN') and isset($_POST['submit']))
     37elseif (defined('IN_ADMIN') and (isset($_POST['validate'])) )
    3838{
    3939  $userdata = getuserdata(intval($_POST['userid']));
     
    5252
    5353$errors = array();
    54 if (isset($_POST['submit']))
     54if (isset($_POST['username']) && !isset($_POST['reset']))
    5555{
    5656  $int_pattern = '/^\d+$/';
     
    194194   
    195195    // redirection
    196     if (!defined('IN_ADMIN') or !IN_ADMIN)
    197     {
    198       $url = PHPWG_ROOT_PATH.'category.php?'.$_SERVER['QUERY_STRING'];
    199       redirect(add_session_id($url));
    200     }
    201     else
    202     {
    203       redirect(add_session_id(PHPWG_ROOT_PATH.'admin.php?page=profile'));
     196    if (isset($_POST['validate']))
     197    {
     198      if (!defined('IN_ADMIN') or !IN_ADMIN)
     199      {
     200        $url = PHPWG_ROOT_PATH.'category.php?'.$_SERVER['QUERY_STRING'];
     201        redirect(add_session_id($url));
     202       }
     203      else
     204      {
     205        redirect(add_session_id(PHPWG_ROOT_PATH.'admin.php?page=profile'));
     206      }
    204207    }
    205208  }
  • trunk/template/default/default.css

    r711 r772  
    22
    33body { background-color:#000000;} /*General background color*/
    4 .main, .throw, .admin { background-color:#3F3F3F;} /*Main background color*/
     4.main, .throw, .admin, .radio { background-color:#3F3F3F;} /*Main background color*/
    55.row1,input,select,textarea, .table1, .home { background-color:#5F5F5F;} /* Tables & forms */
    66.table2, .commentTitle { background-color: #797979;} /* Alternate table & comments  */
     
    2020.bouton, .errors { color:#FFFFFF;} /* Buttons & errors */
    2121
    22 /* Update results (admin side only) */
    23 .update_summary_new, .best_gen_time
    24 { color:#9cb4ce;}
    25 
    26 /* Update results (admin side only) */
    27 .update_summary_del,.worst_gen_time
    28 { color:#ffe1e1;}
     22/* FONT COLORS (admin side) */
     23
     24.update_summary_new, .best_gen_time { color:#9cb4ce;}
     25.update_summary_del,.worst_gen_time { color:#ffe1e1;}
    2926
    3027/* ANCHORS */
     
    9592
    9693/*----------------------------------------------*/
    97 /* Under this point, do not modify the values   */
    98 /* unless you are aware of what you are doing!  */
     94/* A good understanding of the CSS mechanism    */
     95/* is required below.                           */
     96/*                                              */
     97/* Do not modify the valuesunless you are aware */
     98/* of what you are doing!                       */
    9999/*----------------------------------------------*/
    100100
     
    346346}
    347347
    348 .radio{  border:0;}
     348.radio{  border:0px ;}
    349349
    350350/* ADMIN LAYOUT STYLES */
  • trunk/template/default/profile.tpl

    r768 r772  
    1212<div class="titrePage">{L_TITLE}</div>
    1313<!-- END profile -->
    14 <form method="post" action="{F_ACTION}">
     14<form method="post" name="profile" action="{F_ACTION}">
    1515<table width="70%" align="center">
    1616  <tr class="admin">
     
    7373        <input type="radio" class="radio" name="show_nb_comments" value="false" {NB_COMMENTS_NO} />{L_NO}</td>
    7474  </tr>
    75         <tr>
     75  <tr>
    7676    <td>{L_MAXWIDTH}</td>
    7777        <td><input type="text" size="4" maxlength="4" name="maxwidth" value="{MAXWIDTH}" />
    7878        </td>
    7979  </tr>
    80         <tr>
     80  <tr>
    8181    <td>{L_MAXHEIGHT}</td>
    82         <td><input type="text" size="4" maxlength="4" name="maxheight" value="{MAXHEIGHT}" />
    83         </td>
     82    <td><input type="text" size="4" maxlength="4" name="maxheight" value="{MAXHEIGHT}" />
     83    </td>
    8484  </tr>
    8585<!-- BEGIN admin -->
     
    8787    <th colspan="2">{modify.admin.L_ADMIN_USER}</th>
    8888  </tr>
    89         <tr>
     89  <tr>
    9090    <td>{modify.admin.L_STATUS}</td>
    9191        <td>{modify.admin.STATUS}
    9292        </td>
    9393  </tr>
    94         <tr>
     94  <tr>
    9595    <td>{modify.admin.L_DELETE}<br />
    96                 <span class="small">{modify.admin.L_DELETE_HINT}</span></td>
     96        <span class="small">{modify.admin.L_DELETE_HINT}</span></td>
    9797        <td><input name="user_delete" type="checkbox" value="1">
    9898        </td>
    9999  </tr>
    100100<!-- END admin -->
    101 <tr>
     101  <tr>
    102102        <td colspan="2" align="center">
    103           <input type="submit" name="submit" value="{L_SUBMIT}" class="bouton" />
    104           <input type="reset" name="reset" value="{L_RESET}" class="bouton" />
     103          <input type="submit" name="validate" value="{L_SUBMIT}" class="bouton" />
     104        <input type="reset" name="reset" value="{L_RESET}" class="bouton" />
    105105        </td>
    106106  </tr>
Note: See TracChangeset for help on using the changeset viewer.