function moveToTheBottom($pageID) { global $structureMgr; if (!$pageID) { trigger_error("PageID must be specified for moving", PM_FATAL); } $chk = _postByPattern("/chk\\d+/"); if (count($chk) > 0) { //echo 'ToBottom<br>'; foreach ($chk as $key => $value) { //echo 'We moving '.$key.' and '.$value.'to the Bottom<br>'; movePage($value, "bottom"); } //print_r($chk); } header("Location: /admin?pageID={$pageID}"); }
$nowpage = intval($_GET['page']) - 1; $page = $nowpage * $pagecnt; } if (!empty($_GET['search'])) { $cond .= " and (`title` like '%{$_GET['search']}%' or `problem_id` like '{$nsearch}')"; } if (!isset($_SESSION['administrator'])) { $cond .= " and `defunct`='N'"; } $sql = "select count(*) from `problem` {$cond} order by `problem_id`"; $tmp = @mysql_query($sql); $res = @mysql_fetch_row($tmp); $tproblem = intval($res[0]); $tpage = $tproblem / $pagecnt; if ($tproblem == 1 && $nsearch <= 9999 && $nsearch >= 1000) { movePage("/problem/{$nsearch}"); } ?> <div style="text-align:center"> <form class="form-search" action="/problemset/"> <div class="input-append"> <input type="text" class="span4 search-query" name="search" placeholder="Smart Problem Search" value="<?php echo stripslashes($_GET['search']); ?> " tabindex=1> <button type="submit" class="btn"><i class="icon-search"></i></button> </div> </form> </div> <hr/> <div class="pagination pagination-centered">