Source for file SingleLevelViolationDetail.inc

Documentation is available at SingleLevelViolationDetail.inc

  1. <?php
  2. ################################################################
  3. # This file is part of SlidingDoors #
  4. # Copyright 2001-2002. Eric D. Nielsen, All rights reserverd #
  5. # SlidingDoors is availible for license under the GPL, see #
  6. # the COPYING file in the root directory of the install for #
  7. # the full terms of the GPL. #
  8. # #
  9. # File: SingleLevelViolationDetail.inc #
  10. # Author: Eric D. Nielsen #
  11. # Description: A class that hold data describing when a #
  12. # user tries to compete in a given event at too #
  13. # many levels #
  14. # Attributes: details -- textual description of the reason of #
  15. # a false #
  16. # Constructor: ContraCheckDetail #
  17. # Methods: getText #
  18. # Change Log: 3/03/02 -- created -- edn #
  19. ################################################################
  20.  
  21. class SingleLevelViolationDetail extends ContraCheckDetail
  22. {
  23. var $personID;
  24. var $personName;
  25. var $levelAllowed;
  26. var $levelsEntered;
  27. ############################################################
  28. # Function: SingleLevelViolationDetail #
  29. # Arguments: db -- the db to interact with #
  30. # personID -- the person generating the error #
  31. # levelAllowed -- the name of thelevels allowed #
  32. # at this comp #
  33. # levelsEntered -- the levels this person #
  34. # entered #
  35. # Returns: nothing #
  36. # Modifies: this #
  37. # Requires: nothing #
  38. ############################################################
  39. function SingleLevelViolationDetail($db,$personID,
  40. $levelAllowed, $levelsEntered)
  41. {
  42. ContraCheckDetail::ContraCheckDetail($db);
  43. $this->personID = $personID;
  44. $person = new Person($db);
  45. $person->setID($personID);
  46. $person->retrieve();
  47. $this->personName = $person->getFirstName() . " " .
  48. $person->getLastName();
  49. $this->levelAllowed=$levelAllowed;
  50. $this->levelsEntered=$levelsEntered;
  51. }
  52.  
  53. ############################################################
  54. # Function: getText #
  55. # Arguments: none #
  56. # Returns: nothing #
  57. # Modifies: this #
  58. # Requires: nothing #
  59. ############################################################
  60. function getText()
  61. {
  62. $returnString = "<br><font color=\"red\">The package selected by $this->personName ";
  63. $returnString .="only includes entries in the $this->levelAllowed ";
  64. $returnString .= "level. If $this->personName wants to compete in (";
  65. $returnString .= arrayToCSL(array_keys($this->levelsEntered));
  66. $returnString .= ") $this->personName will have to select a different package or drop events first.";
  67. $returnString .= "</font>";
  68. return $returnString;
  69. }
  70. }
  71. ?>

Documentation generated on Tue, 25 Apr 2006 13:09:52 -0400 by phpDocumentor 1.3.0RC3