Пример #1
0
    case "F":
        // no break;
    // no break;
    case "G":
        // no break;
    // no break;
    case "H":
        // no break;
    // no break;
    case "I":
        // no break;
    // no break;
    case "J":
        break;
    default:
        echo "<script>alert('關卡設定錯誤'); location.href='index.php?page=award/list';</script>";
        exit;
}
include_once LIB_PATH . "Table/AwardSn.class.php";
$tb_award_sn = new AwardSn();
$counts = $tb_award_sn->countAwardSnByStage($param['stage']);
$pageBar['url'] = "index.php?page=award/show&stage=A&at=";
$pageBar['current'] = floor($param["at"]);
// 當前頁數
$pageBar['pageNums'] = ceil($counts / $param["limit"]);
// 總頁數
$pageBar['rowNums'] = floor($counts);
// 總筆數
// $tpl->pageBar = $pageBar;
$list = $tb_award_sn->listAwardSnByStage($param['stage']);
$tpl->list = $list;
Пример #2
0
<?php

$stage = array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J");
include_once LIB_PATH . "Table/AwardSn.class.php";
$tb_award_sn = new AwardSn();
$stageTitle = array();
$stageTitle["A"] = "關卡 I - 送10萬銀幣";
$stageTitle["B"] = "關卡 II - 送10萬祝福";
$stageTitle["C"] = "關卡 III - 送2個屬性刷新水晶";
$stageTitle["D"] = "關卡 IV - 送全家39元早餐兌換券";
$stageTitle["E"] = "關卡 V - 送1級隨機寶石";
$stageTitle["F"] = "關卡 VI - 「HTC New One」抽獎機會";
$stageTitle["G"] = "限量虛寶 - 九藏";
$stageTitle["H"] = "限量虛寶 - 森野樹";
$stageTitle["I"] = "限量虛寶 - 龍魂";
$stageTitle["J"] = "限量虛寶 - 黑鬍子祕寶";
$tpl->stageTitle = $stageTitle;
$stageCounts = array();
foreach ($stage as $value) {
    $stageCounts[$value] = $tb_award_sn->countAwardSnByStage($value);
    $stageCountsUserGet[$value] = $tb_award_sn->countAwardSnByStageUserGet($value);
}
$tpl->list = $stageCounts;
$tpl->stageCountsUserGet = $stageCountsUserGet;