Beispiel #1
0
 function approve($id)
 {
     if ($_POST) {
         $poll = new poll($id);
         $poll->from_array($_POST);
         $poll->save();
         $poll->clear();
         $poll->where('id <>', $id)->get();
         $poll->update_all('active', 0);
     }
 }