Пример #1
0
 function __construct()
 {
     $this->data = Datahandler::FetchDataPoll();
     $this->id = $this->data['poll_id'];
     $this->statement = $this->data['statement'];
     $this->name = $this->data['poll_name'];
     $this->voterefs = Datahandler::FetchVoteRefsPoll($this->id);
 }
Пример #2
0
 function __construct($vID)
 {
     if (is_numeric($vID)) {
         $this->data = Datahandler::FetchVoteData($vID);
         if ($data[0] = true) {
             $this->v_id = $vID;
             $this->v_time = $this->data[1]['votetime'];
             $this->stance = $this->data[1]['stance'];
             $this->username = $this->data[1]['username'];
             $this->comment = $this->data[1]['comment'];
             $this->c_time = $this->data[1]['commenttime'];
         } else {
             echo "Failed to fetch Vote, we're terribly sorry!";
         }
     } else {
         echo 'Invalid vote reference';
     }
 }