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.

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