if ($_SESSION['KIChE']['member']['memberid']){ ?>
$affil=trim($_GET['affil']);
$pageSize = 15;
$pageScale = 10;
$curPage = $_GET['page'] ? $_GET['page'] : 1;
$start = ($curPage - 1) * $pageSize;
$membersSQLWhere[] = 'mstatus = 1';
if ($_GET['mem' ]) $membersSQLWhere[] = "memcode = '".$_GET['mem']."'";
if ($_GET['name' ]) $membersSQLWhere[] = "LOWER(names) LIKE '%' || LOWER('".$_GET['name']."') || '%'";
if ($affil) $membersSQLWhere[] = "(affiliation LIKE '%".$affil."%' OR department LIKE '%".$affil."%')";
if ($_GET['div' ]) $membersSQLWhere[] = "divcode LIKE '%".$_GET['div']."%'";
if ($_GET['brn' ]) $membersSQLWhere[] = "brncode = '".$_GET['brn']."'";
if ($_GET['job' ]) $membersSQLWhere[] = "jobcode = '".$_GET['job']."'";
$totals = $db->getOne("SELECT COUNT(memberid) FROM members WHERE mstatus = 1");
$searched = $db->getOne("SELECT COUNT(memberid) FROM members WHERE ".implode(' AND ', $membersSQLWhere));
$totPage = floor(($searched - 1) / $pageSize) + 1;
$res = $db->limitQuery("SELECT * FROM members WHERE ".implode(' AND ', $membersSQLWhere)." ORDER BY namek, affiliation", $start, $pageSize);
/*----------------------------------- Page Link Begin -----------------------------------*/
$qs = 'mem='.$_GET['mem']."&div=".$_GET['div']."&brn=".$_GET['brn']."&job=".$_GET['job']."&name=".urlencode($_GET['name'])."&affil=".urlencode($affil);
if (($totPage > $pageScale*3) && ($curPage > $pageScale)) $pageLinks.= "
[처음] "; // 페이지가 많을 때 처음 페이지 링크([First]) 생성
if ($curPage > $pageScale) {$prevPage = floor(($curPage - 1) / $pageScale) * $pageScale; $pageLinks.= "
[이전 $pageScale 페이지]... ";} // 이전범위 링크([prev]) 생성
$page_num = $totPage - floor(($curPage - 1) / $pageScale) * $pageScale;
$page_num = ($page_num >= $pageScale) ? $pageScale : $page_num;
$page_now = $curPage;
$curPage = floor(($page_now - 1) / $pageScale) * $pageScale + 1;
for ($i = 0; $i < $page_num; $i++) {
if ($totPage == 1) break;
$pageLinks.= ($curPage == $page_now) ? "
$curPage " : "
$curPage "; $curPage++;
}
if ($totPage > 1 && $curPage <= $totPage) $pageLinks.= " ...
[다음 $pageScale 페이지]"; // 다음범위 링크([Next]) 생성
if ($totPage > 1 && ($totPage > $pageScale*3) && $curPage <= $totPage) $pageLinks.= "
[마지막]"; // 페이지가 많을 때 마지막 페이지 링크([Last]) 생성
$curPage = $page_now;
/*----------------------------------- Page Link End -----------------------------------*/
?>
본 정보는 정보교류를 위해 학회회원에 한해서 제공됩니다.
=$curPage?> / =$totPage?> Pages 전체회원: =number_format($totals)?>명
No. |
성명 |
소속 |
회원종류 |
부문위원회 |
지부 |
전공분야 |
while ($row = $res->fetchRow()) {
echo "\n";
echo " ".(++$k + $start)." | \n";
echo " ".$row['namek']." | \n";
echo " ".$row['affiliation']." | \n";
echo " ".$Society->MemTypes[$row['memcode']]->ClassName." | \n";
echo " ".Member::getDivision($row['divcode'])." | \n";
echo " ".$Society->Branches[$row['brncode']]->Branch." | \n";
echo " ".$row['major']." | \n";
echo "
\n";
}
?>
=$pageLinks?> |
}else{ ?>
} ?>