error.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /**
  3. * @var \yii\web\View $this
  4. * @var string $redirectUrl
  5. * @var string $tip
  6. */
  7. ?>
  8. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  9. <html xmlns="http://www.w3.org/1999/xhtml">
  10. <head>
  11. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  12. <title>BIT System 后台管理平台</title>
  13. <?= $this->render('/common/css_js_main') ?>
  14. <script language="javascript">
  15. $(document).ready(function() {
  16. function jump(count) {
  17. window.setTimeout(function(){
  18. count--;
  19. if(count > 0) {
  20. $('#num').html(count);
  21. jump(count);
  22. } else {
  23. <?php if (!empty($redirectUrl)) : ?>
  24. window.location.href = '<?= $redirectUrl ?>';
  25. <?php else: ?>
  26. window.history.back();
  27. <?php endif; ?>
  28. }
  29. }, 1000);
  30. }
  31. jump(5);
  32. });
  33. </script>
  34. </head>
  35. <body id="main">
  36. <div class="main-nav"> <span class="fn-left">错误!</span> <span class="fn-right"><a href="javascript:javascript:history.go(-1);"><i class="icon-chevron-left"></i>返回</a></span>
  37. <div class="fn-clear"></div>
  38. </div>
  39. <div class="main-content">
  40. <div class="form-or-table">
  41. <div class="success-error well">
  42. <p></p>
  43. <div class="alert alert-error"> <i class="icon-remove"></i>
  44. <?= !empty($tip) ? $tip : '您的操作失败!' ?>
  45. </div>
  46. <p> 5秒后自动跳转,当前还剩<span id="num">5</span>秒。<a class="btn btn-primary fn-right" href="javascript:redirectUrl();" onclick="javascript:redirectUrl();">确定</a></p>
  47. <p class="fn-clear"></p>
  48. </div>
  49. </div>
  50. </div>
  51. </body>
  52. <script type="text/javascript">
  53. function redirectUrl() {
  54. <?php if (!empty($redirectUrl)) : ?>
  55. window.location.href = '<?= $redirectUrl ?>';
  56. <?php else: ?>
  57. window.history.back();
  58. <?php endif; ?>
  59. }
  60. </script>
  61. </html>