本文整理汇总了PHP中Team::frompost方法的典型用法代码示例。如果您正苦于以下问题:PHP Team::frompost方法的具体用法?PHP Team::frompost怎么用?PHP Team::frompost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Team
的用法示例。
在下文中一共展示了Team::frompost方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Team
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// Part 2 of update player ranks for team.
include 'php/session.php';
include 'php/checklogged.php';
include 'php/opendatabase.php';
include 'php/club.php';
include 'php/rank.php';
include 'php/player.php';
include 'php/team.php';
include 'php/teammemb.php';
include 'php/match.php';
include 'php/matchdate.php';
include 'php/game.php';
try {
$team = new Team();
$team->frompost();
$team->fetchdets();
} catch (TeamException $e) {
$mess = $e->getMessage();
include 'php/wrongentry.php';
exit(0);
}
$membs = $team->list_members();
$n = 0;
foreach ($membs as $m) {
$m->fetchdets();
$r = $_POST["rank{$n}"];
if (strlen($r) == 0) {
$mess = "Confused about team member ranks";
include 'php/wrongentry.php';
exit(0);
示例2: Params
include 'php/game.php';
include 'php/sortrank.php';
include 'php/news.php';
include 'php/params.php';
include 'php/hcp_message.php';
include 'php/mailalloc.php';
$pars = new Params();
$pars->fetchvalues();
$mtch = new Match();
try {
$mtch->frompost();
$mtch->fetchdets();
$mtch->fetchteams();
$mtch->fetchgames();
$Myteam = new Team();
$Myteam->frompost();
if ($Myteam->is_same($mtch->Hteam)) {
$Myteam = $mtch->Hteam;
$Histeam = $mtch->Ateam;
} else {
$Myteam = $mtch->Ateam;
$Histeam = $mtch->Hteam;
}
} catch (MatchException $e) {
$mess = $e->getMessage();
include 'php/wrongentry.php';
exit(0);
} catch (TeamException $e) {
$mess = $e->getMessage();
include 'php/wrongentry.php';
exit(0);
示例3: exit
$mess = "No team name?";
include 'php/wrongentry.php';
exit(0);
}
$team = new Team($teamname);
checkname($team);
$team->Description = $teamdescr;
$team->Division = $teamdiv;
$team->Captain = new Player($captfirst, $captlast);
$team->create();
$Title = "Team {$team->display_name()} created OK";
break;
default:
try {
$origteam = new Team();
$origteam->frompost();
$origteam->fetchdets();
} catch (TeamException $e) {
$mess = $e->getMessage();
include 'php/wrongentry.php';
exit(0);
}
// Check name changes
$newteam = new Team($teamname);
if (!$origteam->is_same($newteam)) {
checkname($newteam);
$origteam->updatename($newteam);
}
$origteam->Description = $teamdescr;
$origteam->Division = $teamdiv;
$origteam->Captain = new Player($captfirst, $captlast);