-
add_account_allowed_person
int add_account_allowed_person(string club_name,
string account,
string person)
This method adds a person to the allowed people array.
- Parameters:
club_name - the name of the club
account - the name of the account
person - the person to add to the array
- See also:
remove_acount_allowed_person() and query_account_allowed_person()
-
add_account_allowed_position
int add_account_allowed_position(string club_name,
string account,
string position)
This method adds a position to the allowed positions array.
- Parameters:
club_name - the name of the club
account - the name of the account
position - the position to add to the array
- See also:
remove_acount_allowed_position() and query_account_allowed_position()
-
add_money
int add_money(string name,
int amount,
int type,
string person,
string account,
string information)
This method will pay a certain amount of money to club. This will be
how long the club is payed until. The club will cost a certain
amount for each member as well as a base cost.
- Parameters:
name - the name of the club
amount - the amount to add
type - the type of transaction
person - the person doing the transaction
account - the account being changed
information - the information about the deposit
- Returns:
the amount of money not able to be placed in the account
- See also:
remove_money(), query_balance() and query_transactions()
-
change_position_name_in_club
int change_position_name_in_club(string name,
string position,
string new_position)
This method changes the name of the position in the club.
- Parameters:
name - the name of the club to create the position in
position - the name of the position to change
new_position - the new name of the position
- See also:
create_position_in_club() and is_valid_position()
-
check_board_post
int check_board_post(int type,
string board,
string previous,
string name,
int num)
This method checks to see what access the person has to the board.
- Parameters:
type - the type of operation
board - the name of the board
previous - the previous object
name - the name of the person reading the message
num - the number of posts blasted when posting
- Returns:
1 on success, 0 on failure
-
complete_election
int complete_election(string club_name)
This method completes the election.
- Parameters:
club_name - the name of the club the election is being completed for
- See also:
start_election(), finish_nomination(), nominate_person() and vote_for_person()
-
create_club_board
int create_club_board(string club_name)
This method creates a board for the club.
- Parameters:
club_name - the name of the club to create the board for
- Returns:
1 on success, 0 on failure
- See also:
query_club_board()
-
create_position_in_club
int create_position_in_club(string name,
string position)
This method creates a position in the club.
- Parameters:
name - the name of the club to create the position in
position - the name of the position
- See also:
query_position_members(), is_valid_position() and query_valid_positions()
-
finish_nomination
mixed finish_nomination(string club_name)
This method finishes the nomination stuff. The return will be 0 if the
election is not valid for this club. If the election was valid it will
return an array of positions that do not have enough nominated people to
complete the election for. If the return array is 0 in size then the
next phase of the election is setup.
- Parameters:
club_name - the name of the club to finish the nomination for
- Returns:
see description for return values
- See also:
start_election(), nominate_person() and vote_for_person()
-
has_nominated_person
int has_nominated_person(string club_name,
string position,
string nominated,
string by)
This method checks to see if the person has already nominated
someone for this position.
- Parameters:
club_name - the name of the club
position - the position they have voted in
person - the person to check to see if they have voted
- See also:
is_valid_position(), vote_for_person() and has_person_voted()
-
has_person_voted
int has_person_voted(string club_name,
string position,
string person)
This method checks to see if the person has already voted in the election.
If the position is not being voted on then, then it will always assume
they have voted for that position.
- Parameters:
club_name - the name of the club
position - the position they have voted in
person - the person to check to see if they have voted
- Returns:
1 if they have voted, 0 if not
- See also:
is_valid_position(), vote_for_person() and has_nominated_person()
-
holds_any_position_of
int holds_any_position_of(string name,
string person)
This method will determine if the specified person holds any
position in the club.
- Parameters:
name - the name of the club to check for the positions
person - the name of the person to check in the positions
- Returns:
1 if they are in the position, 0 if not
-
holds_position_of
int holds_position_of(string name,
string position,
string person)
This method will determine if the specified person holds a
position in the club.
- Parameters:
name - the name of the club to check for the position
position - the name of the position to check
person - the name of the person to check in the position
- Returns:
1 if they are in the position, 0 if not
- See also:
holds_any_position_of(), is_secretary_of(), is_president_of(), is_vice_president_of() and is_treasurer_of()
-
is_allowed_to_modify_account
int is_allowed_to_modify_account(string club_name,
string account,
string person)
This method checks to see if the specified person is allowed to
access the account. It checks based on both position and name.
- Parameters:
club_name - the name of the club
account - the name of the account
person - the person's name to check
- Returns:
1 if they can access the account, 0 if they cannot
- See also:
query_account_allowed_people(), add_money(), remove_money() and query_account_allowed_positions()
-
is_basic_position
int is_basic_position(string club_name,
string position)
This method determines if the position is one of the 4 basic positions.
- Parameters:
club_name - the name of the club to check
position - the position to check
- Returns:
1 if it is, 0 if not
- See also:
is_valid_position()
-
is_elected_option
int is_elected_option(string club_name,
string option)
This method checks to see if the specified option exists in this
club.
- Parameters:
club_name - the name of the club
option - the name of the option to test
- Returns:
1 if the option exists, 0 if not
- See also:
set_elected_option() and query_elected_option()
-
is_election_in_progress
int is_election_in_progress(string club)
This method checks to see if there is currently an election in progress.
- Parameters:
club_name - the name of the club to check for an election
- Returns:
1 if there is an election in progress, 0 if not
- See also:
complete_election(), start_election(), is_nomination_in_progress() and is_voting_in_progress()
-
is_nominated_for
int is_nominated_for(string club_name,
string position,
string person)
This method checks to see if the specified person has been nominated for
the position.
- Parameters:
club_name - the name of the club
position - the position they have been nominated for
person - the person who is nominated to that position
- Returns:
1 if they have been nominated, 0 if not
- See also:
has_person_voted(), nominate_person(), is_valid_position() and is_nomination_accepted()
-
is_nomination_accepted
int is_nomination_accepted(string club_name,
string position,
string person)
This method checks to see if the nomination has been accepted. Currently
a nomination is accepted if there is more than 2 people nominated and one
of them is the person who is nominated.
- Parameters:
club_name - the name of the club to check
position - the position they are nominated for
person - the person who has been nominated
- Returns:
1 if they are nominated, 0 if not
- See also:
is_nominated_for() and query_nominators_for()
-
is_nomination_in_progress
int is_nomination_in_progress(string club)
This method checks to see if the election is in the nomination phase.
- Parameters:
club - the name of the club to check
- See also:
is_election_in_progress() and is_voting_in_progress()
-
is_president_of
int is_president_of(string name,
string president)
This method will determine if the specified person is the president of
the club.
- Parameters:
name - the name of the club to check the president of
president - the person to check for being the president
- Returns:
1 if they are in the position, 0 if not
-
is_secretary_of
int is_secretary_of(string name,
string secretary)
This method will determine if the specified person is the secretary of
the club.
- Parameters:
name - the name of the club to check the secretary of
secretary - the person to check to see if they are the secretary
- Returns:
1 if they are in the position, 0 if not
-
is_treasurer_of
int is_treasurer_of(string name,
string treasurer)
This method will determine if the specified person is the treasurer of
the club.
- Parameters:
name - the name of the club to check the treasurer of
treasurer - the person to check to see if they are the treasurer
- Returns:
1 if they are in the position, 0 if not
-
is_valid_position
int is_valid_position(string club_name,
string position)
This method determines if this is a valid position for the club.
- Parameters:
club_name - the name of the club
position - the position to check
- Returns:
1 if the position is ok, 0 if not
- See also:
query_valid_positions(), nominate_person() and vote_for_person()
-
is_vice_president_of
int is_vice_president_of(string name,
string vice_president)
This method will determine if the specified person is the vice president of
the club.
- Parameters:
name - the name of the club to check the vice president of
vice_president - the person to check for being the vice president
- Returns:
1 if they are in the position, 0 if not
-
is_voting_in_progress
int is_voting_in_progress(string club)
This method checks to see if the election is in the voting phase.
- Parameters:
club - the name of the club to check
- See also:
is_election_in_progress() and is_nomination_in_progress()
-
nominate_person
int nominate_person(string club_name,
string position,
string person,
string nominating)
This method nominates someone for a certain position in the club.
- Parameters:
club_name - the name of the club to nominate someone in
position - the position to nominate someone for
person - the person to nominate
nominating - the person doing the nominating
- Returns:
1 if successfuly nominated
- See also:
start_election(), finish_nomination() and vote_for_person()
-
query_account_allowed_people
string * query_account_allowed_people(string club_name,
string account)
This method returns the people which allowed to manipulate the
account.
- Parameters:
club_name - the name of the club
account - the name of the account
- Returns:
the array of people which can manipulate the account
- See also:
add_acount_allowed_person() and remove_account_allowed_person()
-
query_account_allowed_positions
string * query_account_allowed_positions(string club_name,
string account)
This method returns the positions which are allowed to manipulate the
account.
- Parameters:
club_name - the name of the club
account - the name of the account
- Returns:
the array of people which can manipulate the account
-
query_announcement
string query_announcement(string club_name)
This method returns the current announcement string.
- Parameters:
club_name - the name of the club
- Returns:
the announcement string
-
query_announcement_time
int query_announcement_time(string club_name)
This method returns the time at which the current announcement
was added.
- Parameters:
club_name - the name of the club
- Returns:
the time the announcement was added
-
query_archives
class club_archive * query_archives(string club_name)
This method returns the archives for this club.
- Parameters:
club_name - the name of the club to get archives from
- Returns:
the archives for the club
-
query_boards
string * query_boards()
This method returns all the clubs which currently have boards.
This is their normalised names.
- Returns:
the list of boards
-
query_club_board
int query_club_board(string club_name)
This method checks to see if the club has a board.
- Parameters:
club_name - the name of the club to check
- Returns:
1 on success, 0 on failure
- See also:
query_boards()
-
query_club_board_name
string query_club_board_name(string club_name)
This method returns the name of the board for the club.
- Parameters:
club_name - the name of the club to get the board for
- Returns:
the name of the club, 0 if no board
-
query_committee
string * query_committee(string club_name)
This method returns the committee of the club. The committee is anyone
who holds a position.
- Parameters:
club_name - the name of the club
- Returns:
the array of people who hold positions
-
query_elected_option
mixed query_elected_option(string club_name,
string option)
This method queries the option in the club.
- Parameters:
club_name - the name of the club
option - the name of the option to query
- Returns:
the value of the option
- See also:
set_elected_option() and is_elected_option()
-
query_election_status
string query_election_status(string club_name)
This method queries the status associated with the election. The
status will say things like when certain positions have not been
voted for and other such stuff.
- Parameters:
club - the club name to get the status of
- Returns:
the status string of the club
- See also:
complete_election() and finish_nomination()
-
query_last_election
int query_last_election(string name)
This method returns the time of the last election.
- Parameters:
name - the name of the club to get the time for
- Returns:
the time of the last election
-
query_minimum_next_election
int query_minimum_next_election(string name)
This method returns the minimum time between elections.
- Parameters:
name - the name of the club to get the time for
- Returns:
the minimum time for the next election
-
query_next_election
int query_next_election(string name)
This method returns the time of the next election.
- Parameters:
name - the name of the club to get the time for
- Returns:
the time of the next election
-
query_next_event_time
int query_next_event_time(string club_name)
This method returns the time the next event will occur. The next event
will be either the end of the nomination phase or the end of the
voting phase.
- Parameters:
club_name - the name of the club to get the event of
- Returns:
the time of the next event
- See also:
complete_election(), start_election() and finish_nomination()
-
query_nominated_for
string * query_nominated_for(string club_name,
string position)
This method returns the list of people that have been nominated for
the specified position in the specified club.
- Parameters:
club_name - the name of the club
position - the position to get the names of
- See also:
is_nominate_for() and nominate_person()
-
query_nominators_for
string * query_nominators_for(string club_name,
string position,
string nominated)
This method returns the people who nominated the specified person
to the position.
- Parameters:
club_name - the name of the club
position - the position they were nominated for
nominated - the person who was nominated
- Returns:
who nominated them
- See also:
query_nominated_for() and is_nomination_accepted()
-
query_position_members
string query_position_members(string club_name,
string position)
This method returns the members of the particular position.
- Parameters:
club_name - the name of the club
position - the name of the position
- Returns:
the array of members of the position
- See also:
query_valid_position() and is_valid_position()
-
query_position_name
string query_position_name(string club_name,
string position)
This method figures out the actualy index of the position in the mappings
and stuff associated with the position.
- Parameters:
club_name - the name of the club
position - the position to create the index for
- Returns:
the position index
- See also:
query_valid_positions(), nominate_person() and vote_for_person()
-
query_transaction_type_name
string query_transaction_type_name(int type)
This method returns the string name of the transaction type.
- Parameters:
type - the type to return the transaction type for
- Returns:
the nice transaction type
- See also:
query_transactions()
-
query_transactions
class club_transaction * query_transactions(string name,
string account)
This method returns the transaction history for the club. This will only
be kept track of for elected clubs.
- Parameters:
name - the name of the club
account - the name of the account
- Returns:
the array of transactions
- See also:
add_money() and remove_money()
-
query_valid_positions
string * query_valid_positions(string club_name)
This method returns the list of available positions for the club.
- Parameters:
club_name - the name of the club
- Returns:
the list of available positions
-
remove_account_allowed_person
int remove_account_allowed_person(string club_name,
string account,
string person)
This method removes a person from the allowed people array.
- Parameters:
club_name - the name of the club
account - the name of the account
person - the person to remove from the array
- See also:
add_acount_allowed_person() and query_account_allowed_person()
-
remove_account_allowed_position
int remove_account_allowed_position(string club_name,
string account,
string position)
This method removes a position from the allowed positions array.
- Parameters:
club_name - the name of the club
account - the name of the account
position - the position to remove from the array
- See also:
add_acount_allowed_position() and query_account_allowed_position()
-
remove_club_board
int remove_club_board(string club_name)
This method removes the club's board.
- Parameters:
club_name - the name of the club to remove the board from
- Returns:
1 on success, 0 on failure
-
remove_elected_option
int remove_elected_option(string club_name,
string option)
This method removes an option in the club. Options are use for things
like setting if the club has a board associated with it, or other
optional elements.
- Parameters:
club_name - the name of the club to remove the option in
option - the name of the option to remove
- Returns:
1 on success, 0 on failure
- See also:
query_elected_option() and is_elected_option()
-
remove_money
int remove_money(string name,
int amount,
int type,
string person,
string account,
string information)
This method removes money from the account.
- Parameters:
name - the name of the club
amount - the amount to change the balance by
type - the type of transaction
person - the person doing the transaction
account - the account being changed
information - the information about the deposit
- Returns:
1 if the removal is a success
- See also:
pay_money(), query_balance() and query_transactions()
-
remove_position_in_club
int remove_position_in_club(string name,
string position)
This method removes a position from a club. The 4 basic positions cannot
be removed.
- Parameters:
name - the name of the club to remove the position from
position - the position to remove
- Returns:
1 on success, 0 on failure
- See also:
create_position_in_club()
-
set_announcement
int set_announcement(string club_name,
string announce)
This sets the current announcement.
- Parameters:
club_name - the name of the club
announce - the new announcement
- Returns:
1 on success, 0 on failure
-
set_elected_option
int set_elected_option(string club_name,
string option,
mixed value)
This method sets an option in the club. Options are use for things
like setting if the club has a board associated with it, or other
optional elements.
- Parameters:
club_name - the name of the club to set the option in
option - the name of the option to set
value - the new value of the option
- Returns:
1 on success, 0 on failure
- See also:
query_elected_option() and is_elected_option()
-
set_position_holder
int set_position_holder(string club_name,
string position,
string person)
This method sets the specified person as the holder of the position.
- Parameters:
club_name - the name of the club to set the position in
position - the name of the position
person - the person who will hold it
- Returns:
1 on success, 0 on failure
-
start_election
int start_election(string club_name)
This method starts an election for the specified club.
- Parameters:
club_name - the name of the club to start an election for
- Returns:
1 if the election is successful started
- See also:
nominate_person(), finish_nominations() and vote_for_person()
-
vote_for_person
int vote_for_person(string club_name,
string position,
string person,
string voter)
This method sets up a vote for a specific person for a position.
- Parameters:
club_name - the name of the club to make the vote in
position - the position you are voting for
person - the person to vote for
voter - the person doing the voting
- Returns:
1 on success, 0 on failure
- See also:
start_election(), finish_nomination() and nominate_person()