コード例 #1
0
ファイル: clanprocess.php プロジェクト: testt98/ebattles
    $clan->setField('Description', $_POST['clandescription']);
    if ($clan_id) {
        // Need to update the event in database
        $clan->updateDB();
    } else {
        // Need to create a clan.
        $clan->setField('Owner', USERID);
        $clan_id = $clan->insert();
    }
    //echo "-- clansettingssave --<br />";
    header("Location: clanmanage.php?clanid={$clan_id}");
    exit;
}
if (isset($_POST['clanchangeowner'])) {
    /* Clan Owner */
    $clan->setFieldDB('Owner', $_POST['clanowner']);
    //echo "-- clanchangeowner --<br />";
    header("Location: clanmanage.php?clanid={$clan_id}");
    exit;
}
if (isset($_POST['clanchangedivcaptain'])) {
    $clan_div = $_POST['clandiv'];
    $div_captain = $tp->toDB($_POST['divcaptain']);
    $division = new Division($clan_div);
    $game_id = $division->getField('Game');
    /* Division Captain */
    $q2 = "UPDATE " . TBL_DIVISIONS . " SET Captain = '{$div_captain}' WHERE (DivisionID = '{$clan_div}')";
    $result2 = $sql->db_Query($q2);
    //echo "-- clanchangedivcaptain --<br />";
    header("Location: clanmanage.php?clanid={$clan_id}&amp;gameid={$game_id}");
    exit;