Changeset 410

Show
Ignore:
Timestamp:
03/12/07 11:52:04 (2 years ago)
Author:
rats
Message:

- GUI:
* fixed: Some design issues

  • changed: behaviour of Lostpassword messages
  • modified: layout of some functions
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r405 r410  
    1212\_________________________________________________________________/ 
    1313 
     142007-03-12 Benedikt Heintel 
     15        - GUI: 
     16                * fixed: Some design issues 
     17                * changed: behaviour of Lostpassword messages 
     18                * modified: layout of some functions 
     19 
    14202007-03-09 Benedikt Heintel 
    1521        - CONFIGS: 
    1622                * proftpd: changed config files for v3.1 
    1723        - SETUP: 
    18                 * fixed bug #104: error on setting up proFTPd on Debian Etch 
     24                * fixed bug #104 & #105: error on setting up proFTPd on Debian Etch 
    1925 
    20262007-03-09 Benedikt Heintel 
  • trunk/gui/include/login.php

    r154 r410  
    213213                write_log(htmlspecialchars($user_logged, ENT_QUOTES, "UTF-8") . " bad session data."); 
    214214 
    215     return false; 
    216  
    217   } 
     215                return false; 
     216        } 
    218217 
    219218} 
     
    222221 
    223222        $path = explode("/", $_SERVER['SCRIPT_NAME']); 
    224  
    225   $found = false; 
    226  
    227   for($i = count($path) - 2 ; $i < count($path); $i++) { 
    228  
    229         if($path[$i] == $_SESSION['user_type']){ 
    230  
    231         $found= true; 
    232  
    233     } else if ($_SESSION['user_type'] == 'user' && $path[$i] == 'client') { 
    234  
    235         $found= true; 
    236  
    237     } 
    238  
     223        $found = false; 
     224 
     225        for($i = count($path) - 2 ; $i < count($path); $i++) { 
     226                if($path[$i] == $_SESSION['user_type']){ 
     227                $found= true; 
     228        } 
     229                else if ($_SESSION['user_type'] == 'user' && $path[$i] == 'client') { 
     230                $found= true; 
     231                } 
    239232        } 
    240233 
    241234        if(!$found) { 
    242  
    243235                if ($_SESSION['user_type'] == 'admin') { 
    244  
    245         header("Location: ../admin/manage_users.php"); 
    246  
    247             die(); 
    248  
    249     } else if ($_SESSION['user_type'] == 'reseller') { 
    250  
    251         header("Location: ../reseller/index.php"); 
    252  
    253             die(); 
    254  
    255     } else if ($_SESSION['user_type'] == 'user') { 
    256  
    257         header("Location: ../client/index.php"); 
    258  
    259             die(); 
    260  
    261     } 
    262  
    263   } 
    264  
     236                header("Location: ../admin/manage_users.php"); 
     237                die(); 
     238        } 
     239                else if ($_SESSION['user_type'] == 'reseller') { 
     240                header("Location: ../reseller/index.php"); 
     241                    die(); 
     242            } 
     243                else if ($_SESSION['user_type'] == 'user') { 
     244                header("Location: ../client/index.php"); 
     245                    die(); 
     246            } 
     247        } 
    265248} 
    266249 
     
    269252        if (isset($_SESSION['user_logged'])) { 
    270253 
    271         if (!check_user_login()) { 
    272  
    273         header("Location: ../index.php"); 
    274  
     254                if (!check_user_login()) { 
     255                header("Location: ../index.php"); 
    275256                        die(); 
    276  
    277     } 
    278  
    279         } else { 
    280  
    281         header("Location: ../index.php"); 
    282  
     257            } 
     258        } 
     259        else { 
     260                header("Location: ../index.php"); 
    283261                die(); 
    284262        } 
    285  
    286263} 
    287264 
     
    290267        global $sql, $cfg; 
    291268 
    292   $timestamp = time(); 
    293  
    294   if ($cfg['DB_TYPE'] === 'mysql') { 
     269       $timestamp = time(); 
     270 
     271       if ($cfg['DB_TYPE'] === 'mysql') { 
    295272 
    296273                $query_from = "select admin_id, admin_name, admin_pass, admin_type, created_by from admin where binary admin_id = ?"; 
    297274 
    298     $query_to = "select admin_id, admin_name, admin_pass, admin_type, created_by from admin where binary admin_id = ?"; 
    299  
    300         } 
    301  
    302   $rs_from = exec_query($sql, $query_from, array($form_id)); 
    303  
    304   $rs_to = exec_query($sql, $query_to, array($to_id)); 
    305  
    306   if (($rs_from -> RecordCount()) != 1 || ($rs_to -> RecordCount()) != 1)  { 
     275       $query_to = "select admin_id, admin_name, admin_pass, admin_type, created_by from admin where binary admin_id = ?"; 
     276 
     277        } 
     278 
     279       $rs_from = exec_query($sql, $query_from, array($form_id)); 
     280 
     281       $rs_to = exec_query($sql, $query_to, array($to_id)); 
     282 
     283       if (($rs_from -> RecordCount()) != 1 || ($rs_to -> RecordCount()) != 1)  { 
    307284 
    308285                write_log("Change interface error => unknown from or to username"); 
    309286 
    310     return false; 
    311  
    312  
    313  
    314  
    315   $from_udata = $rs_from -> FetchRow(); 
    316  
    317   $to_udata = $rs_to -> FetchRow(); 
     287       return false; 
     288 
     289       
     290 
     291 
     292       $from_udata = $rs_from -> FetchRow(); 
     293 
     294       $to_udata = $rs_to -> FetchRow(); 
    318295 
    319296        if (!is_userdomain_ok($to_udata['admin_name'])) { 
  • trunk/gui/lostpassword.php

    r319 r410  
    103103                                $tpl -> assign(array( 
    104104                                                                        'TR_MESSAGE' => tr('The password was requested'), 
    105                                                                         'TR_LINK' => "<a class=\"link\" href=\"index.php\">".tr('Login')."</a>" 
     105                                                                        'TR_LINK' => "<a class=\"link\" href=\"index.php\">".tr('Back')."</a>" 
    106106                                                                        ) 
    107107                                                                ); 
     
    109109                                $tpl -> assign(array( 
    110110                                                                        'TR_MESSAGE' => tr('ERROR: Unknown user'), 
    111                                                                         'TR_LINK' => "<a class=\"link\" href=\"index.php\">".tr('Retry')."</a>" 
     111                                                                        'TR_LINK' => "<a class=\"link\" href=\"lostpassword.php\">".tr('Retry')."</a>" 
    112112                                                                        ) 
    113113                                                                ); 
     
    116116                        $tpl -> assign(array( 
    117117                                                                'TR_MESSAGE' => tr('ERROR: Security code was not correct!').' '. $_SESSION['image'], 
    118                                                                 'TR_LINK' => "<a class=\"link\" href=\"index.php\">".tr('Retry')."</a>" 
     118                                                                'TR_LINK' => "<a class=\"link\" href=\"lostpassword.php\">".tr('Retry')."</a>" 
    119119                                                                ) 
    120120                                                        ); 
  • trunk/gui/themes/omega_original/admin/email_setup.tpl

    r371 r410  
    7373                              <td>&nbsp;</td> 
    7474                              <td class="content2" width="200">{TR_SUBJECT}</td> 
    75                               <td><input type="text" name="auto_subject" value="{SUBJECT_VALUE}" style="width:270px" class="textinput"> 
     75                              <td class="content"><input type="text" name="auto_subject" value="{SUBJECT_VALUE}" style="width:270px" class="textinput"> 
    7676                              </td> 
    7777                            </tr> 
     
    7979                              <td>&nbsp;</td> 
    8080                              <td class="content2" width="200">{TR_MESSAGE}</td> 
    81                               <td><textarea name="auto_message" style="width:270px" class="textinput2" rows="8">{MESSAGE_VALUE}</textarea> 
     81                              <td class="content"><textarea name="auto_message" style="width:270px" class="textinput2" rows="8">{MESSAGE_VALUE}</textarea> 
    8282                              </td> 
    8383                            </tr> 
     
    8585                              <td width="25">&nbsp;</td> 
    8686                              <td width="200" class="content2">{TR_SENDER_EMAIL}</td> 
    87                               <td class="content">{SENDER_EMAIL_VALUE}> </td> 
     87                              <td class="content">{SENDER_EMAIL_VALUE}</td> 
    8888                            </tr> 
    8989                            <tr> 
    9090                              <td width="25">&nbsp;</td> 
    9191                              <td width="200" class="content2">{TR_SENDER_NAME}</td> 
    92                               <td class="content">{SENDER_NAME_VALUE}> </td> 
     92                              <td class="content">{SENDER_NAME_VALUE}</td> 
    9393                            </tr> 
    9494                            <tr> 
  • trunk/gui/themes/omega_original/css/vhcs.css

    r371 r410  
    7676        font-family:            arial, helvetica, sans-serif; 
    7777        font-weight:            bold; 
    78         font-size:                      10px; 
     78        font-size:                      12px; 
    7979        color:                          #ffffff; 
    8080        height:                         18px; 
  • trunk/gui/themes/omega_original/lostpassword.tpl

    r371 r410  
    3838         <tr> 
    3939          <td colspan="2"><strong> 
    40            <div class="login_text">{TR_USERNAME}</div>          </td> 
     40           <div class="login_text">{TR_USERNAME}</div> 
     41          </td> 
    4142         </tr> 
    4243         <tr> 
     
    4950          <td>&nbsp;</td> 
    5051          <td align="left" valign="bottom"><input type="submit" name="Submit" class="button" value="   {TR_SEND}   "></td> 
    51           <td width="302" align="left" valign="bottom"><a class="login" href="index.php">{TR_BACK}</a></td> 
     52          <td width="302" align="right" valign="bottom"><a class="login" href="index.php">{TR_BACK}</a></td> 
    5253         </tr> 
    5354        </table> 
     
    6465  </tr> 
    6566</table> 
    66 <table align="center" width="453">   
     67<table align="center" width="453"> 
    6768    <tr> 
    6869  <td align="right" class="login">