示例#1
0
 public function testIsMulti()
 {
     $this->assertTrue(Award::isMulti(36));
 }
示例#2
0
                </tr>
            </table>
        </form>
        <div id="test"></div>
        <?php 
                } else {
                    if ($do == 'edit') {
                        //var_dump($_POST);
                        extract($_POST);
                        $awardlist = '';
                        $multi = '';
                        for ($i = 0; $i < count($awards); $i++) {
                            $awardlist .= $awards[$i];
                            if ($i < count($awards) - 1) {
                                $awardlist .= ',';
                            }
                            if (Award::isMulti($awards[$i])) {
                                $award = new Award($awards[$i], NULL, false);
                                $multiName = strtolower($award->getAbbrev()) . 'Multi';
                                $multi .= ${$multiName} . ',';
                            }
                        }
                        $multi = rtrim($multi, ',');
                        Award::updateUserAwards($user, $awardlist, $multi);
                        Event::addEvent($user->getName() . '\'s awards have been modified.', $_SESSION['user'], 2);
                    }
                }
            }
        }
    }
}