Automatically exported from code.google.com/p/planningalerts
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.
 
 
 
 
 
 

57 lines
1.1 KiB

  1. <?php
  2. require_once ("config.php");
  3. require_once ("DB.php");
  4. $about_page = new about_page;
  5. class about_page {
  6. //Properties
  7. var $authorities = array();
  8. //Constructor
  9. function about_page() {
  10. $this->setup();
  11. $this->bind();
  12. }
  13. //Setup
  14. function setup (){
  15. $db = DB::connect(DB_CONNECTION_STRING);
  16. //Grab a list of local authorities
  17. $sql = "Select full_name, disabled from authority where disabled = 0 or disabled is null order by full_name";
  18. $results = $db->getAll($sql);
  19. for ($i=0; $i < sizeof($results); $i++){
  20. array_push($this->authorities, $results[$i][0]);
  21. }
  22. }
  23. //Bind
  24. function bind() {
  25. //page vars
  26. $form_action = $_SERVER['PHP_SELF'];
  27. //smarty
  28. $smarty = new Smarty;
  29. $smarty->force_compile = true;
  30. $smarty->compile_dir = SMARTY_COMPILE_DIRECTORY;
  31. $smarty->assign("page_title","About");
  32. $smarty->assign("menu_item", "about");
  33. $smarty->assign("authorities",$this->authorities);
  34. //Render
  35. $smarty->display('about.tpl');
  36. }
  37. }
  38. ?>