dispatch_jump.tpl 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {__NOLAYOUT__}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
  6. <title>跳转提示</title>
  7. <style type="text/css">
  8. *{ padding: 0; margin: 0; }
  9. body{ background: #fff; font-family: "Microsoft Yahei","Helvetica Neue",Helvetica,Arial,sans-serif; color: #333; font-size: 16px; }
  10. .system-message{ padding: 24px 48px; }
  11. .system-message h1{ font-size: 100px; font-weight: normal; line-height: 120px; margin-bottom: 12px; }
  12. .system-message .jump{ padding-top: 10px; }
  13. .system-message .jump a{ color: #333; }
  14. .system-message .success,.system-message .error{ line-height: 1.8em; font-size: 36px; }
  15. .system-message .detail{ font-size: 12px; line-height: 20px; margin-top: 12px; display: none; }
  16. </style>
  17. </head>
  18. <body>
  19. <div class="system-message">
  20. <?php switch ($code) {?>
  21. <?php case 200:?>
  22. <?php case 1:?>
  23. <h1>:)</h1>
  24. <p class="success"><?php echo(strip_tags($msg));?></p>
  25. <?php break;?>
  26. <?php case 0:?>
  27. <?php default :?>
  28. <h1>:(</h1>
  29. <p class="error"><?php echo(strip_tags($msg));?></p>
  30. <?php break;?>
  31. <?php } ?>
  32. <p class="detail"></p>
  33. <p class="jump">
  34. 页面自动 <a id="href" href="<?php echo($url);?>">跳转</a> 等待时间: <b id="wait"><?php echo($wait);?></b>
  35. </p>
  36. </div>
  37. <script type="text/javascript">
  38. (function(){
  39. var wait = document.getElementById('wait'),
  40. href = document.getElementById('href').href;
  41. var interval = setInterval(function(){
  42. var time = --wait.innerHTML;
  43. if(time <= 0) {
  44. location.href = href;
  45. clearInterval(interval);
  46. };
  47. }, 1000);
  48. })();
  49. </script>
  50. </body>
  51. </html>