Inhaltsverzeichnis

urnStatus()

array urnStatus(string urnIDs)

The function urnStatus() returns information regarding the status of the urns specified.

Return Value

If an error occurs, for example, if there is no urn with the ID specified, the function returns false. Otherwise, an array is returned with the following keys:

IndexMeaning
elementsNumber of ballots (elements) in the urn
drawnNumber of overall ballots already drawn and stored
roundNumber of time the urn has been emptied (begins with 1), corresponding to the return value of urnDraw()
doneNumer of ballots already drawn in the current round. If all ballots have been drawn from the urn, the next round commences and the number of ballots drawn is reset to 0
togoNumber of ballots in the current round that can still be drawn. If this number reaches 0, a new round begins and the value is reset to the number of ballots

Example

$info = urnStatus('urn1');
html('<p>Still '.$info['togo'].' out of '.$info['elements'].' prize codes available.</p>');