You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

disney_ticket_info.php 1.2 KiB

3 years ago
123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * wechat 2.0
  4. * Copyright (c) 2016 yixi wei http://zhizhuchuxing.com/
  5. * Date: 2016.09.06
  6. * Something is to pay QQ1062140302
  7. */
  8. header("Access-Control-Allow-Origin:*");
  9. //载入配置文件和连接数据库
  10. date_default_timezone_set('PRC');
  11. require_once '/usr/share/nginx/ZZFX/wchat_fx/zz-fx/Common/Mysql.php';
  12. $pdo=conn();
  13. $arr = range(1,30);
  14. $disney_ticket_info=array();
  15. $lion_threater_info = array();
  16. foreach ($arr as $k=>$v) {
  17. $date = date('Y-m-d', time()+60*60*24*$k);
  18. $disney_ticket_info[$date] = get_disney_all_info($date);
  19. $week_day = date( "w", strtotime($date) );
  20. if( $week_day == 1 ) {
  21. continue;
  22. } else if( $week_day == 6 ){
  23. $show_time_array = array( "13:30", "19:00" );
  24. } else if( $week_day == 0 ) {
  25. $show_time_array = array( "13:30", "18:30" );
  26. } else {
  27. $show_time_array = array( "19:00" );
  28. }
  29. foreach( $show_time_array as $show_time) {
  30. if( !isset($lion_threater_info[$date]) ) {
  31. $lion_threater_info[$date] = array();
  32. }
  33. $lion_threater_info[$date][$show_time] = get_lion_king_info($date, $show_time);
  34. }
  35. }
  36. set_memcache('disney_ticket_info',$disney_ticket_info);
  37. set_memcache('lion_threater_info',$lion_threater_info);