[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/login/ -> index_form.html (source)

   1  <?php
   2  if ($show_instructions) {
   3      $columns = 'twocolumns';
   4  } else {
   5      $columns = 'onecolumn';
   6  }
   7  
   8  if (!empty($CFG->loginpasswordautocomplete)) {
   9      $autocomplete = 'autocomplete="off"';
  10  } else {
  11      $autocomplete = '';
  12  }
  13  if (empty($CFG->authloginviaemail)) {
  14      $strusername = get_string('username');
  15  } else {
  16      $strusername = get_string('usernameemail');
  17  }
  18  ?>
  19  <div class="loginbox clearfix <?php echo $columns ?>">
  20    <div class="loginpanel">
  21  <?php
  22    if (($CFG->registerauth == 'email') || !empty($CFG->registerauth)) { ?>
  23        <div class="skiplinks"><a class="skip" href="signup.php"><?php print_string("tocreatenewaccount"); ?></a></div>
  24  <?php
  25    } ?>
  26      <h2><?php print_string("login") ?></h2>
  27        <div class="subcontent loginsub">
  28          <?php
  29            if (!empty($errormsg)) {
  30                echo html_writer::start_tag('div', array('class' => 'loginerrors'));
  31                echo html_writer::link('#', $errormsg, array('id' => 'loginerrormessage', 'class' => 'accesshide'));
  32                echo $OUTPUT->error_text($errormsg);
  33                echo html_writer::end_tag('div');
  34            }
  35          ?>
  36          <form action="<?php echo $CFG->httpswwwroot; ?>/login/index.php" method="post" id="login" <?php echo $autocomplete; ?> >
  37            <div class="loginform">
  38              <div class="form-label"><label for="username"><?php echo($strusername) ?></label></div>
  39              <div class="form-input">
  40                <input type="text" name="username" id="username" size="15" value="<?php p($frm->username) ?>" />
  41              </div>
  42              <div class="clearer"><!-- --></div>
  43              <div class="form-label"><label for="password"><?php print_string("password") ?></label></div>
  44              <div class="form-input">
  45                <input type="password" name="password" id="password" size="15" value="" <?php echo $autocomplete; ?> />
  46              </div>
  47            </div>
  48              <div class="clearer"><!-- --></div>
  49                <?php if (isset($CFG->rememberusername) and $CFG->rememberusername == 2) { ?>
  50                <div class="rememberpass">
  51                    <input type="checkbox" name="rememberusername" id="rememberusername" value="1" <?php if ($frm->username) {echo 'checked="checked"';} ?> />
  52                    <label for="rememberusername"><?php print_string('rememberusername', 'admin') ?></label>
  53                </div>
  54                <?php } ?>
  55            <div class="clearer"><!-- --></div>
  56            <input id="anchor" type="hidden" name="anchor" value="" />
  57            <script>document.getElementById('anchor').value = location.hash</script>
  58            <input type="submit" id="loginbtn" value="<?php print_string("login") ?>" />
  59            <div class="forgetpass"><a href="forgot_password.php"><?php print_string("forgotten") ?></a></div>
  60          </form>
  61          <div class="desc">
  62              <?php
  63                  echo get_string("cookiesenabled");
  64                  echo $OUTPUT->help_icon('cookiesenabled');
  65              ?>
  66          </div>
  67        </div>
  68  
  69  <?php if ($CFG->guestloginbutton and !isguestuser()) {  ?>
  70        <div class="subcontent guestsub">
  71          <div class="desc">
  72            <?php print_string("someallowguest") ?>
  73          </div>
  74          <form action="index.php" method="post" id="guestlogin">
  75            <div class="guestform">
  76              <input type="hidden" name="username" value="guest" />
  77              <input type="hidden" name="password" value="guest" />
  78              <input type="submit" value="<?php print_string("loginguest") ?>" />
  79            </div>
  80          </form>
  81        </div>
  82  <?php } ?>
  83       </div>
  84  <?php if ($show_instructions) { ?>
  85      <div class="signuppanel">
  86        <h2><?php print_string("firsttime") ?></h2>
  87        <div class="subcontent">
  88  <?php     if (is_enabled_auth('none')) { // instructions override the rest for security reasons
  89                print_string("loginstepsnone");
  90            } else if ($CFG->registerauth == 'email') {
  91                if (!empty($CFG->auth_instructions)) {
  92                    echo format_text($CFG->auth_instructions);
  93                } else {
  94                    print_string("loginsteps", "", "signup.php");
  95                } ?>
  96                   <div class="signupform">
  97                     <form action="signup.php" method="get" id="signup">
  98                     <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
  99                     </form>
 100                   </div>
 101  <?php     } else if (!empty($CFG->registerauth)) {
 102                echo format_text($CFG->auth_instructions); ?>
 103                <div class="signupform">
 104                  <form action="signup.php" method="get" id="signup">
 105                  <div><input type="submit" value="<?php print_string("startsignup") ?>" /></div>
 106                  </form>
 107                </div>
 108  <?php     } else {
 109                echo format_text($CFG->auth_instructions);
 110            } ?>
 111        </div>
 112      </div>
 113  <?php } ?>
 114  <?php if (!empty($potentialidps)) { ?>
 115      <div class="subcontent potentialidps">
 116          <h6><?php print_string('potentialidps', 'auth'); ?></h6>
 117          <div class="potentialidplist">
 118  <?php foreach ($potentialidps as $idp) {
 119      echo  '<div class="potentialidp"><a href="' . $idp['url']->out() . '" title="' . $idp['name'] . '">' . $OUTPUT->render($idp['icon'], $idp['name']) . $idp['name'] . '</a></div>';
 120  } ?>
 121          </div>
 122      </div>
 123  <?php } ?>
 124  </div>


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1