[ Index ]
 

Code source de vtiger CRM 5.0.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/modules/Users/ -> Login.php (source)

   1  <?php
   2  /*********************************************************************************
   3   * The contents of this file are subject to the SugarCRM Public License Version 1.1.2
   4   * ("License"); You may not use this file except in compliance with the
   5   * License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL
   6   * Software distributed under the License is distributed on an  "AS IS"  basis,
   7   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
   8   * the specific language governing rights and limitations under the License.
   9   * The Original Code is:  SugarCRM Open Source
  10   * The Initial Developer of the Original Code is SugarCRM, Inc.
  11   * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.;
  12   * All Rights Reserved.
  13   * Contributor(s): ______________________________________.
  14   ********************************************************************************/
  15  /*********************************************************************************
  16   * $Header: /advent/projects/wesat/vtiger_crm/sugarcrm/modules/Users/Login.php,v 1.6 2005/01/08 13:15:03 jack Exp $
  17   * Description: TODO:  To be written.
  18   * Portions created by SugarCRM are Copyright (C) SugarCRM, Inc.
  19   * All Rights Reserved.
  20   * Contributor(s): ______________________________________..
  21   ********************************************************************************/
  22  $theme_path="themes/".$theme."/";
  23  $image_path="include/images/";
  24  require_once ($theme_path.'layout_utils.php');
  25  
  26  global $app_language;
  27  //we don't want the parent module's string file, but rather the string file specifc to this subpanel
  28  global $current_language;
  29  $current_module_strings = return_module_language($current_language, 'Users');
  30  
  31   define("IN_LOGIN", true);
  32  
  33  // Retrieve username and password from the session if possible.
  34  if(isset($_SESSION["login_user_name"]))
  35  {
  36      if (isset($_REQUEST['default_user_name']))
  37          $login_user_name = $_REQUEST['default_user_name'];
  38      else
  39          $login_user_name = $_SESSION['login_user_name'];
  40  }
  41  else
  42  {
  43      if (isset($_REQUEST['default_user_name']))
  44      {
  45          $login_user_name = $_REQUEST['default_user_name'];
  46      }
  47      elseif (isset($_REQUEST['ck_login_id_vtiger'])) {
  48          $login_user_name = get_assigned_user_name($_REQUEST['ck_login_id_vtiger']);
  49      }
  50      else
  51      {
  52          $login_user_name = $default_user_name;
  53      }
  54      $_session['login_user_name'] = $login_user_name;
  55  }
  56  
  57  $current_module_strings['VLD_ERROR'] = base64_decode('UGxlYXNlIHJlcGxhY2UgdGhlIFN1Z2FyQ1JNIGxvZ29zLg==');
  58  
  59  // Retrieve username and password from the session if possible.
  60  if(isset($_SESSION["login_password"]))
  61  {
  62      $login_password = $_SESSION['login_password'];
  63  }
  64  else
  65  {
  66      $login_password = $default_password;
  67      $_session['login_password'] = $login_password;
  68  }
  69  
  70  if(isset($_SESSION["login_error"]))
  71  {
  72      $login_error = $_SESSION['login_error'];
  73  }
  74  
  75  ?>
  76  <script type="text/javascript" language="JavaScript">
  77  <!-- Begin
  78  function set_focus() {
  79      if (document.DetailView.user_name.value != '') {
  80          document.DetailView.user_password.focus();
  81          document.DetailView.user_password.select();
  82      }
  83      else document.DetailView.user_name.focus();
  84  }
  85  //  End -->
  86  </script>
  87  
  88  
  89  
  90  <table border="0" cellspacing="0" cellpadding="0" width=100%>
  91  <tr>
  92      <td align=center><br><br><br><br>
  93      
  94          <!-- Login Starts -->
  95          <table border="0" cellspacing="0" cellpadding="0" width=700 style="border:2px solid rgb(119,119,119)">
  96          <tr>
  97              <td align=left>
  98              
  99              
 100              <table border="0" cellspacing="0" cellpadding='0' width='100%' background="themes/images/loginTopHeaderBg.gif">
 101              <tr>
 102                  <td align=left><img src="themes/images/loginTopHeaderName.gif"></td>
 103                  <td align=right><!--img src="themes/images/loginTopVersion.gif"--></td>
 104              </tr>
 105              </table>
 106              <table border="0" cellspacing="0" cellpadding='10' width='100%'>
 107              <tr>
 108                  <td align=left valign=top width=50% class=small style="padding:10px">
 109                      <!-- Promo Text and Image -->
 110                      <table border=0> 
 111                      <tr>
 112                      <td>
 113                      <img src="themes/images/loginPromoText.gif" alt="vtiger CRM 5 - 100% Open Source CRM" title="vtiger CRM 5 - 100% Open Source CRM">
 114                      </td>
 115                      </tr>
 116                      <tr>
 117                      <td class=small style="padding-left:10px; color:#737373">
 118  - AJAX-based user interface<br>
 119  - Complete customer life cycle management<br>
 120  - Collaboration through e-mail, portal, and live chat<br>
 121  - Customization &  fine-grained security management<br>
 122  - Ready to use reports & dashboards<br>
 123                      </td>
 124                      </tr>
 125                      </table>
 126                      
 127                  </td>
 128                  <td align=center valign=top width=50%>
 129                      <?php
 130                          if (isset($_REQUEST['ck_login_language_vtiger'])) {
 131                              $display_language = $_REQUEST['ck_login_language_vtiger'];
 132                          }
 133                          else {
 134                              $display_language = $default_language;
 135                          }
 136                              
 137                          if (isset($_REQUEST['ck_login_theme_vtiger'])) {
 138                              $display_theme = $_REQUEST['ck_login_theme_vtiger'];
 139                          }
 140                          else {
 141                              $display_theme = $default_theme;
 142                          }
 143                      ?>    
 144                      <!-- Sign in box -->
 145                      <form action="index.php" method="post" name="DetailView" id="form">
 146                      <input type="hidden" name="module" value="Users">
 147                      <input type="hidden" name="action" value="Authenticate">
 148                      <input type="hidden" name="return_module" value="Users">
 149                      <input type="hidden" name="return_action" value="Login">
 150                      <table border="0" cellspacing="0" cellpadding="0" width=100%>
 151                      <tr><td align=left><img src="themes/images/loginSignIn.gif" alt="Sign In" title="Sign In" border="0"></td></tr>
 152                      <tr>
 153                          <td background="themes/images/loginSignInShade.gif" style="background-repeat: repeat-x;" align=center valign=top class=small>
 154                          <br>
 155                              <table border=0 cellspacing=0 cellpadding=5 width=80% class="small">
 156                              <tr><td width=30% class=small align=right><?php echo $current_module_strings['LBL_USER_NAME'] ?></td><td width=70% class=small><input class="small" style="width:100%" type="text"  name="user_name"   value="<?php echo $login_user_name ?>" tabindex="1"></td></tr>
 157                              <tr><td class=small align=right><?php echo $current_module_strings['LBL_PASSWORD'] ?></td><td class=small><input class="small" style="width:100%" type="password" size='20' name="user_password"  value="<?php echo $login_password ?>" tabindex="2"></td></tr>
 158                              <tr>
 159                                  <td colspan=2 style="padding:0px">
 160                                      <table border=0 cellspacing=0 cellpadding=5 width=100%>
 161                                      <tr>
 162                                      <td width=30% style="background-color:#efefef;" class=small align=right>    <?php echo $current_module_strings['LBL_THEME'] ?></td>
 163                                      <td width=70% style="background-color:#efefef;"  class=small>
 164                                      <select class='small' name='login_theme' style="width:100%" tabindex="3">    
 165                                          <?php echo get_select_options_with_id(get_themes(), $display_theme) ?>                                             </select>
 166                                      </tr>        
 167                                      <tr>
 168                                      <td style="background-color:#efefef;" class=small align=right><?php echo $current_module_strings['LBL_LANGUAGE'] ?></td>
 169                                      <td style="background-color:#efefef;"  class=small>
 170                                      <select class='small' name='login_language' style="width:100%" vtiger_tabindex="4">
 171                                                                                                                      <?php echo get_select_options_with_id(get_languages(), $display_language) ?>
 172                                          </select>
 173                                      </tr>
 174                                      </table>
 175                                  </td>
 176                              </tr>
 177                              <tr><td colspan=2>&nbsp;</td></tr>
 178                              <?php
 179                              if( isset($_SESSION['validation'])){
 180                              ?>
 181                              <tr>
 182                                  <td colspan="2"><font color="Red"> <?php echo $current_module_strings['VLD_ERROR']; ?> </font></td>
 183                              </tr>
 184                              <?php
 185                              }
 186                              else if(isset($login_error) && $login_error != "")
 187                              {
 188                              ?>
 189                              <tr>
 190                                  <td colspan="2"><b class="small"><font color="Brown">
 191                                  <?php echo $login_error ?>
 192                                  </font>
 193                                  </b>
 194                                  </td>
 195                              </tr>
 196                              <?php
 197                              }
 198                              ?>
 199                              <tr>
 200                                  <td colspan=2 style="padding:0px" align=center>
 201                                  <input class=small title="<?php echo $current_module_strings['LBL_LOGIN_BUTTON_TITLE'] ?>" accesskey="<?php echo $current_module_strings['LBL_LOGIN_BUTTON_TITLE'] ?>"  type="image" src="themes/images/loginBtnSignIn.gif" name="Login" value="  <?php echo $current_module_strings['LBL_LOGIN_BUTTON_LABEL'] ?>  "  tabindex="5">    
 202                                  </td>
 203                              </tr>
 204                              </table>
 205                          <br>
 206                          </td>
 207                      </tr>
 208                      </table>
 209                      
 210                  </td>
 211              </tr>
 212              </table>
 213              
 214              </td>
 215          </tr>
 216          </table>
 217      
 218              <!-- Shadow -->
 219              <table border=0 cellspacing=0 cellpadding=0 width=700>
 220              <tr>
 221                  <td><img src="themes/images/loginBottomShadowLeft.gif"></td>
 222                  <td width=100% background="themes/images/loginBottomShadowBg.gif"><img src="themes/images/loginBottomShadowBg.gif"></td>
 223                  <td><img src="themes/images/loginBottomShadowRight.gif"></td>
 224              </tr>
 225              </table>
 226      
 227      
 228      
 229      </td>
 230  </tr>
 231  </table>


Généré le : Sun Feb 25 10:22:19 2007 par Balluche grâce à PHPXref 0.7