$page_count = 0; while ($i < $row_number) { if ($page_count == 0) { $return_string = $return_string . "<div id=\"search_page" . $page_no . "\" "; if ($page_no == 1) { $return_string = $return_string . "style=\"display:block;\""; } else { $return_string = $return_string . "style=\"display:none;\""; } $return_string = $return_string . ">" . "<table id=\"search_table\" class=\"report\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . "<colgroup>" . "<col class=\"num\"/>" . "<col class=\"ProbType\"/>" . "<col class=\"ProbDesc\"/>" . "<col class=\"ProbCategory\"/>" . "<col class=\"ProbLevel\"/>" . "<col class=\"ProbMemo\"/>" . "<col class=\"ProbStatus\"/>" . "<col class=\"ProbAction\"/>" . "</colgroup>" . "<tr>" . "<th>编号</th>" . "<th>类型</th>" . "<th>描述</th>" . "<th>分类</th>" . "<th>难易</th>" . "<th>备注</th>" . "<th>状态</th>" . "<th>动作</th>" . "</tr>"; } if ($page_count < $page_size) { $row = mysqli_fetch_assoc($result); $ProbId = $row["ProblemId"]; $ProbType = $row["ProblemType"]; $ProbTypeStr = get_type_name_from_id($ProbType); $ProbDesc = $row["ProblemDesc"]; $ProbCategory = $row["ProblemCategory"]; $funcs_id = get_function_id($ProbCategory); $funcs_name = get_funcs_name($funcs_id); $funcs_name_str = get_funcs_name_str($funcs_name); $ProbLevel = $row["ProblemLevel"]; $ProbLevelStr = get_level_name($ProbLevel); $ProbMemo = $row["ProblemMemo"]; $ProbStatus = $row["Status"]; $StatusStr = $ProbStatus == 0 ? "下架" : "上架"; $StatusAction = $ProbStatus == 1 ? "下架" : "上架"; $page_count_display = $page_count + 1; $return_string = $return_string . "<tr>" . "<td>{$page_count_display}</td>" . "<td><span class=\"ProbType fixWidth\">{$ProbTypeStr}</span></td>" . "<td><span class=\"ProbDesc fixWidth\">{$ProbDesc}</span></td>" . "<td><span class=\"ProbCategory fixWidth\">{$funcs_name_str}</span></td>" . "<td><span class=\"ProbLevel fixWidth\">{$ProbLevelStr}</span></td>" . "<td><span class=\"ProbMemo fixWidth\">{$ProbMemo}</span></td>" . "<td>{$StatusStr}</td>" . "<td><A OnClick=\"actionSearchProbs({$ProbId},{$ProbStatus});\">{$StatusAction}</A><br/>" . "<A OnClick=\"modifySearchProbs({$ProbId});\">修改</A><br/>" . "<A OnClick=\"deleteSearchProbs({$ProbId});\">删除</A></td>" . "</tr>"; $i++; $page_count++;
<div class="row"> <div class="col-md-12"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">题目</h3> </div> <div class="panel-body"> <div class="problem_info"> <table class="problems_table table"> <th style="width:3%">编号</th><th style="width:5%">题型</th><th style="width:5%">难易</th><th>描述</th> <?php for ($i = 0; $i < count($problems); $i++) { $sequence = $i + 1; echo "<tr><td>" . $sequence . "</td><td>" . get_type_name_from_id($problems[$i]->type) . "</td><td>" . get_level_name($problems[$i]->level) . "</td><td>" . $problems[$i]->desc . "</td></tr>"; } ?> </table> </div> <?php if ($ExamStatus != 1) { ?> <tr> <th colspan="4" class="submitBtns"> <a class="btn_submit_new modifyExamsContent"><input name="modifyExamsButton" type="button" value="保存" OnClick="modifyExamsContent(<?php echo $ExamId; ?> )"></a>