[ Index ]
 

Code source de Horde 3.1.3

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

title

Body

[fermer]

/templates/login/ -> login.inc (source)

   1  <?php
   2  $rightAlign = empty($nls['rtl'][$language]) ? 'right' : 'left';
   3  $leftAlign = empty($nls['rtl'][$language]) ? 'left' : 'right';
   4  ?>
   5  <script type="text/javascript">
   6  <!--
   7  function setFocus()
   8  {
   9      if (document.horde_login.horde_user.value == "") {
  10          document.horde_login.horde_user.focus();
  11      } else {
  12          document.horde_login.horde_pass.focus();
  13      }
  14  }
  15  function submit_login(e)
  16  {
  17      if (typeof e != 'undefined' && !enter_key_trap(e)) {
  18          return;
  19      }
  20  
  21      if (document.horde_login.horde_user.value == "") {
  22          alert("<?php echo addslashes(_("Please provide your username and password")) ?>");
  23          document.horde_login.horde_user.focus();
  24          return false;
  25      } else if (document.horde_login.horde_pass.value == "") {
  26          alert("<?php echo addslashes(_("Please provide your username and password")) ?>");
  27          document.horde_login.horde_pass.focus();
  28          return false;
  29      } else {
  30          document.horde_login.loginButton.disabled = true;
  31  <?php if (!empty($ie_clientcaps)): ?>
  32          try {
  33              document.horde_login.ie_version.value = objCCaps.getComponentVersion("{89820200-ECBD-11CF-8B85-00AA005B4383}", "componentid");
  34          } catch (e) {
  35          }
  36  <?php endif; ?>
  37          document.horde_login.submit();
  38          return true;
  39      }
  40  }
  41  //-->
  42  </script>
  43  
  44  <form name="horde_login" method="post" action="<?php echo Horde::selfUrl(false, true, false, true) ?>"<?php echo $conf['menu']['always'] ? ' target="_parent"' : '' ?>>
  45  <input type="hidden" name="url" value="<?php echo htmlspecialchars(Util::getFormData('url')) ?>" />
  46  <?php if (!empty($ie_clientcaps)): ?>
  47  <input type="hidden" name="ie_version" value="" />
  48  <?php endif; ?>
  49  
  50  <div id="menu">
  51  <?php
  52  $menu = &new Menu(HORDE_MENU_MASK_NONE);
  53  $hmenu = $menu->render();
  54  if ($hmenu): ?>
  55   <span style="float:<?php echo $rightAlign ?>"><?php echo $hmenu ?></span>
  56  <?php endif; ?>
  57   <h1 style="text-align:center"><?php printf(_("Welcome to %s"), $registry->get('name')) ?></h1>
  58  </div>
  59  
  60  <br class="spacer" />
  61  <?php $notification->notify(array('listeners' => 'status')) ?>
  62  
  63  <table width="100%"><tr><td align="center"><table width="300" align="center">
  64  
  65  <?php if (!empty($reason)): ?>
  66  <tr>
  67    <td colspan="2" class="notice"><?php echo $reason ?></td>
  68  </tr>
  69  <?php endif; ?>
  70  
  71  <tr>
  72      <td align="<?php echo $rightAlign ?>" class="light"><strong><?php echo _("Username") ?></strong>&nbsp;</td>
  73      <td align="<?php echo $leftAlign ?>"><input class="fixed" type="text" name="horde_user" value="<?php echo htmlspecialchars(Util::getFormData('horde_user')) ?>" style="direction:ltr" /></td>
  74  </tr>
  75  
  76  <tr>
  77      <td align="<?php echo $rightAlign ?>" class="light"><strong><?php echo _("Password") ?></strong>&nbsp;</td>
  78      <td align="<?php echo $leftAlign ?>"><input class="fixed" type="password" name="horde_pass" value="" style="direction:ltr" /></td>
  79  </tr>
  80  
  81  <?php if (!$prefs->isLocked('language')): ?>
  82  <tr>
  83      <td align="<?php echo $rightAlign ?>" class="light"><strong><?php echo _("Language") ?></strong></td>
  84      <td align="<?php echo $leftAlign ?>" class="light" style="direction:ltr"><?php echo $langs ?></td>
  85  </tr>
  86  <?php endif; ?>
  87  
  88  <tr>
  89      <td>&nbsp;</td>
  90      <td align="<?php echo $leftAlign ?>" class="light"><input name="loginButton" class="button" value="<?php echo _("Log in") ?>" type="submit" onclick="return submit_login();" /></td>
  91  </tr>
  92  
  93  <?php if (!empty($conf['signup']['allow']) && $auth->hasCapability('add')): ?>
  94  <tr>
  95      <td>&nbsp;</td>
  96      <td align="<?php echo $leftAlign ?>" class="light"><?php echo Horde::link(Util::addParameter(Horde::url($registry->get('webroot', 'horde') . '/signup.php'), 'url', Util::getFormData('url')), _("Don't have an account? Sign up."), 'light') . _("Don't have an account? Sign up.") ?></a></td>
  97  </tr>
  98  <?php endif; ?>
  99  <?php if ($auth->hasCapability('resetpassword')): ?>
 100  <tr>
 101      <td>&nbsp;</td>
 102      <td class="light"><?php echo Horde::link(Util::addParameter(Horde::url($registry->get('webroot', 'horde') . '/services/resetpassword.php'), 'url', Util::getFormData('url')), _("Forgot your password?"), 'light') . _("Forgot your password?") ?></a></td>
 103  </tr>
 104  <?php endif; ?>
 105  
 106  </table></td></tr></table>
 107  </form>
 108  
 109  <?php if (@is_readable(HORDE_BASE . '/config/motd.php')) require HORDE_BASE . '/config/motd.php'; ?>
 110  
 111  <script type="text/javascript">
 112  <!--
 113  <?php if (!$prefs->isLocked('language')):
 114      $lang_url = Horde::applicationUrl('login.php', true);
 115      if (($url = Util::getFormData('url'))) {
 116          $lang_url = Util::addParameter($lang_url, 'url', $url, false);
 117      }
 118      $lang_url = Util::addParameter($lang_url, 'new_lang', '', false);
 119  ?>
 120  function selectLang()
 121  {
 122      // We need to reload the login page here, but only if the user
 123      // hasn't already entered a username and password.
 124      if (document.horde_login.horde_user.value == '' &&
 125          document.horde_login.horde_pass.value == '') {
 126          var lang_page = '<?php echo $lang_url ?>' + document.horde_login.new_lang[document.horde_login.new_lang.selectedIndex].value;
 127          self.location = lang_page;
 128      }
 129  }
 130  <?php endif; ?>
 131  
 132  if (parent.frames.horde_main) {
 133      document.horde_login.target = '_parent';
 134  }
 135  
 136  // Set up the enter keytrap code.
 137  if (typeof document.captureEvents != 'undefined') {
 138      document.captureEvents(Event.KEYPRESS);
 139      document.onkeypress = submit_login;
 140  }
 141  //-->
 142  </script>


Généré le : Sun Feb 25 18:01:28 2007 par Balluche grâce à PHPXref 0.7