Automatically exported from code.google.com/p/planningalerts
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

50 linhas
1.5 KiB

  1. <?php
  2. //Includes
  3. require_once('config.php');
  4. require_once('application.php');
  5. //build date url
  6. $current_date = getdate();
  7. $day = $current_date['mday'] -5;
  8. $month = $current_date['mon'];
  9. $year = $current_date['year'];
  10. //if any get params were passed, overwrite the default date
  11. if (isset($_GET['day'])){
  12. $day = $_GET['day'];
  13. }
  14. if (isset($_GET['month'])){
  15. $month = $_GET['month'];
  16. }
  17. if (isset($_GET['year'])){
  18. $year = $_GET['year'];
  19. }
  20. //search url
  21. $search_url = "http://62.173.68.168/publicaccess/dc/DcApplication/application_searchresults.aspx?searchtype=WEEKLY&selWeeklyListRange=#daterange&weektype=VAL";
  22. $date_range = "{$day}%2F{$month}%2F{$year}%7C{$day}%2F{$month}%2F{$year}";
  23. $search_url = str_replace("#daterange", $date_range, $search_url);
  24. //comment and info urls
  25. $info_url_base = "http://62.173.68.168/publicaccess/dc/DcApplication/application_detailview.aspx?caseno=";
  26. $comment_url_base = "http://62.173.68.168/publicaccess/dc/DcApplication/application_comments_entryform.aspx?caseno=";
  27. //grab urls
  28. $applications = scrape_applications_publicaccess($search_url, $info_url_base, $comment_url_base);
  29. //smarty
  30. $smarty = new Smarty;
  31. $smarty->force_compile = true;
  32. $smarty->compile_dir = SMARTY_COMPILE_DIRECTORY;
  33. $smarty->template_dir = "../templates";
  34. $smarty->assign("authority_name", "Rochford District Council");
  35. $smarty->assign("authority_short_name", "Rochford");
  36. if (sizeof($applications) > 0){
  37. $smarty->assign("applications", $applications);
  38. }
  39. $smarty->display("xml.tpl");
  40. ?>