本文整理汇总了PHP中Plan::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP Plan::getAll方法的具体用法?PHP Plan::getAll怎么用?PHP Plan::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plan
的用法示例。
在下文中一共展示了Plan::getAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
table#plans th,table#plans td {
border: 1px solid #efefef;
}
.valor {
font-size: 16px !important;
font-weight: bold;
}
</style>
<table id="plans" class="clearfix">
<thead class="clearfix">
<th class="cel-4 textcenter"></th>
<?php
foreach (Plan::getAll() as $plan) {
?>
<th class="textcenter"><input type="radio" name="plan_id"
class="radio" value="<?php
echo $plan->id;
?>
"
<?php
if (isset($_POST['plan_id']) && $_POST['plan_id'] == $plan->id || !array_key_exists('plan_id', $_POST) && $default_plan == $plan->id) {
echo ' checked ';
}
?>
>
<?php
echo $plan->name;
?>
示例2: header
<?php
if (!file_exists(realpath(dirname(__FILE__)) . '/ai-config.php')) {
header('Location: /installer.php');
}
$ACCESS_LEVEL = ACCESS_LEVEL_GUEST;
include_once LIB_ROOT . '/pages/page.class.php';
include_once LIB_ROOT . '/plans/plan.class.php';
include_once DOC_ROOT . '/includes/authorization.php';
$plans = new Plan();
$plans_all = $plans->getAll();
Project::getInstance()->getSmarty()->assign('plans', $plans_all);
$investment_plans = '
<table width="100%">
<tbody>
<tr>
<td class="ui-state-hover"><strong>Name</strong></td>
<td class="ui-state-hover"><strong>Min</strong></td>
<td class="ui-state-hover"><strong>Max</strong></td>
<td class="ui-state-hover"><strong>Percents</strong></td>
<td class="ui-state-hover"><strong>Periodicity</strong></td>
<td class="ui-state-hover"><strong>Term</strong></td>
<td class="ui-state-hover"><strong>Comment</strong></td>
</tr>';
foreach ($plans_all as $plan) {
switch ($plan['periodicy']) {
case 3600:
$periodicy = 'h';
break;
case 86400:
$periodicy = 'd';