index.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. use fec\helpers\CUrl;
  10. use fec\helpers\CRequest;
  11. ?>
  12. <style>
  13. .login_bar {
  14. padding-left: 80px;
  15. }
  16. </style>
  17. <form action="<?= CUrl::getUrl('fecadmin/login/index'); ?>" method="post">
  18. <?php echo CRequest::getCsrfInputHtml(); ?>
  19. <p>
  20. <label>用户名:</label>
  21. <input type="text" name="login[username]" size="20" class="login_input" />
  22. </p>
  23. <p>
  24. <label>密码:</label>
  25. <input type="password" name="login[password]" size="20" class="login_input" />
  26. </p>
  27. <!--
  28. <p>
  29. <label>验证码:</label>
  30. <input name="login[captcha]" class="code" type="text" size="5" />
  31. <?php
  32. //echo \fec\helpers\CCaptcha::widget([
  33. // 'name' => 'login[captcha]',
  34. // 'class' => \fec\helpers\CCaptcha::className(),
  35. // 'id' => 'login-captcha',
  36. // 'template' => '{image}',
  37. //'action' => '/fecadmin/captcha/index'
  38. //]);
  39. ?>
  40. </p>
  41. -->
  42. <p>
  43. <span style="color:#cc0000"><?= $error; ?> </span>
  44. </p>
  45. <div class="login_bar">
  46. <input class="sub" type="submit" value="" />
  47. </div>
  48. </form>
  49. <script> <!-- 编写script标签是为了编辑器识别js代码,可以省略 -->
  50. <?php $this->beginBlock('js_end') ?>
  51.  $(document).ready(function(){$("#login-captcha-image").click();});
  52. <?php $this->endBlock(); ?>
  53. </script>
  54. <?php $this->registerJs($this->blocks['js_end'],\yii\web\View::POS_LOAD); ?>