$objWebInit = new xingfu_apply(); //数据库连接参数 $objWebInit->setDBG($arrGPdoDB); //smarty参数 $objWebInit->arrGSmarty = $arrGSmarty; //翻页参数 $objWebInit->arrGPage = $arrGPage; $objWebInit->db(); $user_id = $_SESSION['user_id']; $strWhere = ' WHERE user_id = ' . $user_id . ' '; if (!isset($_GET['page']) || $_GET['page'] == '') { $_GET['page'] = $arrGPage['page']; } $arrData = $objWebInit->getInfoList($strWhere, ' ORDER BY submit_date DESC', ($_GET['page'] - 1) * $arrGPage['page_size'], $arrGPage['page_size']); if ($arrData == "") { $arrData = null; } //翻页跳转link $strLink = ''; if (!empty($arrLink)) { $strLink = implode('&', $arrLink); } $strPage = $objWebInit->makeInfoListPage($arrData['COUNT_ROWS'], $strLink); unset($arrData['COUNT_ROWS']); // 输出到模板 $arrMOutput["smarty_assign"]['arrData'] = $arrData; $arrMOutput["smarty_assign"]['arrGState'] = $arrGState; $arrMOutput["smarty_assign"]['strPage'] = $strPage; $arrMOutput["smarty_assign"]['arrGState'] = $arrGState; $arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['adminu_main_dir'] . 'apply.html'; $objWebInit->output($arrMOutput);
if (empty($_POST['ethnic']) || $_POST['ethnic'] == '民族') { check::AlertExit('对不起,民族必须填写!!', -1); } $strIP = check::getip(); $_POST['user_ip'] = $strIP; $objWebInit->saveInfo($_POST, 0); check::AlertExit("", $arrGWeb['WEB_ROOT_pre'] . "/xingfu_apply/"); } if (!isset($_GET['page']) || $_GET['page'] == '') { $_GET['page'] = $arrGPage['page']; } $arrInfoList = $objWebInit->getInfolist("where pass=1", "ORDER BY submit_date DESC", ($_GET['page'] - 1) * $arrGPage['page_size'], $arrGPage['page_size'], '*', ''); $intRows = $arrInfoList['COUNT_ROWS']; unset($arrInfoList['COUNT_ROWS']); //静态url处理 $strLink = ''; if ($arrGWeb['URL_static']) { if (!empty($arrLink)) { $strLink = str_replace('=', '-', implode('-', $arrLink)); } } else { if (!empty($arrLink)) { $strLink = implode('&', $arrLink); } } //翻页跳转link $strPage = $objWebInit->makeInfoListPage($intRows, $strLink, $link_type = $arrGWeb['URL_static'], '4'); $arrMOutput["smarty_assign"]['arrInfoList'] = $arrInfoList; $arrMOutput["smarty_assign"]['strPage'] = $strPage; $arrMOutput["smarty_assign"]['MAIN'] = $arrGSmarty['main_dir'] . 'index.html'; $objWebInit->output($arrMOutput);