Exemplo n.º 1
0
         if ($page <= 0 or $page >= 100) {
             $page = 1;
         }
         unset($_SESSION['contents']);
         unset($_SESSION['type']);
         $_SESSION['page'] = $page;
         $page_a = $page * 10 - 10;
         if ($page == 1) {
             $page_b = $page;
         } else {
             $page_b = $page - 1;
         }
         $list_query = DB::fetch_all("SELECT * FROM `" . DCRM_CON_PREFIX . "UDID` ORDER BY `ID` DESC, `CreateStamp` DESC, `TimeStamp` DESC LIMIT " . (string) $page_a . ",10");
         $page_c = show_table($list_query);
         $q_info = DB::query("SELECT count(*) FROM `" . DCRM_CON_PREFIX . "UDID`");
         $info = db_mysql::fetch_row($q_info);
         $totalnum = (int) $info[0];
         $params = array('total_rows' => $totalnum, 'method' => 'html', 'parameter' => 'udid.php?page=%page', 'now_page' => $page, 'list_rows' => 10);
         $page = new Core_Lib_Page($params);
         echo '<div class="page">' . $page->show(2) . '</div>';
     }
 } elseif (!empty($_GET['action']) and $_GET['action'] == "search" and !empty($_GET['contents']) and !empty($_GET['type'])) {
     // 搜索内容显示
     unset($_SESSION['page']);
     $_SESSION['contents'] = $_GET['contents'];
     $_SESSION['type'] = $_GET['type'];
     if (isset($_GET['page'])) {
         $page = $_GET['page'];
     } else {
         $page = 1;
     }