$smarty->display("rank.html"); } else { echo "<script>alert('该员工名下没有可管理的光交箱!');history.back();</script>"; } } else { if (isset($_GET['active']) && $_GET['active'] == "delete") { $bRet = Box::deleteBoxById($_GET['code']); echo true; } else { if (isset($_GET['active']) && $_GET['active'] == "alterRank") { $rankBean = Rank::getRankById($_GET['id']); echo json_encode($rankBean, JSON_UNESCAPED_UNICODE); } else { if (isset($_POST['submit']) && !empty($_POST['id'])) { $arrayBean = array($_POST['name'], $_POST['desc'], $_POST['id']); $bRet = Rank::updateRank($arrayBean); if ($bRet == true) { $rankBean = Rank::getAllRecord(); $arrayType_1 = array(); $arrayType_2 = array(); $arrayType_3 = array(); foreach ($rankBean as $arrayIndex) { if ($arrayIndex->getType() == 1) { $arrayType_1[] = $arrayIndex; } else { if ($arrayIndex->getType() == 2) { $arrayType_2[] = $arrayIndex; } else { if ($arrayIndex->getType() == 3) { $arrayType_3[] = $arrayIndex; }