Advertisement
Guest User

Untitled

a guest
Feb 29th, 2020
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.56 KB | None | 0 0
  1. {% for i in range(0,10) %}
  2. <div id='freqDigitR2L_div{{i}}' class="chart chart_2L" style="display:{% if i == 0 %} block {% else %} none {% endif %}; padding-top: 25px; ">
  3. <h4 style="padding-bottom: 20px; font-weight: bold;">สถิติการออกรางวัลย้อนหลัง {{ i+1 }} ปี<br>แบบแบ่งแยกตามหลัก</h4>
  4. <p style="padding-bottom: 25px;">รวมสถิติการออกรางวัลย้อนหลัง {{ i+1 }} ปี รวมทั้งหมด {{ (i+1)*24 }} งวด</p>
  5. <div id='freqDigitR2L{{i}}' style="height: 400px; width: 500px margin: 0 auto"></div>
  6. </div>
  7.  
  8. <div class="table" id='freqNumR2L{{i}}' style="display:{% if i == 0 %} block {% else %} none {% endif %}; padding-top: 25px;">
  9. <h4 style="padding-bottom: 25px; font-weight: bold;">สถิติการออกรางวัลย้อนหลัง {{ i+1 }} ปี<br>แบบแบ่งตามจำนวนครั้งที่ออก</h4>
  10. {% set dataR2L = freqR2L%}
  11. <div class="table-responsive-md">
  12. <table class="table table-hover table-bordered">
  13. <thead class="thead-info">
  14. <tr class="bg-info">
  15. <th width="20%">จำนวนครั้ง</th>
  16. <th width="80%">หมายเลขท้าย 2 ตัวที่ออกรางวัล</th>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. {% for j in range(dataR2L[i]|max + 1, 0, -1)%}
  21. {% set temp_index = loop.revindex0 %}
  22. <tr>
  23. {% if temp_index == 0 %}
  24. <td class="active"> ยังไม่เคยออก </td><td class="active">
  25. {% else %}
  26. <td> {{temp_index}} ครั้ง </td><td>
  27. {% endif %}
  28.  
  29. {% for k in range(0, 100)%}
  30. {% if dataR2L[i][k] == temp_index %}
  31. {% if k//10 == k%10 or k == 0 %}
  32. <b>{{ "{:02d}".format(k) }}</b>
  33. {% else %}
  34. {{ "{:02d}".format(k) }}
  35. {% endif %}
  36. {% endif %}
  37. {% endfor %}
  38. </td>
  39. </tr>
  40. {% endfor %}
  41. </tbody>
  42. </table>
  43. </div>
  44. </div>
  45. {% endfor %}
  46. --------------------------------------
  47.  
  48. $(document).ready(function(){
  49. $('#statsYearR2L').on('change', function(){
  50. var demovalue = $(this).val();
  51. $("div.chart_2L").hide();
  52. $("div.table").hide();
  53. $("#freqDigitR2L_div"+demovalue).show();
  54. $("#freqNumR2L"+demovalue).show();
  55. });
  56. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement