本文整理汇总了PHP中Universe::displayOrdinaryBaskets方法的典型用法代码示例。如果您正苦于以下问题:PHP Universe::displayOrdinaryBaskets方法的具体用法?PHP Universe::displayOrdinaryBaskets怎么用?PHP Universe::displayOrdinaryBaskets使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Universe
的用法示例。
在下文中一共展示了Universe::displayOrdinaryBaskets方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
$root_dir = $_SERVER['DOCUMENT_ROOT'] . '/Balls';
require_once $root_dir . '/Classes/ball.class.php';
require_once $root_dir . '/Classes/basket.class.php';
require_once $root_dir . '/Classes/ordinaryBasket.class.php';
require_once $root_dir . '/Classes/output.class.php';
require_once $root_dir . '/Classes/resultOutput.class.php';
require_once $root_dir . '/Classes/standardOutput.class.php';
require_once $root_dir . '/Classes/universe.class.php';
require_once $root_dir . '/Classes/userBasket.class.php';
if (isset($_POST['back'])) {
unset($_POST);
$output = new standardOutput();
$output->renderStandardView();
} elseif ($_SERVER['REQUEST_METHOD'] == 'POST') {
$universe = new Universe();
$basketsContent = $universe->displayOrdinaryBaskets();
if (preg_match('/^[0-9]{1,3}$/', $_POST['usersBasketAmount'])) {
if ($_POST['usersBasketAmount'] >= 1 and $_POST['usersBasketAmount'] <= 100) {
$userBasketContent = $universe->generateUserBasket($_POST['usersBasketAmount']);
} else {
$error = true;
}
} else {
if ($_POST['usersBasketAmount'] != '') {
$error = true;
} else {
$userBasketContent = $universe->generateUserBasket();
}
}
if (!isset($error)) {
$taskB = $universe->checkTaskB();